Changeset 3400189
- Timestamp:
- 11/21/2025 06:07:28 AM (4 months ago)
- Location:
- snow-monkey-blocks/trunk
- Files:
-
- 54 edited
-
changelog.txt (modified) (1 diff)
-
dist/blocks/balloon/index.asset.php (modified) (1 diff)
-
dist/blocks/balloon/index.js (modified) (1 diff)
-
dist/blocks/box/index.asset.php (modified) (1 diff)
-
dist/blocks/box/index.js (modified) (1 diff)
-
dist/blocks/btn-box/index.asset.php (modified) (1 diff)
-
dist/blocks/btn-box/index.js (modified) (1 diff)
-
dist/blocks/btn/index.asset.php (modified) (1 diff)
-
dist/blocks/btn/index.js (modified) (1 diff)
-
dist/blocks/custom-field/index.asset.php (modified) (1 diff)
-
dist/blocks/custom-field/index.js (modified) (1 diff)
-
dist/blocks/hero-header/index.asset.php (modified) (1 diff)
-
dist/blocks/hero-header/index.js (modified) (1 diff)
-
dist/blocks/information/index.asset.php (modified) (1 diff)
-
dist/blocks/information/index.js (modified) (1 diff)
-
dist/blocks/items/item/banner/index.asset.php (modified) (1 diff)
-
dist/blocks/items/item/banner/index.js (modified) (1 diff)
-
dist/blocks/items/item/block-link/index.asset.php (modified) (1 diff)
-
dist/blocks/items/item/block-link/index.js (modified) (1 diff)
-
dist/blocks/items/item/standard/index.asset.php (modified) (1 diff)
-
dist/blocks/items/item/standard/index.js (modified) (1 diff)
-
dist/blocks/items/style-index-rtl.css (modified) (1 diff)
-
dist/blocks/items/style-index.css (modified) (1 diff)
-
dist/blocks/media-text/index.asset.php (modified) (1 diff)
-
dist/blocks/media-text/index.js (modified) (1 diff)
-
dist/blocks/panels/item/horizontal/index.asset.php (modified) (1 diff)
-
dist/blocks/panels/item/horizontal/index.js (modified) (1 diff)
-
dist/blocks/panels/item/vertical/index.asset.php (modified) (1 diff)
-
dist/blocks/panels/item/vertical/index.js (modified) (1 diff)
-
dist/blocks/pattern-inserter/index.asset.php (modified) (1 diff)
-
dist/blocks/pattern-inserter/index.js (modified) (1 diff)
-
dist/blocks/pricing-table/item/index.asset.php (modified) (1 diff)
-
dist/blocks/pricing-table/item/index.js (modified) (1 diff)
-
dist/blocks/read-more-box/index.asset.php (modified) (1 diff)
-
dist/blocks/read-more-box/index.js (modified) (1 diff)
-
dist/blocks/recent-posts/index.asset.php (modified) (1 diff)
-
dist/blocks/recent-posts/index.js (modified) (1 diff)
-
dist/blocks/section-break-the-grid/index.asset.php (modified) (1 diff)
-
dist/blocks/section-break-the-grid/index.js (modified) (1 diff)
-
dist/blocks/section-with-bgimage/index.asset.php (modified) (1 diff)
-
dist/blocks/section-with-bgimage/index.js (modified) (1 diff)
-
dist/blocks/slider/item/index.asset.php (modified) (1 diff)
-
dist/blocks/slider/item/index.js (modified) (1 diff)
-
dist/blocks/spider-slider/index.asset.php (modified) (1 diff)
-
dist/blocks/spider-slider/index.js (modified) (1 diff)
-
dist/blocks/step/item/standard/index.asset.php (modified) (1 diff)
-
dist/blocks/step/item/standard/index.js (modified) (1 diff)
-
dist/blocks/taxonomy-posts/index.asset.php (modified) (1 diff)
-
dist/blocks/taxonomy-posts/index.js (modified) (1 diff)
-
dist/blocks/thumbnail-gallery/item/index.asset.php (modified) (1 diff)
-
dist/blocks/thumbnail-gallery/item/index.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
snow-monkey-blocks.php (modified) (1 diff)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
snow-monkey-blocks/trunk/changelog.txt
r3390891 r3400189 1 1 *** Changelog *** 2 3 = 24.1.7 = 4 * [Items] Fixed a margin issue when "Align the bottom of the last element of each items" is enabled. 5 * Fixed a bug that prevented "Reset All" from being performed for border settings. 6 * Fixed a bug where border settings were sometimes not reflected correctly. 2 7 3 8 = 24.1.6 = -
snow-monkey-blocks/trunk/dist/blocks/balloon/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-i18n', 'wp-primitives'), 'version' => ' f9fda375d0dd1c14dfdb');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-i18n', 'wp-primitives'), 'version' => '84f522914bfad9f52d91'); -
snow-monkey-blocks/trunk/dist/blocks/balloon/index.js
r3390754 r3400189 1 (()=>{var o,e={8123:(o,e,a)=>{"use strict";const r=window.wp.blocks,l=JSON.parse('{"UU":"snow-monkey-blocks/balloon","uK":{"showAvatar":{"type":"boolean","default":true},"avatarID":{"type":"number","default":0},"avatarURL":{"type":"string","source":"attribute","selector":"img","attribute":"src","default":"https://0.gravatar.com/avatar/00000000000000000000000000000000?s=128&d=mp&r=g"},"avatarAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"avatarBorderColor":{"type":"string"},"avatarBorderStyle":{"type":"string"},"avatarBorderWidth":{"type":"string"},"backgroundColor":{"type":"string"},"borderColor":{"type":"string"},"borderStyle":{"type":"string"},"borderWidth":{"type":"string"},"textColor":{"type":"string"},"balloonName":{"type":"string","default":""},"modifier":{"type":"string","default":""},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"spacing":{"margin":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":["balloonBody"]}}}}'),t=window.ReactJSXRuntime,s=(0,t.jsx)("svg",{viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M20,5.48H4a1,1,0,0,0-1,1v8a1,1,0,0,0,1,1H7l1.12,3,3.29-3H20a1,1,0,0,0,1-1v-8A1,1,0,0,0,20,5.48ZM20,14a.5.5,0,0,1-.5.5H11.31l-1.1,1h0l-1.12,1-.5.46-.11-.31L8,15.4H8l-.35-.92H4.5A.5.5,0,0,1,4,14V7a.5.5,0,0,1,.5-.5h15A.5.5,0,0,1,20,7Z"})});var n=a(6942),i=a.n(n);const d=window.wp.blockEditor,b=window.wp.components,c=window.wp.primitives;var m=(0,t.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(c.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}), v=(0,t.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(c.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})});const u=window.wp.i18n,p=(window.lodash,window.wp.compose),h=[["core/paragraph"]],x=l.uK,_=l.xY,y=[{attributes:{...x,balloonBody:{type:"string",source:"html",selector:".smb-balloon__body",multiline:"p",default:""}},supports:{..._},migrate(o){const{balloonBody:e}=o,a=(e.match(/<p>(.+?)<\/p>/g)||[]).map((o=>(0,r.rawHandler)({HTML:o})[0]));return[{...o},[...a]]},save({attributes:o,className:e}){const{avatarID:a,avatarAlt:r,avatarURL:l,avatarBorderColor:s,backgroundColor:n,textColor:b,balloonName:c,balloonBody:m,modifier:v}=o,u={"--smb-balloon--background-color":n||void 0,"--smb-balloon--border-color":n||void 0,"--smb-balloon--color":b||void 0,"--smb-balloon--avatar-border-color":s||void 0},p=i()("smb-balloon",{[e]:!!e,[`smb-balloon--${v}`]:!!v});return(0,t.jsxs)("div",{...d.useBlockProps.save({className:p,style:u}),children:[(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",children:(0,t.jsx)("img",{src:l,alt:r,className:`wp-image-${a}`})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:(0,t.jsx)(d.RichText.Content,{value:c})})]}),(0,t.jsx)("div",{className:"smb-balloon__body",children:(0,t.jsx)(d.RichText.Content,{value:m})})]})}},{attributes:{...x,balloonBody:{type:"string",source:"html",selector:".smb-balloon__body",multiline:"p",default:""}},supports:{..._},migrate(o){const{balloonBody:e}=o,a=(e.match(/<p>(.+?)<\/p>/g)||[]).map((o=>(0,r.rawHandler)({HTML:o})[0]));return[{...o},[...a]]},save({attributes:o,className:e}){const{avatarID:a,avatarAlt:r,avatarURL:l,avatarBorderColor:s,backgroundColor:n,textColor:b,balloonName:c,balloonBody:m,modifier:v}=o,u={borderColor:s||void 0},p={backgroundColor:n||void 0,borderColor:n||void 0,color:b||void 0},h=i()("smb-balloon",{[e]:!!e,[`smb-balloon--${v}`]:!!v});return(0,t.jsxs)("div",{...d.useBlockProps.save({className:h}),children:[(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",style:u,children:(0,t.jsx)("img",{src:l,alt:r,className:`wp-image-${a}`})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:(0,t.jsx)(d.RichText.Content,{value:c})})]}),(0,t.jsx)("div",{className:"smb-balloon__body",style:p,children:(0,t.jsx)(d.RichText.Content,{value:m})})]})}},{attributes:{...x,balloonBody:{type:"string",source:"html",selector:".smb-balloon__body",multiline:"p",default:""}},supports:{..._},migrate(o){const{balloonBody:e}=o,a=(e.match(/<p>(.+?)<\/p>/g)||[]).map((o=>(0,r.rawHandler)({HTML:o})[0]));return[{...o},[...a]]},save({attributes:o}){const{avatarID:e,avatarURL:a,avatarBorderColor:r,balloonName:l,balloonBody:s,modifier:n}=o;return(0,t.jsxs)("div",{className:i()("smb-balloon",{[`smb-balloon--${n}`]:!!n}),children:[(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",style:{borderColor:r},children:(0,t.jsx)("img",{src:a,alt:"",className:`wp-image-${e}`})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:l})]}),(0,t.jsx)("div",{className:"smb-balloon__body",children:(0,t.jsx)(d.RichText.Content,{value:s})})]})}},{attributes:{...x,balloonBody:{type:"string",source:"html",selector:".smb-balloon__body",multiline:"p",default:""}},supports:{..._},migrate(o){const{balloonBody:e}=o,a=(e.match(/<p>(.+?)<\/p>/g)||[]).map((o=>(0,r.rawHandler)({HTML:o})[0]));return[{...o},[...a]]},save({attributes:o}){const{avatarURL:e,avatarBorderColor:a,balloonName:r,balloonBody:l,modifier:s}=o;return(0,t.jsxs)("div",{className:i()("smb-balloon",{[`smb-balloon--${s}`]:!!s}),children:[(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",style:{borderColor:a},children:(0,t.jsx)("img",{src:e,alt:""})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:r})]}),(0,t.jsx)("div",{className:"smb-balloon__body",children:(0,t.jsx)(d.RichText.Content,{value:l})})]})}}];(0,r.registerBlockType)(l.UU,{icon:{foreground:"#cd162c",src:s},edit:function({attributes:o,setAttributes:e,className:a}){const{showAvatar:r,avatarID:s,avatarAlt:n,avatarURL:c,avatarBorderColor:x,avatarBorderStyle:_,avatarBorderWidth:y,backgroundColor:g,borderColor:f,borderStyle:w,borderWidth:j,textColor:k,balloonName:B,modifier:C,templateLock:N}=o,S=(0,d.__experimentalUseMultipleOriginColorsAndGradients)(),A={"--smb-balloon--background-color":g||void 0,"--smb-balloon--border-color":f||g||void 0,"--smb-balloon--border-style":w||void 0,"--smb-balloon--border-width":j||void 0,"--smb-balloon--color":k||void 0,"--smb-balloon--avatar-border-color":x||void 0,"--smb-balloon--avatar-border-style":_||void 0,"--smb-balloon--avatar-border-width":y||void 0},T=i()("smb-balloon",{[a]:!!a,[`smb-balloon--${C}`]:!!C}),P=(0,d.useBlockProps)({className:T,style:A}),R=(0,d.useInnerBlocksProps)({className:"smb-balloon__body"},{template:h,templateLock:N}),I=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.InspectorControls,{children:[(0,t.jsxs)(b.__experimentalToolsPanel,{label:(0,u.__)("Balloon settings","snow-monkey-blocks"),dropdownMenuProps:I,children:[(0,t.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>f!==l.uK.borderColor.default||w!==l.uK.borderStyle.default||j!==l.uK.borderWidth.default,isShownByDefault:!0,label:(0,u.__)("Border","snow-monkey-blocks"),onDeselect:()=>e({borderColor:l.uK.borderColor.default,borderStyle:l.uK.borderStyle.default,borderWidth:l.uK.borderWidth.default}),children:(0,t.jsx)(b.BorderBoxControl,{...S,__next40pxDefaultSize:!0,__experimentalIsRenderedInSidebar:!0,className:"smb-border-box-control",label:(0,u.__)("Border","snow-monkey-blocks"),enableAlpha:!0,enableStyle:!0,onChange:o=>{e({borderColor:o?.color,borderStyle:o?.style,borderWidth:o?.width})},popoverOffset:40,popoverPlacement:"left-start",value:{color:f,style:w,width:j}})}),(0,t.jsxs)("div",{className:"smb-color-gradient-settings-dropdown",children:[(0,t.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,u.__)("Background color","snow-monkey-blocks"),colorValue:g,onColorChange:o=>e({backgroundColor:o})},{label:(0,u.__)("Text color","snow-monkey-blocks"),colorValue:k,onColorChange:o=>e({textColor:o})}],__experimentalIsRenderedInSidebar:!0,...S}),(0,t.jsx)(d.ContrastChecker,{backgroundColor:g,textColor:k})]})]}),(0,t.jsxs)(b.__experimentalToolsPanel,{label:(0,u.__)("Avatar settings","snow-monkey-blocks"),dropdownMenuProps:I,children:[(0,t.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>r!==l.uK.showAvatar.default,isShownByDefault:!0,label:(0,u.__)("Show avatar","snow-monkey-blocks"),onDeselect:()=>e({showAvatar:l.uK.showAvatar.default}),children:(0,t.jsx)(b.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,u.__)("Show avatar","snow-monkey-blocks"),checked:r,onChange:o=>e({showAvatar:o})})}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>C!==l.uK.modifier.default,isShownByDefault:!0,label:(0,u.__)("Avatar position","snow-monkey-blocks"),onDeselect:()=>e({modifier:l.uK.modifier.default}),children:(0,t.jsx)(b.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,u.__)("Avatar position","snow-monkey-blocks"),value:C,onChange:o=>e({modifier:"reverse"===o?o:""}),options:[{value:"",label:(0,u.__)("Left","snow-monkey-blocks")},{value:"reverse",label:(0,u.__)("Right","snow-monkey-blocks")}]})}),(0,t.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>x!==l.uK.avatarBorderColor.default||_!==l.uK.avatarBorderStyle.default||y!==l.uK.avatarBorderWidth.default,isShownByDefault:!0,label:(0,u.__)("Border","snow-monkey-blocks"),onDeselect:()=>e({avatarBorderColor:l.uK.avatarBorderColor.default,avatarBorderStyle:l.uK.avatarBorderStyle.default,avatarBorderWidth:l.uK.avatarBorderWidth.default}),children:(0,t.jsx)(b.BorderBoxControl,{...S,__next40pxDefaultSize:!0,__experimentalIsRenderedInSidebar:!0,className:"smb-border-box-control",label:(0,u.__)("Border","snow-monkey-blocks"),enableAlpha:!0,enableStyle:!0,onChange:o=>{e({avatarBorderColor:o?.color,avatarBorderStyle:o?.style,avatarBorderWidth:o?.width})},popoverOffset:40,popoverPlacement:"left-start",value:{color:x,style:_,width:y}})})]})]})]}),r&&(0,t.jsx)(d.BlockControls,{group:"block",children:(0,t.jsxs)(b.ToolbarGroup,{children:[(0,t.jsx)(b.ToolbarButton,{icon:m,title:(0,u.__)("Show avatar on left","snow-monkey-blocks"),isActive:""===C,onClick:()=>e({modifier:""})}),(0,t.jsx)(b.ToolbarButton,{icon:v,title:(0,u.__)("Show avatar on right","snow-monkey-blocks"),isActive:"reverse"===C,onClick:()=>e({modifier:"reverse"})})]})}),(0,t.jsxs)("div",{...P,children:[r&&(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",children:(0,t.jsx)(d.MediaUpload,{onSelect:o=>{const a=o.sizes.thumbnail?o.sizes.thumbnail.url:o.url;e({avatarURL:a,avatarID:o.id,avatarAlt:o.alt})},type:"image",value:s,render:o=>(0,t.jsx)(b.Button,{className:"image-button",onClick:o.open,style:{padding:0},children:(0,t.jsx)("img",{src:c,alt:n,className:`wp-image-${s}`})})})}),(0,t.jsx)(d.RichText,{className:"smb-balloon__name",value:B,onChange:o=>e({balloonName:o}),placeholder:(0,u.__)("Name","snow-monkey-blocks")})]}),(0,t.jsx)("div",{...R})]})]})},save:function({attributes:o,className:e}){const{showAvatar:a,avatarID:r,avatarAlt:l,avatarURL:s,avatarBorderColor:n,avatarBorderStyle:b,avatarBorderWidth:c,backgroundColor:m,borderColor:v,borderStyle:u,borderWidth:p,textColor:h,balloonName:x,modifier:_}=o,y={"--smb-balloon--background-color":m||void 0,"--smb-balloon--border-color":v||m||void 0,"--smb-balloon--border-style":u||void 0,"--smb-balloon--border-width":p||void 0,"--smb-balloon--color":h||void 0,"--smb-balloon--avatar-border-color":n||void 0,"--smb-balloon--avatar-border-style":b||void 0,"--smb-balloon--avatar-border-width":c||void 0},g=i()("smb-balloon",{[e]:!!e,[`smb-balloon--${_}`]:!!_});return(0,t.jsxs)("div",{...d.useBlockProps.save({className:g,style:y}),children:[a&&(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",children:(0,t.jsx)("img",{src:s,alt:l,className:`wp-image-${r}`})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:(0,t.jsx)(d.RichText.Content,{value:x})})]}),(0,t.jsx)("div",{...d.useInnerBlocksProps.save({className:"smb-balloon__body"})})]})},deprecated:y})},6942:(o,e)=>{var a;!function(){"use strict";var r={}.hasOwnProperty;function l(){for(var o="",e=0;e<arguments.length;e++){var a=arguments[e];a&&(o=s(o,t(a)))}return o}function t(o){if("string"==typeof o||"number"==typeof o)return o;if("object"!=typeof o)return"";if(Array.isArray(o))return l.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var e="";for(var a in o)r.call(o,a)&&o[a]&&(e=s(e,a));return e}function s(o,e){return e?o?o+" "+e:o+e:o}o.exports?(l.default=l,o.exports=l):void 0===(a=function(){return l}.apply(e,[]))||(o.exports=a)}()}},a={};function r(o){var l=a[o];if(void 0!==l)return l.exports;var t=a[o]={exports:{}};return e[o](t,t.exports,r),t.exports}r.m=e,o=[],r.O=(e,a,l,t)=>{if(!a){var s=1/0;for(b=0;b<o.length;b++){for(var[a,l,t]=o[b],n=!0,i=0;i<a.length;i++)(!1&t||s>=t)&&Object.keys(r.O).every((o=>r.O[o](a[i])))?a.splice(i--,1):(n=!1,t<s&&(s=t));if(n){o.splice(b--,1);var d=l();void 0!==d&&(e=d)}}return e}t=t||0;for(var b=o.length;b>0&&o[b-1][2]>t;b--)o[b]=o[b-1];o[b]=[a,l,t]},r.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return r.d(e,{a:e}),e},r.d=(o,e)=>{for(var a in e)r.o(e,a)&&!r.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:e[a]})},r.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),(()=>{var o={8845:0,9041:0};r.O.j=e=>0===o[e];var e=(e,a)=>{var l,t,[s,n,i]=a,d=0;if(s.some((e=>0!==o[e]))){for(l in n)r.o(n,l)&&(r.m[l]=n[l]);if(i)var b=i(r)}for(e&&e(a);d<s.length;d++)t=s[d],r.o(o,t)&&o[t]&&o[t][0](),o[t]=0;return r.O(b)},a=globalThis.webpackChunk=globalThis.webpackChunk||[];a.forEach(e.bind(null,0)),a.push=e.bind(null,a.push.bind(a))})();var l=r.O(void 0,[9041],(()=>r(8123)));l=r.O(l)})();1 (()=>{var o,e={8123:(o,e,a)=>{"use strict";const r=window.wp.blocks,l=JSON.parse('{"UU":"snow-monkey-blocks/balloon","uK":{"showAvatar":{"type":"boolean","default":true},"avatarID":{"type":"number","default":0},"avatarURL":{"type":"string","source":"attribute","selector":"img","attribute":"src","default":"https://0.gravatar.com/avatar/00000000000000000000000000000000?s=128&d=mp&r=g"},"avatarAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"avatarBorderColor":{"type":"string"},"avatarBorderStyle":{"type":"string"},"avatarBorderWidth":{"type":"string"},"backgroundColor":{"type":"string"},"borderColor":{"type":"string"},"borderStyle":{"type":"string"},"borderWidth":{"type":"string"},"textColor":{"type":"string"},"balloonName":{"type":"string","default":""},"modifier":{"type":"string","default":""},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"spacing":{"margin":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":["balloonBody"]}}}}'),t=window.ReactJSXRuntime,s=(0,t.jsx)("svg",{viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M20,5.48H4a1,1,0,0,0-1,1v8a1,1,0,0,0,1,1H7l1.12,3,3.29-3H20a1,1,0,0,0,1-1v-8A1,1,0,0,0,20,5.48ZM20,14a.5.5,0,0,1-.5.5H11.31l-1.1,1h0l-1.12,1-.5.46-.11-.31L8,15.4H8l-.35-.92H4.5A.5.5,0,0,1,4,14V7a.5.5,0,0,1,.5-.5h15A.5.5,0,0,1,20,7Z"})});var n=a(6942),i=a.n(n);const d=window.wp.blockEditor,b=window.wp.components,c=window.wp.primitives;var m=(0,t.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(c.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),u=(0,t.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(c.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})});const v=window.wp.i18n,p=(window.lodash,window.wp.compose),h=[["core/paragraph"]],x=l.uK,_=l.xY,y=[{attributes:{...x,balloonBody:{type:"string",source:"html",selector:".smb-balloon__body",multiline:"p",default:""}},supports:{..._},migrate(o){const{balloonBody:e}=o,a=(e.match(/<p>(.+?)<\/p>/g)||[]).map((o=>(0,r.rawHandler)({HTML:o})[0]));return[{...o},[...a]]},save({attributes:o,className:e}){const{avatarID:a,avatarAlt:r,avatarURL:l,avatarBorderColor:s,backgroundColor:n,textColor:b,balloonName:c,balloonBody:m,modifier:u}=o,v={"--smb-balloon--background-color":n||void 0,"--smb-balloon--border-color":n||void 0,"--smb-balloon--color":b||void 0,"--smb-balloon--avatar-border-color":s||void 0},p=i()("smb-balloon",{[e]:!!e,[`smb-balloon--${u}`]:!!u});return(0,t.jsxs)("div",{...d.useBlockProps.save({className:p,style:v}),children:[(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",children:(0,t.jsx)("img",{src:l,alt:r,className:`wp-image-${a}`})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:(0,t.jsx)(d.RichText.Content,{value:c})})]}),(0,t.jsx)("div",{className:"smb-balloon__body",children:(0,t.jsx)(d.RichText.Content,{value:m})})]})}},{attributes:{...x,balloonBody:{type:"string",source:"html",selector:".smb-balloon__body",multiline:"p",default:""}},supports:{..._},migrate(o){const{balloonBody:e}=o,a=(e.match(/<p>(.+?)<\/p>/g)||[]).map((o=>(0,r.rawHandler)({HTML:o})[0]));return[{...o},[...a]]},save({attributes:o,className:e}){const{avatarID:a,avatarAlt:r,avatarURL:l,avatarBorderColor:s,backgroundColor:n,textColor:b,balloonName:c,balloonBody:m,modifier:u}=o,v={borderColor:s||void 0},p={backgroundColor:n||void 0,borderColor:n||void 0,color:b||void 0},h=i()("smb-balloon",{[e]:!!e,[`smb-balloon--${u}`]:!!u});return(0,t.jsxs)("div",{...d.useBlockProps.save({className:h}),children:[(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",style:v,children:(0,t.jsx)("img",{src:l,alt:r,className:`wp-image-${a}`})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:(0,t.jsx)(d.RichText.Content,{value:c})})]}),(0,t.jsx)("div",{className:"smb-balloon__body",style:p,children:(0,t.jsx)(d.RichText.Content,{value:m})})]})}},{attributes:{...x,balloonBody:{type:"string",source:"html",selector:".smb-balloon__body",multiline:"p",default:""}},supports:{..._},migrate(o){const{balloonBody:e}=o,a=(e.match(/<p>(.+?)<\/p>/g)||[]).map((o=>(0,r.rawHandler)({HTML:o})[0]));return[{...o},[...a]]},save({attributes:o}){const{avatarID:e,avatarURL:a,avatarBorderColor:r,balloonName:l,balloonBody:s,modifier:n}=o;return(0,t.jsxs)("div",{className:i()("smb-balloon",{[`smb-balloon--${n}`]:!!n}),children:[(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",style:{borderColor:r},children:(0,t.jsx)("img",{src:a,alt:"",className:`wp-image-${e}`})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:l})]}),(0,t.jsx)("div",{className:"smb-balloon__body",children:(0,t.jsx)(d.RichText.Content,{value:s})})]})}},{attributes:{...x,balloonBody:{type:"string",source:"html",selector:".smb-balloon__body",multiline:"p",default:""}},supports:{..._},migrate(o){const{balloonBody:e}=o,a=(e.match(/<p>(.+?)<\/p>/g)||[]).map((o=>(0,r.rawHandler)({HTML:o})[0]));return[{...o},[...a]]},save({attributes:o}){const{avatarURL:e,avatarBorderColor:a,balloonName:r,balloonBody:l,modifier:s}=o;return(0,t.jsxs)("div",{className:i()("smb-balloon",{[`smb-balloon--${s}`]:!!s}),children:[(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",style:{borderColor:a},children:(0,t.jsx)("img",{src:e,alt:""})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:r})]}),(0,t.jsx)("div",{className:"smb-balloon__body",children:(0,t.jsx)(d.RichText.Content,{value:l})})]})}}];(0,r.registerBlockType)(l.UU,{icon:{foreground:"#cd162c",src:s},edit:function({attributes:o,setAttributes:e,className:a}){const{showAvatar:r,avatarID:s,avatarAlt:n,avatarURL:c,avatarBorderColor:x,avatarBorderStyle:_,avatarBorderWidth:y,backgroundColor:g,borderColor:f,borderStyle:w,borderWidth:j,textColor:k,balloonName:B,modifier:C,templateLock:N}=o,S=(0,d.__experimentalUseMultipleOriginColorsAndGradients)(),A={"--smb-balloon--background-color":g||void 0,"--smb-balloon--border-color":f||g||void 0,"--smb-balloon--border-style":w||void 0,"--smb-balloon--border-width":j||void 0,"--smb-balloon--color":k||void 0,"--smb-balloon--avatar-border-color":x||void 0,"--smb-balloon--avatar-border-style":_||void 0,"--smb-balloon--avatar-border-width":y||void 0},T=i()("smb-balloon",{[a]:!!a,[`smb-balloon--${C}`]:!!C}),K=(0,d.useBlockProps)({className:T,style:A}),P=(0,d.useInnerBlocksProps)({className:"smb-balloon__body"},{template:h,templateLock:N}),R=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.InspectorControls,{children:[(0,t.jsxs)(b.__experimentalToolsPanel,{label:(0,v.__)("Balloon settings","snow-monkey-blocks"),dropdownMenuProps:R,children:[(0,t.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>f!==l.uK.borderColor.default||w!==l.uK.borderStyle.default||j!==l.uK.borderWidth.default,isShownByDefault:!0,label:(0,v.__)("Border","snow-monkey-blocks"),resetAllFilter:()=>({borderColor:l.uK.borderColor.default,borderStyle:l.uK.borderStyle.default,borderWidth:l.uK.borderWidth.default}),onDeselect:()=>e({borderColor:l.uK.borderColor.default,borderStyle:l.uK.borderStyle.default,borderWidth:l.uK.borderWidth.default}),children:(0,t.jsx)(b.BorderBoxControl,{...S,__next40pxDefaultSize:!0,__experimentalIsRenderedInSidebar:!0,className:"smb-border-box-control",label:(0,v.__)("Border","snow-monkey-blocks"),enableAlpha:!0,enableStyle:!0,onChange:o=>{e({borderColor:o?.color,borderStyle:o?.style,borderWidth:o?.width})},popoverOffset:40,popoverPlacement:"left-start",value:{color:f,style:w,width:j}})}),(0,t.jsxs)("div",{className:"smb-color-gradient-settings-dropdown",children:[(0,t.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,v.__)("Background color","snow-monkey-blocks"),colorValue:g,onColorChange:o=>e({backgroundColor:o})},{label:(0,v.__)("Text color","snow-monkey-blocks"),colorValue:k,onColorChange:o=>e({textColor:o})}],__experimentalIsRenderedInSidebar:!0,...S}),(0,t.jsx)(d.ContrastChecker,{backgroundColor:g,textColor:k})]})]}),(0,t.jsxs)(b.__experimentalToolsPanel,{label:(0,v.__)("Avatar settings","snow-monkey-blocks"),dropdownMenuProps:R,children:[(0,t.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>r!==l.uK.showAvatar.default,isShownByDefault:!0,label:(0,v.__)("Show avatar","snow-monkey-blocks"),onDeselect:()=>e({showAvatar:l.uK.showAvatar.default}),children:(0,t.jsx)(b.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Show avatar","snow-monkey-blocks"),checked:r,onChange:o=>e({showAvatar:o})})}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>C!==l.uK.modifier.default,isShownByDefault:!0,label:(0,v.__)("Avatar position","snow-monkey-blocks"),onDeselect:()=>e({modifier:l.uK.modifier.default}),children:(0,t.jsx)(b.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,v.__)("Avatar position","snow-monkey-blocks"),value:C,onChange:o=>e({modifier:"reverse"===o?o:""}),options:[{value:"",label:(0,v.__)("Left","snow-monkey-blocks")},{value:"reverse",label:(0,v.__)("Right","snow-monkey-blocks")}]})}),(0,t.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>x!==l.uK.avatarBorderColor.default||_!==l.uK.avatarBorderStyle.default||y!==l.uK.avatarBorderWidth.default,isShownByDefault:!0,label:(0,v.__)("Border","snow-monkey-blocks"),resetAllFilter:()=>({avatarBorderColor:l.uK.avatarBorderColor.default,avatarBorderStyle:l.uK.avatarBorderStyle.default,avatarBorderWidth:l.uK.avatarBorderWidth.default}),onDeselect:()=>e({avatarBorderColor:l.uK.avatarBorderColor.default,avatarBorderStyle:l.uK.avatarBorderStyle.default,avatarBorderWidth:l.uK.avatarBorderWidth.default}),children:(0,t.jsx)(b.BorderBoxControl,{...S,__next40pxDefaultSize:!0,__experimentalIsRenderedInSidebar:!0,className:"smb-border-box-control",label:(0,v.__)("Border","snow-monkey-blocks"),enableAlpha:!0,enableStyle:!0,onChange:o=>{e({avatarBorderColor:o?.color,avatarBorderStyle:o?.style,avatarBorderWidth:o?.width})},popoverOffset:40,popoverPlacement:"left-start",value:{color:x,style:_,width:y}})})]})]})]}),r&&(0,t.jsx)(d.BlockControls,{group:"block",children:(0,t.jsxs)(b.ToolbarGroup,{children:[(0,t.jsx)(b.ToolbarButton,{icon:m,title:(0,v.__)("Show avatar on left","snow-monkey-blocks"),isActive:""===C,onClick:()=>e({modifier:""})}),(0,t.jsx)(b.ToolbarButton,{icon:u,title:(0,v.__)("Show avatar on right","snow-monkey-blocks"),isActive:"reverse"===C,onClick:()=>e({modifier:"reverse"})})]})}),(0,t.jsxs)("div",{...K,children:[r&&(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",children:(0,t.jsx)(d.MediaUpload,{onSelect:o=>{const a=o.sizes.thumbnail?o.sizes.thumbnail.url:o.url;e({avatarURL:a,avatarID:o.id,avatarAlt:o.alt})},type:"image",value:s,render:o=>(0,t.jsx)(b.Button,{className:"image-button",onClick:o.open,style:{padding:0},children:(0,t.jsx)("img",{src:c,alt:n,className:`wp-image-${s}`})})})}),(0,t.jsx)(d.RichText,{className:"smb-balloon__name",value:B,onChange:o=>e({balloonName:o}),placeholder:(0,v.__)("Name","snow-monkey-blocks")})]}),(0,t.jsx)("div",{...P})]})]})},save:function({attributes:o,className:e}){const{showAvatar:a,avatarID:r,avatarAlt:l,avatarURL:s,avatarBorderColor:n,avatarBorderStyle:b,avatarBorderWidth:c,backgroundColor:m,borderColor:u,borderStyle:v,borderWidth:p,textColor:h,balloonName:x,modifier:_}=o,y={"--smb-balloon--background-color":m||void 0,"--smb-balloon--border-color":u||m||void 0,"--smb-balloon--border-style":v||void 0,"--smb-balloon--border-width":p||void 0,"--smb-balloon--color":h||void 0,"--smb-balloon--avatar-border-color":n||void 0,"--smb-balloon--avatar-border-style":b||void 0,"--smb-balloon--avatar-border-width":c||void 0},g=i()("smb-balloon",{[e]:!!e,[`smb-balloon--${_}`]:!!_});return(0,t.jsxs)("div",{...d.useBlockProps.save({className:g,style:y}),children:[a&&(0,t.jsxs)("div",{className:"smb-balloon__person",children:[(0,t.jsx)("div",{className:"smb-balloon__figure",children:(0,t.jsx)("img",{src:s,alt:l,className:`wp-image-${r}`})}),(0,t.jsx)("div",{className:"smb-balloon__name",children:(0,t.jsx)(d.RichText.Content,{value:x})})]}),(0,t.jsx)("div",{...d.useInnerBlocksProps.save({className:"smb-balloon__body"})})]})},deprecated:y})},6942:(o,e)=>{var a;!function(){"use strict";var r={}.hasOwnProperty;function l(){for(var o="",e=0;e<arguments.length;e++){var a=arguments[e];a&&(o=s(o,t(a)))}return o}function t(o){if("string"==typeof o||"number"==typeof o)return o;if("object"!=typeof o)return"";if(Array.isArray(o))return l.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var e="";for(var a in o)r.call(o,a)&&o[a]&&(e=s(e,a));return e}function s(o,e){return e?o?o+" "+e:o+e:o}o.exports?(l.default=l,o.exports=l):void 0===(a=function(){return l}.apply(e,[]))||(o.exports=a)}()}},a={};function r(o){var l=a[o];if(void 0!==l)return l.exports;var t=a[o]={exports:{}};return e[o](t,t.exports,r),t.exports}r.m=e,o=[],r.O=(e,a,l,t)=>{if(!a){var s=1/0;for(b=0;b<o.length;b++){for(var[a,l,t]=o[b],n=!0,i=0;i<a.length;i++)(!1&t||s>=t)&&Object.keys(r.O).every((o=>r.O[o](a[i])))?a.splice(i--,1):(n=!1,t<s&&(s=t));if(n){o.splice(b--,1);var d=l();void 0!==d&&(e=d)}}return e}t=t||0;for(var b=o.length;b>0&&o[b-1][2]>t;b--)o[b]=o[b-1];o[b]=[a,l,t]},r.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return r.d(e,{a:e}),e},r.d=(o,e)=>{for(var a in e)r.o(e,a)&&!r.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:e[a]})},r.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),(()=>{var o={8845:0,9041:0};r.O.j=e=>0===o[e];var e=(e,a)=>{var l,t,[s,n,i]=a,d=0;if(s.some((e=>0!==o[e]))){for(l in n)r.o(n,l)&&(r.m[l]=n[l]);if(i)var b=i(r)}for(e&&e(a);d<s.length;d++)t=s[d],r.o(o,t)&&o[t]&&o[t][0](),o[t]=0;return r.O(b)},a=globalThis.webpackChunk=globalThis.webpackChunk||[];a.forEach(e.bind(null,0)),a.push=e.bind(null,a.push.bind(a))})();var l=r.O(void 0,[9041],(()=>r(8123)));l=r.O(l)})(); -
snow-monkey-blocks/trunk/dist/blocks/box/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => ' 943b3d8bfca0569f6df4');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => 'a4e39ef143b297dd1091'); -
snow-monkey-blocks/trunk/dist/blocks/box/index.js
r3390754 r3400189 1 (()=>{var e,o={4658:(e,o,r)=>{"use strict";const t=window.wp.blocks,l=JSON.parse('{"UU":"snow-monkey-blocks/box","uK":{"backgroundColor":{"type":"string"},"backgroundGradientColor":{"type":"string"},"borderColor":{"type":"string"},"borderStyle":{"type":"string"},"textColor":{"type":"string"},"borderWidth":{"type":"string","default":1},"borderRadius":{"type":"string"},"opacity":{"type":"number","default":1},"boxShadow":{"type":"object","default":{"color":"","opacity":0.1,"horizontal":0,"vertical":0,"blur":10,"spread":0,"position":""}},"linkText":{"type":"string","source":"html","selector":"a","role":"content"},"href":{"type":"string","source":"attribute","selector":"a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":"a","attribute":"rel"},"linkTarget":{"type":"string","source":"attribute","selector":"a","attribute":"target"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"spacing":{"margin":true,"padding":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":true}}}}'),n=window.ReactJSXRuntime,a=(0,n.jsx)("svg",{viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M23,3H1A1,1,0,0,0,0,4V20a1,1,0,0,0,1,1H23a1,1,0,0,0,1-1V4A1,1,0,0,0,23,3Zm0,16.47a.52.52,0,0,1-.52.53h-21A.52.52,0,0,1,1,19.47V4.53A.52.52,0,0,1,1.52,4h21a.52.52,0,0,1,.52.53Z"})});var s=r(6942),i=r.n(s),d=r(3558),u=r.n(d);const c=window.wp.blockEditor,b=window.wp.components,p=window.wp.data,x=window.wp.compose,h=window.wp.element,m=window.wp.primitives;var g=(0,n.jsx)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(m.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}), y=(0,n.jsx)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(m.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const f=window.wp.keycodes,w=window.wp.url,_=window.wp.i18n,v=(window.lodash,(e,o=0,r=null)=>(e=Number(e),(isNaN(e)||e<o)&&(e=o),null!==r&&e>r&&(e=r),e));function k(){return(0,x.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function C({settings:e,label:o}){const r=(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),t=k();return(0,n.jsx)(b.__experimentalToolsPanel,{label:o||(0,_.__)("Box Shadow","snow-monkey-blocks"),className:"smb-box-shadow-tools-panel",dropdownMenuProps:t,resetAll:e=>{e.forEach((e=>e()))},children:e.map(((e,o)=>((e,o)=>{return e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultValue")?(r.colors=r.colors.map((e=>{const o=e.colors.filter((e=>!e.color.match(/^var\(/)));return!(1>o.length)&&(e.colors=o,e)})).filter(Boolean),(0,n.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,n.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,_.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange,resetAllFilter:()=>{e.onColorChange(e.defaultValue)}}],__experimentalIsRenderedInSidebar:!0,...r})},o)):e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Opacity","snow-monkey-blocks"),hasValue:()=>e.opacityValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onOpacityChange(e.defaultValue),resetAllFilter:()=>e.onOpacityChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:0,max:1,step:.1})},o):e.hasOwnProperty("horizontalValue")&&e.hasOwnProperty("onHorizontalChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Horizontal","snow-monkey-blocks"),hasValue:()=>e.horizontalValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onHorizontalChange(e.defaultValue),resetAllFilter:()=>e.onHorizontalChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Horizontal","snow-monkey-blocks"),value:e.horizontalValue,onChange:e.onHorizontalChange,min:null!==(t=e?.min)&&void 0!==t?t:-100,max:null!==(l=e?.max)&&void 0!==l?l:100})},o):e.hasOwnProperty("verticalValue")&&e.hasOwnProperty("onVerticalChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Vertical","snow-monkey-blocks"),hasValue:()=>e.verticalValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onVerticalChange(e.defaultValue),resetAllFilter:()=>e.onVerticalChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Vertical","snow-monkey-blocks"),value:e.verticalValue,onChange:e.onVerticalChange,min:null!==(a=e?.min)&&void 0!==a?a:-100,max:null!==(s=e?.max)&&void 0!==s?s:100})},o):e.hasOwnProperty("blurValue")&&e.hasOwnProperty("onBlurChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Blur","snow-monkey-blocks"),hasValue:()=>e.blurValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onBlurChange(e.defaultValue),resetAllFilter:()=>e.onBlurChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Blur","snow-monkey-blocks"),value:e.blurValue,onChange:e.onBlurChange,min:null!==(i=e?.min)&&void 0!==i?i:0,max:null!==(d=e?.max)&&void 0!==d?d:100})},o):e.hasOwnProperty("spreadValue")&&e.hasOwnProperty("onSpreadChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Spread","snow-monkey-blocks"),hasValue:()=>e.spreadValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onSpreadChange(e.defaultValue),resetAllFilter:()=>e.onSpreadChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Spread","snow-monkey-blocks"),value:e.spreadValue,onChange:e.onSpreadChange,min:null!==(u=e?.min)&&void 0!==u?u:-100,max:null!==(p=e?.max)&&void 0!==p?p:100})},o):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Position","snow-monkey-blocks"),hasValue:()=>e.positionValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onPositionChange(e.defaultValue),resetAllFilter:()=>e.onPositionChange(e.defaultValue),children:(0,n.jsx)(b.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Position","snow-monkey-blocks"),value:e.positionValue,onChange:e.onPositionChange,options:[{value:"",label:(0,_.__)("Outline","snow-monkey-blocks")},{value:"inset",label:(0,_.__)("Inset","snow-monkey-blocks")}]})},o):null;var t,l,a,s,i,d,u,p})(e,o)))})}const S="noreferrer noopener",V="_blank",j="nofollow",P=[...c.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,_.__)("Mark as nofollow","snow-monkey-blocks")}],B={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){const o=["wide","full"],r=e.reduce(((e,r)=>{const{align:t}=r.attributes;return o.indexOf(t)>o.indexOf(e)?t:e}),void 0),l=e.map((e=>(0,t.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,t.createBlock)("snow-monkey-blocks/box",{align:r},l)}}],ungroup:(e,o)=>o.flatMap((e=>e))},O=l.uK,N=l.xY,I=[{attributes:{...O,borderWidth:{type:"number"},borderRadius:{type:"number"},contentPadding:{type:"string",default:""}},supports:{...N},save({attributes:e,className:o}){const{backgroundColor:r,backgroundGradientColor:t,borderColor:l,textColor:a,borderWidth:s,borderRadius:d,opacity:b,contentPadding:p,boxShadow:x}=e,h={"--smb-box--color":a||void 0,"--smb-box--border-radius":0<=d?`${d}px`:void 0,"--smb-box--box-shadow":x.color?`${x.horizontal}px ${x.vertical}px ${x.blur}px ${x.spread}px ${u()(x.color,x.opacity)}`:void 0,"--smb-box--background-color":r||void 0,"--smb-box--background-image":t||void 0,"--smb-box--background-opacity":String(b),"--smb-box--border-color":l||void 0,"--smb-box--border-width":0<=s?`${s}px`:void 0},m=i()("smb-box",o,{[`smb-box--p-${p}`]:!!p});return(0,n.jsxs)("div",{...c.useBlockProps.save({className:m,style:h}),children:[(0,n.jsx)("div",{className:"smb-box__background"}),(0,n.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-box__body"})})]})}},{attributes:{...O,borderRadius:{type:"number"},borderWidth:{type:"number"},contentPadding:{type:"string",default:""}},supports:{...N},save({attributes:e,className:o}){const{backgroundColor:r,backgroundGradientColor:t,borderColor:l,textColor:a,borderWidth:s,borderRadius:d,opacity:b,contentPadding:p,boxShadow:x}=e,h={color:a||void 0,borderRadius:0<=d?`${d}px`:void 0,boxShadow:x.color?`${x.horizontal}px ${x.vertical}px ${x.blur}px ${x.spread}px ${u()(x.color,x.opacity)}`:void 0},m={backgroundColor:r||void 0,backgroundImage:t||void 0,borderColor:l||void 0,borderWidth:s||void 0,borderRadius:0<=d?`${d}px`:void 0,opacity:b},g=i()("smb-box",o,{[`smb-box--p-${p}`]:!!p});return(0,n.jsxs)("div",{...c.useBlockProps.save({className:g,style:h}),children:[(0,n.jsx)("div",{className:"smb-box__background",style:m}),(0,n.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-box__body"})})]})}},{attributes:{...O,borderRadius:{type:"number"},borderWidth:{type:"number"},contentPadding:{type:"string",default:""}},save({attributes:e,className:o}){const{backgroundColor:r,borderColor:t,textColor:l,borderWidth:a}=e,s={backgroundColor:r||void 0,borderColor:t||void 0,color:l||void 0,borderWidth:a||void 0},d=i()("smb-box",o);return(0,n.jsx)("div",{className:d,style:s,children:(0,n.jsx)("div",{className:"smb-box__body",children:(0,n.jsx)(c.InnerBlocks.Content,{})})})}},{attributes:{...O,borderRadius:{type:"number"},borderWidth:{type:"number"},contentPadding:{type:"string",default:""}},save({attributes:e}){const{backgroundColor:o,borderColor:r,textColor:t,borderWidth:l}=e;return(0,n.jsx)("div",{className:"smb-box",style:{backgroundColor:o,borderColor:r,color:t,borderWidth:l},children:(0,n.jsx)("div",{className:"smb-box__body",children:(0,n.jsx)(c.InnerBlocks.Content,{})})})}}];(0,t.registerBlockType)(l.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:o,clientId:r,isSelected:t}){const{backgroundColor:a,backgroundGradientColor:s,borderColor:d,borderStyle:m,textColor:B,borderWidth:O,borderRadius:N,opacity:I,boxShadow:{...$},rel:T,href:R,linkText:D,linkTarget:H,templateLock:z}=e,A=(0,p.useSelect)((e=>!!e("core/block-editor").getBlock(r)?.innerBlocks?.length),[r]),M=(0,h.useRef)(),[K,W]=(0,h.useState)(),[G,F]=(0,h.useState)(!1),L=!!R,E=H===V,U=!!T?.includes(j),Z=(0,h.useMemo)((()=>({url:R,title:D,opensInNewTab:E,nofollow:U})),[R,D,E,U]);function J(){o({href:void 0,linkTarget:void 0,rel:void 0}),F(!1)}const Y={"--smb-box--color":B||void 0,"--smb-box--border-radius":String(N).match(/^\d+$/)?`${N}px`:N,"--smb-box--box-shadow":$.color?`${$.horizontal}px ${$.vertical}px ${$.blur}px ${$.spread}px ${u()($.color,$.opacity)}`:void 0,"--smb-box--background-color":a||void 0,"--smb-box--background-image":s||void 0,"--smb-box--background-opacity":String(I),"--smb-box--border-color":d||void 0,"--smb-box--border-style":m||void 0,"--smb-box--border-width":String(O).match(/^\d+$/)?`${O}px`:O},Q=i()("smb-box",{"smb-box--has-link":L}),X=(0,c.useBlockProps)({ref:(0,x.useMergeRefs)([W,M]),className:Q,style:Y}),q=(0,c.useInnerBlocksProps)({className:"smb-box__body"},{templateLock:z,renderAppender:A?void 0:c.InnerBlocks.ButtonBlockAppender}),ee=k();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.InspectorControls,{group:"color",children:(0,n.jsx)(c.__experimentalColorGradientSettingsDropdown,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:r,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:B,onColorChange:e=>o({textColor:e}),resetAllFilter:()=>({textColor:l.uK.textColor?.default}),label:(0,_.__)("Text color","snow-monkey-blocks")}]})}),(0,n.jsxs)(c.InspectorControls,{group:"border",children:[(0,n.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>d!==l.uK.borderColor.default||m!==l.uK.borderStyle.default||O!==l.uK.borderWidth.default,isShownByDefault:!0,label:(0,_.__)("Border","snow-monkey-blocks"),onDeselect:()=>o({borderColor:l.uK.borderColor.default,borderStyle:l.uK.borderStyle.default,borderWidth:l.uK.borderWidth.default}),panelId:r,children:(0,n.jsx)(b.BorderBoxControl,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),__next40pxDefaultSize:!0,__experimentalIsRenderedInSidebar:!0,className:"smb-border-box-control",enableAlpha:!0,enableStyle:!0,onChange:e=>{o({borderColor:e?.color,borderWidth:e?.width,borderStyle:e?.style})},popoverOffset:40,popoverPlacement:"left-start",value:{color:d,style:m,width:O}})}),(0,n.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>N!==l.uK.borderRadius.default,isShownByDefault:!0,label:(0,_.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>o({borderRadius:l.uK.borderRadius.default}),panelId:r,children:(0,n.jsx)("div",{className:"smb-border-radius-control",children:(0,n.jsx)(c.__experimentalBorderRadiusControl,{values:N,onChange:e=>{o({borderRadius:e})}})})})]}),(0,n.jsxs)(c.InspectorControls,{group:"styles",children:[(0,n.jsxs)(b.__experimentalToolsPanel,{label:(0,_.__)("Background","snow-monkey-blocks"),dropdownMenuProps:ee,children:[(0,n.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,n.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,_.__)("Color","snow-monkey-blocks"),colorValue:a,gradientValue:s,onColorChange:e=>o({backgroundColor:e}),onGradientChange:e=>o({backgroundGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,c.__experimentalUseMultipleOriginColorsAndGradients)()})}),(0,n.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>I!==l.uK.opacity.default,isShownByDefault:!0,label:(0,_.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>o({opacity:l.uK.opacity.default}),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Opacity","snow-monkey-blocks"),value:I,onChange:e=>o({opacity:v(e,0,1)}),min:0,max:1,step:.1})})]}),(0,n.jsx)(C,{settings:[{colorValue:$.color,onColorChange:e=>{$.color=e,o({boxShadow:{...$}})},defaultValue:l.uK.boxShadow.default.color},{opacityValue:$.opacity,onOpacityChange:e=>{$.opacity=e,o({boxShadow:{...$}})},defaultValue:l.uK.boxShadow.default.opacity},{horizontalValue:$.horizontal,onHorizontalChange:e=>{$.horizontal=e,o({boxShadow:{...$}})},defaultValue:l.uK.boxShadow.default.horizontal},{blurValue:$.blur,onBlurChange:e=>{$.blur=e,o({boxShadow:{...$}})},defaultValue:l.uK.boxShadow.default.blur},{spreadValue:$.spread,onSpreadChange:e=>{$.spread=e,o({boxShadow:{...$}})},defaultValue:l.uK.boxShadow.default.spread}]})]}),(0,n.jsxs)(c.BlockControls,{group:"block",children:[!L&&(0,n.jsx)(b.ToolbarButton,{name:"link",icon:g,title:(0,_.__)("Link"),shortcut:f.displayShortcut.primary("k"),onClick:function(e){e.preventDefault(),F(!0)}}),L&&(0,n.jsx)(b.ToolbarButton,{name:"link",icon:y,title:(0,_.__)("Unlink"),shortcut:f.displayShortcut.primaryShift("k"),onClick:J,isActive:!0})]}),t&&(G||L)&&(0,n.jsx)(b.Popover,{position:"bottom center",onClose:()=>{F(!1)},anchor:K,focusOnMount:!!G&&"firstElement",children:(0,n.jsx)(c.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:Z,onChange:({url:e="",title:r,opensInNewTab:t,nofollow:l})=>{o(function({rel:e="",url:o="",title:r,opensInNewTab:t,nofollow:l}){let n,a=e;if(t)n=V,a=a?.includes(S)?a:a+` ${S}`;else{const e=new RegExp(`\\b${S}\\s*`,"g");a=a?.replace(e,"").trim()}if(l)a=a?.includes(j)?a:(a+` ${j}`).trim();else{const e=new RegExp(`\\b${j}\\s*`,"g");a=a?.replace(e,"").trim()}return{href:(0,w.prependHTTP)(o),linkText:r,linkTarget:n,rel:a||void 0}}({rel:T,url:e,title:r,opensInNewTab:t,nofollow:l}))},onRemove:()=>{J()},forceIsEditingLink:G,hasRichPreviews:!0,hasTextControl:!0,settings:P,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})}),(0,n.jsxs)("div",{...X,children:[(0,n.jsx)("div",{className:"smb-box__background"}),(0,n.jsx)("div",{...q})]})]})},save:function({attributes:e}){const{backgroundColor:o,backgroundGradientColor:r,borderColor:t,borderStyle:l,textColor:a,borderWidth:s,borderRadius:d,opacity:b,boxShadow:p,rel:x,href:h,linkTarget:m,linkText:g}=e,y=!!h,f={"--smb-box--color":a||void 0,"--smb-box--border-radius":String(d).match(/^\d+$/)?`${d}px`:d,"--smb-box--box-shadow":p.color?`${p.horizontal}px ${p.vertical}px ${p.blur}px ${p.spread}px ${u()(p.color,p.opacity)}`:void 0,"--smb-box--background-color":o||void 0,"--smb-box--background-image":r||void 0,"--smb-box--background-opacity":String(b),"--smb-box--border-color":t||void 0,"--smb-box--border-style":l||void 0,"--smb-box--border-width":String(s).match(/^\d+$/)?`${s}px`:s},w=i()("smb-box",{"smb-box--has-link":y});return(0,n.jsxs)("div",{...c.useBlockProps.save({className:w,style:f}),children:[(0,n.jsx)("div",{className:"smb-box__background"}),(0,n.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-box__body"})}),y&&(0,n.jsx)("a",{className:"smb-box__link",href:h,target:m,rel:x,children:null!=g?g:(0,_.__)("Learn more","snow-monkey-blocks")})]})},transforms:B,deprecated:I})},3558:e=>{"use strict";var o=function(e){return parseInt(e,16)};e.exports=function(e,r){var t,l,n=function(e){return"#"===e.charAt(0)?e.slice(1):e}(e),a=function(e){var r=e.g,t=e.b,l=e.a;return{r:o(e.r),g:o(r),b:o(t),a:+(o(l)/255).toFixed(2)}}({r:(l=3===(t=n).length||4===t.length)?"".concat(t.slice(0,1)).concat(t.slice(0,1)):t.slice(0,2),g:l?"".concat(t.slice(1,2)).concat(t.slice(1,2)):t.slice(2,4),b:l?"".concat(t.slice(2,3)).concat(t.slice(2,3)):t.slice(4,6),a:(l?"".concat(t.slice(3,4)).concat(t.slice(3,4)):t.slice(6,8))||"ff"});return function(e,o){var r,t=e.r,l=e.g,n=e.b,a=e.a,s=(r=o,!isNaN(parseFloat(r))&&isFinite(r)?o:a);return"rgba(".concat(t,", ").concat(l,", ").concat(n,", ").concat(s,")")}(a,r)}},6942:(e,o)=>{var r;!function(){"use strict";var t={}.hasOwnProperty;function l(){for(var e="",o=0;o<arguments.length;o++){var r=arguments[o];r&&(e=a(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 l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var o="";for(var r in e)t.call(e,r)&&e[r]&&(o=a(o,r));return o}function a(e,o){return o?e?e+" "+o:e+o:e}e.exports?(l.default=l,e.exports=l):void 0===(r=function(){return l}.apply(o,[]))||(e.exports=r)}()}},r={};function t(e){var l=r[e];if(void 0!==l)return l.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,t),n.exports}t.m=o,e=[],t.O=(o,r,l,n)=>{if(!r){var a=1/0;for(u=0;u<e.length;u++){for(var[r,l,n]=e[u],s=!0,i=0;i<r.length;i++)(!1&n||a>=n)&&Object.keys(t.O).every((e=>t.O[e](r[i])))?r.splice(i--,1):(s=!1,n<a&&(a=n));if(s){e.splice(u--,1);var d=l();void 0!==d&&(o=d)}}return o}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[r,l,n]},t.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},t.d=(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={823:0,3247:0};t.O.j=o=>0===e[o];var o=(o,r)=>{var l,n,[a,s,i]=r,d=0;if(a.some((o=>0!==e[o]))){for(l in s)t.o(s,l)&&(t.m[l]=s[l]);if(i)var u=i(t)}for(o&&o(r);d<a.length;d++)n=a[d],t.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return t.O(u)},r=globalThis.webpackChunk=globalThis.webpackChunk||[];r.forEach(o.bind(null,0)),r.push=o.bind(null,r.push.bind(r))})();var l=t.O(void 0,[3247],(()=>t(4658)));l=t.O(l)})();1 (()=>{var e,o={4658:(e,o,r)=>{"use strict";const t=window.wp.blocks,l=JSON.parse('{"UU":"snow-monkey-blocks/box","uK":{"backgroundColor":{"type":"string"},"backgroundGradientColor":{"type":"string"},"borderColor":{"type":"string"},"borderStyle":{"type":"string"},"textColor":{"type":"string"},"borderWidth":{"type":"string","default":1},"borderRadius":{"type":"string"},"opacity":{"type":"number","default":1},"boxShadow":{"type":"object","default":{"color":"","opacity":0.1,"horizontal":0,"vertical":0,"blur":10,"spread":0,"position":""}},"linkText":{"type":"string","source":"html","selector":"a","role":"content"},"href":{"type":"string","source":"attribute","selector":"a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":"a","attribute":"rel"},"linkTarget":{"type":"string","source":"attribute","selector":"a","attribute":"target"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"spacing":{"margin":true,"padding":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":true}}}}'),n=window.ReactJSXRuntime,a=(0,n.jsx)("svg",{viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M23,3H1A1,1,0,0,0,0,4V20a1,1,0,0,0,1,1H23a1,1,0,0,0,1-1V4A1,1,0,0,0,23,3Zm0,16.47a.52.52,0,0,1-.52.53h-21A.52.52,0,0,1,1,19.47V4.53A.52.52,0,0,1,1.52,4h21a.52.52,0,0,1,.52.53Z"})});var s=r(6942),i=r.n(s),d=r(3558),u=r.n(d);const c=window.wp.blockEditor,b=window.wp.components,p=window.wp.data,x=window.wp.compose,h=window.wp.element,m=window.wp.primitives;var g=(0,n.jsx)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(m.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),f=(0,n.jsx)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(m.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const y=window.wp.keycodes,w=window.wp.url,_=window.wp.i18n,v=(window.lodash,(e,o=0,r=null)=>(e=Number(e),(isNaN(e)||e<o)&&(e=o),null!==r&&e>r&&(e=r),e));function k(){return(0,x.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const C=e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const o=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft].map((e=>null==e||""===e?"":/^\d+$/.test(String(e))?`${e}px`:String(e))),r=o.filter(Boolean);if(0===r.length)return;if(4===r.length){const[e,r,t,l]=o;if(e===r&&r===t&&t===l)return e;if(e===t&&r===l)return`${e} ${r}`;if(r===l)return`${e} ${r} ${t}`}return r.join(" ")}return/^\d+$/.test(String(e))?`${e}px`:e}};function S({settings:e,label:o}){const r=(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),t=k();return(0,n.jsx)(b.__experimentalToolsPanel,{label:o||(0,_.__)("Box Shadow","snow-monkey-blocks"),className:"smb-box-shadow-tools-panel",dropdownMenuProps:t,resetAll:e=>{e.forEach((e=>e()))},children:e.map(((e,o)=>((e,o)=>{return e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultValue")?(r.colors=r.colors.map((e=>{const o=e.colors.filter((e=>!e.color.match(/^var\(/)));return!(1>o.length)&&(e.colors=o,e)})).filter(Boolean),(0,n.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,n.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,_.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange,resetAllFilter:()=>{e.onColorChange(e.defaultValue)}}],__experimentalIsRenderedInSidebar:!0,...r})},o)):e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Opacity","snow-monkey-blocks"),hasValue:()=>e.opacityValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onOpacityChange(e.defaultValue),resetAllFilter:()=>e.onOpacityChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:0,max:1,step:.1})},o):e.hasOwnProperty("horizontalValue")&&e.hasOwnProperty("onHorizontalChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Horizontal","snow-monkey-blocks"),hasValue:()=>e.horizontalValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onHorizontalChange(e.defaultValue),resetAllFilter:()=>e.onHorizontalChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Horizontal","snow-monkey-blocks"),value:e.horizontalValue,onChange:e.onHorizontalChange,min:null!==(t=e?.min)&&void 0!==t?t:-100,max:null!==(l=e?.max)&&void 0!==l?l:100})},o):e.hasOwnProperty("verticalValue")&&e.hasOwnProperty("onVerticalChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Vertical","snow-monkey-blocks"),hasValue:()=>e.verticalValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onVerticalChange(e.defaultValue),resetAllFilter:()=>e.onVerticalChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Vertical","snow-monkey-blocks"),value:e.verticalValue,onChange:e.onVerticalChange,min:null!==(a=e?.min)&&void 0!==a?a:-100,max:null!==(s=e?.max)&&void 0!==s?s:100})},o):e.hasOwnProperty("blurValue")&&e.hasOwnProperty("onBlurChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Blur","snow-monkey-blocks"),hasValue:()=>e.blurValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onBlurChange(e.defaultValue),resetAllFilter:()=>e.onBlurChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Blur","snow-monkey-blocks"),value:e.blurValue,onChange:e.onBlurChange,min:null!==(i=e?.min)&&void 0!==i?i:0,max:null!==(d=e?.max)&&void 0!==d?d:100})},o):e.hasOwnProperty("spreadValue")&&e.hasOwnProperty("onSpreadChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Spread","snow-monkey-blocks"),hasValue:()=>e.spreadValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onSpreadChange(e.defaultValue),resetAllFilter:()=>e.onSpreadChange(e.defaultValue),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Spread","snow-monkey-blocks"),value:e.spreadValue,onChange:e.onSpreadChange,min:null!==(u=e?.min)&&void 0!==u?u:-100,max:null!==(p=e?.max)&&void 0!==p?p:100})},o):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")&&e.hasOwnProperty("defaultValue")?(0,n.jsx)(b.__experimentalToolsPanelItem,{label:(0,_.__)("Position","snow-monkey-blocks"),hasValue:()=>e.positionValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onPositionChange(e.defaultValue),resetAllFilter:()=>e.onPositionChange(e.defaultValue),children:(0,n.jsx)(b.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Position","snow-monkey-blocks"),value:e.positionValue,onChange:e.onPositionChange,options:[{value:"",label:(0,_.__)("Outline","snow-monkey-blocks")},{value:"inset",label:(0,_.__)("Inset","snow-monkey-blocks")}]})},o):null;var t,l,a,s,i,d,u,p})(e,o)))})}const V="noreferrer noopener",j="_blank",P="nofollow",B=[...c.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,_.__)("Mark as nofollow","snow-monkey-blocks")}],O={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){const o=["wide","full"],r=e.reduce(((e,r)=>{const{align:t}=r.attributes;return o.indexOf(t)>o.indexOf(e)?t:e}),void 0),l=e.map((e=>(0,t.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,t.createBlock)("snow-monkey-blocks/box",{align:r},l)}}],ungroup:(e,o)=>o.flatMap((e=>e))},N=l.uK,I=l.xY,$=[{attributes:{...N,borderWidth:{type:"number"},borderRadius:{type:"number"},contentPadding:{type:"string",default:""}},supports:{...I},save({attributes:e,className:o}){const{backgroundColor:r,backgroundGradientColor:t,borderColor:l,textColor:a,borderWidth:s,borderRadius:d,opacity:b,contentPadding:p,boxShadow:x}=e,h={"--smb-box--color":a||void 0,"--smb-box--border-radius":0<=d?`${d}px`:void 0,"--smb-box--box-shadow":x.color?`${x.horizontal}px ${x.vertical}px ${x.blur}px ${x.spread}px ${u()(x.color,x.opacity)}`:void 0,"--smb-box--background-color":r||void 0,"--smb-box--background-image":t||void 0,"--smb-box--background-opacity":String(b),"--smb-box--border-color":l||void 0,"--smb-box--border-width":0<=s?`${s}px`:void 0},m=i()("smb-box",o,{[`smb-box--p-${p}`]:!!p});return(0,n.jsxs)("div",{...c.useBlockProps.save({className:m,style:h}),children:[(0,n.jsx)("div",{className:"smb-box__background"}),(0,n.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-box__body"})})]})}},{attributes:{...N,borderRadius:{type:"number"},borderWidth:{type:"number"},contentPadding:{type:"string",default:""}},supports:{...I},save({attributes:e,className:o}){const{backgroundColor:r,backgroundGradientColor:t,borderColor:l,textColor:a,borderWidth:s,borderRadius:d,opacity:b,contentPadding:p,boxShadow:x}=e,h={color:a||void 0,borderRadius:0<=d?`${d}px`:void 0,boxShadow:x.color?`${x.horizontal}px ${x.vertical}px ${x.blur}px ${x.spread}px ${u()(x.color,x.opacity)}`:void 0},m={backgroundColor:r||void 0,backgroundImage:t||void 0,borderColor:l||void 0,borderWidth:s||void 0,borderRadius:0<=d?`${d}px`:void 0,opacity:b},g=i()("smb-box",o,{[`smb-box--p-${p}`]:!!p});return(0,n.jsxs)("div",{...c.useBlockProps.save({className:g,style:h}),children:[(0,n.jsx)("div",{className:"smb-box__background",style:m}),(0,n.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-box__body"})})]})}},{attributes:{...N,borderRadius:{type:"number"},borderWidth:{type:"number"},contentPadding:{type:"string",default:""}},save({attributes:e,className:o}){const{backgroundColor:r,borderColor:t,textColor:l,borderWidth:a}=e,s={backgroundColor:r||void 0,borderColor:t||void 0,color:l||void 0,borderWidth:a||void 0},d=i()("smb-box",o);return(0,n.jsx)("div",{className:d,style:s,children:(0,n.jsx)("div",{className:"smb-box__body",children:(0,n.jsx)(c.InnerBlocks.Content,{})})})}},{attributes:{...N,borderRadius:{type:"number"},borderWidth:{type:"number"},contentPadding:{type:"string",default:""}},save({attributes:e}){const{backgroundColor:o,borderColor:r,textColor:t,borderWidth:l}=e;return(0,n.jsx)("div",{className:"smb-box",style:{backgroundColor:o,borderColor:r,color:t,borderWidth:l},children:(0,n.jsx)("div",{className:"smb-box__body",children:(0,n.jsx)(c.InnerBlocks.Content,{})})})}}];(0,t.registerBlockType)(l.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:o,clientId:r,isSelected:t}){const{backgroundColor:a,backgroundGradientColor:s,borderColor:d,borderStyle:m,textColor:O,borderWidth:N,borderRadius:I,opacity:$,boxShadow:{...R},rel:T,href:D,linkText:A,linkTarget:H,templateLock:z}=e,M=(0,p.useSelect)((e=>!!e("core/block-editor").getBlock(r)?.innerBlocks?.length),[r]),K=(0,h.useRef)(),[W,G]=(0,h.useState)(),[F,L]=(0,h.useState)(!1),E=!!D,U=H===j,Z=!!T?.includes(P),J=(0,h.useMemo)((()=>({url:D,title:A,opensInNewTab:U,nofollow:Z})),[D,A,U,Z]);function Y(){o({href:void 0,linkTarget:void 0,rel:void 0}),L(!1)}const Q={"--smb-box--color":O||void 0,"--smb-box--border-radius":C(I),"--smb-box--box-shadow":R.color?`${R.horizontal}px ${R.vertical}px ${R.blur}px ${R.spread}px ${u()(R.color,R.opacity)}`:void 0,"--smb-box--background-color":a||void 0,"--smb-box--background-image":s||void 0,"--smb-box--background-opacity":String($),"--smb-box--border-color":d||void 0,"--smb-box--border-style":m||void 0,"--smb-box--border-width":String(N).match(/^\d+$/)?`${N}px`:N},X=i()("smb-box",{"smb-box--has-link":E}),q=(0,c.useBlockProps)({ref:(0,x.useMergeRefs)([G,K]),className:X,style:Q}),ee=(0,c.useInnerBlocksProps)({className:"smb-box__body"},{templateLock:z,renderAppender:M?void 0:c.InnerBlocks.ButtonBlockAppender}),oe=k();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.InspectorControls,{group:"color",children:(0,n.jsx)(c.__experimentalColorGradientSettingsDropdown,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:r,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:O,onColorChange:e=>o({textColor:e}),resetAllFilter:()=>({textColor:l.uK.textColor?.default}),label:(0,_.__)("Text color","snow-monkey-blocks")}]})}),(0,n.jsxs)(c.InspectorControls,{group:"border",children:[(0,n.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>d!==l.uK.borderColor.default||m!==l.uK.borderStyle.default||N!==l.uK.borderWidth.default,isShownByDefault:!0,label:(0,_.__)("Border","snow-monkey-blocks"),resetAllFilter:()=>({borderColor:l.uK.borderColor.default,borderStyle:l.uK.borderStyle.default,borderWidth:l.uK.borderWidth.default}),onDeselect:()=>o({borderColor:l.uK.borderColor.default,borderStyle:l.uK.borderStyle.default,borderWidth:l.uK.borderWidth.default}),panelId:r,children:(0,n.jsx)(b.BorderBoxControl,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),__next40pxDefaultSize:!0,__experimentalIsRenderedInSidebar:!0,className:"smb-border-box-control",enableAlpha:!0,enableStyle:!0,onChange:e=>{o({borderColor:e?.color,borderWidth:e?.width,borderStyle:e?.style})},popoverOffset:40,popoverPlacement:"left-start",value:{color:d,style:m,width:N}})}),(0,n.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>I!==l.uK.borderRadius.default,isShownByDefault:!0,label:(0,_.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>o({borderRadius:l.uK.borderRadius.default}),panelId:r,children:(0,n.jsx)("div",{className:"smb-border-radius-control",children:(0,n.jsx)(c.__experimentalBorderRadiusControl,{values:I,onChange:e=>{o({borderRadius:e})}})})})]}),(0,n.jsxs)(c.InspectorControls,{group:"styles",children:[(0,n.jsxs)(b.__experimentalToolsPanel,{label:(0,_.__)("Background","snow-monkey-blocks"),dropdownMenuProps:oe,children:[(0,n.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,n.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,_.__)("Color","snow-monkey-blocks"),colorValue:a,gradientValue:s,onColorChange:e=>o({backgroundColor:e}),onGradientChange:e=>o({backgroundGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,c.__experimentalUseMultipleOriginColorsAndGradients)()})}),(0,n.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>$!==l.uK.opacity.default,isShownByDefault:!0,label:(0,_.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>o({opacity:l.uK.opacity.default}),children:(0,n.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,_.__)("Opacity","snow-monkey-blocks"),value:$,onChange:e=>o({opacity:v(e,0,1)}),min:0,max:1,step:.1})})]}),(0,n.jsx)(S,{settings:[{colorValue:R.color,onColorChange:e=>{R.color=e,o({boxShadow:{...R}})},defaultValue:l.uK.boxShadow.default.color},{opacityValue:R.opacity,onOpacityChange:e=>{R.opacity=e,o({boxShadow:{...R}})},defaultValue:l.uK.boxShadow.default.opacity},{horizontalValue:R.horizontal,onHorizontalChange:e=>{R.horizontal=e,o({boxShadow:{...R}})},defaultValue:l.uK.boxShadow.default.horizontal},{blurValue:R.blur,onBlurChange:e=>{R.blur=e,o({boxShadow:{...R}})},defaultValue:l.uK.boxShadow.default.blur},{spreadValue:R.spread,onSpreadChange:e=>{R.spread=e,o({boxShadow:{...R}})},defaultValue:l.uK.boxShadow.default.spread}]})]}),(0,n.jsxs)(c.BlockControls,{group:"block",children:[!E&&(0,n.jsx)(b.ToolbarButton,{name:"link",icon:g,title:(0,_.__)("Link"),shortcut:y.displayShortcut.primary("k"),onClick:function(e){e.preventDefault(),L(!0)}}),E&&(0,n.jsx)(b.ToolbarButton,{name:"link",icon:f,title:(0,_.__)("Unlink"),shortcut:y.displayShortcut.primaryShift("k"),onClick:Y,isActive:!0})]}),t&&(F||E)&&(0,n.jsx)(b.Popover,{position:"bottom center",onClose:()=>{L(!1)},anchor:W,focusOnMount:!!F&&"firstElement",children:(0,n.jsx)(c.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:J,onChange:({url:e="",title:r,opensInNewTab:t,nofollow:l})=>{o(function({rel:e="",url:o="",title:r,opensInNewTab:t,nofollow:l}){let n,a=e;if(t)n=j,a=a?.includes(V)?a:a+` ${V}`;else{const e=new RegExp(`\\b${V}\\s*`,"g");a=a?.replace(e,"").trim()}if(l)a=a?.includes(P)?a:(a+` ${P}`).trim();else{const e=new RegExp(`\\b${P}\\s*`,"g");a=a?.replace(e,"").trim()}return{href:(0,w.prependHTTP)(o),linkText:r,linkTarget:n,rel:a||void 0}}({rel:T,url:e,title:r,opensInNewTab:t,nofollow:l}))},onRemove:()=>{Y()},forceIsEditingLink:F,hasRichPreviews:!0,hasTextControl:!0,settings:B,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})}),(0,n.jsxs)("div",{...q,children:[(0,n.jsx)("div",{className:"smb-box__background"}),(0,n.jsx)("div",{...ee})]})]})},save:function({attributes:e}){const{backgroundColor:o,backgroundGradientColor:r,borderColor:t,borderStyle:l,textColor:a,borderWidth:s,borderRadius:d,opacity:b,boxShadow:p,rel:x,href:h,linkTarget:m,linkText:g}=e,f=!!h,y={"--smb-box--color":a||void 0,"--smb-box--border-radius":C(d),"--smb-box--box-shadow":p.color?`${p.horizontal}px ${p.vertical}px ${p.blur}px ${p.spread}px ${u()(p.color,p.opacity)}`:void 0,"--smb-box--background-color":o||void 0,"--smb-box--background-image":r||void 0,"--smb-box--background-opacity":String(b),"--smb-box--border-color":t||void 0,"--smb-box--border-style":l||void 0,"--smb-box--border-width":String(s).match(/^\d+$/)?`${s}px`:s},w=i()("smb-box",{"smb-box--has-link":f});return(0,n.jsxs)("div",{...c.useBlockProps.save({className:w,style:y}),children:[(0,n.jsx)("div",{className:"smb-box__background"}),(0,n.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-box__body"})}),f&&(0,n.jsx)("a",{className:"smb-box__link",href:h,target:m,rel:x,children:null!=g?g:(0,_.__)("Learn more","snow-monkey-blocks")})]})},transforms:O,deprecated:$})},3558:e=>{"use strict";var o=function(e){return parseInt(e,16)};e.exports=function(e,r){var t,l,n=function(e){return"#"===e.charAt(0)?e.slice(1):e}(e),a=function(e){var r=e.g,t=e.b,l=e.a;return{r:o(e.r),g:o(r),b:o(t),a:+(o(l)/255).toFixed(2)}}({r:(l=3===(t=n).length||4===t.length)?"".concat(t.slice(0,1)).concat(t.slice(0,1)):t.slice(0,2),g:l?"".concat(t.slice(1,2)).concat(t.slice(1,2)):t.slice(2,4),b:l?"".concat(t.slice(2,3)).concat(t.slice(2,3)):t.slice(4,6),a:(l?"".concat(t.slice(3,4)).concat(t.slice(3,4)):t.slice(6,8))||"ff"});return function(e,o){var r,t=e.r,l=e.g,n=e.b,a=e.a,s=(r=o,!isNaN(parseFloat(r))&&isFinite(r)?o:a);return"rgba(".concat(t,", ").concat(l,", ").concat(n,", ").concat(s,")")}(a,r)}},6942:(e,o)=>{var r;!function(){"use strict";var t={}.hasOwnProperty;function l(){for(var e="",o=0;o<arguments.length;o++){var r=arguments[o];r&&(e=a(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 l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var o="";for(var r in e)t.call(e,r)&&e[r]&&(o=a(o,r));return o}function a(e,o){return o?e?e+" "+o:e+o:e}e.exports?(l.default=l,e.exports=l):void 0===(r=function(){return l}.apply(o,[]))||(e.exports=r)}()}},r={};function t(e){var l=r[e];if(void 0!==l)return l.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,t),n.exports}t.m=o,e=[],t.O=(o,r,l,n)=>{if(!r){var a=1/0;for(u=0;u<e.length;u++){for(var[r,l,n]=e[u],s=!0,i=0;i<r.length;i++)(!1&n||a>=n)&&Object.keys(t.O).every((e=>t.O[e](r[i])))?r.splice(i--,1):(s=!1,n<a&&(a=n));if(s){e.splice(u--,1);var d=l();void 0!==d&&(o=d)}}return o}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[r,l,n]},t.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},t.d=(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={823:0,3247:0};t.O.j=o=>0===e[o];var o=(o,r)=>{var l,n,[a,s,i]=r,d=0;if(a.some((o=>0!==e[o]))){for(l in s)t.o(s,l)&&(t.m[l]=s[l]);if(i)var u=i(t)}for(o&&o(r);d<a.length;d++)n=a[d],t.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return t.O(u)},r=globalThis.webpackChunk=globalThis.webpackChunk||[];r.forEach(o.bind(null,0)),r.push=o.bind(null,r.push.bind(r))})();var l=t.O(void 0,[3247],(()=>t(4658)));l=t.O(l)})(); -
snow-monkey-blocks/trunk/dist/blocks/btn-box/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' d83464869bfdab8c7f45');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '7154c49cecaa7961940d'); -
snow-monkey-blocks/trunk/dist/blocks/btn-box/index.js
r3390754 r3400189 1 (()=>{var e,t={1317:(e,t,n)=>{"use strict";const s=window.wp.blocks,o=window.wp.i18n,r=JSON.parse('{"UU":"snow-monkey-blocks/btn-box","uK":{"lede":{"type":"string","source":"html","selector":".smb-btn-box__lede","default":""},"note":{"type":"string","source":"html","selector":".smb-btn-box__note","default":""},"backgroundColor":{"type":"string"},"btnLabel":{"type":"string","source":"html","selector":".smb-btn__label","default":""},"btnURL":{"type":"string","source":"attribute","selector":".smb-btn","attribute":"href","default":""},"btnTarget":{"type":"string","source":"attribute","selector":".smb-btn","attribute":"target","default":"_self"},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false}},"xY":{"html":false,"spacing":{"margin":true,"padding":true},"snowmonkeyeditor":{"blockPresets":{"ignore":["lede","note","btnLabel","btnURL","btnTarget"]}}}}'),l=window.ReactJSXRuntime,a=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M18,8H6A1,1,0,0,0,5,9v6a1,1,0,0,0,1,1H18a1,1,0,0,0,1-1V9A1,1,0,0,0,18,8Zm0,5.8A1.15,1.15,0,0,1,16.91,15H6.55a.57.57,0,0,1-.55-.6V9.64A.57.57,0,0,1,6.55,9h10.9a.57.57,0,0,1,.55.6Z"}),(0,l.jsx)("rect",{x:"9.5",y:"11.54",width:"5",height:"1"}),(0,l.jsx)("path",{d:"M23,3H1A1,1,0,0,0,0,4V20a1,1,0,0,0,1,1H23a1,1,0,0,0,1-1V4A1,1,0,0,0,23,3Zm0,16.47a.52.52,0,0,1-.52.53h-21A.52.52,0,0,1,1,19.47V4.53A.52.52,0,0,1,1.52,4h21a.52.52,0,0,1,.52.53Z"})]});var b=n(6942),i=n.n(b);const c=window.wp.components,d=window.wp.blockEditor,u=window.wp.element,m=window.wp.primitives;var x=(0,l.jsx)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(m.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});window.lodash;const p=window.wp.compose,h=r.uK,g=r.xY,v=[{attributes:{...h,btnBorderRadius:{type:"number"}},supports:{...g},migrate(e){const{btnBorderRadius:t}=e;return e.btnBorderRadius=String(t).match(/^\d+$/)?`${t}px`:t,[{...e}]},save({attributes:e,className:t}){const{lede:n,note:s,backgroundColor:o,btnLabel:r,btnURL:a,btnTarget:b,btnBackgroundColor:c,btnBackgroundGradientColor:u,btnTextColor:m,btnSize:x,btnBorderRadius:p,btnWrap:h}=e,g=i()("smb-btn-box",t),v=i()("smb-btn",{[`smb-btn--${x}`]:!!x,"smb-btn--wrap":h}),_={"--smb-btn-box--background-color":o||void 0},k={"--smb-btn--background-color":c||void 0,"--smb-btn--background-image":u||void 0,"--smb-btn--border-radius":p||0<=p?`${p}px`:void 0,"--smb-btn--color":m||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(k["--smb-btn--style--ghost--border-color"]=c||void 0),(0,l.jsx)("div",{...d.useBlockProps.save({className:g,style:_}),children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:n})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:v,href:a,style:k,target:"_self"===b?void 0:b,rel:"_self"===b?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(d.RichText.Content,{value:r})})})}),!d.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:s})})]})})}},{attributes:{...h,btnBorderRadius:{type:"number"}},supports:{...g},save({attributes:e,className:t}){const{lede:n,note:s,backgroundColor:o,btnLabel:r,btnURL:a,btnTarget:b,btnBackgroundColor:c,btnBackgroundGradientColor:u,btnTextColor:m,btnSize:x,btnBorderRadius:p,btnWrap:h}=e,g=i()("smb-btn-box",t),v=i()("smb-btn",{[`smb-btn--${x}`]:!!x,"smb-btn--wrap":h}),_={backgroundColor:o||void 0},k={backgroundColor:c||void 0,backgroundImage:u||void 0,borderRadius:void 0!==p?`${p}px`:void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(k.borderColor=c||void 0),(0,l.jsx)("div",{...d.useBlockProps.save({className:g,style:_}),children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:n})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:v,href:a,style:k,target:"_self"===b?void 0:b,rel:"_self"===b?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:m},children:(0,l.jsx)(d.RichText.Content,{value:r})})})}),!d.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:s})})]})})}},{attributes:{...h,btnURL:{type:"string",default:""},btnTarget:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{lede:n,note:s,backgroundColor:o,btnLabel:r,btnURL:a,btnTarget:b,btnBackgroundColor:c,btnTextColor:u,btnSize:m,btnBorderRadius:x,btnWrap:p}=e,h=i()("smb-btn-box",t),g=i()("smb-btn",{[`smb-btn--${m}`]:!!m,"smb-btn--wrap":p}),v={backgroundColor:o||void 0},_={backgroundColor:c||void 0,borderRadius:void 0!==x?`${x}px`:void 0};return"is-style-ghost"===e.className&&(_.borderColor=c||void 0),(0,l.jsx)("div",{...d.useBlockProps.save({className:h,style:v}),children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:n})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:g,href:a,style:_,target:"_self"===b?void 0:b,rel:"_self"===b?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:u},children:(0,l.jsx)(d.RichText.Content,{value:r})})})}),!d.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:s})})]})})}},{attributes:{...h,btnURL:{type:"string",default:""},btnTarget:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},supports:{align:["wide","full"]},save({attributes:e}){const{lede:t,note:n,backgroundColor:s,btnLabel:o,btnURL:r,btnTarget:a,btnBackgroundColor:b,btnTextColor:c,btnSize:u}=e;return(0,l.jsx)("div",{className:"smb-btn-box",style:{backgroundColor:s},children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(t)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:i()("smb-btn",{[`smb-btn--${u}`]:!!u}),href:r,style:{backgroundColor:b},target:"_self"===a?void 0:a,rel:"_self"===a?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:c},children:(0,l.jsx)(d.RichText.Content,{value:o})})})}),!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:n})})]})})}},{attributes:{...h,btnURL:{type:"string",default:""},btnTarget:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e}){const{lede:t,note:n,backgroundColor:s,btnLabel:o,btnURL:r,btnTarget:a,btnBackgroundColor:b,btnTextColor:i}=e,c={};s&&"null"!==s&&(c.backgroundColor=s);const u={};b&&"null"!==b&&(u.btnBackgroundColor=b);const m={};return i&&"null"!==i&&(m.btnTextColor=i),(0,l.jsx)("div",{className:"smb-btn-box",style:c,children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(t)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:t})}),(0,l.jsx)("a",{className:"smb-btn smb-btn--full",href:r,target:a,style:u,children:(0,l.jsx)("span",{className:"smb-btn__label",style:m,children:(0,l.jsx)(d.RichText.Content,{value:o})})}),!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:n})})]})})}},{attributes:{...h,btnURL:{type:"string",default:""},btnTarget:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},supports:{align:["wide","full"]},save({attributes:e}){const{lede:t,note:n,backgroundColor:s,btnLabel:o,btnURL:r,btnTarget:a,btnBackgroundColor:b,btnTextColor:c,btnSize:u}=e;return(0,l.jsx)("div",{className:"smb-btn-box",style:{backgroundColor:s},children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(t)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:i()("smb-btn",{[`smb-btn--${u}`]:!!u}),href:r,target:a,style:{backgroundColor:b},children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:c},children:(0,l.jsx)(d.RichText.Content,{value:o})})})}),!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:n})})]})})}}];(0,s.registerBlockType)(r.UU,{icon:{foreground:"#cd162c",src:a},styles:[{name:"default",label:(0,o.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"ghost",label:(0,o.__)("Ghost","snow-monkey-blocks")}],edit:function({attributes:e,setAttributes:t,isSelected:n,className:s,clientId:a}){const{lede:b,note:m,backgroundColor:h,btnLabel:g,btnURL:v,btnTarget:_,btnBackgroundColor:k,btnBackgroundGradientColor:y,btnTextColor:f,btnSize:j,btnBorderRadius:C,btnWrap:w}=e,[R,T]=(0,u.useState)(!1),N=!!v,B="_blank"===_,[S,L]=(0,u.useState)(null),U=i()("smb-btn-box",s),E=i()("smb-btn",{[`smb-btn--${j}`]:!!j,"smb-btn--wrap":w}),I={"--smb-btn-box--background-color":h||void 0},z={"--smb-btn--background-color":k||void 0,"--smb-btn--background-image":y||void 0,"--smb-btn--border-radius":String(C).match(/^\d+$/)?`${C}px`:C,"--smb-btn--color":f||void 0};e.className&&e.className.split(" ").includes("is-style-ghost")&&(z["--smb-btn--style--ghost--border-color"]=k||void 0);const A=(0,u.useRef)(),O=(0,d.useBlockProps)({className:U,style:I}),P=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.InspectorControls,{group:"color",children:(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{...(0,d.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:a,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:h,onColorChange:e=>t({backgroundColor:e}),resetAllFilter:()=>({backgroundColor:r.uK.backgroundColor?.default}),label:(0,o.__)("Background color","snow-monkey-blocks")}]})}),(0,l.jsx)(d.InspectorControls,{children:(0,l.jsxs)(c.__experimentalToolsPanel,{label:(0,o.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:P,children:[(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>j!==r.uK.btnSize.default,isShownByDefault:!0,label:(0,o.__)("Button size","snow-monkey-blocks"),onDeselect:()=>t({btnSize:r.uK.btnSize.default}),children:(0,l.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,o.__)("Button size","snow-monkey-blocks"),value:j,onChange:e=>t({btnSize:e}),options:[{value:"",label:(0,o.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,o.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,o.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,o.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,o.__)("Full size","snow-monkey-blocks")}]})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>C!==r.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,o.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>t({btnBorderRadius:r.uK.btnBorderRadius.default}),children:(0,l.jsx)("div",{className:"smb-border-radius-control",children:(0,l.jsx)(d.__experimentalBorderRadiusControl,{values:C,onChange:e=>{t({btnBorderRadius:e})}})})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>w!==r.uK.btnWrap.default,isShownByDefault:!0,label:(0,o.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>t({btnWrap:r.uK.btnWrap.default}),children:(0,l.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Wrap","snow-monkey-blocks"),checked:w,onChange:e=>t({btnWrap:e})})}),(0,l.jsxs)("div",{className:"smb-color-gradient-settings-dropdown",children:[(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,o.__)("Background color","snow-monkey-blocks"),colorValue:k,gradientValue:y,onColorChange:e=>t({btnBackgroundColor:e}),onGradientChange:e=>t({btnBackgroundGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,d.__experimentalUseMultipleOriginColorsAndGradients)()}),(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,o.__)("Text color","snow-monkey-blocks"),colorValue:f,onColorChange:e=>t({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,d.__experimentalUseMultipleOriginColorsAndGradients)()}),(0,l.jsx)(d.ContrastChecker,{backgroundColor:k,textColor:f})]})]})}),(0,l.jsx)("div",{...O,children:(0,l.jsxs)("div",{className:"c-container",children:[(!d.RichText.isEmpty(b)||n)&&(0,l.jsx)(d.RichText,{className:"smb-btn-box__lede",value:b,onChange:e=>t({lede:e}),placeholder:(0,o.__)("Write lede…","snow-monkey-blocks")}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("span",{ref:L,className:E,href:v,style:z,target:"_self"===_?void 0:_,rel:"_self"===_?void 0:"noopener noreferrer",children:(0,l.jsx)(d.RichText,{className:"smb-btn__label",value:g,placeholder:(0,o.__)("Button","snow-monkey-blocks"),onChange:e=>t({btnLabel:e}),withoutInteractiveFormatting:!0,ref:A})})}),(!d.RichText.isEmpty(m)||n)&&(0,l.jsx)(d.RichText,{className:"smb-btn-box__note",value:m,onChange:e=>t({note:e}),placeholder:(0,o.__)("Write note…","snow-monkey-blocks")})]})}),(0,l.jsx)(d.BlockControls,{group:"block",children:(0,l.jsx)(c.ToolbarButton,{name:"link",icon:x,title:(0,o.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),T(!0)},isActive:N})}),n&&R&&(0,l.jsx)(c.Popover,{placement:"bottom",anchor:S,onClose:()=>{T(!1),A.current?.focus()},children:(0,l.jsx)(d.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:v,opensInNewTab:B},onChange:({url:e,opensInNewTab:n})=>{t({btnURL:e,btnTarget:n?"_blank":"_self"})},onRemove:()=>{t({btnURL:void 0,btnTarget:void 0}),T(!1),A.current?.focus()},forceIsEditingLink:!N})})]})},save:function({attributes:e,className:t}){const{lede:n,note:s,backgroundColor:o,btnLabel:r,btnURL:a,btnTarget:b,btnBackgroundColor:c,btnBackgroundGradientColor:u,btnTextColor:m,btnSize:x,btnBorderRadius:p,btnWrap:h}=e,g=i()("smb-btn-box",t),v=i()("smb-btn",{[`smb-btn--${x}`]:!!x,"smb-btn--wrap":h}),_={"--smb-btn-box--background-color":o||void 0},k={"--smb-btn--background-color":c||void 0,"--smb-btn--background-image":u||void 0,"--smb-btn--border-radius":String(p).match(/^\d+$/)?`${p}px`:p,"--smb-btn--color":m||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(k["--smb-btn--style--ghost--border-color"]=c||void 0),(0,l.jsx)("div",{...d.useBlockProps.save({className:g,style:_}),children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:n})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:v,href:a,style:k,target:"_self"===b?void 0:b,rel:"_self"===b?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(d.RichText.Content,{value:r})})})}),!d.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:s})})]})})},deprecated:v})},6942:(e,t)=>{var n;!function(){"use strict";var s={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=l(e,r(n)))}return e}function r(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 n in e)s.call(e,n)&&e[n]&&(t=l(t,n));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},n={};function s(e){var o=n[e];if(void 0!==o)return o.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,s),r.exports}s.m=t,e=[],s.O=(t,n,o,r)=>{if(!n){var l=1/0;for(c=0;c<e.length;c++){for(var[n,o,r]=e[c],a=!0,b=0;b<n.length;b++)(!1&r||l>=r)&&Object.keys(s.O).every((e=>s.O[e](n[b])))?n.splice(b--,1):(a=!1,r<l&&(l=r));if(a){e.splice(c--,1);var i=o();void 0!==i&&(t=i)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[n,o,r]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={6952:0,2512:0};s.O.j=t=>0===e[t];var t=(t,n)=>{var o,r,[l,a,b]=n,i=0;if(l.some((t=>0!==e[t]))){for(o in a)s.o(a,o)&&(s.m[o]=a[o]);if(b)var c=b(s)}for(t&&t(n);i<l.length;i++)r=l[i],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return s.O(c)},n=globalThis.webpackChunk=globalThis.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=s.O(void 0,[2512],(()=>s(1317)));o=s.O(o)})();1 (()=>{var e,t={1317:(e,t,n)=>{"use strict";const s=window.wp.blocks,o=window.wp.i18n,r=JSON.parse('{"UU":"snow-monkey-blocks/btn-box","uK":{"lede":{"type":"string","source":"html","selector":".smb-btn-box__lede","default":""},"note":{"type":"string","source":"html","selector":".smb-btn-box__note","default":""},"backgroundColor":{"type":"string"},"btnLabel":{"type":"string","source":"html","selector":".smb-btn__label","default":""},"btnURL":{"type":"string","source":"attribute","selector":".smb-btn","attribute":"href","default":""},"btnTarget":{"type":"string","source":"attribute","selector":".smb-btn","attribute":"target","default":"_self"},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false}},"xY":{"html":false,"spacing":{"margin":true,"padding":true},"snowmonkeyeditor":{"blockPresets":{"ignore":["lede","note","btnLabel","btnURL","btnTarget"]}}}}'),l=window.ReactJSXRuntime,a=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M18,8H6A1,1,0,0,0,5,9v6a1,1,0,0,0,1,1H18a1,1,0,0,0,1-1V9A1,1,0,0,0,18,8Zm0,5.8A1.15,1.15,0,0,1,16.91,15H6.55a.57.57,0,0,1-.55-.6V9.64A.57.57,0,0,1,6.55,9h10.9a.57.57,0,0,1,.55.6Z"}),(0,l.jsx)("rect",{x:"9.5",y:"11.54",width:"5",height:"1"}),(0,l.jsx)("path",{d:"M23,3H1A1,1,0,0,0,0,4V20a1,1,0,0,0,1,1H23a1,1,0,0,0,1-1V4A1,1,0,0,0,23,3Zm0,16.47a.52.52,0,0,1-.52.53h-21A.52.52,0,0,1,1,19.47V4.53A.52.52,0,0,1,1.52,4h21a.52.52,0,0,1,.52.53Z"})]});var i=n(6942),b=n.n(i);const c=window.wp.components,d=window.wp.blockEditor,u=window.wp.element,m=window.wp.primitives;var x=(0,l.jsx)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(m.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});window.lodash;const p=window.wp.compose,h=e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const t=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft].map((e=>null==e||""===e?"":/^\d+$/.test(String(e))?`${e}px`:String(e))),n=t.filter(Boolean);if(0===n.length)return;if(4===n.length){const[e,n,s,o]=t;if(e===n&&n===s&&s===o)return e;if(e===s&&n===o)return`${e} ${n}`;if(n===o)return`${e} ${n} ${s}`}return n.join(" ")}return/^\d+$/.test(String(e))?`${e}px`:e}},g=r.uK,_=r.xY,v=[{attributes:{...g,btnBorderRadius:{type:"number"}},supports:{..._},migrate(e){const{btnBorderRadius:t}=e;return e.btnBorderRadius=h(t),[{...e}]},save({attributes:e,className:t}){const{lede:n,note:s,backgroundColor:o,btnLabel:r,btnURL:a,btnTarget:i,btnBackgroundColor:c,btnBackgroundGradientColor:u,btnTextColor:m,btnSize:x,btnBorderRadius:p,btnWrap:g}=e,_=b()("smb-btn-box",t),v=b()("smb-btn",{[`smb-btn--${x}`]:!!x,"smb-btn--wrap":g}),f={"--smb-btn-box--background-color":o||void 0},k={"--smb-btn--background-color":c||void 0,"--smb-btn--background-image":u||void 0,"--smb-btn--border-radius":h(p),"--smb-btn--color":m||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(k["--smb-btn--style--ghost--border-color"]=c||void 0),(0,l.jsx)("div",{...d.useBlockProps.save({className:_,style:f}),children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:n})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:v,href:a,style:k,target:"_self"===i?void 0:i,rel:"_self"===i?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(d.RichText.Content,{value:r})})})}),!d.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:s})})]})})}},{attributes:{...g,btnBorderRadius:{type:"number"}},supports:{..._},save({attributes:e,className:t}){const{lede:n,note:s,backgroundColor:o,btnLabel:r,btnURL:a,btnTarget:i,btnBackgroundColor:c,btnBackgroundGradientColor:u,btnTextColor:m,btnSize:x,btnBorderRadius:p,btnWrap:g}=e,_=b()("smb-btn-box",t),v=b()("smb-btn",{[`smb-btn--${x}`]:!!x,"smb-btn--wrap":g}),f={backgroundColor:o||void 0},k={backgroundColor:c||void 0,backgroundImage:u||void 0,borderRadius:h(p)};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(k.borderColor=c||void 0),(0,l.jsx)("div",{...d.useBlockProps.save({className:_,style:f}),children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:n})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:v,href:a,style:k,target:"_self"===i?void 0:i,rel:"_self"===i?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:m},children:(0,l.jsx)(d.RichText.Content,{value:r})})})}),!d.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:s})})]})})}},{attributes:{...g,btnURL:{type:"string",default:""},btnTarget:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{lede:n,note:s,backgroundColor:o,btnLabel:r,btnURL:a,btnTarget:i,btnBackgroundColor:c,btnTextColor:u,btnSize:m,btnBorderRadius:x,btnWrap:p}=e,g=b()("smb-btn-box",t),_=b()("smb-btn",{[`smb-btn--${m}`]:!!m,"smb-btn--wrap":p}),v={backgroundColor:o||void 0},f={backgroundColor:c||void 0,borderRadius:h(x)};return"is-style-ghost"===e.className&&(f.borderColor=c||void 0),(0,l.jsx)("div",{...d.useBlockProps.save({className:g,style:v}),children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:n})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:_,href:a,style:f,target:"_self"===i?void 0:i,rel:"_self"===i?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:u},children:(0,l.jsx)(d.RichText.Content,{value:r})})})}),!d.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:s})})]})})}},{attributes:{...g,btnURL:{type:"string",default:""},btnTarget:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},supports:{align:["wide","full"]},save({attributes:e}){const{lede:t,note:n,backgroundColor:s,btnLabel:o,btnURL:r,btnTarget:a,btnBackgroundColor:i,btnTextColor:c,btnSize:u}=e;return(0,l.jsx)("div",{className:"smb-btn-box",style:{backgroundColor:s},children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(t)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:b()("smb-btn",{[`smb-btn--${u}`]:!!u}),href:r,style:{backgroundColor:i},target:"_self"===a?void 0:a,rel:"_self"===a?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:c},children:(0,l.jsx)(d.RichText.Content,{value:o})})})}),!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:n})})]})})}},{attributes:{...g,btnURL:{type:"string",default:""},btnTarget:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e}){const{lede:t,note:n,backgroundColor:s,btnLabel:o,btnURL:r,btnTarget:a,btnBackgroundColor:i,btnTextColor:b}=e,c={};s&&"null"!==s&&(c.backgroundColor=s);const u={};i&&"null"!==i&&(u.btnBackgroundColor=i);const m={};return b&&"null"!==b&&(m.btnTextColor=b),(0,l.jsx)("div",{className:"smb-btn-box",style:c,children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(t)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:t})}),(0,l.jsx)("a",{className:"smb-btn smb-btn--full",href:r,target:a,style:u,children:(0,l.jsx)("span",{className:"smb-btn__label",style:m,children:(0,l.jsx)(d.RichText.Content,{value:o})})}),!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:n})})]})})}},{attributes:{...g,btnURL:{type:"string",default:""},btnTarget:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},supports:{align:["wide","full"]},save({attributes:e}){const{lede:t,note:n,backgroundColor:s,btnLabel:o,btnURL:r,btnTarget:a,btnBackgroundColor:i,btnTextColor:c,btnSize:u}=e;return(0,l.jsx)("div",{className:"smb-btn-box",style:{backgroundColor:s},children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(t)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:b()("smb-btn",{[`smb-btn--${u}`]:!!u}),href:r,target:a,style:{backgroundColor:i},children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:c},children:(0,l.jsx)(d.RichText.Content,{value:o})})})}),!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:n})})]})})}}];(0,s.registerBlockType)(r.UU,{icon:{foreground:"#cd162c",src:a},styles:[{name:"default",label:(0,o.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"ghost",label:(0,o.__)("Ghost","snow-monkey-blocks")}],edit:function({attributes:e,setAttributes:t,isSelected:n,className:s,clientId:a}){const{lede:i,note:m,backgroundColor:g,btnLabel:_,btnURL:v,btnTarget:f,btnBackgroundColor:k,btnBackgroundGradientColor:y,btnTextColor:j,btnSize:C,btnBorderRadius:w,btnWrap:R}=e,[T,N]=(0,u.useState)(!1),B=!!v,S="_blank"===f,[L,U]=(0,u.useState)(null),A=b()("smb-btn-box",s),E=b()("smb-btn",{[`smb-btn--${C}`]:!!C,"smb-btn--wrap":R}),I={"--smb-btn-box--background-color":g||void 0},z={"--smb-btn--background-color":k||void 0,"--smb-btn--background-image":y||void 0,"--smb-btn--border-radius":h(w),"--smb-btn--color":j||void 0};e.className&&e.className.split(" ").includes("is-style-ghost")&&(z["--smb-btn--style--ghost--border-color"]=k||void 0);const O=(0,u.useRef)(),P=(0,d.useBlockProps)({className:A,style:I}),V=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.InspectorControls,{group:"color",children:(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{...(0,d.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:a,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:g,onColorChange:e=>t({backgroundColor:e}),resetAllFilter:()=>({backgroundColor:r.uK.backgroundColor?.default}),label:(0,o.__)("Background color","snow-monkey-blocks")}]})}),(0,l.jsx)(d.InspectorControls,{children:(0,l.jsxs)(c.__experimentalToolsPanel,{label:(0,o.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:V,children:[(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>C!==r.uK.btnSize.default,isShownByDefault:!0,label:(0,o.__)("Button size","snow-monkey-blocks"),onDeselect:()=>t({btnSize:r.uK.btnSize.default}),children:(0,l.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,o.__)("Button size","snow-monkey-blocks"),value:C,onChange:e=>t({btnSize:e}),options:[{value:"",label:(0,o.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,o.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,o.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,o.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,o.__)("Full size","snow-monkey-blocks")}]})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>w!==r.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,o.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>t({btnBorderRadius:r.uK.btnBorderRadius.default}),children:(0,l.jsx)("div",{className:"smb-border-radius-control",children:(0,l.jsx)(d.__experimentalBorderRadiusControl,{values:w,onChange:e=>{t({btnBorderRadius:e})}})})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>R!==r.uK.btnWrap.default,isShownByDefault:!0,label:(0,o.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>t({btnWrap:r.uK.btnWrap.default}),children:(0,l.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Wrap","snow-monkey-blocks"),checked:R,onChange:e=>t({btnWrap:e})})}),(0,l.jsxs)("div",{className:"smb-color-gradient-settings-dropdown",children:[(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,o.__)("Background color","snow-monkey-blocks"),colorValue:k,gradientValue:y,onColorChange:e=>t({btnBackgroundColor:e}),onGradientChange:e=>t({btnBackgroundGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,d.__experimentalUseMultipleOriginColorsAndGradients)()}),(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,o.__)("Text color","snow-monkey-blocks"),colorValue:j,onColorChange:e=>t({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,d.__experimentalUseMultipleOriginColorsAndGradients)()}),(0,l.jsx)(d.ContrastChecker,{backgroundColor:k,textColor:j})]})]})}),(0,l.jsx)("div",{...P,children:(0,l.jsxs)("div",{className:"c-container",children:[(!d.RichText.isEmpty(i)||n)&&(0,l.jsx)(d.RichText,{className:"smb-btn-box__lede",value:i,onChange:e=>t({lede:e}),placeholder:(0,o.__)("Write lede…","snow-monkey-blocks")}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("span",{ref:U,className:E,href:v,style:z,target:"_self"===f?void 0:f,rel:"_self"===f?void 0:"noopener noreferrer",children:(0,l.jsx)(d.RichText,{className:"smb-btn__label",value:_,placeholder:(0,o.__)("Button","snow-monkey-blocks"),onChange:e=>t({btnLabel:e}),withoutInteractiveFormatting:!0,ref:O})})}),(!d.RichText.isEmpty(m)||n)&&(0,l.jsx)(d.RichText,{className:"smb-btn-box__note",value:m,onChange:e=>t({note:e}),placeholder:(0,o.__)("Write note…","snow-monkey-blocks")})]})}),(0,l.jsx)(d.BlockControls,{group:"block",children:(0,l.jsx)(c.ToolbarButton,{name:"link",icon:x,title:(0,o.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),N(!0)},isActive:B})}),n&&T&&(0,l.jsx)(c.Popover,{placement:"bottom",anchor:L,onClose:()=>{N(!1),O.current?.focus()},children:(0,l.jsx)(d.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:v,opensInNewTab:S},onChange:({url:e,opensInNewTab:n})=>{t({btnURL:e,btnTarget:n?"_blank":"_self"})},onRemove:()=>{t({btnURL:void 0,btnTarget:void 0}),N(!1),O.current?.focus()},forceIsEditingLink:!B})})]})},save:function({attributes:e,className:t}){const{lede:n,note:s,backgroundColor:o,btnLabel:r,btnURL:a,btnTarget:i,btnBackgroundColor:c,btnBackgroundGradientColor:u,btnTextColor:m,btnSize:x,btnBorderRadius:p,btnWrap:g}=e,_=b()("smb-btn-box",t),v=b()("smb-btn",{[`smb-btn--${x}`]:!!x,"smb-btn--wrap":g}),f={"--smb-btn-box--background-color":o||void 0},k={"--smb-btn--background-color":c||void 0,"--smb-btn--background-image":u||void 0,"--smb-btn--border-radius":h(p),"--smb-btn--color":m||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(k["--smb-btn--style--ghost--border-color"]=c||void 0),(0,l.jsx)("div",{...d.useBlockProps.save({className:_,style:f}),children:(0,l.jsxs)("div",{className:"c-container",children:[!d.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-btn-box__lede",children:(0,l.jsx)(d.RichText.Content,{value:n})}),(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("a",{className:v,href:a,style:k,target:"_self"===i?void 0:i,rel:"_self"===i?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(d.RichText.Content,{value:r})})})}),!d.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-btn-box__note",children:(0,l.jsx)(d.RichText.Content,{value:s})})]})})},deprecated:v})},6942:(e,t)=>{var n;!function(){"use strict";var s={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=l(e,r(n)))}return e}function r(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 n in e)s.call(e,n)&&e[n]&&(t=l(t,n));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},n={};function s(e){var o=n[e];if(void 0!==o)return o.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,s),r.exports}s.m=t,e=[],s.O=(t,n,o,r)=>{if(!n){var l=1/0;for(c=0;c<e.length;c++){for(var[n,o,r]=e[c],a=!0,i=0;i<n.length;i++)(!1&r||l>=r)&&Object.keys(s.O).every((e=>s.O[e](n[i])))?n.splice(i--,1):(a=!1,r<l&&(l=r));if(a){e.splice(c--,1);var b=o();void 0!==b&&(t=b)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[n,o,r]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={6952:0,2512:0};s.O.j=t=>0===e[t];var t=(t,n)=>{var o,r,[l,a,i]=n,b=0;if(l.some((t=>0!==e[t]))){for(o in a)s.o(a,o)&&(s.m[o]=a[o]);if(i)var c=i(s)}for(t&&t(n);b<l.length;b++)r=l[b],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return s.O(c)},n=globalThis.webpackChunk=globalThis.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=s.O(void 0,[2512],(()=>s(1317)));o=s.O(o)})(); -
snow-monkey-blocks/trunk/dist/blocks/btn/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' 6c8bbf7c68841be537de');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'fa4c01fc6849cd7a2cae'); -
snow-monkey-blocks/trunk/dist/blocks/btn/index.js
r3390754 r3400189 1 (()=>{var e,r={1767:(e,r,t)=>{"use strict";const o=window.wp.blocks,s=window.wp.i18n,n=JSON.parse('{"UU":"snow-monkey-blocks/btn","uK":{"content":{"type":"string","source":"html","selector":".smb-btn__label","default":""},"url":{"type":"string","source":"attribute","selector":".smb-btn-wrapper a","attribute":"href","default":""},"target":{"type":"string","source":"attribute","selector":".smb-btn-wrapper a","attribute":"target","default":"_self"},"modifier":{"type":"string","default":""},"borderRadius":{"type":"string"},"backgroundColor":{"type":"string"},"backgroundGradientColor":{"type":"string"},"textColor":{"type":"string"},"wrap":{"type":"boolean","default":false},"linkDestination":{"type":"string"}},"xY":{"align":["left","center","right"],"spacing":{"__experimentalSkipSerialization":true,"margin":false,"padding":true},"snowmonkeyeditor":{"blockPresets":{"ignore":["content","url","target","linkDestination"]}}}}'),l=window.ReactJSXRuntime,a=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M18,8H6A1,1,0,0,0,5,9v6a1,1,0,0,0,1,1H18a1,1,0,0,0,1-1V9A1,1,0,0,0,18,8Zm0,5.8A1.15,1.15,0,0,1,16.91,15H6.55A.57.57,0,0,1,6,14.4V9.6A.57.57,0,0,1,6.55,9h10.9a.57.57,0,0,1,.55.6Z"}),(0,l.jsx)("rect",{x:"9.5",y:"11.5",width:"5",height:"1"})]});var i=t(6942),d=t.n(i);const b=window.wp.components,c=window.wp.blockEditor,u=window.wp.compose,m=window.wp.element,p=window.wp.primitives;var g=(0,l.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(p.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),f=(0,l.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(p.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});window.lodash;const v= n.uK,h=n.xY,x=[{attributes:{...v},supports:{...h},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,backgroundGradientColor:b,textColor:u,wrap:m}=e,p=(0,c.__experimentalGetSpacingClassesAndStyles)(e),g=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),f=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":m}),v={"--smb-btn--background-color":i||void 0,"--smb-btn--background-image":b||void 0,"--smb-btn--border-radius":String(a).match(/^\d+$/)?`${a}px`:a,"--smb-btn--color":u||void 0,...p.style};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(v["--smb-btn--style--ghost--border-color"]=i||void 0),(0,l.jsx)("div",{...c.useBlockProps.save({className:g}),children:(0,l.jsx)("a",{className:f,href:o,style:v,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...v,borderRadius:{type:"number"}},supports:{...h},migrate(e){const{borderRadius:r}=e;return e.borderRadius=String(r).match(/^\d+$/)?`${r}px`:r,[{...e}]},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,backgroundGradientColor:b,textColor:u,wrap:m}=e,p=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),g=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":m}),f={"--smb-btn--background-color":i||void 0,"--smb-btn--background-image":b||void 0,"--smb-btn--border-radius":a||0<=a?`${a}px`:void 0,"--smb-btn--color":u||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(f["--smb-btn--style--ghost--border-color"]=i||void 0),(0,l.jsx)("div",{...c.useBlockProps.save({className:p}),children:(0,l.jsx)("a",{className:g,href:o,style:f,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...v,borderRadius:{type:"number"}},supports:{...h},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,backgroundGradientColor:b,textColor:u,wrap:m}=e,p=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),g=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":m}),f={backgroundColor:i||void 0,backgroundImage:b||void 0,borderRadius:a||0<=a?`${a}px`:void 0};e.className&&e.className.split(" ").includes("is-style-ghost")&&(f.borderColor=i||void 0);const v={color:u||void 0};return(0,l.jsx)("div",{...c.useBlockProps.save({className:p}),children:(0,l.jsx)("a",{className:g,href:o,style:f,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:v,children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...v,url:{type:"string",default:""},target:{type:"string",default:"_self"},borderRadius:{type:"number"}},supports:{align:["left","center","right"]},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,textColor:b,wrap:u}=e,m=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),p=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":u}),g={backgroundColor:i||void 0,borderRadius:a||0<=a?`${a}px`:void 0};"is-style-ghost"===e.className&&(g.borderColor=i||void 0);const f={color:b||void 0};return(0,l.jsx)("div",{...c.useBlockProps.save({className:m}),children:(0,l.jsx)("a",{className:p,href:o,style:g,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:f,children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...v,url:{type:"string",default:""},target:{type:"string",default:"_self"},borderRadius:{type:"number"}},supports:{align:["left","center","right"]},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,textColor:b,wrap:u}=e,m=d()("u-clearfix","smb-btn-wrapper",r),p=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":u}),g={backgroundColor:i||void 0,borderRadius:void 0!==a?`${a}px`:void 0};"is-style-ghost"===e.className&&(g.borderColor=i||void 0);const f={color:b||void 0};return(0,l.jsx)("div",{className:m,children:(0,l.jsx)("a",{className:p,href:o,style:g,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:f,children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...v,url:{type:"string",default:""},target:{type:"string",default:"_self"},borderRadius:{type:"number"}},supports:{align:["left","center","right"]},save({attributes:e}){const{content:r,url:t,target:o,modifier:s,backgroundColor:n,textColor:a}=e;return(0,l.jsx)("div",{className:"u-clearfix smb-btn-wrapper",children:(0,l.jsx)("a",{className:d()("smb-btn",{[`smb-btn--${s}`]:!!s}),href:t,style:{backgroundColor:n},target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:a},children:(0,l.jsx)(c.RichText.Content,{value:r})})})})}},{attributes:{...v,url:{type:"string",default:""},target:{type:"string",default:"_self"},borderRadius:{type:"number"}},supports:{align:["left","center","right"]},save({attributes:e}){const{content:r,url:t,target:o,modifier:s,backgroundColor:n,textColor:a}=e;return(0,l.jsx)("div",{className:"u-clearfix smb-btn-wrapper",children:(0,l.jsx)("a",{className:d()("smb-btn",{[`smb-btn--${s}`]:!!s}),href:t,target:o,style:{backgroundColor:n},children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:a},children:(0,l.jsx)(c.RichText.Content,{value:r})})})})}}];(0,o.registerBlockType)(n.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:r,className:t,isSelected:o,clientId:a}){const{content:i,url:p,target:v,modifier:h,borderRadius:x,backgroundColor:_,backgroundGradientColor:k,textColor:w,wrap:y}=e,C=(0,c.__experimentalGetSpacingClassesAndStyles)(e),[j,N]=(0,m.useState)(!1),R=!!p,S="_blank"===v,[$,B]=(0,m.useState)(null);(0,m.useEffect)((()=>{e.className&&r({className:e.className.replace("u-clearfix","")})}),[]);const T=d()("smb-btn-wrapper",t,{[`smb-btn-wrapper--${h}`]:!!h}),P=d()("smb-btn",{[`smb-btn--${h}`]:!!h,"smb-btn--wrap":y}),G={"--smb-btn--background-color":_||void 0,"--smb-btn--background-image":k||void 0,"--smb-btn--border-radius":String(x).match(/^\d+$/)?`${x}px`:x,"--smb-btn--color":w||void 0,...C.style};e.className&&e.className.split(" ").includes("is-style-ghost")&&(G["--smb-btn--style--ghost--border-color"]=_||void 0);const A=(0,m.useRef)(),H=(0,m.useRef)(),I=(0,c.useBlockProps)({className:T,ref:(0,u.useMergeRefs)([B,A])}),O=(0,u.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},V=()=>{r({url:void 0,target:void 0}),N(!1)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.InspectorControls,{children:(0,l.jsxs)(b.__experimentalToolsPanel,{label:(0,s.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:O,children:[(0,l.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>h!==n.uK.modifier.default,isShownByDefault:!0,label:(0,s.__)("Button size","snow-monkey-blocks"),onDeselect:()=>r({modifier:n.uK.modifier.default}),children:(0,l.jsx)(b.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Button size","snow-monkey-blocks"),value:h,onChange:e=>r({modifier:e}),options:[{value:"",label:(0,s.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,s.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,s.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,s.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,s.__)("Full size","snow-monkey-blocks")}]})}),(0,l.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>y!==n.uK.wrap.default,isShownByDefault:!0,label:(0,s.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>r({wrap:n.uK.wrap.default}),children:(0,l.jsx)(b.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Wrap","snow-monkey-blocks"),checked:y,onChange:e=>r({wrap:e})})})]})}),(0,l.jsx)(c.InspectorControls,{group:"color",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:a,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:_,onColorChange:e=>r({backgroundColor:e}),gradientValue:k,onGradientChange:e=>r({backgroundGradientColor:e}),resetAllFilter:()=>({backgroundColor:n.uK.backgroundColor?.default,backgroundGradientColor:n.uK.backgroundGradientColor?.default}),label:(0,s.__)("Background color","snow-monkey-blocks")},{colorValue:w,onColorChange:e=>r({textColor:e}),resetAllFilter:()=>({textColor:n.uK.textColor?.default}),label:(0,s.__)("Text color","snow-monkey-blocks")}]})}),(0,l.jsx)(c.InspectorControls,{group:"border",children:(0,l.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>x!==n.uK.borderRadius.default,isShownByDefault:!0,label:(0,s.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>r({borderRadius:n.uK.borderRadius.default}),panelId:a,children:(0,l.jsx)("div",{className:"smb-border-radius-control",children:(0,l.jsx)(c.__experimentalBorderRadiusControl,{values:x,onChange:e=>{r({borderRadius:e})}})})})}),(0,l.jsx)("div",{...I,children:(0,l.jsx)("span",{className:P,href:p,style:G,target:"_self"===v?void 0:v,rel:"_self"===v?void 0:"noopener noreferrer",children:(0,l.jsx)(c.RichText,{className:"smb-btn__label",value:i,placeholder:(0,s.__)("Button","snow-monkey-blocks"),onChange:e=>r({content:e}),withoutInteractiveFormatting:!0,ref:H})})}),(0,l.jsxs)(c.BlockControls,{group:"block",children:[!R&&(0,l.jsx)(b.ToolbarButton,{name:"link",icon:g,title:(0,s.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),N(!0)}}),R&&(0,l.jsx)(b.ToolbarButton,{name:"link",icon:f,title:(0,s.__)("Unlink","snow-monkey-blocks"),onClick:V,isActive:!0})]}),o&&(j||R)&&(0,l.jsx)(b.Popover,{placement:"bottom",anchor:$,onClose:()=>{N(!1),H.current?.focus()},children:(0,l.jsx)(c.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:p,opensInNewTab:S},onChange:({url:e,opensInNewTab:t})=>{r({url:e,target:t?"_blank":"_self"})},onRemove:()=>{V(),H.current?.focus()},forceIsEditingLink:j})})]})},save:function({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,backgroundGradientColor:b,textColor:u,wrap:m}=e,p=(0,c.__experimentalGetSpacingClassesAndStyles)(e),g=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),f=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":m}),v={"--smb-btn--background-color":i||void 0,"--smb-btn--background-image":b||void 0,"--smb-btn--border-radius":String(a).match(/^\d+$/)?`${a}px`:a,"--smb-btn--color":u||void 0,...p.style};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(v["--smb-btn--style--ghost--border-color"]=i||void 0),(0,l.jsx)("div",{...c.useBlockProps.save({className:g}),children:(0,l.jsx)("a",{className:f,href:o||void 0,style:v,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(c.RichText.Content,{value:t})})})})},styles:[{name:"default",label:(0,s.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"ghost",label:(0,s.__)("Ghost","snow-monkey-blocks")},{name:"text",label:(0,s.__)("Text","snow-monkey-blocks")}],deprecated:x})},6942:(e,r)=>{var t;!function(){"use strict";var o={}.hasOwnProperty;function s(){for(var e="",r=0;r<arguments.length;r++){var t=arguments[r];t&&(e=l(e,n(t)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var t in e)o.call(e,t)&&e[t]&&(r=l(r,t));return r}function l(e,r){return r?e?e+" "+r:e+r:e}e.exports?(s.default=s,e.exports=s):void 0===(t=function(){return s}.apply(r,[]))||(e.exports=t)}()}},t={};function o(e){var s=t[e];if(void 0!==s)return s.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.m=r,e=[],o.O=(r,t,s,n)=>{if(!t){var l=1/0;for(b=0;b<e.length;b++){for(var[t,s,n]=e[b],a=!0,i=0;i<t.length;i++)(!1&n||l>=n)&&Object.keys(o.O).every((e=>o.O[e](t[i])))?t.splice(i--,1):(a=!1,n<l&&(l=n));if(a){e.splice(b--,1);var d=s();void 0!==d&&(r=d)}}return r}n=n||0;for(var b=e.length;b>0&&e[b-1][2]>n;b--)e[b]=e[b-1];e[b]=[t,s,n]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={5660:0,6900:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var s,n,[l,a,i]=t,d=0;if(l.some((r=>0!==e[r]))){for(s in a)o.o(a,s)&&(o.m[s]=a[s]);if(i)var b=i(o)}for(r&&r(t);d<l.length;d++)n=l[d],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(b)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var s=o.O(void 0,[6900],(()=>o(1767)));s=o.O(s)})();1 (()=>{var e,r={1767:(e,r,t)=>{"use strict";const o=window.wp.blocks,s=window.wp.i18n,n=JSON.parse('{"UU":"snow-monkey-blocks/btn","uK":{"content":{"type":"string","source":"html","selector":".smb-btn__label","default":""},"url":{"type":"string","source":"attribute","selector":".smb-btn-wrapper a","attribute":"href","default":""},"target":{"type":"string","source":"attribute","selector":".smb-btn-wrapper a","attribute":"target","default":"_self"},"modifier":{"type":"string","default":""},"borderRadius":{"type":"string"},"backgroundColor":{"type":"string"},"backgroundGradientColor":{"type":"string"},"textColor":{"type":"string"},"wrap":{"type":"boolean","default":false},"linkDestination":{"type":"string"}},"xY":{"align":["left","center","right"],"spacing":{"__experimentalSkipSerialization":true,"margin":false,"padding":true},"snowmonkeyeditor":{"blockPresets":{"ignore":["content","url","target","linkDestination"]}}}}'),l=window.ReactJSXRuntime,a=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M18,8H6A1,1,0,0,0,5,9v6a1,1,0,0,0,1,1H18a1,1,0,0,0,1-1V9A1,1,0,0,0,18,8Zm0,5.8A1.15,1.15,0,0,1,16.91,15H6.55A.57.57,0,0,1,6,14.4V9.6A.57.57,0,0,1,6.55,9h10.9a.57.57,0,0,1,.55.6Z"}),(0,l.jsx)("rect",{x:"9.5",y:"11.5",width:"5",height:"1"})]});var i=t(6942),d=t.n(i);const b=window.wp.components,c=window.wp.blockEditor,u=window.wp.compose,m=window.wp.element,p=window.wp.primitives;var g=(0,l.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(p.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),f=(0,l.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(p.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});window.lodash;const v=e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const r=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft].map((e=>null==e||""===e?"":/^\d+$/.test(String(e))?`${e}px`:String(e))),t=r.filter(Boolean);if(0===t.length)return;if(4===t.length){const[e,t,o,s]=r;if(e===t&&t===o&&o===s)return e;if(e===o&&t===s)return`${e} ${t}`;if(t===s)return`${e} ${t} ${o}`}return t.join(" ")}return/^\d+$/.test(String(e))?`${e}px`:e}},h=n.uK,x=n.xY,_=[{attributes:{...h},supports:{...x},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,backgroundGradientColor:b,textColor:u,wrap:m}=e,p=(0,c.__experimentalGetSpacingClassesAndStyles)(e),g=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),f=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":m}),h={"--smb-btn--background-color":i||void 0,"--smb-btn--background-image":b||void 0,"--smb-btn--border-radius":v(a),"--smb-btn--color":u||void 0,...p.style};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(h["--smb-btn--style--ghost--border-color"]=i||void 0),(0,l.jsx)("div",{...c.useBlockProps.save({className:g}),children:(0,l.jsx)("a",{className:f,href:o,style:h,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...h,borderRadius:{type:"number"}},supports:{...x},migrate(e){const{borderRadius:r}=e;return e.borderRadius=v(r),[{...e}]},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,backgroundGradientColor:b,textColor:u,wrap:m}=e,p=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),g=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":m}),f={"--smb-btn--background-color":i||void 0,"--smb-btn--background-image":b||void 0,"--smb-btn--border-radius":a||0<=a?`${a}px`:void 0,"--smb-btn--color":u||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(f["--smb-btn--style--ghost--border-color"]=i||void 0),(0,l.jsx)("div",{...c.useBlockProps.save({className:p}),children:(0,l.jsx)("a",{className:g,href:o,style:f,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...h,borderRadius:{type:"number"}},supports:{...x},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,backgroundGradientColor:b,textColor:u,wrap:m}=e,p=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),g=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":m}),f={backgroundColor:i||void 0,backgroundImage:b||void 0,borderRadius:a||0<=a?`${a}px`:void 0};e.className&&e.className.split(" ").includes("is-style-ghost")&&(f.borderColor=i||void 0);const v={color:u||void 0};return(0,l.jsx)("div",{...c.useBlockProps.save({className:p}),children:(0,l.jsx)("a",{className:g,href:o,style:f,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:v,children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...h,url:{type:"string",default:""},target:{type:"string",default:"_self"},borderRadius:{type:"number"}},supports:{align:["left","center","right"]},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,textColor:b,wrap:u}=e,m=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),p=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":u}),g={backgroundColor:i||void 0,borderRadius:a||0<=a?`${a}px`:void 0};"is-style-ghost"===e.className&&(g.borderColor=i||void 0);const f={color:b||void 0};return(0,l.jsx)("div",{...c.useBlockProps.save({className:m}),children:(0,l.jsx)("a",{className:p,href:o,style:g,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:f,children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...h,url:{type:"string",default:""},target:{type:"string",default:"_self"},borderRadius:{type:"number"}},supports:{align:["left","center","right"]},save({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,textColor:b,wrap:u}=e,m=d()("u-clearfix","smb-btn-wrapper",r),p=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":u}),g={backgroundColor:i||void 0,borderRadius:void 0!==a?`${a}px`:void 0};"is-style-ghost"===e.className&&(g.borderColor=i||void 0);const f={color:b||void 0};return(0,l.jsx)("div",{className:m,children:(0,l.jsx)("a",{className:p,href:o,style:g,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:f,children:(0,l.jsx)(c.RichText.Content,{value:t})})})})}},{attributes:{...h,url:{type:"string",default:""},target:{type:"string",default:"_self"},borderRadius:{type:"number"}},supports:{align:["left","center","right"]},save({attributes:e}){const{content:r,url:t,target:o,modifier:s,backgroundColor:n,textColor:a}=e;return(0,l.jsx)("div",{className:"u-clearfix smb-btn-wrapper",children:(0,l.jsx)("a",{className:d()("smb-btn",{[`smb-btn--${s}`]:!!s}),href:t,style:{backgroundColor:n},target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:a},children:(0,l.jsx)(c.RichText.Content,{value:r})})})})}},{attributes:{...h,url:{type:"string",default:""},target:{type:"string",default:"_self"},borderRadius:{type:"number"}},supports:{align:["left","center","right"]},save({attributes:e}){const{content:r,url:t,target:o,modifier:s,backgroundColor:n,textColor:a}=e;return(0,l.jsx)("div",{className:"u-clearfix smb-btn-wrapper",children:(0,l.jsx)("a",{className:d()("smb-btn",{[`smb-btn--${s}`]:!!s}),href:t,target:o,style:{backgroundColor:n},children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:a},children:(0,l.jsx)(c.RichText.Content,{value:r})})})})}}];(0,o.registerBlockType)(n.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:r,className:t,isSelected:o,clientId:a}){const{content:i,url:p,target:h,modifier:x,borderRadius:_,backgroundColor:k,backgroundGradientColor:w,textColor:y,wrap:C}=e,j=(0,c.__experimentalGetSpacingClassesAndStyles)(e),[N,R]=(0,m.useState)(!1),S=!!p,$="_blank"===h,[B,T]=(0,m.useState)(null);(0,m.useEffect)((()=>{e.className&&r({className:e.className.replace("u-clearfix","")})}),[]);const P=d()("smb-btn-wrapper",t,{[`smb-btn-wrapper--${x}`]:!!x}),A=d()("smb-btn",{[`smb-btn--${x}`]:!!x,"smb-btn--wrap":C}),G={"--smb-btn--background-color":k||void 0,"--smb-btn--background-image":w||void 0,"--smb-btn--border-radius":v(_),"--smb-btn--color":y||void 0,...j.style};e.className&&e.className.split(" ").includes("is-style-ghost")&&(G["--smb-btn--style--ghost--border-color"]=k||void 0);const H=(0,m.useRef)(),I=(0,m.useRef)(),O=(0,c.useBlockProps)({className:P,ref:(0,u.useMergeRefs)([T,H])}),V=(0,u.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},D=()=>{r({url:void 0,target:void 0}),R(!1)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.InspectorControls,{children:(0,l.jsxs)(b.__experimentalToolsPanel,{label:(0,s.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:V,children:[(0,l.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>x!==n.uK.modifier.default,isShownByDefault:!0,label:(0,s.__)("Button size","snow-monkey-blocks"),onDeselect:()=>r({modifier:n.uK.modifier.default}),children:(0,l.jsx)(b.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Button size","snow-monkey-blocks"),value:x,onChange:e=>r({modifier:e}),options:[{value:"",label:(0,s.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,s.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,s.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,s.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,s.__)("Full size","snow-monkey-blocks")}]})}),(0,l.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>C!==n.uK.wrap.default,isShownByDefault:!0,label:(0,s.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>r({wrap:n.uK.wrap.default}),children:(0,l.jsx)(b.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Wrap","snow-monkey-blocks"),checked:C,onChange:e=>r({wrap:e})})})]})}),(0,l.jsx)(c.InspectorControls,{group:"color",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:a,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:k,onColorChange:e=>r({backgroundColor:e}),gradientValue:w,onGradientChange:e=>r({backgroundGradientColor:e}),resetAllFilter:()=>({backgroundColor:n.uK.backgroundColor?.default,backgroundGradientColor:n.uK.backgroundGradientColor?.default}),label:(0,s.__)("Background color","snow-monkey-blocks")},{colorValue:y,onColorChange:e=>r({textColor:e}),resetAllFilter:()=>({textColor:n.uK.textColor?.default}),label:(0,s.__)("Text color","snow-monkey-blocks")}]})}),(0,l.jsx)(c.InspectorControls,{group:"border",children:(0,l.jsx)(b.__experimentalToolsPanelItem,{hasValue:()=>_!==n.uK.borderRadius.default,isShownByDefault:!0,label:(0,s.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>r({borderRadius:n.uK.borderRadius.default}),panelId:a,children:(0,l.jsx)("div",{className:"smb-border-radius-control",children:(0,l.jsx)(c.__experimentalBorderRadiusControl,{values:_,onChange:e=>{r({borderRadius:e})}})})})}),(0,l.jsx)("div",{...O,children:(0,l.jsx)("span",{className:A,href:p,style:G,target:"_self"===h?void 0:h,rel:"_self"===h?void 0:"noopener noreferrer",children:(0,l.jsx)(c.RichText,{className:"smb-btn__label",value:i,placeholder:(0,s.__)("Button","snow-monkey-blocks"),onChange:e=>r({content:e}),withoutInteractiveFormatting:!0,ref:I})})}),(0,l.jsxs)(c.BlockControls,{group:"block",children:[!S&&(0,l.jsx)(b.ToolbarButton,{name:"link",icon:g,title:(0,s.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),R(!0)}}),S&&(0,l.jsx)(b.ToolbarButton,{name:"link",icon:f,title:(0,s.__)("Unlink","snow-monkey-blocks"),onClick:D,isActive:!0})]}),o&&(N||S)&&(0,l.jsx)(b.Popover,{placement:"bottom",anchor:B,onClose:()=>{R(!1),I.current?.focus()},children:(0,l.jsx)(c.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:p,opensInNewTab:$},onChange:({url:e,opensInNewTab:t})=>{r({url:e,target:t?"_blank":"_self"})},onRemove:()=>{D(),I.current?.focus()},forceIsEditingLink:N})})]})},save:function({attributes:e,className:r}){const{content:t,url:o,target:s,modifier:n,borderRadius:a,backgroundColor:i,backgroundGradientColor:b,textColor:u,wrap:m}=e,p=(0,c.__experimentalGetSpacingClassesAndStyles)(e),g=d()("smb-btn-wrapper",r,{[`smb-btn-wrapper--${n}`]:!!n}),f=d()("smb-btn",{[`smb-btn--${n}`]:!!n,"smb-btn--wrap":m}),h={"--smb-btn--background-color":i||void 0,"--smb-btn--background-image":b||void 0,"--smb-btn--border-radius":v(a),"--smb-btn--color":u||void 0,...p.style};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(h["--smb-btn--style--ghost--border-color"]=i||void 0),(0,l.jsx)("div",{...c.useBlockProps.save({className:g}),children:(0,l.jsx)("a",{className:f,href:o||void 0,style:h,target:"_self"===s?void 0:s,rel:"_self"===s?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(c.RichText.Content,{value:t})})})})},styles:[{name:"default",label:(0,s.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"ghost",label:(0,s.__)("Ghost","snow-monkey-blocks")},{name:"text",label:(0,s.__)("Text","snow-monkey-blocks")}],deprecated:_})},6942:(e,r)=>{var t;!function(){"use strict";var o={}.hasOwnProperty;function s(){for(var e="",r=0;r<arguments.length;r++){var t=arguments[r];t&&(e=l(e,n(t)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var t in e)o.call(e,t)&&e[t]&&(r=l(r,t));return r}function l(e,r){return r?e?e+" "+r:e+r:e}e.exports?(s.default=s,e.exports=s):void 0===(t=function(){return s}.apply(r,[]))||(e.exports=t)}()}},t={};function o(e){var s=t[e];if(void 0!==s)return s.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.m=r,e=[],o.O=(r,t,s,n)=>{if(!t){var l=1/0;for(b=0;b<e.length;b++){for(var[t,s,n]=e[b],a=!0,i=0;i<t.length;i++)(!1&n||l>=n)&&Object.keys(o.O).every((e=>o.O[e](t[i])))?t.splice(i--,1):(a=!1,n<l&&(l=n));if(a){e.splice(b--,1);var d=s();void 0!==d&&(r=d)}}return r}n=n||0;for(var b=e.length;b>0&&e[b-1][2]>n;b--)e[b]=e[b-1];e[b]=[t,s,n]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={5660:0,6900:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var s,n,[l,a,i]=t,d=0;if(l.some((r=>0!==e[r]))){for(s in a)o.o(a,s)&&(o.m[s]=a[s]);if(i)var b=i(o)}for(r&&r(t);d<l.length;d++)n=l[d],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(b)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var s=o.O(void 0,[6900],(()=>o(1767)));s=o.O(s)})(); -
snow-monkey-blocks/trunk/dist/blocks/custom-field/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => ' c5ef076917999b35562e');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => 'df0ad3484fff19534f78'); -
snow-monkey-blocks/trunk/dist/blocks/custom-field/index.js
r3390754 r3400189 1 (()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var l in n)e.o(n,l)&&!e.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:n[l]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,n=window. ReactJSXRuntime,l=window.wp.primitives;var s=(0,n.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(l.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})});const t=JSON.parse('{"UU":"snow-monkey-blocks/custom-field","uK":{"U":{"A":""}}}'),a=window.wp.components,r=window.wp.blockEditor,i=window.wp.i18n,c=window.wp.serverSideRender;var d=e.n(c);window.lodash;const w=window.wp.compose;(0,o.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:s},edit:function({attributes:e,setAttributes:o}){const{name:l}=e,s=(0,w.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.InspectorControls,{children:(0,n.jsx)(a.__experimentalToolsPanel,{label:(0,i.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:s,children:(0,n.jsx)(a.__experimentalToolsPanelItem,{hasValue:()=>l!==t.uK.U.A,isShownByDefault:!0,label:(0,i.__)("Custom field name","snow-monkey-blocks"),onDeselect:()=>o({name:t.uK.U.A}),children:(0,n.jsx)(a.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Custom field name","snow-monkey-blocks"),value:l,onChange:e=>o({name:e})})})})}),(0,n.jsx)("div",{...(0,r.useBlockProps)(),children:l?(0,n.jsx)(a.Disabled,{children:(0,n.jsx)(d(),{block:"snow-monkey-blocks/custom-field",attributes:e})}):(0,n.jsx)(a.Placeholder,{instructions:(0,i.__)("Specify a custom field name.","snow-monkey-blocks")})})]})},save:function(){return null}})})();1 (()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var l in n)e.o(n,l)&&!e.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:n[l]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,n=window.wp.primitives,l=window.ReactJSXRuntime;var s=(0,l.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(n.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})});const t=JSON.parse('{"UU":"snow-monkey-blocks/custom-field","uK":{"U":{"A":""}}}'),a=window.wp.components,r=window.wp.blockEditor,i=window.wp.i18n,c=window.wp.serverSideRender;var d=e.n(c);window.lodash;const w=window.wp.compose;(0,o.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:s},edit:function({attributes:e,setAttributes:o}){const{name:n}=e,s=(0,w.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.InspectorControls,{children:(0,l.jsx)(a.__experimentalToolsPanel,{label:(0,i.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:s,children:(0,l.jsx)(a.__experimentalToolsPanelItem,{hasValue:()=>n!==t.uK.U.A,isShownByDefault:!0,label:(0,i.__)("Custom field name","snow-monkey-blocks"),onDeselect:()=>o({name:t.uK.U.A}),children:(0,l.jsx)(a.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Custom field name","snow-monkey-blocks"),value:n,onChange:e=>o({name:e})})})})}),(0,l.jsx)("div",{...(0,r.useBlockProps)(),children:n?(0,l.jsx)(a.Disabled,{children:(0,l.jsx)(d(),{block:"snow-monkey-blocks/custom-field",attributes:e})}):(0,l.jsx)(a.Placeholder,{instructions:(0,i.__)("Specify a custom field name.","snow-monkey-blocks")})})]})},save:function(){return null}})})(); -
snow-monkey-blocks/trunk/dist/blocks/hero-header/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' 4c2de23110dbe89599ce');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '91978dca967bbc738a96'); -
snow-monkey-blocks/trunk/dist/blocks/hero-header/index.js
r3390754 r3400189 1 (()=>{var e,t={8508:(e,t,o)=>{"use strict";const i=window.wp.blocks,r=JSON.parse('{"UU":"snow-monkey-blocks/hero-header","uK":{"mediaId":{"type":"number","default":0},"mediaUrl":{"type":"string","source":"attribute","selector":".smb-hero-header__figure img, .smb-hero-header__figure video","attribute":"src","default":""},"mediaAlt":{"type":"string","source":"attribute","selector":".smb-hero-header__figure img","attribute":"alt","default":""},"mediaWidth":{"type":"string","source":"attribute","selector":".smb-hero-header__figure img, .smb-hero-header__figure video","attribute":"width","default":""},"mediaHeight":{"type":"string","source":"attribute","selector":".smb-hero-header__figure img, .smb-hero-header__figure video","attribute":"height","default":""},"mediaSizeSlug":{"type":"string","default":"full"},"mediaType":{"type":"string"},"focalPoint":{"type":"object"},"columns":{"type":"string","default":"12"},"rows":{"type":"string","default":"12"},"maxWidth":{"type":"string","default":""},"figureGridColumnStart":{"type":"string","default":"1"},"figureGridColumnEnd":{"type":"string","default":"-1"},"figureGridRowStart":{"type":"string","default":"1"},"figureGridRowEnd":{"type":"string","default":"-1"},"fit":{"type":"boolean","default":false},"figureAspectRatio":{"type":"string","default":"16 / 9"},"maskColor":{"type":"string"},"maskGradientColor":{"type":"string"},"maskOpacity":{"type":"number","default":1},"bodyAlignSelf":{"type":"string","default":"auto"},"bodyJustifySelf":{"type":"string","default":"auto"},"bodyGridColumnStart":{"type":"string","default":"1"},"bodyGridColumnEnd":{"type":"string","default":"-1"},"bodyGridRowStart":{"type":"string","default":"1"},"bodyGridRowEnd":{"type":"string","default":"-1"},"bodyMaxWidth":{"type":"string","default":""},"bodyPadding":{"type":"object","default":{}},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}}}'),n=window.ReactJSXRuntime,s=(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,n.jsx)("rect",{x:".13",y:"3.62",width:"13.37",height:".78"}),(0,n.jsx)("path",{d:"m23.23,6.31h-10.6v.83c0,.13-.02.24-.06.35h9.86c.22,0,.39.18.39.39v6.65l-3.33-2.57c-.1-.07-.25-.07-.34,0l-3.76,2.87c-.08.06-.21.07-.31.02l-2.99-1.52c-.09-.04-.2-.04-.28,0l-3.92,2.26v-4.81h-1.18v8.93c0,.44.35.79.79.79h15.73c.44,0,.79-.35.79-.79V7.1c0-.44-.35-.79-.79-.79Zm-.41,12.63c0,.22-.18.39-.39.39h-.01s-14.15-.01-14.15-.01c-.22,0-.39-.18-.39-.39v-2.14l3.91-2.26c.09-.05.2-.05.29,0l2.99,1.51c.1.05.22.04.31-.02l3.76-2.86c.1-.08.25-.08.35,0l3.33,2.57v3.21Z"}),(0,n.jsx)("path",{d:"m13.5,3.62v.78H.13v-.78h13.37m0-.13H.13c-.07,0-.13.06-.13.13v.78c0,.07.06.13.13.13h13.37c.07,0,.13-.06.13-.13v-.78c0-.07-.06-.13-.13-.13h0Z"}),(0,n.jsx)("rect",{y:"6.23",width:"11.72",height:"1.04",rx:".13",ry:".13"}),(0,n.jsx)("rect",{y:"8.97",width:"11.72",height:"1.04",rx:".13",ry:".13"})]});var a=o(6942),l=o.n(a);const d=window.lodash,m=window.wp.blockEditor,u=window.wp.components,c=window.wp.primitives;var h=(0,n.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(c.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),g=(0,n.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(c.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),p=(0,n.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(c.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});const b=window.wp.data,x=window.wp.element,y=window.wp.i18n,f=window.wp.compose,w=(e,t=0,o=null)=>(e=Number(e),(isNaN(e)||e<t)&&(e=t),null!==o&&e>o&&(e=o),e),_=e=>e.media_type?"image"===e.media_type?"image":"video":e.type,k=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function v(e=""){return!!e&&k.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e))}const A=({id:e,src:t,allowedTypes:o,accept:i,onSelect:r,onSelectURL:s,onRemove:a})=>(0,n.jsxs)(m.BlockControls,{group:"inline",children:[(0,n.jsx)(m.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:o,accept:i,onSelect:r,onSelectURL:s}),!!t&&!!a&&(0,n.jsx)(u.ToolbarButton,{onClick:a,children:(0,y.__)("Release","snow-monkey-blocks")})]}),j=({src:e,alt:t,id:o,style:i,width:r,height:s})=>(0,n.jsx)("img",{src:e,alt:t,className:`wp-image-${o}`,style:i,width:r,height:s}),S=({src:e,style:t,width:o,height:i})=>(0,n.jsx)("video",{src:e,style:t,width:o,height:i}),D=(0,x.memo)((({id:e,src:t,alt:o,url:i,width:r,height:s,target:a,allowedTypes:l,accept:m,onSelect:u,onSelectURL:c,onRemove:h,mediaType:g,style:p,rel:b,linkClass:x})=>{let y;if("image"===g){let l;y=(0,n.jsx)(j,{src:t,alt:o,id:e,style:p,width:r,height:s}),l=b?(0,d.isEmpty)(b)?void 0:b:"_self"!==a&&a?"noopener noreferrer":void 0,i&&(y=(0,n.jsx)("span",{href:i,target:"_self"===a?void 0:a,rel:l,className:x,children:y}))}else"video"===g&&(y=(0,n.jsx)(S,{src:t,style:p,width:r,height:s}));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A,{id:e,src:t,allowedTypes:l,accept:m,onSelect:u,onSelectURL:c,onRemove:h}),y]})}),((e,t)=>{const o=Object.keys(e);for(const i of o)if(e[i]!==t[i])return!1;return!0}));function G(e){const{src:t,onSelect:o,onSelectURL:i,mediaType:r,allowedTypes:s=["image"]}=e,a=!r&&t?"image":r;let l=(0,y.__)("Media","snow-monkey-blocks");1===s.length&&("image"===s[0]?l=(0,y.__)("Image","snow-monkey-blocks"):"video"===s[0]&&(l=(0,y.__)("Video","snow-monkey-blocks")));const d=(0,x.useMemo)((()=>s.map((e=>`${e}/*`)).join(",")),[s]);return t?(0,n.jsx)(D,{...e,accept:d,allowedTypes:s,mediaType:a}):(0,n.jsx)(m.MediaPlaceholder,{icon:"format-image",labels:{title:l},onSelect:o,onSelectURL:i,accept:d,allowedTypes:s})}const C=[{label:(0,y._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,y._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,y._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,y._x)("Full Size","Image size option for resolution control"),value:"full"}];function B({panelId:e,value:t,onChange:o,options:i=C,defaultValue:r=C[0].value,isShownByDefault:s=!0,withToolsPanelItem:a=!0}){const l=null!=t?t:r,d=()=>(0,n.jsx)(u.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Resolution"),value:l,options:i,onChange:o,help:(0,y.__)("Select the size of the source image."),size:"__unstable-large"});return a?(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>l!==r,label:(0,y.__)("Resolution"),onDeselect:()=>o(r),isShownByDefault:s,panelId:e,children:(0,n.jsx)(d,{})}):(0,n.jsx)(d,{})}const R=["image","video"],P="full",N=[{value:"start",icon:h,label:(0,y.__)("Justify items left","snow-monkey-blocks")},{value:"center",icon:g,label:(0,y.__)("Justify items center","snow-monkey-blocks")},{value:"end",icon:p,label:(0,y.__)("Justify items right","snow-monkey-blocks")}],W=[{value:"start",icon:h,label:(0,y.__)("Justify items top","snow-monkey-blocks")},{value:"center",icon:g,label:(0,y.__)("Justify items center","snow-monkey-blocks")},{value:"end",icon:p,label:(0,y.__)("Justify items bottom","snow-monkey-blocks")}],T="var:";function U(e){return(0,d.startsWith)(e,T)?`var(--wp--${e.slice(4).split("|").join("--")})`:e}function I(e,t){if(null!=e&&0!==(e=Number(e))&&!(-1*t>e||t<e))return String(e)}function K({name:e,onSelect:t}){const{blockType:o,variations:r}=(0,b.useSelect)((t=>{const{getBlockVariations:o,getBlockType:r}=t(i.store);return{blockType:r(e),variations:o(e,"block")}}),[e]);return(0,n.jsx)(m.__experimentalBlockVariationPicker,{icon:(0,d.get)(o,["icon","src"]),label:(0,d.get)(o,["title"]),variations:r,onSelect:t,allowSkip:!1})}const M="var:";function z(e){return(0,d.startsWith)(e,M)?`var(--wp--${e.slice(4).split("|").join("--")})`:e}function E(e,t){if(null!=e&&0!==(e=Number(e))&&!(-1*t>e||t<e))return String(e)}const q={attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnStart:"2",figureGridRowStart:"2",bodyAlignSelf:"start",bodyJustifySelf:"start",bodyGridColumnEnd:"-2",bodyGridRowEnd:"-2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},V=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"7",y:"17",width:"38",height:"22",fill:"#DDDDDD"}),(0,n.jsx)("line",{x1:"3",y1:"10",x2:"25",y2:"10",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"14",x2:"21",y2:"14",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"18",x2:"19",y2:"18",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"22",x2:"23",y2:"22",stroke:"#AAAAAA",strokeWidth:"2"})]}),O=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"3",y:"17",width:"38",height:"22",fill:"#DDDDDD"}),(0,n.jsx)("line",{x1:"23",y1:"10",x2:"45",y2:"10",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"14",x2:"41",y2:"14",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"18",x2:"39",y2:"18",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"22",x2:"43",y2:"22",stroke:"#AAAAAA",strokeWidth:"2"})]}),H=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"7",y:"9",width:"38",height:"22",fill:"#DDDDDD"}),(0,n.jsx)("line",{x1:"3",y1:"26",x2:"25",y2:"26",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"30",x2:"21",y2:"30",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"34",x2:"19",y2:"34",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"38",x2:"23",y2:"38",stroke:"#AAAAAA",strokeWidth:"2"})]}),L=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"3",y:"9",width:"38",height:"22",fill:"#DDDDDD"}),(0,n.jsx)("line",{x1:"23",y1:"26",x2:"45",y2:"26",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"30",x2:"41",y2:"30",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"34",x2:"39",y2:"34",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"38",x2:"43",y2:"38",stroke:"#AAAAAA",strokeWidth:"2"})]}),J=(0,n.jsxs)("svg",{width:"48",height:"30",viewBox:"0 0 48 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 30)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 3 15)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 3 11)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 3 7)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 3 3)",stroke:"#AAAAAA",strokeWidth:"2"})]}),$=(0,n.jsxs)("svg",{width:"48",height:"30",viewBox:"0 0 48 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 30)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 23 15)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 23 11)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 23 7)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 23 3)",stroke:"#AAAAAA",strokeWidth:"2"})]}),F=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 39)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 3 34)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 3 30)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 3 26)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 3 22)",stroke:"#AAAAAA",strokeWidth:"2"})]}),Z=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 39)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 23 34)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 23 30)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 23 26)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 23 22)",stroke:"#AAAAAA",strokeWidth:"2"})]}),X=(0,n.jsxs)("svg",{width:"48",height:"30",viewBox:"0 0 48 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 30)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 13 20)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 13 16)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 13 12)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 13 8)",stroke:"#AAAAAA",strokeWidth:"2"})]}),Q=[{name:"default",isDefault:!0,title:(0,y.__)("Default","snow-monkey-blocks"),scope:["block"],icon:()=>(0,n.jsx)("div",{style:{color:"#aaa",width:"48px",height:"48px",padding:"4px"},children:s}),attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`}},{name:"left-top-out",title:(0,y.__)("Left / Top / Out","snow-monkey-blocks"),scope:["block"],icon:V,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnStart:"2",figureGridRowStart:"2",bodyAlignSelf:"start",bodyJustifySelf:"start",bodyGridColumnEnd:"-2",bodyGridRowEnd:"-2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"right-top-out",title:(0,y.__)("Right / Top / Out","snow-monkey-blocks"),scope:["block"],icon:O,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnEnd:"-2",figureGridRowStart:"2",bodyAlignSelf:"start",bodyJustifySelf:"end",bodyGridColumnStart:"2",bodyGridRowEnd:"-2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"left-bottom-out",title:(0,y.__)("Left / Bottom / Out","snow-monkey-blocks"),scope:["block"],icon:H,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnStart:"2",figureGridRowEnd:"-2",figureGridRowStart:"2",bodyAlignSelf:"end",bodyJustifySelf:"start",bodyGridColumnEnd:"-2",bodyGridRowStart:"2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"right-bottom-out",title:(0,y.__)("Right / Bottom / Out","snow-monkey-blocks"),scope:["block"],icon:L,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnEnd:"-2",figureGridRowEnd:"-2",bodyAlignSelf:"end",bodyJustifySelf:"end",bodyGridColumnStart:"2",bodyGridRowStart:"2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"left-top-in",title:(0,y.__)("Left / Top / In","snow-monkey-blocks"),scope:["block"],icon:J,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"start",bodyJustifySelf:"start",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"wide"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"right-top-in",title:(0,y.__)("Right / Top / In","snow-monkey-blocks"),scope:["block"],icon:$,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"start",bodyJustifySelf:"end",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"wide"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"left-bottom-in",title:(0,y.__)("Left / Bottom / In","snow-monkey-blocks"),scope:["block"],icon:F,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"end",bodyJustifySelf:"start",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"wide"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"right-bottom-in",title:(0,y.__)("Right / Bottom / In","snow-monkey-blocks"),scope:["block"],icon:Z,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"end",bodyJustifySelf:"end",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"wide"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"center",title:(0,y.__)("Center","snow-monkey-blocks"),scope:["block"],icon:X,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"center",bodyJustifySelf:"center",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"full"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]}];(0,i.registerBlockType)(r.UU,{icon:{foreground:"#cd162c",src:s},edit:function({name:e,attributes:t,setAttributes:o,className:s,clientId:a}){const{mediaId:d,mediaUrl:c,mediaAlt:h,mediaWidth:g,mediaHeight:p,mediaSizeSlug:k,mediaType:A,focalPoint:j,columns:S,rows:D,maxWidth:C,fit:T,figureGridColumnStart:M,figureGridColumnEnd:z,figureGridRowStart:E,figureGridRowEnd:q,figureAspectRatio:V,maskColor:O,maskGradientColor:H,maskOpacity:L,bodyAlignSelf:J,bodyJustifySelf:$,bodyGridColumnStart:F,bodyGridColumnEnd:Z,bodyGridRowStart:X,bodyGridRowEnd:Q,bodyMaxWidth:Y,bodyPadding:ee,style:te,templateLock:oe}=t,ie=(0,b.useSelect)((e=>!!e("core/block-editor").getBlock(a)?.innerBlocks?.length),[a]),{replaceInnerBlocks:re}=(0,b.useDispatch)(m.store),ne={};Object.values(r.uK||[]).forEach(((e,t)=>{ne[Object.keys(r.uK)[t]]=e.default}));const[se,ae]=(0,x.useState)(!ie&&!c);(0,x.useEffect)((()=>{ae(!ie&&!c)}),[c,ie]);const le=(0,b.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),de=(0,b.useSelect)((e=>d?e("core").get Media(d,{context:"view"}):null),[d]),me=(0,m.__experimentalUseMultipleOriginColorsAndGradients)(),ue=(0,f.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},ce=l()("smb-hero-header",s,{"smb-hero-header--fit":T}),he={"--smb-hero-header--columns":String(S)||void 0,"--smb-hero-header--rows":String(D)||void 0,"--smb-hero-header--max-gap":te?.spacing?.blockGap||void 0,"--smb-hero-header--object-position-x":j?.x?100*j?.x+"%":void 0,"--smb-hero-header--object-position-y":j?.y?100*j?.y+"%":void 0,"--smb-hero-header--max-width":C||void 0,"--smb-hero-header--figure-grid-column-start":!T&&I(M,S+1)||void 0,"--smb-hero-header--figure-grid-column-end":!T&&I(z,S+1)||void 0,"--smb-hero-header--figure-grid-row-start":!T&&I(E,D+1)||void 0,"--smb-hero-header--figure-grid-row-end":!T&&I(q,D+1)||void 0,"--smb-hero-header--figure-aspect-ratio":!T&&V||void 0,"--smb-hero-header--mask-color":O||void 0,"--smb-hero-header--mask-image":H||void 0,"--smb-hero-header--mask-opacity":O||H?L:void 0,"--smb-hero-header--body-align-self":J||void 0,"--smb-hero-header--body-justify-self":$||void 0,"--smb-hero-header--body-grid-column-start":I(F,S+1)||void 0,"--smb-hero-header--body-grid-column-end":I(Z,S+1)||void 0,"--smb-hero-header--body-grid-row-start":I(X,D+1)||void 0,"--smb-hero-header--body-grid-row-end":I(Q,D+1)||void 0,"--smb-hero-header--body-max-width":Y||void 0,"--smb-hero-header--body-padding-top":U(ee?.top)||void 0,"--smb-hero-header--body-padding-right":U(ee?.right)||void 0,"--smb-hero-header--body-padding-bottom":U(ee?.bottom)||void 0,"--smb-hero-header--body-padding-left":U(ee?.left)||void 0},ge=(0,m.useBlockProps)(),pe=(0,m.useBlockProps)({className:ce,style:he}),be=(0,m.useInnerBlocksProps)({className:"smb-hero-header__body"},{templateLock:oe,renderAppender:ie?void 0:m.InnerBlocks.ButtonBlockAppender});if(se)return(0,n.jsx)("div",{...ge,children:(0,n.jsx)(K,{name:e,onSelect:e=>{ae(!1),e?.attributes&&o(e.attributes),e?.innerBlocks&&re(a,(0,i.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)}})});const xe=le.filter((({slug:e})=>de?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),ye="video"===A,fe="image"===A||void 0===A;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.InspectorControls,{group:"dimensions",children:(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>C!==r.uK.maxWidth.default,isShownByDefault:!!C,label:(0,y.__)("Maximum width","snow-monkey-blocks"),onDeselect:()=>o({maxWidth:r.uK.maxWidth.default}),panelId:a,children:(0,n.jsx)(u.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,y.__)("Maximum width","snow-monkey-blocks"),value:C,onChange:e=>o({maxWidth:e})})})}),(0,n.jsxs)(m.InspectorControls,{children:[(0,n.jsxs)(u.__experimentalToolsPanel,{label:(0,y.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>S!==r.uK.columns.default,isShownByDefault:!0,label:(0,y.__)("Number of columns in grid","snow-monkey-blocks"),onDeselect:()=>o({columns:r.uK.columns.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Number of columns in grid","snow-monkey-blocks"),value:Number(S),onChange:e=>o({columns:String(e)}),min:1,max:24,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>D!==r.uK.rows.default,isShownByDefault:!0,label:(0,y.__)("Number of rows in grid","snow-monkey-blocks"),onDeselect:()=>o({rows:r.uK.rows.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Number of rows in grid","snow-monkey-blocks"),value:Number(D),onChange:e=>o({rows:String(e)}),min:1,max:24,step:1})})]}),(0,n.jsxs)(u.__experimentalToolsPanel,{label:(0,y.__)("Background image","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>c!==r.uK.mediaUrl.default,isShownByDefault:!0,label:(0,y.__)("Image","snow-monkey-blocks"),onDeselect:()=>o({mediaId:r.uK.mediaId.default,mediaUrl:r.uK.mediaUrl.default,mediaAlt:r.uK.mediaAlt.default,mediaWidth:r.uK.mediaWidth.default,mediaHeight:r.uK.mediaHeight.default,mediaSizeSlug:r.uK.mediaSizeSlug.default,mediaType:r.uK.mediaType.default}),children:(0,n.jsx)("div",{className:"smb-image-size-control",children:(0,n.jsx)(G,{src:c,id:d,alt:h,width:g,height:p,onSelect:e=>{const t=e?.sizes?.[k]?k:P,i=e?.sizes?.[t]?.url,r=e?.sizes?.[t]?.width,n=e?.sizes?.[t]?.height;o({mediaType:_(e),mediaId:e.id,mediaUrl:i||e.url,mediaAlt:e.alt,mediaWidth:r||e.width,mediaHeight:n||e.height,mediaSizeSlug:t})},onSelectURL:e=>{e!==c&&o({mediaUrl:e,mediaId:0,mediaSizeSlug:P,mediaType:_({media_type:v(e)?"video":"image"})})},onRemove:()=>{o({mediaUrl:r.uK.mediaUrl.default,mediaAlt:r.uK.mediaAlt.default,mediaWidth:r.uK.mediaWidth.default,mediaHeight:r.uK.mediaHeight.default,mediaId:r.uK.mediaId.default,mediaType:r.uK.mediaType.default})},mediaType:A,allowedTypes:R})})}),0<xe.length&&(0,n.jsx)(B,{defaultValue:r.uK.mediaSizeSlug.default,value:k,options:xe,onChange:e=>{const t=de?.media_details?.sizes?.[e]?.source_url,i=de?.media_details?.sizes?.[e]?.width,r=de?.media_details?.sizes?.[e]?.height;o({mediaUrl:t,mediaWidth:i,mediaHeight:r,mediaSizeSlug:e})}}),!!c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>j!==r.uK.focalPoint.default,isShownByDefault:!0,label:(0,y.__)("Focal point picker","snow-monkey-blocks"),onDeselect:()=>o({focalPoint:r.uK.focalPoint.default}),children:(0,n.jsx)(u.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,y.__)("Focal point picker","snow-monkey-blocks"),url:c,value:j,onChange:e=>{o({focalPoint:e})},onDrag:e=>o({focalPoint:e})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>T!==r.uK.fit.default,isShownByDefault:!0,label:(0,y.__)("Fit to the contents","snow-monkey-blocks"),onDeselect:()=>o({fit:r.uK.fit.default}),children:(0,n.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,y.__)("Fit to the contents","snow-monkey-blocks"),checked:T,onChange:e=>o({fit:e})})}),!T&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>V!==r.uK.figureAspectRatio.default,isShownByDefault:!0,label:(0,y.__)("Aspect ratio","snow-monkey-blocks"),onDeselect:()=>o({figureAspectRatio:r.uK.figureAspectRatio.default}),children:(0,n.jsx)(u.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Aspect ratio","snow-monkey-blocks"),help:(0,y.__)("e.g. 16 / 9","snow-monkey-blocks"),value:V,onChange:e=>o({figureAspectRatio:e})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>M!==r.uK.figureGridColumnStart.default,isShownByDefault:!0,label:(0,y.__)("Grid column: start","snow-monkey-blocks"),onDeselect:()=>o({figureGridColumnStart:r.uK.figureGridColumnStart.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid column: start","snow-monkey-blocks"),value:Number(M),onChange:e=>o({figureGridColumnStart:String(e)}),min:1,max:Number(S)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>z!==r.uK.figureGridColumnEnd.default,isShownByDefault:!0,label:(0,y.__)("Grid column: end","snow-monkey-blocks"),onDeselect:()=>o({figureGridColumnEnd:r.uK.figureGridColumnEnd.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid column: end","snow-monkey-blocks"),value:Number(z),onChange:e=>o({figureGridColumnEnd:String(e)}),min:-1*Number(S)-1,max:Number(S)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>E!==r.uK.figureGridRowStart.default,isShownByDefault:!0,label:(0,y.__)("Grid row: start","snow-monkey-blocks"),onDeselect:()=>o({figureGridRowStart:r.uK.figureGridRowStart.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid row: start","snow-monkey-blocks"),value:Number(E),onChange:e=>o({figureGridRowStart:String(e)}),min:1,max:Number(D)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>q!==r.uK.figureGridRowEnd.default,isShownByDefault:!0,label:(0,y.__)("Grid row: end","snow-monkey-blocks"),onDeselect:()=>o({figureGridRowEnd:r.uK.figureGridRowEnd.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid row: end","snow-monkey-blocks"),value:Number(q),onChange:e=>o({figureGridRowEnd:String(e)}),min:-1*Number(D)-1,max:Number(D)+1,step:1})})]})]})]}),(0,n.jsxs)(u.__experimentalToolsPanel,{label:(0,y.__)("Overlay","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,n.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,n.jsx)(m.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,y.__)("Color","snow-monkey-blocks"),colorValue:O,gradientValue:H,onColorChange:e=>o({maskColor:e}),onGradientChange:e=>o({maskGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...me})}),(!!O||!!H)&&(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>L!==r.uK.maskOpacity.default,isShownByDefault:!0,label:(0,y.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>o({maskOpacity:r.uK.maskOpacity.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Opacity","snow-monkey-blocks"),value:Number((1-L).toFixed(1)),onChange:e=>o({maskOpacity:w((1-e).toFixed(1),0,1)}),min:0,max:1,step:.1})})]}),(0,n.jsxs)(u.__experimentalToolsPanel,{label:(0,y.__)("Contents","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>Y!==r.uK.bodyMaxWidth.default,isShownByDefault:!0,label:(0,y.__)("Maximum width","snow-monkey-blocks"),onDeselect:()=>o({bodyMaxWidth:r.uK.bodyMaxWidth.default}),children:(0,n.jsx)(u.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,y.__)("Maximum width","snow-monkey-blocks"),value:Y,onChange:e=>o({bodyMaxWidth:e})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{className:"tools-panel-item-spacing",hasValue:()=>JSON.stringify(ee)!==JSON.stringify(r.uK.bodyPadding.default),isShownByDefault:!0,label:(0,y.__)("Padding","snow-monkey-blocks"),onDeselect:()=>o({bodyPadding:{...r.uK.bodyPadding.default}}),children:(0,n.jsx)(m.__experimentalSpacingSizesControl,{label:(0,y.__)("Padding","snow-monkey-blocks"),allowReset:!1,values:ee,onChange:e=>o({bodyPadding:e})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>$!==r.uK.bodyJustifySelf.default,isShownByDefault:!0,label:(0,y.__)("Alignment on inline axis","snow-monkey-blocks"),onDeselect:()=>o({bodyJustifySelf:r.uK.bodyJustifySelf.default}),children:(0,n.jsx)(u.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,y.__)("Alignment on inline axis","snow-monkey-blocks"),id:"snow-monkey-blocks/hero-header-backgroun-image-justify-self",children:(0,n.jsx)("div",{children:N.map((({value:e,icon:t,iconLabel:i})=>(0,n.jsx)(u.Button,{label:i,icon:t,isPressed:e===$,onClick:()=>{o({bodyJustifySelf:e!==$?e:void 0})}},e)))})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>J!==r.uK.bodyAlignSelf.default,isShownByDefault:!0,label:(0,y.__)("Alignment on cross axis","snow-monkey-blocks"),onDeselect:()=>o({bodyAlignSelf:r.uK.bodyAlignSelf.default}),children:(0,n.jsx)(u.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,y.__)("Alignment on cross axis","snow-monkey-blocks"),id:"snow-monkey-blocks/hero-header-backgroun-image-align-self",children:(0,n.jsx)("div",{children:W.map((({value:e,icon:t,iconLabel:i})=>(0,n.jsx)(u.Button,{style:{transform:"rotate(90deg)"},label:i,icon:t,isPressed:e===J,onClick:()=>{o({bodyAlignSelf:e!==J?e:void 0})}},e)))})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>F!==r.uK.bodyGridColumnStart.default,isShownByDefault:!0,label:(0,y.__)("Grid column: start","snow-monkey-blocks"),onDeselect:()=>o({bodyGridColumnStart:r.uK.bodyGridColumnStart.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid column: start","snow-monkey-blocks"),value:Number(F),onChange:e=>o({bodyGridColumnStart:String(e)}),min:1,max:Number(S)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>Z!==r.uK.bodyGridColumnEnd.default,isShownByDefault:!0,label:(0,y.__)("Grid column: end","snow-monkey-blocks"),onDeselect:()=>o({bodyGridColumnEnd:r.uK.bodyGridColumnEnd.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid column: end","snow-monkey-blocks"),value:Number(Z),onChange:e=>o({bodyGridColumnEnd:String(e)}),min:-1*Number(S)-1,max:Number(S)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>X!==r.uK.bodyGridRowStart.default,isShownByDefault:!0,label:(0,y.__)("Grid row: start","snow-monkey-blocks"),onDeselect:()=>o({bodyGridRowStart:r.uK.bodyGridRowStart.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid row: start","snow-monkey-blocks"),value:Number(X),onChange:e=>o({bodyGridRowStart:String(e)}),min:1,max:Number(D)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>Q!==r.uK.bodyGridRowEnd.default,isShownByDefault:!0,label:(0,y.__)("Grid row: end","snow-monkey-blocks"),onDeselect:()=>o({bodyGridRowEnd:r.uK.bodyGridRowEnd.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid row: end","snow-monkey-blocks"),value:Number(Q),onChange:e=>o({bodyGridRowEnd:String(e)}),min:-1*Number(D)-1,max:Number(D)+1,step:1})})]})]}),(0,n.jsxs)("div",{...pe,children:[!!c&&(0,n.jsxs)("div",{className:"smb-hero-header__figure",children:[0<Number((1-L).toFixed(1))&&(0,n.jsx)("div",{className:"smb-hero-header__mask"}),fe&&(0,n.jsx)("img",{src:c,alt:h,width:g,height:p,className:`wp-image-${d}`}),ye&&(0,n.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:c,width:g,height:p})]}),(0,n.jsx)("div",{...be})]})]})},save:function({attributes:e,className:t}){const{mediaId:o,mediaUrl:i,mediaAlt:r,mediaWidth:s,mediaHeight:a,mediaType:d,focalPoint:u,columns:c,rows:h,maxWidth:g,fit:p,figureGridColumnStart:b,figureGridColumnEnd:x,figureGridRowStart:y,figureGridRowEnd:f,figureAspectRatio:w,maskColor:_,maskGradientColor:k,maskOpacity:v,bodyAlignSelf:A,bodyJustifySelf:j,bodyGridColumnStart:S,bodyGridColumnEnd:D,bodyGridRowStart:G,bodyGridRowEnd:C,bodyMaxWidth:B,bodyPadding:R,style:P}=e,N="video"===d,W="image"===d||void 0===d,T=l()("smb-hero-header",t,{"smb-hero-header--fit":p}),U={"--smb-hero-header--columns":String(c)||void 0,"--smb-hero-header--rows":String(h)||void 0,"--smb-hero-header--max-gap":P?.spacing?.blockGap||void 0,"--smb-hero-header--object-position-x":u?.x?100*u?.x+"%":void 0,"--smb-hero-header--object-position-y":u?.y?100*u?.y+"%":void 0,"--smb-hero-header--max-width":g||void 0,"--smb-hero-header--figure-grid-column-start":!p&&E(b,c+1)||void 0,"--smb-hero-header--figure-grid-column-end":!p&&E(x,c+1)||void 0,"--smb-hero-header--figure-grid-row-start":!p&&E(y,h+1)||void 0,"--smb-hero-header--figure-grid-row-end":!p&&E(f,h+1)||void 0,"--smb-hero-header--figure-aspect-ratio":!p&&w||void 0,"--smb-hero-header--mask-color":_||void 0,"--smb-hero-header--mask-image":k||void 0,"--smb-hero-header--mask-opacity":_||k?v:void 0,"--smb-hero-header--body-align-self":A||void 0,"--smb-hero-header--body-justify-self":j||void 0,"--smb-hero-header--body-grid-column-start":E(S,c+1)||void 0,"--smb-hero-header--body-grid-column-end":E(D,c+1)||void 0,"--smb-hero-header--body-grid-row-start":E(G,h+1)||void 0,"--smb-hero-header--body-grid-row-end":E(C,h+1)||void 0,"--smb-hero-header--body-max-width":B||void 0,"--smb-hero-header--body-padding-top":z(R?.top)||void 0,"--smb-hero-header--body-padding-right":z(R?.right)||void 0,"--smb-hero-header--body-padding-bottom":z(R?.bottom)||void 0,"--smb-hero-header--body-padding-left":z(R?.left)||void 0},I=m.useBlockProps.save({className:T,style:U}),K=m.useInnerBlocksProps.save({className:"smb-hero-header__body"});return(0,n.jsxs)("div",{...I,children:[!!i&&(0,n.jsxs)("div",{className:"smb-hero-header__figure",children:[0<Number((1-v).toFixed(1))&&(0,n.jsx)("div",{className:"smb-hero-header__mask"}),W&&(0,n.jsx)("img",{src:i,alt:r,width:s,height:a,className:`wp-image-${o}`}),N&&(0,n.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:i,width:s,height:a})]}),(0,n.jsx)("div",{...K})]})},example:q,variations:Q})},6942:(e,t)=>{var o;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=s(e,n(o)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)i.call(e,o)&&e[o]&&(t=s(t,o));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()}},o={};function i(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,i),n.exports}i.m=t,e=[],i.O=(t,o,r,n)=>{if(!o){var s=1/0;for(m=0;m<e.length;m++){for(var[o,r,n]=e[m],a=!0,l=0;l<o.length;l++)(!1&n||s>=n)&&Object.keys(i.O).every((e=>i.O[e](o[l])))?o.splice(l--,1):(a=!1,n<s&&(s=n));if(a){e.splice(m--,1);var d=r();void 0!==d&&(t=d)}}return t}n=n||0;for(var m=e.length;m>0&&e[m-1][2]>n;m--)e[m]=e[m-1];e[m]=[o,r,n]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={5618:0,9590:0};i.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,[s,a,l]=o,d=0;if(s.some((t=>0!==e[t]))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(l)var m=l(i)}for(t&&t(o);d<s.length;d++)n=s[d],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(m)},o=globalThis.webpackChunk=globalThis.webpackChunk||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var r=i.O(void 0,[9590],(()=>i(8508)));r=i.O(r)})();1 (()=>{var e,t={8508:(e,t,o)=>{"use strict";const i=window.wp.blocks,r=JSON.parse('{"UU":"snow-monkey-blocks/hero-header","uK":{"mediaId":{"type":"number","default":0},"mediaUrl":{"type":"string","source":"attribute","selector":".smb-hero-header__figure img, .smb-hero-header__figure video","attribute":"src","default":""},"mediaAlt":{"type":"string","source":"attribute","selector":".smb-hero-header__figure img","attribute":"alt","default":""},"mediaWidth":{"type":"string","source":"attribute","selector":".smb-hero-header__figure img, .smb-hero-header__figure video","attribute":"width","default":""},"mediaHeight":{"type":"string","source":"attribute","selector":".smb-hero-header__figure img, .smb-hero-header__figure video","attribute":"height","default":""},"mediaSizeSlug":{"type":"string","default":"full"},"mediaType":{"type":"string"},"focalPoint":{"type":"object"},"columns":{"type":"string","default":"12"},"rows":{"type":"string","default":"12"},"maxWidth":{"type":"string","default":""},"figureGridColumnStart":{"type":"string","default":"1"},"figureGridColumnEnd":{"type":"string","default":"-1"},"figureGridRowStart":{"type":"string","default":"1"},"figureGridRowEnd":{"type":"string","default":"-1"},"fit":{"type":"boolean","default":false},"figureAspectRatio":{"type":"string","default":"16 / 9"},"maskColor":{"type":"string"},"maskGradientColor":{"type":"string"},"maskOpacity":{"type":"number","default":1},"bodyAlignSelf":{"type":"string","default":"auto"},"bodyJustifySelf":{"type":"string","default":"auto"},"bodyGridColumnStart":{"type":"string","default":"1"},"bodyGridColumnEnd":{"type":"string","default":"-1"},"bodyGridRowStart":{"type":"string","default":"1"},"bodyGridRowEnd":{"type":"string","default":"-1"},"bodyMaxWidth":{"type":"string","default":""},"bodyPadding":{"type":"object","default":{}},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}}}'),n=window.ReactJSXRuntime,s=(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,n.jsx)("rect",{x:".13",y:"3.62",width:"13.37",height:".78"}),(0,n.jsx)("path",{d:"m23.23,6.31h-10.6v.83c0,.13-.02.24-.06.35h9.86c.22,0,.39.18.39.39v6.65l-3.33-2.57c-.1-.07-.25-.07-.34,0l-3.76,2.87c-.08.06-.21.07-.31.02l-2.99-1.52c-.09-.04-.2-.04-.28,0l-3.92,2.26v-4.81h-1.18v8.93c0,.44.35.79.79.79h15.73c.44,0,.79-.35.79-.79V7.1c0-.44-.35-.79-.79-.79Zm-.41,12.63c0,.22-.18.39-.39.39h-.01s-14.15-.01-14.15-.01c-.22,0-.39-.18-.39-.39v-2.14l3.91-2.26c.09-.05.2-.05.29,0l2.99,1.51c.1.05.22.04.31-.02l3.76-2.86c.1-.08.25-.08.35,0l3.33,2.57v3.21Z"}),(0,n.jsx)("path",{d:"m13.5,3.62v.78H.13v-.78h13.37m0-.13H.13c-.07,0-.13.06-.13.13v.78c0,.07.06.13.13.13h13.37c.07,0,.13-.06.13-.13v-.78c0-.07-.06-.13-.13-.13h0Z"}),(0,n.jsx)("rect",{y:"6.23",width:"11.72",height:"1.04",rx:".13",ry:".13"}),(0,n.jsx)("rect",{y:"8.97",width:"11.72",height:"1.04",rx:".13",ry:".13"})]});var a=o(6942),l=o.n(a);const d=window.lodash,m=window.wp.blockEditor,u=window.wp.components,c=window.wp.primitives;var h=(0,n.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(c.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),g=(0,n.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(c.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),p=(0,n.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(c.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});const b=window.wp.data,x=window.wp.element,y=window.wp.i18n,f=window.wp.compose,w=(e,t=0,o=null)=>(e=Number(e),(isNaN(e)||e<t)&&(e=t),null!==o&&e>o&&(e=o),e),_=e=>e.media_type?"image"===e.media_type?"image":"video":e.type,k=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function v(e=""){return!!e&&k.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e))}const A=({id:e,src:t,allowedTypes:o,accept:i,onSelect:r,onSelectURL:s,onRemove:a})=>(0,n.jsxs)(m.BlockControls,{group:"inline",children:[(0,n.jsx)(m.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:o,accept:i,onSelect:r,onSelectURL:s}),!!t&&!!a&&(0,n.jsx)(u.ToolbarButton,{onClick:a,children:(0,y.__)("Release","snow-monkey-blocks")})]}),j=({src:e,alt:t,id:o,style:i,width:r,height:s})=>(0,n.jsx)("img",{src:e,alt:t,className:`wp-image-${o}`,style:i,width:r,height:s}),S=({src:e,style:t,width:o,height:i})=>(0,n.jsx)("video",{src:e,style:t,width:o,height:i}),D=(0,x.memo)((({id:e,src:t,alt:o,url:i,width:r,height:s,target:a,allowedTypes:l,accept:m,onSelect:u,onSelectURL:c,onRemove:h,mediaType:g,style:p,rel:b,linkClass:x})=>{let y;if("image"===g){let l;y=(0,n.jsx)(j,{src:t,alt:o,id:e,style:p,width:r,height:s}),l=b?(0,d.isEmpty)(b)?void 0:b:"_self"!==a&&a?"noopener noreferrer":void 0,i&&(y=(0,n.jsx)("span",{href:i,target:"_self"===a?void 0:a,rel:l,className:x,children:y}))}else"video"===g&&(y=(0,n.jsx)(S,{src:t,style:p,width:r,height:s}));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A,{id:e,src:t,allowedTypes:l,accept:m,onSelect:u,onSelectURL:c,onRemove:h}),y]})}),((e,t)=>{const o=Object.keys(e);for(const i of o)if(e[i]!==t[i])return!1;return!0}));function G(e){const{src:t,onSelect:o,onSelectURL:i,mediaType:r,allowedTypes:s=["image"]}=e,a=!r&&t?"image":r;let l=(0,y.__)("Media","snow-monkey-blocks");1===s.length&&("image"===s[0]?l=(0,y.__)("Image","snow-monkey-blocks"):"video"===s[0]&&(l=(0,y.__)("Video","snow-monkey-blocks")));const d=(0,x.useMemo)((()=>s.map((e=>`${e}/*`)).join(",")),[s]);return t?(0,n.jsx)(D,{...e,accept:d,allowedTypes:s,mediaType:a}):(0,n.jsx)(m.MediaPlaceholder,{icon:"format-image",labels:{title:l},onSelect:o,onSelectURL:i,accept:d,allowedTypes:s})}const C=[{label:(0,y._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,y._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,y._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,y._x)("Full Size","Image size option for resolution control"),value:"full"}];function B({panelId:e,value:t,onChange:o,options:i=C,defaultValue:r=C[0].value,isShownByDefault:s=!0,withToolsPanelItem:a=!0}){const l=null!=t?t:r,d=()=>(0,n.jsx)(u.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Resolution"),value:l,options:i,onChange:o,help:(0,y.__)("Select the size of the source image."),size:"__unstable-large"});return a?(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>l!==r,label:(0,y.__)("Resolution"),onDeselect:()=>o(r),isShownByDefault:s,panelId:e,children:(0,n.jsx)(d,{})}):(0,n.jsx)(d,{})}const R=["image","video"],P="full",N=[{value:"start",icon:h,label:(0,y.__)("Justify items left","snow-monkey-blocks")},{value:"center",icon:g,label:(0,y.__)("Justify items center","snow-monkey-blocks")},{value:"end",icon:p,label:(0,y.__)("Justify items right","snow-monkey-blocks")}],W=[{value:"start",icon:h,label:(0,y.__)("Justify items top","snow-monkey-blocks")},{value:"center",icon:g,label:(0,y.__)("Justify items center","snow-monkey-blocks")},{value:"end",icon:p,label:(0,y.__)("Justify items bottom","snow-monkey-blocks")}],T="var:";function U(e){return(0,d.startsWith)(e,T)?`var(--wp--${e.slice(4).split("|").join("--")})`:e}function I(e,t){if(null!=e&&0!==(e=Number(e))&&!(-1*t>e||t<e))return String(e)}function K({name:e,onSelect:t}){const{blockType:o,variations:r}=(0,b.useSelect)((t=>{const{getBlockVariations:o,getBlockType:r}=t(i.store);return{blockType:r(e),variations:o(e,"block")}}),[e]);return(0,n.jsx)(m.__experimentalBlockVariationPicker,{icon:(0,d.get)(o,["icon","src"]),label:(0,d.get)(o,["title"]),variations:r,onSelect:t,allowSkip:!1})}const M="var:";function z(e){return(0,d.startsWith)(e,M)?`var(--wp--${e.slice(4).split("|").join("--")})`:e}function E(e,t){if(null!=e&&0!==(e=Number(e))&&!(-1*t>e||t<e))return String(e)}const q={attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnStart:"2",figureGridRowStart:"2",bodyAlignSelf:"start",bodyJustifySelf:"start",bodyGridColumnEnd:"-2",bodyGridRowEnd:"-2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},V=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"7",y:"17",width:"38",height:"22",fill:"#DDDDDD"}),(0,n.jsx)("line",{x1:"3",y1:"10",x2:"25",y2:"10",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"14",x2:"21",y2:"14",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"18",x2:"19",y2:"18",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"22",x2:"23",y2:"22",stroke:"#AAAAAA",strokeWidth:"2"})]}),O=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"3",y:"17",width:"38",height:"22",fill:"#DDDDDD"}),(0,n.jsx)("line",{x1:"23",y1:"10",x2:"45",y2:"10",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"14",x2:"41",y2:"14",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"18",x2:"39",y2:"18",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"22",x2:"43",y2:"22",stroke:"#AAAAAA",strokeWidth:"2"})]}),H=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"7",y:"9",width:"38",height:"22",fill:"#DDDDDD"}),(0,n.jsx)("line",{x1:"3",y1:"26",x2:"25",y2:"26",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"30",x2:"21",y2:"30",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"34",x2:"19",y2:"34",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"3",y1:"38",x2:"23",y2:"38",stroke:"#AAAAAA",strokeWidth:"2"})]}),L=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"3",y:"9",width:"38",height:"22",fill:"#DDDDDD"}),(0,n.jsx)("line",{x1:"23",y1:"26",x2:"45",y2:"26",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"30",x2:"41",y2:"30",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"34",x2:"39",y2:"34",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{x1:"23",y1:"38",x2:"43",y2:"38",stroke:"#AAAAAA",strokeWidth:"2"})]}),J=(0,n.jsxs)("svg",{width:"48",height:"30",viewBox:"0 0 48 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 30)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 3 15)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 3 11)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 3 7)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 3 3)",stroke:"#AAAAAA",strokeWidth:"2"})]}),$=(0,n.jsxs)("svg",{width:"48",height:"30",viewBox:"0 0 48 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 30)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 23 15)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 23 11)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 23 7)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 23 3)",stroke:"#AAAAAA",strokeWidth:"2"})]}),F=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 39)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 3 34)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 3 30)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 3 26)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 3 22)",stroke:"#AAAAAA",strokeWidth:"2"})]}),Z=(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 39)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 23 34)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 23 30)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 23 26)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 23 22)",stroke:"#AAAAAA",strokeWidth:"2"})]}),X=(0,n.jsxs)("svg",{width:"48",height:"30",viewBox:"0 0 48 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"48",height:"30",transform:"matrix(1 0 0 -1 0 30)",fill:"#DDDDDD"}),(0,n.jsx)("line",{y1:"-1",x2:"22",y2:"-1",transform:"matrix(1 0 0 -1 13 20)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"18",y2:"-1",transform:"matrix(1 0 0 -1 13 16)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"16",y2:"-1",transform:"matrix(1 0 0 -1 13 12)",stroke:"#AAAAAA",strokeWidth:"2"}),(0,n.jsx)("line",{y1:"-1",x2:"20",y2:"-1",transform:"matrix(1 0 0 -1 13 8)",stroke:"#AAAAAA",strokeWidth:"2"})]}),Q=[{name:"default",isDefault:!0,title:(0,y.__)("Default","snow-monkey-blocks"),scope:["block"],icon:()=>(0,n.jsx)("div",{style:{color:"#aaa",width:"48px",height:"48px",padding:"4px"},children:s}),attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`}},{name:"left-top-out",title:(0,y.__)("Left / Top / Out","snow-monkey-blocks"),scope:["block"],icon:V,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnStart:"2",figureGridRowStart:"2",bodyAlignSelf:"start",bodyJustifySelf:"start",bodyGridColumnEnd:"-2",bodyGridRowEnd:"-2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"right-top-out",title:(0,y.__)("Right / Top / Out","snow-monkey-blocks"),scope:["block"],icon:O,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnEnd:"-2",figureGridRowStart:"2",bodyAlignSelf:"start",bodyJustifySelf:"end",bodyGridColumnStart:"2",bodyGridRowEnd:"-2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"left-bottom-out",title:(0,y.__)("Left / Bottom / Out","snow-monkey-blocks"),scope:["block"],icon:H,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnStart:"2",figureGridRowEnd:"-2",figureGridRowStart:"2",bodyAlignSelf:"end",bodyJustifySelf:"start",bodyGridColumnEnd:"-2",bodyGridRowStart:"2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"right-bottom-out",title:(0,y.__)("Right / Bottom / Out","snow-monkey-blocks"),scope:["block"],icon:L,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,figureGridColumnEnd:"-2",figureGridRowEnd:"-2",bodyAlignSelf:"end",bodyJustifySelf:"end",bodyGridColumnStart:"2",bodyGridRowStart:"2",bodyMaxWidth:"38rem"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"left-top-in",title:(0,y.__)("Left / Top / In","snow-monkey-blocks"),scope:["block"],icon:J,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"start",bodyJustifySelf:"start",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"wide"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"right-top-in",title:(0,y.__)("Right / Top / In","snow-monkey-blocks"),scope:["block"],icon:$,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"start",bodyJustifySelf:"end",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"wide"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"left-bottom-in",title:(0,y.__)("Left / Bottom / In","snow-monkey-blocks"),scope:["block"],icon:F,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"end",bodyJustifySelf:"start",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"wide"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"right-bottom-in",title:(0,y.__)("Right / Bottom / In","snow-monkey-blocks"),scope:["block"],icon:Z,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"end",bodyJustifySelf:"end",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"wide"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]},{name:"center",title:(0,y.__)("Center","snow-monkey-blocks"),scope:["block"],icon:X,attributes:{mediaUrl:`${smb.pluginUrl}/dist/img/photos/stocksnap_wrn48fo5mr.jpg`,bodyAlignSelf:"center",bodyJustifySelf:"center",bodyMaxWidth:"38rem",bodyPadding:{top:"var:preset|spacing|40",right:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|40"},align:"full"},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. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill"}}]}];(0,i.registerBlockType)(r.UU,{icon:{foreground:"#cd162c",src:s},edit:function({name:e,attributes:t,setAttributes:o,className:s,clientId:a}){const{mediaId:d,mediaUrl:c,mediaAlt:h,mediaWidth:g,mediaHeight:p,mediaSizeSlug:k,mediaType:A,focalPoint:j,columns:S,rows:D,maxWidth:C,fit:T,figureGridColumnStart:M,figureGridColumnEnd:z,figureGridRowStart:E,figureGridRowEnd:q,figureAspectRatio:V,maskColor:O,maskGradientColor:H,maskOpacity:L,bodyAlignSelf:J,bodyJustifySelf:$,bodyGridColumnStart:F,bodyGridColumnEnd:Z,bodyGridRowStart:X,bodyGridRowEnd:Q,bodyMaxWidth:Y,bodyPadding:ee,style:te,templateLock:oe}=t,ie=(0,b.useSelect)((e=>!!e("core/block-editor").getBlock(a)?.innerBlocks?.length),[a]),{replaceInnerBlocks:re}=(0,b.useDispatch)(m.store),ne={};Object.values(r.uK||[]).forEach(((e,t)=>{ne[Object.keys(r.uK)[t]]=e.default}));const[se,ae]=(0,x.useState)(!ie&&!c);(0,x.useEffect)((()=>{ae(!ie&&!c)}),[c,ie]);const le=(0,b.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),de=(0,b.useSelect)((e=>d?e("core").getEntityRecord("postType","attachment",d):null),[d]),me=(0,m.__experimentalUseMultipleOriginColorsAndGradients)(),ue=(0,f.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},ce=l()("smb-hero-header",s,{"smb-hero-header--fit":T}),he={"--smb-hero-header--columns":String(S)||void 0,"--smb-hero-header--rows":String(D)||void 0,"--smb-hero-header--max-gap":te?.spacing?.blockGap||void 0,"--smb-hero-header--object-position-x":j?.x?100*j?.x+"%":void 0,"--smb-hero-header--object-position-y":j?.y?100*j?.y+"%":void 0,"--smb-hero-header--max-width":C||void 0,"--smb-hero-header--figure-grid-column-start":!T&&I(M,S+1)||void 0,"--smb-hero-header--figure-grid-column-end":!T&&I(z,S+1)||void 0,"--smb-hero-header--figure-grid-row-start":!T&&I(E,D+1)||void 0,"--smb-hero-header--figure-grid-row-end":!T&&I(q,D+1)||void 0,"--smb-hero-header--figure-aspect-ratio":!T&&V||void 0,"--smb-hero-header--mask-color":O||void 0,"--smb-hero-header--mask-image":H||void 0,"--smb-hero-header--mask-opacity":O||H?L:void 0,"--smb-hero-header--body-align-self":J||void 0,"--smb-hero-header--body-justify-self":$||void 0,"--smb-hero-header--body-grid-column-start":I(F,S+1)||void 0,"--smb-hero-header--body-grid-column-end":I(Z,S+1)||void 0,"--smb-hero-header--body-grid-row-start":I(X,D+1)||void 0,"--smb-hero-header--body-grid-row-end":I(Q,D+1)||void 0,"--smb-hero-header--body-max-width":Y||void 0,"--smb-hero-header--body-padding-top":U(ee?.top)||void 0,"--smb-hero-header--body-padding-right":U(ee?.right)||void 0,"--smb-hero-header--body-padding-bottom":U(ee?.bottom)||void 0,"--smb-hero-header--body-padding-left":U(ee?.left)||void 0},ge=(0,m.useBlockProps)(),pe=(0,m.useBlockProps)({className:ce,style:he}),be=(0,m.useInnerBlocksProps)({className:"smb-hero-header__body"},{templateLock:oe,renderAppender:ie?void 0:m.InnerBlocks.ButtonBlockAppender});if(se)return(0,n.jsx)("div",{...ge,children:(0,n.jsx)(K,{name:e,onSelect:e=>{ae(!1),e?.attributes&&o(e.attributes),e?.innerBlocks&&re(a,(0,i.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)}})});const xe=le.filter((({slug:e})=>de?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),ye="video"===A,fe="image"===A||void 0===A;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.InspectorControls,{group:"dimensions",children:(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>C!==r.uK.maxWidth.default,isShownByDefault:!!C,label:(0,y.__)("Maximum width","snow-monkey-blocks"),onDeselect:()=>o({maxWidth:r.uK.maxWidth.default}),panelId:a,children:(0,n.jsx)(u.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,y.__)("Maximum width","snow-monkey-blocks"),value:C,onChange:e=>o({maxWidth:e})})})}),(0,n.jsxs)(m.InspectorControls,{children:[(0,n.jsxs)(u.__experimentalToolsPanel,{label:(0,y.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>S!==r.uK.columns.default,isShownByDefault:!0,label:(0,y.__)("Number of columns in grid","snow-monkey-blocks"),onDeselect:()=>o({columns:r.uK.columns.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Number of columns in grid","snow-monkey-blocks"),value:Number(S),onChange:e=>o({columns:String(e)}),min:1,max:24,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>D!==r.uK.rows.default,isShownByDefault:!0,label:(0,y.__)("Number of rows in grid","snow-monkey-blocks"),onDeselect:()=>o({rows:r.uK.rows.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Number of rows in grid","snow-monkey-blocks"),value:Number(D),onChange:e=>o({rows:String(e)}),min:1,max:24,step:1})})]}),(0,n.jsxs)(u.__experimentalToolsPanel,{label:(0,y.__)("Background image","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>c!==r.uK.mediaUrl.default,isShownByDefault:!0,label:(0,y.__)("Image","snow-monkey-blocks"),onDeselect:()=>o({mediaId:r.uK.mediaId.default,mediaUrl:r.uK.mediaUrl.default,mediaAlt:r.uK.mediaAlt.default,mediaWidth:r.uK.mediaWidth.default,mediaHeight:r.uK.mediaHeight.default,mediaSizeSlug:r.uK.mediaSizeSlug.default,mediaType:r.uK.mediaType.default}),children:(0,n.jsx)("div",{className:"smb-image-size-control",children:(0,n.jsx)(G,{src:c,id:d,alt:h,width:g,height:p,onSelect:e=>{const t=e?.sizes?.[k]?k:P,i=e?.sizes?.[t]?.url,r=e?.sizes?.[t]?.width,n=e?.sizes?.[t]?.height;o({mediaType:_(e),mediaId:e.id,mediaUrl:i||e.url,mediaAlt:e.alt,mediaWidth:r||e.width,mediaHeight:n||e.height,mediaSizeSlug:t})},onSelectURL:e=>{e!==c&&o({mediaUrl:e,mediaId:0,mediaSizeSlug:P,mediaType:_({media_type:v(e)?"video":"image"})})},onRemove:()=>{o({mediaUrl:r.uK.mediaUrl.default,mediaAlt:r.uK.mediaAlt.default,mediaWidth:r.uK.mediaWidth.default,mediaHeight:r.uK.mediaHeight.default,mediaId:r.uK.mediaId.default,mediaType:r.uK.mediaType.default})},mediaType:A,allowedTypes:R})})}),0<xe.length&&(0,n.jsx)(B,{defaultValue:r.uK.mediaSizeSlug.default,value:k,options:xe,onChange:e=>{const t=de?.media_details?.sizes?.[e]?.source_url,i=de?.media_details?.sizes?.[e]?.width,r=de?.media_details?.sizes?.[e]?.height;o({mediaUrl:t,mediaWidth:i,mediaHeight:r,mediaSizeSlug:e})}}),!!c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>j!==r.uK.focalPoint.default,isShownByDefault:!0,label:(0,y.__)("Focal point picker","snow-monkey-blocks"),onDeselect:()=>o({focalPoint:r.uK.focalPoint.default}),children:(0,n.jsx)(u.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,y.__)("Focal point picker","snow-monkey-blocks"),url:c,value:j,onChange:e=>{o({focalPoint:e})},onDrag:e=>o({focalPoint:e})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>T!==r.uK.fit.default,isShownByDefault:!0,label:(0,y.__)("Fit to the contents","snow-monkey-blocks"),onDeselect:()=>o({fit:r.uK.fit.default}),children:(0,n.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,y.__)("Fit to the contents","snow-monkey-blocks"),checked:T,onChange:e=>o({fit:e})})}),!T&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>V!==r.uK.figureAspectRatio.default,isShownByDefault:!0,label:(0,y.__)("Aspect ratio","snow-monkey-blocks"),onDeselect:()=>o({figureAspectRatio:r.uK.figureAspectRatio.default}),children:(0,n.jsx)(u.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Aspect ratio","snow-monkey-blocks"),help:(0,y.__)("e.g. 16 / 9","snow-monkey-blocks"),value:V,onChange:e=>o({figureAspectRatio:e})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>M!==r.uK.figureGridColumnStart.default,isShownByDefault:!0,label:(0,y.__)("Grid column: start","snow-monkey-blocks"),onDeselect:()=>o({figureGridColumnStart:r.uK.figureGridColumnStart.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid column: start","snow-monkey-blocks"),value:Number(M),onChange:e=>o({figureGridColumnStart:String(e)}),min:1,max:Number(S)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>z!==r.uK.figureGridColumnEnd.default,isShownByDefault:!0,label:(0,y.__)("Grid column: end","snow-monkey-blocks"),onDeselect:()=>o({figureGridColumnEnd:r.uK.figureGridColumnEnd.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid column: end","snow-monkey-blocks"),value:Number(z),onChange:e=>o({figureGridColumnEnd:String(e)}),min:-1*Number(S)-1,max:Number(S)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>E!==r.uK.figureGridRowStart.default,isShownByDefault:!0,label:(0,y.__)("Grid row: start","snow-monkey-blocks"),onDeselect:()=>o({figureGridRowStart:r.uK.figureGridRowStart.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid row: start","snow-monkey-blocks"),value:Number(E),onChange:e=>o({figureGridRowStart:String(e)}),min:1,max:Number(D)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>q!==r.uK.figureGridRowEnd.default,isShownByDefault:!0,label:(0,y.__)("Grid row: end","snow-monkey-blocks"),onDeselect:()=>o({figureGridRowEnd:r.uK.figureGridRowEnd.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid row: end","snow-monkey-blocks"),value:Number(q),onChange:e=>o({figureGridRowEnd:String(e)}),min:-1*Number(D)-1,max:Number(D)+1,step:1})})]})]})]}),(0,n.jsxs)(u.__experimentalToolsPanel,{label:(0,y.__)("Overlay","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,n.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,n.jsx)(m.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,y.__)("Color","snow-monkey-blocks"),colorValue:O,gradientValue:H,onColorChange:e=>o({maskColor:e}),onGradientChange:e=>o({maskGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...me})}),(!!O||!!H)&&(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>L!==r.uK.maskOpacity.default,isShownByDefault:!0,label:(0,y.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>o({maskOpacity:r.uK.maskOpacity.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Opacity","snow-monkey-blocks"),value:Number((1-L).toFixed(1)),onChange:e=>o({maskOpacity:w((1-e).toFixed(1),0,1)}),min:0,max:1,step:.1})})]}),(0,n.jsxs)(u.__experimentalToolsPanel,{label:(0,y.__)("Contents","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>Y!==r.uK.bodyMaxWidth.default,isShownByDefault:!0,label:(0,y.__)("Maximum width","snow-monkey-blocks"),onDeselect:()=>o({bodyMaxWidth:r.uK.bodyMaxWidth.default}),children:(0,n.jsx)(u.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,y.__)("Maximum width","snow-monkey-blocks"),value:Y,onChange:e=>o({bodyMaxWidth:e})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{className:"tools-panel-item-spacing",hasValue:()=>JSON.stringify(ee)!==JSON.stringify(r.uK.bodyPadding.default),isShownByDefault:!0,label:(0,y.__)("Padding","snow-monkey-blocks"),onDeselect:()=>o({bodyPadding:{...r.uK.bodyPadding.default}}),children:(0,n.jsx)(m.__experimentalSpacingSizesControl,{label:(0,y.__)("Padding","snow-monkey-blocks"),allowReset:!1,values:ee,onChange:e=>o({bodyPadding:e})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>$!==r.uK.bodyJustifySelf.default,isShownByDefault:!0,label:(0,y.__)("Alignment on inline axis","snow-monkey-blocks"),onDeselect:()=>o({bodyJustifySelf:r.uK.bodyJustifySelf.default}),children:(0,n.jsx)(u.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,y.__)("Alignment on inline axis","snow-monkey-blocks"),id:"snow-monkey-blocks/hero-header-backgroun-image-justify-self",children:(0,n.jsx)("div",{children:N.map((({value:e,icon:t,iconLabel:i})=>(0,n.jsx)(u.Button,{label:i,icon:t,isPressed:e===$,onClick:()=>{o({bodyJustifySelf:e!==$?e:void 0})}},e)))})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>J!==r.uK.bodyAlignSelf.default,isShownByDefault:!0,label:(0,y.__)("Alignment on cross axis","snow-monkey-blocks"),onDeselect:()=>o({bodyAlignSelf:r.uK.bodyAlignSelf.default}),children:(0,n.jsx)(u.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,y.__)("Alignment on cross axis","snow-monkey-blocks"),id:"snow-monkey-blocks/hero-header-backgroun-image-align-self",children:(0,n.jsx)("div",{children:W.map((({value:e,icon:t,iconLabel:i})=>(0,n.jsx)(u.Button,{style:{transform:"rotate(90deg)"},label:i,icon:t,isPressed:e===J,onClick:()=>{o({bodyAlignSelf:e!==J?e:void 0})}},e)))})})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>F!==r.uK.bodyGridColumnStart.default,isShownByDefault:!0,label:(0,y.__)("Grid column: start","snow-monkey-blocks"),onDeselect:()=>o({bodyGridColumnStart:r.uK.bodyGridColumnStart.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid column: start","snow-monkey-blocks"),value:Number(F),onChange:e=>o({bodyGridColumnStart:String(e)}),min:1,max:Number(S)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>Z!==r.uK.bodyGridColumnEnd.default,isShownByDefault:!0,label:(0,y.__)("Grid column: end","snow-monkey-blocks"),onDeselect:()=>o({bodyGridColumnEnd:r.uK.bodyGridColumnEnd.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid column: end","snow-monkey-blocks"),value:Number(Z),onChange:e=>o({bodyGridColumnEnd:String(e)}),min:-1*Number(S)-1,max:Number(S)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>X!==r.uK.bodyGridRowStart.default,isShownByDefault:!0,label:(0,y.__)("Grid row: start","snow-monkey-blocks"),onDeselect:()=>o({bodyGridRowStart:r.uK.bodyGridRowStart.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid row: start","snow-monkey-blocks"),value:Number(X),onChange:e=>o({bodyGridRowStart:String(e)}),min:1,max:Number(D)+1,step:1})}),(0,n.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>Q!==r.uK.bodyGridRowEnd.default,isShownByDefault:!0,label:(0,y.__)("Grid row: end","snow-monkey-blocks"),onDeselect:()=>o({bodyGridRowEnd:r.uK.bodyGridRowEnd.default}),children:(0,n.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,y.__)("Grid row: end","snow-monkey-blocks"),value:Number(Q),onChange:e=>o({bodyGridRowEnd:String(e)}),min:-1*Number(D)-1,max:Number(D)+1,step:1})})]})]}),(0,n.jsxs)("div",{...pe,children:[!!c&&(0,n.jsxs)("div",{className:"smb-hero-header__figure",children:[0<Number((1-L).toFixed(1))&&(0,n.jsx)("div",{className:"smb-hero-header__mask"}),fe&&(0,n.jsx)("img",{src:c,alt:h,width:g,height:p,className:`wp-image-${d}`}),ye&&(0,n.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:c,width:g,height:p})]}),(0,n.jsx)("div",{...be})]})]})},save:function({attributes:e,className:t}){const{mediaId:o,mediaUrl:i,mediaAlt:r,mediaWidth:s,mediaHeight:a,mediaType:d,focalPoint:u,columns:c,rows:h,maxWidth:g,fit:p,figureGridColumnStart:b,figureGridColumnEnd:x,figureGridRowStart:y,figureGridRowEnd:f,figureAspectRatio:w,maskColor:_,maskGradientColor:k,maskOpacity:v,bodyAlignSelf:A,bodyJustifySelf:j,bodyGridColumnStart:S,bodyGridColumnEnd:D,bodyGridRowStart:G,bodyGridRowEnd:C,bodyMaxWidth:B,bodyPadding:R,style:P}=e,N="video"===d,W="image"===d||void 0===d,T=l()("smb-hero-header",t,{"smb-hero-header--fit":p}),U={"--smb-hero-header--columns":String(c)||void 0,"--smb-hero-header--rows":String(h)||void 0,"--smb-hero-header--max-gap":P?.spacing?.blockGap||void 0,"--smb-hero-header--object-position-x":u?.x?100*u?.x+"%":void 0,"--smb-hero-header--object-position-y":u?.y?100*u?.y+"%":void 0,"--smb-hero-header--max-width":g||void 0,"--smb-hero-header--figure-grid-column-start":!p&&E(b,c+1)||void 0,"--smb-hero-header--figure-grid-column-end":!p&&E(x,c+1)||void 0,"--smb-hero-header--figure-grid-row-start":!p&&E(y,h+1)||void 0,"--smb-hero-header--figure-grid-row-end":!p&&E(f,h+1)||void 0,"--smb-hero-header--figure-aspect-ratio":!p&&w||void 0,"--smb-hero-header--mask-color":_||void 0,"--smb-hero-header--mask-image":k||void 0,"--smb-hero-header--mask-opacity":_||k?v:void 0,"--smb-hero-header--body-align-self":A||void 0,"--smb-hero-header--body-justify-self":j||void 0,"--smb-hero-header--body-grid-column-start":E(S,c+1)||void 0,"--smb-hero-header--body-grid-column-end":E(D,c+1)||void 0,"--smb-hero-header--body-grid-row-start":E(G,h+1)||void 0,"--smb-hero-header--body-grid-row-end":E(C,h+1)||void 0,"--smb-hero-header--body-max-width":B||void 0,"--smb-hero-header--body-padding-top":z(R?.top)||void 0,"--smb-hero-header--body-padding-right":z(R?.right)||void 0,"--smb-hero-header--body-padding-bottom":z(R?.bottom)||void 0,"--smb-hero-header--body-padding-left":z(R?.left)||void 0},I=m.useBlockProps.save({className:T,style:U}),K=m.useInnerBlocksProps.save({className:"smb-hero-header__body"});return(0,n.jsxs)("div",{...I,children:[!!i&&(0,n.jsxs)("div",{className:"smb-hero-header__figure",children:[0<Number((1-v).toFixed(1))&&(0,n.jsx)("div",{className:"smb-hero-header__mask"}),W&&(0,n.jsx)("img",{src:i,alt:r,width:s,height:a,className:`wp-image-${o}`}),N&&(0,n.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:i,width:s,height:a})]}),(0,n.jsx)("div",{...K})]})},example:q,variations:Q})},6942:(e,t)=>{var o;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=s(e,n(o)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)i.call(e,o)&&e[o]&&(t=s(t,o));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()}},o={};function i(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,i),n.exports}i.m=t,e=[],i.O=(t,o,r,n)=>{if(!o){var s=1/0;for(m=0;m<e.length;m++){for(var[o,r,n]=e[m],a=!0,l=0;l<o.length;l++)(!1&n||s>=n)&&Object.keys(i.O).every((e=>i.O[e](o[l])))?o.splice(l--,1):(a=!1,n<s&&(s=n));if(a){e.splice(m--,1);var d=r();void 0!==d&&(t=d)}}return t}n=n||0;for(var m=e.length;m>0&&e[m-1][2]>n;m--)e[m]=e[m-1];e[m]=[o,r,n]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={5618:0,9590:0};i.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,[s,a,l]=o,d=0;if(s.some((t=>0!==e[t]))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(l)var m=l(i)}for(t&&t(o);d<s.length;d++)n=s[d],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(m)},o=globalThis.webpackChunk=globalThis.webpackChunk||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var r=i.O(void 0,[9590],(()=>i(8508)));r=i.O(r)})(); -
snow-monkey-blocks/trunk/dist/blocks/information/index.asset.php
r3280484 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-i18n'), 'version' => ' f062787feab1b2101cbd');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-i18n'), 'version' => '1277b3801419012ab7fd'); -
snow-monkey-blocks/trunk/dist/blocks/information/index.js
r3280484 r3400189 1 (()=>{var e,o={8666:(e,o,l)=>{"use strict";const n=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/information","uK":{"i$":{"A":25},"A0":{"A":"left"},"k1":{"A":"top"},"tW":{"A":false},"Wk":{"A":""},"MG":{"type":"string"},"Xc":{"type":"string"},"Pm":{"type":"string"},"Cz":{},"G8":{},"$X":{}}}'),r=window.ReactJSXRuntime,a=(0,r.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M19.82,4.18V19.82H4.18V4.18H19.82M20.31,3H3.69A.69.69,0,0,0,3,3.69V20.31a.69.69,0,0,0,.69.69H20.31a.69.69,0,0,0,.69-.69V3.69A.69.69,0,0,0,20.31,3Z"}),(0,r.jsx)("rect",{x:"7.5",y:"4.07",width:"1.18",height:"15.99"}),(0,r.jsx)("rect",{x:"4.07",y:"7.38",width:"16.93",height:"1.18"}),(0,r.jsx)("rect",{x:"10.7",y:"11.41",width:"2.84",height:"1.18"}),(0,r.jsx)("rect",{x:"10.7",y:"14.96",width:"2.84",height:"1.18"}),(0,r.jsx)("rect",{x:"14.61",y:"11.41",width:"2.84",height:"1.18"}),(0,r.jsx)("rect",{x:"14.61",y:"14.96",width:"2.84",height:"1.18"})]});var i=l(6942),s=l.n(i);const c=window.wp.blockEditor,d=window.wp.components, m=window.wp.data,u=window.wp.i18n,b=(window.lodash,window.wp.compose),p=["snow-monkey-blocks/information-item"],g=[["snow-monkey-blocks/information-item"]];(0,n.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:o,className:l,clientId:n}){const a=(0,m.useSelect)((e=>!!e("core/block-editor").getBlock(n)?.innerBlocks?.length),[n]),{labelColumnSize:i,labelAlign:_,labelVerticalAlign:k,smIsSplitColumn:h,columnPadding:f,labelColumnBackgroundColor:x,labelColumnTextColor:v,contentColumnBackgroundColor:w,borderColor:C,borderStyle:y,borderWidth:A,templateLock:j}=e,S=s()("smb-information",l,{"smb-information--has-border":!!A}),B={"--smb-information--column-padding":f?`var(--smb-information--column-padding-${f})`:void 0,"--smb-information--label-column-background-color":x||void 0,"--smb-information--label-column-text-color":v||void 0,"--smb-information--content-column-background-color":w||void 0,"--smb-information--border-color":C||void 0,"--smb-information--border-style":y||void 0,"--smb-information--border-width":A||void 0},I=(0,c.useBlockProps)({className:S,style:B}),P=(0,c.useInnerBlocksProps)({className:"smb-information__body"},{allowedBlocks:p,template:g,templateLock:j,renderAppender:a?void 0:c.InnerBlocks.ButtonBlockAppender}),D=(0,b.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},K=[{label:"S",value:1},{label:"M",value:2},{label:"L",value:3}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.InspectorControls,{children:(0,r.jsxs)(d.__experimentalToolsPanel,{label:(0,u.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:D,children:[(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>i!==t.uK.i$.A,isShownByDefault:!0,label:(0,u.__)("Label column size","snow-monkey-blocks"),onDeselect:()=>o({labelColumnSize:t.uK.i$.A}),children:(0,r.jsx)(d.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,u.__)("Label column size","snow-monkey-blocks"),value:i,options:[{value:25,label:(0,u.__)("25%","snow-monkey-blocks")},{value:33,label:(0,u.__)("33%","snow-monkey-blocks")},{value:50,label:(0,u.__)("50%","snow-monkey-blocks")}],onChange:e=>o({labelColumnSize:parseInt(e)})})}),(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>_!==t.uK.A0.A,isShownByDefault:!0,label:(0,u.__)("Label horizontal alignment","snow-monkey-blocks"),onDeselect:()=>o({labelAlign:t.uK.A0.A}),children:(0,r.jsx)(d.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,u.__)("Label horizontal alignment","snow-monkey-blocks"),value:_,options:[{value:"",label:(0,u.__)("Left","snow-monkey-blocks")},{value:"center",label:(0,u.__)("Center","snow-monkey-blocks")},{value:"right",label:(0,u.__)("Right","snow-monkey-blocks")}],onChange:e=>o({labelAlign:e})})}),(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>k!==t.uK.k1.A,isShownByDefault:!0,label:(0,u.__)("Label vertical alignment","snow-monkey-blocks"),onDeselect:()=>o({labelVerticalAlign:t.uK.k1.A}),children:(0,r.jsx)(d.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,u.__)("Label vertical alignment","snow-monkey-blocks"),value:k,options:[{value:"",label:(0,u.__)("Top","snow-monkey-blocks")},{value:"middle",label:(0,u.__)("Middle","snow-monkey-blocks")}],onChange:e=>o({labelVerticalAlign:e})})}),(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>h!==t.uK.tW.A,isShownByDefault:!0,label:(0,u.__)("Don't split the column in a smartphone","snow-monkey-blocks"),onDeselect:()=>o({smIsSplitColumn:t.uK.tW.A}),children:(0,r.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,u.__)("Don't split the column in a smartphone","snow-monkey-blocks"),checked:!h,onChange:e=>o({smIsSplitColumn:!e})})})]})}),(0,r.jsx)(c.InspectorControls,{group:"color",children:(0,r.jsx)(c.__experimentalColorGradientSettingsDropdown,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:n,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:x,onColorChange:e=>o({labelColumnBackgroundColor:e}),resetAllFilter:()=>({labelColumnBackgroundColor:t.uK.MG?.default}),label:(0,u.__)("Label column background color","snow-monkey-blocks")},{colorValue:v,onColorChange:e=>o({labelColumnTextColor:e}),resetAllFilter:()=>({labelColumnTextColor:t.uK.Xc?.default}),label:(0,u.__)("Label column text color","snow-monkey-blocks")},{colorValue:w,onColorChange:e=>o({contentColumnBackgroundColor:e}),resetAllFilter:()=>({contentColumnBackgroundColor:t.uK.Pm?.default}),label:(0,u.__)("Content column background color","snow-monkey-blocks")}]})}),(0,r.jsx)(c.InspectorControls,{group:"border",children:(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>C!==t.uK.Cz.default||y!==t.uK.G8.default||A!==t.uK.$X.default,isShownByDefault:!0,label:(0,u.__)("Border","snow-monkey-blocks"),onDeselect:()=>o({borderColor:t.uK.Cz.default,borderStyle:t.uK.G8.default,borderWidth:t.uK.$X.default}),panelId:n,children:(0,r.jsx)(d.BorderBoxControl,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),__next40pxDefaultSize:!0,__experimentalIsRenderedInSidebar:!0,className:"smb-border-box-control",enableAlpha:!0,enableStyle:!0,onChange:e=>{o({borderColor:e?.color,borderStyle:e?.style,borderWidth:e?.width})},popoverOffset:40,popoverPlacement:"left-start",value:{color:C,style:y,width:A}})})}),(0,r.jsx)(c.InspectorControls,{group:"dimensions",children:(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>f!==t.uK.Wk.A,isShownByDefault:!0,label:(0,u.__)("Padding","snow-monkey-blocks"),onDeselect:()=>o({columnPadding:t.uK.Wk.A}),panelId:n,children:(0,r.jsx)(d.BaseControl,{__nextHasNoMarginBottom:!0,id:"snow-monkey-blocks/information/padding",label:(0,u.__)("Padding","snow-monkey-blocks"),className:"spacing-sizes-control",children:(0,r.jsx)(d.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"spacing-sizes-control__range-control",value:K.filter((e=>e.label?.toLowerCase()===f))?.[0]?.value,resetFallbackValue:void 0,onChange:e=>o({columnPadding:K.filter((o=>o.value===e))?.[0]?.label?.toLowerCase()}),withInputField:!1,min:1,max:3,marks:!0,renderTooltipContent:e=>K.filter((o=>o.value===e))?.[0]?.label?.toUpperCase(),hideLabelFromVision:!0,withReset:!0})})})}),(0,r.jsx)("div",{...I,"data-sm-split-column":h?"true":void 0,"data-label-align":_||"left","data-label-vertical-align":k||"top",children:(0,r.jsx)("div",{...P})})]})},save:function({attributes:e,className:o}){const{labelAlign:l,labelVerticalAlign:n,smIsSplitColumn:t,columnPadding:a,labelColumnBackgroundColor:i,labelColumnTextColor:d,contentColumnBackgroundColor:m,borderColor:u,borderStyle:b,borderWidth:p}=e,g=s()("smb-information",o,{"smb-information--has-border":!!p}),_={"--smb-information--column-padding":a?`var(--smb-information--column-padding-${a})`:void 0,"--smb-information--label-column-background-color":i||void 0,"--smb-information--label-column-text-color":d||void 0,"--smb-information--content-column-background-color":m||void 0,"--smb-information--border-color":u||void 0,"--smb-information--border-style":b||void 0,"--smb-information--border-width":p||void 0};return(0,r.jsx)("div",{...c.useBlockProps.save({className:g,style:_}),"data-sm-split-column":t?"true":void 0,"data-label-align":l||"left","data-label-vertical-align":n||"top",children:(0,r.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-information__body"})})})}})},6942:(e,o)=>{var l;!function(){"use strict";var n={}.hasOwnProperty;function t(){for(var e="",o=0;o<arguments.length;o++){var l=arguments[o];l&&(e=a(e,r(l)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return t.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var o="";for(var l in e)n.call(e,l)&&e[l]&&(o=a(o,l));return o}function a(e,o){return o?e?e+" "+o:e+o:e}e.exports?(t.default=t,e.exports=t):void 0===(l=function(){return t}.apply(o,[]))||(e.exports=l)}()}},l={};function n(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return o[e](r,r.exports,n),r.exports}n.m=o,e=[],n.O=(o,l,t,r)=>{if(!l){var a=1/0;for(d=0;d<e.length;d++){for(var[l,t,r]=e[d],i=!0,s=0;s<l.length;s++)(!1&r||a>=r)&&Object.keys(n.O).every((e=>n.O[e](l[s])))?l.splice(s--,1):(i=!1,r<a&&(a=r));if(i){e.splice(d--,1);var c=t();void 0!==c&&(o=c)}}return o}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[l,t,r]},n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var l in o)n.o(o,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={7238:0,298:0};n.O.j=o=>0===e[o];var o=(o,l)=>{var t,r,[a,i,s]=l,c=0;if(a.some((o=>0!==e[o]))){for(t in i)n.o(i,t)&&(n.m[t]=i[t]);if(s)var d=s(n)}for(o&&o(l);c<a.length;c++)r=a[c],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(d)},l=globalThis.webpackChunk=globalThis.webpackChunk||[];l.forEach(o.bind(null,0)),l.push=o.bind(null,l.push.bind(l))})();var t=n.O(void 0,[298],(()=>n(8666)));t=n.O(t)})();1 (()=>{var e,o={8666:(e,o,l)=>{"use strict";const n=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/information","uK":{"i$":{"A":25},"A0":{"A":"left"},"k1":{"A":"top"},"tW":{"A":false},"Wk":{"A":""},"MG":{"type":"string"},"Xc":{"type":"string"},"Pm":{"type":"string"},"Cz":{},"G8":{},"$X":{}}}'),r=window.ReactJSXRuntime,a=(0,r.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M19.82,4.18V19.82H4.18V4.18H19.82M20.31,3H3.69A.69.69,0,0,0,3,3.69V20.31a.69.69,0,0,0,.69.69H20.31a.69.69,0,0,0,.69-.69V3.69A.69.69,0,0,0,20.31,3Z"}),(0,r.jsx)("rect",{x:"7.5",y:"4.07",width:"1.18",height:"15.99"}),(0,r.jsx)("rect",{x:"4.07",y:"7.38",width:"16.93",height:"1.18"}),(0,r.jsx)("rect",{x:"10.7",y:"11.41",width:"2.84",height:"1.18"}),(0,r.jsx)("rect",{x:"10.7",y:"14.96",width:"2.84",height:"1.18"}),(0,r.jsx)("rect",{x:"14.61",y:"11.41",width:"2.84",height:"1.18"}),(0,r.jsx)("rect",{x:"14.61",y:"14.96",width:"2.84",height:"1.18"})]});var i=l(6942),s=l.n(i);const c=window.wp.blockEditor,d=window.wp.components,u=window.wp.data,m=window.wp.i18n,b=(window.lodash,window.wp.compose),p=["snow-monkey-blocks/information-item"],g=[["snow-monkey-blocks/information-item"]];(0,n.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:o,className:l,clientId:n}){const a=(0,u.useSelect)((e=>!!e("core/block-editor").getBlock(n)?.innerBlocks?.length),[n]),{labelColumnSize:i,labelAlign:_,labelVerticalAlign:k,smIsSplitColumn:h,columnPadding:f,labelColumnBackgroundColor:x,labelColumnTextColor:v,contentColumnBackgroundColor:w,borderColor:C,borderStyle:y,borderWidth:A,templateLock:S}=e,j=s()("smb-information",l,{"smb-information--has-border":!!A}),B={"--smb-information--column-padding":f?`var(--smb-information--column-padding-${f})`:void 0,"--smb-information--label-column-background-color":x||void 0,"--smb-information--label-column-text-color":v||void 0,"--smb-information--content-column-background-color":w||void 0,"--smb-information--border-color":C||void 0,"--smb-information--border-style":y||void 0,"--smb-information--border-width":A||void 0},I=(0,c.useBlockProps)({className:j,style:B}),P=(0,c.useInnerBlocksProps)({className:"smb-information__body"},{allowedBlocks:p,template:g,templateLock:S,renderAppender:a?void 0:c.InnerBlocks.ButtonBlockAppender}),K=(0,b.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},D=[{label:"S",value:1},{label:"M",value:2},{label:"L",value:3}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.InspectorControls,{children:(0,r.jsxs)(d.__experimentalToolsPanel,{label:(0,m.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:K,children:[(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>i!==t.uK.i$.A,isShownByDefault:!0,label:(0,m.__)("Label column size","snow-monkey-blocks"),onDeselect:()=>o({labelColumnSize:t.uK.i$.A}),children:(0,r.jsx)(d.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,m.__)("Label column size","snow-monkey-blocks"),value:i,options:[{value:25,label:(0,m.__)("25%","snow-monkey-blocks")},{value:33,label:(0,m.__)("33%","snow-monkey-blocks")},{value:50,label:(0,m.__)("50%","snow-monkey-blocks")}],onChange:e=>o({labelColumnSize:parseInt(e)})})}),(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>_!==t.uK.A0.A,isShownByDefault:!0,label:(0,m.__)("Label horizontal alignment","snow-monkey-blocks"),onDeselect:()=>o({labelAlign:t.uK.A0.A}),children:(0,r.jsx)(d.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,m.__)("Label horizontal alignment","snow-monkey-blocks"),value:_,options:[{value:"",label:(0,m.__)("Left","snow-monkey-blocks")},{value:"center",label:(0,m.__)("Center","snow-monkey-blocks")},{value:"right",label:(0,m.__)("Right","snow-monkey-blocks")}],onChange:e=>o({labelAlign:e})})}),(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>k!==t.uK.k1.A,isShownByDefault:!0,label:(0,m.__)("Label vertical alignment","snow-monkey-blocks"),onDeselect:()=>o({labelVerticalAlign:t.uK.k1.A}),children:(0,r.jsx)(d.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,m.__)("Label vertical alignment","snow-monkey-blocks"),value:k,options:[{value:"",label:(0,m.__)("Top","snow-monkey-blocks")},{value:"middle",label:(0,m.__)("Middle","snow-monkey-blocks")}],onChange:e=>o({labelVerticalAlign:e})})}),(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>h!==t.uK.tW.A,isShownByDefault:!0,label:(0,m.__)("Don't split the column in a smartphone","snow-monkey-blocks"),onDeselect:()=>o({smIsSplitColumn:t.uK.tW.A}),children:(0,r.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,m.__)("Don't split the column in a smartphone","snow-monkey-blocks"),checked:!h,onChange:e=>o({smIsSplitColumn:!e})})})]})}),(0,r.jsx)(c.InspectorControls,{group:"color",children:(0,r.jsx)(c.__experimentalColorGradientSettingsDropdown,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:n,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:x,onColorChange:e=>o({labelColumnBackgroundColor:e}),resetAllFilter:()=>({labelColumnBackgroundColor:t.uK.MG?.default}),label:(0,m.__)("Label column background color","snow-monkey-blocks")},{colorValue:v,onColorChange:e=>o({labelColumnTextColor:e}),resetAllFilter:()=>({labelColumnTextColor:t.uK.Xc?.default}),label:(0,m.__)("Label column text color","snow-monkey-blocks")},{colorValue:w,onColorChange:e=>o({contentColumnBackgroundColor:e}),resetAllFilter:()=>({contentColumnBackgroundColor:t.uK.Pm?.default}),label:(0,m.__)("Content column background color","snow-monkey-blocks")}]})}),(0,r.jsx)(c.InspectorControls,{group:"border",children:(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>C!==t.uK.Cz.default||y!==t.uK.G8.default||A!==t.uK.$X.default,isShownByDefault:!0,label:(0,m.__)("Border","snow-monkey-blocks"),resetAllFilter:()=>({borderColor:t.uK.Cz.default,borderStyle:t.uK.G8.default,borderWidth:t.uK.$X.default}),onDeselect:()=>o({borderColor:t.uK.Cz.default,borderStyle:t.uK.G8.default,borderWidth:t.uK.$X.default}),panelId:n,children:(0,r.jsx)(d.BorderBoxControl,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),__next40pxDefaultSize:!0,__experimentalIsRenderedInSidebar:!0,className:"smb-border-box-control",enableAlpha:!0,enableStyle:!0,onChange:e=>{o({borderColor:e?.color,borderStyle:e?.style,borderWidth:e?.width})},popoverOffset:40,popoverPlacement:"left-start",value:{color:C,style:y,width:A}})})}),(0,r.jsx)(c.InspectorControls,{group:"dimensions",children:(0,r.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>f!==t.uK.Wk.A,isShownByDefault:!0,label:(0,m.__)("Padding","snow-monkey-blocks"),onDeselect:()=>o({columnPadding:t.uK.Wk.A}),panelId:n,children:(0,r.jsx)(d.BaseControl,{__nextHasNoMarginBottom:!0,id:"snow-monkey-blocks/information/padding",label:(0,m.__)("Padding","snow-monkey-blocks"),className:"spacing-sizes-control",children:(0,r.jsx)(d.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"spacing-sizes-control__range-control",value:D.filter((e=>e.label?.toLowerCase()===f))?.[0]?.value,resetFallbackValue:void 0,onChange:e=>o({columnPadding:D.filter((o=>o.value===e))?.[0]?.label?.toLowerCase()}),withInputField:!1,min:1,max:3,marks:!0,renderTooltipContent:e=>D.filter((o=>o.value===e))?.[0]?.label?.toUpperCase(),hideLabelFromVision:!0,withReset:!0})})})}),(0,r.jsx)("div",{...I,"data-sm-split-column":h?"true":void 0,"data-label-align":_||"left","data-label-vertical-align":k||"top",children:(0,r.jsx)("div",{...P})})]})},save:function({attributes:e,className:o}){const{labelAlign:l,labelVerticalAlign:n,smIsSplitColumn:t,columnPadding:a,labelColumnBackgroundColor:i,labelColumnTextColor:d,contentColumnBackgroundColor:u,borderColor:m,borderStyle:b,borderWidth:p}=e,g=s()("smb-information",o,{"smb-information--has-border":!!p}),_={"--smb-information--column-padding":a?`var(--smb-information--column-padding-${a})`:void 0,"--smb-information--label-column-background-color":i||void 0,"--smb-information--label-column-text-color":d||void 0,"--smb-information--content-column-background-color":u||void 0,"--smb-information--border-color":m||void 0,"--smb-information--border-style":b||void 0,"--smb-information--border-width":p||void 0};return(0,r.jsx)("div",{...c.useBlockProps.save({className:g,style:_}),"data-sm-split-column":t?"true":void 0,"data-label-align":l||"left","data-label-vertical-align":n||"top",children:(0,r.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-information__body"})})})}})},6942:(e,o)=>{var l;!function(){"use strict";var n={}.hasOwnProperty;function t(){for(var e="",o=0;o<arguments.length;o++){var l=arguments[o];l&&(e=a(e,r(l)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return t.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var o="";for(var l in e)n.call(e,l)&&e[l]&&(o=a(o,l));return o}function a(e,o){return o?e?e+" "+o:e+o:e}e.exports?(t.default=t,e.exports=t):void 0===(l=function(){return t}.apply(o,[]))||(e.exports=l)}()}},l={};function n(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return o[e](r,r.exports,n),r.exports}n.m=o,e=[],n.O=(o,l,t,r)=>{if(!l){var a=1/0;for(d=0;d<e.length;d++){for(var[l,t,r]=e[d],i=!0,s=0;s<l.length;s++)(!1&r||a>=r)&&Object.keys(n.O).every((e=>n.O[e](l[s])))?l.splice(s--,1):(i=!1,r<a&&(a=r));if(i){e.splice(d--,1);var c=t();void 0!==c&&(o=c)}}return o}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[l,t,r]},n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var l in o)n.o(o,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={7238:0,298:0};n.O.j=o=>0===e[o];var o=(o,l)=>{var t,r,[a,i,s]=l,c=0;if(a.some((o=>0!==e[o]))){for(t in i)n.o(i,t)&&(n.m[t]=i[t]);if(s)var d=s(n)}for(o&&o(l);c<a.length;c++)r=a[c],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(d)},l=globalThis.webpackChunk=globalThis.webpackChunk||[];l.forEach(o.bind(null,0)),l.push=o.bind(null,l.push.bind(l))})();var t=n.O(void 0,[298],(()=>n(8666)));t=n.O(t)})(); -
snow-monkey-blocks/trunk/dist/blocks/items/item/banner/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' 9b1fc13ba6bd3752eec0');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '29e25c7724e42bbc9a8a'); -
snow-monkey-blocks/trunk/dist/blocks/items/item/banner/index.js
r3390754 r3400189 1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=l(e,n(s)))}return e}function n(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 t="";for(var s in e)i.call(e,s)&&e[s]&&(t=l(t,s));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(s=function(){return a}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var a=t[i];if(void 0!==a)return a.exports;var n=t[i]={exports:{}};return e[i](n,n.exports,s),n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/items-banner","uK":{"title":{"type":"string","source":"html","selector":".smb-items__banner__title","default":""},"lede":{"type":"string","source":"html","selector":".smb-items__banner__lede","default":""},"url":{"type":"string","source":"attribute","selector":".smb-items__banner__action a","attribute":"href"},"target":{"type":"string","source":"attribute","selector":".smb-items__banner__action a","attribute":"target","default":"_self"},"blur":{"type":"boolean","default":false},"textColor":{"type":"string"},"maskColor":{"type":"string"},"maskGradientColor":{"type":"string"},"maskOpacity":{"type":"number","default":1},"imageSize":{"type":"string","default":"default"},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-items__banner__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-items__banner__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-items__banner__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-items__banner__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"contentsAlignment":{"type":"string"},"contentPosition":{"type":"string","default":"center-left"}},"xY":{"html":false}}'),i=window.ReactJSXRuntime,a=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("rect",{x:"1",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M1,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H1.56A.56.56,0,0,0,1,4.06m8.89,8.61H2.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28H9.89a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M1.83,10.05,4,8.45a.15.15,0,0,1,.16,0L5.85,9.52A.13.13,0,0,0,6,9.5l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L8.32,8.32a.14.14,0,0,0-.19,0L6,10.34a.13.13,0,0,1-.17,0L4.18,9.29a.14.14,0,0,0-.16,0L1.83,10.88Z"}),(0,i.jsx)("rect",{x:"1",y:"3.5",width:"10",height:"10",fill:"none"}),(0,i.jsx)("rect",{x:"13",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M13,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H13.56a.56.56,0,0,0-.56.56m8.89,8.61H14.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28h7.78a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M13.83,10.05,16,8.45a.15.15,0,0,1,.16,0l1.67,1.07a.13.13,0,0,0,.17,0l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L20.32,8.32a.14.14,0,0,0-.19,0l-2.11,2a.13.13,0,0,1-.17,0L16.18,9.29a.14.14,0,0,0-.16,0l-2.19,1.59Z"}),(0,i.jsx)("rect",{x:"13",y:"3.5",width:"10",height:"10",fill:"none"})]});var n=s(6942),l=s.n(n);const o=window.wp.components,r=window.wp.blockEditor,m=window.wp.compose,c=window.wp.element,_=window.wp.data,d=window.wp.i18n,u=window.wp.primitives;var g=(0,i.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(u.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const b=window.lodash,h=({id:e,src:t,allowedTypes:s,accept:a,onSelect:n,onSelectURL:l,onRemove:m})=>(0,i.jsxs)(r.BlockControls,{group:"inline",children:[(0,i.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:a,onSelect:n,onSelectURL:l}),!!t&&!!m&&(0,i.jsx)(o.ToolbarButton,{onClick:m,children:(0,d.__)("Release","snow-monkey-blocks")})]}),x=({src:e,alt:t,id:s,style:a,width:n,height:l})=>(0,i.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:a,width:n,height:l}),p=({src:e,style:t,width:s,height:a})=>(0,i.jsx)("video",{src:e,style:t,width:s,height:a}),y=(0,c.memo)((({id:e,src:t,alt:s,url:a,width:n,height:l,target:o,allowedTypes:r,accept:m,onSelect:c,onSelectURL:_,onRemove:d,mediaType:u,style:g,rel:y,linkClass:v})=>{let f;if("image"===u){let r;f=(0,i.jsx)(x,{src:t,alt:s,id:e,style:g,width:n,height:l}),r=y?(0,b.isEmpty)(y)?void 0:y:"_self"!==o&&o?"noopener noreferrer":void 0,a&&(f=(0,i.jsx)("span",{href:a,target:"_self"===o?void 0:o,rel:r,className:v,children:f}))}else"video"===u&&(f=(0,i.jsx)(p,{src:t,style:g,width:n,height:l}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h,{id:e,src:t,allowedTypes:r,accept:m,onSelect:c,onSelectURL:_,onRemove:d}),f]})}),((e,t)=>{const s=Object.keys(e);for(const i of s)if(e[i]!==t[i])return!1;return!0}));function v(e){const{src:t,onSelect:s,onSelectURL:a,mediaType:n,allowedTypes:l=["image"]}=e,o=!n&&t?"image":n;let m=(0,d.__)("Media","snow-monkey-blocks");1===l.length&&("image"===l[0]?m=(0,d.__)("Image","snow-monkey-blocks"):"video"===l[0]&&(m=(0,d.__)("Video","snow-monkey-blocks")));const _=(0,c.useMemo)((()=>l.map((e=>`${e}/*`)).join(",")),[l]);return t?(0,i.jsx)(y,{...e,accept:_,allowedTypes:l,mediaType:o}):(0,i.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:s,onSelectURL:a,accept:_,allowedTypes:l})}const f=[{label:(0,d._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,d._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,d._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,d._x)("Full Size","Image size option for resolution control"),value:"full"}];function k({panelId:e,value:t,onChange:s,options:a=f,defaultValue:n=f[0].value,isShownByDefault:l=!0,withToolsPanelItem:r=!0}){const m=null!=t?t:n,c=()=>(0,i.jsx)(o.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Resolution"),value:m,options:a,onChange:s,help:(0,d.__)("Select the size of the source image."),size:"__unstable-large"});return r?(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>m!==n,label:(0,d.__)("Resolution"),onDeselect:()=>s(n),isShownByDefault:l,panelId:e,children:(0,i.jsx)(c,{})}):(0,i.jsx)(c,{})}const w=(e,t=0,s=null)=>(e=Number(e),(isNaN(e)||e<t)&&(e=t),null!==s&&e>s&&(e=s),e),j=e=>{const t=document.createElement("div");return t.style.display="none",t.innerHTML=e,t.innerText},N=["image"],S="full",C=t.uK,R=t.xY,T=[{attributes:{...C},supports:{...R},save({attributes:e,className:t}){const{title:s,lede:a,url:n,target:o,blur:m,textColor:c,maskColor:_,maskGradientColor:d,maskOpacity:u,imageSize:g,imageID:b,imageURL:h,imageAlt:x,imageWidth:p,imageHeight:y,contentsAlignment:v,contentPosition:f}=e,k=l()("c-row__col",t),w=l()("smb-items__banner",`smb-items__banner--${g}`,{"smb-items__banner--blur":m,[`smb-items__banner--${v}`]:!!v}),N={color:c||void 0},S={opacity:u},C={backgroundColor:_||void 0,backgroundImage:d||void 0};return(0,i.jsx)("div",{...r.useBlockProps.save({className:k}),children:(0,i.jsxs)("div",{className:w,style:N,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>u&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask",style:C}),h?(0,i.jsx)("img",{src:h,alt:x,width:!!p&&p,height:!!y&&y,className:`wp-image-${b}`,style:S}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy",style:S})]}),(!r.RichText.isEmpty(s)||!r.RichText.isEmpty(a))&&(0,i.jsx)("div",{className:"smb-items__banner__body","data-content-position":"contents"!==g&&f?.replace(" ","-")||void 0,children:(0,i.jsxs)("div",{className:"smb-items__banner__body-inner",children:[!r.RichText.isEmpty(s)&&(0,i.jsx)("div",{className:"smb-items__banner__title",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__banner__lede",children:(0,i.jsx)(r.RichText.Content,{value:a})})]})}),!!n&&(0,i.jsx)("div",{className:"smb-items__banner__action",children:(0,i.jsx)("a",{href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:j(s)})})]})})}},{attributes:{...C,align:{type:"string"}},migrate(e){const t={...e};return"left"===e.align?t.contentPosition="center-left":"center"===e.align?t.contentPosition="center-center":"right"===e.align&&(t.contentPosition="center-right"),t},save({attributes:e,className:t}){const{title:s,lede:a,url:n,target:o,blur:m,textColor:c,maskColor:_,maskOpacity:d,imageSize:u,imageID:g,imageURL:b,imageAlt:h,imageWidth:x,imageHeight:p,align:y}=e,v=l()("c-row__col",t),f=l()("smb-items__banner",`smb-items__banner--${u}`,{"smb-items__banner--blur":m,[`has-text-align-${y}`]:y}),k={color:c||void 0},w={opacity:d},N={backgroundColor:_||void 0};return(0,i.jsx)("div",{...r.useBlockProps.save({className:v}),children:(0,i.jsxs)("div",{className:f,style:k,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>d&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask",style:N}),b?(0,i.jsx)("img",{src:b,alt:h,width:!!x&&x,height:!!p&&p,className:`wp-image-${g}`,style:w}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy",style:w})]}),(!r.RichText.isEmpty(s)||!r.RichText.isEmpty(a))&&(0,i.jsxs)("div",{className:"smb-items__banner__body",children:[!r.RichText.isEmpty(s)&&(0,i.jsx)("div",{className:"smb-items__banner__title",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__banner__lede",children:(0,i.jsx)(r.RichText.Content,{value:a})})]}),!!n&&(0,i.jsx)("div",{className:"smb-items__banner__action",children:(0,i.jsx)("a",{href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:j(s)})})]})})}},{attributes:{...C,url:{type:"string",source:"attribute",selector:".smb-items__banner",attribute:"href",default:""}},save({attributes:e,className:t}){const{title:s,lede:a,url:n,target:o,blur:m,textColor:c,maskColor:_,maskOpacity:d,imageSize:u,imageID:g,imageURL:b,imageAlt:h,imageWidth:x,imageHeight:p}=e,y=l()("c-row__col",t),v=l()("smb-items__banner",`smb-items__banner--${u}`,{"smb-items__banner--blur":m}),f={color:c||void 0},k={opacity:d},w={backgroundColor:_||void 0};return(0,i.jsx)("div",{className:y,children:(0,i.jsxs)("a",{className:v,href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",style:f,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>d&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask",style:w}),b?(0,i.jsx)("img",{src:b,alt:h,width:!!x&&x,height:!!p&&p,className:`wp-image-${g}`,style:k}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy",style:k})]}),(!r.RichText.isEmpty(s)||!r.RichText.isEmpty(a))&&(0,i.jsxs)("div",{className:"smb-items__banner__body",children:[!r.RichText.isEmpty(s)&&(0,i.jsx)("div",{className:"smb-items__banner__title",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__banner__lede",children:(0,i.jsx)(r.RichText.Content,{value:a})})]})]})})}}],I={to:[{type:"block",blocks:["snow-monkey-blocks/items-item-standard"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-standard",t)},{type:"block",blocks:["snow-monkey-blocks/items-item-block-link"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-block-link",t)},{type:"block",blocks:["snow-monkey-blocks/items-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.title})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:s,isSelected:a,className:n,clientId:u}){const{title:b,lede:h,url:x,target:p,blur:y,textColor:f,maskColor:j,maskGradientColor:C,maskOpacity:R,imageSize:T,imageID:I,imageURL:z,imageAlt:L,imageWidth:B,imageHeight:D,imageSizeSlug:H,contentsAlignment:P,contentPosition:A}=e,[U, M]=(0,c.useState)(!1),E=!!x,K="_blank"===p,[O,V]=(0,c.useState)(null),$=(0,_.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),W=(0,_.useSelect)((e=>I?e("core").getMedia(I,{context:"view"}):null),[I]),F=$.filter((({slug:e})=>W?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),G=l()("c-row__col",n),Z=l()("smb-items__banner",`smb-items__banner--${T}`,{"smb-items__banner--blur":y,[`smb-items__banner--${P}`]:!!P}),J={"--smb-items--banner--color":f||void 0,"--smb-items--banner--mask-color":j||void 0,"--smb-items--banner--mask-image":C||void 0,"--smb-items--banner--mask-opacity":String(R)},Y=(0,c.useRef)(),X=(0,c.useRef)(),q=(0,r.useBlockProps)({className:G,ref:(0,m.useMergeRefs)([V,Y])}),Q=(0,m.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.InspectorControls,{group:"color",children:(0,i.jsx)(r.__experimentalColorGradientSettingsDropdown,{...(0,r.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:u,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:f,onColorChange:e=>s({textColor:e}),resetAllFilter:()=>({textColor:t.uK.textColor?.default}),label:(0,d.__)("Text color","snow-monkey-blocks")}]})}),(0,i.jsxs)(r.InspectorControls,{children:[(0,i.jsxs)(o.__experimentalToolsPanel,{label:(0,d.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:Q,children:[(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>z!==t.uK.imageURL.default,isShownByDefault:!0,label:(0,d.__)("Image","snow-monkey-blocks"),onDeselect:()=>s({imageID:t.uK.imageID.default,imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default}),children:(0,i.jsx)(o.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Image","snow-monkey-blocks"),id:"snow-monkey-blocks/items-banner/image",children:(0,i.jsx)("div",{className:"smb-image-size-control",children:(0,i.jsx)(v,{src:z,id:I,alt:L,width:B,height:D,onSelect:e=>{const t=e?.sizes?.[H]?H:S,i=e?.sizes?.[t]?.url,a=e?.sizes?.[t]?.width,n=e?.sizes?.[t]?.height;s({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:a||e.width,imageHeight:n||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==z&&s({imageURL:e,imageID:0,mediaSizeSlug:S})},onRemove:()=>s({imageID:t.uK.imageID.default,imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default}),allowedTypes:N})})})}),(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>T!==t.uK.imageSize.default,isShownByDefault:!0,label:(0,d.__)("Image aspect ratio","snow-monkey-blocks"),onDeselect:()=>s({imageSize:t.uK.imageSize.default}),children:(0,i.jsx)(o.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Image aspect ratio","snow-monkey-blocks"),value:T,options:[{value:"default",label:(0,d.__)("Fit to the image","snow-monkey-blocks")},{value:"contents",label:(0,d.__)("Fit to the contents","snow-monkey-blocks")},{value:"standard",label:(0,d.__)("4:3","snow-monkey-blocks")},{value:"wide",label:(0,d.__)("16:9","snow-monkey-blocks")},{value:"vstandard",label:(0,d.__)("3:4","snow-monkey-blocks")},{value:"vwide",label:(0,d.__)("9:16","snow-monkey-blocks")}],onChange:e=>s({imageSize:e})})}),0<F.length&&(0,i.jsx)(k,{defaultValue:t.uK.imageSizeSlug.default,value:H,options:F,onChange:e=>{const t=W?.media_details?.sizes?.[e]?.source_url,i=W?.media_details?.sizes?.[e]?.width,a=W?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:i,imageHeight:a,imageSizeSlug:e})}}),(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>y!==t.uK.blur.default,isShownByDefault:!0,label:(0,d.__)("Shade off","snow-monkey-blocks"),onDeselect:()=>s({blur:t.uK.blur.default}),children:(0,i.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Shade off","snow-monkey-blocks"),checked:y,onChange:e=>s({blur:e})})})]}),(0,i.jsxs)(o.__experimentalToolsPanel,{label:(0,d.__)("Overlay","snow-monkey-blocks"),dropdownMenuProps:Q,children:[(0,i.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,i.jsx)(r.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,d.__)("Color","snow-monkey-blocks"),colorValue:j,onColorChange:e=>s({maskColor:e}),gradientValue:C,onGradientChange:e=>s({maskGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,r.__experimentalUseMultipleOriginColorsAndGradients)()})}),(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>R!==t.uK.maskOpacity.default,isShownByDefault:!0,label:(0,d.__)("Image aspect ratio","snow-monkey-blocks"),onDeselect:()=>s({maskOpacity:t.uK.maskOpacity.default}),children:(0,i.jsx)(o.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Opacity","snow-monkey-blocks"),value:Number((1-R).toFixed(1)),onChange:e=>s({maskOpacity:w((1-e).toFixed(1),0,1)}),min:0,max:1,step:.1})})]})]}),(0,i.jsx)("div",{...q,children:(0,i.jsxs)("div",{className:Z,style:J,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>R&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask"}),z?(0,i.jsx)("img",{src:z,alt:L,width:B,height:D,className:`wp-image-${I}`}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy"})]}),(!r.RichText.isEmpty(b)||!r.RichText.isEmpty(h)||a)&&(0,i.jsx)("div",{className:"smb-items__banner__body","data-content-position":"contents"!==T&&A?.replace(" ","-")||void 0,children:(0,i.jsxs)("div",{className:"smb-items__banner__body-inner",children:[(!r.RichText.isEmpty(b)||a)&&(0,i.jsx)(r.RichText,{className:"smb-items__banner__title",placeholder:(0,d.__)("Write title…","snow-monkey-blocks"),value:b,onChange:e=>s({title:e}),ref:X,withoutInteractiveFormatting:!0}),(!r.RichText.isEmpty(h)||a)&&(0,i.jsx)(r.RichText,{className:"smb-items__banner__lede",placeholder:(0,d.__)("Write lede…","snow-monkey-blocks"),value:h,onChange:e=>s({lede:e}),withoutInteractiveFormatting:!0})]})})]})}),"contents"!==T&&(0,i.jsx)(r.BlockControls,{group:"block",children:(0,i.jsx)(r.__experimentalBlockAlignmentMatrixControl,{label:(0,d.__)("Change content position","snow-monkey-blocks"),value:A,onChange:e=>{s({contentPosition:e})}})}),(0,i.jsxs)(r.BlockControls,{group:"block",children:[(0,i.jsx)(r.AlignmentToolbar,{value:P,onChange:e=>s({contentsAlignment:e})}),(0,i.jsx)(o.ToolbarButton,{name:"link",icon:g,title:(0,d.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),M(!0)},isActive:E})]}),a&&U&&(0,i.jsx)(o.Popover,{placement:"bottom",anchor:O,onClose:()=>{M(!1),X.current?.focus()},children:(0,i.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:x,opensInNewTab:K},onChange:({url:e,opensInNewTab:t})=>{s({url:e,target:t?"_blank":"_self"})},onRemove:()=>{s({url:void 0,target:void 0}),M(!1),X.current?.focus()},forceIsEditingLink:!E})})]})},save:function({attributes:e,className:t}){const{title:s,lede:a,url:n,target:o,blur:m,textColor:c,maskColor:_,maskGradientColor:d,maskOpacity:u,imageSize:g,imageID:b,imageURL:h,imageAlt:x,imageWidth:p,imageHeight:y,contentsAlignment:v,contentPosition:f}=e,k=l()("c-row__col",t),w=l()("smb-items__banner",`smb-items__banner--${g}`,{"smb-items__banner--blur":m,[`smb-items__banner--${v}`]:!!v}),N={"--smb-items--banner--color":c||void 0,"--smb-items--banner--mask-color":_||void 0,"--smb-items--banner--mask-image":d||void 0,"--smb-items--banner--mask-opacity":String(u)};return(0,i.jsx)("div",{...r.useBlockProps.save({className:k}),children:(0,i.jsxs)("div",{className:w,style:N,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>u&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask"}),h?(0,i.jsx)("img",{src:h,alt:x,width:!!p&&p,height:!!y&&y,className:`wp-image-${b}`}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy"})]}),(!r.RichText.isEmpty(s)||!r.RichText.isEmpty(a))&&(0,i.jsx)("div",{className:"smb-items__banner__body","data-content-position":"contents"!==g&&f?.replace(" ","-")||void 0,children:(0,i.jsxs)("div",{className:"smb-items__banner__body-inner",children:[!r.RichText.isEmpty(s)&&(0,i.jsx)("div",{className:"smb-items__banner__title",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__banner__lede",children:(0,i.jsx)(r.RichText.Content,{value:a})})]})}),!!n&&(0,i.jsx)("div",{className:"smb-items__banner__action",children:(0,i.jsx)("a",{href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:j(s)})})]})})},deprecated:T,transforms:I})})()})();1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=l(e,n(s)))}return e}function n(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 t="";for(var s in e)i.call(e,s)&&e[s]&&(t=l(t,s));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(s=function(){return a}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var a=t[i];if(void 0!==a)return a.exports;var n=t[i]={exports:{}};return e[i](n,n.exports,s),n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/items-banner","uK":{"title":{"type":"string","source":"html","selector":".smb-items__banner__title","default":""},"lede":{"type":"string","source":"html","selector":".smb-items__banner__lede","default":""},"url":{"type":"string","source":"attribute","selector":".smb-items__banner__action a","attribute":"href"},"target":{"type":"string","source":"attribute","selector":".smb-items__banner__action a","attribute":"target","default":"_self"},"blur":{"type":"boolean","default":false},"textColor":{"type":"string"},"maskColor":{"type":"string"},"maskGradientColor":{"type":"string"},"maskOpacity":{"type":"number","default":1},"imageSize":{"type":"string","default":"default"},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-items__banner__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-items__banner__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-items__banner__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-items__banner__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"contentsAlignment":{"type":"string"},"contentPosition":{"type":"string","default":"center-left"}},"xY":{"html":false}}'),i=window.ReactJSXRuntime,a=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("rect",{x:"1",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M1,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H1.56A.56.56,0,0,0,1,4.06m8.89,8.61H2.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28H9.89a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M1.83,10.05,4,8.45a.15.15,0,0,1,.16,0L5.85,9.52A.13.13,0,0,0,6,9.5l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L8.32,8.32a.14.14,0,0,0-.19,0L6,10.34a.13.13,0,0,1-.17,0L4.18,9.29a.14.14,0,0,0-.16,0L1.83,10.88Z"}),(0,i.jsx)("rect",{x:"1",y:"3.5",width:"10",height:"10",fill:"none"}),(0,i.jsx)("rect",{x:"13",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M13,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H13.56a.56.56,0,0,0-.56.56m8.89,8.61H14.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28h7.78a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M13.83,10.05,16,8.45a.15.15,0,0,1,.16,0l1.67,1.07a.13.13,0,0,0,.17,0l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L20.32,8.32a.14.14,0,0,0-.19,0l-2.11,2a.13.13,0,0,1-.17,0L16.18,9.29a.14.14,0,0,0-.16,0l-2.19,1.59Z"}),(0,i.jsx)("rect",{x:"13",y:"3.5",width:"10",height:"10",fill:"none"})]});var n=s(6942),l=s.n(n);const o=window.wp.components,r=window.wp.blockEditor,m=window.wp.compose,c=window.wp.element,_=window.wp.data,d=window.wp.i18n,u=window.wp.primitives;var g=(0,i.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(u.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const b=window.lodash,h=({id:e,src:t,allowedTypes:s,accept:a,onSelect:n,onSelectURL:l,onRemove:m})=>(0,i.jsxs)(r.BlockControls,{group:"inline",children:[(0,i.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:a,onSelect:n,onSelectURL:l}),!!t&&!!m&&(0,i.jsx)(o.ToolbarButton,{onClick:m,children:(0,d.__)("Release","snow-monkey-blocks")})]}),x=({src:e,alt:t,id:s,style:a,width:n,height:l})=>(0,i.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:a,width:n,height:l}),p=({src:e,style:t,width:s,height:a})=>(0,i.jsx)("video",{src:e,style:t,width:s,height:a}),y=(0,c.memo)((({id:e,src:t,alt:s,url:a,width:n,height:l,target:o,allowedTypes:r,accept:m,onSelect:c,onSelectURL:_,onRemove:d,mediaType:u,style:g,rel:y,linkClass:v})=>{let f;if("image"===u){let r;f=(0,i.jsx)(x,{src:t,alt:s,id:e,style:g,width:n,height:l}),r=y?(0,b.isEmpty)(y)?void 0:y:"_self"!==o&&o?"noopener noreferrer":void 0,a&&(f=(0,i.jsx)("span",{href:a,target:"_self"===o?void 0:o,rel:r,className:v,children:f}))}else"video"===u&&(f=(0,i.jsx)(p,{src:t,style:g,width:n,height:l}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h,{id:e,src:t,allowedTypes:r,accept:m,onSelect:c,onSelectURL:_,onRemove:d}),f]})}),((e,t)=>{const s=Object.keys(e);for(const i of s)if(e[i]!==t[i])return!1;return!0}));function v(e){const{src:t,onSelect:s,onSelectURL:a,mediaType:n,allowedTypes:l=["image"]}=e,o=!n&&t?"image":n;let m=(0,d.__)("Media","snow-monkey-blocks");1===l.length&&("image"===l[0]?m=(0,d.__)("Image","snow-monkey-blocks"):"video"===l[0]&&(m=(0,d.__)("Video","snow-monkey-blocks")));const _=(0,c.useMemo)((()=>l.map((e=>`${e}/*`)).join(",")),[l]);return t?(0,i.jsx)(y,{...e,accept:_,allowedTypes:l,mediaType:o}):(0,i.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:s,onSelectURL:a,accept:_,allowedTypes:l})}const f=[{label:(0,d._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,d._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,d._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,d._x)("Full Size","Image size option for resolution control"),value:"full"}];function k({panelId:e,value:t,onChange:s,options:a=f,defaultValue:n=f[0].value,isShownByDefault:l=!0,withToolsPanelItem:r=!0}){const m=null!=t?t:n,c=()=>(0,i.jsx)(o.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Resolution"),value:m,options:a,onChange:s,help:(0,d.__)("Select the size of the source image."),size:"__unstable-large"});return r?(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>m!==n,label:(0,d.__)("Resolution"),onDeselect:()=>s(n),isShownByDefault:l,panelId:e,children:(0,i.jsx)(c,{})}):(0,i.jsx)(c,{})}const w=(e,t=0,s=null)=>(e=Number(e),(isNaN(e)||e<t)&&(e=t),null!==s&&e>s&&(e=s),e),j=e=>{const t=document.createElement("div");return t.style.display="none",t.innerHTML=e,t.innerText},N=["image"],S="full",C=t.uK,R=t.xY,T=[{attributes:{...C},supports:{...R},save({attributes:e,className:t}){const{title:s,lede:a,url:n,target:o,blur:m,textColor:c,maskColor:_,maskGradientColor:d,maskOpacity:u,imageSize:g,imageID:b,imageURL:h,imageAlt:x,imageWidth:p,imageHeight:y,contentsAlignment:v,contentPosition:f}=e,k=l()("c-row__col",t),w=l()("smb-items__banner",`smb-items__banner--${g}`,{"smb-items__banner--blur":m,[`smb-items__banner--${v}`]:!!v}),N={color:c||void 0},S={opacity:u},C={backgroundColor:_||void 0,backgroundImage:d||void 0};return(0,i.jsx)("div",{...r.useBlockProps.save({className:k}),children:(0,i.jsxs)("div",{className:w,style:N,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>u&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask",style:C}),h?(0,i.jsx)("img",{src:h,alt:x,width:!!p&&p,height:!!y&&y,className:`wp-image-${b}`,style:S}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy",style:S})]}),(!r.RichText.isEmpty(s)||!r.RichText.isEmpty(a))&&(0,i.jsx)("div",{className:"smb-items__banner__body","data-content-position":"contents"!==g&&f?.replace(" ","-")||void 0,children:(0,i.jsxs)("div",{className:"smb-items__banner__body-inner",children:[!r.RichText.isEmpty(s)&&(0,i.jsx)("div",{className:"smb-items__banner__title",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__banner__lede",children:(0,i.jsx)(r.RichText.Content,{value:a})})]})}),!!n&&(0,i.jsx)("div",{className:"smb-items__banner__action",children:(0,i.jsx)("a",{href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:j(s)})})]})})}},{attributes:{...C,align:{type:"string"}},migrate(e){const t={...e};return"left"===e.align?t.contentPosition="center-left":"center"===e.align?t.contentPosition="center-center":"right"===e.align&&(t.contentPosition="center-right"),t},save({attributes:e,className:t}){const{title:s,lede:a,url:n,target:o,blur:m,textColor:c,maskColor:_,maskOpacity:d,imageSize:u,imageID:g,imageURL:b,imageAlt:h,imageWidth:x,imageHeight:p,align:y}=e,v=l()("c-row__col",t),f=l()("smb-items__banner",`smb-items__banner--${u}`,{"smb-items__banner--blur":m,[`has-text-align-${y}`]:y}),k={color:c||void 0},w={opacity:d},N={backgroundColor:_||void 0};return(0,i.jsx)("div",{...r.useBlockProps.save({className:v}),children:(0,i.jsxs)("div",{className:f,style:k,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>d&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask",style:N}),b?(0,i.jsx)("img",{src:b,alt:h,width:!!x&&x,height:!!p&&p,className:`wp-image-${g}`,style:w}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy",style:w})]}),(!r.RichText.isEmpty(s)||!r.RichText.isEmpty(a))&&(0,i.jsxs)("div",{className:"smb-items__banner__body",children:[!r.RichText.isEmpty(s)&&(0,i.jsx)("div",{className:"smb-items__banner__title",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__banner__lede",children:(0,i.jsx)(r.RichText.Content,{value:a})})]}),!!n&&(0,i.jsx)("div",{className:"smb-items__banner__action",children:(0,i.jsx)("a",{href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:j(s)})})]})})}},{attributes:{...C,url:{type:"string",source:"attribute",selector:".smb-items__banner",attribute:"href",default:""}},save({attributes:e,className:t}){const{title:s,lede:a,url:n,target:o,blur:m,textColor:c,maskColor:_,maskOpacity:d,imageSize:u,imageID:g,imageURL:b,imageAlt:h,imageWidth:x,imageHeight:p}=e,y=l()("c-row__col",t),v=l()("smb-items__banner",`smb-items__banner--${u}`,{"smb-items__banner--blur":m}),f={color:c||void 0},k={opacity:d},w={backgroundColor:_||void 0};return(0,i.jsx)("div",{className:y,children:(0,i.jsxs)("a",{className:v,href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",style:f,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>d&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask",style:w}),b?(0,i.jsx)("img",{src:b,alt:h,width:!!x&&x,height:!!p&&p,className:`wp-image-${g}`,style:k}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy",style:k})]}),(!r.RichText.isEmpty(s)||!r.RichText.isEmpty(a))&&(0,i.jsxs)("div",{className:"smb-items__banner__body",children:[!r.RichText.isEmpty(s)&&(0,i.jsx)("div",{className:"smb-items__banner__title",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__banner__lede",children:(0,i.jsx)(r.RichText.Content,{value:a})})]})]})})}}],I={to:[{type:"block",blocks:["snow-monkey-blocks/items-item-standard"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-standard",t)},{type:"block",blocks:["snow-monkey-blocks/items-item-block-link"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-block-link",t)},{type:"block",blocks:["snow-monkey-blocks/items-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.title})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:s,isSelected:a,className:n,clientId:u}){const{title:b,lede:h,url:x,target:p,blur:y,textColor:f,maskColor:j,maskGradientColor:C,maskOpacity:R,imageSize:T,imageID:I,imageURL:z,imageAlt:L,imageWidth:B,imageHeight:D,imageSizeSlug:H,contentsAlignment:P,contentPosition:A}=e,[U,E]=(0,c.useState)(!1),M=!!x,K="_blank"===p,[O,V]=(0,c.useState)(null),$=(0,_.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),W=(0,_.useSelect)((e=>I?e("core").getEntityRecord("postType","attachment",I):null),[I]),F=$.filter((({slug:e})=>W?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),G=l()("c-row__col",n),Z=l()("smb-items__banner",`smb-items__banner--${T}`,{"smb-items__banner--blur":y,[`smb-items__banner--${P}`]:!!P}),J={"--smb-items--banner--color":f||void 0,"--smb-items--banner--mask-color":j||void 0,"--smb-items--banner--mask-image":C||void 0,"--smb-items--banner--mask-opacity":String(R)},Y=(0,c.useRef)(),X=(0,c.useRef)(),q=(0,r.useBlockProps)({className:G,ref:(0,m.useMergeRefs)([V,Y])}),Q=(0,m.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.InspectorControls,{group:"color",children:(0,i.jsx)(r.__experimentalColorGradientSettingsDropdown,{...(0,r.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:u,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:f,onColorChange:e=>s({textColor:e}),resetAllFilter:()=>({textColor:t.uK.textColor?.default}),label:(0,d.__)("Text color","snow-monkey-blocks")}]})}),(0,i.jsxs)(r.InspectorControls,{children:[(0,i.jsxs)(o.__experimentalToolsPanel,{label:(0,d.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:Q,children:[(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>z!==t.uK.imageURL.default,isShownByDefault:!0,label:(0,d.__)("Image","snow-monkey-blocks"),onDeselect:()=>s({imageID:t.uK.imageID.default,imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default}),children:(0,i.jsx)(o.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Image","snow-monkey-blocks"),id:"snow-monkey-blocks/items-banner/image",children:(0,i.jsx)("div",{className:"smb-image-size-control",children:(0,i.jsx)(v,{src:z,id:I,alt:L,width:B,height:D,onSelect:e=>{const t=e?.sizes?.[H]?H:S,i=e?.sizes?.[t]?.url,a=e?.sizes?.[t]?.width,n=e?.sizes?.[t]?.height;s({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:a||e.width,imageHeight:n||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==z&&s({imageURL:e,imageID:0,mediaSizeSlug:S})},onRemove:()=>s({imageID:t.uK.imageID.default,imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default}),allowedTypes:N})})})}),(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>T!==t.uK.imageSize.default,isShownByDefault:!0,label:(0,d.__)("Image aspect ratio","snow-monkey-blocks"),onDeselect:()=>s({imageSize:t.uK.imageSize.default}),children:(0,i.jsx)(o.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Image aspect ratio","snow-monkey-blocks"),value:T,options:[{value:"default",label:(0,d.__)("Fit to the image","snow-monkey-blocks")},{value:"contents",label:(0,d.__)("Fit to the contents","snow-monkey-blocks")},{value:"standard",label:(0,d.__)("4:3","snow-monkey-blocks")},{value:"wide",label:(0,d.__)("16:9","snow-monkey-blocks")},{value:"vstandard",label:(0,d.__)("3:4","snow-monkey-blocks")},{value:"vwide",label:(0,d.__)("9:16","snow-monkey-blocks")}],onChange:e=>s({imageSize:e})})}),0<F.length&&(0,i.jsx)(k,{defaultValue:t.uK.imageSizeSlug.default,value:H,options:F,onChange:e=>{const t=W?.media_details?.sizes?.[e]?.source_url,i=W?.media_details?.sizes?.[e]?.width,a=W?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:i,imageHeight:a,imageSizeSlug:e})}}),(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>y!==t.uK.blur.default,isShownByDefault:!0,label:(0,d.__)("Shade off","snow-monkey-blocks"),onDeselect:()=>s({blur:t.uK.blur.default}),children:(0,i.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Shade off","snow-monkey-blocks"),checked:y,onChange:e=>s({blur:e})})})]}),(0,i.jsxs)(o.__experimentalToolsPanel,{label:(0,d.__)("Overlay","snow-monkey-blocks"),dropdownMenuProps:Q,children:[(0,i.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,i.jsx)(r.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,d.__)("Color","snow-monkey-blocks"),colorValue:j,onColorChange:e=>s({maskColor:e}),gradientValue:C,onGradientChange:e=>s({maskGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,r.__experimentalUseMultipleOriginColorsAndGradients)()})}),(0,i.jsx)(o.__experimentalToolsPanelItem,{hasValue:()=>R!==t.uK.maskOpacity.default,isShownByDefault:!0,label:(0,d.__)("Image aspect ratio","snow-monkey-blocks"),onDeselect:()=>s({maskOpacity:t.uK.maskOpacity.default}),children:(0,i.jsx)(o.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Opacity","snow-monkey-blocks"),value:Number((1-R).toFixed(1)),onChange:e=>s({maskOpacity:w((1-e).toFixed(1),0,1)}),min:0,max:1,step:.1})})]})]}),(0,i.jsx)("div",{...q,children:(0,i.jsxs)("div",{className:Z,style:J,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>R&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask"}),z?(0,i.jsx)("img",{src:z,alt:L,width:B,height:D,className:`wp-image-${I}`}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy"})]}),(!r.RichText.isEmpty(b)||!r.RichText.isEmpty(h)||a)&&(0,i.jsx)("div",{className:"smb-items__banner__body","data-content-position":"contents"!==T&&A?.replace(" ","-")||void 0,children:(0,i.jsxs)("div",{className:"smb-items__banner__body-inner",children:[(!r.RichText.isEmpty(b)||a)&&(0,i.jsx)(r.RichText,{className:"smb-items__banner__title",placeholder:(0,d.__)("Write title…","snow-monkey-blocks"),value:b,onChange:e=>s({title:e}),ref:X,withoutInteractiveFormatting:!0}),(!r.RichText.isEmpty(h)||a)&&(0,i.jsx)(r.RichText,{className:"smb-items__banner__lede",placeholder:(0,d.__)("Write lede…","snow-monkey-blocks"),value:h,onChange:e=>s({lede:e}),withoutInteractiveFormatting:!0})]})})]})}),"contents"!==T&&(0,i.jsx)(r.BlockControls,{group:"block",children:(0,i.jsx)(r.__experimentalBlockAlignmentMatrixControl,{label:(0,d.__)("Change content position","snow-monkey-blocks"),value:A,onChange:e=>{s({contentPosition:e})}})}),(0,i.jsxs)(r.BlockControls,{group:"block",children:[(0,i.jsx)(r.AlignmentToolbar,{value:P,onChange:e=>s({contentsAlignment:e})}),(0,i.jsx)(o.ToolbarButton,{name:"link",icon:g,title:(0,d.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),E(!0)},isActive:M})]}),a&&U&&(0,i.jsx)(o.Popover,{placement:"bottom",anchor:O,onClose:()=>{E(!1),X.current?.focus()},children:(0,i.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:x,opensInNewTab:K},onChange:({url:e,opensInNewTab:t})=>{s({url:e,target:t?"_blank":"_self"})},onRemove:()=>{s({url:void 0,target:void 0}),E(!1),X.current?.focus()},forceIsEditingLink:!M})})]})},save:function({attributes:e,className:t}){const{title:s,lede:a,url:n,target:o,blur:m,textColor:c,maskColor:_,maskGradientColor:d,maskOpacity:u,imageSize:g,imageID:b,imageURL:h,imageAlt:x,imageWidth:p,imageHeight:y,contentsAlignment:v,contentPosition:f}=e,k=l()("c-row__col",t),w=l()("smb-items__banner",`smb-items__banner--${g}`,{"smb-items__banner--blur":m,[`smb-items__banner--${v}`]:!!v}),N={"--smb-items--banner--color":c||void 0,"--smb-items--banner--mask-color":_||void 0,"--smb-items--banner--mask-image":d||void 0,"--smb-items--banner--mask-opacity":String(u)};return(0,i.jsx)("div",{...r.useBlockProps.save({className:k}),children:(0,i.jsxs)("div",{className:w,style:N,children:[(0,i.jsxs)("div",{className:"smb-items__banner__figure",children:[1>u&&(0,i.jsx)("div",{className:"smb-items__banner__figure__mask"}),h?(0,i.jsx)("img",{src:h,alt:x,width:!!p&&p,height:!!y&&y,className:`wp-image-${b}`}):(0,i.jsx)("div",{className:"smb-items__banner__figure__dummy"})]}),(!r.RichText.isEmpty(s)||!r.RichText.isEmpty(a))&&(0,i.jsx)("div",{className:"smb-items__banner__body","data-content-position":"contents"!==g&&f?.replace(" ","-")||void 0,children:(0,i.jsxs)("div",{className:"smb-items__banner__body-inner",children:[!r.RichText.isEmpty(s)&&(0,i.jsx)("div",{className:"smb-items__banner__title",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__banner__lede",children:(0,i.jsx)(r.RichText.Content,{value:a})})]})}),!!n&&(0,i.jsx)("div",{className:"smb-items__banner__action",children:(0,i.jsx)("a",{href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:j(s)})})]})})},deprecated:T,transforms:I})})()})(); -
snow-monkey-blocks/trunk/dist/blocks/items/item/block-link/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => ' 1a410bf28dc25e358766');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => '4c302ba07b8278910aa5'); -
snow-monkey-blocks/trunk/dist/blocks/items/item/block-link/index.js
r3390754 r3400189 1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=n(e,a(s)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var s in e)i.call(e,s)&&e[s]&&(t=n(t,s));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(s=function(){return l}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var l=t[i];if(void 0!==l)return l.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/items-item-block-link","uK":{"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-items__item__title","default":""},"lede":{"type":"string","source":"html","selector":".smb-items__item__lede","default":""},"summary":{"type":"string","source":"html","selector":".smb-items__item__content","default":""},"url":{"type":"string","source":"attribute","selector":".smb-items__item__action > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":".smb-items__item__action > a","attribute":"rel"},"target":{"type":"string","source":"attribute","selector":".smb-items__item__action > a","attribute":"target"},"displayImage":{"type":"boolean","default":false},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"displayBtn":{"type":"boolean","default":false},"btnLabel":{"type":"string","source":"html","selector":".smb-items__item__action > a > span","role":"content"},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false}},"xY":{"html":false,"color":{"__experimentalSkipSerialization":true,"background":true,"text":true,"link":true}}}'),i=window.ReactJSXRuntime,l=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("rect",{x:"1",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M1,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H1.56A.56.56,0,0,0,1,4.06m8.89,8.61H2.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28H9.89a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M1.83,10.05,4,8.45a.15.15,0,0,1,.16,0L5.85,9.52A.13.13,0,0,0,6,9.5l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L8.32,8.32a.14.14,0,0,0-.19,0L6,10.34a.13.13,0,0,1-.17,0L4.18,9.29a.14.14,0,0,0-.16,0L1.83,10.88Z"}),(0,i.jsx)("rect",{x:"1",y:"3.5",width:"10",height:"10",fill:"none"}),(0,i.jsx)("rect",{x:"13",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M13,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H13.56a.56.56,0,0,0-.56.56m8.89,8.61H14.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28h7.78a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M13.83,10.05,16,8.45a.15.15,0,0,1,.16,0l1.67,1.07a.13.13,0,0,0,.17,0l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L20.32,8.32a.14.14,0,0,0-.19,0l-2.11,2a.13.13,0,0,1-.17,0L16.18,9.29a.14.14,0,0,0-.16,0l-2.19,1.59Z"}),(0,i.jsx)("rect",{x:"13",y:"3.5",width:"10",height:"10",fill:"none"})]});var a=s(6942),n=s.n(a);const o=window.lodash,r=window.wp.components,m=window.wp.blockEditor,c=window.wp.compose,d=window.wp.data,b=window.wp.element,_=window.wp.primitives;var u=(0,i.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(_.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),g=(0,i.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(_.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const h=window.wp.keycodes,x=window.wp.url,p=window.wp.i18n,v= ({id:e,src:t,allowedTypes:s,accept:l,onSelect:a,onSelectURL:n,onRemove:o})=>(0,i.jsxs)(m.BlockControls,{group:"inline",children:[(0,i.jsx)(m.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:l,onSelect:a,onSelectURL:n}),!!t&&!!o&&(0,i.jsx)(r.ToolbarButton,{onClick:o,children:(0,p.__)("Release","snow-monkey-blocks")})]}),y=({src:e,alt:t,id:s,style:l,width:a,height:n})=>(0,i.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:l,width:a,height:n}),k=({src:e,style:t,width:s,height:l})=>(0,i.jsx)("video",{src:e,style:t,width:s,height:l}),f=(0,b.memo)((({id:e,src:t,alt:s,url:l,width:a,height:n,target:r,allowedTypes:m,accept:c,onSelect:d,onSelectURL:b,onRemove:_,mediaType:u,style:g,rel:h,linkClass:x})=>{let p;if("image"===u){let m;p=(0,i.jsx)(y,{src:t,alt:s,id:e,style:g,width:a,height:n}),m=h?(0,o.isEmpty)(h)?void 0:h:"_self"!==r&&r?"noopener noreferrer":void 0,l&&(p=(0,i.jsx)("span",{href:l,target:"_self"===r?void 0:r,rel:m,className:x,children:p}))}else"video"===u&&(p=(0,i.jsx)(k,{src:t,style:g,width:a,height:n}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{id:e,src:t,allowedTypes:m,accept:c,onSelect:d,onSelectURL:b,onRemove:_}),p]})}),((e,t)=>{const s=Object.keys(e);for(const i of s)if(e[i]!==t[i])return!1;return!0}));function j(e){const{src:t,onSelect:s,onSelectURL:l,mediaType:a,allowedTypes:n=["image"]}=e,o=!a&&t?"image":a;let r=(0,p.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?r=(0,p.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(r=(0,p.__)("Video","snow-monkey-blocks")));const c=(0,b.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,i.jsx)(f,{...e,accept:c,allowedTypes:n,mediaType:o}):(0,i.jsx)(m.MediaPlaceholder,{icon:"format-image",labels:{title:r},onSelect:s,onSelectURL:l,accept:c,allowedTypes:n})}const w=[{label:(0,p._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,p._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,p._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,p._x)("Full Size","Image size option for resolution control"),value:"full"}];function N({panelId:e,value:t,onChange:s,options:l=w,defaultValue:a=w[0].value,isShownByDefault:n=!0,withToolsPanelItem:o=!0}){const m=null!=t?t:a,c=()=>(0,i.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,p.__)("Resolution"),value:m,options:l,onChange:s,help:(0,p.__)("Select the size of the source image."),size:"__unstable-large"});return o?(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>m!==a,label:(0,p.__)("Resolution"),onDeselect:()=>s(a),isShownByDefault:n,panelId:e,children:(0,i.jsx)(c,{})}):(0,i.jsx)(c,{})}const T="noreferrer noopener",R="_blank",C="nofollow",B=[...m.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,p.__)("Mark as nofollow","snow-monkey-blocks")}],S=["image"],L="full",I=t.uK,z=t.xY,D=[{attributes:{...I,btnLabel:{...I.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},target:{...I.target,selector:".smb-items__item--block-link",default:"_self"},url:{...I.url,selector:".smb-items__item--block-link",default:""},btnBorderRadius:{type:"number"}},supports:{...z},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,displayImage:d,imageID:b,imageURL:_,imageAlt:u,imageWidth:g,imageHeight:h,displayBtn:x,btnLabel:p,btnBackgroundColor:v,btnBackgroundGradientColor:y,btnTextColor:k,btnSize:f,btnBorderRadius:j,btnWrap:w}=e,N=(0,m.__experimentalGetColorClassesAndStyles)(e),T=n()("c-row__col",t),R=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${f}`]:!!f,"smb-btn--wrap":w}),C={"--smb-btn--background-color":v||void 0,"--smb-btn--background-image":y||void 0,"--smb-btn--border-radius":String(j).match(/^\d+$/)?`${j}px`:j,"--smb-btn--color":k||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:T}),children:(0,i.jsxs)("a",{className:n()("smb-items__item","smb-items__item--block-link",N?.className),style:{...N?.style},href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[d&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:_,alt:u,width:!!g&&g,height:!!h&&h,className:`wp-image-${b}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),x&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:R,href:r,style:C,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:p})})})})]})]})})}},{attributes:{...I,btnLabel:{...I.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},target:{...I.target,selector:".smb-items__item--block-link",default:"_self"},url:{...I.url,selector:".smb-items__item--block-link",default:""},btnBorderRadius:{type:"number"}},supports:{...z},migrate(e){const{btnLabel:t,imageURL:s,btnBorderRadius:i}=e;return m.RichText.isEmpty(t)||(e.displayBtn=!0),s&&(e.displayImage=!0),e.btnBorderRadius=String(i).match(/^\d+$/)?`${i}px`:i,e},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:v,btnSize:y,btnBorderRadius:k,btnWrap:f}=e,j=n()("c-row__col",t),w=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),N={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":p||void 0,"--smb-btn--border-radius":String(k).match(/^\d+$/)?`${k}px`:k,"--smb-btn--color":v||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:j}),children:(0,i.jsxs)("a",{className:"smb-items__item smb-items__item--block-link",href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:w,href:r,style:N,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...I,btnLabel:{...I.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},target:{...I.target,selector:".smb-items__item--block-link",default:"_self"},url:{...I.url,selector:".smb-items__item--block-link",default:""},btnBorderRadius:{type:"number"}},supports:{...z},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:v,btnSize:y,btnBorderRadius:k,btnWrap:f}=e,j=n()("c-row__col",t),w=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),N={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":p||void 0,"--smb-btn--border-radius":void 0!==k?`${k}px`:void 0,"--smb-btn--color":v||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:j}),children:(0,i.jsxs)("a",{className:"smb-items__item smb-items__item--block-link",href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:w,href:r,style:N,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...I,btnLabel:{...I.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},target:{...I.target,selector:".smb-items__item--block-link",default:"_self"},url:{...I.url,selector:".smb-items__item--block-link",default:""},btnBorderRadius:{type:"number"}},supports:{...z},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:v,btnSize:y,btnBorderRadius:k,btnWrap:f}=e,j=n()("c-row__col",t),w=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),N={color:v||void 0},T={backgroundColor:x||void 0,backgroundImage:p||void 0,borderRadius:void 0!==k?`${k}px`:void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:j}),children:(0,i.jsxs)("a",{className:"smb-items__item smb-items__item--block-link",href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:w,href:r,style:T,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",style:N,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...I,btnLabel:{...I.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},url:{type:"string",default:""},target:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnTextColor:p,btnSize:v,btnBorderRadius:y,btnWrap:k}=e,f=n()("c-row__col",t),j=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":k}),w={color:p||void 0},N={backgroundColor:x||void 0,borderRadius:void 0!==y?`${y}px`:void 0};return(0,i.jsx)("div",{className:f,children:(0,i.jsxs)("a",{className:"smb-items__item smb-items__item--block-link",href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),"none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:j,style:N,children:(0,i.jsx)("span",{className:"smb-btn__label",style:w,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})})}},{attributes:{...I,btnLabel:{...I.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},url:{type:"string",default:""},target:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnTextColor:p,btnSize:v,btnBorderRadius:y,btnWrap:k}=e,f=n()("c-row__col",t),j=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":k}),w={color:p||void 0},N={backgroundColor:x||void 0,borderRadius:void 0!==y?`${y}px`:void 0};return(0,i.jsx)("div",{className:f,children:(0,i.jsxs)("div",{className:"smb-items__item smb-items__item--block-link",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),"none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:j,href:r,style:N,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",style:w,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})})}},{attributes:{...I,btnLabel:{...I.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},url:{type:"string",default:""},target:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,btnLabel:r,url:c,target:d,btnBackgroundColor:b,btnTextColor:_,imageID:u,imageURL:g,imageAlt:h,imageWidth:x,imageHeight:p}=e,v=n()("c-row__col",t),y={color:_||void 0},k={backgroundColor:b||void 0};return(0,i.jsx)("div",{className:v,children:(0,i.jsxs)("a",{className:"smb-items__item",href:c,target:"_self"===d?void 0:d,rel:"_blank"===d?"noopener noreferrer":void 0,children:[!!g&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:g,alt:h,width:!!x&&x,height:!!p&&p,className:`wp-image-${u}`})}),"none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(r)&&!!c&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:"smb-items__item__btn smb-btn",style:k,children:(0,i.jsx)("span",{className:"smb-btn__label",style:y,children:(0,i.jsx)(m.RichText.Content,{value:r})})})})]})})}}],H={to:[{type:"block",blocks:["snow-monkey-blocks/items-item-standard"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-standard",t)},{type:"block",blocks:["snow-monkey-blocks/items-banner"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-banner",t)},{type:"block",blocks:["snow-monkey-blocks/items-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.summary})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:e,setAttributes:s,isSelected:l,className:a}){const{titleTagName:_,title:v,lede:y,summary:k,url:f,rel:w,target:I,displayImage:z,imageID:D,imageURL:H,imageAlt:$,imageWidth:E,imageHeight:W,imageSizeSlug:P,displayBtn:U,btnLabel:M,btnBackgroundColor:A,btnBackgroundGradientColor:V,btnTextColor:K,btnSize:G,btnBorderRadius:O,btnWrap:F}=e,Z=(0,m.__experimentalUseColorProps)(e),J=(0,b.useRef)(),[Y,Q]=(0,b.useState)(),[X,q]=(0,b.useState)(!1),ee=!!f,te=I===R,se=!!w?.includes(C),ie=(0,b.useMemo)((()=>({url:f,title:M,opensInNewTab:te,nofollow:se})),[f,M,te,se]);function le(){s({url:void 0,target:void 0,rel:void 0}),q(!1)}const ae=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),ne=(0,d.useSelect)((e=>D?e("core").getMedia(D,{context:"view"}):null),[D]),oe=ae.filter((({slug:e})=>ne?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),re=(0,m.__experimentalUseMultipleOriginColorsAndGradients)(),me=["div","h2","h3","none"],ce=n()("c-row__col",a),de=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${G}`]:!!G,"smb-btn--wrap":F}),be={"--smb-btn--background-color":A||void 0,"--smb-btn--background-image":V||void 0,"--smb-btn--border-radius":String(O).match(/^\d+$/)?`${O}px`:O,"--smb-btn--color":K||void 0},_e=(0,m.useBlockProps)({className:ce,ref:(0,c.useMergeRefs)([Q,J])}),ue=(0,c.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(m.InspectorControls,{children:[(0,i.jsx)(r.__experimentalToolsPanel,{label:(0,p.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ue,children:(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>_!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,p.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>s({titleTagName:t.uK.titleTagName.default}),children:(0,i.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/items-item-block-link/title-tag-name",children:(0,i.jsx)("div",{className:"smb-list-icon-selector",children:(0,o.times)(me.length,(e=>(0,i.jsx)(r.Button,{variant:_===me[e]?"primary":"secondary",onClick:()=>{s({titleTagName:me[e]})},children:me[e]},e)))})})})}),(0,i.jsxs)(r.__experimentalToolsPanel,{label:(0,p.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>z!==t.uK.displayImage.default,isShownByDefault:!0,label:(0,p.__)("Display image","snow-monkey-blocks"),onDeselect:()=>s({displayImage:t.uK.displayImage.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Display image","snow-monkey-blocks"),checked:z,onChange:e=>s({displayImage:e})})}),z&&0<oe.length&&(0,i.jsx)(N,{defaultValue:t.uK.imageSizeSlug.default,value:P,options:oe,onChange:e=>{const t=ne?.media_details?.sizes?.[e]?.source_url,i=ne?.media_details?.sizes?.[e]?.width,l=ne?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:i,imageHeight:l,imageSizeSlug:e})}})]}),(0,i.jsxs)(r.__experimentalToolsPanel,{label:(0,p.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:ue,children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>U!==t.uK.displayBtn.default,isShownByDefault:!0,label:(0,p.__)("Display button","snow-monkey-blocks"),onDeselect:()=>s({displayBtn:t.uK.displayBtn.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Display button","snow-monkey-blocks"),checked:U,onChange:e=>s({displayBtn:e})})}),U&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>G!==t.uK.btnSize.default,isShownByDefault:!0,label:(0,p.__)("Button size","snow-monkey-blocks"),onDeselect:()=>s({btnSize:t.uK.btnSize.default}),children:(0,i.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,p.__)("Button size","snow-monkey-blocks"),value:G,onChange:e=>s({btnSize:e}),options:[{value:"",label:(0,p.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,p.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,p.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,p.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,p.__)("Full size","snow-monkey-blocks")}]})}),(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>O!==t.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,p.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>s({btnBorderRadius:t.uK.btnBorderRadius.default}),children:(0,i.jsx)("div",{className:"smb-border-radius-control",children:(0,i.jsx)(m.__experimentalBorderRadiusControl,{values:O,onChange:e=>{s({btnBorderRadius:e})}})})}),(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>F!==t.uK.btnWrap.default,isShownByDefault:!0,label:(0,p.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>s({btnWrap:t.uK.btnWrap.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Wrap","snow-monkey-blocks"),checked:F,onChange:e=>s({btnWrap:e})})}),(0,i.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,i.jsx)(m.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,p.__)("Background color","snow-monkey-blocks"),colorValue:A,onColorChange:e=>s({btnBackgroundColor:e}),gradientValue:V,onGradientChange:e=>s({btnBackgroundGradientColor:e})},{label:(0,p.__)("Text color","snow-monkey-blocks"),colorValue:K,onColorChange:e=>s({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...re})}),(0,i.jsx)(m.ContrastChecker,{backgroundColor:A,textColor:K})]})]})]}),(0,i.jsx)("div",{..._e,children:(0,i.jsxs)("div",{className:n()("smb-items__item","smb-items__item--block-link",Z?.className),style:{...Z?.style},children:[z&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)(j,{src:H,id:D,alt:$,width:E,height:W,onSelect:e=>{const t=e?.sizes?.[P]?P:L,i=e?.sizes?.[t]?.url,l=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;s({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:l||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==H&&s({imageURL:e,imageID:0,mediaSizeSlug:L})},onRemove:()=>s({imageID:t.uK.imageID.default,imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default}),allowedTypes:S})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==_&&(0,i.jsx)(m.RichText,{tagName:_,className:"smb-items__item__title",placeholder:(0,p.__)("Write title…","snow-monkey-blocks"),value:v,onChange:e=>s({title:e})}),(!m.RichText.isEmpty(y)||l)&&(0,i.jsx)(m.RichText,{className:"smb-items__item__lede",placeholder:(0,p.__)("Write lede…","snow-monkey-blocks"),value:y,onChange:e=>s({lede:e})}),(!m.RichText.isEmpty(k)||l)&&(0,i.jsx)(m.RichText,{className:"smb-items__item__content",placeholder:(0,p.__)("Write content…","snow-monkey-blocks"),value:k,onChange:e=>s({summary:e})}),(ee||U)&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:U?de:void 0,style:U?be:void 0,href:f,target:I,rel:w,children:U?(0,i.jsx)(m.RichText,{className:"smb-btn__label",value:M,placeholder:(0,p.__)("Button","snow-monkey-blocks"),onChange:e=>s({btnLabel:e}),withoutInteractiveFormatting:!0}):(0,i.jsx)("span",{className:"screen-reader-text",children:M||(0,p.__)("Learn more","snow-monkey-blocks")})})})]})]})}),(0,i.jsxs)(m.BlockControls,{group:"block",children:[!ee&&(0,i.jsx)(r.ToolbarButton,{name:"link",icon:u,title:(0,p.__)("Link"),shortcut:h.displayShortcut.primary("k"),onClick:function(e){e.preventDefault(),q(!0)}}),ee&&(0,i.jsx)(r.ToolbarButton,{name:"link",icon:g,title:(0,p.__)("Unlink"),shortcut:h.displayShortcut.primaryShift("k"),onClick:le,isActive:!0})]}),l&&(X||ee)&&(0,i.jsx)(r.Popover,{position:"bottom center",onClose:()=>{q(!1)},anchor:Y,focusOnMount:!!X&&"firstElement",children:(0,i.jsx)(m.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:ie,onChange:({url:e="",title:t,opensInNewTab:i,nofollow:l})=>{s(function({rel:e="",url:t="",title:s,opensInNewTab:i,nofollow:l}){let a,n=e;if(i)a=R,n=n?.includes(T)?n:n+` ${T}`;else{const e=new RegExp(`\\b${T}\\s*`,"g");n=n?.replace(e,"").trim()}if(l)n=n?.includes(C)?n:(n+` ${C}`).trim();else{const e=new RegExp(`\\b${C}\\s*`,"g");n=n?.replace(e,"").trim()}return{url:(0,x.prependHTTP)(t),btnLabel:s,target:a,rel:n||void 0}}({rel:w,url:e,title:t,opensInNewTab:i,nofollow:l}))},onRemove:()=>{le()},forceIsEditingLink:X,hasRichPreviews:!0,hasTextControl:!U,settings:B,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})]})},save:function({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,rel:c,target:d,displayImage:b,imageID:_,imageURL:u,imageAlt:g,imageWidth:h,imageHeight:x,displayBtn:v,btnLabel:y,btnBackgroundColor:k,btnBackgroundGradientColor:f,btnTextColor:j,btnSize:w,btnBorderRadius:N,btnWrap:T}=e,R=!!r,C=(0,m.__experimentalGetColorClassesAndStyles)(e),B=n()("c-row__col",t),S=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${w}`]:!!w,"smb-btn--wrap":T}),L={"--smb-btn--background-color":k||void 0,"--smb-btn--background-image":f||void 0,"--smb-btn--border-radius":String(N).match(/^\d+$/)?`${N}px`:N,"--smb-btn--color":j||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:B}),children:(0,i.jsxs)("div",{className:n()("smb-items__item","smb-items__item--block-link",C?.className),style:{...C?.style},children:[b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:u,alt:g,width:!!h&&h,height:!!x&&x,className:`wp-image-${_}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),(R||v)&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:v?S:void 0,style:v?L:void 0,href:r,target:d,rel:c,children:v?(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:y})}):(0,i.jsx)("span",{className:"screen-reader-text",children:y||(0,p.__)("Learn more","snow-monkey-blocks")})})})]})]})})},deprecated:D,transforms:H})})()})();1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=n(e,a(s)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var s in e)i.call(e,s)&&e[s]&&(t=n(t,s));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(s=function(){return l}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var l=t[i];if(void 0!==l)return l.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/items-item-block-link","uK":{"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-items__item__title","default":""},"lede":{"type":"string","source":"html","selector":".smb-items__item__lede","default":""},"summary":{"type":"string","source":"html","selector":".smb-items__item__content","default":""},"url":{"type":"string","source":"attribute","selector":".smb-items__item__action > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":".smb-items__item__action > a","attribute":"rel"},"target":{"type":"string","source":"attribute","selector":".smb-items__item__action > a","attribute":"target"},"displayImage":{"type":"boolean","default":false},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"displayBtn":{"type":"boolean","default":false},"btnLabel":{"type":"string","source":"html","selector":".smb-items__item__action > a > span","role":"content"},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false}},"xY":{"html":false,"color":{"__experimentalSkipSerialization":true,"background":true,"text":true,"link":true}}}'),i=window.ReactJSXRuntime,l=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("rect",{x:"1",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M1,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H1.56A.56.56,0,0,0,1,4.06m8.89,8.61H2.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28H9.89a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M1.83,10.05,4,8.45a.15.15,0,0,1,.16,0L5.85,9.52A.13.13,0,0,0,6,9.5l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L8.32,8.32a.14.14,0,0,0-.19,0L6,10.34a.13.13,0,0,1-.17,0L4.18,9.29a.14.14,0,0,0-.16,0L1.83,10.88Z"}),(0,i.jsx)("rect",{x:"1",y:"3.5",width:"10",height:"10",fill:"none"}),(0,i.jsx)("rect",{x:"13",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M13,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H13.56a.56.56,0,0,0-.56.56m8.89,8.61H14.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28h7.78a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M13.83,10.05,16,8.45a.15.15,0,0,1,.16,0l1.67,1.07a.13.13,0,0,0,.17,0l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L20.32,8.32a.14.14,0,0,0-.19,0l-2.11,2a.13.13,0,0,1-.17,0L16.18,9.29a.14.14,0,0,0-.16,0l-2.19,1.59Z"}),(0,i.jsx)("rect",{x:"13",y:"3.5",width:"10",height:"10",fill:"none"})]});var a=s(6942),n=s.n(a);const o=window.lodash,r=window.wp.components,m=window.wp.blockEditor,c=window.wp.compose,d=window.wp.data,b=window.wp.element,_=window.wp.primitives;var u=(0,i.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(_.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),g=(0,i.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(_.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const h=window.wp.keycodes,x=window.wp.url,p=window.wp.i18n,v=e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const t=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft].map((e=>null==e||""===e?"":/^\d+$/.test(String(e))?`${e}px`:String(e))),s=t.filter(Boolean);if(0===s.length)return;if(4===s.length){const[e,s,i,l]=t;if(e===s&&s===i&&i===l)return e;if(e===i&&s===l)return`${e} ${s}`;if(s===l)return`${e} ${s} ${i}`}return s.join(" ")}return/^\d+$/.test(String(e))?`${e}px`:e}},y=({id:e,src:t,allowedTypes:s,accept:l,onSelect:a,onSelectURL:n,onRemove:o})=>(0,i.jsxs)(m.BlockControls,{group:"inline",children:[(0,i.jsx)(m.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:l,onSelect:a,onSelectURL:n}),!!t&&!!o&&(0,i.jsx)(r.ToolbarButton,{onClick:o,children:(0,p.__)("Release","snow-monkey-blocks")})]}),k=({src:e,alt:t,id:s,style:l,width:a,height:n})=>(0,i.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:l,width:a,height:n}),f=({src:e,style:t,width:s,height:l})=>(0,i.jsx)("video",{src:e,style:t,width:s,height:l}),j=(0,b.memo)((({id:e,src:t,alt:s,url:l,width:a,height:n,target:r,allowedTypes:m,accept:c,onSelect:d,onSelectURL:b,onRemove:_,mediaType:u,style:g,rel:h,linkClass:x})=>{let p;if("image"===u){let m;p=(0,i.jsx)(k,{src:t,alt:s,id:e,style:g,width:a,height:n}),m=h?(0,o.isEmpty)(h)?void 0:h:"_self"!==r&&r?"noopener noreferrer":void 0,l&&(p=(0,i.jsx)("span",{href:l,target:"_self"===r?void 0:r,rel:m,className:x,children:p}))}else"video"===u&&(p=(0,i.jsx)(f,{src:t,style:g,width:a,height:n}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y,{id:e,src:t,allowedTypes:m,accept:c,onSelect:d,onSelectURL:b,onRemove:_}),p]})}),((e,t)=>{const s=Object.keys(e);for(const i of s)if(e[i]!==t[i])return!1;return!0}));function w(e){const{src:t,onSelect:s,onSelectURL:l,mediaType:a,allowedTypes:n=["image"]}=e,o=!a&&t?"image":a;let r=(0,p.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?r=(0,p.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(r=(0,p.__)("Video","snow-monkey-blocks")));const c=(0,b.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,i.jsx)(j,{...e,accept:c,allowedTypes:n,mediaType:o}):(0,i.jsx)(m.MediaPlaceholder,{icon:"format-image",labels:{title:r},onSelect:s,onSelectURL:l,accept:c,allowedTypes:n})}const N=[{label:(0,p._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,p._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,p._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,p._x)("Full Size","Image size option for resolution control"),value:"full"}];function R({panelId:e,value:t,onChange:s,options:l=N,defaultValue:a=N[0].value,isShownByDefault:n=!0,withToolsPanelItem:o=!0}){const m=null!=t?t:a,c=()=>(0,i.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,p.__)("Resolution"),value:m,options:l,onChange:s,help:(0,p.__)("Select the size of the source image."),size:"__unstable-large"});return o?(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>m!==a,label:(0,p.__)("Resolution"),onDeselect:()=>s(a),isShownByDefault:n,panelId:e,children:(0,i.jsx)(c,{})}):(0,i.jsx)(c,{})}const T="noreferrer noopener",C="_blank",B="nofollow",S=[...m.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,p.__)("Mark as nofollow","snow-monkey-blocks")}],L=["image"],I="full",z=t.uK,D=t.xY,H=[{attributes:{...z,btnLabel:{...z.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},target:{...z.target,selector:".smb-items__item--block-link",default:"_self"},url:{...z.url,selector:".smb-items__item--block-link",default:""},btnBorderRadius:{type:"number"}},supports:{...D},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,displayImage:d,imageID:b,imageURL:_,imageAlt:u,imageWidth:g,imageHeight:h,displayBtn:x,btnLabel:p,btnBackgroundColor:y,btnBackgroundGradientColor:k,btnTextColor:f,btnSize:j,btnBorderRadius:w,btnWrap:N}=e,R=(0,m.__experimentalGetColorClassesAndStyles)(e),T=n()("c-row__col",t),C=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${j}`]:!!j,"smb-btn--wrap":N}),B={"--smb-btn--background-color":y||void 0,"--smb-btn--background-image":k||void 0,"--smb-btn--border-radius":v(w),"--smb-btn--color":f||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:T}),children:(0,i.jsxs)("a",{className:n()("smb-items__item","smb-items__item--block-link",R?.className),style:{...R?.style},href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[d&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:_,alt:u,width:!!g&&g,height:!!h&&h,className:`wp-image-${b}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),x&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:C,href:r,style:B,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:p})})})})]})]})})}},{attributes:{...z,btnLabel:{...z.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},target:{...z.target,selector:".smb-items__item--block-link",default:"_self"},url:{...z.url,selector:".smb-items__item--block-link",default:""},btnBorderRadius:{type:"number"}},supports:{...D},migrate(e){const{btnLabel:t,imageURL:s,btnBorderRadius:i}=e;return m.RichText.isEmpty(t)||(e.displayBtn=!0),s&&(e.displayImage=!0),e.btnBorderRadius=v(i),e},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:y,btnSize:k,btnBorderRadius:f,btnWrap:j}=e,w=n()("c-row__col",t),N=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${k}`]:!!k,"smb-btn--wrap":j}),R={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":p||void 0,"--smb-btn--border-radius":v(f),"--smb-btn--color":y||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:w}),children:(0,i.jsxs)("a",{className:"smb-items__item smb-items__item--block-link",href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:N,href:r,style:R,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...z,btnLabel:{...z.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},target:{...z.target,selector:".smb-items__item--block-link",default:"_self"},url:{...z.url,selector:".smb-items__item--block-link",default:""},btnBorderRadius:{type:"number"}},supports:{...D},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:y,btnSize:k,btnBorderRadius:f,btnWrap:j}=e,w=n()("c-row__col",t),N=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${k}`]:!!k,"smb-btn--wrap":j}),R={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":p||void 0,"--smb-btn--border-radius":v(f),"--smb-btn--color":y||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:w}),children:(0,i.jsxs)("a",{className:"smb-items__item smb-items__item--block-link",href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:N,href:r,style:R,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...z,btnLabel:{...z.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},target:{...z.target,selector:".smb-items__item--block-link",default:"_self"},url:{...z.url,selector:".smb-items__item--block-link",default:""},btnBorderRadius:{type:"number"}},supports:{...D},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:y,btnSize:k,btnBorderRadius:f,btnWrap:j}=e,w=n()("c-row__col",t),N=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${k}`]:!!k,"smb-btn--wrap":j}),R={color:y||void 0},T={backgroundColor:x||void 0,backgroundImage:p||void 0,borderRadius:v(f)};return(0,i.jsx)("div",{...m.useBlockProps.save({className:w}),children:(0,i.jsxs)("a",{className:"smb-items__item smb-items__item--block-link",href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:N,href:r,style:T,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",style:R,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...z,btnLabel:{...z.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},url:{type:"string",default:""},target:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnTextColor:p,btnSize:y,btnBorderRadius:k,btnWrap:f}=e,j=n()("c-row__col",t),w=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),N={color:p||void 0},R={backgroundColor:x||void 0,borderRadius:v(k)};return(0,i.jsx)("div",{className:j,children:(0,i.jsxs)("a",{className:"smb-items__item smb-items__item--block-link",href:r,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),"none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:w,style:R,children:(0,i.jsx)("span",{className:"smb-btn__label",style:N,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})})}},{attributes:{...z,btnLabel:{...z.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},url:{type:"string",default:""},target:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnTextColor:p,btnSize:y,btnBorderRadius:k,btnWrap:f}=e,j=n()("c-row__col",t),w=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),N={color:p||void 0},R={backgroundColor:x||void 0,borderRadius:v(k)};return(0,i.jsx)("div",{className:j,children:(0,i.jsxs)("div",{className:"smb-items__item smb-items__item--block-link",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),"none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:w,href:r,style:R,target:"_self"===c?void 0:c,rel:"_blank"===c?"noopener noreferrer":void 0,children:(0,i.jsx)("span",{className:"smb-btn__label",style:N,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})})}},{attributes:{...z,btnLabel:{...z.btnLabel,selector:".smb-items__item__btn > .smb-btn__label",default:""},url:{type:"string",default:""},target:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,btnLabel:r,url:c,target:d,btnBackgroundColor:b,btnTextColor:_,imageID:u,imageURL:g,imageAlt:h,imageWidth:x,imageHeight:p}=e,v=n()("c-row__col",t),y={color:_||void 0},k={backgroundColor:b||void 0};return(0,i.jsx)("div",{className:v,children:(0,i.jsxs)("a",{className:"smb-items__item",href:c,target:"_self"===d?void 0:d,rel:"_blank"===d?"noopener noreferrer":void 0,children:[!!g&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:g,alt:h,width:!!x&&x,height:!!p&&p,className:`wp-image-${u}`})}),"none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(r)&&!!c&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:"smb-items__item__btn smb-btn",style:k,children:(0,i.jsx)("span",{className:"smb-btn__label",style:y,children:(0,i.jsx)(m.RichText.Content,{value:r})})})})]})})}}],E={to:[{type:"block",blocks:["snow-monkey-blocks/items-item-standard"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-standard",t)},{type:"block",blocks:["snow-monkey-blocks/items-banner"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-banner",t)},{type:"block",blocks:["snow-monkey-blocks/items-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.summary})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:e,setAttributes:s,isSelected:l,className:a}){const{titleTagName:_,title:y,lede:k,summary:f,url:j,rel:N,target:z,displayImage:D,imageID:H,imageURL:E,imageAlt:W,imageWidth:P,imageHeight:U,imageSizeSlug:$,displayBtn:M,btnLabel:A,btnBackgroundColor:V,btnBackgroundGradientColor:K,btnTextColor:G,btnSize:O,btnBorderRadius:F,btnWrap:Z}=e,J=(0,m.__experimentalUseColorProps)(e),Y=(0,b.useRef)(),[Q,X]=(0,b.useState)(),[q,ee]=(0,b.useState)(!1),te=!!j,se=z===C,ie=!!N?.includes(B),le=(0,b.useMemo)((()=>({url:j,title:A,opensInNewTab:se,nofollow:ie})),[j,A,se,ie]);function ae(){s({url:void 0,target:void 0,rel:void 0}),ee(!1)}const ne=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),oe=(0,d.useSelect)((e=>H?e("core").getEntityRecord("postType","attachment",H):null),[H]),re=ne.filter((({slug:e})=>oe?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),me=(0,m.__experimentalUseMultipleOriginColorsAndGradients)(),ce=["div","h2","h3","none"],de=n()("c-row__col",a),be=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${O}`]:!!O,"smb-btn--wrap":Z}),_e={"--smb-btn--background-color":V||void 0,"--smb-btn--background-image":K||void 0,"--smb-btn--border-radius":v(F),"--smb-btn--color":G||void 0},ue=(0,m.useBlockProps)({className:de,ref:(0,c.useMergeRefs)([X,Y])}),ge=(0,c.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(m.InspectorControls,{children:[(0,i.jsx)(r.__experimentalToolsPanel,{label:(0,p.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ge,children:(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>_!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,p.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>s({titleTagName:t.uK.titleTagName.default}),children:(0,i.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/items-item-block-link/title-tag-name",children:(0,i.jsx)("div",{className:"smb-list-icon-selector",children:(0,o.times)(ce.length,(e=>(0,i.jsx)(r.Button,{variant:_===ce[e]?"primary":"secondary",onClick:()=>{s({titleTagName:ce[e]})},children:ce[e]},e)))})})})}),(0,i.jsxs)(r.__experimentalToolsPanel,{label:(0,p.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:ge,children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>D!==t.uK.displayImage.default,isShownByDefault:!0,label:(0,p.__)("Display image","snow-monkey-blocks"),onDeselect:()=>s({displayImage:t.uK.displayImage.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Display image","snow-monkey-blocks"),checked:D,onChange:e=>s({displayImage:e})})}),D&&0<re.length&&(0,i.jsx)(R,{defaultValue:t.uK.imageSizeSlug.default,value:$,options:re,onChange:e=>{const t=oe?.media_details?.sizes?.[e]?.source_url,i=oe?.media_details?.sizes?.[e]?.width,l=oe?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:i,imageHeight:l,imageSizeSlug:e})}})]}),(0,i.jsxs)(r.__experimentalToolsPanel,{label:(0,p.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:ge,children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>M!==t.uK.displayBtn.default,isShownByDefault:!0,label:(0,p.__)("Display button","snow-monkey-blocks"),onDeselect:()=>s({displayBtn:t.uK.displayBtn.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Display button","snow-monkey-blocks"),checked:M,onChange:e=>s({displayBtn:e})})}),M&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>O!==t.uK.btnSize.default,isShownByDefault:!0,label:(0,p.__)("Button size","snow-monkey-blocks"),onDeselect:()=>s({btnSize:t.uK.btnSize.default}),children:(0,i.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,p.__)("Button size","snow-monkey-blocks"),value:O,onChange:e=>s({btnSize:e}),options:[{value:"",label:(0,p.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,p.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,p.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,p.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,p.__)("Full size","snow-monkey-blocks")}]})}),(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>F!==t.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,p.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>s({btnBorderRadius:t.uK.btnBorderRadius.default}),children:(0,i.jsx)("div",{className:"smb-border-radius-control",children:(0,i.jsx)(m.__experimentalBorderRadiusControl,{values:F,onChange:e=>{s({btnBorderRadius:e})}})})}),(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>Z!==t.uK.btnWrap.default,isShownByDefault:!0,label:(0,p.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>s({btnWrap:t.uK.btnWrap.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.__)("Wrap","snow-monkey-blocks"),checked:Z,onChange:e=>s({btnWrap:e})})}),(0,i.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,i.jsx)(m.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,p.__)("Background color","snow-monkey-blocks"),colorValue:V,onColorChange:e=>s({btnBackgroundColor:e}),gradientValue:K,onGradientChange:e=>s({btnBackgroundGradientColor:e})},{label:(0,p.__)("Text color","snow-monkey-blocks"),colorValue:G,onColorChange:e=>s({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...me})}),(0,i.jsx)(m.ContrastChecker,{backgroundColor:V,textColor:G})]})]})]}),(0,i.jsx)("div",{...ue,children:(0,i.jsxs)("div",{className:n()("smb-items__item","smb-items__item--block-link",J?.className),style:{...J?.style},children:[D&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)(w,{src:E,id:H,alt:W,width:P,height:U,onSelect:e=>{const t=e?.sizes?.[$]?$:I,i=e?.sizes?.[t]?.url,l=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;s({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:l||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==E&&s({imageURL:e,imageID:0,mediaSizeSlug:I})},onRemove:()=>s({imageID:t.uK.imageID.default,imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default}),allowedTypes:L})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==_&&(0,i.jsx)(m.RichText,{tagName:_,className:"smb-items__item__title",placeholder:(0,p.__)("Write title…","snow-monkey-blocks"),value:y,onChange:e=>s({title:e})}),(!m.RichText.isEmpty(k)||l)&&(0,i.jsx)(m.RichText,{className:"smb-items__item__lede",placeholder:(0,p.__)("Write lede…","snow-monkey-blocks"),value:k,onChange:e=>s({lede:e})}),(!m.RichText.isEmpty(f)||l)&&(0,i.jsx)(m.RichText,{className:"smb-items__item__content",placeholder:(0,p.__)("Write content…","snow-monkey-blocks"),value:f,onChange:e=>s({summary:e})}),(te||M)&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{className:M?be:void 0,style:M?_e:void 0,href:j,target:z,rel:N,children:M?(0,i.jsx)(m.RichText,{className:"smb-btn__label",value:A,placeholder:(0,p.__)("Button","snow-monkey-blocks"),onChange:e=>s({btnLabel:e}),withoutInteractiveFormatting:!0}):(0,i.jsx)("span",{className:"screen-reader-text",children:A||(0,p.__)("Learn more","snow-monkey-blocks")})})})]})]})}),(0,i.jsxs)(m.BlockControls,{group:"block",children:[!te&&(0,i.jsx)(r.ToolbarButton,{name:"link",icon:u,title:(0,p.__)("Link"),shortcut:h.displayShortcut.primary("k"),onClick:function(e){e.preventDefault(),ee(!0)}}),te&&(0,i.jsx)(r.ToolbarButton,{name:"link",icon:g,title:(0,p.__)("Unlink"),shortcut:h.displayShortcut.primaryShift("k"),onClick:ae,isActive:!0})]}),l&&(q||te)&&(0,i.jsx)(r.Popover,{position:"bottom center",onClose:()=>{ee(!1)},anchor:Q,focusOnMount:!!q&&"firstElement",children:(0,i.jsx)(m.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:le,onChange:({url:e="",title:t,opensInNewTab:i,nofollow:l})=>{s(function({rel:e="",url:t="",title:s,opensInNewTab:i,nofollow:l}){let a,n=e;if(i)a=C,n=n?.includes(T)?n:n+` ${T}`;else{const e=new RegExp(`\\b${T}\\s*`,"g");n=n?.replace(e,"").trim()}if(l)n=n?.includes(B)?n:(n+` ${B}`).trim();else{const e=new RegExp(`\\b${B}\\s*`,"g");n=n?.replace(e,"").trim()}return{url:(0,x.prependHTTP)(t),btnLabel:s,target:a,rel:n||void 0}}({rel:N,url:e,title:t,opensInNewTab:i,nofollow:l}))},onRemove:()=>{ae()},forceIsEditingLink:q,hasRichPreviews:!0,hasTextControl:!M,settings:S,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})]})},save:function({attributes:e,className:t}){const{titleTagName:s,title:l,lede:a,summary:o,url:r,rel:c,target:d,displayImage:b,imageID:_,imageURL:u,imageAlt:g,imageWidth:h,imageHeight:x,displayBtn:y,btnLabel:k,btnBackgroundColor:f,btnBackgroundGradientColor:j,btnTextColor:w,btnSize:N,btnBorderRadius:R,btnWrap:T}=e,C=!!r,B=(0,m.__experimentalGetColorClassesAndStyles)(e),S=n()("c-row__col",t),L=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${N}`]:!!N,"smb-btn--wrap":T}),I={"--smb-btn--background-color":f||void 0,"--smb-btn--background-image":j||void 0,"--smb-btn--border-radius":v(R),"--smb-btn--color":w||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:S}),children:(0,i.jsxs)("div",{className:n()("smb-items__item","smb-items__item--block-link",B?.className),style:{...B?.style},children:[b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:u,alt:g,width:!!h&&h,height:!!x&&x,className:`wp-image-${_}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:l}),!m.RichText.isEmpty(a)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:a})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),(C||y)&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:y?L:void 0,style:y?I:void 0,href:r,target:d,rel:c,children:y?(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:k})}):(0,i.jsx)("span",{className:"screen-reader-text",children:k||(0,p.__)("Learn more","snow-monkey-blocks")})})})]})]})})},deprecated:H,transforms:E})})()})(); -
snow-monkey-blocks/trunk/dist/blocks/items/item/standard/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' bc69cd3bd2e583f94ebd');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'e34b78d5854403c8ce58'); -
snow-monkey-blocks/trunk/dist/blocks/items/item/standard/index.js
r3390754 r3400189 1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=n(e,l(s)))}return e}function l(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 t="";for(var s in e)i.call(e,s)&&e[s]&&(t=n(t,s));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(s=function(){return a}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var a=t[i];if(void 0!==a)return a.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,s),l.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/items-item-standard","uK":{"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-items__item__title","default":""},"lede":{"type":"string","source":"html","selector":".smb-items__item__lede","default":""},"summary":{"type":"string","source":"html","selector":".smb-items__item__content","default":""},"url":{"type":"string","source":"attribute","selector":".smb-items__item__action a","attribute":"href","default":""},"target":{"type":"string","source":"attribute","selector":".smb-items__item__action a","attribute":"target","default":"_self"},"displayImage":{"type":"boolean","default":false},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"displayBtn":{"type":"boolean","default":false},"btnLabel":{"type":"string","source":"html","selector":".smb-items__item__btn > .smb-btn__label","default":""},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false}},"xY":{"html":false,"color":{"__experimentalSkipSerialization":true,"background":true,"text":true,"link":true}}}'),i=window.ReactJSXRuntime,a=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("rect",{x:"1",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M1,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H1.56A.56.56,0,0,0,1,4.06m8.89,8.61H2.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28H9.89a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M1.83,10.05,4,8.45a.15.15,0,0,1,.16,0L5.85,9.52A.13.13,0,0,0,6,9.5l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L8.32,8.32a.14.14,0,0,0-.19,0L6,10.34a.13.13,0,0,1-.17,0L4.18,9.29a.14.14,0,0,0-.16,0L1.83,10.88Z"}),(0,i.jsx)("rect",{x:"1",y:"3.5",width:"10",height:"10",fill:"none"}),(0,i.jsx)("rect",{x:"13",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M13,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H13.56a.56.56,0,0,0-.56.56m8.89,8.61H14.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28h7.78a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M13.83,10.05,16,8.45a.15.15,0,0,1,.16,0l1.67,1.07a.13.13,0,0,0,.17,0l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L20.32,8.32a.14.14,0,0,0-.19,0l-2.11,2a.13.13,0,0,1-.17,0L16.18,9.29a.14.14,0,0,0-.16,0l-2.19,1.59Z"}),(0,i.jsx)("rect",{x:"13",y:"3.5",width:"10",height:"10",fill:"none"})]});var l=s(6942),n=s.n(l);const o=window.lodash,r=window.wp.components,m=window.wp.blockEditor,c=window.wp.element,d=window.wp.data,b=window.wp.i18n,_=window.wp.primitives;var u=(0,i.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(_.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const g=({id:e,src:t,allowedTypes:s,accept:a,onSelect:l,onSelectURL:n,onRemove:o})=>(0,i.jsxs)(m.BlockControls,{group:"inline",children:[(0,i.jsx)(m.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:a,onSelect:l,onSelectURL:n}),!!t&&!!o&&(0,i.jsx)(r.ToolbarButton,{onClick:o,children:(0,b.__)("Release","snow-monkey-blocks")})]}),h=({src:e,alt:t,id:s,style:a,width:l,height:n})=>(0,i.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:a,width:l,height:n}), x=({src:e,style:t,width:s,height:a})=>(0,i.jsx)("video",{src:e,style:t,width:s,height:a}),p=(0,c.memo)((({id:e,src:t,alt:s,url:a,width:l,height:n,target:r,allowedTypes:m,accept:c,onSelect:d,onSelectURL:b,onRemove:_,mediaType:u,style:p,rel:y,linkClass:v})=>{let f;if("image"===u){let m;f=(0,i.jsx)(h,{src:t,alt:s,id:e,style:p,width:l,height:n}),m=y?(0,o.isEmpty)(y)?void 0:y:"_self"!==r&&r?"noopener noreferrer":void 0,a&&(f=(0,i.jsx)("span",{href:a,target:"_self"===r?void 0:r,rel:m,className:v,children:f}))}else"video"===u&&(f=(0,i.jsx)(x,{src:t,style:p,width:l,height:n}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g,{id:e,src:t,allowedTypes:m,accept:c,onSelect:d,onSelectURL:b,onRemove:_}),f]})}),((e,t)=>{const s=Object.keys(e);for(const i of s)if(e[i]!==t[i])return!1;return!0}));function y(e){const{src:t,onSelect:s,onSelectURL:a,mediaType:l,allowedTypes:n=["image"]}=e,o=!l&&t?"image":l;let r=(0,b.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?r=(0,b.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(r=(0,b.__)("Video","snow-monkey-blocks")));const d=(0,c.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,i.jsx)(p,{...e,accept:d,allowedTypes:n,mediaType:o}):(0,i.jsx)(m.MediaPlaceholder,{icon:"format-image",labels:{title:r},onSelect:s,onSelectURL:a,accept:d,allowedTypes:n})}const v=[{label:(0,b._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,b._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,b._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,b._x)("Full Size","Image size option for resolution control"),value:"full"}];function f({panelId:e,value:t,onChange:s,options:a=v,defaultValue:l=v[0].value,isShownByDefault:n=!0,withToolsPanelItem:o=!0}){const m=null!=t?t:l,c=()=>(0,i.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Resolution"),value:m,options:a,onChange:s,help:(0,b.__)("Select the size of the source image."),size:"__unstable-large"});return o?(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>m!==l,label:(0,b.__)("Resolution"),onDeselect:()=>s(l),isShownByDefault:n,panelId:e,children:(0,i.jsx)(c,{})}):(0,i.jsx)(c,{})}const k=window.wp.compose,w=["image"],j="full",N=t.uK,R=t.xY,T=[{attributes:{...N,btnBorderRadius:{type:"number"}},supports:{...R},migrate(e){const{btnLabel:t,url:s,imageURL:i,btnBorderRadius:a}=e;return m.RichText.isEmpty(t)&&!s||(e.displayBtn=!0),i&&(e.displayImage=!0),e.btnBorderRadius=String(a).match(/^\d+$/)?`${a}px`:a,e},save({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:y,btnSize:v,btnBorderRadius:f,btnWrap:k}=e,w=n()("c-row__col",t),j=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":k}),N={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":p||void 0,"--smb-btn--border-radius":String(f).match(/^\d+$/)?`${f}px`:f,"--smb-btn--color":y||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:w}),children:(0,i.jsxs)("div",{className:"smb-items__item",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:j,href:r,style:N,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...N,btnBorderRadius:{type:"number"}},supports:{...R},save({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:y,btnSize:v,btnBorderRadius:f,btnWrap:k}=e,w=n()("c-row__col",t),j=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":k}),N={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":p||void 0,"--smb-btn--border-radius":void 0!==f?`${f}px`:void 0,"--smb-btn--color":y||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:w}),children:(0,i.jsxs)("div",{className:"smb-items__item",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:j,href:r,style:N,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...N,btnBorderRadius:{type:"number"}},supports:{...R},save({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnBackgroundGradientColor:p,btnTextColor:y,btnSize:v,btnBorderRadius:f,btnWrap:k}=e,w=n()("c-row__col",t),j=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":k}),N={color:y||void 0},R={backgroundColor:x||void 0,backgroundImage:p||void 0,borderRadius:void 0!==f?`${f}px`:void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:w}),children:(0,i.jsxs)("div",{className:"smb-items__item",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:j,href:r,style:R,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",style:N,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...N,url:{type:"string",default:""},target:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:x,btnTextColor:p,btnSize:y,btnBorderRadius:v,btnWrap:f}=e,k=n()("c-row__col",t),w=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),j={color:p||void 0},N={backgroundColor:x||void 0,borderRadius:void 0!==v?`${v}px`:void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:k}),children:(0,i.jsxs)("div",{className:"smb-items__item",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),"none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:w,href:r,style:N,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",style:j,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})})}}],C={to:[{type:"block",blocks:["snow-monkey-blocks/items-item-block-link"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-block-link",t)},{type:"block",blocks:["snow-monkey-blocks/items-banner"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-banner",t)},{type:"block",blocks:["snow-monkey-blocks/items-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.summary})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:s,isSelected:a,className:l}){const{titleTagName:_,title:g,lede:h,summary:x,url:p,target:v,displayImage:N,imageID:R,imageURL:T,imageAlt:C,imageWidth:B,imageHeight:S,imageSizeSlug:I,displayBtn:L,btnLabel:z,btnBackgroundColor:D,btnBackgroundGradientColor:H,btnTextColor:P,btnSize:W,btnBorderRadius:U,btnWrap:M}=e,$=(0,m.__experimentalUseColorProps)(e),[V,E]=(0,c.useState)(!1),K=!!p,A="_blank"===v,[G,O]=(0,c.useState)(null),F=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),Z=(0,d.useSelect)((e=>R?e("core").getMedia(R,{context:"view"}):null),[R]),J=F.filter((({slug:e})=>Z?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),Y=(0,m.__experimentalUseMultipleOriginColorsAndGradients)(),X=["div","h2","h3","none"],q=n()("c-row__col",l),Q=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${W}`]:!!W,"smb-btn--wrap":M}),ee={"--smb-btn--background-color":D||void 0,"--smb-btn--background-image":H||void 0,"--smb-btn--border-radius":String(U).match(/^\d+$/)?`${U}px`:U,"--smb-btn--color":P||void 0},te=(0,c.useRef)(),se=(0,m.useBlockProps)({className:q}),ie=(0,k.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(m.InspectorControls,{children:[(0,i.jsx)(r.__experimentalToolsPanel,{label:(0,b.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ie,children:(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>_!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,b.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>s({titleTagName:t.uK.titleTagName.default}),children:(0,i.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/items-item-standard/title-tag-name",children:(0,i.jsx)("div",{className:"smb-list-icon-selector",children:(0,o.times)(X.length,(e=>(0,i.jsx)(r.Button,{variant:_===X[e]?"primary":"secondary",onClick:()=>s({titleTagName:X[e]}),children:X[e]},e)))})})})}),(0,i.jsxs)(r.__experimentalToolsPanel,{label:(0,b.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:ie,children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>N!==t.uK.displayImage.default,isShownByDefault:!0,label:(0,b.__)("Display image","snow-monkey-blocks"),onDeselect:()=>s({displayImage:t.uK.displayImage.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Display image","snow-monkey-blocks"),checked:N,onChange:e=>s({displayImage:e})})}),N&&0<J.length&&(0,i.jsx)(f,{defaultValue:t.uK.imageSizeSlug.default,value:I,options:J,onChange:e=>{const t=Z?.media_details?.sizes?.[e]?.source_url,i=Z?.media_details?.sizes?.[e]?.width,a=Z?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:i,imageHeight:a,imageSizeSlug:e})}})]}),(0,i.jsxs)(r.__experimentalToolsPanel,{label:(0,b.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:ie,children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>L!==t.uK.displayBtn.default,isShownByDefault:!0,label:(0,b.__)("Display button","snow-monkey-blocks"),onDeselect:()=>s({displayBtn:t.uK.displayBtn.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Display button","snow-monkey-blocks"),checked:L,onChange:e=>s({displayBtn:e})})}),L&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>W!==t.uK.btnSize.default,isShownByDefault:!0,label:(0,b.__)("Button size","snow-monkey-blocks"),onDeselect:()=>s({btnSize:t.uK.btnSize.default}),children:(0,i.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Button size","snow-monkey-blocks"),value:W,onChange:e=>s({btnSize:e}),options:[{value:"",label:(0,b.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,b.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,b.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,b.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,b.__)("Full size","snow-monkey-blocks")}]})}),(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>U!==t.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,b.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>s({btnBorderRadius:t.uK.btnBorderRadius.default}),children:(0,i.jsx)("div",{className:"smb-border-radius-control",children:(0,i.jsx)(m.__experimentalBorderRadiusControl,{values:U,onChange:e=>{s({btnBorderRadius:e})}})})}),(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>M!==t.uK.btnWrap.default,isShownByDefault:!0,label:(0,b.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>s({btnWrap:t.uK.btnWrap.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Wrap","snow-monkey-blocks"),checked:M,onChange:e=>s({btnWrap:e})})}),(0,i.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,i.jsx)(m.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,b.__)("Background color","snow-monkey-blocks"),colorValue:D,onColorChange:e=>s({btnBackgroundColor:e}),gradientValue:H,onGradientChange:e=>s({btnBackgroundGradientColor:e})},{label:(0,b.__)("Text color","snow-monkey-blocks"),colorValue:P,onColorChange:e=>s({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...Y})}),(0,i.jsx)(m.ContrastChecker,{backgroundColor:D,textColor:P})]})]})]}),(0,i.jsx)("div",{...se,children:(0,i.jsxs)("div",{className:n()("smb-items__item",$?.className),style:{...$?.style},children:[N&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)(y,{src:T,id:R,alt:C,width:B,height:S,onSelect:e=>{const t=e?.sizes?.[I]?I:j,i=e?.sizes?.[t]?.url,a=e?.sizes?.[t]?.width,l=e?.sizes?.[t]?.height;s({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:a||e.width,imageHeight:l||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==T&&s({imageURL:e,imageID:0,mediaSizeSlug:j})},onRemove:()=>s({imageID:t.uK.imageID.default,imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default}),allowedTypes:w})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==_&&(0,i.jsx)(m.RichText,{tagName:_,className:"smb-items__item__title",placeholder:(0,b.__)("Write title…","snow-monkey-blocks"),value:g,onChange:e=>s({title:e})}),(!m.RichText.isEmpty(h)||a)&&(0,i.jsx)(m.RichText,{className:"smb-items__item__lede",placeholder:(0,b.__)("Write lede…","snow-monkey-blocks"),value:h,onChange:e=>s({lede:e})}),(!m.RichText.isEmpty(x)||a)&&(0,i.jsx)(m.RichText,{className:"smb-items__item__content",placeholder:(0,b.__)("Write content…","snow-monkey-blocks"),value:x,onChange:e=>s({summary:e})}),L&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{ref:O,className:Q,href:p,style:ee,target:"_self"===v?void 0:v,rel:"_self"===v?void 0:"noopener noreferrer",children:(0,i.jsx)(m.RichText,{className:"smb-btn__label",value:z,placeholder:(0,b.__)("Button","snow-monkey-blocks"),onChange:e=>s({btnLabel:e}),withoutInteractiveFormatting:!0,ref:te})})})]})]})}),L&&(0,i.jsx)(m.BlockControls,{group:"block",children:(0,i.jsx)(r.ToolbarButton,{name:"link",icon:u,title:(0,b.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),E(!0)},isActive:K})}),a&&V&&(0,i.jsx)(r.Popover,{placement:"bottom",anchor:G,onClose:()=>{E(!1),te.current?.focus()},children:(0,i.jsx)(m.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:p,opensInNewTab:A},onChange:({url:e,opensInNewTab:t})=>s({url:e,target:t?"_blank":"_self"}),onRemove:()=>{s({url:void 0,target:void 0}),E(!1),te.current?.focus()},forceIsEditingLink:!K})})]})},save:function({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,displayImage:d,imageID:b,imageURL:_,imageAlt:u,imageWidth:g,imageHeight:h,displayBtn:x,btnLabel:p,btnBackgroundColor:y,btnBackgroundGradientColor:v,btnTextColor:f,btnSize:k,btnBorderRadius:w,btnWrap:j}=e,N=(0,m.__experimentalGetColorClassesAndStyles)(e),R=n()("c-row__col",t),T=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${k}`]:!!k,"smb-btn--wrap":j}),C={"--smb-btn--background-color":y||void 0,"--smb-btn--background-image":v||void 0,"--smb-btn--border-radius":String(w).match(/^\d+$/)?`${w}px`:w,"--smb-btn--color":f||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:R}),children:(0,i.jsxs)("div",{className:n()("smb-items__item",N?.className),style:{...N?.style},children:[d&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:_,alt:u,width:!!g&&g,height:!!h&&h,className:`wp-image-${b}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),x&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:T,href:r,style:C,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:p})})})})]})]})})},deprecated:T,transforms:C})})()})();1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=n(e,l(s)))}return e}function l(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 t="";for(var s in e)i.call(e,s)&&e[s]&&(t=n(t,s));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(s=function(){return a}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var a=t[i];if(void 0!==a)return a.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,s),l.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/items-item-standard","uK":{"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-items__item__title","default":""},"lede":{"type":"string","source":"html","selector":".smb-items__item__lede","default":""},"summary":{"type":"string","source":"html","selector":".smb-items__item__content","default":""},"url":{"type":"string","source":"attribute","selector":".smb-items__item__action a","attribute":"href","default":""},"target":{"type":"string","source":"attribute","selector":".smb-items__item__action a","attribute":"target","default":"_self"},"displayImage":{"type":"boolean","default":false},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-items__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"displayBtn":{"type":"boolean","default":false},"btnLabel":{"type":"string","source":"html","selector":".smb-items__item__btn > .smb-btn__label","default":""},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false}},"xY":{"html":false,"color":{"__experimentalSkipSerialization":true,"background":true,"text":true,"link":true}}}'),i=window.ReactJSXRuntime,a=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("rect",{x:"1",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"1",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M1,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H1.56A.56.56,0,0,0,1,4.06m8.89,8.61H2.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28H9.89a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M1.83,10.05,4,8.45a.15.15,0,0,1,.16,0L5.85,9.52A.13.13,0,0,0,6,9.5l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L8.32,8.32a.14.14,0,0,0-.19,0L6,10.34a.13.13,0,0,1-.17,0L4.18,9.29a.14.14,0,0,0-.16,0L1.83,10.88Z"}),(0,i.jsx)("rect",{x:"1",y:"3.5",width:"10",height:"10",fill:"none"}),(0,i.jsx)("rect",{x:"13",y:"15.5",width:"10",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"17.5",width:"8",height:"1"}),(0,i.jsx)("rect",{x:"13",y:"19.5",width:"8",height:"1"}),(0,i.jsx)("path",{d:"M13,4.06v8.88a.56.56,0,0,0,.56.56h8.88a.56.56,0,0,0,.56-.56V4.06a.56.56,0,0,0-.56-.56H13.56a.56.56,0,0,0-.56.56m8.89,8.61H14.11a.29.29,0,0,1-.28-.28V4.61a.29.29,0,0,1,.28-.28h7.78a.29.29,0,0,1,.28.28v7.78a.29.29,0,0,1-.28.28"}),(0,i.jsx)("path",{d:"M13.83,10.05,16,8.45a.15.15,0,0,1,.16,0l1.67,1.07a.13.13,0,0,0,.17,0l2.11-2a.14.14,0,0,1,.19,0l2.21,2.15v.84L20.32,8.32a.14.14,0,0,0-.19,0l-2.11,2a.13.13,0,0,1-.17,0L16.18,9.29a.14.14,0,0,0-.16,0l-2.19,1.59Z"}),(0,i.jsx)("rect",{x:"13",y:"3.5",width:"10",height:"10",fill:"none"})]});var l=s(6942),n=s.n(l);const o=window.lodash,r=window.wp.components,m=window.wp.blockEditor,c=window.wp.element,d=window.wp.data,b=window.wp.i18n,_=window.wp.primitives;var u=(0,i.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(_.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const g=({id:e,src:t,allowedTypes:s,accept:a,onSelect:l,onSelectURL:n,onRemove:o})=>(0,i.jsxs)(m.BlockControls,{group:"inline",children:[(0,i.jsx)(m.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:a,onSelect:l,onSelectURL:n}),!!t&&!!o&&(0,i.jsx)(r.ToolbarButton,{onClick:o,children:(0,b.__)("Release","snow-monkey-blocks")})]}),h=({src:e,alt:t,id:s,style:a,width:l,height:n})=>(0,i.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:a,width:l,height:n}),p=({src:e,style:t,width:s,height:a})=>(0,i.jsx)("video",{src:e,style:t,width:s,height:a}),x=(0,c.memo)((({id:e,src:t,alt:s,url:a,width:l,height:n,target:r,allowedTypes:m,accept:c,onSelect:d,onSelectURL:b,onRemove:_,mediaType:u,style:x,rel:y,linkClass:v})=>{let f;if("image"===u){let m;f=(0,i.jsx)(h,{src:t,alt:s,id:e,style:x,width:l,height:n}),m=y?(0,o.isEmpty)(y)?void 0:y:"_self"!==r&&r?"noopener noreferrer":void 0,a&&(f=(0,i.jsx)("span",{href:a,target:"_self"===r?void 0:r,rel:m,className:v,children:f}))}else"video"===u&&(f=(0,i.jsx)(p,{src:t,style:x,width:l,height:n}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g,{id:e,src:t,allowedTypes:m,accept:c,onSelect:d,onSelectURL:b,onRemove:_}),f]})}),((e,t)=>{const s=Object.keys(e);for(const i of s)if(e[i]!==t[i])return!1;return!0}));function y(e){const{src:t,onSelect:s,onSelectURL:a,mediaType:l,allowedTypes:n=["image"]}=e,o=!l&&t?"image":l;let r=(0,b.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?r=(0,b.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(r=(0,b.__)("Video","snow-monkey-blocks")));const d=(0,c.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,i.jsx)(x,{...e,accept:d,allowedTypes:n,mediaType:o}):(0,i.jsx)(m.MediaPlaceholder,{icon:"format-image",labels:{title:r},onSelect:s,onSelectURL:a,accept:d,allowedTypes:n})}const v=[{label:(0,b._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,b._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,b._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,b._x)("Full Size","Image size option for resolution control"),value:"full"}];function f({panelId:e,value:t,onChange:s,options:a=v,defaultValue:l=v[0].value,isShownByDefault:n=!0,withToolsPanelItem:o=!0}){const m=null!=t?t:l,c=()=>(0,i.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Resolution"),value:m,options:a,onChange:s,help:(0,b.__)("Select the size of the source image."),size:"__unstable-large"});return o?(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>m!==l,label:(0,b.__)("Resolution"),onDeselect:()=>s(l),isShownByDefault:n,panelId:e,children:(0,i.jsx)(c,{})}):(0,i.jsx)(c,{})}const k=window.wp.compose,w=e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const t=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft].map((e=>null==e||""===e?"":/^\d+$/.test(String(e))?`${e}px`:String(e))),s=t.filter(Boolean);if(0===s.length)return;if(4===s.length){const[e,s,i,a]=t;if(e===s&&s===i&&i===a)return e;if(e===i&&s===a)return`${e} ${s}`;if(s===a)return`${e} ${s} ${i}`}return s.join(" ")}return/^\d+$/.test(String(e))?`${e}px`:e}},j=["image"],N="full",R=t.uK,T=t.xY,C=[{attributes:{...R,btnBorderRadius:{type:"number"}},supports:{...T},migrate(e){const{btnLabel:t,url:s,imageURL:i,btnBorderRadius:a}=e;return m.RichText.isEmpty(t)&&!s||(e.displayBtn=!0),i&&(e.displayImage=!0),e.btnBorderRadius=w(a),e},save({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:p,btnBackgroundGradientColor:x,btnTextColor:y,btnSize:v,btnBorderRadius:f,btnWrap:k}=e,j=n()("c-row__col",t),N=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":k}),R={"--smb-btn--background-color":p||void 0,"--smb-btn--background-image":x||void 0,"--smb-btn--border-radius":w(f),"--smb-btn--color":y||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:j}),children:(0,i.jsxs)("div",{className:"smb-items__item",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:N,href:r,style:R,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...R,btnBorderRadius:{type:"number"}},supports:{...T},save({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:p,btnBackgroundGradientColor:x,btnTextColor:y,btnSize:v,btnBorderRadius:f,btnWrap:k}=e,j=n()("c-row__col",t),N=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":k}),R={"--smb-btn--background-color":p||void 0,"--smb-btn--background-image":x||void 0,"--smb-btn--border-radius":w(f),"--smb-btn--color":y||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:j}),children:(0,i.jsxs)("div",{className:"smb-items__item",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:N,href:r,style:R,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...R,btnBorderRadius:{type:"number"}},supports:{...T},save({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:p,btnBackgroundGradientColor:x,btnTextColor:y,btnSize:v,btnBorderRadius:f,btnWrap:k}=e,j=n()("c-row__col",t),N=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":k}),R={color:y||void 0},T={backgroundColor:p||void 0,backgroundImage:x||void 0,borderRadius:w(f)};return(0,i.jsx)("div",{...m.useBlockProps.save({className:j}),children:(0,i.jsxs)("div",{className:"smb-items__item",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:N,href:r,style:T,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",style:R,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})]})})}},{attributes:{...R,url:{type:"string",default:""},target:{type:"string",default:"_self"},btnBorderRadius:{type:"number"}},save({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,imageID:d,imageURL:b,imageAlt:_,imageWidth:u,imageHeight:g,btnLabel:h,btnBackgroundColor:p,btnTextColor:x,btnSize:y,btnBorderRadius:v,btnWrap:f}=e,k=n()("c-row__col",t),j=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),N={color:x||void 0},R={backgroundColor:p||void 0,borderRadius:w(v)};return(0,i.jsx)("div",{...m.useBlockProps.save({className:k}),children:(0,i.jsxs)("div",{className:"smb-items__item",children:[!!b&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:b,alt:_,width:!!u&&u,height:!!g&&g,className:`wp-image-${d}`})}),"none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),!m.RichText.isEmpty(h)&&!!r&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:j,href:r,style:R,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",style:N,children:(0,i.jsx)(m.RichText.Content,{value:h})})})})]})})}}],B={to:[{type:"block",blocks:["snow-monkey-blocks/items-item-block-link"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-block-link",t)},{type:"block",blocks:["snow-monkey-blocks/items-banner"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-banner",t)},{type:"block",blocks:["snow-monkey-blocks/items-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/items-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.summary})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:s,isSelected:a,className:l}){const{titleTagName:_,title:g,lede:h,summary:p,url:x,target:v,displayImage:R,imageID:T,imageURL:C,imageAlt:B,imageWidth:S,imageHeight:I,imageSizeSlug:L,displayBtn:z,btnLabel:D,btnBackgroundColor:H,btnBackgroundGradientColor:P,btnTextColor:W,btnSize:U,btnBorderRadius:M,btnWrap:$}=e,A=(0,m.__experimentalUseColorProps)(e),[E,V]=(0,c.useState)(!1),K=!!x,G="_blank"===v,[O,F]=(0,c.useState)(null),Z=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),J=(0,d.useSelect)((e=>T?e("core").getEntityRecord("postType","attachment",T):null),[T]),Y=Z.filter((({slug:e})=>J?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),X=(0,m.__experimentalUseMultipleOriginColorsAndGradients)(),q=["div","h2","h3","none"],Q=n()("c-row__col",l),ee=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${U}`]:!!U,"smb-btn--wrap":$}),te={"--smb-btn--background-color":H||void 0,"--smb-btn--background-image":P||void 0,"--smb-btn--border-radius":w(M),"--smb-btn--color":W||void 0},se=(0,c.useRef)(),ie=(0,m.useBlockProps)({className:Q}),ae=(0,k.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(m.InspectorControls,{children:[(0,i.jsx)(r.__experimentalToolsPanel,{label:(0,b.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ae,children:(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>_!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,b.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>s({titleTagName:t.uK.titleTagName.default}),children:(0,i.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/items-item-standard/title-tag-name",children:(0,i.jsx)("div",{className:"smb-list-icon-selector",children:(0,o.times)(q.length,(e=>(0,i.jsx)(r.Button,{variant:_===q[e]?"primary":"secondary",onClick:()=>s({titleTagName:q[e]}),children:q[e]},e)))})})})}),(0,i.jsxs)(r.__experimentalToolsPanel,{label:(0,b.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:ae,children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>R!==t.uK.displayImage.default,isShownByDefault:!0,label:(0,b.__)("Display image","snow-monkey-blocks"),onDeselect:()=>s({displayImage:t.uK.displayImage.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Display image","snow-monkey-blocks"),checked:R,onChange:e=>s({displayImage:e})})}),R&&0<Y.length&&(0,i.jsx)(f,{defaultValue:t.uK.imageSizeSlug.default,value:L,options:Y,onChange:e=>{const t=J?.media_details?.sizes?.[e]?.source_url,i=J?.media_details?.sizes?.[e]?.width,a=J?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:i,imageHeight:a,imageSizeSlug:e})}})]}),(0,i.jsxs)(r.__experimentalToolsPanel,{label:(0,b.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:ae,children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>z!==t.uK.displayBtn.default,isShownByDefault:!0,label:(0,b.__)("Display button","snow-monkey-blocks"),onDeselect:()=>s({displayBtn:t.uK.displayBtn.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Display button","snow-monkey-blocks"),checked:z,onChange:e=>s({displayBtn:e})})}),z&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>U!==t.uK.btnSize.default,isShownByDefault:!0,label:(0,b.__)("Button size","snow-monkey-blocks"),onDeselect:()=>s({btnSize:t.uK.btnSize.default}),children:(0,i.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Button size","snow-monkey-blocks"),value:U,onChange:e=>s({btnSize:e}),options:[{value:"",label:(0,b.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,b.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,b.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,b.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,b.__)("Full size","snow-monkey-blocks")}]})}),(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>M!==t.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,b.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>s({btnBorderRadius:t.uK.btnBorderRadius.default}),children:(0,i.jsx)("div",{className:"smb-border-radius-control",children:(0,i.jsx)(m.__experimentalBorderRadiusControl,{values:M,onChange:e=>{s({btnBorderRadius:e})}})})}),(0,i.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>$!==t.uK.btnWrap.default,isShownByDefault:!0,label:(0,b.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>s({btnWrap:t.uK.btnWrap.default}),children:(0,i.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Wrap","snow-monkey-blocks"),checked:$,onChange:e=>s({btnWrap:e})})}),(0,i.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,i.jsx)(m.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,b.__)("Background color","snow-monkey-blocks"),colorValue:H,onColorChange:e=>s({btnBackgroundColor:e}),gradientValue:P,onGradientChange:e=>s({btnBackgroundGradientColor:e})},{label:(0,b.__)("Text color","snow-monkey-blocks"),colorValue:W,onColorChange:e=>s({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...X})}),(0,i.jsx)(m.ContrastChecker,{backgroundColor:H,textColor:W})]})]})]}),(0,i.jsx)("div",{...ie,children:(0,i.jsxs)("div",{className:n()("smb-items__item",A?.className),style:{...A?.style},children:[R&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)(y,{src:C,id:T,alt:B,width:S,height:I,onSelect:e=>{const t=e?.sizes?.[L]?L:N,i=e?.sizes?.[t]?.url,a=e?.sizes?.[t]?.width,l=e?.sizes?.[t]?.height;s({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:a||e.width,imageHeight:l||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==C&&s({imageURL:e,imageID:0,mediaSizeSlug:N})},onRemove:()=>s({imageID:t.uK.imageID.default,imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default}),allowedTypes:j})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==_&&(0,i.jsx)(m.RichText,{tagName:_,className:"smb-items__item__title",placeholder:(0,b.__)("Write title…","snow-monkey-blocks"),value:g,onChange:e=>s({title:e})}),(!m.RichText.isEmpty(h)||a)&&(0,i.jsx)(m.RichText,{className:"smb-items__item__lede",placeholder:(0,b.__)("Write lede…","snow-monkey-blocks"),value:h,onChange:e=>s({lede:e})}),(!m.RichText.isEmpty(p)||a)&&(0,i.jsx)(m.RichText,{className:"smb-items__item__content",placeholder:(0,b.__)("Write content…","snow-monkey-blocks"),value:p,onChange:e=>s({summary:e})}),z&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("span",{ref:F,className:ee,href:x,style:te,target:"_self"===v?void 0:v,rel:"_self"===v?void 0:"noopener noreferrer",children:(0,i.jsx)(m.RichText,{className:"smb-btn__label",value:D,placeholder:(0,b.__)("Button","snow-monkey-blocks"),onChange:e=>s({btnLabel:e}),withoutInteractiveFormatting:!0,ref:se})})})]})]})}),z&&(0,i.jsx)(m.BlockControls,{group:"block",children:(0,i.jsx)(r.ToolbarButton,{name:"link",icon:u,title:(0,b.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),V(!0)},isActive:K})}),a&&E&&(0,i.jsx)(r.Popover,{placement:"bottom",anchor:O,onClose:()=>{V(!1),se.current?.focus()},children:(0,i.jsx)(m.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:x,opensInNewTab:G},onChange:({url:e,opensInNewTab:t})=>s({url:e,target:t?"_blank":"_self"}),onRemove:()=>{s({url:void 0,target:void 0}),V(!1),se.current?.focus()},forceIsEditingLink:!K})})]})},save:function({attributes:e,className:t}){const{titleTagName:s,title:a,lede:l,summary:o,url:r,target:c,displayImage:d,imageID:b,imageURL:_,imageAlt:u,imageWidth:g,imageHeight:h,displayBtn:p,btnLabel:x,btnBackgroundColor:y,btnBackgroundGradientColor:v,btnTextColor:f,btnSize:k,btnBorderRadius:j,btnWrap:N}=e,R=(0,m.__experimentalGetColorClassesAndStyles)(e),T=n()("c-row__col",t),C=n()("smb-items__item__btn","smb-btn",{[`smb-btn--${k}`]:!!k,"smb-btn--wrap":N}),B={"--smb-btn--background-color":y||void 0,"--smb-btn--background-image":v||void 0,"--smb-btn--border-radius":w(j),"--smb-btn--color":f||void 0};return(0,i.jsx)("div",{...m.useBlockProps.save({className:T}),children:(0,i.jsxs)("div",{className:n()("smb-items__item",R?.className),style:{...R?.style},children:[d&&(0,i.jsx)("div",{className:"smb-items__item__figure",children:(0,i.jsx)("img",{src:_,alt:u,width:!!g&&g,height:!!h&&h,className:`wp-image-${b}`})}),(0,i.jsxs)("div",{className:"smb-items__item__body",children:["none"!==s&&(0,i.jsx)(m.RichText.Content,{tagName:s,className:"smb-items__item__title",value:a}),!m.RichText.isEmpty(l)&&(0,i.jsx)("div",{className:"smb-items__item__lede",children:(0,i.jsx)(m.RichText.Content,{value:l})}),!m.RichText.isEmpty(o)&&(0,i.jsx)("div",{className:"smb-items__item__content",children:(0,i.jsx)(m.RichText.Content,{value:o})}),p&&(0,i.jsx)("div",{className:"smb-items__item__action",children:(0,i.jsx)("a",{className:C,href:r,style:B,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,i.jsx)("span",{className:"smb-btn__label",children:(0,i.jsx)(m.RichText.Content,{value:x})})})})]})]})})},deprecated:C,transforms:B})})()})(); -
snow-monkey-blocks/trunk/dist/blocks/items/style-index-rtl.css
r3390891 r3400189 1 .smb-items{--smb-items--style--boundary-line--border-color:var(--_lighter-color-gray);--smb-items--style--border--border-color:var(--_lighter-color-gray);--smb-items--banner--color:var(--wp--preset--color--white);--smb-items--banner--mask-color:var(--wp--preset--color--black);--smb-items--banner--mask-image:initial;--smb-items--banner--mask-opacity:1}.smb-items--glue>.c-row{--_gap:var(--_margin1);margin-right:0;margin-left:0}.smb-items--glue>.c-row>.c-row__col{padding-right:0;padding-left:0}.smb-items--fill>.c-row>.c-row__col{display:flex;flex-direction:column}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body,.smb-items--fill>.c-row>.c-row__col>.smb-items__item{display:flex;flex:1 1 0%;flex-direction:column}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body >*{margin-top:0}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body:has(>.block-list-appender)>:nth-last-child(2),.smb-items--fill>.c-row>.c-row__col .smb-items__item__body>:last-child:not(.block-list-appender){margin-bottom:0;margin-top:auto}.smb-items a.smb-items__item{color:inherit;text-decoration:none;--_transition-duration:var(--_global--transition-duration);--_transition-function-timing:var(--_global--transition-function-timing);--_transition-delay:var(--_global--transition-delay);transition:opacity var(--_transition-duration) var(--_transition-function-timing) var(--_transition-delay)}.smb-items a.smb-items__item:focus-visible{opacity:.8}.smb-items__item{display:block;padding:0;position:relative}.smb-items__item.has-background>.smb-items__item__figure{margin-bottom:0}.smb-items__item.has-background>.smb-items__item__body{padding:var(--_padding1)}.smb-items__item__figure{text-align:center}.smb-items__item__title{margin:0;--_font-size-level:2;font-size:var(--_fluid-font-size);font-weight:700;line-height:var(--_line-height)}.smb-items__item__lede{--_font-size-level:-1;font-size:var(--_font-size);line-height:var(--_line-height)}.smb-items__item__lede>a{color:inherit}.smb-items__item__action{text-align:center}.smb-items__item--block-link{cursor:pointer}.smb-items__item--block-link:has(:focus-visible){outline:auto;outline:auto -webkit-focus-ring-color}.smb-items__item--block-link .smb-items__item__action a{filter:none!important}.smb-items__item a.smb-items__item--block-link{color:inherit;display:block}.smb-items__item--free>.smb-items__item__body{padding:0}.smb-items__item__figure:not(:last-child){margin-bottom:var(--_margin-1)}*+.smb-items__item__content{margin-top:var(--_margin-2)}.smb-items__item__content:not(:last-child){margin-bottom:var(--_margin-1)}*+.smb-items__item__action{margin-top:var(--_margin-1)}.smb-items__banner{color:var(--smb-items--banner--color);overflow:hidden;position:relative}.smb-items__banner:focus-visible .smb-items__banner__figure{filter:brightness(80%)}.smb-items__banner[class*=has-text-align-]{text-align:initial}.smb-items__banner[class*=has-text-align-] .smb-items__banner__body{align-items:center;flex-direction:column;justify-content:center}.smb-items__banner.has-text-align-left .smb-items__banner__body{align-items:flex-start}.smb-items__banner.has-text-align-center .smb-items__banner__body{align-items:center}.smb-items__banner.has-text-align-right .smb-items__banner__body{align-items:flex-end}.smb-items__banner--left .smb-items__banner__body-inner{text-align:right}.smb-items__banner--center .smb-items__banner__body-inner{text-align:center}.smb-items__banner--right .smb-items__banner__body-inner{text-align:left}.smb-items__banner--blur .smb-items__banner__figure{overflow:hidden}.smb-items__banner--blur .smb-items__banner__figure>img{filter:blur(3px);height:calc(100% + 6px);margin:-3px;max-height:none;max-width:none;transform:translateZ(0);width:calc(100% + 6px)}.smb-items__banner--contents .smb-items__banner__figure,.smb-items__banner--standard .smb-items__banner__figure,.smb-items__banner--vstandard .smb-items__banner__figure,.smb-items__banner--vwide .smb-items__banner__figure,.smb-items__banner--wide .smb-items__banner__figure{bottom:0;right:0;position:absolute;left:0;top:0}.smb-items__banner--contents .smb-items__banner__figure>img,.smb-items__banner--standard .smb-items__banner__figure>img,.smb-items__banner--vstandard .smb-items__banner__figure>img,.smb-items__banner--vwide .smb-items__banner__figure>img,.smb-items__banner--wide .smb-items__banner__figure>img{object-fit:cover}.smb-items__banner--contents .smb-items__banner__figure__dummy,.smb-items__banner--standard .smb-items__banner__figure__dummy,.smb-items__banner--vstandard .smb-items__banner__figure__dummy,.smb-items__banner--vwide .smb-items__banner__figure__dummy,.smb-items__banner--wide .smb-items__banner__figure__dummy{bottom:0;right:0;position:absolute;left:0;top:0}.smb-items__banner--contents .smb-items__banner__figure__dummy:before,.smb-items__banner--standard .smb-items__banner__figure__dummy:before,.smb-items__banner--vstandard .smb-items__banner__figure__dummy:before,.smb-items__banner--vwide .smb-items__banner__figure__dummy:before,.smb-items__banner--wide .smb-items__banner__figure__dummy:before{display:none}.smb-items__banner--contents .smb-items__banner__body,.smb-items__banner--standard,.smb-items__banner--vstandard,.smb-items__banner--vwide,.smb-items__banner--wide{position:relative}.smb-items__banner--standard:before,.smb-items__banner--vstandard:before,.smb-items__banner--vwide:before,.smb-items__banner--wide:before{content:"";display:block}.smb-items__banner--standard:before{padding:75% 0 0}.smb-items__banner--wide:before{padding:56.25% 0 0}.smb-items__banner--vstandard{max-height:100vh}.smb-items__banner--vstandard:before{padding:133.33333% 0 0}.smb-items__banner--vwide{max-height:100vh}.smb-items__banner--vwide:before{padding:177.77777% 0 0}.smb-items__banner__figure{--_transition-duration:var(--_global--transition-duration);--_transition-function-timing:var(--_global--transition-function-timing);--_transition-delay:var(--_global--transition-delay);transition:filter var(--_transition-duration) var(--_transition-function-timing) var(--_transition-delay)}.smb-items__banner__figure>img{display:block;height:100%;max-width:none;object-fit:cover;object-position:50% 50%;opacity:var(--smb-items--banner--mask-opacity);position:relative;width:calc(100% + 1px)}.smb-items__banner__figure__dummy{background-color:var(--_color-gray);opacity:var(--smb-items--banner--mask-opacity);position:relative}.smb-items__banner__figure__dummy:before{content:"";display:block;padding:56.25% 0 0}.smb-items__banner__figure__mask{background-color:var(--smb-items--banner--mask-color);background-image:var(--smb-items--banner--mask-image);bottom:0;right:0;position:absolute;left:0;top:0}.smb-items__banner__body{bottom:0;right:0;padding:var(--_padding1);position:absolute;left:0;top:0}.smb-items__banner__body a{position:relative;z-index:1}.smb-items__banner__title{line-height:1.4}.smb-items__banner__lede{margin-top:var(--_margin-2);--_font-size-level:-2;font-size:var(--_font-size);line-height:var(--_line-height)}.smb-items__banner__action{font-size:0!important;position:static!important}.smb-items__banner__action>a{position:static!important}.smb-items__banner__action>a:after{bottom:0;content:"";right:0;position:absolute;left:0;top:0}.smb-items__banner__action>a:focus:after{outline:1px auto -webkit-focus-ring-color;outline-offset:-2px}.is-style-boundary-line.smb-items{overflow:hidden}.is-style-boundary-line.smb-items>.c-row--margin{margin-right:calc(var(--_gap)*-1);margin-left:calc(var(--_gap)*-1)}.is-style-boundary-line.smb-items>.c-row--margin>.c-row__col{padding-right:var(--_gap);padding-left:var(--_gap)}.is-style-boundary-line.smb-items>.c-row>.c-row__col{border-right:1px solid var(--smb-items--style--boundary-line--border-color)}.is-style-border.smb-items{border:1px solid var(--smb-items--style--border--border-color);overflow:hidden}.is-style-border.smb-items>.c-row{margin:0}.is-style-border.smb-items>.c-row--margin{margin-bottom:-1px;margin-right:0;margin-left:-1px}.is-style-border.smb-items>.c-row--margin>.c-row__col{padding:var(--_gap)}.is-style-border.smb-items>.c-row>.c-row__col{border-bottom:1px solid var(--smb-items--style--border--border-color);border-left:1px solid var(--smb-items--style--border--border-color);margin-bottom:0;margin-top:-1px}:where(.smb-items__item__body.is-layout-constrained>*){--wp--style--global--content-size:100%;--wp--style--global--wide-size:100%}@media(any-hover:hover){.smb-items a.smb-items__item:hover{opacity:.8}.smb-items__banner:hover .smb-items__banner__figure{filter:brightness(80%)}}1 .smb-items{--smb-items--style--boundary-line--border-color:var(--_lighter-color-gray);--smb-items--style--border--border-color:var(--_lighter-color-gray);--smb-items--banner--color:var(--wp--preset--color--white);--smb-items--banner--mask-color:var(--wp--preset--color--black);--smb-items--banner--mask-image:initial;--smb-items--banner--mask-opacity:1}.smb-items--glue>.c-row{--_gap:var(--_margin1);margin-right:0;margin-left:0}.smb-items--glue>.c-row>.c-row__col{padding-right:0;padding-left:0}.smb-items--fill>.c-row>.c-row__col{display:flex;flex-direction:column}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body,.smb-items--fill>.c-row>.c-row__col>.smb-items__item{display:flex;flex:1 1 0%;flex-direction:column}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body:has(>.block-list-appender)>:nth-last-child(2),.smb-items--fill>.c-row>.c-row__col .smb-items__item__body>:last-child:not(.block-list-appender){margin-bottom:0;margin-top:auto}.smb-items a.smb-items__item{color:inherit;text-decoration:none;--_transition-duration:var(--_global--transition-duration);--_transition-function-timing:var(--_global--transition-function-timing);--_transition-delay:var(--_global--transition-delay);transition:opacity var(--_transition-duration) var(--_transition-function-timing) var(--_transition-delay)}.smb-items a.smb-items__item:focus-visible{opacity:.8}.smb-items__item{display:block;padding:0;position:relative}.smb-items__item.has-background>.smb-items__item__figure{margin-bottom:0}.smb-items__item.has-background>.smb-items__item__body{padding:var(--_padding1)}.smb-items__item__figure{text-align:center}.smb-items__item__title{margin:0;--_font-size-level:2;font-size:var(--_fluid-font-size);font-weight:700;line-height:var(--_line-height)}.smb-items__item__lede{--_font-size-level:-1;font-size:var(--_font-size);line-height:var(--_line-height)}.smb-items__item__lede>a{color:inherit}.smb-items__item__action{text-align:center}.smb-items__item--block-link{cursor:pointer}.smb-items__item--block-link:has(:focus-visible){outline:auto;outline:auto -webkit-focus-ring-color}.smb-items__item--block-link .smb-items__item__action a{filter:none!important}.smb-items__item a.smb-items__item--block-link{color:inherit;display:block}.smb-items__item--free>.smb-items__item__body{padding:0}.smb-items__item__figure:not(:last-child){margin-bottom:var(--_margin-1)}*+.smb-items__item__content{margin-top:var(--_margin-2)}.smb-items__item__content:not(:last-child){margin-bottom:var(--_margin-1)}*+.smb-items__item__action{margin-top:var(--_margin-1)}.smb-items__banner{color:var(--smb-items--banner--color);overflow:hidden;position:relative}.smb-items__banner:focus-visible .smb-items__banner__figure{filter:brightness(80%)}.smb-items__banner[class*=has-text-align-]{text-align:initial}.smb-items__banner[class*=has-text-align-] .smb-items__banner__body{align-items:center;flex-direction:column;justify-content:center}.smb-items__banner.has-text-align-left .smb-items__banner__body{align-items:flex-start}.smb-items__banner.has-text-align-center .smb-items__banner__body{align-items:center}.smb-items__banner.has-text-align-right .smb-items__banner__body{align-items:flex-end}.smb-items__banner--left .smb-items__banner__body-inner{text-align:right}.smb-items__banner--center .smb-items__banner__body-inner{text-align:center}.smb-items__banner--right .smb-items__banner__body-inner{text-align:left}.smb-items__banner--blur .smb-items__banner__figure{overflow:hidden}.smb-items__banner--blur .smb-items__banner__figure>img{filter:blur(3px);height:calc(100% + 6px);margin:-3px;max-height:none;max-width:none;transform:translateZ(0);width:calc(100% + 6px)}.smb-items__banner--contents .smb-items__banner__figure,.smb-items__banner--standard .smb-items__banner__figure,.smb-items__banner--vstandard .smb-items__banner__figure,.smb-items__banner--vwide .smb-items__banner__figure,.smb-items__banner--wide .smb-items__banner__figure{bottom:0;right:0;position:absolute;left:0;top:0}.smb-items__banner--contents .smb-items__banner__figure>img,.smb-items__banner--standard .smb-items__banner__figure>img,.smb-items__banner--vstandard .smb-items__banner__figure>img,.smb-items__banner--vwide .smb-items__banner__figure>img,.smb-items__banner--wide .smb-items__banner__figure>img{object-fit:cover}.smb-items__banner--contents .smb-items__banner__figure__dummy,.smb-items__banner--standard .smb-items__banner__figure__dummy,.smb-items__banner--vstandard .smb-items__banner__figure__dummy,.smb-items__banner--vwide .smb-items__banner__figure__dummy,.smb-items__banner--wide .smb-items__banner__figure__dummy{bottom:0;right:0;position:absolute;left:0;top:0}.smb-items__banner--contents .smb-items__banner__figure__dummy:before,.smb-items__banner--standard .smb-items__banner__figure__dummy:before,.smb-items__banner--vstandard .smb-items__banner__figure__dummy:before,.smb-items__banner--vwide .smb-items__banner__figure__dummy:before,.smb-items__banner--wide .smb-items__banner__figure__dummy:before{display:none}.smb-items__banner--contents .smb-items__banner__body,.smb-items__banner--standard,.smb-items__banner--vstandard,.smb-items__banner--vwide,.smb-items__banner--wide{position:relative}.smb-items__banner--standard:before,.smb-items__banner--vstandard:before,.smb-items__banner--vwide:before,.smb-items__banner--wide:before{content:"";display:block}.smb-items__banner--standard:before{padding:75% 0 0}.smb-items__banner--wide:before{padding:56.25% 0 0}.smb-items__banner--vstandard{max-height:100vh}.smb-items__banner--vstandard:before{padding:133.33333% 0 0}.smb-items__banner--vwide{max-height:100vh}.smb-items__banner--vwide:before{padding:177.77777% 0 0}.smb-items__banner__figure{--_transition-duration:var(--_global--transition-duration);--_transition-function-timing:var(--_global--transition-function-timing);--_transition-delay:var(--_global--transition-delay);transition:filter var(--_transition-duration) var(--_transition-function-timing) var(--_transition-delay)}.smb-items__banner__figure>img{display:block;height:100%;max-width:none;object-fit:cover;object-position:50% 50%;opacity:var(--smb-items--banner--mask-opacity);position:relative;width:calc(100% + 1px)}.smb-items__banner__figure__dummy{background-color:var(--_color-gray);opacity:var(--smb-items--banner--mask-opacity);position:relative}.smb-items__banner__figure__dummy:before{content:"";display:block;padding:56.25% 0 0}.smb-items__banner__figure__mask{background-color:var(--smb-items--banner--mask-color);background-image:var(--smb-items--banner--mask-image);bottom:0;right:0;position:absolute;left:0;top:0}.smb-items__banner__body{bottom:0;right:0;padding:var(--_padding1);position:absolute;left:0;top:0}.smb-items__banner__body a{position:relative;z-index:1}.smb-items__banner__title{line-height:1.4}.smb-items__banner__lede{margin-top:var(--_margin-2);--_font-size-level:-2;font-size:var(--_font-size);line-height:var(--_line-height)}.smb-items__banner__action{font-size:0!important;position:static!important}.smb-items__banner__action>a{position:static!important}.smb-items__banner__action>a:after{bottom:0;content:"";right:0;position:absolute;left:0;top:0}.smb-items__banner__action>a:focus:after{outline:1px auto -webkit-focus-ring-color;outline-offset:-2px}.is-style-boundary-line.smb-items{overflow:hidden}.is-style-boundary-line.smb-items>.c-row--margin{margin-right:calc(var(--_gap)*-1);margin-left:calc(var(--_gap)*-1)}.is-style-boundary-line.smb-items>.c-row--margin>.c-row__col{padding-right:var(--_gap);padding-left:var(--_gap)}.is-style-boundary-line.smb-items>.c-row>.c-row__col{border-right:1px solid var(--smb-items--style--boundary-line--border-color)}.is-style-border.smb-items{border:1px solid var(--smb-items--style--border--border-color);overflow:hidden}.is-style-border.smb-items>.c-row{margin:0}.is-style-border.smb-items>.c-row--margin{margin-bottom:-1px;margin-right:0;margin-left:-1px}.is-style-border.smb-items>.c-row--margin>.c-row__col{padding:var(--_gap)}.is-style-border.smb-items>.c-row>.c-row__col{border-bottom:1px solid var(--smb-items--style--border--border-color);border-left:1px solid var(--smb-items--style--border--border-color);margin-bottom:0;margin-top:-1px}:where(.smb-items__item__body.is-layout-constrained>*){--wp--style--global--content-size:100%;--wp--style--global--wide-size:100%}@media(any-hover:hover){.smb-items a.smb-items__item:hover{opacity:.8}.smb-items__banner:hover .smb-items__banner__figure{filter:brightness(80%)}} -
snow-monkey-blocks/trunk/dist/blocks/items/style-index.css
r3390891 r3400189 1 .smb-items{--smb-items--style--boundary-line--border-color:var(--_lighter-color-gray);--smb-items--style--border--border-color:var(--_lighter-color-gray);--smb-items--banner--color:var(--wp--preset--color--white);--smb-items--banner--mask-color:var(--wp--preset--color--black);--smb-items--banner--mask-image:initial;--smb-items--banner--mask-opacity:1}.smb-items--glue>.c-row{--_gap:var(--_margin1);margin-left:0;margin-right:0}.smb-items--glue>.c-row>.c-row__col{padding-left:0;padding-right:0}.smb-items--fill>.c-row>.c-row__col{display:flex;flex-direction:column}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body,.smb-items--fill>.c-row>.c-row__col>.smb-items__item{display:flex;flex:1 1 0%;flex-direction:column}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body >*{margin-top:0}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body:has(>.block-list-appender)>:nth-last-child(2),.smb-items--fill>.c-row>.c-row__col .smb-items__item__body>:last-child:not(.block-list-appender){margin-bottom:0;margin-top:auto}.smb-items a.smb-items__item{color:inherit;text-decoration:none;--_transition-duration:var(--_global--transition-duration);--_transition-function-timing:var(--_global--transition-function-timing);--_transition-delay:var(--_global--transition-delay);transition:opacity var(--_transition-duration) var(--_transition-function-timing) var(--_transition-delay)}.smb-items a.smb-items__item:focus-visible{opacity:.8}.smb-items__item{display:block;padding:0;position:relative}.smb-items__item.has-background>.smb-items__item__figure{margin-bottom:0}.smb-items__item.has-background>.smb-items__item__body{padding:var(--_padding1)}.smb-items__item__figure{text-align:center}.smb-items__item__title{margin:0;--_font-size-level:2;font-size:var(--_fluid-font-size);font-weight:700;line-height:var(--_line-height)}.smb-items__item__lede{--_font-size-level:-1;font-size:var(--_font-size);line-height:var(--_line-height)}.smb-items__item__lede>a{color:inherit}.smb-items__item__action{text-align:center}.smb-items__item--block-link{cursor:pointer}.smb-items__item--block-link:has(:focus-visible){outline:auto;outline:auto -webkit-focus-ring-color}.smb-items__item--block-link .smb-items__item__action a{filter:none!important}.smb-items__item a.smb-items__item--block-link{color:inherit;display:block}.smb-items__item--free>.smb-items__item__body{padding:0}.smb-items__item__figure:not(:last-child){margin-bottom:var(--_margin-1)}*+.smb-items__item__content{margin-top:var(--_margin-2)}.smb-items__item__content:not(:last-child){margin-bottom:var(--_margin-1)}*+.smb-items__item__action{margin-top:var(--_margin-1)}.smb-items__banner{color:var(--smb-items--banner--color);overflow:hidden;position:relative}.smb-items__banner:focus-visible .smb-items__banner__figure{filter:brightness(80%)}.smb-items__banner[class*=has-text-align-]{text-align:initial}.smb-items__banner[class*=has-text-align-] .smb-items__banner__body{align-items:center;flex-direction:column;justify-content:center}.smb-items__banner.has-text-align-left .smb-items__banner__body{align-items:flex-start}.smb-items__banner.has-text-align-center .smb-items__banner__body{align-items:center}.smb-items__banner.has-text-align-right .smb-items__banner__body{align-items:flex-end}.smb-items__banner--left .smb-items__banner__body-inner{text-align:left}.smb-items__banner--center .smb-items__banner__body-inner{text-align:center}.smb-items__banner--right .smb-items__banner__body-inner{text-align:right}.smb-items__banner--blur .smb-items__banner__figure{overflow:hidden}.smb-items__banner--blur .smb-items__banner__figure>img{filter:blur(3px);height:calc(100% + 6px);margin:-3px;max-height:none;max-width:none;transform:translateZ(0);width:calc(100% + 6px)}.smb-items__banner--contents .smb-items__banner__figure,.smb-items__banner--standard .smb-items__banner__figure,.smb-items__banner--vstandard .smb-items__banner__figure,.smb-items__banner--vwide .smb-items__banner__figure,.smb-items__banner--wide .smb-items__banner__figure{bottom:0;left:0;position:absolute;right:0;top:0}.smb-items__banner--contents .smb-items__banner__figure>img,.smb-items__banner--standard .smb-items__banner__figure>img,.smb-items__banner--vstandard .smb-items__banner__figure>img,.smb-items__banner--vwide .smb-items__banner__figure>img,.smb-items__banner--wide .smb-items__banner__figure>img{object-fit:cover}.smb-items__banner--contents .smb-items__banner__figure__dummy,.smb-items__banner--standard .smb-items__banner__figure__dummy,.smb-items__banner--vstandard .smb-items__banner__figure__dummy,.smb-items__banner--vwide .smb-items__banner__figure__dummy,.smb-items__banner--wide .smb-items__banner__figure__dummy{bottom:0;left:0;position:absolute;right:0;top:0}.smb-items__banner--contents .smb-items__banner__figure__dummy:before,.smb-items__banner--standard .smb-items__banner__figure__dummy:before,.smb-items__banner--vstandard .smb-items__banner__figure__dummy:before,.smb-items__banner--vwide .smb-items__banner__figure__dummy:before,.smb-items__banner--wide .smb-items__banner__figure__dummy:before{display:none}.smb-items__banner--contents .smb-items__banner__body,.smb-items__banner--standard,.smb-items__banner--vstandard,.smb-items__banner--vwide,.smb-items__banner--wide{position:relative}.smb-items__banner--standard:before,.smb-items__banner--vstandard:before,.smb-items__banner--vwide:before,.smb-items__banner--wide:before{content:"";display:block}.smb-items__banner--standard:before{padding:75% 0 0}.smb-items__banner--wide:before{padding:56.25% 0 0}.smb-items__banner--vstandard{max-height:100vh}.smb-items__banner--vstandard:before{padding:133.33333% 0 0}.smb-items__banner--vwide{max-height:100vh}.smb-items__banner--vwide:before{padding:177.77777% 0 0}.smb-items__banner__figure{--_transition-duration:var(--_global--transition-duration);--_transition-function-timing:var(--_global--transition-function-timing);--_transition-delay:var(--_global--transition-delay);transition:filter var(--_transition-duration) var(--_transition-function-timing) var(--_transition-delay)}.smb-items__banner__figure>img{display:block;height:100%;max-width:none;object-fit:cover;object-position:50% 50%;opacity:var(--smb-items--banner--mask-opacity);position:relative;width:calc(100% + 1px)}.smb-items__banner__figure__dummy{background-color:var(--_color-gray);opacity:var(--smb-items--banner--mask-opacity);position:relative}.smb-items__banner__figure__dummy:before{content:"";display:block;padding:56.25% 0 0}.smb-items__banner__figure__mask{background-color:var(--smb-items--banner--mask-color);background-image:var(--smb-items--banner--mask-image);bottom:0;left:0;position:absolute;right:0;top:0}.smb-items__banner__body{bottom:0;left:0;padding:var(--_padding1);position:absolute;right:0;top:0}.smb-items__banner__body a{position:relative;z-index:1}.smb-items__banner__title{line-height:1.4}.smb-items__banner__lede{margin-top:var(--_margin-2);--_font-size-level:-2;font-size:var(--_font-size);line-height:var(--_line-height)}.smb-items__banner__action{font-size:0!important;position:static!important}.smb-items__banner__action>a{position:static!important}.smb-items__banner__action>a:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0}.smb-items__banner__action>a:focus:after{outline:1px auto -webkit-focus-ring-color;outline-offset:-2px}.is-style-boundary-line.smb-items{overflow:hidden}.is-style-boundary-line.smb-items>.c-row--margin{margin-left:calc(var(--_gap)*-1);margin-right:calc(var(--_gap)*-1)}.is-style-boundary-line.smb-items>.c-row--margin>.c-row__col{padding-left:var(--_gap);padding-right:var(--_gap)}.is-style-boundary-line.smb-items>.c-row>.c-row__col{border-left:1px solid var(--smb-items--style--boundary-line--border-color)}.is-style-border.smb-items{border:1px solid var(--smb-items--style--border--border-color);overflow:hidden}.is-style-border.smb-items>.c-row{margin:0}.is-style-border.smb-items>.c-row--margin{margin-bottom:-1px;margin-left:0;margin-right:-1px}.is-style-border.smb-items>.c-row--margin>.c-row__col{padding:var(--_gap)}.is-style-border.smb-items>.c-row>.c-row__col{border-bottom:1px solid var(--smb-items--style--border--border-color);border-right:1px solid var(--smb-items--style--border--border-color);margin-bottom:0;margin-top:-1px}:where(.smb-items__item__body.is-layout-constrained>*){--wp--style--global--content-size:100%;--wp--style--global--wide-size:100%}@media(any-hover:hover){.smb-items a.smb-items__item:hover{opacity:.8}.smb-items__banner:hover .smb-items__banner__figure{filter:brightness(80%)}}1 .smb-items{--smb-items--style--boundary-line--border-color:var(--_lighter-color-gray);--smb-items--style--border--border-color:var(--_lighter-color-gray);--smb-items--banner--color:var(--wp--preset--color--white);--smb-items--banner--mask-color:var(--wp--preset--color--black);--smb-items--banner--mask-image:initial;--smb-items--banner--mask-opacity:1}.smb-items--glue>.c-row{--_gap:var(--_margin1);margin-left:0;margin-right:0}.smb-items--glue>.c-row>.c-row__col{padding-left:0;padding-right:0}.smb-items--fill>.c-row>.c-row__col{display:flex;flex-direction:column}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body,.smb-items--fill>.c-row>.c-row__col>.smb-items__item{display:flex;flex:1 1 0%;flex-direction:column}.smb-items--fill>.c-row>.c-row__col .smb-items__item__body:has(>.block-list-appender)>:nth-last-child(2),.smb-items--fill>.c-row>.c-row__col .smb-items__item__body>:last-child:not(.block-list-appender){margin-bottom:0;margin-top:auto}.smb-items a.smb-items__item{color:inherit;text-decoration:none;--_transition-duration:var(--_global--transition-duration);--_transition-function-timing:var(--_global--transition-function-timing);--_transition-delay:var(--_global--transition-delay);transition:opacity var(--_transition-duration) var(--_transition-function-timing) var(--_transition-delay)}.smb-items a.smb-items__item:focus-visible{opacity:.8}.smb-items__item{display:block;padding:0;position:relative}.smb-items__item.has-background>.smb-items__item__figure{margin-bottom:0}.smb-items__item.has-background>.smb-items__item__body{padding:var(--_padding1)}.smb-items__item__figure{text-align:center}.smb-items__item__title{margin:0;--_font-size-level:2;font-size:var(--_fluid-font-size);font-weight:700;line-height:var(--_line-height)}.smb-items__item__lede{--_font-size-level:-1;font-size:var(--_font-size);line-height:var(--_line-height)}.smb-items__item__lede>a{color:inherit}.smb-items__item__action{text-align:center}.smb-items__item--block-link{cursor:pointer}.smb-items__item--block-link:has(:focus-visible){outline:auto;outline:auto -webkit-focus-ring-color}.smb-items__item--block-link .smb-items__item__action a{filter:none!important}.smb-items__item a.smb-items__item--block-link{color:inherit;display:block}.smb-items__item--free>.smb-items__item__body{padding:0}.smb-items__item__figure:not(:last-child){margin-bottom:var(--_margin-1)}*+.smb-items__item__content{margin-top:var(--_margin-2)}.smb-items__item__content:not(:last-child){margin-bottom:var(--_margin-1)}*+.smb-items__item__action{margin-top:var(--_margin-1)}.smb-items__banner{color:var(--smb-items--banner--color);overflow:hidden;position:relative}.smb-items__banner:focus-visible .smb-items__banner__figure{filter:brightness(80%)}.smb-items__banner[class*=has-text-align-]{text-align:initial}.smb-items__banner[class*=has-text-align-] .smb-items__banner__body{align-items:center;flex-direction:column;justify-content:center}.smb-items__banner.has-text-align-left .smb-items__banner__body{align-items:flex-start}.smb-items__banner.has-text-align-center .smb-items__banner__body{align-items:center}.smb-items__banner.has-text-align-right .smb-items__banner__body{align-items:flex-end}.smb-items__banner--left .smb-items__banner__body-inner{text-align:left}.smb-items__banner--center .smb-items__banner__body-inner{text-align:center}.smb-items__banner--right .smb-items__banner__body-inner{text-align:right}.smb-items__banner--blur .smb-items__banner__figure{overflow:hidden}.smb-items__banner--blur .smb-items__banner__figure>img{filter:blur(3px);height:calc(100% + 6px);margin:-3px;max-height:none;max-width:none;transform:translateZ(0);width:calc(100% + 6px)}.smb-items__banner--contents .smb-items__banner__figure,.smb-items__banner--standard .smb-items__banner__figure,.smb-items__banner--vstandard .smb-items__banner__figure,.smb-items__banner--vwide .smb-items__banner__figure,.smb-items__banner--wide .smb-items__banner__figure{bottom:0;left:0;position:absolute;right:0;top:0}.smb-items__banner--contents .smb-items__banner__figure>img,.smb-items__banner--standard .smb-items__banner__figure>img,.smb-items__banner--vstandard .smb-items__banner__figure>img,.smb-items__banner--vwide .smb-items__banner__figure>img,.smb-items__banner--wide .smb-items__banner__figure>img{object-fit:cover}.smb-items__banner--contents .smb-items__banner__figure__dummy,.smb-items__banner--standard .smb-items__banner__figure__dummy,.smb-items__banner--vstandard .smb-items__banner__figure__dummy,.smb-items__banner--vwide .smb-items__banner__figure__dummy,.smb-items__banner--wide .smb-items__banner__figure__dummy{bottom:0;left:0;position:absolute;right:0;top:0}.smb-items__banner--contents .smb-items__banner__figure__dummy:before,.smb-items__banner--standard .smb-items__banner__figure__dummy:before,.smb-items__banner--vstandard .smb-items__banner__figure__dummy:before,.smb-items__banner--vwide .smb-items__banner__figure__dummy:before,.smb-items__banner--wide .smb-items__banner__figure__dummy:before{display:none}.smb-items__banner--contents .smb-items__banner__body,.smb-items__banner--standard,.smb-items__banner--vstandard,.smb-items__banner--vwide,.smb-items__banner--wide{position:relative}.smb-items__banner--standard:before,.smb-items__banner--vstandard:before,.smb-items__banner--vwide:before,.smb-items__banner--wide:before{content:"";display:block}.smb-items__banner--standard:before{padding:75% 0 0}.smb-items__banner--wide:before{padding:56.25% 0 0}.smb-items__banner--vstandard{max-height:100vh}.smb-items__banner--vstandard:before{padding:133.33333% 0 0}.smb-items__banner--vwide{max-height:100vh}.smb-items__banner--vwide:before{padding:177.77777% 0 0}.smb-items__banner__figure{--_transition-duration:var(--_global--transition-duration);--_transition-function-timing:var(--_global--transition-function-timing);--_transition-delay:var(--_global--transition-delay);transition:filter var(--_transition-duration) var(--_transition-function-timing) var(--_transition-delay)}.smb-items__banner__figure>img{display:block;height:100%;max-width:none;object-fit:cover;object-position:50% 50%;opacity:var(--smb-items--banner--mask-opacity);position:relative;width:calc(100% + 1px)}.smb-items__banner__figure__dummy{background-color:var(--_color-gray);opacity:var(--smb-items--banner--mask-opacity);position:relative}.smb-items__banner__figure__dummy:before{content:"";display:block;padding:56.25% 0 0}.smb-items__banner__figure__mask{background-color:var(--smb-items--banner--mask-color);background-image:var(--smb-items--banner--mask-image);bottom:0;left:0;position:absolute;right:0;top:0}.smb-items__banner__body{bottom:0;left:0;padding:var(--_padding1);position:absolute;right:0;top:0}.smb-items__banner__body a{position:relative;z-index:1}.smb-items__banner__title{line-height:1.4}.smb-items__banner__lede{margin-top:var(--_margin-2);--_font-size-level:-2;font-size:var(--_font-size);line-height:var(--_line-height)}.smb-items__banner__action{font-size:0!important;position:static!important}.smb-items__banner__action>a{position:static!important}.smb-items__banner__action>a:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0}.smb-items__banner__action>a:focus:after{outline:1px auto -webkit-focus-ring-color;outline-offset:-2px}.is-style-boundary-line.smb-items{overflow:hidden}.is-style-boundary-line.smb-items>.c-row--margin{margin-left:calc(var(--_gap)*-1);margin-right:calc(var(--_gap)*-1)}.is-style-boundary-line.smb-items>.c-row--margin>.c-row__col{padding-left:var(--_gap);padding-right:var(--_gap)}.is-style-boundary-line.smb-items>.c-row>.c-row__col{border-left:1px solid var(--smb-items--style--boundary-line--border-color)}.is-style-border.smb-items{border:1px solid var(--smb-items--style--border--border-color);overflow:hidden}.is-style-border.smb-items>.c-row{margin:0}.is-style-border.smb-items>.c-row--margin{margin-bottom:-1px;margin-left:0;margin-right:-1px}.is-style-border.smb-items>.c-row--margin>.c-row__col{padding:var(--_gap)}.is-style-border.smb-items>.c-row>.c-row__col{border-bottom:1px solid var(--smb-items--style--border--border-color);border-right:1px solid var(--smb-items--style--border--border-color);margin-bottom:0;margin-top:-1px}:where(.smb-items__item__body.is-layout-constrained>*){--wp--style--global--content-size:100%;--wp--style--global--wide-size:100%}@media(any-hover:hover){.smb-items a.smb-items__item:hover{opacity:.8}.smb-items__banner:hover .smb-items__banner__figure{filter:brightness(80%)}} -
snow-monkey-blocks/trunk/dist/blocks/media-text/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' 815d4fcfe9c6f1e87e67');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'cb9628848a5cdfec7b72'); -
snow-monkey-blocks/trunk/dist/blocks/media-text/index.js
r3390754 r3400189 1 (()=>{var e,t={5926:(e,t,i)=>{"use strict";const a=window.wp.blocks,l=window.wp.i18n,o=JSON.parse('{"UU":"snow-monkey-blocks/media-text","uK":{"backgroundColor":{"type":"string"},"backgroundGradientColor":{"type":"string"},"textColor":{"type":"string"},"titleTagName":{"type":"string","default":"h2"},"title":{"type":"string","source":"html","selector":".smb-media-text__title","default":""},"mediaId":{"type":"number","default":0},"mediaUrl":{"type":"string","source":"attribute","selector":".smb-media-text__figure img, .smb-media-text__figure video","attribute":"src","default":""},"mediaAlt":{"type":"string","source":"attribute","selector":".smb-media-text__figure img","attribute":"alt","default":""},"mediaWidth":{"type":"string","source":"attribute","selector":".smb-media-text__figure img, .smb-media-text__figure video","attribute":"width","default":""},"mediaHeight":{"type":"string","source":"attribute","selector":".smb-media-text__figure img, .smb-media-text__figure video","attribute":"height","default":""},"mediaSizeSlug":{"type":"string","default":"full"},"mediaType":{"type":"string"},"caption":{"type":"string","source":"html","selector":".smb-media-text__caption","default":""},"mediaPosition":{"type":"string","default":"right"},"verticalAlignment":{"type":"string","default":"center"},"mediaColumnSize":{"type":"string","default":66},"mobileOrder":{"type":"string"},"href":{"type":"string","default":""},"rel":{"type":"string","source":"attribute","selector":".smb-media-text__figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":".smb-media-text__figure > a","attribute":"class"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":".smb-media-text__figure > a","attribute":"target","default":"_self"},"imageFill":{"type":"boolean","default":false},"focalPoint":{"type":"object"},"splitPoint":{"type":"string","default":"lg"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"anchor":true,"spacing":{"margin":true,"blockGap":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}}}}'),s=window.ReactJSXRuntime,r=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{d:"M0,7.11v9.78a.61.61,0,0,0,.61.61h9.78a.61.61,0,0,0,.61-.61V7.11a.61.61,0,0,0-.61-.61H.61A.61.61,0,0,0,0,7.11m9.78,9.47H1.22a.29.29,0,0,1-.3-.3V7.72a.29.29,0,0,1,.3-.3H9.78a.29.29,0,0,1,.3.3v8.56a.29.29,0,0,1-.3.3"}),(0,s.jsx)("path",{d:"M.92,13.7,3.33,12a.15.15,0,0,1,.17,0l1.84,1.18a.15.15,0,0,0,.19,0l2.31-2.22a.15.15,0,0,1,.21,0l2.43,2.37v.91L8.05,11.8a.14.14,0,0,0-.21,0L5.53,14a.17.17,0,0,1-.19,0L3.5,12.87a.15.15,0,0,0-.18,0L.92,14.62Z"}),(0,s.jsx)("rect",{y:"6.5",width:"11",height:"11",fill:"none"}),(0,s.jsx)("rect",{x:"13.5",y:"8.5",width:"10.5",height:"1"}),(0,s.jsx)("rect",{x:"13.5",y:"11.5",width:"10.5",height:"1"}),(0,s.jsx)("rect",{x:"13.5",y:"14.5",width:"10.5",height:"1"})]});var n=i(6942),m=i.n(n);const d=window.lodash,c=window.wp.components,u=window.wp.blockEditor,g=window.wp.data,_=window.wp.primitives;var h=(0,s.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(_.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),p=(0,s.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(_.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})});const x=window.wp.compose,b=(e,t=null)=>{let i="1-3",a="2-3";return 75===parseInt(e)?(i="1-4",a="3-4"):66===parseInt(e)?(i="1-3",a="2-3"):50===parseInt(e)?(i="1-2",a="1-2"):33===parseInt(e)?(i="2-3",a="1-3"):25===parseInt(e)&&(i="3-4",a="1-4"),t&&100-parseInt(e)>=parseInt(t)&&(75===parseInt(t)?i="3-4":66===parseInt(t)?i="2-3":50===parseInt(t)?i="1-2":33===parseInt(t)?i="1-3":25===parseInt(t)&&(i="1-4")),{textColumnWidth:i,mediaColumnWidth:a,imageColumnWidth:a}},f=e=>e.media_type?"image"===e.media_type?"image":"video":e.type,w=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function v(e=""){return!!e&&w.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e))}const y=window.wp.element,k=({id:e,src:t,allowedTypes:i,accept:a,onSelect:o,onSelectURL:r,onRemove:n})=>(0,s.jsxs)(u.BlockControls,{group:"inline",children:[(0,s.jsx)(u.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:i,accept:a,onSelect:o,onSelectURL:r}),!!t&&!!n&&(0,s.jsx)(c.ToolbarButton,{onClick:n,children:(0,l.__)("Release","snow-monkey-blocks")})]}),j=({src:e,alt:t,id:i,style:a,width:l,height:o})=>(0,s.jsx)("img",{src:e,alt:t,className:`wp-image-${i}`,style:a,width:l,height:o}),C=({src:e,style:t,width:i,height:a})=>(0,s.jsx)("video",{src:e,style:t,width:i,height:a}),N=(0,y.memo)((({id:e,src:t,alt:i,url:a,width:l,height:o,target:r,allowedTypes:n,accept:m,onSelect:c,onSelectURL:u,onRemove:g,mediaType:_,style:h,rel:p,linkClass:x})=>{let b;if("image"===_){let n;b=(0,s.jsx)(j,{src:t,alt:i,id:e,style:h,width:l,height:o}),n=p?(0,d.isEmpty)(p)?void 0:p:"_self"!==r&&r?"noopener noreferrer":void 0,a&&(b=(0,s.jsx)("span",{href:a,target:"_self"===r?void 0:r,rel:n,className:x,children:b}))}else"video"===_&&(b=(0,s.jsx)(C,{src:t,style:h,width:l,height:o}));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{id:e,src:t,allowedTypes:n,accept:m,onSelect:c,onSelectURL:u,onRemove:g}),b]})}),((e,t)=>{const i=Object.keys(e);for(const a of i)if(e[a]!==t[a])return!1;return!0}));function S(e){const{src:t,onSelect:i,onSelectURL:a,mediaType:o,allowedTypes:r=["image"]}=e,n=!o&&t?"image":o;let m=(0,l.__)("Media","snow-monkey-blocks");1===r.length&&("image"===r[0]?m=(0,l.__)("Image","snow-monkey-blocks"):"video"===r[0]&&(m=(0,l.__)("Video","snow-monkey-blocks")));const d=(0,y.useMemo)((()=>r.map((e=>`${e}/*`)).join(",")),[r]);return t?(0,s.jsx)(N,{...e,accept:d,allowedTypes:r,mediaType:n}):(0,s.jsx)(u.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:i,onSelectURL:a,accept:d,allowedTypes:r})}const T=[{label:(0,l._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,l._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,l._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,l._x)("Full Size","Image size option for resolution control"),value:"full"}];function I({panelId:e,value:t,onChange:i,options:a=T,defaultValue:o=T[0].value,isShownByDefault:r=!0,withToolsPanelItem:n=!0}){const m=null!=t?t:o,d=()=>(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Resolution"),value:m,options:a,onChange:i,help:(0,l.__)("Select the size of the source image."),size:"__unstable-large"});return n?(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>m!==o,label:(0,l.__)("Resolution"),onDeselect:()=>i(o),isShownByDefault:r,panelId:e,children:(0,s.jsx)(d,{})}):(0,s.jsx)(d,{})}const P=["image","video"],z="media",R="attachment",B="full",U=[{attributes:{...o.uK},supports:{...o.xY},save({attributes:e,className:t}){const{backgroundColor:i,backgroundGradientColor:a,textColor:l,titleTagName:o,title:r,mediaId:n,mediaUrl:c,mediaAlt:g,mediaWidth:_,mediaHeight:h,caption:p,mediaPosition:x,verticalAlignment:f,mediaColumnSize:w,mobileOrder:v,href:y,linkTarget:k,rel:j,linkClass:C,mediaType:N,imageFill:S,focalPoint:T,splitPoint:I}=e,P="image"===N&&S,z=(0,d.isEmpty)(j)?void 0:j,{textColumnWidth:R,mediaColumnWidth:B}=b(w),U=m()("smb-media-text",t,{"smb-media-text--has-background":!!i||!!a,[`smb-media-text--mobile-${v}`]:!!v}),W=m()("c-row",{"c-row--reverse":"left"===x,"c-row--top":!P&&"top"===f,"c-row--middle":!P&&"center"===f,"c-row--bottom":!P&&"bottom"===f,"c-row--fill":P}),D=m()("c-row__col","c-row__col--1-1",[`c-row__col--${I}-${R}`]),A=m()("c-row__col","c-row__col--1-1",[`c-row__col--${I}-${B}`]),$=(0,s.jsx)("img",{src:c,alt:g,width:!!_&&_,height:!!h&&h,className:`wp-image-${n}`}),V=(0,s.jsx)("video",{controls:!0,src:c,width:!!_&&_,height:!!h&&h});let H;return c&&("image"===N||void 0===N?H=y?(0,s.jsx)("a",{href:y,target:k,className:C,rel:z,children:$}):$:"video"===N&&(H=V)),(0,s.jsx)("div",{...u.useBlockProps.save({className:U,style:{"--smb-media-text--background-color":i,"--smb-media-text--background-image":a,"--smb-media-text--color":l,"--smb-media-text--image-position-x":P&&T?.x?100*T.x+"%":void 0,"--smb-media-text--image-position-y":P&&T?.y?100*T.y+"%":void 0,"--smb-media-text--gap":(0,u.__experimentalGetGapCSSValue)(e?.style?.spacing?.blockGap)||void 0},"data-sm-split-point":I}),children:(0,s.jsxs)("div",{className:W,children:[(0,s.jsx)("div",{className:D,children:(0,s.jsxs)("div",{className:"smb-media-text__contents-wrapper",children:[!u.RichText.isEmpty(r)&&"none"!==o&&(0,s.jsx)(u.RichText.Content,{className:"smb-media-text__title",tagName:o,value:r}),(0,s.jsx)("div",{...u.useInnerBlocksProps.save({className:"smb-media-text__body"})})]})}),(0,s.jsxs)("div",{className:A,children:[(0,s.jsx)("div",{className:m()("smb-media-text__figure",{"smb-media-text__figure--fill":P}),children:H}),!u.RichText.isEmpty(p)&&(0,s.jsx)(u.RichText.Content,{tagName:"div",className:"smb-media-text__caption",value:p})]})]})})}},{attributes:{...o.uK},supports:{...o.xY},save({attributes:e,className:t}){const{titleTagName:i,title:a,mediaId:l,mediaUrl:o,mediaAlt:r,mediaWidth:n,mediaHeight:c,mediaType:g,caption:_,mediaPosition:h,verticalAlignment:p,mediaColumnSize:x,mobileOrder:f,href:w,rel:v,linkClass:y,linkTarget:k}=e,j=(0,d.isEmpty)(v)?void 0:v,{textColumnWidth:C,mediaColumnWidth:N}=b(x),S=m()("smb-media-text",t,{[`smb-media-text--mobile-${f}`]:!!f}),T=m()("c-row","c-row--margin",{"c-row--reverse":"left"===h,"c-row--top":"top"===p,"c-row--middle":"center"===p,"c-row--bottom":"bottom"===p}),I=m()("c-row__col","c-row__col--1-1",[`c-row__col--lg-${C}`]),P=m()("c-row__col","c-row__col--1-1",[`c-row__col--lg-${N}`]),z=(0,s.jsx)("img",{src:o,alt:r,width:!!n&&n,height:!!c&&c,className:`wp-image-${l}`}),R=(0,s.jsx)("video",{controls:!0,src:o,width:!!n&&n,height:!!c&&c});let B;return o&&("image"===g||void 0===g?B=w?(0,s.jsx)("a",{href:w,target:k,className:y,rel:j,children:z}):z:"video"===g&&(B=R)),(0,s.jsx)("div",{...u.useBlockProps.save({className:S}),children:(0,s.jsxs)("div",{className:T,children:[(0,s.jsxs)("div",{className:I,children:[!u.RichText.isEmpty(a)&&"none"!==i&&(0,s.jsx)(u.RichText.Content,{className:"smb-media-text__title",tagName:i,value:a}),(0,s.jsx)("div",{...u.useInnerBlocksProps.save({className:"smb-media-text__body"})})]}),(0,s.jsxs)("div",{className:P,children:[(0,s.jsx)("div",{className:"smb-media-text__figure",children:B}),!u.RichText.isEmpty(_)&&(0,s.jsx)(u.RichText.Content,{tagName:"div",className:"smb-media-text__caption",value:_})]})]})})}},{attributes:{...o.uK,url:{type:"string",default:""},imageMediaType:{type:"string"},imageSizeSlug:{type:"string",default:"full"},imagePosition:{type:"string",default:"right"},imageID:{type:"number",default:0},imageURL:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"src",default:""},imageAlt:{type:"string",source:"attribute",selector:".smb-media-text__figure img",attribute:"alt",default:""},imageWidth:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"width",default:""},imageHeight:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"height",default:""},imageColumnSize:{type:"string",default:66},target:{type:"string",default:"_self"}},migrate:e=>({...e,href:e.url,mediaType:e.imageMediaType,mediaSizeSlug:e.imageSizeSlug,mediaPosition:e.imagePosition,mediaId:e.imageID,mediaUrl:e.imageURL,mediaAlt:e.imageAlt,mediaWidth:e.imageWidth,mediaHeight:e.imageHeight,mediaColumnSize:e.imageColumnSize,linkTarget:e.target}),save({attributes:e,className:t}){const{titleTagName:i,title:a,imageID:l,imageURL:o,imageAlt:r,imageWidth:n,imageHeight:d,imageMediaType:c,caption:g,imagePosition:_,verticalAlignment:h,imageColumnSize:p,mobileOrder:x,url:f,target:w}=e,{textColumnWidth:v,imageColumnWidth:y}=b(p),k=m()("smb-media-text",t,{[`smb-media-text--mobile-${x}`]:!!x}),j=m()("c-row","c-row--margin",{"c-row--reverse":"left"===_,"c-row--top":"top"===h,"c-row--middle":"center"===h,"c-row--bottom":"bottom"===h}),C=m()("c-row__col","c-row__col--1-1",[`c-row__col--lg-${v}`]),N=m()("c-row__col","c-row__col--1-1",[`c-row__col--lg-${y}`]),S=(0,s.jsx)("img",{src:o,alt:r,width:!!n&&n,height:!!d&&d,className:`wp-image-${l}`}),T=(0,s.jsx)("video",{controls:!0,src:o,width:!!n&&n,height:!!d&&d});let I;return o&&("image"===c||void 0===c?I=f?(0,s.jsx)("a",{href:f,target:"_self"===w?void 0:w,rel:"_self"===w?void 0:"noopener noreferrer",children:S}):S:"video"===c&&(I=T)),(0,s.jsx)("div",{...u.useBlockProps.save({className:k}),children:(0,s.jsxs)("div",{className:j,children:[(0,s.jsxs)("div",{className:C,children:[!u.RichText.isEmpty(a)&&"none"!==i&&(0,s.jsx)(u.RichText.Content,{className:"smb-media-text__title",tagName:i,value:a}),(0,s.jsx)("div",{className:"smb-media-text__body",children:(0,s.jsx)(u.InnerBlocks.Content,{})})]}),(0,s.jsxs)("div",{className:N,children:[(0,s.jsx)("div",{className:"smb-media-text__figure",children:I}),!u.RichText.isEmpty(g)&&(0,s.jsx)("div",{className:"smb-media-text__caption",children:(0,s.jsx)(u.RichText.Content,{value:g})})]})]})})}},{attributes:{...o.uK,url:{type:"string",default:""},imageMediaType:{type:"string"},imageSizeSlug:{type:"string",default:"full"},imagePosition:{type:"string",default:"right"},imageID:{type:"number",default:0},imageURL:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"src",default:""},imageAlt:{type:"string",source:"attribute",selector:".smb-media-text__figure img",attribute:"alt",default:""},imageWidth:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"width",default:""},imageHeight:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"height",default:""},imageColumnSize:{type:"string",default:66},target:{type:"string",default:"_self"}},save({attributes:e}){const{title:t,imageID:i,imageURL:a,imagePosition:l,imageColumnSize:o}=e,{textColumnWidth:r,imageColumnWidth:n}=b(o);return(0,s.jsx)("div",{className:"smb-media-text",children:(0,s.jsxs)("div",{className:m()("c-row","c-row--margin","c-row--middle",{"c-row--reverse":"left"===l}),children:[(0,s.jsxs)("div",{className:`c-row__col c-row__col--1-1 c-row__col--lg-${r}`,children:[!u.RichText.isEmpty(t)&&(0,s.jsx)("h2",{className:"smb-media-text__title",children:(0,s.jsx)(u.RichText.Content,{value:t})}),(0,s.jsx)("div",{className:"smb-media-text__body",children:(0,s.jsx)(u.InnerBlocks.Content,{})})]}),(0,s.jsx)("div",{className:`c-row__col c-row__col--1-1 c-row__col--lg-${n}`,children:(0,s.jsx)("div",{className:"smb-media-text__figure",children:a&&(0,s.jsx)("img",{src:a,alt:"",className:`wp-image-${i}`})})})]})})}},{attributes:{...o.uK,url:{type:"string",default:""},imageMediaType:{type:"string"},imageSizeSlug:{type:"string",default:"full"},imagePosition:{type:"string",default:"right"},imageID:{type:"number",default:0},imageURL:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"src",default:""},imageAlt:{type:"string",source:"attribute",selector:".smb-media-text__figure img",attribute:"alt",default:""},imageWidth:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"width",default:""},imageHeight:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"height",default:""},imageColumnSize:{type:"string",default:66},target:{type:"string",default:"_self"}},save({attributes:e}){const{title:t,imageURL:i,imagePosition:a,imageColumnSize:l}=e,{textColumnWidth:o,imageColumnWidth:r}=b(l);return(0,s.jsx)("div",{className:"smb-media-text",children:(0,s.jsxs)("div",{className:m()("c-row","c-row--margin","c-row--middle",{"c-row--reverse":"left"===a}),children:[(0,s.jsxs)("div",{className:`c-row__col c-row__col--1-1 c-row__col--lg-${o}`,children:[!u.RichText.isEmpty(t)&&(0,s.jsx)("h2",{className:"smb-media-text__title",children:(0,s.jsx)(u.RichText.Content,{value:t})}),(0,s.jsx)("div",{className:"smb-media-text__body",children:(0,s.jsx)(u.InnerBlocks.Content,{})})]}),(0,s.jsx)("div",{className:`c-row__col c-row__col--1-1 c-row__col--lg-${r}`,children:(0,s.jsx)("div",{className:"smb-media-text__figure",children:i&&(0,s.jsx)("img",{src:i,alt:""})})})]})})}}],W={attributes:{mediaId:1,mediaUrl:`${smb.pluginUrl}/dist/img/photos/man-guy-photographer1579.jpg`},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"}}]};(0,a.registerBlockType)(o.UU,{icon:{foreground:"#cd162c",src:r},keywords:[(0,l.__)("Image","snow-monkey-blocks"),(0,l.__)("Video","snow-monkey-blocks"),(0,l.__)("Media & sentence","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:t,isSelected:i,className:a,clientId:r}){const{backgroundColor:n,backgroundGradientColor:_,textColor:w,titleTagName:y,title:k,mediaId:j,mediaUrl:C,mediaAlt:N,mediaWidth:T,mediaHeight:U,mediaSizeSlug:W,caption:D,mediaPosition:A,verticalAlignment:$,mediaColumnSize:V,mobileOrder:H,href: M,linkTarget:K,rel:L,linkClass:O,linkDestination:G,mediaType:E,imageFill:F,focalPoint:Y,splitPoint:J,templateLock:q}=e,X=(0,g.useSelect)((e=>!!e("core/block-editor").getBlock(r)?.innerBlocks?.length),[r]),Z=(0,g.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),Q=(0,g.useSelect)((e=>j?e("core").getMedia(j,{context:"view"}):null),[j]),ee=Z.filter((({slug:e})=>Q?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),te="image"===E&&F,ie=["h1","h2","h3","none"],{textColumnWidth:ae,mediaColumnWidth:le}=b(V),oe=m()("smb-media-text",a,{"smb-media-text--has-background":!!n||!!_,[`smb-media-text--mobile-${H}`]:!!H}),se=m()("c-row",{"c-row--reverse":"left"===A,"c-row--lg-top":!te&&"top"===$,"c-row--lg-middle":!te&&"center"===$,"c-row--lg-bottom":!te&&"bottom"===$,"c-row--fill":te}),re=m()("c-row__col","c-row__col--1-1",[`c-row__col--${J}-${ae}`]),ne=m()("c-row__col","c-row__col--1-1",[`c-row__col--${J}-${le}`]),me=(0,u.useBlockProps)({className:oe,style:{"--smb-media-text--background-color":n,"--smb-media-text--background-image":_,"--smb-media-text--color":w,"--smb-media-text--image-position-x":te&&Y?.x?100*Y.x+"%":void 0,"--smb-media-text--image-position-y":te&&Y?.y?100*Y.y+"%":void 0,"--smb-media-text--gap":(0,u.__experimentalGetGapCSSValue)(e?.style?.spacing?.blockGap)||void 0},"data-sm-split-point":J}),de=(0,u.useInnerBlocksProps)({className:"smb-media-text__body"},{templateLock:q,renderAppender:X?void 0:u.InnerBlocks.ButtonBlockAppender}),ce=(0,x.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.InspectorControls,{group:"color",children:(0,s.jsx)(u.__experimentalColorGradientSettingsDropdown,{panelId:r,__experimentalIsRenderedInSidebar:!0,...(0,u.__experimentalUseMultipleOriginColorsAndGradients)(),settings:[{colorValue:n,resetAllFilter:()=>({backgroundColor:o.backgroundColor,backgroundGradientColor:o.backgroundGradientColor}),onColorChange:e=>t({backgroundColor:e}),gradientValue:_,onGradientChange:e=>t({backgroundGradientColor:e}),label:(0,l.__)("Background color","snow-monkey-blocks")},{colorValue:w,resetAllFilter:()=>({textColor:o.textColor}),onColorChange:e=>t({textColor:e}),label:(0,l.__)("Text color","snow-monkey-blocks")}]})}),(0,s.jsx)(u.InspectorControls,{children:(0,s.jsxs)(c.__experimentalToolsPanel,{label:(0,l.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ce,children:[(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>V!==o.uK.mediaColumnSize.default,isShownByDefault:!0,label:(0,l.__)("Image column size","snow-monkey-blocks"),onDeselect:()=>t({mediaColumnSize:o.uK.mediaColumnSize.default}),children:(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Image column size","snow-monkey-blocks"),value:V,options:[{value:66,label:(0,l.__)("66%","snow-monkey-blocks")},{value:50,label:(0,l.__)("50%","snow-monkey-blocks")},{value:33,label:(0,l.__)("33%","snow-monkey-blocks")},{value:25,label:(0,l.__)("25%","snow-monkey-blocks")}],onChange:e=>t({mediaColumnSize:e})})}),0<ee.length&&(0,s.jsx)(I,{defaultValue:o.uK.mediaSizeSlug.default,value:W,options:ee,onChange:e=>{const i=Q?.media_details?.sizes?.[e]?.source_url,a=Q?.media_details?.sizes?.[e]?.width,l=Q?.media_details?.sizes?.[e]?.height;t({mediaUrl:i,mediaWidth:a,mediaHeight:l,mediaSizeSlug:e})}}),"image"===E&&(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>F!==o.uK.imageFill.default,isShownByDefault:!0,label:(0,l.__)("Crop image to fill entire column","snow-monkey-blocks"),onDeselect:()=>t({imageFill:o.uK.imageFill.default}),children:(0,s.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Crop image to fill entire column","snow-monkey-blocks"),checked:F,onChange:e=>t({imageFill:e})})}),te&&(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>Y!==o.uK.focalPoint.default,isShownByDefault:!0,label:(0,l.__)("Focal point picker","snow-monkey-blocks"),onDeselect:()=>t({focalPoint:o.uK.focalPoint.default}),children:(0,s.jsx)(c.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Focal point picker","snow-monkey-blocks"),url:C,value:Y,onChange:e=>{t({focalPoint:e})},onDrag:e=>t({focalPoint:e})})}),(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>H!==o.uK.mobileOrder.default,isShownByDefault:!0,label:(0,l.__)("Sort by mobile","snow-monkey-blocks"),onDeselect:()=>t({mobileOrder:o.uK.mobileOrder.default}),children:(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Sort by mobile","snow-monkey-blocks"),value:H,options:[{value:"",label:(0,l.__)("Default","snow-monkey-blocks")},{value:"text",label:(0,l.__)("Text > Image","snow-monkey-blocks")},{value:"image",label:(0,l.__)("Image > Text","snow-monkey-blocks")}],onChange:e=>t({mobileOrder:""===e?void 0:e})})}),(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>J!==o.uK.splitPoint.default,isShownByDefault:!0,label:(0,l.__)("When to divide columns","snow-monkey-blocks"),onDeselect:()=>t({splitPoint:o.uK.splitPoint.default}),children:(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("When to divide columns","snow-monkey-blocks"),value:J,options:[{value:"lg",label:(0,l.__)("PC","snow-monkey-blocks")},{value:"md",label:(0,l.__)("Tablet","snow-monkey-blocks")}],onChange:e=>t({splitPoint:e})})}),(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>y!==o.uK.titleTagName.default,isShownByDefault:!0,label:(0,l.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>t({titleTagName:o.uK.titleTagName.default}),children:(0,s.jsx)(c.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/media-text/title-tag-name",children:(0,s.jsx)("div",{className:"smb-list-icon-selector",children:(0,d.times)(ie.length,(e=>(0,s.jsx)(c.Button,{variant:y===ie[e]?"primary":"secondary",onClick:()=>t({titleTagName:ie[e]}),children:ie[e]},e)))})})})]})}),(0,s.jsxs)(u.BlockControls,{group:"block",children:[!te&&(0,s.jsx)(u.BlockVerticalAlignmentToolbar,{onChange:e=>t({verticalAlignment:e}),value:$}),(0,s.jsxs)(c.ToolbarGroup,{children:[(0,s.jsx)(c.ToolbarButton,{icon:h,title:(0,l.__)("Show media on left","snow-monkey-blocks"),isActive:"left"===A,onClick:()=>t({mediaPosition:"left"})}),(0,s.jsx)(c.ToolbarButton,{icon:p,title:(0,l.__)("Show media on right","snow-monkey-blocks"),isActive:"right"===A,onClick:()=>t({mediaPosition:"right"})}),C&&("image"===E||void 0===E)&&(0,s.jsx)(u.__experimentalImageURLInputUI,{url:M||"",onChangeUrl:e=>{t(e)},linkDestination:G,mediaType:E,mediaUrl:C,mediaLink:Q&&Q.link,linkTarget:K,linkClass:O,rel:L})]})]}),(0,s.jsx)("div",{...me,children:(0,s.jsxs)("div",{className:se,children:[(0,s.jsx)("div",{className:re,children:(0,s.jsxs)("div",{className:"smb-media-text__contents-wrapper",children:[(!u.RichText.isEmpty(k)||i)&&"none"!==y&&(0,s.jsx)(u.RichText,{className:"smb-media-text__title",tagName:y,value:k,onChange:e=>t({title:e}),placeholder:(0,l.__)("Write title…","snow-monkey-blocks")}),(0,s.jsx)("div",{...de})]})}),(0,s.jsxs)("div",{className:ne,children:[(0,s.jsx)("div",{className:m()("smb-media-text__figure",{"smb-media-text__figure--fill":te}),children:(0,s.jsx)(S,{src:C,id:j,alt:N,url:M,width:T,height:U,target:K,onSelect:e=>{const i=e?.sizes?.[W]?W:B,a=e?.sizes?.[i]?.url,l=e?.sizes?.[i]?.width,o=e?.sizes?.[i]?.height;let s=M;G===z&&(s=e.url),G===R&&(s=e.link),t({mediaType:f(e),mediaLink:e.link||void 0,mediaId:e.id,mediaUrl:a||e.url,mediaAlt:e.alt,mediaWidth:l||e.width,mediaHeight:o||e.height,mediaSizeSlug:i,href:s})},onSelectURL:e=>{if(e!==C){let i=M;G===z&&(i=e),G===R&&(i=""),t({mediaUrl:e,mediaId:0,mediaSizeSlug:B,mediaType:f({media_type:v(e)?"video":"image"}),href:i})}},onRemove:()=>{t({mediaUrl:o.uK.mediaUrl.default,mediaAlt:o.uK.mediaAlt.default,mediaWidth:o.uK.mediaWidth.default,mediaHeight:o.uK.mediaHeight.default,mediaId:o.uK.mediaId.default,mediaType:o.uK.mediaType.default,href:o.uK.href.default,linkDestination:o.uK.linkDestination.default})},mediaType:E,allowedTypes:P,linkClass:O,rel:L})}),(!u.RichText.isEmpty(D)||i)&&(0,s.jsx)(u.RichText,{className:"smb-media-text__caption",placeholder:(0,l.__)("Write caption…","snow-monkey-blocks"),value:D,onChange:e=>t({caption:e})})]})]})})]})},save:function({attributes:e,className:t}){const{backgroundColor:i,backgroundGradientColor:a,textColor:l,titleTagName:o,title:r,mediaId:n,mediaUrl:c,mediaAlt:g,mediaWidth:_,mediaHeight:h,caption:p,mediaPosition:x,verticalAlignment:f,mediaColumnSize:w,mobileOrder:v,href:y,linkTarget:k,rel:j,linkClass:C,mediaType:N,imageFill:S,focalPoint:T,splitPoint:I}=e,P="image"===N&&S,z=(0,d.isEmpty)(j)?void 0:j,{textColumnWidth:R,mediaColumnWidth:B}=b(w),U=m()("smb-media-text",t,{"smb-media-text--has-background":!!i||!!a,[`smb-media-text--mobile-${v}`]:!!v}),W=m()("c-row",{"c-row--reverse":"left"===x,"c-row--lg-top":!P&&"top"===f,"c-row--lg-middle":!P&&"center"===f,"c-row--lg-bottom":!P&&"bottom"===f,"c-row--fill":P}),D=m()("c-row__col","c-row__col--1-1",[`c-row__col--${I}-${R}`]),A=m()("c-row__col","c-row__col--1-1",[`c-row__col--${I}-${B}`]),$=(0,s.jsx)("img",{src:c,alt:g,width:!!_&&_,height:!!h&&h,className:`wp-image-${n}`}),V=(0,s.jsx)("video",{controls:!0,src:c,width:!!_&&_,height:!!h&&h});let H;return c&&("image"===N||void 0===N?H=y?(0,s.jsx)("a",{href:y,target:k,className:C,rel:z,children:$}):$:"video"===N&&(H=V)),(0,s.jsx)("div",{...u.useBlockProps.save({className:U,style:{"--smb-media-text--background-color":i,"--smb-media-text--background-image":a,"--smb-media-text--color":l,"--smb-media-text--image-position-x":P&&T?.x?100*T.x+"%":void 0,"--smb-media-text--image-position-y":P&&T?.y?100*T.y+"%":void 0,"--smb-media-text--gap":(0,u.__experimentalGetGapCSSValue)(e?.style?.spacing?.blockGap)||void 0},"data-sm-split-point":I}),children:(0,s.jsxs)("div",{className:W,children:[(0,s.jsx)("div",{className:D,children:(0,s.jsxs)("div",{className:"smb-media-text__contents-wrapper",children:[!u.RichText.isEmpty(r)&&"none"!==o&&(0,s.jsx)(u.RichText.Content,{className:"smb-media-text__title",tagName:o,value:r}),(0,s.jsx)("div",{...u.useInnerBlocksProps.save({className:"smb-media-text__body"})})]})}),(0,s.jsxs)("div",{className:A,children:[(0,s.jsx)("div",{className:m()("smb-media-text__figure",{"smb-media-text__figure--fill":P}),children:H}),!u.RichText.isEmpty(p)&&(0,s.jsx)(u.RichText.Content,{tagName:"div",className:"smb-media-text__caption",value:p})]})]})})},deprecated:U,example:W,styles:[{name:"default",label:(0,l.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"border",label:(0,l.__)("Border","snow-monkey-blocks")}]})},6942:(e,t)=>{var i;!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=s(e,o(i)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var i in e)a.call(e,i)&&e[i]&&(t=s(t,i));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(i=function(){return l}.apply(t,[]))||(e.exports=i)}()}},i={};function a(e){var l=i[e];if(void 0!==l)return l.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,a),o.exports}a.m=t,e=[],a.O=(t,i,l,o)=>{if(!i){var s=1/0;for(d=0;d<e.length;d++){for(var[i,l,o]=e[d],r=!0,n=0;n<i.length;n++)(!1&o||s>=o)&&Object.keys(a.O).every((e=>a.O[e](i[n])))?i.splice(n--,1):(r=!1,o<s&&(s=o));if(r){e.splice(d--,1);var m=l();void 0!==m&&(t=m)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[i,l,o]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={378:0,9198:0};a.O.j=t=>0===e[t];var t=(t,i)=>{var l,o,[s,r,n]=i,m=0;if(s.some((t=>0!==e[t]))){for(l in r)a.o(r,l)&&(a.m[l]=r[l]);if(n)var d=n(a)}for(t&&t(i);m<s.length;m++)o=s[m],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(d)},i=globalThis.webpackChunk=globalThis.webpackChunk||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var l=a.O(void 0,[9198],(()=>a(5926)));l=a.O(l)})();1 (()=>{var e,t={5926:(e,t,i)=>{"use strict";const a=window.wp.blocks,l=window.wp.i18n,o=JSON.parse('{"UU":"snow-monkey-blocks/media-text","uK":{"backgroundColor":{"type":"string"},"backgroundGradientColor":{"type":"string"},"textColor":{"type":"string"},"titleTagName":{"type":"string","default":"h2"},"title":{"type":"string","source":"html","selector":".smb-media-text__title","default":""},"mediaId":{"type":"number","default":0},"mediaUrl":{"type":"string","source":"attribute","selector":".smb-media-text__figure img, .smb-media-text__figure video","attribute":"src","default":""},"mediaAlt":{"type":"string","source":"attribute","selector":".smb-media-text__figure img","attribute":"alt","default":""},"mediaWidth":{"type":"string","source":"attribute","selector":".smb-media-text__figure img, .smb-media-text__figure video","attribute":"width","default":""},"mediaHeight":{"type":"string","source":"attribute","selector":".smb-media-text__figure img, .smb-media-text__figure video","attribute":"height","default":""},"mediaSizeSlug":{"type":"string","default":"full"},"mediaType":{"type":"string"},"caption":{"type":"string","source":"html","selector":".smb-media-text__caption","default":""},"mediaPosition":{"type":"string","default":"right"},"verticalAlignment":{"type":"string","default":"center"},"mediaColumnSize":{"type":"string","default":66},"mobileOrder":{"type":"string"},"href":{"type":"string","default":""},"rel":{"type":"string","source":"attribute","selector":".smb-media-text__figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":".smb-media-text__figure > a","attribute":"class"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":".smb-media-text__figure > a","attribute":"target","default":"_self"},"imageFill":{"type":"boolean","default":false},"focalPoint":{"type":"object"},"splitPoint":{"type":"string","default":"lg"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"anchor":true,"spacing":{"margin":true,"blockGap":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}}}}'),s=window.ReactJSXRuntime,r=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{d:"M0,7.11v9.78a.61.61,0,0,0,.61.61h9.78a.61.61,0,0,0,.61-.61V7.11a.61.61,0,0,0-.61-.61H.61A.61.61,0,0,0,0,7.11m9.78,9.47H1.22a.29.29,0,0,1-.3-.3V7.72a.29.29,0,0,1,.3-.3H9.78a.29.29,0,0,1,.3.3v8.56a.29.29,0,0,1-.3.3"}),(0,s.jsx)("path",{d:"M.92,13.7,3.33,12a.15.15,0,0,1,.17,0l1.84,1.18a.15.15,0,0,0,.19,0l2.31-2.22a.15.15,0,0,1,.21,0l2.43,2.37v.91L8.05,11.8a.14.14,0,0,0-.21,0L5.53,14a.17.17,0,0,1-.19,0L3.5,12.87a.15.15,0,0,0-.18,0L.92,14.62Z"}),(0,s.jsx)("rect",{y:"6.5",width:"11",height:"11",fill:"none"}),(0,s.jsx)("rect",{x:"13.5",y:"8.5",width:"10.5",height:"1"}),(0,s.jsx)("rect",{x:"13.5",y:"11.5",width:"10.5",height:"1"}),(0,s.jsx)("rect",{x:"13.5",y:"14.5",width:"10.5",height:"1"})]});var n=i(6942),m=i.n(n);const d=window.lodash,c=window.wp.components,u=window.wp.blockEditor,g=window.wp.data,_=window.wp.primitives;var h=(0,s.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(_.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),p=(0,s.jsx)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(_.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})});const x=window.wp.compose,b=(e,t=null)=>{let i="1-3",a="2-3";return 75===parseInt(e)?(i="1-4",a="3-4"):66===parseInt(e)?(i="1-3",a="2-3"):50===parseInt(e)?(i="1-2",a="1-2"):33===parseInt(e)?(i="2-3",a="1-3"):25===parseInt(e)&&(i="3-4",a="1-4"),t&&100-parseInt(e)>=parseInt(t)&&(75===parseInt(t)?i="3-4":66===parseInt(t)?i="2-3":50===parseInt(t)?i="1-2":33===parseInt(t)?i="1-3":25===parseInt(t)&&(i="1-4")),{textColumnWidth:i,mediaColumnWidth:a,imageColumnWidth:a}},f=e=>e.media_type?"image"===e.media_type?"image":"video":e.type,w=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function v(e=""){return!!e&&w.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e))}const y=window.wp.element,k=({id:e,src:t,allowedTypes:i,accept:a,onSelect:o,onSelectURL:r,onRemove:n})=>(0,s.jsxs)(u.BlockControls,{group:"inline",children:[(0,s.jsx)(u.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:i,accept:a,onSelect:o,onSelectURL:r}),!!t&&!!n&&(0,s.jsx)(c.ToolbarButton,{onClick:n,children:(0,l.__)("Release","snow-monkey-blocks")})]}),j=({src:e,alt:t,id:i,style:a,width:l,height:o})=>(0,s.jsx)("img",{src:e,alt:t,className:`wp-image-${i}`,style:a,width:l,height:o}),C=({src:e,style:t,width:i,height:a})=>(0,s.jsx)("video",{src:e,style:t,width:i,height:a}),N=(0,y.memo)((({id:e,src:t,alt:i,url:a,width:l,height:o,target:r,allowedTypes:n,accept:m,onSelect:c,onSelectURL:u,onRemove:g,mediaType:_,style:h,rel:p,linkClass:x})=>{let b;if("image"===_){let n;b=(0,s.jsx)(j,{src:t,alt:i,id:e,style:h,width:l,height:o}),n=p?(0,d.isEmpty)(p)?void 0:p:"_self"!==r&&r?"noopener noreferrer":void 0,a&&(b=(0,s.jsx)("span",{href:a,target:"_self"===r?void 0:r,rel:n,className:x,children:b}))}else"video"===_&&(b=(0,s.jsx)(C,{src:t,style:h,width:l,height:o}));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{id:e,src:t,allowedTypes:n,accept:m,onSelect:c,onSelectURL:u,onRemove:g}),b]})}),((e,t)=>{const i=Object.keys(e);for(const a of i)if(e[a]!==t[a])return!1;return!0}));function S(e){const{src:t,onSelect:i,onSelectURL:a,mediaType:o,allowedTypes:r=["image"]}=e,n=!o&&t?"image":o;let m=(0,l.__)("Media","snow-monkey-blocks");1===r.length&&("image"===r[0]?m=(0,l.__)("Image","snow-monkey-blocks"):"video"===r[0]&&(m=(0,l.__)("Video","snow-monkey-blocks")));const d=(0,y.useMemo)((()=>r.map((e=>`${e}/*`)).join(",")),[r]);return t?(0,s.jsx)(N,{...e,accept:d,allowedTypes:r,mediaType:n}):(0,s.jsx)(u.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:i,onSelectURL:a,accept:d,allowedTypes:r})}const T=[{label:(0,l._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,l._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,l._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,l._x)("Full Size","Image size option for resolution control"),value:"full"}];function I({panelId:e,value:t,onChange:i,options:a=T,defaultValue:o=T[0].value,isShownByDefault:r=!0,withToolsPanelItem:n=!0}){const m=null!=t?t:o,d=()=>(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Resolution"),value:m,options:a,onChange:i,help:(0,l.__)("Select the size of the source image."),size:"__unstable-large"});return n?(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>m!==o,label:(0,l.__)("Resolution"),onDeselect:()=>i(o),isShownByDefault:r,panelId:e,children:(0,s.jsx)(d,{})}):(0,s.jsx)(d,{})}const P=["image","video"],z="media",R="attachment",B="full",U=[{attributes:{...o.uK},supports:{...o.xY},save({attributes:e,className:t}){const{backgroundColor:i,backgroundGradientColor:a,textColor:l,titleTagName:o,title:r,mediaId:n,mediaUrl:c,mediaAlt:g,mediaWidth:_,mediaHeight:h,caption:p,mediaPosition:x,verticalAlignment:f,mediaColumnSize:w,mobileOrder:v,href:y,linkTarget:k,rel:j,linkClass:C,mediaType:N,imageFill:S,focalPoint:T,splitPoint:I}=e,P="image"===N&&S,z=(0,d.isEmpty)(j)?void 0:j,{textColumnWidth:R,mediaColumnWidth:B}=b(w),U=m()("smb-media-text",t,{"smb-media-text--has-background":!!i||!!a,[`smb-media-text--mobile-${v}`]:!!v}),W=m()("c-row",{"c-row--reverse":"left"===x,"c-row--top":!P&&"top"===f,"c-row--middle":!P&&"center"===f,"c-row--bottom":!P&&"bottom"===f,"c-row--fill":P}),D=m()("c-row__col","c-row__col--1-1",[`c-row__col--${I}-${R}`]),A=m()("c-row__col","c-row__col--1-1",[`c-row__col--${I}-${B}`]),$=(0,s.jsx)("img",{src:c,alt:g,width:!!_&&_,height:!!h&&h,className:`wp-image-${n}`}),V=(0,s.jsx)("video",{controls:!0,src:c,width:!!_&&_,height:!!h&&h});let H;return c&&("image"===N||void 0===N?H=y?(0,s.jsx)("a",{href:y,target:k,className:C,rel:z,children:$}):$:"video"===N&&(H=V)),(0,s.jsx)("div",{...u.useBlockProps.save({className:U,style:{"--smb-media-text--background-color":i,"--smb-media-text--background-image":a,"--smb-media-text--color":l,"--smb-media-text--image-position-x":P&&T?.x?100*T.x+"%":void 0,"--smb-media-text--image-position-y":P&&T?.y?100*T.y+"%":void 0,"--smb-media-text--gap":(0,u.__experimentalGetGapCSSValue)(e?.style?.spacing?.blockGap)||void 0},"data-sm-split-point":I}),children:(0,s.jsxs)("div",{className:W,children:[(0,s.jsx)("div",{className:D,children:(0,s.jsxs)("div",{className:"smb-media-text__contents-wrapper",children:[!u.RichText.isEmpty(r)&&"none"!==o&&(0,s.jsx)(u.RichText.Content,{className:"smb-media-text__title",tagName:o,value:r}),(0,s.jsx)("div",{...u.useInnerBlocksProps.save({className:"smb-media-text__body"})})]})}),(0,s.jsxs)("div",{className:A,children:[(0,s.jsx)("div",{className:m()("smb-media-text__figure",{"smb-media-text__figure--fill":P}),children:H}),!u.RichText.isEmpty(p)&&(0,s.jsx)(u.RichText.Content,{tagName:"div",className:"smb-media-text__caption",value:p})]})]})})}},{attributes:{...o.uK},supports:{...o.xY},save({attributes:e,className:t}){const{titleTagName:i,title:a,mediaId:l,mediaUrl:o,mediaAlt:r,mediaWidth:n,mediaHeight:c,mediaType:g,caption:_,mediaPosition:h,verticalAlignment:p,mediaColumnSize:x,mobileOrder:f,href:w,rel:v,linkClass:y,linkTarget:k}=e,j=(0,d.isEmpty)(v)?void 0:v,{textColumnWidth:C,mediaColumnWidth:N}=b(x),S=m()("smb-media-text",t,{[`smb-media-text--mobile-${f}`]:!!f}),T=m()("c-row","c-row--margin",{"c-row--reverse":"left"===h,"c-row--top":"top"===p,"c-row--middle":"center"===p,"c-row--bottom":"bottom"===p}),I=m()("c-row__col","c-row__col--1-1",[`c-row__col--lg-${C}`]),P=m()("c-row__col","c-row__col--1-1",[`c-row__col--lg-${N}`]),z=(0,s.jsx)("img",{src:o,alt:r,width:!!n&&n,height:!!c&&c,className:`wp-image-${l}`}),R=(0,s.jsx)("video",{controls:!0,src:o,width:!!n&&n,height:!!c&&c});let B;return o&&("image"===g||void 0===g?B=w?(0,s.jsx)("a",{href:w,target:k,className:y,rel:j,children:z}):z:"video"===g&&(B=R)),(0,s.jsx)("div",{...u.useBlockProps.save({className:S}),children:(0,s.jsxs)("div",{className:T,children:[(0,s.jsxs)("div",{className:I,children:[!u.RichText.isEmpty(a)&&"none"!==i&&(0,s.jsx)(u.RichText.Content,{className:"smb-media-text__title",tagName:i,value:a}),(0,s.jsx)("div",{...u.useInnerBlocksProps.save({className:"smb-media-text__body"})})]}),(0,s.jsxs)("div",{className:P,children:[(0,s.jsx)("div",{className:"smb-media-text__figure",children:B}),!u.RichText.isEmpty(_)&&(0,s.jsx)(u.RichText.Content,{tagName:"div",className:"smb-media-text__caption",value:_})]})]})})}},{attributes:{...o.uK,url:{type:"string",default:""},imageMediaType:{type:"string"},imageSizeSlug:{type:"string",default:"full"},imagePosition:{type:"string",default:"right"},imageID:{type:"number",default:0},imageURL:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"src",default:""},imageAlt:{type:"string",source:"attribute",selector:".smb-media-text__figure img",attribute:"alt",default:""},imageWidth:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"width",default:""},imageHeight:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"height",default:""},imageColumnSize:{type:"string",default:66},target:{type:"string",default:"_self"}},migrate:e=>({...e,href:e.url,mediaType:e.imageMediaType,mediaSizeSlug:e.imageSizeSlug,mediaPosition:e.imagePosition,mediaId:e.imageID,mediaUrl:e.imageURL,mediaAlt:e.imageAlt,mediaWidth:e.imageWidth,mediaHeight:e.imageHeight,mediaColumnSize:e.imageColumnSize,linkTarget:e.target}),save({attributes:e,className:t}){const{titleTagName:i,title:a,imageID:l,imageURL:o,imageAlt:r,imageWidth:n,imageHeight:d,imageMediaType:c,caption:g,imagePosition:_,verticalAlignment:h,imageColumnSize:p,mobileOrder:x,url:f,target:w}=e,{textColumnWidth:v,imageColumnWidth:y}=b(p),k=m()("smb-media-text",t,{[`smb-media-text--mobile-${x}`]:!!x}),j=m()("c-row","c-row--margin",{"c-row--reverse":"left"===_,"c-row--top":"top"===h,"c-row--middle":"center"===h,"c-row--bottom":"bottom"===h}),C=m()("c-row__col","c-row__col--1-1",[`c-row__col--lg-${v}`]),N=m()("c-row__col","c-row__col--1-1",[`c-row__col--lg-${y}`]),S=(0,s.jsx)("img",{src:o,alt:r,width:!!n&&n,height:!!d&&d,className:`wp-image-${l}`}),T=(0,s.jsx)("video",{controls:!0,src:o,width:!!n&&n,height:!!d&&d});let I;return o&&("image"===c||void 0===c?I=f?(0,s.jsx)("a",{href:f,target:"_self"===w?void 0:w,rel:"_self"===w?void 0:"noopener noreferrer",children:S}):S:"video"===c&&(I=T)),(0,s.jsx)("div",{...u.useBlockProps.save({className:k}),children:(0,s.jsxs)("div",{className:j,children:[(0,s.jsxs)("div",{className:C,children:[!u.RichText.isEmpty(a)&&"none"!==i&&(0,s.jsx)(u.RichText.Content,{className:"smb-media-text__title",tagName:i,value:a}),(0,s.jsx)("div",{className:"smb-media-text__body",children:(0,s.jsx)(u.InnerBlocks.Content,{})})]}),(0,s.jsxs)("div",{className:N,children:[(0,s.jsx)("div",{className:"smb-media-text__figure",children:I}),!u.RichText.isEmpty(g)&&(0,s.jsx)("div",{className:"smb-media-text__caption",children:(0,s.jsx)(u.RichText.Content,{value:g})})]})]})})}},{attributes:{...o.uK,url:{type:"string",default:""},imageMediaType:{type:"string"},imageSizeSlug:{type:"string",default:"full"},imagePosition:{type:"string",default:"right"},imageID:{type:"number",default:0},imageURL:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"src",default:""},imageAlt:{type:"string",source:"attribute",selector:".smb-media-text__figure img",attribute:"alt",default:""},imageWidth:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"width",default:""},imageHeight:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"height",default:""},imageColumnSize:{type:"string",default:66},target:{type:"string",default:"_self"}},save({attributes:e}){const{title:t,imageID:i,imageURL:a,imagePosition:l,imageColumnSize:o}=e,{textColumnWidth:r,imageColumnWidth:n}=b(o);return(0,s.jsx)("div",{className:"smb-media-text",children:(0,s.jsxs)("div",{className:m()("c-row","c-row--margin","c-row--middle",{"c-row--reverse":"left"===l}),children:[(0,s.jsxs)("div",{className:`c-row__col c-row__col--1-1 c-row__col--lg-${r}`,children:[!u.RichText.isEmpty(t)&&(0,s.jsx)("h2",{className:"smb-media-text__title",children:(0,s.jsx)(u.RichText.Content,{value:t})}),(0,s.jsx)("div",{className:"smb-media-text__body",children:(0,s.jsx)(u.InnerBlocks.Content,{})})]}),(0,s.jsx)("div",{className:`c-row__col c-row__col--1-1 c-row__col--lg-${n}`,children:(0,s.jsx)("div",{className:"smb-media-text__figure",children:a&&(0,s.jsx)("img",{src:a,alt:"",className:`wp-image-${i}`})})})]})})}},{attributes:{...o.uK,url:{type:"string",default:""},imageMediaType:{type:"string"},imageSizeSlug:{type:"string",default:"full"},imagePosition:{type:"string",default:"right"},imageID:{type:"number",default:0},imageURL:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"src",default:""},imageAlt:{type:"string",source:"attribute",selector:".smb-media-text__figure img",attribute:"alt",default:""},imageWidth:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"width",default:""},imageHeight:{type:"string",source:"attribute",selector:".smb-media-text__figure img, .smb-media-text__figure video",attribute:"height",default:""},imageColumnSize:{type:"string",default:66},target:{type:"string",default:"_self"}},save({attributes:e}){const{title:t,imageURL:i,imagePosition:a,imageColumnSize:l}=e,{textColumnWidth:o,imageColumnWidth:r}=b(l);return(0,s.jsx)("div",{className:"smb-media-text",children:(0,s.jsxs)("div",{className:m()("c-row","c-row--margin","c-row--middle",{"c-row--reverse":"left"===a}),children:[(0,s.jsxs)("div",{className:`c-row__col c-row__col--1-1 c-row__col--lg-${o}`,children:[!u.RichText.isEmpty(t)&&(0,s.jsx)("h2",{className:"smb-media-text__title",children:(0,s.jsx)(u.RichText.Content,{value:t})}),(0,s.jsx)("div",{className:"smb-media-text__body",children:(0,s.jsx)(u.InnerBlocks.Content,{})})]}),(0,s.jsx)("div",{className:`c-row__col c-row__col--1-1 c-row__col--lg-${r}`,children:(0,s.jsx)("div",{className:"smb-media-text__figure",children:i&&(0,s.jsx)("img",{src:i,alt:""})})})]})})}}],W={attributes:{mediaId:1,mediaUrl:`${smb.pluginUrl}/dist/img/photos/man-guy-photographer1579.jpg`},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"}}]};(0,a.registerBlockType)(o.UU,{icon:{foreground:"#cd162c",src:r},keywords:[(0,l.__)("Image","snow-monkey-blocks"),(0,l.__)("Video","snow-monkey-blocks"),(0,l.__)("Media & sentence","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:t,isSelected:i,className:a,clientId:r}){const{backgroundColor:n,backgroundGradientColor:_,textColor:w,titleTagName:y,title:k,mediaId:j,mediaUrl:C,mediaAlt:N,mediaWidth:T,mediaHeight:U,mediaSizeSlug:W,caption:D,mediaPosition:A,verticalAlignment:$,mediaColumnSize:V,mobileOrder:H,href:K,linkTarget:L,rel:M,linkClass:O,linkDestination:G,mediaType:E,imageFill:F,focalPoint:Y,splitPoint:J,templateLock:q}=e,X=(0,g.useSelect)((e=>!!e("core/block-editor").getBlock(r)?.innerBlocks?.length),[r]),Z=(0,g.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),Q=(0,g.useSelect)((e=>j?e("core").getEntityRecord("postType","attachment",j):null),[j]),ee=Z.filter((({slug:e})=>Q?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),te="image"===E&&F,ie=["h1","h2","h3","none"],{textColumnWidth:ae,mediaColumnWidth:le}=b(V),oe=m()("smb-media-text",a,{"smb-media-text--has-background":!!n||!!_,[`smb-media-text--mobile-${H}`]:!!H}),se=m()("c-row",{"c-row--reverse":"left"===A,"c-row--lg-top":!te&&"top"===$,"c-row--lg-middle":!te&&"center"===$,"c-row--lg-bottom":!te&&"bottom"===$,"c-row--fill":te}),re=m()("c-row__col","c-row__col--1-1",[`c-row__col--${J}-${ae}`]),ne=m()("c-row__col","c-row__col--1-1",[`c-row__col--${J}-${le}`]),me=(0,u.useBlockProps)({className:oe,style:{"--smb-media-text--background-color":n,"--smb-media-text--background-image":_,"--smb-media-text--color":w,"--smb-media-text--image-position-x":te&&Y?.x?100*Y.x+"%":void 0,"--smb-media-text--image-position-y":te&&Y?.y?100*Y.y+"%":void 0,"--smb-media-text--gap":(0,u.__experimentalGetGapCSSValue)(e?.style?.spacing?.blockGap)||void 0},"data-sm-split-point":J}),de=(0,u.useInnerBlocksProps)({className:"smb-media-text__body"},{templateLock:q,renderAppender:X?void 0:u.InnerBlocks.ButtonBlockAppender}),ce=(0,x.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.InspectorControls,{group:"color",children:(0,s.jsx)(u.__experimentalColorGradientSettingsDropdown,{panelId:r,__experimentalIsRenderedInSidebar:!0,...(0,u.__experimentalUseMultipleOriginColorsAndGradients)(),settings:[{colorValue:n,resetAllFilter:()=>({backgroundColor:o.backgroundColor,backgroundGradientColor:o.backgroundGradientColor}),onColorChange:e=>t({backgroundColor:e}),gradientValue:_,onGradientChange:e=>t({backgroundGradientColor:e}),label:(0,l.__)("Background color","snow-monkey-blocks")},{colorValue:w,resetAllFilter:()=>({textColor:o.textColor}),onColorChange:e=>t({textColor:e}),label:(0,l.__)("Text color","snow-monkey-blocks")}]})}),(0,s.jsx)(u.InspectorControls,{children:(0,s.jsxs)(c.__experimentalToolsPanel,{label:(0,l.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ce,children:[(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>V!==o.uK.mediaColumnSize.default,isShownByDefault:!0,label:(0,l.__)("Image column size","snow-monkey-blocks"),onDeselect:()=>t({mediaColumnSize:o.uK.mediaColumnSize.default}),children:(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Image column size","snow-monkey-blocks"),value:V,options:[{value:66,label:(0,l.__)("66%","snow-monkey-blocks")},{value:50,label:(0,l.__)("50%","snow-monkey-blocks")},{value:33,label:(0,l.__)("33%","snow-monkey-blocks")},{value:25,label:(0,l.__)("25%","snow-monkey-blocks")}],onChange:e=>t({mediaColumnSize:e})})}),0<ee.length&&(0,s.jsx)(I,{defaultValue:o.uK.mediaSizeSlug.default,value:W,options:ee,onChange:e=>{const i=Q?.media_details?.sizes?.[e]?.source_url,a=Q?.media_details?.sizes?.[e]?.width,l=Q?.media_details?.sizes?.[e]?.height;t({mediaUrl:i,mediaWidth:a,mediaHeight:l,mediaSizeSlug:e})}}),"image"===E&&(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>F!==o.uK.imageFill.default,isShownByDefault:!0,label:(0,l.__)("Crop image to fill entire column","snow-monkey-blocks"),onDeselect:()=>t({imageFill:o.uK.imageFill.default}),children:(0,s.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Crop image to fill entire column","snow-monkey-blocks"),checked:F,onChange:e=>t({imageFill:e})})}),te&&(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>Y!==o.uK.focalPoint.default,isShownByDefault:!0,label:(0,l.__)("Focal point picker","snow-monkey-blocks"),onDeselect:()=>t({focalPoint:o.uK.focalPoint.default}),children:(0,s.jsx)(c.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Focal point picker","snow-monkey-blocks"),url:C,value:Y,onChange:e=>{t({focalPoint:e})},onDrag:e=>t({focalPoint:e})})}),(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>H!==o.uK.mobileOrder.default,isShownByDefault:!0,label:(0,l.__)("Sort by mobile","snow-monkey-blocks"),onDeselect:()=>t({mobileOrder:o.uK.mobileOrder.default}),children:(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Sort by mobile","snow-monkey-blocks"),value:H,options:[{value:"",label:(0,l.__)("Default","snow-monkey-blocks")},{value:"text",label:(0,l.__)("Text > Image","snow-monkey-blocks")},{value:"image",label:(0,l.__)("Image > Text","snow-monkey-blocks")}],onChange:e=>t({mobileOrder:""===e?void 0:e})})}),(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>J!==o.uK.splitPoint.default,isShownByDefault:!0,label:(0,l.__)("When to divide columns","snow-monkey-blocks"),onDeselect:()=>t({splitPoint:o.uK.splitPoint.default}),children:(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("When to divide columns","snow-monkey-blocks"),value:J,options:[{value:"lg",label:(0,l.__)("PC","snow-monkey-blocks")},{value:"md",label:(0,l.__)("Tablet","snow-monkey-blocks")}],onChange:e=>t({splitPoint:e})})}),(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>y!==o.uK.titleTagName.default,isShownByDefault:!0,label:(0,l.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>t({titleTagName:o.uK.titleTagName.default}),children:(0,s.jsx)(c.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/media-text/title-tag-name",children:(0,s.jsx)("div",{className:"smb-list-icon-selector",children:(0,d.times)(ie.length,(e=>(0,s.jsx)(c.Button,{variant:y===ie[e]?"primary":"secondary",onClick:()=>t({titleTagName:ie[e]}),children:ie[e]},e)))})})})]})}),(0,s.jsxs)(u.BlockControls,{group:"block",children:[!te&&(0,s.jsx)(u.BlockVerticalAlignmentToolbar,{onChange:e=>t({verticalAlignment:e}),value:$}),(0,s.jsxs)(c.ToolbarGroup,{children:[(0,s.jsx)(c.ToolbarButton,{icon:h,title:(0,l.__)("Show media on left","snow-monkey-blocks"),isActive:"left"===A,onClick:()=>t({mediaPosition:"left"})}),(0,s.jsx)(c.ToolbarButton,{icon:p,title:(0,l.__)("Show media on right","snow-monkey-blocks"),isActive:"right"===A,onClick:()=>t({mediaPosition:"right"})}),C&&("image"===E||void 0===E)&&(0,s.jsx)(u.__experimentalImageURLInputUI,{url:K||"",onChangeUrl:e=>{t(e)},linkDestination:G,mediaType:E,mediaUrl:C,mediaLink:Q&&Q.link,linkTarget:L,linkClass:O,rel:M})]})]}),(0,s.jsx)("div",{...me,children:(0,s.jsxs)("div",{className:se,children:[(0,s.jsx)("div",{className:re,children:(0,s.jsxs)("div",{className:"smb-media-text__contents-wrapper",children:[(!u.RichText.isEmpty(k)||i)&&"none"!==y&&(0,s.jsx)(u.RichText,{className:"smb-media-text__title",tagName:y,value:k,onChange:e=>t({title:e}),placeholder:(0,l.__)("Write title…","snow-monkey-blocks")}),(0,s.jsx)("div",{...de})]})}),(0,s.jsxs)("div",{className:ne,children:[(0,s.jsx)("div",{className:m()("smb-media-text__figure",{"smb-media-text__figure--fill":te}),children:(0,s.jsx)(S,{src:C,id:j,alt:N,url:K,width:T,height:U,target:L,onSelect:e=>{const i=e?.sizes?.[W]?W:B,a=e?.sizes?.[i]?.url,l=e?.sizes?.[i]?.width,o=e?.sizes?.[i]?.height;let s=K;G===z&&(s=e.url),G===R&&(s=e.link),t({mediaType:f(e),mediaLink:e.link||void 0,mediaId:e.id,mediaUrl:a||e.url,mediaAlt:e.alt,mediaWidth:l||e.width,mediaHeight:o||e.height,mediaSizeSlug:i,href:s})},onSelectURL:e=>{if(e!==C){let i=K;G===z&&(i=e),G===R&&(i=""),t({mediaUrl:e,mediaId:0,mediaSizeSlug:B,mediaType:f({media_type:v(e)?"video":"image"}),href:i})}},onRemove:()=>{t({mediaUrl:o.uK.mediaUrl.default,mediaAlt:o.uK.mediaAlt.default,mediaWidth:o.uK.mediaWidth.default,mediaHeight:o.uK.mediaHeight.default,mediaId:o.uK.mediaId.default,mediaType:o.uK.mediaType.default,href:o.uK.href.default,linkDestination:o.uK.linkDestination.default})},mediaType:E,allowedTypes:P,linkClass:O,rel:M})}),(!u.RichText.isEmpty(D)||i)&&(0,s.jsx)(u.RichText,{className:"smb-media-text__caption",placeholder:(0,l.__)("Write caption…","snow-monkey-blocks"),value:D,onChange:e=>t({caption:e})})]})]})})]})},save:function({attributes:e,className:t}){const{backgroundColor:i,backgroundGradientColor:a,textColor:l,titleTagName:o,title:r,mediaId:n,mediaUrl:c,mediaAlt:g,mediaWidth:_,mediaHeight:h,caption:p,mediaPosition:x,verticalAlignment:f,mediaColumnSize:w,mobileOrder:v,href:y,linkTarget:k,rel:j,linkClass:C,mediaType:N,imageFill:S,focalPoint:T,splitPoint:I}=e,P="image"===N&&S,z=(0,d.isEmpty)(j)?void 0:j,{textColumnWidth:R,mediaColumnWidth:B}=b(w),U=m()("smb-media-text",t,{"smb-media-text--has-background":!!i||!!a,[`smb-media-text--mobile-${v}`]:!!v}),W=m()("c-row",{"c-row--reverse":"left"===x,"c-row--lg-top":!P&&"top"===f,"c-row--lg-middle":!P&&"center"===f,"c-row--lg-bottom":!P&&"bottom"===f,"c-row--fill":P}),D=m()("c-row__col","c-row__col--1-1",[`c-row__col--${I}-${R}`]),A=m()("c-row__col","c-row__col--1-1",[`c-row__col--${I}-${B}`]),$=(0,s.jsx)("img",{src:c,alt:g,width:!!_&&_,height:!!h&&h,className:`wp-image-${n}`}),V=(0,s.jsx)("video",{controls:!0,src:c,width:!!_&&_,height:!!h&&h});let H;return c&&("image"===N||void 0===N?H=y?(0,s.jsx)("a",{href:y,target:k,className:C,rel:z,children:$}):$:"video"===N&&(H=V)),(0,s.jsx)("div",{...u.useBlockProps.save({className:U,style:{"--smb-media-text--background-color":i,"--smb-media-text--background-image":a,"--smb-media-text--color":l,"--smb-media-text--image-position-x":P&&T?.x?100*T.x+"%":void 0,"--smb-media-text--image-position-y":P&&T?.y?100*T.y+"%":void 0,"--smb-media-text--gap":(0,u.__experimentalGetGapCSSValue)(e?.style?.spacing?.blockGap)||void 0},"data-sm-split-point":I}),children:(0,s.jsxs)("div",{className:W,children:[(0,s.jsx)("div",{className:D,children:(0,s.jsxs)("div",{className:"smb-media-text__contents-wrapper",children:[!u.RichText.isEmpty(r)&&"none"!==o&&(0,s.jsx)(u.RichText.Content,{className:"smb-media-text__title",tagName:o,value:r}),(0,s.jsx)("div",{...u.useInnerBlocksProps.save({className:"smb-media-text__body"})})]})}),(0,s.jsxs)("div",{className:A,children:[(0,s.jsx)("div",{className:m()("smb-media-text__figure",{"smb-media-text__figure--fill":P}),children:H}),!u.RichText.isEmpty(p)&&(0,s.jsx)(u.RichText.Content,{tagName:"div",className:"smb-media-text__caption",value:p})]})]})})},deprecated:U,example:W,styles:[{name:"default",label:(0,l.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"border",label:(0,l.__)("Border","snow-monkey-blocks")}]})},6942:(e,t)=>{var i;!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=s(e,o(i)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var i in e)a.call(e,i)&&e[i]&&(t=s(t,i));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(i=function(){return l}.apply(t,[]))||(e.exports=i)}()}},i={};function a(e){var l=i[e];if(void 0!==l)return l.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,a),o.exports}a.m=t,e=[],a.O=(t,i,l,o)=>{if(!i){var s=1/0;for(d=0;d<e.length;d++){for(var[i,l,o]=e[d],r=!0,n=0;n<i.length;n++)(!1&o||s>=o)&&Object.keys(a.O).every((e=>a.O[e](i[n])))?i.splice(n--,1):(r=!1,o<s&&(s=o));if(r){e.splice(d--,1);var m=l();void 0!==m&&(t=m)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[i,l,o]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={378:0,9198:0};a.O.j=t=>0===e[t];var t=(t,i)=>{var l,o,[s,r,n]=i,m=0;if(s.some((t=>0!==e[t]))){for(l in r)a.o(r,l)&&(a.m[l]=r[l]);if(n)var d=n(a)}for(t&&t(i);m<s.length;m++)o=s[m],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(d)},i=globalThis.webpackChunk=globalThis.webpackChunk||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var l=a.O(void 0,[9198],(()=>a(5926)));l=a.O(l)})(); -
snow-monkey-blocks/trunk/dist/blocks/panels/item/horizontal/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => ' 842c21c83422b8ae29ec');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => 'b7712d53adf58cf8fdd9'); -
snow-monkey-blocks/trunk/dist/blocks/panels/item/horizontal/index.js
r3390754 r3400189 1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var l={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=n(e,a(s)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var s in e)l.call(e,s)&&e[s]&&(t=n(t,s));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(s=function(){return i}.apply(t,[]))||(e.exports=s)}()}},t={};function s(l){var i=t[l];if(void 0!==i)return i.exports;var a=t[l]={exports:{}};return e[l](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var l in t)s.o(t,l)&&!s.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/panels-item-horizontal","uK":{"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-panels__item__title","default":""},"summary":{"type":"string","source":"html","selector":".smb-panels__item__content","default":""},"displayLink":{"type":"boolean","default":false},"linkLabel":{"type":"string","source":"text","selector":".smb-panels__item__link","role":"content"},"linkURL":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"rel"},"linkTarget":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"target"},"displayImage":{"type":"boolean","default":false},"imagePosition":{"type":"string","default":"right"},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"}},"xY":{"html":false,"color":{"background":true,"gradients":true,"text":true,"link":true}}}'),l=window.ReactJSXRuntime,i=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3,3v8h8V3Zm7,7H4V4h6Z"}),(0,l.jsx)("path",{d:"M13,3v8h8V3Zm7,7H14V4h6Z"}),(0,l.jsx)("path",{d:"M3,13v8h8V13Zm7,7H4V14h6Z"}),(0,l.jsx)("path",{d:"M13,13v8h8V13Zm7,7H14V14h6Z"})]});var a=s(6942),n=s.n(a);const o=window.lodash,r=window.wp.blockEditor,m=window.wp.components,c=window.wp.compose,_=window.wp.data,d=window.wp.element,g=window.wp.primitives;var p=(0,l.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(g.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),h=(0,l.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(g.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})}),u=(0,l.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(g.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),b=(0,l.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(g.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const x=window.wp.keycodes,k=window.wp.url,v=window.wp.i18n,y=({id:e,src:t,allowedTypes:s,accept:i,onSelect:a,onSelectURL:n,onRemove:o})=>(0,l.jsxs)(r.BlockControls,{group:"inline",children:[(0,l.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:i,onSelect:a,onSelectURL:n}),!!t&&!!o&&(0,l.jsx)(m.ToolbarButton,{onClick:o,children:(0,v.__)("Release","snow-monkey-blocks")})]}),j=({src:e,alt:t,id:s,style:i,width:a,height:n})=>(0,l.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:i,width:a,height:n}),f=({src:e,style:t,width:s,height:i})=>(0,l.jsx)("video",{src:e,style:t,width:s,height:i}),w=(0,d.memo)((({id:e,src:t,alt:s,url:i,width:a,height:n,target:r,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:g,mediaType:p,style:h,rel:u,linkClass:b})=>{let x;if("image"===p){let m;x=(0,l.jsx)(j,{src:t,alt:s,id:e,style:h,width:a,height:n}),m=u?(0,o.isEmpty)(u)?void 0:u:"_self"!==r&&r?"noopener noreferrer":void 0,i&&(x=(0,l.jsx)("span",{href:i,target:"_self"===r?void 0:r,rel:m,className:b,children:x}))}else"video"===p&&(x=(0,l.jsx)(f,{src:t,style:h,width:a,height:n}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y,{id:e,src:t,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:g}),x]})}),((e,t)=>{const s=Object.keys(e);for(const l of s)if(e[l]!==t[l])return!1;return!0}));function T(e){const{src:t,onSelect:s,onSelectURL:i,mediaType:a,allowedTypes:n=["image"]}=e,o=!a&&t?"image":a;let m=(0,v.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?m=(0,v.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(m=(0,v.__)("Video","snow-monkey-blocks")));const c=(0,d.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,l.jsx)(w,{...e,accept:c,allowedTypes:n,mediaType:o}):(0,l.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:s,onSelectURL:i,accept:c,allowedTypes:n})}const N=[{label:(0,v._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,v._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,v._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,v._x)("Full Size","Image size option for resolution control"),value:"full"}];function R({panelId:e,value:t,onChange:s,options:i=N,defaultValue:a=N[0].value,isShownByDefault:n=!0,withToolsPanelItem:o=!0}){const r=null!=t?t:a,c=()=>(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,v.__)("Resolution"),value:r,options:i,onChange:s,help:(0,v.__)("Select the size of the source image."),size:"__unstable-large"});return o?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>r!==a,label:(0,v.__)("Resolution"),onDeselect:()=>s(a),isShownByDefault:n,panelId:e,children:(0,l.jsx)(c,{})}):(0,l.jsx)(c,{})}const L=e=>{const t=document.createElement("div");return t.style.display="none",t.innerHTML=e,t.innerText},C=["image"],S="full",U="noreferrer noopener",I="_blank",z="nofollow",P=[...r.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,v.__)("Mark as nofollow","snow-monkey-blocks")}],B=t.uK,E=t.xY,H=[{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"},supports:{...E},save({attributes:e}){const{titleTagName:t,title:s,summary:i,displayLink:a,linkLabel:o,linkURL:m,linkTarget:c,displayImage:_,imagePosition:d,imageID:g,imageURL:p,imageAlt:h,imageWidth:u,imageHeight:b}=e,x=(0,r.__experimentalGetColorClassesAndStyles)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),k=n()("smb-panels__item","smb-panels__item--horizontal",x?.className,{"smb-panels__item--reverse":"right"===d}),v=x?.style,y=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!o});return(0,l.jsx)("div",{...r.useBlockProps.save({className:"c-row__col"}),children:(0,l.jsxs)("div",{className:k,style:v,children:[_&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:p,alt:h,width:!!u&&u,height:!!b&&b,className:`wp-image-${g}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(s)&&"none"!==t&&(0,l.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:s}),!r.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:i})}),(!!m||a)&&(0,l.jsx)("div",{className:y,children:m?(0,l.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:a&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})}):(0,l.jsx)(l.Fragment,{children:a&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})})})]})]})})}}},{attributes:{...B,backgroundColor:{type:"string"},backgroundGradientColor:{type:"string"},textColor:{type:"string"},linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},migrate(e){const{backgroundColor:t,backgroundGradientColor:s,textColor:l}=e;let i={...e};return t&&(i={...i,backgroundColor:void 0,style:{...i?.style,color:{...i?.style?.color,background:t}}}),s&&(i={...i,backgroundGradientColor:void 0,style:{...i?.style,color:{...i?.style?.color,gradient:s}}}),l&&(i={...i,textColor:void 0,style:{...i?.style,color:{...i?.style?.color,text:l}}}),i},save({attributes:e,className:t}){const{titleTagName:s,title:i,summary:a,backgroundColor:o,backgroundGradientColor:m,textColor:c,displayLink:_,linkLabel:d,linkURL:g,linkTarget:p,displayImage:h,imagePosition:u,imageID:b,imageURL:x,imageAlt:k,imageWidth:v,imageHeight:y}=e,j=n()("c-row__col",t),f=n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===u}),w=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!d}),T={"--smb-panel--background-color":o,"--smb-panel--background-image":m,"--smb-panel--color":c};return(0,l.jsx)("div",{...r.useBlockProps.save({className:j}),children:(0,l.jsxs)("div",{className:f,style:T,children:[h&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:x,alt:k,width:!!v&&v,height:!!y&&y,className:`wp-image-${b}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==s&&(0,l.jsx)(r.RichText.Content,{tagName:s,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:a})}),(!!g||_)&&(0,l.jsx)("div",{className:w,children:g?(0,l.jsx)("a",{href:g,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:_&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:d})})}):(0,l.jsx)(l.Fragment,{children:_&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:d})})})})]})]})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},migrate(e){const{linkLabel:t,linkURL:s,imageURL:l}=e;return r.RichText.isEmpty(t)&&!s||(e.displayLink=!0),l&&(e.displayImage=!0),e},save({attributes:e,className:t}){const{titleTagName:s,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imagePosition:_,imageID:d,imageURL:g,imageAlt:p,imageWidth:h,imageHeight:u}=e,b=n()("c-row__col",t),x=n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===_}),k=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!o}),v=!r.RichText.isEmpty(o)&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})});return(0,l.jsx)("div",{...r.useBlockProps.save({className:b}),children:(0,l.jsxs)("div",{className:x,children:[!!g&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:g,alt:p,width:!!h&&h,height:!!u&&u,className:`wp-image-${d}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==s&&(0,l.jsx)(r.RichText.Content,{tagName:s,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:a})}),(!r.RichText.isEmpty(o)||!!m)&&(0,l.jsx)("div",{className:k,children:m?(0,l.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:v}):(0,l.jsx)(l.Fragment,{children:v})})]})]})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e,className:t}){const{titleTagName:s,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imagePosition:_,imageID:d,imageURL:g,imageAlt:p}=e,h=n()("c-row__col",t),u=n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===_});return(0,l.jsx)("div",{className:h,children:(0,l.jsxs)("div",{className:u,children:[!!g&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:g,alt:p,className:`wp-image-${d}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==s&&(0,l.jsx)(r.RichText.Content,{tagName:s,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:a})}),!r.RichText.isEmpty(o)&&(0,l.jsx)("div",{className:"smb-panels__item__action",children:m?(0,l.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})}):(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})})]})]})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e,className:t}){const{titleTagName:s,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imagePosition:_,imageID:d,imageURL:g,imageAlt:p}=e,h=(0,l.jsxs)(l.Fragment,{children:[!!g&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:g,alt:p,className:`wp-image-${d}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==s&&(0,l.jsx)(r.RichText.Content,{tagName:s,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:a})}),!r.RichText.isEmpty(o)&&(0,l.jsx)("div",{className:"smb-panels__item__action",children:(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})})]})]}),u=n()("c-row__col",t),b=n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===_});return(0,l.jsx)("div",{className:u,children:m?(0,l.jsx)("a",{className:b,href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:h}):(0,l.jsx)("div",{className:b,children:h})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e}){const{titleTagName:t,title:s,summary:i,linkLabel:a,linkURL:o,linkTarget:m,imagePosition:c,imageID:_,imageURL:d}=e,g=()=>(0,l.jsxs)(l.Fragment,{children:[!!_&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:d,alt:"",className:`wp-image-${_}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(s)&&(0,l.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:s}),!r.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:i})}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__action",children:(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:a})})})]})]}),p=()=>o?(0,l.jsx)("a",{className:n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===c}),href:o,target:"_self"===m?void 0:m,rel:"_self"===m?void 0:"noopener noreferrer",children:(0,l.jsx)(g,{})}):(0,l.jsx)("div",{className:n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===c}),children:(0,l.jsx)(g,{})});return(0,l.jsx)("div",{className:"c-row__col",children:(0,l.jsx)(p,{})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e}){const{titleTagName:t,title:s,summary:i,linkLabel:a,linkURL:o,linkTarget:m,imagePosition:c,imageID:_,imageURL:d}=e;return(0,l.jsx)("div",{className:"c-row__col",children:(g=(0,l.jsxs)(l.Fragment,{children:[!!_&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:d,alt:"",className:`wp-image-${_}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(s)&&(0,l.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:s}),!r.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:i})}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__action",children:(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:a})})})]})]}),o?(0,l.jsx)("a",{className:n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===c}),href:o,target:m,children:g}):(0,l.jsx)("div",{className:n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===c}),href:o,target:m,children:g}))});var g}}],V={to:[{type:"block",blocks:["snow-monkey-blocks/panels-item"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item",t)},{type:"block",blocks:["snow-monkey-blocks/panels-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.summary})])},{type:"block",blocks:["snow-monkey-blocks/panels-item-block-link"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-block-link",{linkURL:t.linkURL,linkTarget:t.linkTarget},[(0,e.createBlock)("core/paragraph",{content:t.summary})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:i},edit:function({attributes:e,setAttributes:s,isSelected:i}){const{titleTagName:a,title:g,summary:y,displayLink:j,rel:f,linkLabel:w,linkURL:N,linkTarget:B,displayImage:E,imagePosition:H,imageID:V,imageURL:D,imageAlt:M,imageWidth:A,imageHeight:K,imageSizeSlug:$}=e,G=(0,r.__experimentalUseColorProps)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),W=(0,d.useRef)(),[Z,F]=(0,d.useState)(),[O,J]=(0,d.useState)(!1),Y=!!N,Q=B===I,X=!!f?.includes(z),q=(0,d.useMemo)((()=>({url:N,title:w,opensInNewTab:Q,nofollow:X})),[N,w,Q,X]);function ee(){s({linkURL:void 0,linkTarget:void 0,rel:void 0}),J(!1)}const te=(0,_.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),se=(0,_.useSelect)((e=>V?e("core").get Media(V,{context:"view"}):null),[V]),le=te.filter((({slug:e})=>se?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),ie=["div","h2","h3","none"],ae=n()("smb-panels__item","smb-panels__item--horizontal",G?.className,{"smb-panels__item--reverse":"right"===H}),ne=G?.style,oe=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!w&&!i}),re=(0,r.useBlockProps)({className:"c-row__col",ref:(0,c.useMergeRefs)([F,W])}),me=(0,c.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.InspectorControls,{children:[(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,v.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:me,children:(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,v.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>s({titleTagName:t.uK.titleTagName.default}),children:(0,l.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/panels-item-horizontal/title-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,o.times)(ie.length,(e=>(0,l.jsx)(m.Button,{variant:a===ie[e]?"primary":"secondary",onClick:()=>s({titleTagName:ie[e]}),children:ie[e]},e)))})})})}),(0,l.jsxs)(m.__experimentalToolsPanel,{label:(0,v.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:me,children:[(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>E!==t.uK.displayImage.default,isShownByDefault:!0,label:(0,v.__)("Display image","snow-monkey-blocks"),onDeselect:()=>s({displayImage:t.uK.displayImage.default}),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Display image","snow-monkey-blocks"),checked:E,onChange:e=>s({displayImage:e})})}),E&&0<le.length&&(0,l.jsx)(R,{defaultValue:t.uK.imageSizeSlug.default,value:$,options:le,onChange:e=>{const t=se?.media_details?.sizes?.[e]?.source_url,l=se?.media_details?.sizes?.[e]?.width,i=se?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:l,imageHeight:i,imageSizeSlug:e})}})]}),(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,v.__)("Link settings","snow-monkey-blocks"),dropdownMenuProps:me,children:(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>j!==t.uK.displayLink.default,isShownByDefault:!0,label:(0,v.__)("Display link","snow-monkey-blocks"),onDeselect:()=>s({displayLink:t.uK.displayLink.default}),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Display link","snow-monkey-blocks"),checked:j,onChange:e=>s({displayLink:e})})})})]}),(0,l.jsx)(r.BlockControls,{group:"block",children:(0,l.jsxs)(m.ToolbarGroup,{children:[(0,l.jsx)(m.ToolbarButton,{icon:p,title:(0,v.__)("Image position","snow-monkey-blocks"),isActive:"left"===H,onClick:()=>s({imagePosition:"left"})}),(0,l.jsx)(m.ToolbarButton,{icon:h,title:(0,v.__)("Show avatar on right","snow-monkey-blocks"),isActive:"right"===H,onClick:()=>s({imagePosition:"right"})})]})}),(0,l.jsx)("div",{...re,children:(0,l.jsxs)("div",{className:ae,style:ne,children:[E&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)(T,{src:D,id:V,alt:M,width:A,height:K,onSelect:e=>{const t=e?.sizes?.[$]?$:S,l=e?.sizes?.[t]?.url,i=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;s({imageURL:l||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:i||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==D&&s({imageURL:e,imageID:0,mediaSizeSlug:S})},onRemove:()=>s({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:C})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[(!r.RichText.isEmpty(g)||i)&&"none"!==a&&(0,l.jsx)(r.RichText,{tagName:a,className:"smb-panels__item__title",placeholder:(0,v.__)("Write title…","snow-monkey-blocks"),value:g,onChange:e=>s({title:e})}),(!r.RichText.isEmpty(y)||i)&&(0,l.jsx)(r.RichText,{className:"smb-panels__item__content",placeholder:(0,v.__)("Write content…","snow-monkey-blocks"),value:y,onChange:e=>s({summary:e})}),(Y||j)&&(0,l.jsx)("div",{className:oe,children:(0,l.jsx)("span",{href:N,target:B,rel:f,children:j?(0,l.jsx)(r.RichText,{className:"smb-panels__item__link",value:w,placeholder:(0,v.__)("Link","snow-monkey-blocks"),onChange:e=>s({linkLabel:L(e)})}):(0,l.jsx)("div",{className:"smb-panels__item__link screen-reader-text",children:w||(0,v.__)("Learn more","snow-monkey-blocks")})})})]})]})}),(0,l.jsxs)(r.BlockControls,{group:"block",children:[!Y&&(0,l.jsx)(m.ToolbarButton,{name:"link",icon:u,title:(0,v.__)("Link"),shortcut:x.displayShortcut.primary("k"),onClick:function(e){e.preventDefault(),J(!0)}}),Y&&(0,l.jsx)(m.ToolbarButton,{name:"link",icon:b,title:(0,v.__)("Unlink"),shortcut:x.displayShortcut.primaryShift("k"),onClick:ee,isActive:!0})]}),i&&(O||Y)&&(0,l.jsx)(m.Popover,{position:"bottom center",onClose:()=>{J(!1)},anchor:Z,focusOnMount:!!O&&"firstElement",children:(0,l.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:q,onChange:({url:e="",title:t,opensInNewTab:l,nofollow:i})=>{s(function({rel:e="",url:t="",title:s,opensInNewTab:l,nofollow:i}){let a,n=e;if(l)a=I,n=n?.includes(U)?n:n+` ${U}`;else{const e=new RegExp(`\\b${U}\\s*`,"g");n=n?.replace(e,"").trim()}if(i)n=n?.includes(z)?n:(n+` ${z}`).trim();else{const e=new RegExp(`\\b${z}\\s*`,"g");n=n?.replace(e,"").trim()}return{linkURL:(0,k.prependHTTP)(t),linkLabel:s,linkTarget:a,rel:n||void 0}}({rel:f,url:e,title:t,opensInNewTab:l,nofollow:i}))},onRemove:()=>{ee()},forceIsEditingLink:O,hasRichPreviews:!0,hasTextControl:!j,settings:P,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})]})},save:function({attributes:e}){const{titleTagName:t,title:s,summary:i,displayLink:a,rel:o,linkLabel:m,linkURL:c,linkTarget:_,displayImage:d,imagePosition:g,imageID:p,imageURL:h,imageAlt:u,imageWidth:b,imageHeight:x}=e,k=!!c,y=(0,r.__experimentalGetColorClassesAndStyles)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),j=n()("smb-panels__item","smb-panels__item--horizontal",y?.className,{"smb-panels__item--reverse":"right"===g}),f=y?.style,w=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!a});return(0,l.jsx)("div",{...r.useBlockProps.save({className:"c-row__col"}),children:(0,l.jsxs)("div",{className:j,style:f,children:[d&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:h,alt:u,width:!!b&&b,height:!!x&&x,className:`wp-image-${p}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(s)&&"none"!==t&&(0,l.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:s}),!r.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:i})}),(k||a)&&(0,l.jsx)("div",{className:w,children:(0,l.jsx)("a",{href:c,target:_,rel:o,children:a?(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:m})}):(0,l.jsx)("div",{className:"smb-panels__item__link screen-reader-text",children:m||(0,v.__)("Learn more","snow-monkey-blocks")})})})]})]})})},deprecated:H,transforms:V})})()})();1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var l={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=n(e,a(s)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var s in e)l.call(e,s)&&e[s]&&(t=n(t,s));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(s=function(){return i}.apply(t,[]))||(e.exports=s)}()}},t={};function s(l){var i=t[l];if(void 0!==i)return i.exports;var a=t[l]={exports:{}};return e[l](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var l in t)s.o(t,l)&&!s.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/panels-item-horizontal","uK":{"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-panels__item__title","default":""},"summary":{"type":"string","source":"html","selector":".smb-panels__item__content","default":""},"displayLink":{"type":"boolean","default":false},"linkLabel":{"type":"string","source":"text","selector":".smb-panels__item__link","role":"content"},"linkURL":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"rel"},"linkTarget":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"target"},"displayImage":{"type":"boolean","default":false},"imagePosition":{"type":"string","default":"right"},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"}},"xY":{"html":false,"color":{"background":true,"gradients":true,"text":true,"link":true}}}'),l=window.ReactJSXRuntime,i=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3,3v8h8V3Zm7,7H4V4h6Z"}),(0,l.jsx)("path",{d:"M13,3v8h8V3Zm7,7H14V4h6Z"}),(0,l.jsx)("path",{d:"M3,13v8h8V13Zm7,7H4V14h6Z"}),(0,l.jsx)("path",{d:"M13,13v8h8V13Zm7,7H14V14h6Z"})]});var a=s(6942),n=s.n(a);const o=window.lodash,r=window.wp.blockEditor,m=window.wp.components,c=window.wp.compose,_=window.wp.data,d=window.wp.element,g=window.wp.primitives;var p=(0,l.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(g.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),h=(0,l.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(g.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})}),u=(0,l.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(g.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),b=(0,l.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(g.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const x=window.wp.keycodes,k=window.wp.url,v=window.wp.i18n,y=({id:e,src:t,allowedTypes:s,accept:i,onSelect:a,onSelectURL:n,onRemove:o})=>(0,l.jsxs)(r.BlockControls,{group:"inline",children:[(0,l.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:i,onSelect:a,onSelectURL:n}),!!t&&!!o&&(0,l.jsx)(m.ToolbarButton,{onClick:o,children:(0,v.__)("Release","snow-monkey-blocks")})]}),j=({src:e,alt:t,id:s,style:i,width:a,height:n})=>(0,l.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:i,width:a,height:n}),f=({src:e,style:t,width:s,height:i})=>(0,l.jsx)("video",{src:e,style:t,width:s,height:i}),w=(0,d.memo)((({id:e,src:t,alt:s,url:i,width:a,height:n,target:r,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:g,mediaType:p,style:h,rel:u,linkClass:b})=>{let x;if("image"===p){let m;x=(0,l.jsx)(j,{src:t,alt:s,id:e,style:h,width:a,height:n}),m=u?(0,o.isEmpty)(u)?void 0:u:"_self"!==r&&r?"noopener noreferrer":void 0,i&&(x=(0,l.jsx)("span",{href:i,target:"_self"===r?void 0:r,rel:m,className:b,children:x}))}else"video"===p&&(x=(0,l.jsx)(f,{src:t,style:h,width:a,height:n}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y,{id:e,src:t,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:g}),x]})}),((e,t)=>{const s=Object.keys(e);for(const l of s)if(e[l]!==t[l])return!1;return!0}));function T(e){const{src:t,onSelect:s,onSelectURL:i,mediaType:a,allowedTypes:n=["image"]}=e,o=!a&&t?"image":a;let m=(0,v.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?m=(0,v.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(m=(0,v.__)("Video","snow-monkey-blocks")));const c=(0,d.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,l.jsx)(w,{...e,accept:c,allowedTypes:n,mediaType:o}):(0,l.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:s,onSelectURL:i,accept:c,allowedTypes:n})}const N=[{label:(0,v._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,v._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,v._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,v._x)("Full Size","Image size option for resolution control"),value:"full"}];function R({panelId:e,value:t,onChange:s,options:i=N,defaultValue:a=N[0].value,isShownByDefault:n=!0,withToolsPanelItem:o=!0}){const r=null!=t?t:a,c=()=>(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,v.__)("Resolution"),value:r,options:i,onChange:s,help:(0,v.__)("Select the size of the source image."),size:"__unstable-large"});return o?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>r!==a,label:(0,v.__)("Resolution"),onDeselect:()=>s(a),isShownByDefault:n,panelId:e,children:(0,l.jsx)(c,{})}):(0,l.jsx)(c,{})}const L=e=>{const t=document.createElement("div");return t.style.display="none",t.innerHTML=e,t.innerText},C=["image"],S="full",U="noreferrer noopener",I="_blank",z="nofollow",P=[...r.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,v.__)("Mark as nofollow","snow-monkey-blocks")}],B=t.uK,E=t.xY,H=[{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"},supports:{...E},save({attributes:e}){const{titleTagName:t,title:s,summary:i,displayLink:a,linkLabel:o,linkURL:m,linkTarget:c,displayImage:_,imagePosition:d,imageID:g,imageURL:p,imageAlt:h,imageWidth:u,imageHeight:b}=e,x=(0,r.__experimentalGetColorClassesAndStyles)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),k=n()("smb-panels__item","smb-panels__item--horizontal",x?.className,{"smb-panels__item--reverse":"right"===d}),v=x?.style,y=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!o});return(0,l.jsx)("div",{...r.useBlockProps.save({className:"c-row__col"}),children:(0,l.jsxs)("div",{className:k,style:v,children:[_&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:p,alt:h,width:!!u&&u,height:!!b&&b,className:`wp-image-${g}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(s)&&"none"!==t&&(0,l.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:s}),!r.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:i})}),(!!m||a)&&(0,l.jsx)("div",{className:y,children:m?(0,l.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:a&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})}):(0,l.jsx)(l.Fragment,{children:a&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})})})]})]})})}}},{attributes:{...B,backgroundColor:{type:"string"},backgroundGradientColor:{type:"string"},textColor:{type:"string"},linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},migrate(e){const{backgroundColor:t,backgroundGradientColor:s,textColor:l}=e;let i={...e};return t&&(i={...i,backgroundColor:void 0,style:{...i?.style,color:{...i?.style?.color,background:t}}}),s&&(i={...i,backgroundGradientColor:void 0,style:{...i?.style,color:{...i?.style?.color,gradient:s}}}),l&&(i={...i,textColor:void 0,style:{...i?.style,color:{...i?.style?.color,text:l}}}),i},save({attributes:e,className:t}){const{titleTagName:s,title:i,summary:a,backgroundColor:o,backgroundGradientColor:m,textColor:c,displayLink:_,linkLabel:d,linkURL:g,linkTarget:p,displayImage:h,imagePosition:u,imageID:b,imageURL:x,imageAlt:k,imageWidth:v,imageHeight:y}=e,j=n()("c-row__col",t),f=n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===u}),w=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!d}),T={"--smb-panel--background-color":o,"--smb-panel--background-image":m,"--smb-panel--color":c};return(0,l.jsx)("div",{...r.useBlockProps.save({className:j}),children:(0,l.jsxs)("div",{className:f,style:T,children:[h&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:x,alt:k,width:!!v&&v,height:!!y&&y,className:`wp-image-${b}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==s&&(0,l.jsx)(r.RichText.Content,{tagName:s,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:a})}),(!!g||_)&&(0,l.jsx)("div",{className:w,children:g?(0,l.jsx)("a",{href:g,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:_&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:d})})}):(0,l.jsx)(l.Fragment,{children:_&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:d})})})})]})]})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},migrate(e){const{linkLabel:t,linkURL:s,imageURL:l}=e;return r.RichText.isEmpty(t)&&!s||(e.displayLink=!0),l&&(e.displayImage=!0),e},save({attributes:e,className:t}){const{titleTagName:s,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imagePosition:_,imageID:d,imageURL:g,imageAlt:p,imageWidth:h,imageHeight:u}=e,b=n()("c-row__col",t),x=n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===_}),k=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!o}),v=!r.RichText.isEmpty(o)&&(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})});return(0,l.jsx)("div",{...r.useBlockProps.save({className:b}),children:(0,l.jsxs)("div",{className:x,children:[!!g&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:g,alt:p,width:!!h&&h,height:!!u&&u,className:`wp-image-${d}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==s&&(0,l.jsx)(r.RichText.Content,{tagName:s,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:a})}),(!r.RichText.isEmpty(o)||!!m)&&(0,l.jsx)("div",{className:k,children:m?(0,l.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:v}):(0,l.jsx)(l.Fragment,{children:v})})]})]})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e,className:t}){const{titleTagName:s,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imagePosition:_,imageID:d,imageURL:g,imageAlt:p}=e,h=n()("c-row__col",t),u=n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===_});return(0,l.jsx)("div",{className:h,children:(0,l.jsxs)("div",{className:u,children:[!!g&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:g,alt:p,className:`wp-image-${d}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==s&&(0,l.jsx)(r.RichText.Content,{tagName:s,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:a})}),!r.RichText.isEmpty(o)&&(0,l.jsx)("div",{className:"smb-panels__item__action",children:m?(0,l.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})}):(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})})]})]})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e,className:t}){const{titleTagName:s,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imagePosition:_,imageID:d,imageURL:g,imageAlt:p}=e,h=(0,l.jsxs)(l.Fragment,{children:[!!g&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:g,alt:p,className:`wp-image-${d}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==s&&(0,l.jsx)(r.RichText.Content,{tagName:s,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:a})}),!r.RichText.isEmpty(o)&&(0,l.jsx)("div",{className:"smb-panels__item__action",children:(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:o})})})]})]}),u=n()("c-row__col",t),b=n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===_});return(0,l.jsx)("div",{className:u,children:m?(0,l.jsx)("a",{className:b,href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:h}):(0,l.jsx)("div",{className:b,children:h})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e}){const{titleTagName:t,title:s,summary:i,linkLabel:a,linkURL:o,linkTarget:m,imagePosition:c,imageID:_,imageURL:d}=e,g=()=>(0,l.jsxs)(l.Fragment,{children:[!!_&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:d,alt:"",className:`wp-image-${_}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(s)&&(0,l.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:s}),!r.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:i})}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__action",children:(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:a})})})]})]}),p=()=>o?(0,l.jsx)("a",{className:n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===c}),href:o,target:"_self"===m?void 0:m,rel:"_self"===m?void 0:"noopener noreferrer",children:(0,l.jsx)(g,{})}):(0,l.jsx)("div",{className:n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===c}),children:(0,l.jsx)(g,{})});return(0,l.jsx)("div",{className:"c-row__col",children:(0,l.jsx)(p,{})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e}){const{titleTagName:t,title:s,summary:i,linkLabel:a,linkURL:o,linkTarget:m,imagePosition:c,imageID:_,imageURL:d}=e;return(0,l.jsx)("div",{className:"c-row__col",children:(g=(0,l.jsxs)(l.Fragment,{children:[!!_&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:d,alt:"",className:`wp-image-${_}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(s)&&(0,l.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:s}),!r.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:i})}),!r.RichText.isEmpty(a)&&(0,l.jsx)("div",{className:"smb-panels__item__action",children:(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:a})})})]})]}),o?(0,l.jsx)("a",{className:n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===c}),href:o,target:m,children:g}):(0,l.jsx)("div",{className:n()("smb-panels__item","smb-panels__item--horizontal",{"smb-panels__item--reverse":"right"===c}),href:o,target:m,children:g}))});var g}}],V={to:[{type:"block",blocks:["snow-monkey-blocks/panels-item"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item",t)},{type:"block",blocks:["snow-monkey-blocks/panels-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.summary})])},{type:"block",blocks:["snow-monkey-blocks/panels-item-block-link"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-block-link",{linkURL:t.linkURL,linkTarget:t.linkTarget},[(0,e.createBlock)("core/paragraph",{content:t.summary})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:i},edit:function({attributes:e,setAttributes:s,isSelected:i}){const{titleTagName:a,title:g,summary:y,displayLink:j,rel:f,linkLabel:w,linkURL:N,linkTarget:B,displayImage:E,imagePosition:H,imageID:V,imageURL:D,imageAlt:M,imageWidth:A,imageHeight:K,imageSizeSlug:$}=e,G=(0,r.__experimentalUseColorProps)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),W=(0,d.useRef)(),[Z,F]=(0,d.useState)(),[O,J]=(0,d.useState)(!1),Y=!!N,Q=B===I,X=!!f?.includes(z),q=(0,d.useMemo)((()=>({url:N,title:w,opensInNewTab:Q,nofollow:X})),[N,w,Q,X]);function ee(){s({linkURL:void 0,linkTarget:void 0,rel:void 0}),J(!1)}const te=(0,_.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),se=(0,_.useSelect)((e=>V?e("core").getEntityRecord("postType","attachment",V):null),[V]),le=te.filter((({slug:e})=>se?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),ie=["div","h2","h3","none"],ae=n()("smb-panels__item","smb-panels__item--horizontal",G?.className,{"smb-panels__item--reverse":"right"===H}),ne=G?.style,oe=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!w&&!i}),re=(0,r.useBlockProps)({className:"c-row__col",ref:(0,c.useMergeRefs)([F,W])}),me=(0,c.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.InspectorControls,{children:[(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,v.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:me,children:(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,v.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>s({titleTagName:t.uK.titleTagName.default}),children:(0,l.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/panels-item-horizontal/title-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,o.times)(ie.length,(e=>(0,l.jsx)(m.Button,{variant:a===ie[e]?"primary":"secondary",onClick:()=>s({titleTagName:ie[e]}),children:ie[e]},e)))})})})}),(0,l.jsxs)(m.__experimentalToolsPanel,{label:(0,v.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:me,children:[(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>E!==t.uK.displayImage.default,isShownByDefault:!0,label:(0,v.__)("Display image","snow-monkey-blocks"),onDeselect:()=>s({displayImage:t.uK.displayImage.default}),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Display image","snow-monkey-blocks"),checked:E,onChange:e=>s({displayImage:e})})}),E&&0<le.length&&(0,l.jsx)(R,{defaultValue:t.uK.imageSizeSlug.default,value:$,options:le,onChange:e=>{const t=se?.media_details?.sizes?.[e]?.source_url,l=se?.media_details?.sizes?.[e]?.width,i=se?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:l,imageHeight:i,imageSizeSlug:e})}})]}),(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,v.__)("Link settings","snow-monkey-blocks"),dropdownMenuProps:me,children:(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>j!==t.uK.displayLink.default,isShownByDefault:!0,label:(0,v.__)("Display link","snow-monkey-blocks"),onDeselect:()=>s({displayLink:t.uK.displayLink.default}),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Display link","snow-monkey-blocks"),checked:j,onChange:e=>s({displayLink:e})})})})]}),(0,l.jsx)(r.BlockControls,{group:"block",children:(0,l.jsxs)(m.ToolbarGroup,{children:[(0,l.jsx)(m.ToolbarButton,{icon:p,title:(0,v.__)("Image position","snow-monkey-blocks"),isActive:"left"===H,onClick:()=>s({imagePosition:"left"})}),(0,l.jsx)(m.ToolbarButton,{icon:h,title:(0,v.__)("Show avatar on right","snow-monkey-blocks"),isActive:"right"===H,onClick:()=>s({imagePosition:"right"})})]})}),(0,l.jsx)("div",{...re,children:(0,l.jsxs)("div",{className:ae,style:ne,children:[E&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)(T,{src:D,id:V,alt:M,width:A,height:K,onSelect:e=>{const t=e?.sizes?.[$]?$:S,l=e?.sizes?.[t]?.url,i=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;s({imageURL:l||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:i||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==D&&s({imageURL:e,imageID:0,mediaSizeSlug:S})},onRemove:()=>s({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:C})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[(!r.RichText.isEmpty(g)||i)&&"none"!==a&&(0,l.jsx)(r.RichText,{tagName:a,className:"smb-panels__item__title",placeholder:(0,v.__)("Write title…","snow-monkey-blocks"),value:g,onChange:e=>s({title:e})}),(!r.RichText.isEmpty(y)||i)&&(0,l.jsx)(r.RichText,{className:"smb-panels__item__content",placeholder:(0,v.__)("Write content…","snow-monkey-blocks"),value:y,onChange:e=>s({summary:e})}),(Y||j)&&(0,l.jsx)("div",{className:oe,children:(0,l.jsx)("span",{href:N,target:B,rel:f,children:j?(0,l.jsx)(r.RichText,{className:"smb-panels__item__link",value:w,placeholder:(0,v.__)("Link","snow-monkey-blocks"),onChange:e=>s({linkLabel:L(e)})}):(0,l.jsx)("div",{className:"smb-panels__item__link screen-reader-text",children:w||(0,v.__)("Learn more","snow-monkey-blocks")})})})]})]})}),(0,l.jsxs)(r.BlockControls,{group:"block",children:[!Y&&(0,l.jsx)(m.ToolbarButton,{name:"link",icon:u,title:(0,v.__)("Link"),shortcut:x.displayShortcut.primary("k"),onClick:function(e){e.preventDefault(),J(!0)}}),Y&&(0,l.jsx)(m.ToolbarButton,{name:"link",icon:b,title:(0,v.__)("Unlink"),shortcut:x.displayShortcut.primaryShift("k"),onClick:ee,isActive:!0})]}),i&&(O||Y)&&(0,l.jsx)(m.Popover,{position:"bottom center",onClose:()=>{J(!1)},anchor:Z,focusOnMount:!!O&&"firstElement",children:(0,l.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:q,onChange:({url:e="",title:t,opensInNewTab:l,nofollow:i})=>{s(function({rel:e="",url:t="",title:s,opensInNewTab:l,nofollow:i}){let a,n=e;if(l)a=I,n=n?.includes(U)?n:n+` ${U}`;else{const e=new RegExp(`\\b${U}\\s*`,"g");n=n?.replace(e,"").trim()}if(i)n=n?.includes(z)?n:(n+` ${z}`).trim();else{const e=new RegExp(`\\b${z}\\s*`,"g");n=n?.replace(e,"").trim()}return{linkURL:(0,k.prependHTTP)(t),linkLabel:s,linkTarget:a,rel:n||void 0}}({rel:f,url:e,title:t,opensInNewTab:l,nofollow:i}))},onRemove:()=>{ee()},forceIsEditingLink:O,hasRichPreviews:!0,hasTextControl:!j,settings:P,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})]})},save:function({attributes:e}){const{titleTagName:t,title:s,summary:i,displayLink:a,rel:o,linkLabel:m,linkURL:c,linkTarget:_,displayImage:d,imagePosition:g,imageID:p,imageURL:h,imageAlt:u,imageWidth:b,imageHeight:x}=e,k=!!c,y=(0,r.__experimentalGetColorClassesAndStyles)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),j=n()("smb-panels__item","smb-panels__item--horizontal",y?.className,{"smb-panels__item--reverse":"right"===g}),f=y?.style,w=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!a});return(0,l.jsx)("div",{...r.useBlockProps.save({className:"c-row__col"}),children:(0,l.jsxs)("div",{className:j,style:f,children:[d&&(0,l.jsx)("div",{className:"smb-panels__item__figure",children:(0,l.jsx)("img",{src:h,alt:u,width:!!b&&b,height:!!x&&x,className:`wp-image-${p}`})}),(0,l.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(s)&&"none"!==t&&(0,l.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:s}),!r.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-panels__item__content",children:(0,l.jsx)(r.RichText.Content,{value:i})}),(k||a)&&(0,l.jsx)("div",{className:w,children:(0,l.jsx)("a",{href:c,target:_,rel:o,children:a?(0,l.jsx)("div",{className:"smb-panels__item__link",children:(0,l.jsx)(r.RichText.Content,{value:m})}):(0,l.jsx)("div",{className:"smb-panels__item__link screen-reader-text",children:m||(0,v.__)("Learn more","snow-monkey-blocks")})})})]})]})})},deprecated:H,transforms:V})})()})(); -
snow-monkey-blocks/trunk/dist/blocks/panels/item/vertical/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => ' 9d55240d7ca86328e752');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => '604eabdd159eb8a17f22'); -
snow-monkey-blocks/trunk/dist/blocks/panels/item/vertical/index.js
r3390754 r3400189 1 (()=>{var e={6942:(e,t)=>{var l;!function(){"use strict";var s={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=n(e,a(l)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)s.call(e,l)&&e[l]&&(t=n(t,l));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(l=function(){return i}.apply(t,[]))||(e.exports=l)}()}},t={};function l(s){var i=t[s];if(void 0!==i)return i.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,l),a.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var s in t)l.o(t,s)&&!l.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/panels-item","uK":{"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-panels__item__title","default":""},"summary":{"type":"string","source":"html","selector":".smb-panels__item__content","default":""},"displayLink":{"type":"boolean","default":false},"linkLabel":{"type":"string","source":"text","selector":".smb-panels__item__link","role":"content"},"linkURL":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"rel"},"linkTarget":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"target"},"displayImage":{"type":"boolean","default":false},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"}},"xY":{"html":false,"color":{"background":true,"gradients":true,"text":true,"link":true}}}'),s=window.ReactJSXRuntime,i=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{d:"M3,3v8h8V3Zm7,7H4V4h6Z"}),(0,s.jsx)("path",{d:"M13,3v8h8V3Zm7,7H14V4h6Z"}),(0,s.jsx)("path",{d:"M3,13v8h8V13Zm7,7H4V14h6Z"}),(0,s.jsx)("path",{d:"M13,13v8h8V13Zm7,7H14V14h6Z"})]});var a=l(6942),n=l.n(a);const o=window.lodash,r=window.wp.blockEditor,m=window.wp.components,c=window.wp.compose,_=window.wp.data,d=window.wp.element,g=window.wp.primitives;var u=(0,s.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(g.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),p=(0,s.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(g.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const h=window.wp.keycodes,b=window.wp.url,x=window.wp.i18n,k=({id:e,src:t,allowedTypes:l,accept:i,onSelect:a,onSelectURL:n,onRemove:o})=>(0,s.jsxs)(r.BlockControls,{group:"inline",children:[(0,s.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:l,accept:i,onSelect:a,onSelectURL:n}),!!t&&!!o&&(0,s.jsx)(m.ToolbarButton,{onClick:o,children:(0,x.__)("Release","snow-monkey-blocks")})]}),v=({src:e,alt:t,id:l,style:i,width:a,height:n})=>(0,s.jsx)("img",{src:e,alt:t,className:`wp-image-${l}`,style:i,width:a,height:n}),y=({src:e,style:t,width:l,height:i})=>(0,s.jsx)("video",{src:e,style:t,width:l,height:i}),f=(0,d.memo)((({id:e,src:t,alt:l,url:i,width:a,height:n,target:r,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:g,mediaType:u,style:p,rel:h,linkClass:b})=>{let x;if("image"===u){let m;x=(0,s.jsx)(v,{src:t,alt:l,id:e,style:p,width:a,height:n}),m=h?(0,o.isEmpty)(h)?void 0:h:"_self"!==r&&r?"noopener noreferrer":void 0,i&&(x=(0,s.jsx)("span",{href:i,target:"_self"===r?void 0:r,rel:m,className:b,children:x}))}else"video"===u&&(x=(0,s.jsx)(y,{src:t,style:p,width:a,height:n}));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{id:e,src:t,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:g}),x]})}),((e,t)=>{const l=Object.keys(e);for(const s of l)if(e[s]!==t[s])return!1;return!0}));function j(e){const{src:t,onSelect:l,onSelectURL:i,mediaType:a,allowedTypes:n=["image"]}=e,o=!a&&t?"image":a;let m=(0,x.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?m=(0,x.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(m=(0,x.__)("Video","snow-monkey-blocks")));const c=(0,d.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,s.jsx)(f,{...e,accept:c,allowedTypes:n,mediaType:o}):(0,s.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:l,onSelectURL:i,accept:c,allowedTypes:n})}const w=[{label:(0,x._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,x._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,x._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,x._x)("Full Size","Image size option for resolution control"),value:"full"}];function T({panelId:e,value:t,onChange:l,options:i=w,defaultValue:a=w[0].value,isShownByDefault:n=!0,withToolsPanelItem:o=!0}){const r=null!=t?t:a,c=()=>(0,s.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Resolution"),value:r,options:i,onChange:l,help:(0,x.__)("Select the size of the source image."),size:"__unstable-large"});return o?(0,s.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>r!==a,label:(0,x.__)("Resolution"),onDeselect:()=>l(a),isShownByDefault:n,panelId:e,children:(0,s.jsx)(c,{})}):(0,s.jsx)(c,{})}const N=e=>{const t=document.createElement("div");return t.style.display="none",t.innerHTML=e,t.innerText},R=["image"],L="full",C="noreferrer noopener",S="_blank",U="nofollow",I=[...r.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,x.__)("Mark as nofollow","snow-monkey-blocks")}],B=t.uK,E=t.xY,H=[{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E},save({attributes:e}){const{titleTagName:t,title:l,summary:i,displayLink:a,linkLabel:o,linkURL:m,linkTarget:c,displayImage:_,imageID:d,imageURL:g,imageAlt:u,imageWidth:p,imageHeight:h}=e,b=(0,r.__experimentalGetColorClassesAndStyles)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),x=n()("smb-panels__item",b?.className),k=b?.style,v=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!o});return(0,s.jsx)("div",{...r.useBlockProps.save({className:"c-row__col"}),children:(0,s.jsxs)("div",{className:x,style:k,children:[_&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:g,alt:u,width:!!p&&p,height:!!h&&h,className:`wp-image-${d}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(l)&&"none"!==t&&(0,s.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:l}),!r.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:i})}),(!!m||a)&&(0,s.jsx)("div",{className:v,children:m?(0,s.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:a&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:o})})}):(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:o})})})})]})]})})}},{attributes:{...B,backgroundColor:{type:"string"},backgroundGradientColor:{type:"string"},textColor:{type:"string"},linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},migrate(e){const{backgroundColor:t,backgroundGradientColor:l,textColor:s}=e;let i={...e};return t&&(i={...i,backgroundColor:void 0,style:{...i?.style,color:{...i?.style?.color,background:t}}}),l&&(i={...i,backgroundGradientColor:void 0,style:{...i?.style,color:{...i?.style?.color,gradient:l}}}),s&&(i={...i,textColor:void 0,style:{...i?.style,color:{...i?.style?.color,text:s}}}),i},save({attributes:e,className:t}){const{titleTagName:l,title:i,summary:a,backgroundColor:o,backgroundGradientColor:m,textColor:c,displayLink:_,linkLabel:d,linkURL:g,linkTarget:u,displayImage:p,imageID:h,imageURL:b,imageAlt:x,imageWidth:k,imageHeight:v}=e,y=n()("c-row__col",t),f=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!d}),j={"--smb-panel--background-color":o,"--smb-panel--background-image":m,"--smb-panel--color":c};return(0,s.jsx)("div",{...r.useBlockProps.save({className:y}),children:(0,s.jsxs)("div",{className:"smb-panels__item",style:j,children:[p&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:b,alt:x,width:!!k&&k,height:!!v&&v,className:`wp-image-${h}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==l&&(0,s.jsx)(r.RichText.Content,{tagName:l,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:a})}),(!!g||_)&&(0,s.jsx)("div",{className:f,children:g?(0,s.jsx)("a",{href:g,target:"_self"===u?void 0:u,rel:"_self"===u?void 0:"noopener noreferrer",children:_&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:d})})}):(0,s.jsx)(s.Fragment,{children:_&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:d})})})})]})]})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,default:""},linkTarget:{...B.linkTarget,default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},migrate(e){const{linkLabel:t,linkURL:l,imageURL:s}=e;return r.RichText.isEmpty(t)&&!l||(e.displayLink=!0),s&&(e.displayImage=!0),e},save({attributes:e,className:t}){const{titleTagName:l,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imageID:_,imageURL:d,imageAlt:g,imageWidth:u,imageHeight:p}=e,h=n()("c-row__col",t),b=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!o}),x=!r.RichText.isEmpty(o)&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:o})});return(0,s.jsx)("div",{...r.useBlockProps.save({className:h}),children:(0,s.jsxs)("div",{className:"smb-panels__item",children:[!!d&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:d,alt:g,width:!!u&&u,height:!!p&&p,className:`wp-image-${_}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==l&&(0,s.jsx)(r.RichText.Content,{tagName:l,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:a})}),(!r.RichText.isEmpty(o)||!!m)&&(0,s.jsx)("div",{className:b,children:m?(0,s.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:x}):(0,s.jsx)(s.Fragment,{children:x})})]})]})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e,className:t}){const{titleTagName:l,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imageID:_,imageURL:d,imageAlt:g}=e,u=(0,s.jsxs)(s.Fragment,{children:[!!d&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:d,alt:g,className:`wp-image-${_}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==l&&(0,s.jsx)(r.RichText.Content,{tagName:l,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:a})}),!r.RichText.isEmpty(o)&&(0,s.jsx)("div",{className:"smb-panels__item__action",children:(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:o})})})]})]}),p=n()("c-row__col",t);return(0,s.jsx)("div",{className:p,children:m?(0,s.jsx)("a",{className:"smb-panels__item",href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:u}):(0,s.jsx)("div",{className:"smb-panels__item",children:u})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e}){const{titleTagName:t,title:l,summary:i,linkLabel:a,linkURL:n,linkTarget:o,imageID:m,imageURL:c}=e,_=()=>(0,s.jsxs)(s.Fragment,{children:[!!m&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:c,alt:"",className:`wp-image-${m}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(l)&&(0,s.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:l}),!r.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:i})}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__action",children:(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:a})})})]})]}),d=()=>(n?()=>(0,s.jsx)("a",{className:"smb-panels__item",href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:(0,s.jsx)(_,{})}):()=>(0,s.jsx)("div",{className:"smb-panels__item",children:(0,s.jsx)(_,{})})).call(this);return(0,s.jsx)("div",{className:"c-row__col",children:(0,s.jsx)(d,{})})}},{attributes:{...B,linkLabel:{...B.linkLabel,default:""},linkURL:{...B.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...B.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...E,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e}){const{titleTagName:t,title:l,summary:i,linkLabel:a,linkURL:n,linkTarget:o,imageID:m,imageURL:c}=e;return(0,s.jsx)("div",{className:"c-row__col",children:(_=(0,s.jsxs)(s.Fragment,{children:[!!m&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:c,alt:"",className:`wp-image-${m}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(l)&&(0,s.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:l}),!r.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:i})}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__action",children:(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:a})})})]})]}),n?(0,s.jsx)("a",{className:"smb-panels__item",href:n,target:o,children:_}):(0,s.jsx)("div",{className:"smb-panels__item",href:n,target:o,children:_}))});var _}}],D={to:[{type:"block",blocks:["snow-monkey-blocks/panels-item-horizontal"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-horizontal",t)},{type:"block",blocks:["snow-monkey-blocks/panels-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.summary})])},{type:"block",blocks:["snow-monkey-blocks/panels-item-block-link"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-block-link",{linkURL:t.linkURL,linkTarget:t.linkTarget},[(0,e.createBlock)("core/paragraph",{content:t.summary})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:i},edit:function({attributes:e,setAttributes:l,isSelected:i}){const{titleTagName:a,title:g,summary:k,displayLink:v,rel:y,linkLabel:f,linkURL:w,linkTarget:B,displayImage:E,imageID:H,imageURL:D,imageAlt:P,imageWidth:M,imageHeight:z,imageSizeSlug:V}=e,A=(0,r.__experimentalUseColorProps)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),K=(0,d.useRef)(),[$,W]=(0,d.useState)(),[Z,F]=(0,d.useState)(!1),G=!!w,O=B===S,J=!!y?.includes(U),Y=(0,d.useMemo)((()=>({url:w,title:f,opensInNewTab:O,nofollow:J})),[w,f,O,J]);function Q(){l({linkURL:void 0,linkTarget:void 0,rel:void 0}),F(!1)}const X=(0,_.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),q=(0,_.useSelect)((e=>H?e("core").getMedia(H,{context:"view"}):null),[H]),ee=X.filter((({slug:e})=>q?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),te=["div","h2","h3","none"],le=n()("smb-panels__item","smb-panels__item--vertical",A?.className),se=A?.style,ie=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!f&&!i}),ae=(0,r.useBlockProps)({className:"c-row__col",ref:(0,c.useMergeRefs)([W,K])}),ne=(0,c.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsx)(m.__experimentalToolsPanel,{label:(0,x.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ne,children:(0,s.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,x.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>l({titleTagName:t.uK.titleTagName.default}),children:(0,s.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/panels-item-horizontal/title-tag-name",children:(0,s.jsx)("div",{className:"smb-list-icon-selector",children:(0,o.times)(te.length,(e=>(0,s.jsx)(m.Button,{variant:a===te[e]?"primary":"secondary",onClick:()=>l({titleTagName:te[e]}),children:te[e]},e)))})})})}),(0,s.jsxs)(m.__experimentalToolsPanel,{label:(0,x.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:ne,children:[(0,s.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>E!==t.uK.displayImage.default,isShownByDefault:!0,label:(0,x.__)("Display image","snow-monkey-blocks"),onDeselect:()=>l({displayImage:t.uK.displayImage.default}),children:(0,s.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Display image","snow-monkey-blocks"),checked:E,onChange:e=>l({displayImage:e})})}),0<ee.length&&(0,s.jsx)(T,{defaultValue:t.uK.imageSizeSlug.default,value:V,options:ee,onChange:e=>{const t=q?.media_details?.sizes?.[e]?.source_url,s=q?.media_details?.sizes?.[e]?.width,i=q?.media_details?.sizes?.[e]?.height;l({imageURL:t,imageWidth:s,imageHeight:i,imageSizeSlug:e})}})]}),(0,s.jsx)(m.__experimentalToolsPanel,{label:(0,x.__)("Link settings","snow-monkey-blocks"),dropdownMenuProps:ne,children:(0,s.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>v!==t.uK.displayLink.default,isShownByDefault:!0,label:(0,x.__)("Display link","snow-monkey-blocks"),onDeselect:()=>l({displayLink:t.uK.displayLink.default}),children:(0,s.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Display link","snow-monkey-blocks"),checked:v,onChange:e=>l({displayLink:e})})})})]}),(0,s.jsx)("div",{...ae,children:(0,s.jsxs)("div",{className:le,style:se,children:[E&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)(j,{src:D,id:H,alt:P,width:M,height:z,onSelect:e=>{const t=e?.sizes?.[V]?V:L,s=e?.sizes?.[t]?.url,i=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;l({imageURL:s||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:i||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==D&&l({imageURL:e,imageID:0,mediaSizeSlug:L})},onRemove:()=>l({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:R})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[(!r.RichText.isEmpty(g)||i)&&"none"!==a&&(0,s.jsx)(r.RichText,{tagName:a,className:"smb-panels__item__title",placeholder:(0,x.__)("Write title…","snow-monkey-blocks"),value:g,onChange:e=>l({title:e})}),(!r.RichText.isEmpty(k)||i)&&(0,s.jsx)(r.RichText,{className:"smb-panels__item__content",placeholder:(0,x.__)("Write content…","snow-monkey-blocks"),value:k,onChange:e=>l({summary:e})}),(G||v)&&(0,s.jsx)("div",{className:ie,children:(0,s.jsx)("span",{href:w,target:B,rel:y,children:v?(0,s.jsx)(r.RichText,{className:"smb-panels__item__link",value:f,placeholder:(0,x.__)("Link","snow-monkey-blocks"),onChange:e=>l({linkLabel:N(e)})}):(0,s.jsx)("div",{className:"smb-panels__item__link screen-reader-text",children:f||(0,x.__)("Learn more","snow-monkey-blocks")})})})]})]})}),(0,s.jsxs)(r.BlockControls,{children:[!G&&(0,s.jsx)(m.ToolbarButton,{name:"link",icon:u,title:(0,x.__)("Link"),shortcut:h.displayShortcut.primary("k"),onClick:function(e){e.preventDefault(),F(!0)}}),G&&(0,s.jsx)(m.ToolbarButton,{name:"link",icon:p,title:(0,x.__)("Unlink"),shortcut:h.displayShortcut.primaryShift("k"),onClick:Q,isActive:!0})]}),i&&(Z||G)&&(0,s.jsx)(m.Popover,{position:"bottom center",onClose:()=>{F(!1)},anchor:$,focusOnMount:!!Z&&"firstElement",children:(0,s.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:Y,onChange:({url:e="",title:t,opensInNewTab:s,nofollow:i})=>{l(function({rel:e="",url:t="",title:l,opensInNewTab:s,nofollow:i}){let a,n=e;if(s)a=S,n=n?.includes(C)?n:n+` ${C}`;else{const e=new RegExp(`\\b${C}\\s*`,"g");n=n?.replace(e,"").trim()}if(i)n=n?.includes(U)?n:(n+` ${U}`).trim();else{const e=new RegExp(`\\b${U}\\s*`,"g");n=n?.replace(e,"").trim()}return{linkURL:(0,b.prependHTTP)(t),linkLabel:l,linkTarget:a,rel:n||void 0}}({rel:y,url:e,title:t,opensInNewTab:s,nofollow:i}))},onRemove:()=>{Q()},forceIsEditingLink:Z,hasRichPreviews:!0,hasTextControl:!v,settings:I,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})]})},save:function({attributes:e}){const{titleTagName:t,title:l,summary:i,displayLink:a,rel:o,linkLabel:m,linkURL:c,linkTarget:_,displayImage:d,imageID:g,imageURL:u,imageAlt:p,imageWidth:h,imageHeight:b}=e,k=!!c,v=(0,r.__experimentalGetColorClassesAndStyles)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),y=n()("smb-panels__item","smb-panels__item--vertical",v?.className),f=v?.style,j=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!a});return(0,s.jsx)("div",{...r.useBlockProps.save({className:"c-row__col"}),children:(0,s.jsxs)("div",{className:y,style:f,children:[d&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:u,alt:p,width:!!h&&h,height:!!b&&b,className:`wp-image-${g}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(l)&&"none"!==t&&(0,s.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:l}),!r.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:i})}),(k||a)&&(0,s.jsx)("div",{className:j,children:(0,s.jsx)("a",{href:c,target:_,rel:o,children:a?(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:m})}):(0,s.jsx)("div",{className:"smb-panels__item__link screen-reader-text",children:m||(0,x.__)("Learn more","snow-monkey-blocks")})})})]})]})})},deprecated:H,transforms:D})})()})();1 (()=>{var e={6942:(e,t)=>{var l;!function(){"use strict";var s={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=n(e,a(l)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)s.call(e,l)&&e[l]&&(t=n(t,l));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(l=function(){return i}.apply(t,[]))||(e.exports=l)}()}},t={};function l(s){var i=t[s];if(void 0!==i)return i.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,l),a.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var s in t)l.o(t,s)&&!l.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/panels-item","uK":{"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-panels__item__title","default":""},"summary":{"type":"string","source":"html","selector":".smb-panels__item__content","default":""},"displayLink":{"type":"boolean","default":false},"linkLabel":{"type":"string","source":"text","selector":".smb-panels__item__link","role":"content"},"linkURL":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"rel"},"linkTarget":{"type":"string","source":"attribute","selector":".smb-panels__item__action > a","attribute":"target"},"displayImage":{"type":"boolean","default":false},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-panels__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"}},"xY":{"html":false,"color":{"background":true,"gradients":true,"text":true,"link":true}}}'),s=window.ReactJSXRuntime,i=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{d:"M3,3v8h8V3Zm7,7H4V4h6Z"}),(0,s.jsx)("path",{d:"M13,3v8h8V3Zm7,7H14V4h6Z"}),(0,s.jsx)("path",{d:"M3,13v8h8V13Zm7,7H4V14h6Z"}),(0,s.jsx)("path",{d:"M13,13v8h8V13Zm7,7H14V14h6Z"})]});var a=l(6942),n=l.n(a);const o=window.lodash,r=window.wp.blockEditor,m=window.wp.components,c=window.wp.compose,_=window.wp.data,d=window.wp.element,g=window.wp.primitives;var p=(0,s.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(g.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),u=(0,s.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(g.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const h=window.wp.keycodes,b=window.wp.url,x=window.wp.i18n,k=({id:e,src:t,allowedTypes:l,accept:i,onSelect:a,onSelectURL:n,onRemove:o})=>(0,s.jsxs)(r.BlockControls,{group:"inline",children:[(0,s.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:l,accept:i,onSelect:a,onSelectURL:n}),!!t&&!!o&&(0,s.jsx)(m.ToolbarButton,{onClick:o,children:(0,x.__)("Release","snow-monkey-blocks")})]}),y=({src:e,alt:t,id:l,style:i,width:a,height:n})=>(0,s.jsx)("img",{src:e,alt:t,className:`wp-image-${l}`,style:i,width:a,height:n}),v=({src:e,style:t,width:l,height:i})=>(0,s.jsx)("video",{src:e,style:t,width:l,height:i}),f=(0,d.memo)((({id:e,src:t,alt:l,url:i,width:a,height:n,target:r,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:g,mediaType:p,style:u,rel:h,linkClass:b})=>{let x;if("image"===p){let m;x=(0,s.jsx)(y,{src:t,alt:l,id:e,style:u,width:a,height:n}),m=h?(0,o.isEmpty)(h)?void 0:h:"_self"!==r&&r?"noopener noreferrer":void 0,i&&(x=(0,s.jsx)("span",{href:i,target:"_self"===r?void 0:r,rel:m,className:b,children:x}))}else"video"===p&&(x=(0,s.jsx)(v,{src:t,style:u,width:a,height:n}));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{id:e,src:t,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:g}),x]})}),((e,t)=>{const l=Object.keys(e);for(const s of l)if(e[s]!==t[s])return!1;return!0}));function j(e){const{src:t,onSelect:l,onSelectURL:i,mediaType:a,allowedTypes:n=["image"]}=e,o=!a&&t?"image":a;let m=(0,x.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?m=(0,x.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(m=(0,x.__)("Video","snow-monkey-blocks")));const c=(0,d.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,s.jsx)(f,{...e,accept:c,allowedTypes:n,mediaType:o}):(0,s.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:l,onSelectURL:i,accept:c,allowedTypes:n})}const w=[{label:(0,x._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,x._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,x._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,x._x)("Full Size","Image size option for resolution control"),value:"full"}];function T({panelId:e,value:t,onChange:l,options:i=w,defaultValue:a=w[0].value,isShownByDefault:n=!0,withToolsPanelItem:o=!0}){const r=null!=t?t:a,c=()=>(0,s.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Resolution"),value:r,options:i,onChange:l,help:(0,x.__)("Select the size of the source image."),size:"__unstable-large"});return o?(0,s.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>r!==a,label:(0,x.__)("Resolution"),onDeselect:()=>l(a),isShownByDefault:n,panelId:e,children:(0,s.jsx)(c,{})}):(0,s.jsx)(c,{})}const N=e=>{const t=document.createElement("div");return t.style.display="none",t.innerHTML=e,t.innerText},R=["image"],L="full",C="noreferrer noopener",S="_blank",U="nofollow",I=[...r.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,x.__)("Mark as nofollow","snow-monkey-blocks")}],E=t.uK,B=t.xY,H=[{attributes:{...E,linkLabel:{...E.linkLabel,default:""},linkURL:{...E.linkURL,default:""},linkTarget:{...E.linkTarget,default:"_self"}},supports:{...B},save({attributes:e}){const{titleTagName:t,title:l,summary:i,displayLink:a,linkLabel:o,linkURL:m,linkTarget:c,displayImage:_,imageID:d,imageURL:g,imageAlt:p,imageWidth:u,imageHeight:h}=e,b=(0,r.__experimentalGetColorClassesAndStyles)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),x=n()("smb-panels__item",b?.className),k=b?.style,y=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!o});return(0,s.jsx)("div",{...r.useBlockProps.save({className:"c-row__col"}),children:(0,s.jsxs)("div",{className:x,style:k,children:[_&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:g,alt:p,width:!!u&&u,height:!!h&&h,className:`wp-image-${d}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(l)&&"none"!==t&&(0,s.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:l}),!r.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:i})}),(!!m||a)&&(0,s.jsx)("div",{className:y,children:m?(0,s.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:a&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:o})})}):(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:o})})})})]})]})})}},{attributes:{...E,backgroundColor:{type:"string"},backgroundGradientColor:{type:"string"},textColor:{type:"string"},linkLabel:{...E.linkLabel,default:""},linkURL:{...E.linkURL,default:""},linkTarget:{...E.linkTarget,default:"_self"}},supports:{...B,color:{background:!1,gradients:!1,text:!1,link:!1}},migrate(e){const{backgroundColor:t,backgroundGradientColor:l,textColor:s}=e;let i={...e};return t&&(i={...i,backgroundColor:void 0,style:{...i?.style,color:{...i?.style?.color,background:t}}}),l&&(i={...i,backgroundGradientColor:void 0,style:{...i?.style,color:{...i?.style?.color,gradient:l}}}),s&&(i={...i,textColor:void 0,style:{...i?.style,color:{...i?.style?.color,text:s}}}),i},save({attributes:e,className:t}){const{titleTagName:l,title:i,summary:a,backgroundColor:o,backgroundGradientColor:m,textColor:c,displayLink:_,linkLabel:d,linkURL:g,linkTarget:p,displayImage:u,imageID:h,imageURL:b,imageAlt:x,imageWidth:k,imageHeight:y}=e,v=n()("c-row__col",t),f=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!d}),j={"--smb-panel--background-color":o,"--smb-panel--background-image":m,"--smb-panel--color":c};return(0,s.jsx)("div",{...r.useBlockProps.save({className:v}),children:(0,s.jsxs)("div",{className:"smb-panels__item",style:j,children:[u&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:b,alt:x,width:!!k&&k,height:!!y&&y,className:`wp-image-${h}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==l&&(0,s.jsx)(r.RichText.Content,{tagName:l,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:a})}),(!!g||_)&&(0,s.jsx)("div",{className:f,children:g?(0,s.jsx)("a",{href:g,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:_&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:d})})}):(0,s.jsx)(s.Fragment,{children:_&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:d})})})})]})]})})}},{attributes:{...E,linkLabel:{...E.linkLabel,default:""},linkURL:{...E.linkURL,default:""},linkTarget:{...E.linkTarget,default:"_self"}},supports:{...B,color:{background:!1,gradients:!1,text:!1,link:!1}},migrate(e){const{linkLabel:t,linkURL:l,imageURL:s}=e;return r.RichText.isEmpty(t)&&!l||(e.displayLink=!0),s&&(e.displayImage=!0),e},save({attributes:e,className:t}){const{titleTagName:l,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imageID:_,imageURL:d,imageAlt:g,imageWidth:p,imageHeight:u}=e,h=n()("c-row__col",t),b=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!o}),x=!r.RichText.isEmpty(o)&&(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:o})});return(0,s.jsx)("div",{...r.useBlockProps.save({className:h}),children:(0,s.jsxs)("div",{className:"smb-panels__item",children:[!!d&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:d,alt:g,width:!!p&&p,height:!!u&&u,className:`wp-image-${_}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==l&&(0,s.jsx)(r.RichText.Content,{tagName:l,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:a})}),(!r.RichText.isEmpty(o)||!!m)&&(0,s.jsx)("div",{className:b,children:m?(0,s.jsx)("a",{href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:x}):(0,s.jsx)(s.Fragment,{children:x})})]})]})})}},{attributes:{...E,linkLabel:{...E.linkLabel,default:""},linkURL:{...E.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...E.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...B,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e,className:t}){const{titleTagName:l,title:i,summary:a,linkLabel:o,linkURL:m,linkTarget:c,imageID:_,imageURL:d,imageAlt:g}=e,p=(0,s.jsxs)(s.Fragment,{children:[!!d&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:d,alt:g,className:`wp-image-${_}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(i)&&"none"!==l&&(0,s.jsx)(r.RichText.Content,{tagName:l,className:"smb-panels__item__title",value:i}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:a})}),!r.RichText.isEmpty(o)&&(0,s.jsx)("div",{className:"smb-panels__item__action",children:(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:o})})})]})]}),u=n()("c-row__col",t);return(0,s.jsx)("div",{className:u,children:m?(0,s.jsx)("a",{className:"smb-panels__item",href:m,target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:p}):(0,s.jsx)("div",{className:"smb-panels__item",children:p})})}},{attributes:{...E,linkLabel:{...E.linkLabel,default:""},linkURL:{...E.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...E.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...B,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e}){const{titleTagName:t,title:l,summary:i,linkLabel:a,linkURL:n,linkTarget:o,imageID:m,imageURL:c}=e,_=()=>(0,s.jsxs)(s.Fragment,{children:[!!m&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:c,alt:"",className:`wp-image-${m}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(l)&&(0,s.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:l}),!r.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:i})}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__action",children:(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:a})})})]})]}),d=()=>(n?()=>(0,s.jsx)("a",{className:"smb-panels__item",href:n,target:"_self"===o?void 0:o,rel:"_self"===o?void 0:"noopener noreferrer",children:(0,s.jsx)(_,{})}):()=>(0,s.jsx)("div",{className:"smb-panels__item",children:(0,s.jsx)(_,{})})).call(this);return(0,s.jsx)("div",{className:"c-row__col",children:(0,s.jsx)(d,{})})}},{attributes:{...E,linkLabel:{...E.linkLabel,default:""},linkURL:{...E.linkURL,selector:".smb-panels__item",default:""},linkTarget:{...E.linkTarget,selector:".smb-panels__item",default:"_self"}},supports:{...B,color:{background:!1,gradients:!1,text:!1,link:!1}},save({attributes:e}){const{titleTagName:t,title:l,summary:i,linkLabel:a,linkURL:n,linkTarget:o,imageID:m,imageURL:c}=e;return(0,s.jsx)("div",{className:"c-row__col",children:(_=(0,s.jsxs)(s.Fragment,{children:[!!m&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:c,alt:"",className:`wp-image-${m}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(l)&&(0,s.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:l}),!r.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:i})}),!r.RichText.isEmpty(a)&&(0,s.jsx)("div",{className:"smb-panels__item__action",children:(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:a})})})]})]}),n?(0,s.jsx)("a",{className:"smb-panels__item",href:n,target:o,children:_}):(0,s.jsx)("div",{className:"smb-panels__item",href:n,target:o,children:_}))});var _}}],D={to:[{type:"block",blocks:["snow-monkey-blocks/panels-item-horizontal"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-horizontal",t)},{type:"block",blocks:["snow-monkey-blocks/panels-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-free",{},[(0,e.createBlock)("core/paragraph",{content:t.summary})])},{type:"block",blocks:["snow-monkey-blocks/panels-item-block-link"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/panels-item-block-link",{linkURL:t.linkURL,linkTarget:t.linkTarget},[(0,e.createBlock)("core/paragraph",{content:t.summary})])}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:i},edit:function({attributes:e,setAttributes:l,isSelected:i}){const{titleTagName:a,title:g,summary:k,displayLink:y,rel:v,linkLabel:f,linkURL:w,linkTarget:E,displayImage:B,imageID:H,imageURL:D,imageAlt:P,imageWidth:z,imageHeight:M,imageSizeSlug:V}=e,A=(0,r.__experimentalUseColorProps)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),K=(0,d.useRef)(),[$,W]=(0,d.useState)(),[Z,F]=(0,d.useState)(!1),G=!!w,O=E===S,J=!!v?.includes(U),Y=(0,d.useMemo)((()=>({url:w,title:f,opensInNewTab:O,nofollow:J})),[w,f,O,J]);function Q(){l({linkURL:void 0,linkTarget:void 0,rel:void 0}),F(!1)}const X=(0,_.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),q=(0,_.useSelect)((e=>H?e("core").getEntityRecord("postType","attachment",H):null),[H]),ee=X.filter((({slug:e})=>q?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),te=["div","h2","h3","none"],le=n()("smb-panels__item","smb-panels__item--vertical",A?.className),se=A?.style,ie=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!f&&!i}),ae=(0,r.useBlockProps)({className:"c-row__col",ref:(0,c.useMergeRefs)([W,K])}),ne=(0,c.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsx)(m.__experimentalToolsPanel,{label:(0,x.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:ne,children:(0,s.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,x.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>l({titleTagName:t.uK.titleTagName.default}),children:(0,s.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/panels-item-horizontal/title-tag-name",children:(0,s.jsx)("div",{className:"smb-list-icon-selector",children:(0,o.times)(te.length,(e=>(0,s.jsx)(m.Button,{variant:a===te[e]?"primary":"secondary",onClick:()=>l({titleTagName:te[e]}),children:te[e]},e)))})})})}),(0,s.jsxs)(m.__experimentalToolsPanel,{label:(0,x.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:ne,children:[(0,s.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>B!==t.uK.displayImage.default,isShownByDefault:!0,label:(0,x.__)("Display image","snow-monkey-blocks"),onDeselect:()=>l({displayImage:t.uK.displayImage.default}),children:(0,s.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Display image","snow-monkey-blocks"),checked:B,onChange:e=>l({displayImage:e})})}),0<ee.length&&(0,s.jsx)(T,{defaultValue:t.uK.imageSizeSlug.default,value:V,options:ee,onChange:e=>{const t=q?.media_details?.sizes?.[e]?.source_url,s=q?.media_details?.sizes?.[e]?.width,i=q?.media_details?.sizes?.[e]?.height;l({imageURL:t,imageWidth:s,imageHeight:i,imageSizeSlug:e})}})]}),(0,s.jsx)(m.__experimentalToolsPanel,{label:(0,x.__)("Link settings","snow-monkey-blocks"),dropdownMenuProps:ne,children:(0,s.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>y!==t.uK.displayLink.default,isShownByDefault:!0,label:(0,x.__)("Display link","snow-monkey-blocks"),onDeselect:()=>l({displayLink:t.uK.displayLink.default}),children:(0,s.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Display link","snow-monkey-blocks"),checked:y,onChange:e=>l({displayLink:e})})})})]}),(0,s.jsx)("div",{...ae,children:(0,s.jsxs)("div",{className:le,style:se,children:[B&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)(j,{src:D,id:H,alt:P,width:z,height:M,onSelect:e=>{const t=e?.sizes?.[V]?V:L,s=e?.sizes?.[t]?.url,i=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;l({imageURL:s||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:i||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==D&&l({imageURL:e,imageID:0,mediaSizeSlug:L})},onRemove:()=>l({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:R})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[(!r.RichText.isEmpty(g)||i)&&"none"!==a&&(0,s.jsx)(r.RichText,{tagName:a,className:"smb-panels__item__title",placeholder:(0,x.__)("Write title…","snow-monkey-blocks"),value:g,onChange:e=>l({title:e})}),(!r.RichText.isEmpty(k)||i)&&(0,s.jsx)(r.RichText,{className:"smb-panels__item__content",placeholder:(0,x.__)("Write content…","snow-monkey-blocks"),value:k,onChange:e=>l({summary:e})}),(G||y)&&(0,s.jsx)("div",{className:ie,children:(0,s.jsx)("span",{href:w,target:E,rel:v,children:y?(0,s.jsx)(r.RichText,{className:"smb-panels__item__link",value:f,placeholder:(0,x.__)("Link","snow-monkey-blocks"),onChange:e=>l({linkLabel:N(e)})}):(0,s.jsx)("div",{className:"smb-panels__item__link screen-reader-text",children:f||(0,x.__)("Learn more","snow-monkey-blocks")})})})]})]})}),(0,s.jsxs)(r.BlockControls,{children:[!G&&(0,s.jsx)(m.ToolbarButton,{name:"link",icon:p,title:(0,x.__)("Link"),shortcut:h.displayShortcut.primary("k"),onClick:function(e){e.preventDefault(),F(!0)}}),G&&(0,s.jsx)(m.ToolbarButton,{name:"link",icon:u,title:(0,x.__)("Unlink"),shortcut:h.displayShortcut.primaryShift("k"),onClick:Q,isActive:!0})]}),i&&(Z||G)&&(0,s.jsx)(m.Popover,{position:"bottom center",onClose:()=>{F(!1)},anchor:$,focusOnMount:!!Z&&"firstElement",children:(0,s.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:Y,onChange:({url:e="",title:t,opensInNewTab:s,nofollow:i})=>{l(function({rel:e="",url:t="",title:l,opensInNewTab:s,nofollow:i}){let a,n=e;if(s)a=S,n=n?.includes(C)?n:n+` ${C}`;else{const e=new RegExp(`\\b${C}\\s*`,"g");n=n?.replace(e,"").trim()}if(i)n=n?.includes(U)?n:(n+` ${U}`).trim();else{const e=new RegExp(`\\b${U}\\s*`,"g");n=n?.replace(e,"").trim()}return{linkURL:(0,b.prependHTTP)(t),linkLabel:l,linkTarget:a,rel:n||void 0}}({rel:v,url:e,title:t,opensInNewTab:s,nofollow:i}))},onRemove:()=>{Q()},forceIsEditingLink:Z,hasRichPreviews:!0,hasTextControl:!y,settings:I,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})]})},save:function({attributes:e}){const{titleTagName:t,title:l,summary:i,displayLink:a,rel:o,linkLabel:m,linkURL:c,linkTarget:_,displayImage:d,imageID:g,imageURL:p,imageAlt:u,imageWidth:h,imageHeight:b}=e,k=!!c,y=(0,r.__experimentalGetColorClassesAndStyles)({style:{color:{...e?.style?.color}},backgroundColor:e?.backgroundColor||void 0,textColor:e?.textColor||void 0,gradient:e?.gradient||void 0}),v=n()("smb-panels__item","smb-panels__item--vertical",y?.className),f=y?.style,j=n()("smb-panels__item__action",{"smb-panels__item__action--nolabel":!a});return(0,s.jsx)("div",{...r.useBlockProps.save({className:"c-row__col"}),children:(0,s.jsxs)("div",{className:v,style:f,children:[d&&(0,s.jsx)("div",{className:"smb-panels__item__figure",children:(0,s.jsx)("img",{src:p,alt:u,width:!!h&&h,height:!!b&&b,className:`wp-image-${g}`})}),(0,s.jsxs)("div",{className:"smb-panels__item__body",children:[!r.RichText.isEmpty(l)&&"none"!==t&&(0,s.jsx)(r.RichText.Content,{tagName:t,className:"smb-panels__item__title",value:l}),!r.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-panels__item__content",children:(0,s.jsx)(r.RichText.Content,{value:i})}),(k||a)&&(0,s.jsx)("div",{className:j,children:(0,s.jsx)("a",{href:c,target:_,rel:o,children:a?(0,s.jsx)("div",{className:"smb-panels__item__link",children:(0,s.jsx)(r.RichText.Content,{value:m})}):(0,s.jsx)("div",{className:"smb-panels__item__link screen-reader-text",children:m||(0,x.__)("Learn more","snow-monkey-blocks")})})})]})]})})},deprecated:H,transforms:D})})()})(); -
snow-monkey-blocks/trunk/dist/blocks/pattern-inserter/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => ' aab736a5294b10751f26');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '8ba20943cfbac616fb72'); -
snow-monkey-blocks/trunk/dist/blocks/pattern-inserter/index.js
r3390754 r3400189 1 (()=>{var e={731:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},o=Object.keys(t).join("|"),n=new RegExp(o,"g"),r=new RegExp(o,"");function s(e){return t[e]}var i=function(e){return e.replace(n,s)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window. ReactJSXRuntime,n=window.wp.primitives;var r=(0,t.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)(n.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})});const s=JSON.parse('{"UU":"snow-monkey-blocks/pattern-inserter"}'),i=window.wp.blockEditor,a=window.wp.components,l=window.wp.data,c=window.wp.element,u=window.wp.i18n,d=window.lodash,p=window.wp.notices,g=(t,o)=>{const{patternCategories:n,patterns:r}=(0,l.useSelect)((e=>{const{__experimentalGetAllowedPatterns:t,getSettings:n}=e(i.store);return{patterns:t(o),patternCategories:n().__experimentalBlockPatternCategories}}),[o]),{createSuccessNotice:s}=(0,l.useDispatch)(p.store);return[r,n,(0,c.useCallback)(((o,n)=>{t((0,d.map)(n,(t=>(0,e.cloneBlock)(t))),o.name),s((0,u.sprintf)(/* translators: %s: block pattern title. */ /* translators: %s: block pattern title. */2 (0,u.__)('Block pattern "%s" inserted.'),o.title),{type:"snackbar"})}),[])]};function h({selectedCategory:e,patternCategories: o,onClickCategory:n}){const r="block-editor-block-patterns-explorer__sidebar";return(0,t.jsx)("div",{className:`${r}__categories-list`,children:o.map((({name:o,label:s})=>(0,t.jsx)(a.Button,{label:s,className:`${r}__categories-list__item`,isPressed:e===o,onClick:()=>{n(o)},children:s},o)))})}function f({filterValue:e,setFilterValue:o}){return(0,t.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,t.jsx)(a.SearchControl,{__nextHasNoMarginBottom:!0,onChange:o,value:e,label:(0,u.__)("Search for patterns"),placeholder:(0,u.__)("Search")})})}const x=function({selectedCategory:e,patternCategories:o,onClickCategory:n,filterValue:r,setFilterValue:s}){return(0,t.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,t.jsx)(f,{filterValue:r,setFilterValue:s}),!r&&(0,t.jsx)(h,{selectedCategory:e,patternCategories:o,onClickCategory:n})]})},m=window.wp.compose,k=window.wp.a11y;var w=(0,c.forwardRef)((({icon:e,size:t=24,...o},n)=>(0,c.cloneElement)(e,{width:t,height:t,...o,ref:n}))),C=(0,t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(n.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});const v=function(){return(0,t.jsxs)("div",{className:"block-editor-inserter__no-results",children:[(0,t.jsx)(w,{className:"block-editor-inserter__no-results-icon",icon:C}),(0,t.jsx)("p",{children:(0,u.__)("No results found.")})]})},_=(0,c.createContext)();(0,c.forwardRef)((function(e,o){const[n,r]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{n&&(0,k.speak)((0,u.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,t.jsx)("div",{ref:o,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)},...e})})),(0,c.forwardRef)((function(e,o){const n=(0,c.useContext)(_);return(0,t.jsx)(a.__unstableCompositeGroup,{state:n,role:"presentation",ref:o,...e})})),(0,c.forwardRef)((function({isFirst:e,as:o,children:n,...r},s){const i=(0,c.useContext)(_);return(0,t.jsx)(a.__unstableCompositeItem,{ref:s,state:i,role:"option",focusable:!0,...r,children:r=>{const s={...r,tabIndex:e?0:r.tabIndex};return o?(0,t.jsx)(o,{...s,children:n}):"function"==typeof n?n(s):(0,t.jsx)(a.Button,{...s,children:n})}})}));const b=function({children:e}){const o=(0,a.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,t.jsx)(_.Provider,{value:o,children:e})};var j=o(731),y=o.n(j);function A(e){return e.toLowerCase()}var I=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],E=/[^A-Z0-9]+/gi;function O(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce((function(e,t){return e.replace(t,o)}),e)}const U=e=>e.name||"",B=e=>e.title,S=e=>e.description||"",P=e=>e.keywords||[],R=e=>e.category,V=()=>null;function N(e=""){return function(e,t){void 0===t&&(t={});for(var o=t.splitRegexp,n=void 0===o?I:o,r=t.stripRegexp,s=void 0===r?E:r,i=t.transform,a=void 0===i?A:i,l=t.delimiter,c=void 0===l?" ":l,u=O(O(e,n,"$1\0$2"),s,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(c)}(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function L(e=""){return(e=(e=y()(e)).replace(/^\//,"")).toLowerCase()}const z=(e="")=>N(L(e));function M(e,t,o={}){const{getName:n=U,getTitle:r=B,getDescription:s=S,getKeywords:i=P,getCategory:a=R,getCollection:l=V}=o,c=n(e),u=r(e),d=s(e),p=i(e),g=a(e),h=l(e),f=L(t),x=L(u);let m=0;if(f===x)m+=30;else if(x.startsWith(f))m+=20;else{const e=[c,u,d,...p,g,h].join(" ");0===(k=N(f),w=e,k.filter((e=>!z(w).some((t=>t.includes(e)))))).length&&(m+=10)}var k,w;return 0!==m&&c.startsWith("core/")&&(m+=c!==e.id?1:2),m}function H({filterValue:e,filteredBlockPatternsLength:o}){return e?(0,t.jsx)(a.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,u.sprintf)(/* translators: %1$d: number of patterns. %2$s: block pattern search query */ /* translators: %1$d: number of patterns. %2$s: block pattern search query */3 (0,u._n)('%1$d pattern found for "%1$d"','%1$d patterns found for "%2$s"', o),o,e)}):null}const F=function({filterValue:e,selectedCategory:o,patternCategories:n}){const r=(0,m.useDebounce)(k.speak,500),[s,a]=function({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:n,onSelect:r,shouldFocusBlock:s=!0}){const{getSelectedBlock:a}=(0,l.useSelect)(i.store),{destinationRootClientId:d,destinationIndex:p}=(0,l.useSelect)((r=>{const{getSelectedBlockClientId:s,getBlockRootClientId:a,getBlockIndex:l,getBlockOrder:c}=r(i.store),u=s();let d,p=e;return void 0!==t?d=t:o?d=l(o):!n&&u?(p=a(u),d=l(u)+1):d=c(p).length,{destinationRootClientId:p,destinationIndex:d}}),[e,t,o,n]),{replaceBlocks:g,insertBlocks:h,showInsertionPoint:f,hideInsertionPoint:x}=(0,l.useDispatch)(i.store),m=(0,c.useCallback)(((e,t,o=!1)=>{const n=a();g(n.clientId,e,null,s||o?0:null,t);const i=Array.isArray(e)?e.length:1,l=(0,u.sprintf)(1 (()=>{var e={731:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},o=Object.keys(t).join("|"),n=new RegExp(o,"g"),r=new RegExp(o,"");function s(e){return t[e]}var i=function(e){return e.replace(n,s)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.wp.primitives,n=window.ReactJSXRuntime;var r=(0,n.jsx)(t.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(t.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})});const s=JSON.parse('{"UU":"snow-monkey-blocks/pattern-inserter"}'),i=window.wp.blockEditor,a=window.wp.components,l=window.wp.data,c=window.wp.element,u=window.wp.i18n,d=window.lodash,p=window.wp.notices,g=(t,o)=>{const{patternCategories:n,patterns:r}=(0,l.useSelect)((e=>{const{__experimentalGetAllowedPatterns:t,getSettings:n}=e(i.store);return{patterns:t(o),patternCategories:n().__experimentalBlockPatternCategories}}),[o]),{createSuccessNotice:s}=(0,l.useDispatch)(p.store);return[r,n,(0,c.useCallback)(((o,n)=>{t((0,d.map)(n,(t=>(0,e.cloneBlock)(t))),o.name),s((0,u.sprintf)(/* translators: %s: block pattern title. */ /* translators: %s: block pattern title. */ 2 (0,u.__)('Block pattern "%s" inserted.'),o.title),{type:"snackbar"})}),[])]};function h({selectedCategory:e,patternCategories:t,onClickCategory:o}){const r="block-editor-block-patterns-explorer__sidebar";return(0,n.jsx)("div",{className:`${r}__categories-list`,children:t.map((({name:t,label:s})=>(0,n.jsx)(a.Button,{label:s,className:`${r}__categories-list__item`,isPressed:e===t,onClick:()=>{o(t)},children:s},t)))})}function f({filterValue:e,setFilterValue:t}){return(0,n.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,n.jsx)(a.SearchControl,{__nextHasNoMarginBottom:!0,onChange:t,value:e,label:(0,u.__)("Search for patterns"),placeholder:(0,u.__)("Search")})})}const x=function({selectedCategory:e,patternCategories:t,onClickCategory:o,filterValue:r,setFilterValue:s}){return(0,n.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,n.jsx)(f,{filterValue:r,setFilterValue:s}),!r&&(0,n.jsx)(h,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})},m=window.wp.compose,k=window.wp.a11y;var w=(0,c.forwardRef)((({icon:e,size:t=24,...o},n)=>(0,c.cloneElement)(e,{width:t,height:t,...o,ref:n}))),C=(0,n.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(t.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});const v=function(){return(0,n.jsxs)("div",{className:"block-editor-inserter__no-results",children:[(0,n.jsx)(w,{className:"block-editor-inserter__no-results-icon",icon:C}),(0,n.jsx)("p",{children:(0,u.__)("No results found.")})]})},_=(0,c.createContext)();(0,c.forwardRef)((function(e,t){const[o,r]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{o&&(0,k.speak)((0,u.__)("Use left and right arrow keys to move through blocks"))}),[o]),(0,n.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)},...e})})),(0,c.forwardRef)((function(e,t){const o=(0,c.useContext)(_);return(0,n.jsx)(a.__unstableCompositeGroup,{state:o,role:"presentation",ref:t,...e})})),(0,c.forwardRef)((function({isFirst:e,as:t,children:o,...r},s){const i=(0,c.useContext)(_);return(0,n.jsx)(a.__unstableCompositeItem,{ref:s,state:i,role:"option",focusable:!0,...r,children:r=>{const s={...r,tabIndex:e?0:r.tabIndex};return t?(0,n.jsx)(t,{...s,children:o}):"function"==typeof o?o(s):(0,n.jsx)(a.Button,{...s,children:o})}})}));const b=function({children:e}){const t=(0,a.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,n.jsx)(_.Provider,{value:t,children:e})};var j=o(731),y=o.n(j);function A(e){return e.toLowerCase()}var I=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],E=/[^A-Z0-9]+/gi;function O(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce((function(e,t){return e.replace(t,o)}),e)}const U=e=>e.name||"",B=e=>e.title,S=e=>e.description||"",P=e=>e.keywords||[],R=e=>e.category,V=()=>null;function N(e=""){return function(e,t){void 0===t&&(t={});for(var o=t.splitRegexp,n=void 0===o?I:o,r=t.stripRegexp,s=void 0===r?E:r,i=t.transform,a=void 0===i?A:i,l=t.delimiter,c=void 0===l?" ":l,u=O(O(e,n,"$1\0$2"),s,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(c)}(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function L(e=""){return(e=(e=y()(e)).replace(/^\//,"")).toLowerCase()}const z=(e="")=>N(L(e));function M(e,t,o={}){const{getName:n=U,getTitle:r=B,getDescription:s=S,getKeywords:i=P,getCategory:a=R,getCollection:l=V}=o,c=n(e),u=r(e),d=s(e),p=i(e),g=a(e),h=l(e),f=L(t),x=L(u);let m=0;if(f===x)m+=30;else if(x.startsWith(f))m+=20;else{const e=[c,u,d,...p,g,h].join(" ");0===(k=N(f),w=e,k.filter((e=>!z(w).some((t=>t.includes(e)))))).length&&(m+=10)}var k,w;return 0!==m&&c.startsWith("core/")&&(m+=c!==e.id?1:2),m}function H({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,n.jsx)(a.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,u.sprintf)(/* translators: %1$d: number of patterns. %2$s: block pattern search query */ /* translators: %1$d: number of patterns. %2$s: block pattern search query */ 3 (0,u._n)('%1$d pattern found for "%1$d"','%1$d patterns found for "%2$s"',t),t,e)}):null}const F=function({filterValue:e,selectedCategory:t,patternCategories:o}){const r=(0,m.useDebounce)(k.speak,500),[s,a]=function({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:n,onSelect:r,shouldFocusBlock:s=!0}){const{getSelectedBlock:a}=(0,l.useSelect)(i.store),{destinationRootClientId:d,destinationIndex:p}=(0,l.useSelect)((r=>{const{getSelectedBlockClientId:s,getBlockRootClientId:a,getBlockIndex:l,getBlockOrder:c}=r(i.store),u=s();let d,p=e;return void 0!==t?d=t:o?d=l(o):!n&&u?(p=a(u),d=l(u)+1):d=c(p).length,{destinationRootClientId:p,destinationIndex:d}}),[e,t,o,n]),{replaceBlocks:g,insertBlocks:h,showInsertionPoint:f,hideInsertionPoint:x}=(0,l.useDispatch)(i.store),m=(0,c.useCallback)(((e,t,o=!1)=>{const n=a();g(n.clientId,e,null,s||o?0:null,t);const i=Array.isArray(e)?e.length:1,l=(0,u.sprintf)( 4 4 // translators: %d: the name of the block that has been added 5 5 // translators: %d: the name of the block that has been added 6 (0,u._n)("%d block added.","%d blocks added.",i),i);(0,k.speak)(l),r&&r(e)}),[n,a,g,h,d,p,r,s]),w=(0,c.useCallback)((e=>{e?f(d,p):x()}),[f,x,d,p]);return[d,m,w]}({shouldFocusBlock:!0}),[d,,p]=g(a,s),h=(0,c.useMemo)((()=> n.map((e=>e.name))),[n]),f=(0,c.useMemo)((()=>e?((e=[],t="",o={})=>{if(0===z(t).length)return e;const n=e.map((e=>[e,M(e,t,o)])).filter((([,e])=>e>0));return n.sort((([,e],[,t])=>t-e)),n.map((([e])=>e))})(d,e):d.filter((e=>"uncategorized"===o?!e.categories?.length||e.categories.every((e=>!h.includes(e))):e.categories?.includes(o)))),[e,o,d]);(0,c.useEffect)((()=>{if(!e)return;const t=f.length,o=(0,u.sprintf)(/* translators: %d: number of results. */ /* translators: %d: number of results. */7 (0,u._n)("%d result found.","%d results found.",t),t);r(o)}),[e,r]);const x=(0,m.useAsyncList)(f,{step:2}),w=!!f?.length;return(0, t.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",children:[w&&(0,t.jsx)(H,{filterValue:e,filteredBlockPatternsLength:f.length}),(0,t.jsxs)(b,{children:[!w&&(0,t.jsx)(v,{}),w&&(0,t.jsx)(i.__experimentalBlockPatternsList,{shownPatterns:x,blockPatterns:f,onClickPattern:p,isDraggable:!1})]})]})};function T({initialCategory:e,patternCategories:o}){const[n,r]=(0,c.useState)(""),[s,i]=(0,c.useState)(e?.name);return(0,t.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,t.jsx)(x,{selectedCategory:s,patternCategories:o,onClickCategory:i,filterValue:n,setFilterValue:r}),(0,t.jsx)(F,{filterValue:n,selectedCategory:s,patternCategories:o})]})}const D=function({onModalClose:e,...o}){return(0,t.jsx)(a.Modal,{title:(0,u.__)("Patterns"),closeLabel:(0,u.__)("Close"),onRequestClose:e,isFullScreen:!0,children:(0,t.jsx)(T,{...o})})};(0,e.registerBlockType)(s.UU,{icon:{foreground:"#cd162c",src:r},edit:function({clientId:e}){const[o,n]=(0,c.useState)(!1),{removeBlocks:s}=(0,l.useDispatch)("core/block-editor"),d=function(e){const[t,o]=g(void 0,null),n=(0,c.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>o.some((t=>t.name===e))))),[o]);return(0,c.useMemo)((()=>{const e=o.filter((e=>t.some((t=>t.categories?.includes(e.name))))).sort((({name:e},{name:t})=>[e,t].some((e=>["featured","text"].includes(e)))?"featured"===e||"text"===t?-1:1:0));return t.some((e=>!n(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,u._x)("Uncategorized")}),e}),[t,o])}(),p=0<d.length?d.slice(0,1)[0]:{};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{...(0,i.useBlockProps)(),children:(0,t.jsxs)(a.Placeholder,{icon:r,label:(0,u.__)("Insert Pattern (Beta)","snow-monkey-blocks"),children:[(0,t.jsx)("p",{children:(0,u.__)("Click on the button below to see all available patterns. Click on any pattern you wish to insert, and that pattern will be inserted into the article.","snow-monkey-blocks")}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>n(!0),variant:"secondary",children:(0,u.__)("Explore all patterns")}),(0,t.jsx)(a.Button,{variant:"tertiary",onClick:()=>s(e,!1),children:(0,u.__)("Remove this placeholder","snow-monkey-blocks")})]})]})}),o&&(0,t.jsx)(D,{initialCategory:p,patternCategories:d,onModalClose:()=>n(!1)})]})},save:function(){return null}})})()})();6 (0,u._n)("%d block added.","%d blocks added.",i),i);(0,k.speak)(l),r&&r(e)}),[n,a,g,h,d,p,r,s]),w=(0,c.useCallback)((e=>{e?f(d,p):x()}),[f,x,d,p]);return[d,m,w]}({shouldFocusBlock:!0}),[d,,p]=g(a,s),h=(0,c.useMemo)((()=>o.map((e=>e.name))),[o]),f=(0,c.useMemo)((()=>e?((e=[],t="",o={})=>{if(0===z(t).length)return e;const n=e.map((e=>[e,M(e,t,o)])).filter((([,e])=>e>0));return n.sort((([,e],[,t])=>t-e)),n.map((([e])=>e))})(d,e):d.filter((e=>"uncategorized"===t?!e.categories?.length||e.categories.every((e=>!h.includes(e))):e.categories?.includes(t)))),[e,t,d]);(0,c.useEffect)((()=>{if(!e)return;const t=f.length,o=(0,u.sprintf)(/* translators: %d: number of results. */ /* translators: %d: number of results. */ 7 (0,u._n)("%d result found.","%d results found.",t),t);r(o)}),[e,r]);const x=(0,m.useAsyncList)(f,{step:2}),w=!!f?.length;return(0,n.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",children:[w&&(0,n.jsx)(H,{filterValue:e,filteredBlockPatternsLength:f.length}),(0,n.jsxs)(b,{children:[!w&&(0,n.jsx)(v,{}),w&&(0,n.jsx)(i.__experimentalBlockPatternsList,{shownPatterns:x,blockPatterns:f,onClickPattern:p,isDraggable:!1})]})]})};function T({initialCategory:e,patternCategories:t}){const[o,r]=(0,c.useState)(""),[s,i]=(0,c.useState)(e?.name);return(0,n.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,n.jsx)(x,{selectedCategory:s,patternCategories:t,onClickCategory:i,filterValue:o,setFilterValue:r}),(0,n.jsx)(F,{filterValue:o,selectedCategory:s,patternCategories:t})]})}const D=function({onModalClose:e,...t}){return(0,n.jsx)(a.Modal,{title:(0,u.__)("Patterns"),closeLabel:(0,u.__)("Close"),onRequestClose:e,isFullScreen:!0,children:(0,n.jsx)(T,{...t})})};(0,e.registerBlockType)(s.UU,{icon:{foreground:"#cd162c",src:r},edit:function({clientId:e}){const[t,o]=(0,c.useState)(!1),{removeBlocks:s}=(0,l.useDispatch)("core/block-editor"),d=function(e){const[t,o]=g(void 0,null),n=(0,c.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>o.some((t=>t.name===e))))),[o]);return(0,c.useMemo)((()=>{const e=o.filter((e=>t.some((t=>t.categories?.includes(e.name))))).sort((({name:e},{name:t})=>[e,t].some((e=>["featured","text"].includes(e)))?"featured"===e||"text"===t?-1:1:0));return t.some((e=>!n(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,u._x)("Uncategorized")}),e}),[t,o])}(),p=0<d.length?d.slice(0,1)[0]:{};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{...(0,i.useBlockProps)(),children:(0,n.jsxs)(a.Placeholder,{icon:r,label:(0,u.__)("Insert Pattern (Beta)","snow-monkey-blocks"),children:[(0,n.jsx)("p",{children:(0,u.__)("Click on the button below to see all available patterns. Click on any pattern you wish to insert, and that pattern will be inserted into the article.","snow-monkey-blocks")}),(0,n.jsxs)("div",{children:[(0,n.jsx)(a.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>o(!0),variant:"secondary",children:(0,u.__)("Explore all patterns")}),(0,n.jsx)(a.Button,{variant:"tertiary",onClick:()=>s(e,!1),children:(0,u.__)("Remove this placeholder","snow-monkey-blocks")})]})]})}),t&&(0,n.jsx)(D,{initialCategory:p,patternCategories:d,onModalClose:()=>o(!1)})]})},save:function(){return null}})})()})(); -
snow-monkey-blocks/trunk/dist/blocks/pricing-table/item/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => ' 498071c6fb2e963c5143');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => '93cf6c238975614e0e7e'); -
snow-monkey-blocks/trunk/dist/blocks/pricing-table/item/index.js
r3390754 r3400189 1 (()=>{var e={6942:(e,t)=>{var i;!function(){"use strict";var s={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=a(e,n(i)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var i in e)s.call(e,i)&&e[i]&&(t=a(t,i));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(i=function(){return l}.apply(t,[]))||(e.exports=i)}()}},t={};function i(s){var l=t[s];if(void 0!==l)return l.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.wp.hooks,s=JSON.parse('{"UU":"snow-monkey-blocks/pricing-table-item","uK":{"title":{"type":"string","source":"html","selector":".smb-pricing-table__item__title","default":""},"price":{"type":"string","source":"html","selector":".smb-pricing-table__item__price","default":""},"lede":{"type":"string","source":"html","selector":".smb-pricing-table__item__lede","default":""},"displayImage":{"type":"boolean","default":false},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"displayBtn":{"type":"boolean","default":false},"btnLabel":{"type":"string","source":"html","selector":".smb-pricing-table__item__btn > .smb-btn__label","default":""},"btnURL":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__btn","attribute":"href","default":""},"btnTarget":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__btn","attribute":"target","default":"_self"},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"color":{"background":true,"text":true,"link":true}}}'),l=window.ReactJSXRuntime,n=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M12,3a9,9,0,1,0,9,9A9,9,0,0,0,12,3Zm0,17a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"}),(0,l.jsx)("path",{d:"M12.33,11.34c-.76-.29-1.42-.54-1.42-1s.45-.85,1.17-.85a2.31,2.31,0,0,1,1.63.63l.06.06.61-.69-.06,0a2.82,2.82,0,0,0-1.79-.89V7h-.86V8.52A1.89,1.89,0,0,0,9.8,10.33c0,1.14,1.12,1.58,2.1,2,.79.31,1.54.61,1.54,1.2s-.49.9-1.29.9a3.45,3.45,0,0,1-2.08-.76L10,13.57l-.54.81.06,0a4.17,4.17,0,0,0,2.16.9V17h.86V15.32c1.23-.16,2-.9,2-1.9C14.55,12.18,13.37,11.73,12.33,11.34Z"})]});var a=i(6942),r=i.n(a);const o=window.wp.blockEditor,c=window.wp.components,m=window.wp.element,d=window.wp.data,b=window.wp.i18n,u=window.wp.primitives;var _=(0,l.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(u.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const g=window.lodash,p=window.wp.compose,h=({id:e,src:t,allowedTypes:i,accept:s,onSelect:n,onSelectURL:a,onRemove:r})=>(0,l.jsxs)(o.BlockControls,{group:"inline",children:[(0,l.jsx)(o.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:i,accept:s,onSelect:n,onSelectURL:a}),!!t&&!!r&&(0,l.jsx)(c.ToolbarButton,{onClick:r,children:(0,b.__)("Release","snow-monkey-blocks")})]}),x=({src:e,alt:t,id:i,style:s,width:n,height:a})=>(0,l.jsx)("img",{src:e,alt:t,className:`wp-image-${i}`,style:s,width:n,height:a}),v=({src:e,style:t,width:i,height:s})=>(0,l.jsx)("video",{src:e,style:t,width:i,height:s}),y=(0,m.memo)((({id:e,src:t,alt:i,url:s,width:n,height:a,target:r,allowedTypes:o,accept:c,onSelect:m,onSelectURL:d,onRemove:b,mediaType:u,style:_,rel:p,linkClass:y})=>{let j;if("image"===u){let o;j=(0,l.jsx)(x,{src:t,alt:i,id:e,style:_,width:n,height:a}),o=p?(0,g.isEmpty)(p)?void 0:p:"_self"!==r&&r?"noopener noreferrer":void 0,s&&(j=(0,l.jsx)("span",{href:s,target:"_self"===r?void 0:r,rel:o,className:y,children:j}))}else"video"===u&&(j=(0,l.jsx)(v,{src:t,style:_,width:n,height:a}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h,{id:e,src:t,allowedTypes:o,accept:c,onSelect:m,onSelectURL:d,onRemove:b}),j]})}),((e,t)=>{const i=Object.keys(e);for(const s of i)if(e[s]!==t[s])return!1;return!0}));function j(e){const{src:t,onSelect:i,onSelectURL:s,mediaType:n,allowedTypes:a=["image"]}=e,r=!n&&t?"image":n;let c=(0,b.__)("Media","snow-monkey-blocks");1===a.length&&("image"===a[0]?c=(0,b.__)("Image","snow-monkey-blocks"):"video"===a[0]&&(c=(0,b.__)("Video","snow-monkey-blocks")));const d=(0,m.useMemo)((()=>a.map((e=>`${e}/*`)).join(",")),[a]);return t?(0,l.jsx)(y,{...e,accept:d,allowedTypes:a,mediaType:r}):(0,l.jsx)(o.MediaPlaceholder,{icon:"format-image",labels:{title:c},onSelect:i,onSelectURL:s,accept:d,allowedTypes:a})}const f=[{label:(0,b._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,b._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,b._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,b._x)("Full Size","Image size option for resolution control"),value:"full"}];function w({panelId:e,value:t,onChange:i,options:s=f,defaultValue:n=f[0].value,isShownByDefault:a=!0,withToolsPanelItem:r=!0}){const o=null!=t?t:n,m=()=>(0,l.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Resolution"),value:o,options:s,onChange:i,help:(0,b.__)("Select the size of the source image."),size:"__unstable-large"});return r?(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>o!==n,label:(0,b.__)("Resolution"),onDeselect:()=>i(n),isShownByDefault:a,panelId:e,children:(0,l.jsx)(m,{})}):(0,l.jsx)(m,{})}const R=["image"],k="full",T=["core/list-item"],C=[["core/list-item",{placeholder:(0,b.__)("Write a description…","snow-monkey-blocks")}]],B=s.uK,N=s.xY,L=[{attributes:{...B,btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...N},migrate(t){const{btnLabel:i,btnURL:s,imageURL:l,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!s||(t.displayBtn=!0),l&&(t.displayImage=!0),t.btnBorderRadius=String(a).match(/^\d+$/)?`${a}px`:a;const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e,className:t}){const{title:i,price:s,lede:n,list:a,imageID:c,imageURL:m,imageAlt:d,imageWidth:b,imageHeight:u,btnLabel:_,btnURL:g,btnTarget:p,btnBackgroundColor:h,btnBackgroundGradientColor:x,btnTextColor:v,btnSize:y,btnBorderRadius:j,btnWrap:f}=e,w=r()("c-row__col",t),R=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),k={"--smb-btn--background-color":h||void 0,"--smb-btn--background-image":x||void 0,"--smb-btn--border-radius":String(j).match(/^\d+$/)?`${j}px`:j,"--smb-btn--color":v||void 0};return(0,l.jsx)("div",{...o.useBlockProps.save({className:w}),children:(0,l.jsxs)("div",{className:"smb-pricing-table__item",children:[!!m&&(0,l.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,l.jsx)("img",{src:m,alt:d,width:!!b&&b,height:!!u&&u,className:`wp-image-${c}`})}),(0,l.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,l.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,l.jsx)(o.RichText.Content,{value:s})}),!o.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,l.jsx)(o.RichText.Content,{value:n})}),(0,l.jsx)("ul",{children:(0,l.jsx)(o.RichText.Content,{value:a})}),!o.RichText.isEmpty(_)&&!!g&&(0,l.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,l.jsx)("a",{className:R,href:g,style:k,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(o.RichText.Content,{value:_})})})})]})})}},{attributes:{...B,btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...N},migrate(t){const{btnLabel:i,btnURL:s,imageURL:l,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!s||(t.displayBtn=!0),l&&(t.displayImage=!0),t.btnBorderRadius=String(a).match(/^\d+$/)?`${a}px`:a;const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e,className:t}){const{title:i,price:s,lede:n,list:a,imageID:c,imageURL:m,imageAlt:d,imageWidth:b,imageHeight:u,btnLabel:_,btnURL:g,btnTarget:p,btnBackgroundColor:h,btnBackgroundGradientColor:x,btnTextColor:v,btnSize:y,btnBorderRadius:j,btnWrap:f}=e,w=r()("c-row__col",t),R=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),k={"--smb-btn--background-color":h||void 0,"--smb-btn--background-image":x||void 0,"--smb-btn--border-radius":void 0!==j?`${j}px`:void 0,"--smb-btn--color":v||void 0};return(0,l.jsx)("div",{...o.useBlockProps.save({className:w}),children:(0,l.jsxs)("div",{className:"smb-pricing-table__item",children:[!!m&&(0,l.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,l.jsx)("img",{src:m,alt:d,width:!!b&&b,height:!!u&&u,className:`wp-image-${c}`})}),(0,l.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,l.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,l.jsx)(o.RichText.Content,{value:s})}),!o.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,l.jsx)(o.RichText.Content,{value:n})}),(0,l.jsx)("ul",{children:(0,l.jsx)(o.RichText.Content,{value:a})}),!o.RichText.isEmpty(_)&&!!g&&(0,l.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,l.jsx)("a",{className:R,href:g,style:k,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(o.RichText.Content,{value:_})})})})]})})}},{attributes:{...B,btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...N},migrate(t){const{btnLabel:i,btnURL:s,imageURL:l,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!s||(t.displayBtn=!0),l&&(t.displayImage=!0),t.btnBorderRadius=String(a).match(/^\d+$/)?`${a}px`:a;const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e,className:t}){const{title:i,price:s,lede:n,list:a,imageID:c,imageURL:m,imageAlt:d,imageWidth:b,imageHeight:u,btnLabel:_,btnURL:g,btnTarget:p,btnBackgroundColor:h,btnBackgroundGradientColor:x,btnTextColor:v,btnSize:y,btnBorderRadius:j,btnWrap:f}=e,w=r()("c-row__col",t),R=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${y}`]:!!y,"smb-btn--wrap":f}),k={backgroundColor:h||void 0,backgroundImage:x||void 0,borderRadius:void 0!==j?`${j}px`:void 0},T={color:v||void 0};return(0,l.jsx)("div",{...o.useBlockProps.save({className:w}),children:(0,l.jsxs)("div",{className:"smb-pricing-table__item",children:[!!m&&(0,l.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,l.jsx)("img",{src:m,alt:d,width:!!b&&b,height:!!u&&u,className:`wp-image-${c}`})}),(0,l.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,l.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,l.jsx)(o.RichText.Content,{value:s})}),!o.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,l.jsx)(o.RichText.Content,{value:n})}),(0,l.jsx)("ul",{children:(0,l.jsx)(o.RichText.Content,{value:a})}),!o.RichText.isEmpty(_)&&!!g&&(0,l.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,l.jsx)("a",{className:R,href:g,style:k,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:T,children:(0,l.jsx)(o.RichText.Content,{value:_})})})})]})})}},{attributes:{...B,btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...N},migrate(t){const{btnLabel:i,btnURL:s,imageURL:l,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!s||(t.displayBtn=!0),l&&(t.displayImage=!0),t.btnBorderRadius=String(a).match(/^\d+$/)?`${a}px`:a;const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e}){const{title:t,price:i,lede:s,list:n,btnLabel:a,btnURL:r,btnTarget:c,btnBackgroundColor:m,btnTextColor:d,imageID:b,imageURL:u}=e;return(0,l.jsx)("div",{className:"c-row__col",children:(0,l.jsxs)("div",{className:"smb-pricing-table__item",children:[!!b&&(0,l.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,l.jsx)("img",{src:u,alt:"",className:`wp-image-${b}`})}),(0,l.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,l.jsx)(o.RichText.Content,{value:t})}),!o.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,l.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,l.jsx)(o.RichText.Content,{value:s})}),(0,l.jsx)("ul",{children:(0,l.jsx)(o.RichText.Content,{value:n})}),(!o.RichText.isEmpty(a)||!!r)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,l.jsx)("a",{className:"smb-pricing-table__item__btn smb-btn",href:r,style:{backgroundColor:m},target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:d},children:(0,l.jsx)(o.RichText.Content,{value:a})})})})]})})}},{attributes:{...B,btnTarget:{type:"string",source:"attribute",selector:".smb-pricing-table__item__btn",attribute:"target",default:"_self"},btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...N},migrate(t){const{btnLabel:i,btnURL:s,imageURL:l,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!s||(t.displayBtn=!0),l&&(t.displayImage=!0),t.btnBorderRadius=String(a).match(/^\d+$/)?`${a}px`:a;const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e}){const{title:t,price:i,lede:s,list:n,btnLabel:a,btnURL:r,btnTarget:c,btnBackgroundColor:m,btnTextColor:d,imageID:b,imageURL:u}=e;return(0,l.jsx)("div",{className:"c-row__col",children:(0,l.jsxs)("div",{className:"smb-pricing-table__item",children:[!!b&&(0,l.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,l.jsx)("img",{src:u,alt:"",className:`wp-image-${b}`})}),(0,l.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,l.jsx)(o.RichText.Content,{value:t})}),!o.RichText.isEmpty(i)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,l.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,l.jsx)(o.RichText.Content,{value:s})}),(0,l.jsx)("ul",{children:(0,l.jsx)(o.RichText.Content,{value:n})}),(!o.RichText.isEmpty(a)||!!r)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,l.jsx)("a",{className:"smb-pricing-table__item__btn smb-btn",href:r,target:c,style:{backgroundColor:m},children:(0,l.jsx)("span",{className:"smb-btn__label",style:{color:d},children:(0,l.jsx)(o.RichText.Content,{value:a})})})})]})})}}];(0,e.registerBlockType)(s.UU,{icon:{foreground:"#cd162c",src:n},edit:function({attributes:e,setAttributes:t,isSelected:i,className:n}){const{title:a,price:u,lede:g,displayImage:h,imageID:x,imageURL:v,imageAlt:y,imageWidth:f,imageHeight:B,imageSizeSlug:N,displayBtn:L,btnLabel:S,btnURL:I,btnTarget:U,btnBackgroundColor:H,btnBackgroundGradientColor:z,btnTextColor:M,btnSize:D,btnBorderRadius:E,btnWrap:$,templateLock:W}=e,[P,A]=(0,m.useState)(!1),V=!!I,K="_blank"===U,[G,O]=(0,m.useState)(null),F=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),Z=(0,d.useSelect)((e=>x?e("core").getMedia(x,{context:"view"}):null),[x]),J={...(0,o.__experimentalUseMultipleOriginColorsAndGradients)()},Y=F.filter((({slug:e})=>Z?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),X=r()("c-row__col",n),q=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${D}`]:!!D,"smb-btn--wrap":$}),Q={"--smb-btn--background-color":H||void 0,"--smb-btn--background-image":z||void 0,"--smb-btn--border-radius":String(E).match(/^\d+$/)?`${E}px`:E,"--smb-btn--color":M||void 0},ee=(0,m.useRef)(),te=(0,o.useBlockProps)({className:X}),ie=(0,o.useInnerBlocksProps)({},{allowedBlocks:T,template:C,templateLock:W}),se=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.InspectorControls,{children:[(0,l.jsxs)(c.__experimentalToolsPanel,{label:(0,b.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:se,children:[(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>h!==s.uK.displayImage.default,isShownByDefault:!0,label:(0,b.__)("Display image","snow-monkey-blocks"),onDeselect:()=>t({displayImage:s.uK.displayImage.default}),children:(0,l.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Display image","snow-monkey-blocks"),checked:h,onChange:e=>t({displayImage:e})})}),0<Y.length&&(0,l.jsx)(w,{defaultValue:s.uK.imageSizeSlug.default,value:N,options:Y,onChange:e=>{const i=Z?.media_details?.sizes?.[e]?.source_url,s=Z?.media_details?.sizes?.[e]?.width,l=Z?.media_details?.sizes?.[e]?.height;t({imageURL:i,imageWidth:s,imageHeight:l,imageSizeSlug:e})}})]}),(0,l.jsxs)(c.__experimentalToolsPanel,{label:(0,b.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:se,children:[(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>L!==s.uK.displayBtn.default,isShownByDefault:!0,label:(0,b.__)("Display button","snow-monkey-blocks"),onDeselect:()=>t({displayBtn:s.uK.displayBtn.default}),children:(0,l.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Display button","snow-monkey-blocks"),checked:L,onChange:e=>t({displayBtn:e})})}),L&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>D!==s.uK.btnSize.default,isShownByDefault:!0,label:(0,b.__)("Button size","snow-monkey-blocks"),onDeselect:()=>t({btnSize:s.uK.btnSize.default}),children:(0,l.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Button size","snow-monkey-blocks"),value:D,onChange:e=>t({btnSize:e}),options:[{value:"",label:(0,b.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,b.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,b.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,b.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,b.__)("Full size","snow-monkey-blocks")}]})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>E!==s.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,b.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>t({btnBorderRadius:s.uK.btnBorderRadius.default}),children:(0,l.jsx)("div",{className:"smb-border-radius-control",children:(0,l.jsx)(o.__experimentalBorderRadiusControl,{values:E,onChange:e=>t({btnBorderRadius:e})})})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>$!==s.uK.btnWrap.default,isShownByDefault:!0,label:(0,b.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>t({btnWrap:s.uK.btnWrap.default}),children:(0,l.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Wrap","snow-monkey-blocks"),checked:$,onChange:e=>t({btnWrap:e})})}),(0,l.jsxs)("div",{className:"smb-color-gradient-settings-dropdown",children:[(0,l.jsx)(o.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,b.__)("Background color","snow-monkey-blocks"),colorValue:H,gradientValue:z,onColorChange:e=>t({btnBackgroundColor:e}),onGradientChange:e=>t({btnBackgroundGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...J}),(0,l.jsx)(o.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,b.__)("Text color","snow-monkey-blocks"),colorValue:M,onColorChange:e=>t({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...J}),(0,l.jsx)(o.ContrastChecker,{backgroundColor:H,textColor:M})]})]})]})]}),(0,l.jsx)("div",{...te,children:(0,l.jsxs)("div",{className:"smb-pricing-table__item",children:[h&&(0,l.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,l.jsx)(j,{src:v,id:x,alt:y,width:f,height:B,onSelect:e=>{const i=e?.sizes?.[N]?N:k,s=e?.sizes?.[i]?.url,l=e?.sizes?.[i]?.width,n=e?.sizes?.[i]?.height;t({imageURL:s||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:l||e.width,imageHeight:n||e.height,imageSizeSlug:i})},onSelectURL:e=>{e!==v&&t({imageURL:e,imageID:0,mediaSizeSlug:k})},onRemove:()=>t({imageURL:s.uK.imageURL.default,imageAlt:s.uK.imageAlt.default,imageWidth:s.uK.imageWidth.default,imageHeight:s.uK.imageHeight.default,imageID:s.uK.imageID.default}),allowedTypes:R})}),(0,l.jsx)(o.RichText,{className:"smb-pricing-table__item__title",placeholder:(0,b.__)("Write title…","snow-monkey-blocks"),value:a,onChange:e=>t({title:e})}),(!o.RichText.isEmpty(u)||i)&&(0,l.jsx)(o.RichText,{className:"smb-pricing-table__item__price",placeholder:(0,b.__)("Write price…","snow-monkey-blocks"),value:u,onChange:e=>t({price:e})}),(!o.RichText.isEmpty(g)||i)&&(0,l.jsx)(o.RichText,{className:"smb-pricing-table__item__lede",placeholder:(0,b.__)("Write lede…","snow-monkey-blocks"),value:g,onChange:e=>t({lede:e})}),(0,l.jsx)("ul",{...ie}),L&&(0,l.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,l.jsx)("span",{ref:O,className:q,href:I,style:Q,target:"_self"===U?void 0:U,rel:"_self"===U?void 0:"noopener noreferrer",children:(0,l.jsx)(o.RichText,{className:"smb-btn__label",value:S,placeholder:(0,b.__)("Button","snow-monkey-blocks"),onChange:e=>t({btnLabel:e}),withoutInteractiveFormatting:!0,ref:ee})})})]})}),L&&(0,l.jsx)(o.BlockControls,{group:"block",children:(0,l.jsx)(c.ToolbarButton,{name:"link",icon:_,title:(0,b.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),A(!0)},isActive:V})}),i&&P&&(0,l.jsx)(c.Popover,{placement:"bottom",anchor:G,onClose:()=>{A(!1),ee.current?.focus()},children:(0,l.jsx)(o.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:I,opensInNewTab:K},onChange:({url:e,opensInNewTab:i})=>t({btnURL:e,btnTarget:i?"_blank":"_self"}),onRemove:()=>{t({btnURL:void 0,btnTarget:void 0}),A(!1),ee.current?.focus()},forceIsEditingLink:!V})})]})},save:function({attributes:e,className:t}){const{title:i,price:s,lede:n,displayImage:a,imageID:c,imageURL:m,imageAlt:d,imageWidth:b,imageHeight:u,displayBtn:_,btnLabel:g,btnURL:p,btnTarget:h,btnBackgroundColor:x,btnBackgroundGradientColor:v,btnTextColor:y,btnSize:j,btnBorderRadius:f,btnWrap:w}=e,R=r()("c-row__col",t),k=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${j}`]:!!j,"smb-btn--wrap":w}),T={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":v||void 0,"--smb-btn--border-radius":String(f).match(/^\d+$/)?`${f}px`:f,"--smb-btn--color":y||void 0};return(0,l.jsx)("div",{...o.useBlockProps.save({className:R}),children:(0,l.jsxs)("div",{className:"smb-pricing-table__item",children:[a&&(0,l.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,l.jsx)("img",{src:m,alt:d,width:!!b&&b,height:!!u&&u,className:`wp-image-${c}`})}),(0,l.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,l.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(s)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,l.jsx)(o.RichText.Content,{value:s})}),!o.RichText.isEmpty(n)&&(0,l.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,l.jsx)(o.RichText.Content,{value:n})}),(0,l.jsx)("ul",{...o.useInnerBlocksProps.save()}),_&&(0,l.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,l.jsx)("a",{className:k,href:p,style:T,target:"_self"===h?void 0:h,rel:"_self"===h?void 0:"noopener noreferrer",children:(0,l.jsx)("span",{className:"smb-btn__label",children:(0,l.jsx)(o.RichText.Content,{value:g})})})})]})})},deprecated:L}),(0,t.addFilter)("blocks.registerBlockType","snow-monkey-blocks/add-core-list-item-to-pricing-table",(function(e,t){if("core/list-item"!==t)return e;let i=[];return null!=e?.parent&&(i=Array.isArray(e.parent)?e.parent:[e.parent]),{...e,parent:[...i,s.UU]}}))})()})();1 (()=>{var e={6942:(e,t)=>{var i;!function(){"use strict";var l={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=a(e,n(i)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var i in e)l.call(e,i)&&e[i]&&(t=a(t,i));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(i=function(){return s}.apply(t,[]))||(e.exports=i)}()}},t={};function i(l){var s=t[l];if(void 0!==s)return s.exports;var n=t[l]={exports:{}};return e[l](n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var l in t)i.o(t,l)&&!i.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.wp.hooks,l=JSON.parse('{"UU":"snow-monkey-blocks/pricing-table-item","uK":{"title":{"type":"string","source":"html","selector":".smb-pricing-table__item__title","default":""},"price":{"type":"string","source":"html","selector":".smb-pricing-table__item__price","default":""},"lede":{"type":"string","source":"html","selector":".smb-pricing-table__item__lede","default":""},"displayImage":{"type":"boolean","default":false},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"displayBtn":{"type":"boolean","default":false},"btnLabel":{"type":"string","source":"html","selector":".smb-pricing-table__item__btn > .smb-btn__label","default":""},"btnURL":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__btn","attribute":"href","default":""},"btnTarget":{"type":"string","source":"attribute","selector":".smb-pricing-table__item__btn","attribute":"target","default":"_self"},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"color":{"background":true,"text":true,"link":true}}}'),s=window.ReactJSXRuntime,n=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{d:"M12,3a9,9,0,1,0,9,9A9,9,0,0,0,12,3Zm0,17a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"}),(0,s.jsx)("path",{d:"M12.33,11.34c-.76-.29-1.42-.54-1.42-1s.45-.85,1.17-.85a2.31,2.31,0,0,1,1.63.63l.06.06.61-.69-.06,0a2.82,2.82,0,0,0-1.79-.89V7h-.86V8.52A1.89,1.89,0,0,0,9.8,10.33c0,1.14,1.12,1.58,2.1,2,.79.31,1.54.61,1.54,1.2s-.49.9-1.29.9a3.45,3.45,0,0,1-2.08-.76L10,13.57l-.54.81.06,0a4.17,4.17,0,0,0,2.16.9V17h.86V15.32c1.23-.16,2-.9,2-1.9C14.55,12.18,13.37,11.73,12.33,11.34Z"})]});var a=i(6942),r=i.n(a);const o=window.wp.blockEditor,c=window.wp.components,m=window.wp.element,d=window.wp.data,b=window.wp.i18n,u=window.wp.primitives;var _=(0,s.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(u.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const g=window.lodash,p=window.wp.compose,h=e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const t=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft].map((e=>null==e||""===e?"":/^\d+$/.test(String(e))?`${e}px`:String(e))),i=t.filter(Boolean);if(0===i.length)return;if(4===i.length){const[e,i,l,s]=t;if(e===i&&i===l&&l===s)return e;if(e===l&&i===s)return`${e} ${i}`;if(i===s)return`${e} ${i} ${l}`}return i.join(" ")}return/^\d+$/.test(String(e))?`${e}px`:e}},x=({id:e,src:t,allowedTypes:i,accept:l,onSelect:n,onSelectURL:a,onRemove:r})=>(0,s.jsxs)(o.BlockControls,{group:"inline",children:[(0,s.jsx)(o.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:i,accept:l,onSelect:n,onSelectURL:a}),!!t&&!!r&&(0,s.jsx)(c.ToolbarButton,{onClick:r,children:(0,b.__)("Release","snow-monkey-blocks")})]}),v=({src:e,alt:t,id:i,style:l,width:n,height:a})=>(0,s.jsx)("img",{src:e,alt:t,className:`wp-image-${i}`,style:l,width:n,height:a}),y=({src:e,style:t,width:i,height:l})=>(0,s.jsx)("video",{src:e,style:t,width:i,height:l}),f=(0,m.memo)((({id:e,src:t,alt:i,url:l,width:n,height:a,target:r,allowedTypes:o,accept:c,onSelect:m,onSelectURL:d,onRemove:b,mediaType:u,style:_,rel:p,linkClass:h})=>{let f;if("image"===u){let o;f=(0,s.jsx)(v,{src:t,alt:i,id:e,style:_,width:n,height:a}),o=p?(0,g.isEmpty)(p)?void 0:p:"_self"!==r&&r?"noopener noreferrer":void 0,l&&(f=(0,s.jsx)("span",{href:l,target:"_self"===r?void 0:r,rel:o,className:h,children:f}))}else"video"===u&&(f=(0,s.jsx)(y,{src:t,style:_,width:n,height:a}));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x,{id:e,src:t,allowedTypes:o,accept:c,onSelect:m,onSelectURL:d,onRemove:b}),f]})}),((e,t)=>{const i=Object.keys(e);for(const l of i)if(e[l]!==t[l])return!1;return!0}));function j(e){const{src:t,onSelect:i,onSelectURL:l,mediaType:n,allowedTypes:a=["image"]}=e,r=!n&&t?"image":n;let c=(0,b.__)("Media","snow-monkey-blocks");1===a.length&&("image"===a[0]?c=(0,b.__)("Image","snow-monkey-blocks"):"video"===a[0]&&(c=(0,b.__)("Video","snow-monkey-blocks")));const d=(0,m.useMemo)((()=>a.map((e=>`${e}/*`)).join(",")),[a]);return t?(0,s.jsx)(f,{...e,accept:d,allowedTypes:a,mediaType:r}):(0,s.jsx)(o.MediaPlaceholder,{icon:"format-image",labels:{title:c},onSelect:i,onSelectURL:l,accept:d,allowedTypes:a})}const w=[{label:(0,b._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,b._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,b._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,b._x)("Full Size","Image size option for resolution control"),value:"full"}];function R({panelId:e,value:t,onChange:i,options:l=w,defaultValue:n=w[0].value,isShownByDefault:a=!0,withToolsPanelItem:r=!0}){const o=null!=t?t:n,m=()=>(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Resolution"),value:o,options:l,onChange:i,help:(0,b.__)("Select the size of the source image."),size:"__unstable-large"});return r?(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>o!==n,label:(0,b.__)("Resolution"),onDeselect:()=>i(n),isShownByDefault:a,panelId:e,children:(0,s.jsx)(m,{})}):(0,s.jsx)(m,{})}const k=["image"],T="full",C=["core/list-item"],B=[["core/list-item",{placeholder:(0,b.__)("Write a description…","snow-monkey-blocks")}]],N=l.uK,L=l.xY,S=[{attributes:{...N,btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...L},migrate(t){const{btnLabel:i,btnURL:l,imageURL:s,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!l||(t.displayBtn=!0),s&&(t.displayImage=!0),t.btnBorderRadius=h(a);const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e,className:t}){const{title:i,price:l,lede:n,list:a,imageID:c,imageURL:m,imageAlt:d,imageWidth:b,imageHeight:u,btnLabel:_,btnURL:g,btnTarget:p,btnBackgroundColor:x,btnBackgroundGradientColor:v,btnTextColor:y,btnSize:f,btnBorderRadius:j,btnWrap:w}=e,R=r()("c-row__col",t),k=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${f}`]:!!f,"smb-btn--wrap":w}),T={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":v||void 0,"--smb-btn--border-radius":h(j),"--smb-btn--color":y||void 0};return(0,s.jsx)("div",{...o.useBlockProps.save({className:R}),children:(0,s.jsxs)("div",{className:"smb-pricing-table__item",children:[!!m&&(0,s.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,s.jsx)("img",{src:m,alt:d,width:!!b&&b,height:!!u&&u,className:`wp-image-${c}`})}),(0,s.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,s.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(l)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,s.jsx)(o.RichText.Content,{value:l})}),!o.RichText.isEmpty(n)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,s.jsx)(o.RichText.Content,{value:n})}),(0,s.jsx)("ul",{children:(0,s.jsx)(o.RichText.Content,{value:a})}),!o.RichText.isEmpty(_)&&!!g&&(0,s.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,s.jsx)("a",{className:k,href:g,style:T,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:(0,s.jsx)("span",{className:"smb-btn__label",children:(0,s.jsx)(o.RichText.Content,{value:_})})})})]})})}},{attributes:{...N,btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...L},migrate(t){const{btnLabel:i,btnURL:l,imageURL:s,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!l||(t.displayBtn=!0),s&&(t.displayImage=!0),t.btnBorderRadius=h(a);const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e,className:t}){const{title:i,price:l,lede:n,list:a,imageID:c,imageURL:m,imageAlt:d,imageWidth:b,imageHeight:u,btnLabel:_,btnURL:g,btnTarget:p,btnBackgroundColor:x,btnBackgroundGradientColor:v,btnTextColor:y,btnSize:f,btnBorderRadius:j,btnWrap:w}=e,R=r()("c-row__col",t),k=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${f}`]:!!f,"smb-btn--wrap":w}),T={"--smb-btn--background-color":x||void 0,"--smb-btn--background-image":v||void 0,"--smb-btn--border-radius":h(j),"--smb-btn--color":y||void 0};return(0,s.jsx)("div",{...o.useBlockProps.save({className:R}),children:(0,s.jsxs)("div",{className:"smb-pricing-table__item",children:[!!m&&(0,s.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,s.jsx)("img",{src:m,alt:d,width:!!b&&b,height:!!u&&u,className:`wp-image-${c}`})}),(0,s.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,s.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(l)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,s.jsx)(o.RichText.Content,{value:l})}),!o.RichText.isEmpty(n)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,s.jsx)(o.RichText.Content,{value:n})}),(0,s.jsx)("ul",{children:(0,s.jsx)(o.RichText.Content,{value:a})}),!o.RichText.isEmpty(_)&&!!g&&(0,s.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,s.jsx)("a",{className:k,href:g,style:T,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:(0,s.jsx)("span",{className:"smb-btn__label",children:(0,s.jsx)(o.RichText.Content,{value:_})})})})]})})}},{attributes:{...N,btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...L},migrate(t){const{btnLabel:i,btnURL:l,imageURL:s,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!l||(t.displayBtn=!0),s&&(t.displayImage=!0),t.btnBorderRadius=h(a);const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e,className:t}){const{title:i,price:l,lede:n,list:a,imageID:c,imageURL:m,imageAlt:d,imageWidth:b,imageHeight:u,btnLabel:_,btnURL:g,btnTarget:p,btnBackgroundColor:x,btnBackgroundGradientColor:v,btnTextColor:y,btnSize:f,btnBorderRadius:j,btnWrap:w}=e,R=r()("c-row__col",t),k=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${f}`]:!!f,"smb-btn--wrap":w}),T={backgroundColor:x||void 0,backgroundImage:v||void 0,borderRadius:h(j)},C={color:y||void 0};return(0,s.jsx)("div",{...o.useBlockProps.save({className:R}),children:(0,s.jsxs)("div",{className:"smb-pricing-table__item",children:[!!m&&(0,s.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,s.jsx)("img",{src:m,alt:d,width:!!b&&b,height:!!u&&u,className:`wp-image-${c}`})}),(0,s.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,s.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(l)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,s.jsx)(o.RichText.Content,{value:l})}),!o.RichText.isEmpty(n)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,s.jsx)(o.RichText.Content,{value:n})}),(0,s.jsx)("ul",{children:(0,s.jsx)(o.RichText.Content,{value:a})}),!o.RichText.isEmpty(_)&&!!g&&(0,s.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,s.jsx)("a",{className:k,href:g,style:T,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:(0,s.jsx)("span",{className:"smb-btn__label",style:C,children:(0,s.jsx)(o.RichText.Content,{value:_})})})})]})})}},{attributes:{...N,btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...L},migrate(t){const{btnLabel:i,btnURL:l,imageURL:s,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!l||(t.displayBtn=!0),s&&(t.displayImage=!0),t.btnBorderRadius=h(a);const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e}){const{title:t,price:i,lede:l,list:n,btnLabel:a,btnURL:r,btnTarget:c,btnBackgroundColor:m,btnTextColor:d,imageID:b,imageURL:u}=e;return(0,s.jsx)("div",{className:"c-row__col",children:(0,s.jsxs)("div",{className:"smb-pricing-table__item",children:[!!b&&(0,s.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,s.jsx)("img",{src:u,alt:"",className:`wp-image-${b}`})}),(0,s.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,s.jsx)(o.RichText.Content,{value:t})}),!o.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,s.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(l)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,s.jsx)(o.RichText.Content,{value:l})}),(0,s.jsx)("ul",{children:(0,s.jsx)(o.RichText.Content,{value:n})}),(!o.RichText.isEmpty(a)||!!r)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,s.jsx)("a",{className:"smb-pricing-table__item__btn smb-btn",href:r,style:{backgroundColor:m},target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:(0,s.jsx)("span",{className:"smb-btn__label",style:{color:d},children:(0,s.jsx)(o.RichText.Content,{value:a})})})})]})})}},{attributes:{...N,btnTarget:{type:"string",source:"attribute",selector:".smb-pricing-table__item__btn",attribute:"target",default:"_self"},btnBorderRadius:{type:"number"},list:{type:"string",source:"html",selector:"ul",multiline:"li",default:""}},supports:{...L},migrate(t){const{btnLabel:i,btnURL:l,imageURL:s,list:n,btnBorderRadius:a}=t;o.RichText.isEmpty(i)&&!l||(t.displayBtn=!0),s&&(t.displayImage=!0),t.btnBorderRadius=h(a);const r=document.createElement("ul");r.innerHTML=n;const[c]=(0,e.rawHandler)({HTML:r.outerHTML});return[{...t},[...c.innerBlocks]]},save({attributes:e}){const{title:t,price:i,lede:l,list:n,btnLabel:a,btnURL:r,btnTarget:c,btnBackgroundColor:m,btnTextColor:d,imageID:b,imageURL:u}=e;return(0,s.jsx)("div",{className:"c-row__col",children:(0,s.jsxs)("div",{className:"smb-pricing-table__item",children:[!!b&&(0,s.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,s.jsx)("img",{src:u,alt:"",className:`wp-image-${b}`})}),(0,s.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,s.jsx)(o.RichText.Content,{value:t})}),!o.RichText.isEmpty(i)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,s.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(l)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,s.jsx)(o.RichText.Content,{value:l})}),(0,s.jsx)("ul",{children:(0,s.jsx)(o.RichText.Content,{value:n})}),(!o.RichText.isEmpty(a)||!!r)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,s.jsx)("a",{className:"smb-pricing-table__item__btn smb-btn",href:r,target:c,style:{backgroundColor:m},children:(0,s.jsx)("span",{className:"smb-btn__label",style:{color:d},children:(0,s.jsx)(o.RichText.Content,{value:a})})})})]})})}}];(0,e.registerBlockType)(l.UU,{icon:{foreground:"#cd162c",src:n},edit:function({attributes:e,setAttributes:t,isSelected:i,className:n}){const{title:a,price:u,lede:g,displayImage:x,imageID:v,imageURL:y,imageAlt:f,imageWidth:w,imageHeight:N,imageSizeSlug:L,displayBtn:S,btnLabel:I,btnURL:U,btnTarget:H,btnBackgroundColor:z,btnBackgroundGradientColor:M,btnTextColor:D,btnSize:E,btnBorderRadius:W,btnWrap:P,templateLock:A}=e,[$,V]=(0,m.useState)(!1),K=!!U,G="_blank"===H,[O,F]=(0,m.useState)(null),Z=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),J=(0,d.useSelect)((e=>v?e("core").getEntityRecord("postType","attachment",v):null),[v]),Y={...(0,o.__experimentalUseMultipleOriginColorsAndGradients)()},X=Z.filter((({slug:e})=>J?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),q=r()("c-row__col",n),Q=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${E}`]:!!E,"smb-btn--wrap":P}),ee={"--smb-btn--background-color":z||void 0,"--smb-btn--background-image":M||void 0,"--smb-btn--border-radius":h(W),"--smb-btn--color":D||void 0},te=(0,m.useRef)(),ie=(0,o.useBlockProps)({className:q}),le=(0,o.useInnerBlocksProps)({},{allowedBlocks:C,template:B,templateLock:A}),se=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.InspectorControls,{children:[(0,s.jsxs)(c.__experimentalToolsPanel,{label:(0,b.__)("Image settings","snow-monkey-blocks"),dropdownMenuProps:se,children:[(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>x!==l.uK.displayImage.default,isShownByDefault:!0,label:(0,b.__)("Display image","snow-monkey-blocks"),onDeselect:()=>t({displayImage:l.uK.displayImage.default}),children:(0,s.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Display image","snow-monkey-blocks"),checked:x,onChange:e=>t({displayImage:e})})}),0<X.length&&(0,s.jsx)(R,{defaultValue:l.uK.imageSizeSlug.default,value:L,options:X,onChange:e=>{const i=J?.media_details?.sizes?.[e]?.source_url,l=J?.media_details?.sizes?.[e]?.width,s=J?.media_details?.sizes?.[e]?.height;t({imageURL:i,imageWidth:l,imageHeight:s,imageSizeSlug:e})}})]}),(0,s.jsxs)(c.__experimentalToolsPanel,{label:(0,b.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:se,children:[(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>S!==l.uK.displayBtn.default,isShownByDefault:!0,label:(0,b.__)("Display button","snow-monkey-blocks"),onDeselect:()=>t({displayBtn:l.uK.displayBtn.default}),children:(0,s.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Display button","snow-monkey-blocks"),checked:S,onChange:e=>t({displayBtn:e})})}),S&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>E!==l.uK.btnSize.default,isShownByDefault:!0,label:(0,b.__)("Button size","snow-monkey-blocks"),onDeselect:()=>t({btnSize:l.uK.btnSize.default}),children:(0,s.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Button size","snow-monkey-blocks"),value:E,onChange:e=>t({btnSize:e}),options:[{value:"",label:(0,b.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,b.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,b.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,b.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,b.__)("Full size","snow-monkey-blocks")}]})}),(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>W!==l.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,b.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>t({btnBorderRadius:l.uK.btnBorderRadius.default}),children:(0,s.jsx)("div",{className:"smb-border-radius-control",children:(0,s.jsx)(o.__experimentalBorderRadiusControl,{values:W,onChange:e=>t({btnBorderRadius:e})})})}),(0,s.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>P!==l.uK.btnWrap.default,isShownByDefault:!0,label:(0,b.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>t({btnWrap:l.uK.btnWrap.default}),children:(0,s.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Wrap","snow-monkey-blocks"),checked:P,onChange:e=>t({btnWrap:e})})}),(0,s.jsxs)("div",{className:"smb-color-gradient-settings-dropdown",children:[(0,s.jsx)(o.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,b.__)("Background color","snow-monkey-blocks"),colorValue:z,gradientValue:M,onColorChange:e=>t({btnBackgroundColor:e}),onGradientChange:e=>t({btnBackgroundGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...Y}),(0,s.jsx)(o.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,b.__)("Text color","snow-monkey-blocks"),colorValue:D,onColorChange:e=>t({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...Y}),(0,s.jsx)(o.ContrastChecker,{backgroundColor:z,textColor:D})]})]})]})]}),(0,s.jsx)("div",{...ie,children:(0,s.jsxs)("div",{className:"smb-pricing-table__item",children:[x&&(0,s.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,s.jsx)(j,{src:y,id:v,alt:f,width:w,height:N,onSelect:e=>{const i=e?.sizes?.[L]?L:T,l=e?.sizes?.[i]?.url,s=e?.sizes?.[i]?.width,n=e?.sizes?.[i]?.height;t({imageURL:l||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:s||e.width,imageHeight:n||e.height,imageSizeSlug:i})},onSelectURL:e=>{e!==y&&t({imageURL:e,imageID:0,mediaSizeSlug:T})},onRemove:()=>t({imageURL:l.uK.imageURL.default,imageAlt:l.uK.imageAlt.default,imageWidth:l.uK.imageWidth.default,imageHeight:l.uK.imageHeight.default,imageID:l.uK.imageID.default}),allowedTypes:k})}),(0,s.jsx)(o.RichText,{className:"smb-pricing-table__item__title",placeholder:(0,b.__)("Write title…","snow-monkey-blocks"),value:a,onChange:e=>t({title:e})}),(!o.RichText.isEmpty(u)||i)&&(0,s.jsx)(o.RichText,{className:"smb-pricing-table__item__price",placeholder:(0,b.__)("Write price…","snow-monkey-blocks"),value:u,onChange:e=>t({price:e})}),(!o.RichText.isEmpty(g)||i)&&(0,s.jsx)(o.RichText,{className:"smb-pricing-table__item__lede",placeholder:(0,b.__)("Write lede…","snow-monkey-blocks"),value:g,onChange:e=>t({lede:e})}),(0,s.jsx)("ul",{...le}),S&&(0,s.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,s.jsx)("span",{ref:F,className:Q,href:U,style:ee,target:"_self"===H?void 0:H,rel:"_self"===H?void 0:"noopener noreferrer",children:(0,s.jsx)(o.RichText,{className:"smb-btn__label",value:I,placeholder:(0,b.__)("Button","snow-monkey-blocks"),onChange:e=>t({btnLabel:e}),withoutInteractiveFormatting:!0,ref:te})})})]})}),S&&(0,s.jsx)(o.BlockControls,{group:"block",children:(0,s.jsx)(c.ToolbarButton,{name:"link",icon:_,title:(0,b.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),V(!0)},isActive:K})}),i&&$&&(0,s.jsx)(c.Popover,{placement:"bottom",anchor:O,onClose:()=>{V(!1),te.current?.focus()},children:(0,s.jsx)(o.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:U,opensInNewTab:G},onChange:({url:e,opensInNewTab:i})=>t({btnURL:e,btnTarget:i?"_blank":"_self"}),onRemove:()=>{t({btnURL:void 0,btnTarget:void 0}),V(!1),te.current?.focus()},forceIsEditingLink:!K})})]})},save:function({attributes:e,className:t}){const{title:i,price:l,lede:n,displayImage:a,imageID:c,imageURL:m,imageAlt:d,imageWidth:b,imageHeight:u,displayBtn:_,btnLabel:g,btnURL:p,btnTarget:x,btnBackgroundColor:v,btnBackgroundGradientColor:y,btnTextColor:f,btnSize:j,btnBorderRadius:w,btnWrap:R}=e,k=r()("c-row__col",t),T=r()("smb-btn","smb-pricing-table__item__btn",{[`smb-btn--${j}`]:!!j,"smb-btn--wrap":R}),C={"--smb-btn--background-color":v||void 0,"--smb-btn--background-image":y||void 0,"--smb-btn--border-radius":h(w),"--smb-btn--color":f||void 0};return(0,s.jsx)("div",{...o.useBlockProps.save({className:k}),children:(0,s.jsxs)("div",{className:"smb-pricing-table__item",children:[a&&(0,s.jsx)("div",{className:"smb-pricing-table__item__figure",children:(0,s.jsx)("img",{src:m,alt:d,width:!!b&&b,height:!!u&&u,className:`wp-image-${c}`})}),(0,s.jsx)("div",{className:"smb-pricing-table__item__title",children:(0,s.jsx)(o.RichText.Content,{value:i})}),!o.RichText.isEmpty(l)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__price",children:(0,s.jsx)(o.RichText.Content,{value:l})}),!o.RichText.isEmpty(n)&&(0,s.jsx)("div",{className:"smb-pricing-table__item__lede",children:(0,s.jsx)(o.RichText.Content,{value:n})}),(0,s.jsx)("ul",{...o.useInnerBlocksProps.save()}),_&&(0,s.jsx)("div",{className:"smb-pricing-table__item__action",children:(0,s.jsx)("a",{className:T,href:p,style:C,target:"_self"===x?void 0:x,rel:"_self"===x?void 0:"noopener noreferrer",children:(0,s.jsx)("span",{className:"smb-btn__label",children:(0,s.jsx)(o.RichText.Content,{value:g})})})})]})})},deprecated:S}),(0,t.addFilter)("blocks.registerBlockType","snow-monkey-blocks/add-core-list-item-to-pricing-table",(function(e,t){if("core/list-item"!==t)return e;let i=[];return null!=e?.parent&&(i=Array.isArray(e.parent)?e.parent:[e.parent]),{...e,parent:[...i,l.UU]}}))})()})(); -
snow-monkey-blocks/trunk/dist/blocks/read-more-box/index.asset.php
r3278039 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' bd2b1e304b9d1242ea39');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'e1d57c049045272c8a6a'); -
snow-monkey-blocks/trunk/dist/blocks/read-more-box/index.js
r3278039 r3400189 1 (()=>{var e,o={8436:(e,o,t)=>{"use strict";const n=window.wp.blocks,s=window.wp.i18n, a=JSON.parse('{"UU":"snow-monkey-blocks/read-more-box","uK":{"label":{"type":"string","source":"attribute","selector":".smb-read-more-box__button","attribute":"data-label","default":""},"closeLabel":{"type":"string","source":"attribute","selector":".smb-read-more-box__button","attribute":"data-close-label","default":""},"btnJustification":{"type":"string","default":"center"},"contenHeight":{"type":"string","default":"100px"},"mask":{"type":"boolean","default":false},"maskColor":{"type":"string"},"clientId":{"type":"string","default":""},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"spacing":{"margin":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":["label","closeLabel","clientId"]}}}}'),l=window.ReactJSXRuntime,r=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M23,3H1A1,1,0,0,0,0,4V20a1,1,0,0,0,1,1H23a1,1,0,0,0,1-1V4A1,1,0,0,0,23,3Zm0,16.47a.52.52,0,0,1-.52.53h-21A.52.52,0,0,1,1,19.47V4.53A.52.52,0,0,1,1.52,4h21a.52.52,0,0,1,.52.53Z"}),(0,l.jsx)("rect",{x:"4",y:"10.5",width:"16",height:"1"}),(0,l.jsx)("rect",{x:"4",y:"13.5",width:"4",height:"1"}),(0,l.jsx)("rect",{x:"10",y:"13.5",width:"4",height:"1"}),(0,l.jsx)("rect",{x:"16",y:"13.5",width:"4",height:"1"})]});var i=t(6942),b=t.n(i);const d=window.wp.blockEditor,c=window.wp.components,m=window.wp.data,u=window.wp.element,_=(window.lodash,window.wp.compose),p=["left","center","right"],x=[{attributes:{...a.uK},supports:{...a.xY},save({attributes:e,className:o}){const{label:t,closeLabel:n,btnJustification:s,contenHeight:a,mask:r,maskColor:i,btnBackgroundColor:c,btnBackgroundGradientColor:m,btnTextColor:u,btnSize:_,btnBorderRadius:p,btnWrap:x,clientId:h}=e,k=b()("smb-read-more-box",o,{"smb-read-more-box--has-mask":r}),g=b()("smb-read-more-box__content"),f=b()("smb-read-more-box__action",{[`is-content-justification-${s}`]:s}),w={"--smb-read-more-box--content-height":a||void 0,"--smb-read-more-box--mask-color":r&&i||void 0},y=b()("smb-read-more-box__button","smb-btn",{[`smb-btn--${_}`]:!!_,"smb-btn--wrap":x}),v={"--smb-btn--background-color":c||void 0,"--smb-btn--background-image":m||void 0,"--smb-btn--border-radius":String(p).match(/^\d+$/)?`${p}px`:p||void 0,"--smb-btn--color":u||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(v["--smb-btn--style--ghost--border-color"]=c||void 0),(0,l.jsxs)("div",{...d.useBlockProps.save({className:k,style:w}),children:[(0,l.jsx)("div",{...d.useInnerBlocksProps.save({className:g,"aria-hidden":"true"}),id:h}),(0,l.jsx)("div",{className:f,children:(0,l.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,l.jsx)("button",{className:y,style:v,"aria-expanded":"false","aria-controls":h,"data-label":t,"data-close-label":n,children:(0,l.jsx)("span",{className:"smb-read-more-box__label smb-btn__label",children:t})})})})]})}}];(0,n.registerBlockType)(a.UU,{icon:{foreground:"#cd162c",src:r},styles:[{name:"default",label:(0,s.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"ghost",label:(0,s.__)("Ghost","snow-monkey-blocks")},{name:"text",label:(0,s.__)("Text","snow-monkey-blocks")}],edit:function({attributes:e,setAttributes:o,clientId:t,className:n}){const{label:r,closeLabel:i,btnJustification:x,contenHeight:h,mask:k,maskColor:g,btnBackgroundColor:f,btnBackgroundGradientColor:w,btnTextColor:y,btnSize:v,btnBorderRadius:j,btnWrap:C,templateLock:B}=e,S=(0,d.__experimentalUseMultipleOriginColorsAndGradients)();(0,u.useEffect)((()=>{o({label:r||(0,s.__)("Read more","snow-monkey-blocks"),closeLabel:i||(0,s.__)("Close","snow-monkey-blocks"),clientId:t})}),[t]);const N=(0,m.useSelect)((e=>!!e("core/block-editor").getBlock(t)?.innerBlocks?.length),[t]),I=b()("smb-read-more-box",n,{"smb-read-more-box--has-mask":k}),D=b()("smb-read-more-box__content"),T=b()("smb-read-more-box__action",{[`is-content-justification-${x}`]:x}),P={"--smb-read-more-box--content-height":h||void 0,"--smb-read-more-box--mask-color":k&&g||void 0},K=b()("smb-read-more-box__btn-wrapper","smb-btn-wrapper",{[`smb-btn-wrapper--${v}`]:!!v}),H=b()("smb-read-more-box__button","smb-btn",{[`smb-btn--${v}`]:!!v,"smb-btn--wrap":C}),L={"--smb-btn--background-color":f||void 0,"--smb-btn--background-image":w||void 0,"--smb-btn--border-radius":String(j).match(/^\d+$/)?`${j}px`:j||void 0,"--smb-btn--color":y||void 0};e.className&&e.className.split(" ").includes("is-style-ghost")&&(L["--smb-btn--style--ghost--border-color"]=f||void 0);const M=(0,d.useBlockProps)({className:I,style:P}),V=(0,d.useInnerBlocksProps)({},{"aria-hidden":"false",className:D,templateLock:B,renderAppender:N?void 0:d.InnerBlocks.ButtonBlockAppender}),z=(0,_.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.InspectorControls,{children:(0,l.jsxs)(c.__experimentalToolsPanel,{label:(0,s.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:z,children:[(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>r!==a.uK.label.default,isShownByDefault:!0,label:(0,s.__)("Label","snow-monkey-blocks"),onDeselect:()=>o({label:a.uK.label.default}),children:(0,l.jsx)(c.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Label","snow-monkey-blocks"),value:r||(0,s.__)("Read more","snow-monkey-blocks"),onChange:e=>{o({label:e})}})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>i!==a.uK.closeLabel.default,isShownByDefault:!0,label:(0,s.__)("Label (for Close)","snow-monkey-blocks"),onDeselect:()=>o({closeLabel:a.uK.closeLabel.default}),children:(0,l.jsx)(c.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Label (for Close)","snow-monkey-blocks"),value:i||(0,s.__)("Close","snow-monkey-blocks"),onChange:e=>{o({closeLabel:e})}})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>x!==a.uK.btnJustification.default,isShownByDefault:!0,label:(0,s.__)("Button justification","snow-monkey-blocks"),onDeselect:()=>o({btnJustification:a.uK.btnJustification.default}),children:(0,l.jsx)(c.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Button justification","snow-monkey-blocks"),id:"snow-monkey-blocks/read-more-box/btn-justification",children:(0,l.jsx)("div",{children:(0,l.jsx)(d.JustifyContentControl,{allowedControls:p,value:x,onChange:e=>o({btnJustification:e})})})})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>h!==a.uK.contenHeight.default,isShownByDefault:!0,label:(0,s.__)("Height of contents when closed","snow-monkey-blocks"),onDeselect:()=>o({contenHeight:a.uK.contenHeight.default}),children:(0,l.jsx)(c.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Height of contents when closed","snow-monkey-blocks"),value:h,onChange:e=>{o({contenHeight:e})}})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>k!==a.uK.mask.default,isShownByDefault:!0,label:(0,s.__)("Masks the lower part when closed","snow-monkey-blocks"),onDeselect:()=>o({mask:a.uK.mask.default}),children:(0,l.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Masks the lower part when closed","snow-monkey-blocks"),checked:k,onChange:e=>{o({mask:e})}})}),k&&(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>g!==a.uK.maskColor.default,isShownByDefault:!0,label:(0,s.__)("Mask Color","snow-monkey-blocks"),onDeselect:()=>o({maskColor:a.uK.maskColor.default}),children:(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Mask Color","snow-monkey-blocks"),colorValue:g,onColorChange:e=>o({maskColor:e})}],__experimentalIsRenderedInSidebar:!0,...S})})})]})}),(0,l.jsx)(d.InspectorControls,{children:(0,l.jsxs)(c.__experimentalToolsPanel,{label:(0,s.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:z,children:[(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>v!==a.uK.btnSize.default,isShownByDefault:!0,label:(0,s.__)("Button size","snow-monkey-blocks"),onDeselect:()=>o({btnSize:a.uK.btnSize.default}),children:(0,l.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Button size","snow-monkey-blocks"),value:v,onChange:e=>o({btnSize:e}),options:[{value:"",label:(0,s.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,s.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,s.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,s.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,s.__)("Full size","snow-monkey-blocks")}]})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>j!==a.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,s.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>o({btnBorderRadius:a.uK.btnBorderRadius.default}),children:(0,l.jsx)("div",{className:"smb-border-radius-control",children:(0,l.jsx)(d.__experimentalBorderRadiusControl,{values:j,onChange:e=>{o({btnBorderRadius:e})}})})}),(0,l.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>C!==a.uK.btnWrap.default,isShownByDefault:!0,label:(0,s.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>o({btnWrap:a.uK.btnWrap.default}),children:(0,l.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Wrap","snow-monkey-blocks"),checked:C,onChange:e=>o({btnWrap:e})})}),(0,l.jsxs)("div",{className:"smb-color-gradient-settings-dropdown",children:[(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Background color","snow-monkey-blocks"),colorValue:f,gradientValue:w,onColorChange:e=>o({btnBackgroundColor:e}),onGradientChange:e=>o({btnBackgroundGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...S}),(0,l.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Text color","snow-monkey-blocks"),colorValue:y,onColorChange:e=>o({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...S}),(0,l.jsx)(d.ContrastChecker,{backgroundColor:f,textColor:y})]})]})}),(0,l.jsxs)("div",{...M,children:[(0,l.jsx)("div",{...V,id:t}),(0,l.jsx)("div",{className:T,children:(0,l.jsx)("div",{className:K,children:(0,l.jsx)("button",{className:H,style:L,"aria-expanded":"false","aria-controls":t,"data-label":r,"data-close-label":i,children:(0,l.jsx)("span",{className:"smb-read-more-box__label smb-btn__label",children:i})})})})]})]})},save:function({attributes:e,className:o}){const{label:t,closeLabel:n,btnJustification:s,contenHeight:a,mask:r,maskColor:i,btnBackgroundColor:c,btnBackgroundGradientColor:m,btnTextColor:u,btnSize:_,btnBorderRadius:p,btnWrap:x,clientId:h}=e,k=b()("smb-read-more-box",o,{"smb-read-more-box--has-mask":r}),g=b()("smb-read-more-box__content"),f=b()("smb-read-more-box__action",{[`is-content-justification-${s}`]:s}),w={"--smb-read-more-box--content-height":a||void 0,"--smb-read-more-box--mask-color":r&&i||void 0},y=b()("smb-read-more-box__btn-wrapper","smb-btn-wrapper",{[`smb-btn-wrapper--${_}`]:!!_}),v=b()("smb-read-more-box__button","smb-btn",{[`smb-btn--${_}`]:!!_,"smb-btn--wrap":x}),j={"--smb-btn--background-color":c||void 0,"--smb-btn--background-image":m||void 0,"--smb-btn--border-radius":String(p).match(/^\d+$/)?`${p}px`:p||void 0,"--smb-btn--color":u||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(j["--smb-btn--style--ghost--border-color"]=c||void 0),(0,l.jsxs)("div",{...d.useBlockProps.save({className:k,style:w}),children:[(0,l.jsx)("div",{...d.useInnerBlocksProps.save({className:g,"aria-hidden":"true"}),id:h}),(0,l.jsx)("div",{className:f,children:(0,l.jsx)("div",{className:y,children:(0,l.jsx)("button",{className:v,style:j,"aria-expanded":"false","aria-controls":h,"data-label":t,"data-close-label":n,children:(0,l.jsx)("span",{className:"smb-read-more-box__label smb-btn__label",children:t})})})})]})},deprecated:x})},6942:(e,o)=>{var t;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e="",o=0;o<arguments.length;o++){var t=arguments[o];t&&(e=l(e,a(t)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var o="";for(var t in e)n.call(e,t)&&e[t]&&(o=l(o,t));return o}function l(e,o){return o?e?e+" "+o:e+o:e}e.exports?(s.default=s,e.exports=s):void 0===(t=function(){return s}.apply(o,[]))||(e.exports=t)}()}},t={};function n(e){var s=t[e];if(void 0!==s)return s.exports;var a=t[e]={exports:{}};return o[e](a,a.exports,n),a.exports}n.m=o,e=[],n.O=(o,t,s,a)=>{if(!t){var l=1/0;for(d=0;d<e.length;d++){for(var[t,s,a]=e[d],r=!0,i=0;i<t.length;i++)(!1&a||l>=a)&&Object.keys(n.O).every((e=>n.O[e](t[i])))?t.splice(i--,1):(r=!1,a<l&&(l=a));if(r){e.splice(d--,1);var b=s();void 0!==b&&(o=b)}}return o}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[t,s,a]},n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={9990:0,2074:0};n.O.j=o=>0===e[o];var o=(o,t)=>{var s,a,[l,r,i]=t,b=0;if(l.some((o=>0!==e[o]))){for(s in r)n.o(r,s)&&(n.m[s]=r[s]);if(i)var d=i(n)}for(o&&o(t);b<l.length;b++)a=l[b],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(d)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var s=n.O(void 0,[2074],(()=>n(8436)));s=n.O(s)})();1 (()=>{var e,o={8436:(e,o,t)=>{"use strict";const n=window.wp.blocks,s=window.wp.i18n,l=JSON.parse('{"UU":"snow-monkey-blocks/read-more-box","uK":{"label":{"type":"string","source":"attribute","selector":".smb-read-more-box__button","attribute":"data-label","default":""},"closeLabel":{"type":"string","source":"attribute","selector":".smb-read-more-box__button","attribute":"data-close-label","default":""},"btnJustification":{"type":"string","default":"center"},"contenHeight":{"type":"string","default":"100px"},"mask":{"type":"boolean","default":false},"maskColor":{"type":"string"},"clientId":{"type":"string","default":""},"btnBackgroundColor":{"type":"string"},"btnBackgroundGradientColor":{"type":"string"},"btnTextColor":{"type":"string"},"btnSize":{"type":"string","default":""},"btnBorderRadius":{"type":"string"},"btnWrap":{"type":"boolean","default":false},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"spacing":{"margin":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":["label","closeLabel","clientId"]}}}}'),a=window.ReactJSXRuntime,r=(0,a.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,a.jsx)("path",{d:"M23,3H1A1,1,0,0,0,0,4V20a1,1,0,0,0,1,1H23a1,1,0,0,0,1-1V4A1,1,0,0,0,23,3Zm0,16.47a.52.52,0,0,1-.52.53h-21A.52.52,0,0,1,1,19.47V4.53A.52.52,0,0,1,1.52,4h21a.52.52,0,0,1,.52.53Z"}),(0,a.jsx)("rect",{x:"4",y:"10.5",width:"16",height:"1"}),(0,a.jsx)("rect",{x:"4",y:"13.5",width:"4",height:"1"}),(0,a.jsx)("rect",{x:"10",y:"13.5",width:"4",height:"1"}),(0,a.jsx)("rect",{x:"16",y:"13.5",width:"4",height:"1"})]});var i=t(6942),b=t.n(i);const d=window.wp.blockEditor,c=window.wp.components,m=window.wp.data,u=window.wp.element,_=(window.lodash,window.wp.compose),p=e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const o=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft].map((e=>null==e||""===e?"":/^\d+$/.test(String(e))?`${e}px`:String(e))),t=o.filter(Boolean);if(0===t.length)return;if(4===t.length){const[e,t,n,s]=o;if(e===t&&t===n&&n===s)return e;if(e===n&&t===s)return`${e} ${t}`;if(t===s)return`${e} ${t} ${n}`}return t.join(" ")}return/^\d+$/.test(String(e))?`${e}px`:e}},x=["left","center","right"],h=[{attributes:{...l.uK},supports:{...l.xY},save({attributes:e,className:o}){const{label:t,closeLabel:n,btnJustification:s,contenHeight:l,mask:r,maskColor:i,btnBackgroundColor:c,btnBackgroundGradientColor:m,btnTextColor:u,btnSize:_,btnBorderRadius:x,btnWrap:h,clientId:k}=e,g=b()("smb-read-more-box",o,{"smb-read-more-box--has-mask":r}),f=b()("smb-read-more-box__content"),w=b()("smb-read-more-box__action",{[`is-content-justification-${s}`]:s}),y={"--smb-read-more-box--content-height":l||void 0,"--smb-read-more-box--mask-color":r&&i||void 0},v=b()("smb-read-more-box__button","smb-btn",{[`smb-btn--${_}`]:!!_,"smb-btn--wrap":h}),j={"--smb-btn--background-color":c||void 0,"--smb-btn--background-image":m||void 0,"--smb-btn--border-radius":p(x),"--smb-btn--color":u||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(j["--smb-btn--style--ghost--border-color"]=c||void 0),(0,a.jsxs)("div",{...d.useBlockProps.save({className:g,style:y}),children:[(0,a.jsx)("div",{...d.useInnerBlocksProps.save({className:f,"aria-hidden":"true"}),id:k}),(0,a.jsx)("div",{className:w,children:(0,a.jsx)("div",{className:"smb-btn-box__btn-wrapper",children:(0,a.jsx)("button",{className:v,style:j,"aria-expanded":"false","aria-controls":k,"data-label":t,"data-close-label":n,children:(0,a.jsx)("span",{className:"smb-read-more-box__label smb-btn__label",children:t})})})})]})}}];(0,n.registerBlockType)(l.UU,{icon:{foreground:"#cd162c",src:r},styles:[{name:"default",label:(0,s.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"ghost",label:(0,s.__)("Ghost","snow-monkey-blocks")},{name:"text",label:(0,s.__)("Text","snow-monkey-blocks")}],edit:function({attributes:e,setAttributes:o,clientId:t,className:n}){const{label:r,closeLabel:i,btnJustification:h,contenHeight:k,mask:g,maskColor:f,btnBackgroundColor:w,btnBackgroundGradientColor:y,btnTextColor:v,btnSize:j,btnBorderRadius:C,btnWrap:B,templateLock:S}=e,N=(0,d.__experimentalUseMultipleOriginColorsAndGradients)();(0,u.useEffect)((()=>{o({label:r||(0,s.__)("Read more","snow-monkey-blocks"),closeLabel:i||(0,s.__)("Close","snow-monkey-blocks"),clientId:t})}),[t]);const I=(0,m.useSelect)((e=>!!e("core/block-editor").getBlock(t)?.innerBlocks?.length),[t]),D=b()("smb-read-more-box",n,{"smb-read-more-box--has-mask":g}),T=b()("smb-read-more-box__content"),P=b()("smb-read-more-box__action",{[`is-content-justification-${h}`]:h}),K={"--smb-read-more-box--content-height":k||void 0,"--smb-read-more-box--mask-color":g&&f||void 0},L=b()("smb-read-more-box__btn-wrapper","smb-btn-wrapper",{[`smb-btn-wrapper--${j}`]:!!j}),H=b()("smb-read-more-box__button","smb-btn",{[`smb-btn--${j}`]:!!j,"smb-btn--wrap":B}),M={"--smb-btn--background-color":w||void 0,"--smb-btn--background-image":y||void 0,"--smb-btn--border-radius":p(C),"--smb-btn--color":v||void 0};e.className&&e.className.split(" ").includes("is-style-ghost")&&(M["--smb-btn--style--ghost--border-color"]=w||void 0);const R=(0,d.useBlockProps)({className:D,style:K}),V=(0,d.useInnerBlocksProps)({},{"aria-hidden":"false",className:T,templateLock:S,renderAppender:I?void 0:d.InnerBlocks.ButtonBlockAppender}),$=(0,_.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.InspectorControls,{children:(0,a.jsxs)(c.__experimentalToolsPanel,{label:(0,s.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:$,children:[(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>r!==l.uK.label.default,isShownByDefault:!0,label:(0,s.__)("Label","snow-monkey-blocks"),onDeselect:()=>o({label:l.uK.label.default}),children:(0,a.jsx)(c.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Label","snow-monkey-blocks"),value:r||(0,s.__)("Read more","snow-monkey-blocks"),onChange:e=>{o({label:e})}})}),(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>i!==l.uK.closeLabel.default,isShownByDefault:!0,label:(0,s.__)("Label (for Close)","snow-monkey-blocks"),onDeselect:()=>o({closeLabel:l.uK.closeLabel.default}),children:(0,a.jsx)(c.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Label (for Close)","snow-monkey-blocks"),value:i||(0,s.__)("Close","snow-monkey-blocks"),onChange:e=>{o({closeLabel:e})}})}),(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>h!==l.uK.btnJustification.default,isShownByDefault:!0,label:(0,s.__)("Button justification","snow-monkey-blocks"),onDeselect:()=>o({btnJustification:l.uK.btnJustification.default}),children:(0,a.jsx)(c.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Button justification","snow-monkey-blocks"),id:"snow-monkey-blocks/read-more-box/btn-justification",children:(0,a.jsx)("div",{children:(0,a.jsx)(d.JustifyContentControl,{allowedControls:x,value:h,onChange:e=>o({btnJustification:e})})})})}),(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>k!==l.uK.contenHeight.default,isShownByDefault:!0,label:(0,s.__)("Height of contents when closed","snow-monkey-blocks"),onDeselect:()=>o({contenHeight:l.uK.contenHeight.default}),children:(0,a.jsx)(c.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Height of contents when closed","snow-monkey-blocks"),value:k,onChange:e=>{o({contenHeight:e})}})}),(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>g!==l.uK.mask.default,isShownByDefault:!0,label:(0,s.__)("Masks the lower part when closed","snow-monkey-blocks"),onDeselect:()=>o({mask:l.uK.mask.default}),children:(0,a.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Masks the lower part when closed","snow-monkey-blocks"),checked:g,onChange:e=>{o({mask:e})}})}),g&&(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>f!==l.uK.maskColor.default,isShownByDefault:!0,label:(0,s.__)("Mask Color","snow-monkey-blocks"),onDeselect:()=>o({maskColor:l.uK.maskColor.default}),children:(0,a.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,a.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Mask Color","snow-monkey-blocks"),colorValue:f,onColorChange:e=>o({maskColor:e})}],__experimentalIsRenderedInSidebar:!0,...N})})})]})}),(0,a.jsx)(d.InspectorControls,{children:(0,a.jsxs)(c.__experimentalToolsPanel,{label:(0,s.__)("Button settings","snow-monkey-blocks"),dropdownMenuProps:$,children:[(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>j!==l.uK.btnSize.default,isShownByDefault:!0,label:(0,s.__)("Button size","snow-monkey-blocks"),onDeselect:()=>o({btnSize:l.uK.btnSize.default}),children:(0,a.jsx)(c.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Button size","snow-monkey-blocks"),value:j,onChange:e=>o({btnSize:e}),options:[{value:"",label:(0,s.__)("Normal size","snow-monkey-blocks")},{value:"little-wider",label:(0,s.__)("Litle wider","snow-monkey-blocks")},{value:"wider",label:(0,s.__)("Wider","snow-monkey-blocks")},{value:"more-wider",label:(0,s.__)("More wider","snow-monkey-blocks")},{value:"full",label:(0,s.__)("Full size","snow-monkey-blocks")}]})}),(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>C!==l.uK.btnBorderRadius.default,isShownByDefault:!0,label:(0,s.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>o({btnBorderRadius:l.uK.btnBorderRadius.default}),children:(0,a.jsx)("div",{className:"smb-border-radius-control",children:(0,a.jsx)(d.__experimentalBorderRadiusControl,{values:C,onChange:e=>{o({btnBorderRadius:e})}})})}),(0,a.jsx)(c.__experimentalToolsPanelItem,{hasValue:()=>B!==l.uK.btnWrap.default,isShownByDefault:!0,label:(0,s.__)("Wrap","snow-monkey-blocks"),onDeselect:()=>o({btnWrap:l.uK.btnWrap.default}),children:(0,a.jsx)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Wrap","snow-monkey-blocks"),checked:B,onChange:e=>o({btnWrap:e})})}),(0,a.jsxs)("div",{className:"smb-color-gradient-settings-dropdown",children:[(0,a.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Background color","snow-monkey-blocks"),colorValue:w,gradientValue:y,onColorChange:e=>o({btnBackgroundColor:e}),onGradientChange:e=>o({btnBackgroundGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...N}),(0,a.jsx)(d.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Text color","snow-monkey-blocks"),colorValue:v,onColorChange:e=>o({btnTextColor:e})}],__experimentalIsRenderedInSidebar:!0,...N}),(0,a.jsx)(d.ContrastChecker,{backgroundColor:w,textColor:v})]})]})}),(0,a.jsxs)("div",{...R,children:[(0,a.jsx)("div",{...V,id:t}),(0,a.jsx)("div",{className:P,children:(0,a.jsx)("div",{className:L,children:(0,a.jsx)("button",{className:H,style:M,"aria-expanded":"false","aria-controls":t,"data-label":r,"data-close-label":i,children:(0,a.jsx)("span",{className:"smb-read-more-box__label smb-btn__label",children:i})})})})]})]})},save:function({attributes:e,className:o}){const{label:t,closeLabel:n,btnJustification:s,contenHeight:l,mask:r,maskColor:i,btnBackgroundColor:c,btnBackgroundGradientColor:m,btnTextColor:u,btnSize:_,btnBorderRadius:x,btnWrap:h,clientId:k}=e,g=b()("smb-read-more-box",o,{"smb-read-more-box--has-mask":r}),f=b()("smb-read-more-box__content"),w=b()("smb-read-more-box__action",{[`is-content-justification-${s}`]:s}),y={"--smb-read-more-box--content-height":l||void 0,"--smb-read-more-box--mask-color":r&&i||void 0},v=b()("smb-read-more-box__btn-wrapper","smb-btn-wrapper",{[`smb-btn-wrapper--${_}`]:!!_}),j=b()("smb-read-more-box__button","smb-btn",{[`smb-btn--${_}`]:!!_,"smb-btn--wrap":h}),C={"--smb-btn--background-color":c||void 0,"--smb-btn--background-image":m||void 0,"--smb-btn--border-radius":p(x),"--smb-btn--color":u||void 0};return e.className&&e.className.split(" ").includes("is-style-ghost")&&(C["--smb-btn--style--ghost--border-color"]=c||void 0),(0,a.jsxs)("div",{...d.useBlockProps.save({className:g,style:y}),children:[(0,a.jsx)("div",{...d.useInnerBlocksProps.save({className:f,"aria-hidden":"true"}),id:k}),(0,a.jsx)("div",{className:w,children:(0,a.jsx)("div",{className:v,children:(0,a.jsx)("button",{className:j,style:C,"aria-expanded":"false","aria-controls":k,"data-label":t,"data-close-label":n,children:(0,a.jsx)("span",{className:"smb-read-more-box__label smb-btn__label",children:t})})})})]})},deprecated:h})},6942:(e,o)=>{var t;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e="",o=0;o<arguments.length;o++){var t=arguments[o];t&&(e=a(e,l(t)))}return e}function l(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var o="";for(var t in e)n.call(e,t)&&e[t]&&(o=a(o,t));return o}function a(e,o){return o?e?e+" "+o:e+o:e}e.exports?(s.default=s,e.exports=s):void 0===(t=function(){return s}.apply(o,[]))||(e.exports=t)}()}},t={};function n(e){var s=t[e];if(void 0!==s)return s.exports;var l=t[e]={exports:{}};return o[e](l,l.exports,n),l.exports}n.m=o,e=[],n.O=(o,t,s,l)=>{if(!t){var a=1/0;for(d=0;d<e.length;d++){for(var[t,s,l]=e[d],r=!0,i=0;i<t.length;i++)(!1&l||a>=l)&&Object.keys(n.O).every((e=>n.O[e](t[i])))?t.splice(i--,1):(r=!1,l<a&&(a=l));if(r){e.splice(d--,1);var b=s();void 0!==b&&(o=b)}}return o}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[t,s,l]},n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={9990:0,2074:0};n.O.j=o=>0===e[o];var o=(o,t)=>{var s,l,[a,r,i]=t,b=0;if(a.some((o=>0!==e[o]))){for(s in r)n.o(r,s)&&(n.m[s]=r[s]);if(i)var d=i(n)}for(o&&o(t);b<a.length;b++)l=a[b],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var s=n.O(void 0,[2074],(()=>n(8436)));s=n.O(s)})(); -
snow-monkey-blocks/trunk/dist/blocks/recent-posts/index.asset.php
r3278039 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => ' 5ef4cecdde5d4dd63ee5');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'ef99aa8320dad39ee6a8'); -
snow-monkey-blocks/trunk/dist/blocks/recent-posts/index.js
r3278039 r3400189 1 (()=>{"use strict";var e={n:o=>{var l=o&&o.__esModule?()=>o.default:()=>o;return e.d(l,{a:l}),l},d:(o,l)=>{for(var t in l)e.o(l,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:l[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,l=window.wp.i18n,t=JSON.parse('{"UU":"snow-monkey-blocks/recent-posts","uK":{"postType":{"type":"string","default":"post"},"taxonomy":{"type":"string","default":null},"termId":{"type":"number","default":0},"authors":{"type":"array","default":[]},"postsPerPage":{"type":"number","default":6},"layout":{"type":"string","default":"rich-media"},"gap":{"type":"string","default":""},"ignoreStickyPosts":{"type":"boolean","default":true},"smCols":{"type":"number","default":0},"noPostsText":{"type":"string","default":""},"itemTitleTagName":{"type":"string","default":"h3"},"forceDisplayItemMeta":{"type":"boolean","default":false},"forceDisplayItemTerms":{"type":"boolean","default":false},"displayItemAuthor":{"type":"boolean"},"displayItemPublished":{"type":"boolean","default":true},"displayItemModified":{"type":"boolean","default":false},"displayItemExcerpt":{"type":"boolean"},"itemThumbnailSizeSlug":{"type":"string","default":"full"},"arrows":{"type":"boolean","default":false},"dots":{"type":"boolean","default":true},"interval":{"type":"number","default":0},"autoplayButton":{"type":"boolean","default":false},"anchor":{"type":"string","default":""},"clientId":{"type":"string","default":""}}}'),s=window.ReactJSXRuntime,a=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.jsx)("rect",{x:"3",y:"6.5",width:"4",height:"1"}),(0,s.jsx)("rect",{x:"9",y:"6.5",width:"13",height:"1"}),(0,s.jsx)("rect",{x:"3",y:"11.5",width:"4",height:"1"}),(0,s.jsx)("rect",{x:"9",y:"11.5",width:"13",height:"1"}),(0,s.jsx)("rect",{x:"3",y:"16.5",width:"4",height:"1"}),(0,s.jsx)("rect",{x:"9",y:"16.5",width:"13",height:"1"})]}),n=window.lodash,i=window.wp.components,r=window.wp.blockEditor,m=window.wp.data,u=window.wp.element,c=window.wp.serverSideRender;var d=e.n(c);const p=window.wp.compose,y=(e,o=0,l=null)=>(e=Number(e),(isNaN(e)||e<o)&&(e=o),null!==l&&e>l&&(e=l),e),_=e=>{const o=e.map((e=>({children:[],parent:null,...e}))),l=(0,n.groupBy)(o,"parent");if(l.null&&l.null.length)return o;const t=e=>e.map((e=>{const o=l[e.id];return{...e,children:o&&o.length?t(o):[]}}));return t(l[0]||[])},h=[],b=[{attributes:{...t.uK,myAnchor:{type:"string",default:""}},migrate:e=>(e.anchor=e.myAnchor,e),save:()=>null}];(0,o.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},keywords:[(0,l.__)("Posts list","snow-monkey-blocks"),(0,l.__)("Latest posts","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:o,clientId:a}){const{postType:c,termId:b,authors:x,postsPerPage:f,layout:g,gap:k,ignoreStickyPosts:w,smCols:T,noPostsText:D,itemTitleTagName:I,itemThumbnailSizeSlug:j,forceDisplayItemMeta:S,displayItemAuthor:P,displayItemPublished:B,displayItemModified:v,forceDisplayItemTerms:C,displayItemExcerpt:M,arrows:K,dots:N,interval:H,autoplayButton:V}=e;(0,u.useEffect)((()=>{let e,l;e=null==P?!["text","text2"].includes(g):P,l=null==M?["rich-media","simple","caroucel"].includes(g):M,o({displayItemAuthor:e,displayItemExcerpt:l})}),[g]),(0,u.useEffect)((()=>{o({clientId:e.clientId||a})}),[]);const z=(0,m.useSelect)((e=>e("core").getPostTypes({per_page:-1})||h),[]),A=(0,u.useMemo)((()=>z.filter((e=>e.viewable&&!e.hierarchical&&"media"!==e.rest_base))),[z]), E=(0,m.useSelect)((e=>{const{getEntityRecords:o,getTaxonomy:l}=e("core"),t=[];return A.forEach((e=>{e.taxonomies.forEach((e=>{const s=l(e);if(s?.visibility?.show_ui){const l=o("taxonomy",e,{per_page:-1})||h;0<l.length&&t.push({taxonomy:e,label:s.name,terms:l})}}))})),t}),[A]),F=(0,m.useSelect)((e=>e("core").getUsers({who:"authors",per_page:-1,_fields:"id,name",context:"view"})),[]),L=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},R=[],U=A.find((e=>c===e.slug))?.taxonomies||h;E.forEach((e=>{U.includes(e.taxonomy)&&R.push(e)}));const O=(0,m.useSelect)((e=>{const{getSettings:o}=e("core/block-editor");return o().imageSizes||h}),[]),J=(0,u.useMemo)((()=>O.map((e=>({value:e.slug,label:e.name})))),[O]),$=["h2","h3","h4"],X=[{label:"S",value:1},{label:"M",value:2},{label:"L",value:3}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.InspectorControls,{children:(0,s.jsxs)(i.__experimentalToolsPanel,{label:(0,l.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:L,children:[(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>c!==t.uK.postType.default,isShownByDefault:!0,label:(0,l.__)("Post type","snow-monkey-blocks"),onDeselect:()=>o({postType:t.uK.postType.default}),children:(0,s.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Post type","snow-monkey-blocks"),value:c,onChange:e=>o({postType:e}),options:A.map((e=>({label:e.name,value:e.slug})))})}),R.length?(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>b!==t.uK.termId.default,isShownByDefault:!0,label:(0,l.__)("Taxonomy","snow-monkey-blocks"),onDeselect:()=>o({termId:t.uK.termId.default,taxonomy:t.uK.taxonomy.default}),children:(0,s.jsx)("div",{style:{display:"grid",gap:"16px"},children:R.map((e=>(0,s.jsx)(i.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.sprintf)(1 (()=>{"use strict";var e={n:o=>{var l=o&&o.__esModule?()=>o.default:()=>o;return e.d(l,{a:l}),l},d:(o,l)=>{for(var t in l)e.o(l,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:l[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,l=window.wp.i18n,t=JSON.parse('{"UU":"snow-monkey-blocks/recent-posts","uK":{"postType":{"type":"string","default":"post"},"taxonomy":{"type":"string","default":null},"termId":{"type":"number","default":0},"authors":{"type":"array","default":[]},"postsPerPage":{"type":"number","default":6},"layout":{"type":"string","default":"rich-media"},"gap":{"type":"string","default":""},"ignoreStickyPosts":{"type":"boolean","default":true},"smCols":{"type":"number","default":0},"noPostsText":{"type":"string","default":""},"itemTitleTagName":{"type":"string","default":"h3"},"forceDisplayItemMeta":{"type":"boolean","default":false},"forceDisplayItemTerms":{"type":"boolean","default":false},"displayItemAuthor":{"type":"boolean"},"displayItemPublished":{"type":"boolean","default":true},"displayItemModified":{"type":"boolean","default":false},"displayItemExcerpt":{"type":"boolean"},"itemThumbnailSizeSlug":{"type":"string","default":"full"},"arrows":{"type":"boolean","default":false},"dots":{"type":"boolean","default":true},"interval":{"type":"number","default":0},"autoplayButton":{"type":"boolean","default":false},"anchor":{"type":"string","default":""},"clientId":{"type":"string","default":""}}}'),s=window.ReactJSXRuntime,a=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.jsx)("rect",{x:"3",y:"6.5",width:"4",height:"1"}),(0,s.jsx)("rect",{x:"9",y:"6.5",width:"13",height:"1"}),(0,s.jsx)("rect",{x:"3",y:"11.5",width:"4",height:"1"}),(0,s.jsx)("rect",{x:"9",y:"11.5",width:"13",height:"1"}),(0,s.jsx)("rect",{x:"3",y:"16.5",width:"4",height:"1"}),(0,s.jsx)("rect",{x:"9",y:"16.5",width:"13",height:"1"})]}),n=window.lodash,i=window.wp.components,r=window.wp.blockEditor,m=window.wp.data,u=window.wp.element,c=window.wp.serverSideRender;var d=e.n(c);const p=window.wp.compose,y=(e,o=0,l=null)=>(e=Number(e),(isNaN(e)||e<o)&&(e=o),null!==l&&e>l&&(e=l),e),_=e=>{const o=e.map((e=>({children:[],parent:null,...e}))),l=(0,n.groupBy)(o,"parent");if(l.null&&l.null.length)return o;const t=e=>e.map((e=>{const o=l[e.id];return{...e,children:o&&o.length?t(o):[]}}));return t(l[0]||[])},h=[],b=[{attributes:{...t.uK,myAnchor:{type:"string",default:""}},migrate:e=>(e.anchor=e.myAnchor,e),save:()=>null}];(0,o.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},keywords:[(0,l.__)("Posts list","snow-monkey-blocks"),(0,l.__)("Latest posts","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:o,clientId:a}){const{postType:c,termId:b,authors:x,postsPerPage:f,layout:g,gap:k,ignoreStickyPosts:w,smCols:T,noPostsText:D,itemTitleTagName:I,itemThumbnailSizeSlug:j,forceDisplayItemMeta:S,displayItemAuthor:P,displayItemPublished:B,displayItemModified:v,forceDisplayItemTerms:C,displayItemExcerpt:M,arrows:K,dots:N,interval:H,autoplayButton:V}=e;(0,u.useEffect)((()=>{let e,l;e=null==P?!["text","text2"].includes(g):P,l=null==M?["rich-media","simple","caroucel"].includes(g):M,o({displayItemAuthor:e,displayItemExcerpt:l})}),[g]),(0,u.useEffect)((()=>{o({clientId:e.clientId||a})}),[]);const z=(0,m.useSelect)((e=>e("core").getPostTypes({per_page:-1})||h),[]),A=(0,u.useMemo)((()=>z.filter((e=>e.viewable&&!e.hierarchical&&"media"!==e.rest_base))),[z]),{getEntityRecords:E,getTaxonomy:F}=(0,m.useSelect)((e=>e("core")),[]),L=(0,u.useMemo)((()=>{const e=[];return A.forEach((o=>{o.taxonomies.forEach((o=>{const l=F(o);if(l?.visibility?.show_ui){const t=E("taxonomy",o,{per_page:-1})||h;0<t.length&&e.push({taxonomy:o,label:l.name,terms:t})}}))})),e}),[A,E,F]),R=(0,m.useSelect)((e=>e("core").getUsers({who:"authors",per_page:-1,_fields:"id,name",context:"view"})),[]),U=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},O=[],J=A.find((e=>c===e.slug))?.taxonomies||h;L.forEach((e=>{J.includes(e.taxonomy)&&O.push(e)}));const $=(0,m.useSelect)((e=>{const{getSettings:o}=e("core/block-editor");return o().imageSizes||h}),[]),X=(0,u.useMemo)((()=>$.map((e=>({value:e.slug,label:e.name})))),[$]),q=["h2","h3","h4"],G=[{label:"S",value:1},{label:"M",value:2},{label:"L",value:3}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.InspectorControls,{children:(0,s.jsxs)(i.__experimentalToolsPanel,{label:(0,l.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:U,children:[(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>c!==t.uK.postType.default,isShownByDefault:!0,label:(0,l.__)("Post type","snow-monkey-blocks"),onDeselect:()=>o({postType:t.uK.postType.default}),children:(0,s.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Post type","snow-monkey-blocks"),value:c,onChange:e=>o({postType:e}),options:A.map((e=>({label:e.name,value:e.slug})))})}),O.length?(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>b!==t.uK.termId.default,isShownByDefault:!0,label:(0,l.__)("Taxonomy","snow-monkey-blocks"),onDeselect:()=>o({termId:t.uK.termId.default,taxonomy:t.uK.taxonomy.default}),children:(0,s.jsx)("div",{style:{display:"grid",gap:"16px"},children:O.map((e=>(0,s.jsx)(i.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.sprintf)( 2 2 // translators: %1$s: Term label 3 3 // translators: %1$s: Term label 4 (0,l.__)("Filter by %1$s","snow-monkey-blocks"),e.label),noOptionLabel:"-",onChange:l=>{o({termId:y(l),taxonomy:e.taxonomy})},selectedId:b,tree:_(e.terms)},e.taxonomy)))})}):(0,s.jsx)("div",{style:{gridColumn:"1/-1"},children:(0,s.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Loading taxonomies…","snow-monkey-blocks"),id:"snow-monkey-blocks/taxonomy-posts/taxonomies",children:(0,s.jsx)(i.Spinner,{})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>x!==t.uK.authors.default,isShownByDefault:!0,label:(0,l.__)("Authors","snow-monkey-blocks"),onDeselect:()=>o({authors:t.uK.authors.default}),children:(0,s.jsx)(i.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Authors","snow-monkey-blocks"),onChange:e=>{const l=e.map((e=>{const o=e?.value||e;return F.find((e=>e.name===o))?.id})).filter((e=>e));o({authors:Array.from(new Set(l))})},suggestions:[...(F||[]).map((e=>e.name))],value:x.map((e=>{const o=F?.find((o=>o.id===e));return!!o&&{id:o.id,value:o.name}})).filter((e=>e))})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>f!==t.uK.postsPerPage.default,isShownByDefault:!0,label:(0,l.__)("Number of posts","snow-monkey-blocks"),onDeselect:()=>o({postsPerPage:t.uK.postsPerPage.default}),children:(0,s.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Number of posts","snow-monkey-blocks"),value:f,onChange:e=>o({postsPerPage:y(e,1,50)}),min:"1",max:"50"})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>g!==t.uK.layout.default,isShownByDefault:!0,label:(0,l.__)("Layout","snow-monkey-blocks"),onDeselect:()=>o({layout:t.uK.layout.default}),children:(0,s.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Layout","snow-monkey-blocks"),value:g,onChange:e=>{o({layout:e})},options:[{value:"rich-media",label:(0,l.__)("Rich media","snow-monkey-blocks")},{value:"simple",label:(0,l.__)("Simple","snow-monkey-blocks")},{value:"text",label:(0,l.__)("Text","snow-monkey-blocks")},{value:"text2",label:(0,l.__)("Text 2","snow-monkey-blocks")},{value:"panel",label:(0,l.__)("Panels","snow-monkey-blocks")},{value:"carousel",label:(0,l.sprintf)(4 (0,l.__)("Filter by %1$s","snow-monkey-blocks"),e.label),noOptionLabel:"-",onChange:l=>{o({termId:y(l),taxonomy:e.taxonomy})},selectedId:b,tree:_(e.terms)},e.taxonomy)))})}):(0,s.jsx)("div",{style:{gridColumn:"1/-1"},children:(0,s.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Loading taxonomies…","snow-monkey-blocks"),id:"snow-monkey-blocks/taxonomy-posts/taxonomies",children:(0,s.jsx)(i.Spinner,{})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>x!==t.uK.authors.default,isShownByDefault:!0,label:(0,l.__)("Authors","snow-monkey-blocks"),onDeselect:()=>o({authors:t.uK.authors.default}),children:(0,s.jsx)(i.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Authors","snow-monkey-blocks"),onChange:e=>{const l=e.map((e=>{const o=e?.value||e;return R.find((e=>e.name===o))?.id})).filter((e=>e));o({authors:Array.from(new Set(l))})},suggestions:[...(R||[]).map((e=>e.name))],value:x.map((e=>{const o=R?.find((o=>o.id===e));return!!o&&{id:o.id,value:o.name}})).filter((e=>e))})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>f!==t.uK.postsPerPage.default,isShownByDefault:!0,label:(0,l.__)("Number of posts","snow-monkey-blocks"),onDeselect:()=>o({postsPerPage:t.uK.postsPerPage.default}),children:(0,s.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Number of posts","snow-monkey-blocks"),value:f,onChange:e=>o({postsPerPage:y(e,1,50)}),min:"1",max:"50"})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>g!==t.uK.layout.default,isShownByDefault:!0,label:(0,l.__)("Layout","snow-monkey-blocks"),onDeselect:()=>o({layout:t.uK.layout.default}),children:(0,s.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Layout","snow-monkey-blocks"),value:g,onChange:e=>{o({layout:e})},options:[{value:"rich-media",label:(0,l.__)("Rich media","snow-monkey-blocks")},{value:"simple",label:(0,l.__)("Simple","snow-monkey-blocks")},{value:"text",label:(0,l.__)("Text","snow-monkey-blocks")},{value:"text2",label:(0,l.__)("Text 2","snow-monkey-blocks")},{value:"panel",label:(0,l.__)("Panels","snow-monkey-blocks")},{value:"carousel",label:(0,l.sprintf)( 5 5 // translators: %1$s: Layout 6 6 // translators: %1$s: Layout 7 (0,l.__)("Carousel (%1$s)","snow-monkey-blocks"),(0,l.__)("Rich media","snow-monkey-blocks"))},{value:"large-image",label:(0,l.__)("Large image","snow-monkey-blocks")}]})}),"carousel"===g&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>K!==t.uK.arrows.default,isShownByDefault:!0,label:(0,l.__)("Display arrows","snow-monkey-blocks"),onDeselect:()=>o({arrows:t.uK.arrows.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display arrows","snow-monkey-blocks"),checked:K,onChange:e=>o({arrows:e})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>N!==t.uK.dots.default,isShownByDefault:!0,label:(0,l.__)("Display dots","snow-monkey-blocks"),onDeselect:()=>o({dots:t.uK.dots.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display dots","snow-monkey-blocks"),checked:N,onChange:e=>o({dots:e})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>H!==t.uK.interval.default,isShownByDefault:!0,label:(0,l.__)("Autoplay Speed in seconds","snow-monkey-blocks"),onDeselect:()=>o({interval:t.uK.interval.default}),children:(0,s.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Autoplay Speed in seconds","snow-monkey-blocks"),help:(0,l.__)('If "0", no scroll.',"snow-monkey-blocks"),value:H,onChange:e=>o({interval:y(e,0,10)}),min:"0",max:"10"})}),0<H&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>V!==t.uK.autoplayButton.default,isShownByDefault:!0,label:(0,l.__)("Display pause button for autoplay","snow-monkey-blocks"),onDeselect:()=>o({autoplayButton:t.uK.autoplayButton.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display pause button for autoplay","snow-monkey-blocks"),checked:V,onChange:e=>o({autoplayButton:e})})})]}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>I!==t.uK.itemTitleTagName.default,isShownByDefault:!0,label:(0,l.__)("Title tag of each items","snow-monkey-blocks"),onDeselect:()=>o({itemTitleTagName:t.uK.itemTitleTagName.default}),children:(0,s.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Title tag of each items","snow-monkey-blocks"),id:"snow-monkey-blocks/recent-posts/item-title-tag-name",children:(0,s.jsx)("div",{className:"smb-list-icon-selector",children:(0,n.times)( $.length,(e=>(0,s.jsx)(i.Button,{variant:I===$[e]?"primary":"secondary",onClick:()=>o({itemTitleTagName:$[e]}),children:$[e]},e)))})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>j!==t.uK.itemThumbnailSizeSlug.default,isShownByDefault:!0,label:(0,l.__)("Images size of each items","snow-monkey-blocks"),onDeselect:()=>o({itemThumbnailSizeSlug:t.uK.itemThumbnailSizeSlug.default}),children:(0,s.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Images size of each items","snow-monkey-blocks"),value:j,options:J,onChange:e=>o({itemThumbnailSizeSlug:e})})}),"post"!==c&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>S!==t.uK.forceDisplayItemMeta.default,isShownByDefault:!0,label:(0,l.__)("Force display meta of each items","snow-monkey-blocks"),onDeselect:()=>o({forceDisplayItemMeta:t.uK.forceDisplayItemMeta.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Force display meta of each items","snow-monkey-blocks"),help:(0,l.__)("If it's already displayed, this setting will be ignored.","snow-monkey-blocks"),checked:S,onChange:e=>o({forceDisplayItemMeta:e})})}),("post"===c||S)&&"text"!==g&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>P!==!["text","text2"].includes(g),isShownByDefault:!0,label:(0,l.__)("Display author of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemAuthor:!["text","text2"].includes(g)}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display author of each items","snow-monkey-blocks"),checked:P,onChange:e=>o({displayItemAuthor:e})})}),("post"===c||S)&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>B!==t.uK.displayItemPublished.default,isShownByDefault:!0,label:(0,l.__)("Display published date of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemPublished:t.uK.displayItemPublished.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display published date of each items","snow-monkey-blocks"),checked:B,onChange:e=>o({displayItemPublished:e})})}),("post"===c||S)&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>v!==t.uK.displayItemModified.default,isShownByDefault:!0,label:(0,l.__)("Display modified date of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemModified:t.uK.displayItemModified.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display modified date of each items","snow-monkey-blocks"),checked:v,onChange:e=>o({displayItemModified:e})})}),"post"!==c&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>C!==t.uK.forceDisplayItemTerms.default,isShownByDefault:!0,label:(0,l.__)("Force display category label of each items","snow-monkey-blocks"),onDeselect:()=>o({forceDisplayItemTerms:t.uK.forceDisplayItemTerms.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Force display category label of each items","snow-monkey-blocks"),help:(0,l.__)("If it's already displayed, this setting will be ignored.","snow-monkey-blocks"),checked:C,onChange:e=>o({forceDisplayItemTerms:e})})}),["rich-media","simple","panel","carousel"].includes(g)&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>M===["rich-media","simple","panel","carousel"].includes(g),isShownByDefault:!0,label:(0,l.__)("Display excerpt of each items","snow-monkey-blocks"),onDeselect:()=>{o({displayItemExcerpt:["rich-media","simple","panel","carousel"].includes(g)})},children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display excerpt of each items","snow-monkey-blocks"),checked:M,onChange:e=>o({displayItemExcerpt:e})})}),("rich-media"===g||"panel"===g)&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>T!==t.uK.smCols.default,isShownByDefault:!0,label:(0,l.__)("Number of columns displayed on mobile device","snow-monkey-blocks"),onDeselect:()=>o({smCols:t.uK.smCols.default}),children:(0,s.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Number of columns displayed on mobile device","snow-monkey-blocks"),value:T,onChange:e=>o({smCols:y(e)}),options:[{value:0,label:(0,l.__)("Default","snow-monkey-blocks")},{value:1,label:(0,l.__)("1 column","snow-monkey-blocks")},{value:2,label:(0,l.__)("2 columns","snow-monkey-blocks")}]})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>w!==t.uK.ignoreStickyPosts.default,isShownByDefault:!0,label:(0,l.__)("Ignore sticky posts","snow-monkey-blocks"),onDeselect:()=>o({ignoreStickyPosts:t.uK.ignoreStickyPosts.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Ignore sticky posts","snow-monkey-blocks"),checked:w,onChange:e=>o({ignoreStickyPosts:e})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>D!==t.uK.noPostsText.default,isShownByDefault:!0,label:(0,l.__)("Text if no posts matched","snow-monkey-blocks"),onDeselect:()=>o({noPostsText:t.uK.noPostsText.default}),children:(0,s.jsx)(i.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Text if no posts matched","snow-monkey-blocks"),help:(0,l.__)("Allow HTML","snow-monkey-blocks"),value:D||"",onChange:e=>o({noPostsText:e})})})]})}),(0,s.jsx)(r.InspectorControls,{group:"dimensions",children:(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>k!==t.uK.gap.default,isShownByDefault:!0,label:(0,l.__)("The gap between each item","snow-monkey-blocks"),onDeselect:()=>o({gap:t.uK.gap.default}),panelId:a,children:(0,s.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,id:"snow-monkey-blocks/recent-posts/gap",label:(0,l.__)("The gap between each item","snow-monkey-blocks"),className:"spacing-sizes-control",children:(0,s.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"spacing-sizes-control__range-control",value:X.filter((e=>e.label?.toLowerCase()===k))?.[0]?.value,resetFallbackValue:void 0,onChange:e=>o({gap:X.filter((o=>o.value===e))?.[0]?.label?.toLowerCase()}),withInputField:!1,min:1,max:3,marks:!0,renderTooltipContent:e=>X.filter((o=>o.value===e))?.[0]?.label?.toUpperCase(),hideLabelFromVision:!0})})})}),(0,s.jsx)("div",{...(0,r.useBlockProps)(),children:A?(0,s.jsx)(i.Disabled,{children:(0,s.jsx)(d(),{block:"snow-monkey-blocks/recent-posts",attributes:e})}):(0,s.jsx)(i.Placeholder,{icon:"editor-ul",label:(0,l.__)("Recent posts","snow-monkey-blocks"),children:(0,s.jsx)(i.Spinner,{})})})]})},save:function(){return(0,s.jsx)("div",{...r.useBlockProps.save(),"data-dynamic-block":"snow-monkey-blocks/recent-posts","data-version":"2"})},deprecated:b})})();7 (0,l.__)("Carousel (%1$s)","snow-monkey-blocks"),(0,l.__)("Rich media","snow-monkey-blocks"))},{value:"large-image",label:(0,l.__)("Large image","snow-monkey-blocks")}]})}),"carousel"===g&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>K!==t.uK.arrows.default,isShownByDefault:!0,label:(0,l.__)("Display arrows","snow-monkey-blocks"),onDeselect:()=>o({arrows:t.uK.arrows.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display arrows","snow-monkey-blocks"),checked:K,onChange:e=>o({arrows:e})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>N!==t.uK.dots.default,isShownByDefault:!0,label:(0,l.__)("Display dots","snow-monkey-blocks"),onDeselect:()=>o({dots:t.uK.dots.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display dots","snow-monkey-blocks"),checked:N,onChange:e=>o({dots:e})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>H!==t.uK.interval.default,isShownByDefault:!0,label:(0,l.__)("Autoplay Speed in seconds","snow-monkey-blocks"),onDeselect:()=>o({interval:t.uK.interval.default}),children:(0,s.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Autoplay Speed in seconds","snow-monkey-blocks"),help:(0,l.__)('If "0", no scroll.',"snow-monkey-blocks"),value:H,onChange:e=>o({interval:y(e,0,10)}),min:"0",max:"10"})}),0<H&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>V!==t.uK.autoplayButton.default,isShownByDefault:!0,label:(0,l.__)("Display pause button for autoplay","snow-monkey-blocks"),onDeselect:()=>o({autoplayButton:t.uK.autoplayButton.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display pause button for autoplay","snow-monkey-blocks"),checked:V,onChange:e=>o({autoplayButton:e})})})]}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>I!==t.uK.itemTitleTagName.default,isShownByDefault:!0,label:(0,l.__)("Title tag of each items","snow-monkey-blocks"),onDeselect:()=>o({itemTitleTagName:t.uK.itemTitleTagName.default}),children:(0,s.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Title tag of each items","snow-monkey-blocks"),id:"snow-monkey-blocks/recent-posts/item-title-tag-name",children:(0,s.jsx)("div",{className:"smb-list-icon-selector",children:(0,n.times)(q.length,(e=>(0,s.jsx)(i.Button,{variant:I===q[e]?"primary":"secondary",onClick:()=>o({itemTitleTagName:q[e]}),children:q[e]},e)))})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>j!==t.uK.itemThumbnailSizeSlug.default,isShownByDefault:!0,label:(0,l.__)("Images size of each items","snow-monkey-blocks"),onDeselect:()=>o({itemThumbnailSizeSlug:t.uK.itemThumbnailSizeSlug.default}),children:(0,s.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Images size of each items","snow-monkey-blocks"),value:j,options:X,onChange:e=>o({itemThumbnailSizeSlug:e})})}),"post"!==c&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>S!==t.uK.forceDisplayItemMeta.default,isShownByDefault:!0,label:(0,l.__)("Force display meta of each items","snow-monkey-blocks"),onDeselect:()=>o({forceDisplayItemMeta:t.uK.forceDisplayItemMeta.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Force display meta of each items","snow-monkey-blocks"),help:(0,l.__)("If it's already displayed, this setting will be ignored.","snow-monkey-blocks"),checked:S,onChange:e=>o({forceDisplayItemMeta:e})})}),("post"===c||S)&&"text"!==g&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>P!==!["text","text2"].includes(g),isShownByDefault:!0,label:(0,l.__)("Display author of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemAuthor:!["text","text2"].includes(g)}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display author of each items","snow-monkey-blocks"),checked:P,onChange:e=>o({displayItemAuthor:e})})}),("post"===c||S)&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>B!==t.uK.displayItemPublished.default,isShownByDefault:!0,label:(0,l.__)("Display published date of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemPublished:t.uK.displayItemPublished.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display published date of each items","snow-monkey-blocks"),checked:B,onChange:e=>o({displayItemPublished:e})})}),("post"===c||S)&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>v!==t.uK.displayItemModified.default,isShownByDefault:!0,label:(0,l.__)("Display modified date of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemModified:t.uK.displayItemModified.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display modified date of each items","snow-monkey-blocks"),checked:v,onChange:e=>o({displayItemModified:e})})}),"post"!==c&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>C!==t.uK.forceDisplayItemTerms.default,isShownByDefault:!0,label:(0,l.__)("Force display category label of each items","snow-monkey-blocks"),onDeselect:()=>o({forceDisplayItemTerms:t.uK.forceDisplayItemTerms.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Force display category label of each items","snow-monkey-blocks"),help:(0,l.__)("If it's already displayed, this setting will be ignored.","snow-monkey-blocks"),checked:C,onChange:e=>o({forceDisplayItemTerms:e})})}),["rich-media","simple","panel","carousel"].includes(g)&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>M===["rich-media","simple","panel","carousel"].includes(g),isShownByDefault:!0,label:(0,l.__)("Display excerpt of each items","snow-monkey-blocks"),onDeselect:()=>{o({displayItemExcerpt:["rich-media","simple","panel","carousel"].includes(g)})},children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display excerpt of each items","snow-monkey-blocks"),checked:M,onChange:e=>o({displayItemExcerpt:e})})}),("rich-media"===g||"panel"===g)&&(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>T!==t.uK.smCols.default,isShownByDefault:!0,label:(0,l.__)("Number of columns displayed on mobile device","snow-monkey-blocks"),onDeselect:()=>o({smCols:t.uK.smCols.default}),children:(0,s.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Number of columns displayed on mobile device","snow-monkey-blocks"),value:T,onChange:e=>o({smCols:y(e)}),options:[{value:0,label:(0,l.__)("Default","snow-monkey-blocks")},{value:1,label:(0,l.__)("1 column","snow-monkey-blocks")},{value:2,label:(0,l.__)("2 columns","snow-monkey-blocks")}]})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>w!==t.uK.ignoreStickyPosts.default,isShownByDefault:!0,label:(0,l.__)("Ignore sticky posts","snow-monkey-blocks"),onDeselect:()=>o({ignoreStickyPosts:t.uK.ignoreStickyPosts.default}),children:(0,s.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Ignore sticky posts","snow-monkey-blocks"),checked:w,onChange:e=>o({ignoreStickyPosts:e})})}),(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>D!==t.uK.noPostsText.default,isShownByDefault:!0,label:(0,l.__)("Text if no posts matched","snow-monkey-blocks"),onDeselect:()=>o({noPostsText:t.uK.noPostsText.default}),children:(0,s.jsx)(i.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Text if no posts matched","snow-monkey-blocks"),help:(0,l.__)("Allow HTML","snow-monkey-blocks"),value:D||"",onChange:e=>o({noPostsText:e})})})]})}),(0,s.jsx)(r.InspectorControls,{group:"dimensions",children:(0,s.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>k!==t.uK.gap.default,isShownByDefault:!0,label:(0,l.__)("The gap between each item","snow-monkey-blocks"),onDeselect:()=>o({gap:t.uK.gap.default}),panelId:a,children:(0,s.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,id:"snow-monkey-blocks/recent-posts/gap",label:(0,l.__)("The gap between each item","snow-monkey-blocks"),className:"spacing-sizes-control",children:(0,s.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"spacing-sizes-control__range-control",value:G.filter((e=>e.label?.toLowerCase()===k))?.[0]?.value,resetFallbackValue:void 0,onChange:e=>o({gap:G.filter((o=>o.value===e))?.[0]?.label?.toLowerCase()}),withInputField:!1,min:1,max:3,marks:!0,renderTooltipContent:e=>G.filter((o=>o.value===e))?.[0]?.label?.toUpperCase(),hideLabelFromVision:!0})})})}),(0,s.jsx)("div",{...(0,r.useBlockProps)(),children:A?(0,s.jsx)(i.Disabled,{children:(0,s.jsx)(d(),{block:"snow-monkey-blocks/recent-posts",attributes:e})}):(0,s.jsx)(i.Placeholder,{icon:"editor-ul",label:(0,l.__)("Recent posts","snow-monkey-blocks"),children:(0,s.jsx)(i.Spinner,{})})})]})},save:function(){return(0,s.jsx)("div",{...r.useBlockProps.save(),"data-dynamic-block":"snow-monkey-blocks/recent-posts","data-version":"2"})},deprecated:b})})(); -
snow-monkey-blocks/trunk/dist/blocks/section-break-the-grid/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' f5c9b7a08c8e1a2371a2');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '2183b53084ef35af6a57'); -
snow-monkey-blocks/trunk/dist/blocks/section-break-the-grid/index.js
r3390754 r3400189 1 (()=>{var e,o={6611:(e,o,t)=>{"use strict";const i=window.wp.blocks,a=window.wp.i18n,n=JSON.parse('{"UU":"snow-monkey-blocks/section-break-the-grid","uK":{"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-section-break-the-grid__figure > img, .smb-section-break-the-grid__figure > video","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-section-break-the-grid__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-section-break-the-grid__figure > img, .smb-section-break-the-grid__figure > video","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-section-break-the-grid__figure > img, .smb-section-break-the-grid__figure > video","attribute":"height","default":""},"imageMediaType":{"type":"string"},"textColor":{"type":"string"},"imagePosition":{"type":"string","default":"right"},"imageSize":{"type":"string","default":"40"},"imageMatchHeight":{"type":"boolean","default":false},"imageSizeSlug":{"type":"string","default":"full"},"verticalAlignment":{"type":"string","default":"center"},"contentSize":{"type":"string","default":"-20"},"contentHorizontalPosition":{"type":"string","default":"10"},"contentVerticalPosition":{"type":"string"},"contentBackgroundColor":{"type":"string"},"contentBackgroundOpacity":{"type":"number","default":0.98},"contentPadding":{"type":"string"},"removeContentOutsidePadding":{"type":"boolean","default":false},"shadowColor":{"type":"string"},"shadowHorizontalPosition":{"type":"number","default":5},"shadowVerticalPosition":{"type":"number","default":5},"maskColor":{"type":"string"},"maskGradientColor":{"type":"string"},"maskOpacity":{"type":"number","default":1},"mobileOrder":{"type":"string","default":""},"contentsAlignment":{"type":"string"},"title":{"type":"string","source":"html","selector":".smb-section__title","default":""},"subtitle":{"type":"string","source":"html","selector":".smb-section__subtitle","default":""},"lede":{"type":"string","source":"html","selector":".smb-section__lede","default":""},"wrapperTagName":{"type":"string","default":"div"},"titleTagName":{"type":"string","default":"h2"},"containerAlign":{"type":"string"},"disableContainerPadding":{"type":"boolean","default":false},"backgroundHorizontalPosition":{"type":"number","default":0},"backgroundVerticalPosition":{"type":"number","default":0},"isBackgroundNoOver":{"type":"boolean","default":false},"backgroundColor":{"type":"string"},"backgroundGradientColor":{"type":"string"},"backgroundTexture":{"type":"string"},"backgroundTextureOpacity":{"type":"number","default":1},"backgroundTextureUrl":{"type":"string"},"fixedBackgroundColor":{"type":"string"},"fixedBackgroundGradientColor":{"type":"string"},"fixedBackgroundTexture":{"type":"string"},"fixedBackgroundTextureOpacity":{"type":"number","default":1},"fixedBackgroundTextureUrl":{"type":"string"},"topDividerType":{"type":"string","default":"tilt"},"topDividerLevel":{"type":"number","default":0},"topDividerColor":{"type":"string","default":"#fff"},"topDividerVerticalPosition":{"type":"number","default":0},"topDividerOverlay":{"type":"boolean","default":true},"bottomDividerType":{"type":"string","default":"tilt"},"bottomDividerLevel":{"type":"number","default":0},"bottomDividerColor":{"type":"string","default":"#fff"},"bottomDividerVerticalPosition":{"type":"number","default":0},"bottomDividerOverlay":{"type":"boolean","default":true},"backgroundText":{"type":"object","default":{"text":"","color":"","fontSize":"","fontSizeSlug":"","lineHeight":"","opacity":0.2,"position":{"top":null,"right":null,"bottom":null,"left":null}}},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"align":["wide","full"],"anchor":true,"spacing":{"margin":true,"padding":["top","bottom"]},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":["title","subtitle","lede","backgroundText","imageID","imageURL","imageAlt","imageWidth","imageHeight","imageMediaType"]}}}}'),l=window.ReactJSXRuntime,r=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"6",y:"12.13",width:"12",height:"1"}),(0,l.jsx)("rect",{x:"3",y:"15.63",width:"18",height:"1"}),(0,l.jsx)("rect",{x:"6",y:"19.13",width:"12",height:"1"}),(0,l.jsx)("path",{d:"M9.41,9.05h.16L12,7.14l2.43,1.91h.16a.15.15,0,0,0,.16-.15V4a.15.15,0,0,0-.16-.15H9.41A.15.15,0,0,0,9.25,4V8.9A.15.15,0,0,0,9.41,9.05Z"})]});var s=t(6942),c=t.n(s),d=t(3558),u=t.n(d);const g=window.wp.blockEditor,m=window.wp.components,b=window.wp.data,h=window.wp.primitives;var _=(0,l.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(h.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),p=(0,l.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(h.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})});const k=window.lodash,x=window.wp.compose,v=(e,o=0,t=null)=>(e=Number(e),(isNaN(e)||e<o)&&(e=o),null!==t&&e>t&&(e=t),e),y=(e,o,t)=>{if(t=t||"#fff",0!==o)return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:(()=>{switch(e){case"tilt":return 0>o?(0,l.jsx)("path",{d:`m100,${100+o} L100,100 L0,100 z`,strokeWidth:"0",fill:t}):(0,l.jsx)("path",{d:`m0,${100-o} L100,100 L0,100 z`,strokeWidth:"0",fill:t});case"curve":return 0>o?(0,l.jsx)("path",{d:`m0,100 L100,100 Q50,${2*o+100},0,100 z`,strokeWidth:"0",fill:t}):(0,l.jsx)("path",{d:`m0,${100-o} q50,${2*o},100,0 V100 L0,100 z`,strokeWidth:"0",fill:t});case"wave":return 0>o?(0,l.jsx)("path",{d:`m0,${100+o/2} q20,${o},40,0 t40,0 t40,0 V100 L0,100 z`,strokeWidth:"0",fill:t}):(0,l.jsx)("path",{d:`m0,${100-o/2} q20,${o},40,0 t40,0 t40,0 V100 L0,100 z`,strokeWidth:"0",fill:t});case"triangle":return o=Math.abs(o),(0,l.jsx)("path",{d:`m${(100-o)/2},100 l${o},0 l${-1*o/2},${-1*o} z`,strokeWidth:"0",fill:t});case"triangle-large":return o=Math.abs(o),(0,l.jsx)("path",{d:`m0,100 l100,0 l-50,${-1*o} z`,strokeWidth:"0",fill:t})}})()})},w=e=>e.media_type?"image"===e.media_type?"image":"video":e.type,f=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function C(e=""){return!!e&&f.includes(function(e=""){const o=e.split(".");return o[o.length-1]}(e))}function V(e){if(null==e)return{};Object.keys(e).forEach((o=>{const t=e?.[o];null!==t&&""!==t||(e[o]=void 0)}));const o=0===parseFloat(e?.top)?0:e?.top,t=0===parseFloat(e?.right)?0:e?.right,i=0===parseFloat(e?.bottom)?0:e?.bottom,a=0===parseFloat(e?.left)?0:e?.left;return o===t===i===a&&void 0!==o?{padding:o}:o===i&&t===a&&void 0!==o&&void 0!==t?{padding:`${o} ${t}`}:o!==i&&t===a&&void 0!==o&&void 0!==i&&void 0!==t?{padding:`${o} ${t} ${i}`}:{paddingTop:o,paddingRight:t,paddingBottom:i,paddingLeft:a}}function P(){return(0,x.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const T=window.wp.element,j=({id:e,src:o,allowedTypes:t,accept:i,onSelect:n,onSelectURL:r,onRemove:s})=>(0,l.jsxs)(g.BlockControls,{group:"inline",children:[(0,l.jsx)(g.MediaReplaceFlow,{mediaId:e,mediaURL:o,allowedTypes:t,accept:i,onSelect:n,onSelectURL:r}),!!o&&!!s&&(0,l.jsx)(m.ToolbarButton,{onClick:s,children:(0,a.__)("Release","snow-monkey-blocks")})]}),N=({src:e,alt:o,id:t,style:i,width:a,height:n})=>(0,l.jsx)("img",{src:e,alt:o,className:`wp-image-${t}`,style:i,width:a,height:n}),O=({src:e,style:o,width:t,height:i})=>(0,l.jsx)("video",{src:e,style:o,width:t,height:i}),D=(0,T.memo)((({id:e,src:o,alt:t,url:i,width:a,height:n,target:r,allowedTypes:s,accept:c,onSelect:d,onSelectURL:u,onRemove:g,mediaType:m,style:b,rel:h,linkClass:_})=>{let p;if("image"===m){let s;p=(0,l.jsx)(N,{src:o,alt:t,id:e,style:b,width:a,height:n}),s=h?(0,k.isEmpty)(h)?void 0:h:"_self"!==r&&r?"noopener noreferrer":void 0,i&&(p=(0,l.jsx)("span",{href:i,target:"_self"===r?void 0:r,rel:s,className:_,children:p}))}else"video"===m&&(p=(0,l.jsx)(O,{src:o,style:b,width:a,height:n}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(j,{id:e,src:o,allowedTypes:s,accept:c,onSelect:d,onSelectURL:u,onRemove:g}),p]})}),((e,o)=>{const t=Object.keys(e);for(const i of t)if(e[i]!==o[i])return!1;return!0}));function B(e){const{src:o,onSelect:t,onSelectURL:i,mediaType:n,allowedTypes:r=["image"]}=e,s=!n&&o?"image":n;let c=(0,a.__)("Media","snow-monkey-blocks");1===r.length&&("image"===r[0]?c=(0,a.__)("Image","snow-monkey-blocks"):"video"===r[0]&&(c=(0,a.__)("Video","snow-monkey-blocks")));const d=(0,T.useMemo)((()=>r.map((e=>`${e}/*`)).join(",")),[r]);return o?(0,l.jsx)(D,{...e,accept:d,allowedTypes:r,mediaType:s}):(0,l.jsx)(g.MediaPlaceholder,{icon:"format-image",labels:{title:c},onSelect:t,onSelectURL:i,accept:d,allowedTypes:r})}const S=[{label:(0,a._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,a._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,a._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,a._x)("Full Size","Image size option for resolution control"),value:"full"}];function z({panelId:e,value:o,onChange:t,options:i=S,defaultValue:n=S[0].value,isShownByDefault:r=!0,withToolsPanelItem:s=!0}){const c=null!=o?o:n,d=()=>(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Resolution"),value:c,options:i,onChange:t,help:(0,a.__)("Select the size of the source image."),size:"__unstable-large"});return s?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>c!==n,label:(0,a.__)("Resolution"),onDeselect:()=>t(n),isShownByDefault:r,panelId:e,children:(0,l.jsx)(d,{})}):(0,l.jsx)(d,{})}var $=(0,l.jsxs)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,l.jsx)(h.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,l.jsx)(h.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});function H({label:e,onChange:o,value:t,withReset:i=!0},n){const r=(0,m.__experimentalUseCustomUnits)({availableUnits:["px","em","rem","%","vw"]}),s="smb-width-picker";return(0,l.jsx)("fieldset",{className:s,...n?{}:{ref:n},children:(0,l.jsx)("div",{className:`${s}__controls`,children:(0,l.jsxs)(m.Flex,{justify:"space-between",className:`${s}__custom-size-control`,children:[(0,l.jsx)(m.FlexItem,{isBlock:!0,children:(0,l.jsx)(m.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:e,labelPosition:"edge",value:t,onChange:e=>{e=0>parseFloat(e)||0===parseFloat(e)?void 0:e,o(e)},units:r})}),i&&(0,l.jsx)(m.FlexItem,{isBlock:!0,children:(0,l.jsx)(m.Button,{className:"components-color-palette__clear",disabled:void 0===t,onClick:()=>o(void 0),isSmall:!0,isSecondary:!0,children:(0,a.__)("Reset")})})]})})})}function I(e){const{label:o,sides:t,values:i,onChange:a,allowReset:n}=e,[r]=null!=g.useSettings?(0,g.useSettings)("spacing.units"):[(0,g.useSetting)("spacing.units")].filter(Boolean),s=(0,m.__experimentalUseCustomUnits)({availableUnits:r||["%","px","em","rem","vw"]});return(0,l.jsx)(m.BoxControl,{__next40pxDefaultSize:!0,values:i,onChange:a,label:o,sides:t,units:s,allowReset:n})}const M=({disableIsSlim:e,disableContentsMaxWidth:o,disableContainerAlign:t,disableDisableContainerPadding:i,disableCustomHeight:n,settings:r})=>{const[s,c]=(0,T.useState)(!n),d=P(),u=["div","section","aside"],g=["h1","h2","h3","none"];return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,a.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:d,children:r.map(((n,r)=>{if(n.hasOwnProperty("wrapperTagNameValue")&&n.hasOwnProperty("onWrapperTagNameChange")&&n.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.wrapperTagNameValue!==n.defaultValue,isShownByDefault:!0,label:(0,a.__)("Wrapper tag","snow-monkey-blocks"),onDeselect:()=>n.onWrapperTagNameChange(n.defaultValue),children:(0,l.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Wrapper tag","snow-monkey-blocks"),id:"snow-monkey-blocks/section/wrapper-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,k.times)(u.length,(e=>(0,l.jsx)(m.Button,{variant:n.wrapperTagNameValue===u[e]?"primary":"secondary",onClick:()=>{n.onWrapperTagNameChange(u[e])},children:u[e]},e)))})},r)},r);if(n.hasOwnProperty("titleTagNameValue")&&n.hasOwnProperty("onTitleTagNameChange")&&n.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.titleTagNameValue!==n.defaultValue,isShownByDefault:!0,label:(0,a.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>n.onTitleTagNameChange(n.defaultValue),children:(0,l.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/section/title-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,k.times)(g.length,(e=>(0,l.jsx)(m.Button,{variant:n.titleTagNameValue===g[e]?"primary":"secondary",onClick:()=>{n.onTitleTagNameChange(g[e])},children:g[e]},e)))})})},r);if(n.hasOwnProperty("heightValue")&&n.hasOwnProperty("onHeightChange")&&n.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.heightValue!==n.defaultValue,isShownByDefault:!0,label:(0,a.__)("Height","snow-monkey-blocks"),onDeselect:()=>{n.onHeightChange(n.defaultValue,n.defaultDisableCustomHeightValue),c(!n.defaultDisableCustomHeightValue)},children:(0,l.jsxs)("div",{children:[(0,l.jsx)(m.__experimentalSpacer,{children:(0,l.jsxs)(m.__experimentalHStack,{children:[(0,l.jsx)("span",{className:"components-base-control__label",children:s?(0,a.__)("Min height","snow-monkey-blocks"):(0,a.__)("Height","snow-monkey-blocks")}),(0,l.jsx)(m.Button,{label:s?(0,a.__)("Set custom size"):(0,a.__)("Use preset","snow-monkey-blocks"),icon:$,onClick:()=>{c(!s)},isPressed:s,isSmall:!0})]})}),s?(0,l.jsx)(m.__experimentalUnitControl,{__next40pxDefaultSize:!0,value:n.heightValue,onChange:e=>n.onHeightChange(e,!1)}):(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.heightValue,options:[{value:"fit",label:(0,a.__)("Fit","snow-monkey-blocks")},{value:"wide",label:(0,a.__)("Wide","snow-monkey-blocks")},{value:"full",label:(0,a.__)("Full","snow-monkey-blocks")}],onChange:e=>n.onHeightChange(e,!0)})]})},r);if(!t&&n.hasOwnProperty("containerAlignValue")&&n.hasOwnProperty("onContainerAlignChange")&&n.hasOwnProperty("defaultValue")){let e=[{value:"",label:(0,a.__)("Default","snow-monkey-blocks")},{value:"wide",label:(0,a.__)("Wide width","snow-monkey-blocks")},{value:"full",label:(0,a.__)("Full width","snow-monkey-blocks")}];return n.hasOwnProperty("contentsContainerControl")&&(e=e.concat([{value:"contents-wide",label:(0,a.__)("Wide width (Only contents)","snow-monkey-blocks")},{value:"contents-full",label:(0,a.__)("Full width (Only contents)","snow-monkey-blocks")}])),(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.containerAlignValue!==n.defaultValue,isShownByDefault:!0,label:(0,a.__)("Container alignment","snow-monkey-blocks"),onDeselect:()=>n.onContainerAlignChange(n.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Container alignment","snow-monkey-blocks"),value:n.containerAlignValue,onChange:n.onContainerAlignChange,options:e})},r)}return!i&&n.hasOwnProperty("disableContainerPaddingValue")&&n.hasOwnProperty("onDisableContainerPaddingChange")&&n.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.disableContainerPaddingValue!==n.defaultValue,isShownByDefault:!0,label:(0,a.__)("Remove container padding of the contents","snow-monkey-blocks"),onDeselect:()=>n.onDisableContainerPaddingChange(n.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Remove container padding of the contents","snow-monkey-blocks"),checked:n.disableContainerPaddingValue,onChange:n.onDisableContainerPaddingChange})},r):!o&&n.hasOwnProperty("contentsMaxWidthValue")&&n.hasOwnProperty("onContentsMaxWidthChange")&&n.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.contentsMaxWidthValue!==n.defaultValue,isShownByDefault:!0,label:(0,a.__)("Max width of the contents","snow-monkey-blocks"),onDeselect:()=>n.onContentsMaxWidthChange(n.defaultValue),children:(0,l.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Max width of the contents","snow-monkey-blocks"),id:"snow-monkey-blocks/section/contents-max-width",children:(0,l.jsx)(H,{value:n.contentsMaxWidthValue,onChange:n.onContentsMaxWidthChange})})},r):!e&&n.hasOwnProperty("isSlimValue")&&n.hasOwnProperty("onIsSlimChange")&&n.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.isSlimValue!==n.defaultValue,isShownByDefault:!0,label:(0,a.__)("Make the contents width slim","snow-monkey-blocks"),onDeselect:()=>n.onIsSlimChange(n.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Make the contents width slim","snow-monkey-blocks"),checked:n.isSlimValue,onChange:n.onIsSlimChange})},r):n.hasOwnProperty("paddingValue")&&n.hasOwnProperty("onPaddingChange")&&n.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.paddingValue!==n.defaultValue,isShownByDefault:!0,label:(0,a.__)("Padding","snow-monkey-blocks"),onDeselect:()=>n.onPaddingChange(n.defaultValue),children:(0,l.jsx)(I,{label:(0,a.__)("Padding","snow-monkey-blocks"),sides:n.sides?n.sides:void 0,values:n.paddingValue,onChange:n.onPaddingChange,allowReset:!1})},r):(0,l.jsx)(T.Fragment,{},r)}))})},L=e=>{const o=e.filter((e=>e.hasOwnProperty("titleValue")&&e.hasOwnProperty("titleTagNameValue")));return!!o&&o[0]},R=e=>c()("smb-section__header",{[`${e}__header`]:!!e}),A=e=>c()("smb-section__subtitle",{[`${e}__subtitle`]:!!e}),U=e=>c()("smb-section__title",{[`${e}__title`]:!!e}),G=e=>c()("smb-section__lede-wrapper",{[`${e}__lede-wrapper`]:!!e}),F=e=>c()("smb-section__lede",{[`${e}__lede`]:!!e}),K=({isSelected:e,className:o,settings:t})=>{const i=(e=>{const o=(e=>{const o=e.filter((e=>e.hasOwnProperty("subtitleValue")));return!!o&&o[0]})(e);return!!o&&!g.RichText.isEmpty(o.subtitleValue)})(t),n=(e=>{const o=(e=>{const o=e.filter((e=>e.hasOwnProperty("ledeValue")));return!!o&&o[0]})(e);return!!o&&!g.RichText.isEmpty(o.ledeValue)})(t),r=A(o),s=U(o),c=G(o),d=F(o);return(0,l.jsx)(l.Fragment,{children:t.map(((o,t)=>(i||e)&&o.hasOwnProperty("subtitleValue")&&o.hasOwnProperty("onSubtitleChange")?(0,l.jsx)(g.RichText,{className:r,value:o.subtitleValue,onChange:o.onSubtitleChange,placeholder:(0,a.__)("Write subtitle…","snow-monkey-blocks")},t):o.hasOwnProperty("titleTagNameValue")&&o.hasOwnProperty("titleValue")&&o.hasOwnProperty("onTitleChange")?(0,l.jsx)(g.RichText,{className:s,tagName:o.titleTagNameValue,value:o.titleValue,onChange:o.onTitleChange,placeholder:(0,a.__)("Write title…","snow-monkey-blocks")},t):(n||e)&&o.hasOwnProperty("ledeValue")&&o.hasOwnProperty("onLedeChange")?(0,l.jsx)("div",{className:c,children:(0,l.jsx)(g.RichText,{className:d,value:o.ledeValue,onChange:o.onLedeChange,placeholder:(0,a.__)("Write lede…","snow-monkey-blocks")})},t):(0,l.jsx)(T.Fragment,{},t)))})},W=({isSelected:e,hasContainer:o,containerClassName:t,className:i,settings:a})=>{const n=(e=>{const o=L(e);return!!o&&"none"!==o.titleTagNameValue})(a);if(!n)return(0,l.jsx)(l.Fragment,{});const r=(e=>{const o=L(e);return!!o&&!g.RichText.isEmpty(o.titleValue)&&"none"!==o.titleTagNameValue})(a);if(!r&&!e)return(0,l.jsx)(l.Fragment,{});const s=R(i);return(0,l.jsx)(l.Fragment,{children:o?(0,l.jsx)("div",{className:s,children:(0,l.jsx)("div",{className:t,children:(0,l.jsx)(K,{isSelected:e,className:i,settings:a})})}):(0,l.jsx)("div",{className:s,children:(0,l.jsx)(K,{isSelected:e,className:i,settings:a})})})},E=({title:e,titleTagName:o,subtitle:t,lede:i,className:a})=>{const n=!g.RichText.isEmpty(t),r=!g.RichText.isEmpty(i),s=A(a),c=U(a),d=G(a),u=F(a);return(0,l.jsxs)(l.Fragment,{children:[n&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:s,value:t}),(0,l.jsx)(g.RichText.Content,{tagName:o,className:c,value:e}),r&&(0,l.jsx)("div",{className:d,children:(0,l.jsx)(g.RichText.Content,{tagName:"div",className:u,value:i})})]})},q=({title:e,titleTagName:o,subtitle:t,lede:i,className:a,hasContainer:n,containerClassName:r})=>{if(g.RichText.isEmpty(e)||"none"===o)return(0,l.jsx)(l.Fragment,{});const s=R(a);return(0,l.jsx)(l.Fragment,{children:n?(0,l.jsx)("div",{className:s,children:(0,l.jsx)("div",{className:r,children:(0,l.jsx)(E,{title:e,titleTagName:o,subtitle:t,lede:i,className:a})})}):(0,l.jsx)("div",{className:s,children:(0,l.jsx)(E,{title:e,titleTagName:o,subtitle:t,lede:i,className:a})})})},J=[{value:"",label:(0,a.__)("None","snow-monkey-blocks")},{value:"stripe",label:(0,a.__)("Stripe","snow-monkey-blocks")},{value:"noise",label:(0,a.__)("Noise","snow-monkey-blocks")},{value:"dots",label:(0,a.__)("Dots","snow-monkey-blocks")},{value:"dots2",label:(0,a.__)("Dots 2","snow-monkey-blocks")}],Y=[{value:"tilt",label:(0,a.__)("Tilt","snow-monkey-blocks")},{value:"curve",label:(0,a.__)("Curve","snow-monkey-blocks")},{value:"wave",label:(0,a.__)("Wave","snow-monkey-blocks")},{value:"triangle",label:(0,a.__)("Triangle","snow-monkey-blocks")},{value:"triangle-large",label:(0,a.__)("Triangle (Large)","snow-monkey-blocks")}],Q=({hasColor:e,disableNoOver:o,hasTexture:t,settings:i})=>{const n=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),r=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,a.__)("Background (Movable)","snow-monkey-blocks"),dropdownMenuProps:r,children:i.map(((i,r)=>{if(i.hasOwnProperty("colorValue")&&i.hasOwnProperty("gradientValue")&&i.hasOwnProperty("onColorChange")&&i.hasOwnProperty("onGradientChange")&&i.hasOwnProperty("defaultColorValue")&&i.hasOwnProperty("defaultGradientValue"))return(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:i.colorValue,gradientValue:i.gradientValue,onColorChange:i.onColorChange,onGradientChange:i.onGradientChange}],__experimentalIsRenderedInSidebar:!0,...n})},r);if(e){if(i.hasOwnProperty("horizontalPositionValue")&&i.hasOwnProperty("onHorizontalPositionChange")&&i.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>i.horizontalPositionValue!==i.defaultValue,isShownByDefault:!0,label:(0,a.__)("Background position (Left / Right)","snow-monkey-blocks"),onDeselect:()=>i.onHorizontalPositionChange(i.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Background position (Left / Right)","snow-monkey-blocks"),value:i.horizontalPositionValue,onChange:i.onHorizontalPositionChange,min:"-90",max:"90"})},r);if(i.hasOwnProperty("verticalPositionValue")&&i.hasOwnProperty("onVerticalPositionChange")&&i.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>i.verticalPositionValue!==i.defaultValue,isShownByDefault:!0,label:(0,a.__)("Background Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>i.onVerticalPositionChange(i.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Background Position (Top / Bottom)","snow-monkey-blocks"),value:i.verticalPositionValue,onChange:i.onVerticalPositionChange,min:"-90",max:"90"})},r);if(!o&&i.hasOwnProperty("isNoOverValue")&&i.hasOwnProperty("onIsNoOverChange")&&i.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>i.isNoOverValue!==i.defaultValue,isShownByDefault:!0,label:(0,a.__)("Make sure the background doesn't overflow to the outside","snow-monkey-blocks"),onDeselect:()=>i.onIsNoOverChange(i.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Make sure the background doesn't overflow to the outside","snow-monkey-blocks"),checked:i.isNoOverValue,onChange:i.onIsNoOverChange})},r);if(i.hasOwnProperty("textureValue")&&i.hasOwnProperty("onTextureChange")&&i.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>i.textureValue!==i.defaultValue,isShownByDefault:!0,label:(0,a.__)("Texture","snow-monkey-blocks"),onDeselect:()=>i.onTextureChange(i.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Texture","snow-monkey-blocks"),value:i.textureValue,onChange:i.onTextureChange,options:J})},r);if(t&&i.hasOwnProperty("textureOpacityValue")&&i.hasOwnProperty("onTextureOpacityChange")&&i.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>i.textureOpacityValue!==i.defaultValue,isShownByDefault:!0,label:(0,a.__)("Texture opacity","snow-monkey-blocks"),onDeselect:()=>i.onTextureOpacityChange(i.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Texture opacity","snow-monkey-blocks"),value:Number(i.textureOpacityValue.toFixed(1)),onChange:i.onTextureOpacityChange,min:.1,max:1,step:.1})},r)}return(0,l.jsx)(T.Fragment,{},r)}))})},X=({hasTexture:e,settings:o})=>{const t=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),i=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,a.__)("Background (Fixed)","snow-monkey-blocks"),dropdownMenuProps:i,children:o.map(((o,i)=>o.hasOwnProperty("colorValue")&&o.hasOwnProperty("gradientValue")&&o.hasOwnProperty("onColorChange")&&o.hasOwnProperty("onGradientChange")&&o.hasOwnProperty("defaultColorValue")&&o.hasOwnProperty("defaultGradientValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:o.colorValue,gradientValue:o.gradientValue,onColorChange:o.onColorChange,onGradientChange:o.onGradientChange}],__experimentalIsRenderedInSidebar:!0,...t})},i):o.hasOwnProperty("textureValue")&&o.hasOwnProperty("onTextureChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>o.textureValue!==o.defaultValue,isShownByDefault:!0,label:(0,a.__)("Texture","snow-monkey-blocks"),onDeselect:()=>o.onTextureChange(o.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Texture","snow-monkey-blocks"),value:o.textureValue,onChange:o.onTextureChange,options:J},i)},i):e&&o.hasOwnProperty("textureOpacityValue")&&o.hasOwnProperty("onTextureOpacityChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>o.textureOpacityValue!==o.defaultValue,isShownByDefault:!0,label:(0,a.__)("Texture opacity","snow-monkey-blocks"),onDeselect:()=>o.onTextureOpacityChange(o.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Texture opacity","snow-monkey-blocks"),value:Number(o.textureOpacityValue.toFixed(1)),onChange:o.onTextureOpacityChange,min:.1,max:1,step:.1},i)},i):(0,l.jsx)(T.Fragment,{},i)))})},Z=({settings:e})=>{const o=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),t=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,a.__)("Top divider","snow-monkey-blocks"),dropdownMenuProps:t,children:e.map(((e,t)=>e.hasOwnProperty("typeValue")&&e.hasOwnProperty("onTypeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.typeValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Type","snow-monkey-blocks"),onDeselect:()=>e.onTypeChange(e.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Type","snow-monkey-blocks"),value:e.typeValue,onChange:e.onTypeChange,options:Y})},t):e.hasOwnProperty("levelValue")&&e.hasOwnProperty("onLevelChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.levelValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Level","snow-monkey-blocks"),onDeselect:()=>e.onLevelChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Level","snow-monkey-blocks"),value:e.levelValue,onChange:e.onLevelChange,min:"-100",max:"100"})},t):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultColorValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...o})},t):e.hasOwnProperty("verticalPositionValue")&&e.hasOwnProperty("onVerticalPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.verticalPositionValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>e.onVerticalPositionChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Position (Top / Bottom)","snow-monkey-blocks"),value:e.verticalPositionValue,onChange:e.onVerticalPositionChange,min:"-90",max:"90"})},t):e.hasOwnProperty("overlayValue")&&e.hasOwnProperty("onOverlayChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.overlayValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Overlap divider on content","snow-monkey-blocks"),onDeselect:()=>e.onOverlayChange(e.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Overlap divider on content","snow-monkey-blocks"),checked:e.overlayValue,onChange:e.onOverlayChange})},t):(0,l.jsx)(T.Fragment,{},t)))})},ee=({settings:e})=>{const o=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),t=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,a.__)("Bottom divider","snow-monkey-blocks"),dropdownMenuProps:t,children:e.map(((e,t)=>e.hasOwnProperty("typeValue")&&e.hasOwnProperty("onTypeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.typeValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Type","snow-monkey-blocks"),onDeselect:()=>e.onTypeChange(e.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Type","snow-monkey-blocks"),value:e.typeValue,onChange:e.onTypeChange,options:Y})},t):e.hasOwnProperty("levelValue")&&e.hasOwnProperty("onLevelChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.levelValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Level","snow-monkey-blocks"),onDeselect:()=>e.onLevelChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Level","snow-monkey-blocks"),value:e.levelValue,onChange:e.onLevelChange,min:"-100",max:"100"})},t):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultColorValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...o})},t):e.hasOwnProperty("verticalPositionValue")&&e.hasOwnProperty("onVerticalPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.verticalPositionValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>e.onVerticalPositionChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Position (Top / Bottom)","snow-monkey-blocks"),value:e.verticalPositionValue,onChange:e.onVerticalPositionChange,min:"-90",max:"90"})},t):e.hasOwnProperty("overlayValue")&&e.hasOwnProperty("onOverlayChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.overlayValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Overlap divider on content","snow-monkey-blocks"),onDeselect:()=>e.onOverlayChange(e.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Overlap divider on content","snow-monkey-blocks"),checked:e.overlayValue,onChange:e.onOverlayChange})},t):(0,l.jsx)(T.Fragment,{},t)))})},oe=({settings:e})=>{const o=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),t=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,a.__)("Background text","snow-monkey-blocks"),dropdownMenuProps:t,children:e.map(((e,t)=>e.hasOwnProperty("textValue")&&e.hasOwnProperty("onTextChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.textValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Text","snow-monkey-blocks"),onDeselect:()=>e.onTextChange(e.defaultValue),children:(0,l.jsx)(m.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Text","snow-monkey-blocks"),value:e.textValue,onChange:e.onTextChange})},t):e.hasOwnProperty("fontSizeValue")&&e.hasOwnProperty("onFontSizeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.fontSizeValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Size","snow-monkey-blocks"),onDeselect:()=>e.onFontSizeChange(e.defaultValue),children:(0,l.jsx)(g.FontSizePicker,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.fontSizeValue,onChange:e.onFontSizeChange,withReset:!1})},t):e.hasOwnProperty("lineHeightValue")&&e.hasOwnProperty("onLineHeightChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.lineHeightValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Line height","snow-monkey-blocks"),onDeselect:()=>e.onLineHeightChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Line height","snow-monkey-blocks"),value:e.lineHeightValue,onChange:e.onLineHeightChange,min:"0",max:"5",step:"0.1",initialPosition:void 0,allowReset:!0})},t):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,gradientValue:e.gradientValue,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange}],__experimentalIsRenderedInSidebar:!0,...o})},t):e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.opacityValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>e.onOpacityChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:.1,max:1,step:.1})},t):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.positionValue!==e.defaultValue,isShownByDefault:!0,label:(0,a.__)("Position","snow-monkey-blocks"),onDeselect:()=>e.onPositionChange(e.defaultValue),children:(0,l.jsx)(I,{label:(0,a.__)("Position","snow-monkey-blocks"),values:e.positionValue,onChange:e.onPositionChange})},t):(0,l.jsx)(T.Fragment,{},t)))})},te=({backgroundHorizontalPosition:e,backgroundVerticalPosition:o,isBackgroundNoOver:t,backgroundColor:i,backgroundGradientColor:a,backgroundTexture:n,backgroundTextureOpacity:l,backgroundTextureUrl:r,fixedBackgroundColor:s,fixedBackgroundGradientColor:c,fixedBackgroundTexture:d,fixedBackgroundTextureOpacity:u,fixedBackgroundTextureUrl:g,topDividerVerticalPosition:m,topDividerLevel:b,bottomDividerVerticalPosition:h,bottomDividerLevel:_,backgroundText:p})=>{const k=!!n,x=!!d,v={};return(!!i||!!a)&&(v["--smb-section--background-color"]=i,v["--smb-section--background-image"]=a,t?(0<e?v["--smb-section--background-left"]=`${Math.abs(e)}%`:0>e&&(v["--smb-section--background-right"]=`${Math.abs(e)}%`),0<o?v["--smb-section--background-top"]=`${Math.abs(o)}%`:0>o&&(v["--smb-section--background-bottom"]=`${Math.abs(o)}%`)):(e||o)&&(v["--smb-section--background-transform"]=`translate(${e||0}%, ${o||0}%)`)),r&&(v["--smb-section--background-texture-image"]=k?r?`url(${r})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${n}.png)`:void 0,v["--smb-section--background-texture-opacity"]=l?String(l):void 0),v["--smb-section--fixed-background-color"]=s||void 0,v["--smb-section--fixed-background-image"]=c||void 0,g&&(v["--smb-section--fixed-background-texture-image"]=x?g?`url(${g})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${d}.png)`:void 0,v["--smb-section--fixed-background-texture-opacity"]=u?String(u):void 0),v["--smb-section--dividers-top"]=m?`${m}%`:void 0,v["--smb-section--top-divider-level"]=b?`${b}px`:void 0,v["--smb-section--dividers-bottom"]=h?`${h}%`:void 0,v["--smb-section--bottom-divider-level"]=_?`${_}px`:void 0,p?.text&&(v["--smb-section--background-text-color"]=p?.color?p.color:void 0,v["--smb-section--background-text-opacity"]=p?.opacity?String(p.opacity):void 0,v["--smb-section--background-text-font-size"]=p?.fontSize&&!p?.fontSizeSlug?p.fontSize:void 0,v["--smb-section--background-line-height"]=p?.lineHeight?p.lineHeight:void 0,v["--smb-section--background-text-top"]=p?.position?.top&&p?.position?.top.match(/^\d+$/)?`${p?.position?.top}px`:p?.position?.top,v["--smb-section--background-text-right"]=p?.position?.right&&p.position.right.match(/^\d+$/)?`${p?.position?.right}px`:p?.position?.right,v["--smb-section--background-text-bottom"]=p?.position?.bottom&&p?.position?.bottom.match(/^\d+$/)?`${p?.position?.bottom}px`:p?.position?.bottom,v["--smb-section--background-text-left"]=p?.position?.left&&p?.position?.left.match(/^\d+$/)?`${p?.position?.left}px`:p?.position?.left),v},ie=({backgroundColor:e,backgroundGradientColor:o,backgroundTexture:t,fixedBackgroundColor:i,fixedBackgroundGradientColor:a,fixedBackgroundTexture:n,topDividerType:r,topDividerLevel:s,topDividerColor:d,bottomDividerType:u,bottomDividerLevel:m,bottomDividerColor:b,backgroundText:h,containerClasses:_})=>{const p=!!e||!!o,k=!!t,x=!!i||!!a,v=!!n,w=!!s,f=!!m,C=!!h?.text,V=c()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${r}`),P=c()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${u}`);return(0,l.jsx)(l.Fragment,{children:(x||v||p||k||w||f||C)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",children:[v&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture"}),(p||k)&&(0,l.jsx)("div",{className:"smb-section__background",children:k&&(0,l.jsx)("div",{className:"smb-section__background__texture"})}),C&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:_,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:c()("smb-section__background-text__text",{[`has-${h?.fontSizeSlug.replace(/(\d+?)([^-])/,"$1-$2")}-font-size`]:!!h?.fontSizeSlug}),children:(0,l.jsx)(g.RichText.Content,{value:h.text?.replace(/\n/g,"<br>")})})})})}),(w||f)&&(0,l.jsxs)("div",{className:"smb-section__dividers",children:[w&&(0,l.jsx)("div",{className:V,children:y(r,s,d)}),f&&(0,l.jsx)("div",{className:P,children:y(u,m,b)})]})]})})};function ae({settings:e,label:o}){const t=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),i=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:o||(0,a.__)("Box Shadow","snow-monkey-blocks"),className:"smb-box-shadow-tools-panel",dropdownMenuProps:i,resetAll:e=>{e.forEach((e=>e()))},children:e.map(((e,o)=>((e,o)=>{return e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultValue")?(t.colors=t.colors.map((e=>{const o=e.colors.filter((e=>!e.color.match(/^var\(/)));return!(1>o.length)&&(e.colors=o,e)})).filter(Boolean),(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange,resetAllFilter:()=>{e.onColorChange(e.defaultValue)}}],__experimentalIsRenderedInSidebar:!0,...t})},o)):e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Opacity","snow-monkey-blocks"),hasValue:()=>e.opacityValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onOpacityChange(e.defaultValue),resetAllFilter:()=>e.onOpacityChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:0,max:1,step:.1})},o):e.hasOwnProperty("horizontalValue")&&e.hasOwnProperty("onHorizontalChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Horizontal","snow-monkey-blocks"),hasValue:()=>e.horizontalValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onHorizontalChange(e.defaultValue),resetAllFilter:()=>e.onHorizontalChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Horizontal","snow-monkey-blocks"),value:e.horizontalValue,onChange:e.onHorizontalChange,min:null!==(i=e?.min)&&void 0!==i?i:-100,max:null!==(n=e?.max)&&void 0!==n?n:100})},o):e.hasOwnProperty("verticalValue")&&e.hasOwnProperty("onVerticalChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Vertical","snow-monkey-blocks"),hasValue:()=>e.verticalValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onVerticalChange(e.defaultValue),resetAllFilter:()=>e.onVerticalChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Vertical","snow-monkey-blocks"),value:e.verticalValue,onChange:e.onVerticalChange,min:null!==(r=e?.min)&&void 0!==r?r:-100,max:null!==(s=e?.max)&&void 0!==s?s:100})},o):e.hasOwnProperty("blurValue")&&e.hasOwnProperty("onBlurChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Blur","snow-monkey-blocks"),hasValue:()=>e.blurValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onBlurChange(e.defaultValue),resetAllFilter:()=>e.onBlurChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__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!==(d=e?.max)&&void 0!==d?d:100})},o):e.hasOwnProperty("spreadValue")&&e.hasOwnProperty("onSpreadChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Spread","snow-monkey-blocks"),hasValue:()=>e.spreadValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onSpreadChange(e.defaultValue),resetAllFilter:()=>e.onSpreadChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Spread","snow-monkey-blocks"),value:e.spreadValue,onChange:e.onSpreadChange,min:null!==(u=e?.min)&&void 0!==u?u:-100,max:null!==(b=e?.max)&&void 0!==b?b:100})},o):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Position","snow-monkey-blocks"),hasValue:()=>e.positionValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onPositionChange(e.defaultValue),resetAllFilter:()=>e.onPositionChange(e.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__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")}]})},o):null;var i,n,r,s,c,d,u,b})(e,o)))})}const ne=["image","video"],le="full",re=({backgroundColor:e,backgroundGradientColor:o,backgroundTexture:t,fixedBackgroundColor:i,fixedBackgroundGradientColor:a,fixedBackgroundTexture:n,topDividerType:r,topDividerLevel:s,topDividerColor:d,bottomDividerType:u,bottomDividerLevel:m,bottomDividerColor:b,backgroundText:h,containerClasses:_})=>{const p=!!e||!!o,k=!!t,x=!!i||!!a,v=!!n,w=!!s,f=!!m,C=!!h?.text,V=c()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${r}`),P=c()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${u}`),T={paddingTop:s?Math.abs(s):0,paddingBottom:m?Math.abs(m):0};return(0,l.jsx)(l.Fragment,{children:(x||v||p||k||w||f||C)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",style:T,children:[v&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture"}),(p||k)&&(0,l.jsx)("div",{className:"smb-section__background",children:k&&(0,l.jsx)("div",{className:"smb-section__background__texture"})}),C&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:_,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:c()("smb-section__background-text__text",{[`has-${h?.fontSizeSlug.replace(/(\d+?)([^-])/,"$1-$2")}-font-size`]:!!h?.fontSizeSlug}),children:(0,l.jsx)(g.RichText.Content,{value:h.text?.replace(/\n/g,"<br>")})})})})}),(w||f)&&(0,l.jsxs)("div",{className:"smb-section__dividers",children:[w&&(0,l.jsx)("div",{className:V,children:y(r,s,d)}),f&&(0,l.jsx)("div",{className:P,children:y(u,m,b)})]})]})})},se=({backgroundHorizontalPosition:e,backgroundVerticalPosition:o,isBackgroundNoOver:t,backgroundColor:i,backgroundGradientColor:a,backgroundTexture:n,backgroundTextureOpacity:r,backgroundTextureUrl:s,fixedBackgroundColor:d,fixedBackgroundGradientColor:u,fixedBackgroundTexture:m,fixedBackgroundTextureOpacity:b,fixedBackgroundTextureUrl:h,topDividerType:_,topDividerLevel:p,topDividerColor:k,topDividerVerticalPosition:x,bottomDividerType:v,bottomDividerLevel:w,bottomDividerColor:f,bottomDividerVerticalPosition:C,backgroundText:V,containerClasses:P})=>{const T=!!i||!!a,j=!!n,N=!!d||!!u,O=!!m,D=!!p,B=!!w,S=!!V?.text,z=c()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${_}`),$=c()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${v}`),H={};T&&(H.backgroundColor=i,H.backgroundImage=a,t?(0<e?H.left=`${Math.abs(e)}%`:0>e&&(H.right=`${Math.abs(e)}%`),0<o?H.top=`${Math.abs(o)}%`:0>o&&(H.bottom=`${Math.abs(o)}%`)):(e||o)&&(H.transform=`translate(${e||0}%, ${o||0}%)`));const I={backgroundImage:j?s?`url(${s})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${n}.png)`:void 0,opacity:r||void 0},M={paddingTop:p?Math.abs(p):0,paddingBottom:w?Math.abs(w):0,backgroundColor:d||void 0,backgroundImage:u||void 0},L={backgroundImage:O?h?`url(${h})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${m}.png)`:void 0,opacity:b||void 0},R={};x&&(R.top=`${x}%`),C&&(R.bottom=`${C}%`);const A={};return A.color=V?.color?V.color:void 0,A.opacity=V?.opacity&&1>V.opacity?V.opacity:void 0,A.fontSize=V?.fontSize&&!V?.fontSizeSlug?V.fontSize:void 0,A.lineHeight=V?.lineHeight?V.lineHeight:void 0,A.top=V?.position?.top?V.position.top:void 0,A.right=V?.position?.right?V.position.right:void 0,A.bottom=V?.position?.bottom?V.position.bottom:void 0,A.left=V?.position?.left?V.position.left:void 0,(0,l.jsx)(l.Fragment,{children:(N||O||T||j||D||B||S)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",style:M,children:[O&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture",style:L}),(T||j)&&(0,l.jsx)("div",{className:"smb-section__background",style:H,children:j&&(0,l.jsx)("div",{className:"smb-section__background__texture",style:I})}),S&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:P,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:c()("smb-section__background-text__text",{[`has-${V?.fontSizeSlug}-font-size`]:!!V?.fontSizeSlug}),style:A,children:(0,l.jsx)(g.RichText.Content,{value:V.text?.replace(/\n/g,"<br>")})})})})}),(D||B)&&(0,l.jsxs)("div",{className:"smb-section__dividers",style:R,children:[D&&(0,l.jsx)("div",{className:z,children:y(_,p,k)}),B&&(0,l.jsx)("div",{className:$,children:y(v,w,f)})]})]})})},ce=({backgroundHorizontalPosition:e,backgroundVerticalPosition:o,isBackgroundNoOver:t,backgroundColor:i,backgroundGradientColor:a,backgroundTexture:n,backgroundTextureOpacity:r,backgroundTextureUrl:s,fixedBackgroundColor:d,fixedBackgroundGradientColor:u,fixedBackgroundTexture:m,fixedBackgroundTextureOpacity:b,fixedBackgroundTextureUrl:h,topDividerType:_,topDividerLevel:p,topDividerColor:k,topDividerVerticalPosition:x,bottomDividerType:v,bottomDividerLevel:w,bottomDividerColor:f,bottomDividerVerticalPosition:C,backgroundText:V,containerClasses:P})=>{const T=!!i||!!a,j=!!n,N=!!d||!!u,O=!!m,D=!!p,B=!!w,S=!!V?.text,z=c()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${_}`),$=c()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${v}`),H={};T&&(H.backgroundColor=i,H.backgroundImage=a,t?(0<e?H.left=`${Math.abs(e)}%`:0>e&&(H.right=`${Math.abs(e)}%`),0<o?H.top=`${Math.abs(o)}%`:0>o&&(H.bottom=`${Math.abs(o)}%`)):(e||o)&&(H.transform=`translate(${e||0}%, ${o||0}%)`));const I={backgroundImage:j?s?`url(${s})`:`url(${smb.pluginUrl}/dist/block/section/img/${n}.png)`:void 0,opacity:r||void 0},M={paddingTop:p?Math.abs(p):0,paddingBottom:w?Math.abs(w):0,backgroundColor:d||void 0,backgroundImage:u||void 0},L={backgroundImage:O?h?`url(${h})`:`url(${smb.pluginUrl}/dist/block/section/img/${m}.png)`:void 0,opacity:b||void 0},R={};x&&(R.top=`${x}%`),C&&(R.bottom=`${C}%`);const A={};return A.color=V?.color?V.color:void 0,A.opacity=V?.opacity&&1>V.opacity?V.opacity:void 0,A.fontSize=V?.fontSize&&!V?.fontSizeSlug?V.fontSize:void 0,A.lineHeight=V?.lineHeight?V.lineHeight:void 0,A.top=V?.position?.top?V.position.top:void 0,A.right=V?.position?.right?V.position.right:void 0,A.bottom=V?.position?.bottom?V.position.bottom:void 0,A.left=V?.position?.left?V.position.left:void 0,(0,l.jsx)(l.Fragment,{children:(N||O||T||j||D||B||S)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",style:M,children:[O&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture",style:L}),(T||j)&&(0,l.jsx)("div",{className:"smb-section__background",style:H,children:j&&(0,l.jsx)("div",{className:"smb-section__background__texture",style:I})}),S&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:P,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:c()("smb-section__background-text__text",{[`has-${V?.fontSizeSlug}-font-size`]:!!V?.fontSizeSlug}),style:A,children:(0,l.jsx)(g.RichText.Content,{value:V.text?.replace(/\n/g,"<br>")})})})})}),(D||B)&&(0,l.jsxs)("div",{className:"smb-section__dividers",style:R,children:[D&&(0,l.jsx)("div",{className:z,children:y(_,p,k)}),B&&(0,l.jsx)("div",{className:$,children:y(v,w,f)})]})]})})},de=n.uK,ue=n.xY,ge=[{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},migrate:e=>({...e,style:{...e?.style,spacing:{...e?.style?.spacing,padding:{...e?.padding}}}}),save({attributes:e,className:o}){const{align:t,imageID:i,imageURL:a,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskGradientColor:O,maskOpacity:D,mobileOrder:B,contentsAlignment:S,title:z,subtitle:$,lede:H,wrapperTagName:I,titleTagName:M,containerAlign:L,disableContainerPadding:R,padding:A,backgroundHorizontalPosition:U,backgroundVerticalPosition:G,isBackgroundNoOver:F,backgroundColor:K,backgroundGradientColor:W,backgroundTexture:E,backgroundTextureOpacity:J,backgroundTextureUrl:Y,fixedBackgroundColor:Q,fixedBackgroundGradientColor:X,fixedBackgroundTexture:Z,fixedBackgroundTextureOpacity:ee,fixedBackgroundTextureUrl:oe,topDividerType:ae,topDividerLevel:ne,topDividerColor:le,topDividerVerticalPosition:re,topDividerOverlay:se,bottomDividerType:ce,bottomDividerLevel:de,bottomDividerColor:ue,bottomDividerVerticalPosition:ge,bottomDividerOverlay:me,backgroundText:be}=e,he=["right","left"].includes(b),_e="nowrap"===B&&he,pe=I,ke=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&he,[`smb-section-break-the-grid--mobile-${B}`]:!!B&&he,[`smb-section--${S}`]:!!S,"smb-section--top-divider-no-overlay":!se,"smb-section--bottom-divider-no-overlay":!me,[o]:!!o,"smb-section-break-the-grid--match-height":_&&he}),xe=c()("c-container",{alignfull:("full"===L||"contents-full"===L)&&"full"===t,alignwide:"wide"===L||"contents-wide"===L&&"full"===t,"c-container--no-padding":R}),ve=c()("c-row",{"c-row--lg-top":"top"===p&&he,"c-row--lg-middle":"center"===p&&he,"c-row--lg-bottom":"bottom"===p&&he}),ye=c()("c-row__col",{"c-row__col--1-1":!_e,"c-row__col--1-2":_e,"c-row__col--lg-1-2":he&&!_e}),we=c()("c-row__col",{"c-row__col--1-1":!_e,"c-row__col--1-2":_e,"c-row__col--lg-1-2":he&&!_e}),fe=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),Ce=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${S}`]:!!S,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),Ve=c()("smb-section__body","smb-section-break-the-grid__body"),Pe=c()("smb-section-break-the-grid__shadow"),Te=c()("smb-section-break-the-grid__mask"),je={"--smb-section--color":m||void 0,"--smb-section-break-the-grid--shadow-color":P||void 0,"--smb-section-break-the-grid--shadow-transform":T&&j?`translate(${T||0}%, ${j||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":y&&u()(y,w),"--smb-section-break-the-grid--mask-color":N||void 0,"--smb-section-break-the-grid--mask-image":O||void 0,"--smb-section-break-the-grid--mask-opacity":N||O?D:void 0,...V(A),...te({backgroundHorizontalPosition:U,backgroundVerticalPosition:G,isBackgroundNoOver:F,backgroundColor:K,backgroundGradientColor:W,backgroundTexture:E,backgroundTextureOpacity:J,backgroundTextureUrl:Y,fixedBackgroundColor:Q,fixedBackgroundGradientColor:X,fixedBackgroundTexture:Z,fixedBackgroundTextureOpacity:ee,fixedBackgroundTextureUrl:oe,topDividerVerticalPosition:re,topDividerLevel:ne,bottomDividerVerticalPosition:ge,bottomDividerLevel:de,backgroundText:be})};let Ne;return a&&("image"===d||void 0===d?Ne=(0,l.jsx)("img",{src:a,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${i}`}):"video"===d&&(Ne=(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:a,width:!!r&&r,height:!!s&&s}))),(0,l.jsxs)(pe,{...g.useBlockProps.save({className:ke,style:je}),children:[(0,l.jsx)(ie,{backgroundColor:K,backgroundGradientColor:W,backgroundTexture:E,fixedBackgroundColor:Q,fixedBackgroundGradientColor:X,fixedBackgroundTexture:Z,topDividerType:ae,topDividerLevel:ne,topDividerColor:le,bottomDividerType:ce,bottomDividerLevel:de,bottomDividerColor:ue,backgroundText:be,containerClasses:xe}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:xe,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:ve,children:[(0,l.jsx)("div",{className:ye,children:(0,l.jsxs)("div",{className:Ce,children:[(0,l.jsx)(q,{title:z,titleTagName:M,subtitle:$,lede:H,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:Ve})})]})}),(0,l.jsx)("div",{className:we,children:(0,l.jsxs)("div",{className:fe,children:[P&&(0,l.jsx)("div",{className:Pe}),0<Number((1-D).toFixed(1))&&(0,l.jsx)("div",{className:Te}),Ne]})})]})})})})]})}},{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},save({attributes:e,className:o}){const{align:t,imageID:i,imageURL:a,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskGradientColor:O,maskOpacity:D,mobileOrder:B,contentsAlignment:S,title:z,subtitle:$,lede:H,wrapperTagName:I,titleTagName:M,containerAlign:L,padding:R,backgroundHorizontalPosition:A,backgroundVerticalPosition:U,isBackgroundNoOver:G,backgroundColor:F,backgroundGradientColor:K,backgroundTexture:W,backgroundTextureOpacity:E,backgroundTextureUrl:J,fixedBackgroundColor:Y,fixedBackgroundGradientColor:Q,fixedBackgroundTexture:X,fixedBackgroundTextureOpacity:Z,fixedBackgroundTextureUrl:ee,topDividerType:oe,topDividerLevel:ie,topDividerColor:ae,topDividerVerticalPosition:ne,bottomDividerType:le,bottomDividerLevel:se,bottomDividerColor:ce,bottomDividerVerticalPosition:de,backgroundText:ue}=e,ge=["right","left"].includes(b),me="nowrap"===B&&ge,be=I,he=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&ge,[`smb-section-break-the-grid--mobile-${B}`]:!!B&&ge,[`smb-section--${S}`]:!!S,[o]:!!o,"smb-section-break-the-grid--match-height":_&&ge}),_e=c()("c-container",{alignfull:"full"===L&&"full"===t,alignwide:"wide"===L&&"full"===t}),pe=c()("c-row",{"c-row--lg-top":"top"===p&&ge,"c-row--lg-middle":"center"===p&&ge,"c-row--lg-bottom":"bottom"===p&&ge}),ke=c()("c-row__col",{"c-row__col--1-1":!me,"c-row__col--1-2":me,"c-row__col--lg-1-2":ge&&!me}),xe=c()("c-row__col",{"c-row__col--1-1":!me,"c-row__col--1-2":me,"c-row__col--lg-1-2":ge&&!me}),ve=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),ye=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${S}`]:!!S,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),we=c()("smb-section__body","smb-section-break-the-grid__body"),fe=c()("smb-section-break-the-grid__shadow"),Ce=c()("smb-section-break-the-grid__mask"),Ve={"--smb-section--color":m||void 0,"--smb-section-break-the-grid--shadow-color":P||void 0,"--smb-section-break-the-grid--shadow-transform":T&&j?`translate(${T||0}%, ${j||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":y&&u()(y,w),"--smb-section-break-the-grid--mask-color":N||void 0,"--smb-section-break-the-grid--mask-image":O||void 0,"--smb-section-break-the-grid--mask-opacity":N||O?D:void 0,...V(R),...te({backgroundHorizontalPosition:A,backgroundVerticalPosition:U,isBackgroundNoOver:G,backgroundColor:F,backgroundGradientColor:K,backgroundTexture:W,backgroundTextureOpacity:E,backgroundTextureUrl:J,fixedBackgroundColor:Y,fixedBackgroundGradientColor:Q,fixedBackgroundTexture:X,fixedBackgroundTextureOpacity:Z,fixedBackgroundTextureUrl:ee,topDividerVerticalPosition:ne,bottomDividerVerticalPosition:de,backgroundText:ue})};let Pe;return a&&("image"===d||void 0===d?Pe=(0,l.jsx)("img",{src:a,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${i}`}):"video"===d&&(Pe=(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:a,width:!!r&&r,height:!!s&&s}))),(0,l.jsxs)(be,{...g.useBlockProps.save({className:he,style:Ve}),children:[(0,l.jsx)(re,{backgroundColor:F,backgroundGradientColor:K,backgroundTexture:W,fixedBackgroundColor:Y,fixedBackgroundGradientColor:Q,fixedBackgroundTexture:X,topDividerType:oe,topDividerLevel:ie,topDividerColor:ae,bottomDividerType:le,bottomDividerLevel:se,bottomDividerColor:ce,backgroundText:ue,containerClasses:_e}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:_e,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:pe,children:[(0,l.jsx)("div",{className:ke,children:(0,l.jsxs)("div",{className:ye,children:[(0,l.jsx)(q,{title:z,titleTagName:M,subtitle:$,lede:H,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:we})})]})}),(0,l.jsx)("div",{className:xe,children:(0,l.jsxs)("div",{className:ve,children:[P&&(0,l.jsx)("div",{className:fe}),0<Number((1-D).toFixed(1))&&(0,l.jsx)("div",{className:Ce}),Pe]})})]})})})})]})}},{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},save({attributes:e,className:o}){const{align:t,imageID:i,imageURL:a,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskOpacity:O,mobileOrder:D,contentsAlignment:B,title:S,subtitle:z,lede:$,wrapperTagName:H,titleTagName:I,containerAlign:M,padding:L,backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:ie,topDividerVerticalPosition:ae,bottomDividerType:ne,bottomDividerLevel:le,bottomDividerColor:se,bottomDividerVerticalPosition:ce,backgroundText:de}=e,ue=["right","left"].includes(b),ge="nowrap"===D&&ue,me=H,be=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&ue,[`smb-section-break-the-grid--mobile-${D}`]:!!D&&ue,[`smb-section--${B}`]:!!B,[o]:!!o,"smb-section-break-the-grid--match-height":_&&ue}),he=c()("c-container",{alignfull:"full"===M&&"full"===t,alignwide:"wide"===M&&"full"===t}),_e=c()("c-row",{"c-row--lg-top":"top"===p&&ue,"c-row--lg-middle":"center"===p&&ue,"c-row--lg-bottom":"bottom"===p&&ue}),pe=c()("c-row__col",{"c-row__col--1-1":!ge,"c-row__col--1-2":ge,"c-row__col--lg-1-2":ue&&!ge}),ke=c()("c-row__col",{"c-row__col--1-1":!ge,"c-row__col--1-2":ge,"c-row__col--lg-1-2":ue&&!ge}),xe=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),ve=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${B}`]:!!B,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),ye=c()("smb-section__body","smb-section-break-the-grid__body"),we=c()("smb-section-break-the-grid__shadow"),fe=c()("smb-section-break-the-grid__mask"),Ce={"--smb-section--color":m||void 0,"--smb-section-break-the-grid--shadow-color":P||void 0,"--smb-section-break-the-grid--shadow-transform":T&&j?`translate(${T||0}%, ${j||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":y&&u()(y,w),"--smb-section-break-the-grid--mask-color":N||void 0,"--smb-section-break-the-grid--mask-opacity":N?O:void 0,...V(L),...te({backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerVerticalPosition:ae,bottomDividerVerticalPosition:ce,backgroundText:de})};let Ve;return a&&("image"===d||void 0===d?Ve=(0,l.jsx)("img",{src:a,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${i}`}):"video"===d&&(Ve=(0,l.jsx)("video",{controls:!0,src:a,width:!!r&&r,height:!!s&&s}))),(0,l.jsxs)(me,{...g.useBlockProps.save({className:be,style:Ce}),children:[(0,l.jsx)(re,{backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,topDividerType:ee,topDividerLevel:oe,topDividerColor:ie,bottomDividerType:ne,bottomDividerLevel:le,bottomDividerColor:se,backgroundText:de,containerClasses:he}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:he,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:_e,children:[(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:ve,children:[(0,l.jsx)(q,{title:S,titleTagName:I,subtitle:z,lede:$,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:ye})})]})}),(0,l.jsx)("div",{className:ke,children:(0,l.jsxs)("div",{className:xe,children:[P&&(0,l.jsx)("div",{className:we}),0<Number((1-O).toFixed(1))&&(0,l.jsx)("div",{className:fe}),Ve]})})]})})})})]})}},{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},save({attributes:e,className:o}){const{align:t,imageID:i,imageURL:a,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskOpacity:O,mobileOrder:D,contentsAlignment:B,title:S,subtitle:z,lede:$,wrapperTagName:H,titleTagName:I,containerAlign:M,padding:L,backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:te,topDividerVerticalPosition:ie,bottomDividerType:ae,bottomDividerLevel:ne,bottomDividerColor:le,bottomDividerVerticalPosition:re,backgroundText:ce}=e,de=["right","left"].includes(b),ue="nowrap"===D&&de,ge=H,me=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&de,[`smb-section-break-the-grid--mobile-${D}`]:!!D&&de,[`smb-section--${B}`]:!!B,[o]:!!o,"smb-section-break-the-grid--match-height":_&&de}),be=c()("c-container",{alignfull:"full"===M&&"full"===t,alignwide:"wide"===M&&"full"===t}),he=c()("c-row",{"c-row--lg-top":"top"===p&&de,"c-row--lg-middle":"center"===p&&de,"c-row--lg-bottom":"bottom"===p&&de}),_e=c()("c-row__col",{"c-row__col--1-1":!ue,"c-row__col--1-2":ue,"c-row__col--lg-1-2":de&&!ue}),pe=c()("c-row__col",{"c-row__col--1-1":!ue,"c-row__col--1-2":ue,"c-row__col--lg-1-2":de&&!ue}),ke=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),xe=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${B}`]:!!B,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),ve=c()("smb-section__body","smb-section-break-the-grid__body"),ye=c()("smb-section-break-the-grid__shadow"),we=c()("smb-section-break-the-grid__mask"),fe={color:m||void 0,...V(L)},Ce={};P&&(Ce.backgroundColor=P),(T||j)&&(Ce.transform=`translate(${T||0}%, ${j||0}%)`);const Ve={backgroundColor:y&&u()(y,w)},Pe={};N&&(Pe.backgroundColor=N);const Te={opacity:N?O:void 0};let je;return a&&("image"===d||void 0===d?je=(0,l.jsx)("img",{src:a,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${i}`,style:Te}):"video"===d&&(je=(0,l.jsx)("video",{controls:!0,src:a,width:!!r&&r,height:!!s&&s,style:Te}))),(0,l.jsxs)(ge,{...g.useBlockProps.save({className:me,style:fe}),children:[(0,l.jsx)(se,{backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:te,topDividerVerticalPosition:ie,bottomDividerType:ae,bottomDividerLevel:ne,bottomDividerColor:le,bottomDividerVerticalPosition:re,backgroundText:ce,containerClasses:be}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:be,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:he,children:[(0,l.jsx)("div",{className:_e,children:(0,l.jsxs)("div",{className:xe,style:Ve,children:[(0,l.jsx)(q,{title:S,titleTagName:I,subtitle:z,lede:$,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:ve})})]})}),(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:ke,children:[P&&(0,l.jsx)("div",{className:ye,style:Ce}),0<Number((1-O).toFixed(1))&&(0,l.jsx)("div",{className:we,style:Pe}),je]})})]})})})})]})}},{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},save({attributes:e,className:o}){const{align:t,imageID:i,imageURL:a,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskOpacity:O,mobileOrder:D,contentsAlignment:B,title:S,subtitle:z,lede:$,wrapperTagName:H,titleTagName:I,containerAlign:M,padding:L,backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:te,topDividerVerticalPosition:ie,bottomDividerType:ae,bottomDividerLevel:ne,bottomDividerColor:le,bottomDividerVerticalPosition:re,backgroundText:se}=e,de=["right","left"].includes(b),ue="nowrap"===D&&de,ge=H,me=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&de,[`smb-section-break-the-grid--mobile-${D}`]:!!D&&de,[`smb-section--${B}`]:!!B,[o]:!!o,"smb-section-break-the-grid--match-height":_&&de}),be=c()("c-container",{alignfull:"full"===M&&"full"===t,alignwide:"wide"===M&&"full"===t}),he=c()("c-row",{"c-row--lg-top":"top"===p&&de,"c-row--lg-middle":"center"===p&&de,"c-row--lg-bottom":"bottom"===p&&de}),_e=c()("c-row__col",{"c-row__col--1-1":!ue,"c-row__col--1-2":ue,"c-row__col--lg-1-2":de&&!ue}),pe=c()("c-row__col",{"c-row__col--1-1":!ue,"c-row__col--1-2":ue,"c-row__col--lg-1-2":de&&!ue}),ke=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),xe=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${B}`]:!!B,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),ve=c()("smb-section__body","smb-section-break-the-grid__body"),ye=c()("smb-section-break-the-grid__shadow"),we=c()("smb-section-break-the-grid__mask"),fe={color:m||void 0,...V(L)},Ce={};P&&(Ce.backgroundColor=P),(T||j)&&(Ce.transform=`translate(${T||0}%, ${j||0}%)`);const Ve={backgroundColor:y&&u()(y,w)},Pe={};N&&(Pe.backgroundColor=N);const Te={opacity:N?O:void 0};let je;return a&&("image"===d||void 0===d?je=(0,l.jsx)("img",{src:a,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${i}`,style:Te}):"video"===d&&(je=(0,l.jsx)("video",{controls:!0,src:a,width:!!r&&r,height:!!s&&s,style:Te}))),(0,l.jsxs)(ge,{...g.useBlockProps.save({className:me,style:fe}),children:[(0,l.jsx)(ce,{backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:te,topDividerVerticalPosition:ie,bottomDividerType:ae,bottomDividerLevel:ne,bottomDividerColor:le,bottomDividerVerticalPosition:re,backgroundText:se,containerClasses:be}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:be,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:he,children:[(0,l.jsx)("div",{className:_e,children:(0,l.jsxs)("div",{className:xe,style:Ve,children:[(0,l.jsx)(q,{title:S,titleTagName:I,subtitle:z,lede:$,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:ve})})]})}),(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:ke,children:[P&&(0,l.jsx)("div",{className:ye,style:Ce}),0<Number((1-O).toFixed(1))&&(0,l.jsx)("div",{className:we,style:Pe}),je]})})]})})})})]})}},{attributes:{...de,imageSize:{type:"string",default:"l"},contentSize:{type:"string",default:"s"},contentHorizontalPosition:{type:"string",default:"s"}},supports:{align:["wide","full"],anchor:!0},migrate(e){let o={...e};if(o.imageSize)switch(o.imageSize){case"m":default:o.imageSize="";break;case"l":o.imageSize="40";break;case"xl":o.imageSize="80"}if(o.contentSize)switch(o.contentSize){case"xs":o.contentSize="-40";break;case"s":o.contentSize="-20";break;case"m":default:o.contentSize="";break;case"l":o.contentSize="20";break;case"xl":o.contentSize="40"}if(o.contentHorizontalPosition)switch(o.contentHorizontalPosition){case"xs":o.contentHorizontalPosition="5";break;case"s":o.contentHorizontalPosition="10";break;case"m":o.contentHorizontalPosition="15";break;case"l":o.contentHorizontalPosition="20";break;case"xl":o.contentHorizontalPosition="25";break;default:o.contentHorizontalPosition=""}if(o.contentVerticalPosition)switch(o.contentVerticalPosition){case"txl":o.contentVerticalPosition="t100";break;case"tl":o.contentVerticalPosition="t80";break;case"tm":o.contentVerticalPosition="t60";break;case"ts":o.contentVerticalPosition="t40";break;case"bs":o.contentVerticalPosition="b40";break;case"bm":o.contentVerticalPosition="b60";break;case"bl":o.contentVerticalPosition="b80";break;case"bxl":o.contentVerticalPosition="b100";break;default:o.contentVerticalPosition=""}return o.className&&(o.className=(0,k.without)(o.className.split(" "),"smb-section--left","smb-section--center","smb-section--right").join(" ")),o.className||(o=(0,k.omit)(o,"className")),{...o}},save({attributes:e,className:o}){const{wrapperTagName:t,titleTagName:i,title:a,subtitle:n,lede:r,imageID:s,imageURL:d,imageAlt:m,imageWidth:b,imageHeight:h,imageMediaType:_,textColor:p,imagePosition:k,imageSize:x,verticalAlignment:v,contentSize:y,contentHorizontalPosition:w,contentVerticalPosition:f,contentBackgroundColor:C,contentBackgroundOpacity:V,contentPadding:P,removeContentOutsidePadding:T,shadowColor:j,shadowHorizontalPosition:N,shadowVerticalPosition:O,maskColor:D,maskOpacity:B,mobileOrder:S,contentsAlignment:z}=e,$=t,H=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${k}`,{[`smb-section-break-the-grid--vertical-${f}`]:f&&v&&"middle"!==v,[`smb-section-break-the-grid--mobile-${S}`]:!!S,[`smb-section--${z}`]:!!z,[o]:!!o}),I=c()("c-row","c-row--margin",{"c-row--lg-top":"top"===v,"c-row--lg-middle":"center"===v,"c-row--lg-bottom":"bottom"===v}),M=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),L=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),R=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${x}`]:!!x}),A=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${y}`]:!!y,[`smb-section-break-the-grid__content--p-${P}`]:!!P,[`smb-section-break-the-grid__content--horizontal-${w}`]:!!w,"smb-section-break-the-grid__content--remove-outside-p":P&&T}),U=c()("smb-section-break-the-grid__shadow"),G=c()("smb-section-break-the-grid__mask"),F=!g.RichText.isEmpty(a)&&"none"!==i,K=!g.RichText.isEmpty(n),W=!g.RichText.isEmpty(r),E={color:p||void 0},q={};j&&(q.backgroundColor=j),(N||O)&&(q.transform=`translate(${N||0}%, ${O||0}%)`);const J={backgroundColor:C&&u()(C,V)},Y={};D&&(Y.backgroundColor=D);const Q={opacity:D?B:void 0};let X;return d&&("image"===_||void 0===_?X=(0,l.jsx)("img",{src:d,alt:m,width:!!b&&b,height:!!h&&h,className:`wp-image-${s}`,style:Q}):"video"===_&&(X=(0,l.jsx)("video",{controls:!0,src:d,width:!!b&&b,height:!!h&&h,style:Q}))),(0,l.jsx)($,{...g.useBlockProps.save({className:H,style:E}),children:(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:"c-container",children:(0,l.jsxs)("div",{className:I,children:[(0,l.jsx)("div",{className:M,children:(0,l.jsxs)("div",{className:A,style:J,children:[F&&K&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__subtitle smb-section-break-the-grid__subtitle",value:n}),F&&(0,l.jsx)(g.RichText.Content,{tagName:i,className:"smb-section__title smb-section-break-the-grid__title",value:a}),F&&W&&(0,l.jsx)("div",{className:"smb-section__lede-wrapper smb-section-break-the-grid__lede-wrapper",children:(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__lede smb-section-break-the-grid__lede",value:r})}),(0,l.jsx)("div",{className:"smb-section__body smb-section-break-the-grid__body",children:(0,l.jsx)(g.InnerBlocks.Content,{})})]})}),(0,l.jsx)("div",{className:L,children:(0,l.jsxs)("div",{className:R,children:[j&&(0,l.jsx)("div",{className:U,style:q}),0<Number((1-B).toFixed(1))&&(0,l.jsx)("div",{className:G,style:Y}),X]})})]})})})})}},{attributes:{...de},supports:{align:["wide","full"],anchor:!0},save({attributes:e,className:o}){const{wrapperTagName:t,titleTagName:i,title:a,subtitle:n,lede:r,imageID:s,imageURL:d,imageAlt:m,imageWidth:b,imageHeight:h,imageMediaType:_,textColor:p,imagePosition:k,imageSize:x,verticalAlignment:v,contentSize:y,contentHorizontalPosition:w,contentVerticalPosition:f,contentBackgroundColor:C,contentBackgroundOpacity:V,contentPadding:P,removeContentOutsidePadding:T,shadowColor:j,shadowHorizontalPosition:N,shadowVerticalPosition:O,maskColor:D,maskOpacity:B,mobileOrder:S}=e,z=t,$=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${k}`,{[`smb-section-break-the-grid--vertical-${f}`]:f&&v&&"middle"!==v,[`smb-section-break-the-grid--mobile-${S}`]:!!S,[o]:!!o}),H=c()("c-row","c-row--margin",{"c-row--lg-top":"top"===v,"c-row--lg-middle":"center"===v,"c-row--lg-bottom":"bottom"===v}),I=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),M=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),L=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${x}`]:!!x}),R=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${y}`]:!!y,[`smb-section-break-the-grid__content--p-${P}`]:!!P,[`smb-section-break-the-grid__content--horizontal-${w}`]:!!w,"smb-section-break-the-grid__content--remove-outside-p":P&&T}),A=c()("smb-section-break-the-grid__shadow"),U=c()("smb-section-break-the-grid__mask"),G={color:p||void 0},F={};j&&(F.backgroundColor=j),(N||O)&&(F.transform=`translate(${N||0}%, ${O||0}%)`);const K={backgroundColor:C&&u()(C,V)},W={};D&&(W.backgroundColor=D);const E={opacity:D?B:void 0};let q;return d&&("image"===_||void 0===_?q=(0,l.jsx)("img",{src:d,alt:m,width:!!b&&b,height:!!h&&h,className:`wp-image-${s}`,style:E}):"video"===_&&(q=(0,l.jsx)("video",{controls:!0,src:d,width:!!b&&b,height:!!h&&h,style:E}))),(0,l.jsx)(z,{...g.useBlockProps.save({className:$,style:G}),children:(0,l.jsx)("div",{className:"c-container",children:(0,l.jsxs)("div",{className:H,children:[(0,l.jsx)("div",{className:I,children:(0,l.jsxs)("div",{className:R,style:K,children:[!g.RichText.isEmpty(a)&&!g.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__subtitle smb-section-break-the-grid__subtitle",value:n}),!g.RichText.isEmpty(a)&&"none"!==i&&(0,l.jsx)(g.RichText.Content,{tagName:i,className:"smb-section__title smb-section-break-the-grid__title",value:a}),!g.RichText.isEmpty(a)&&!g.RichText.isEmpty(r)&&"none"!==i&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__lede smb-section-break-the-grid__lede",value:r}),(0,l.jsx)("div",{className:"smb-section__body smb-section-break-the-grid__body",children:(0,l.jsx)(g.InnerBlocks.Content,{})})]})}),(0,l.jsx)("div",{className:M,children:(0,l.jsxs)("div",{className:L,children:[j&&(0,l.jsx)("div",{className:A,style:F}),0<Number((1-B).toFixed(1))&&(0,l.jsx)("div",{className:U,style:W}),q]})})]})})})}},{attributes:{...de,verticalAlignment:{type:"string",default:"middle"}},migrate:e=>({...e,verticalAlignment:"middle"===e.verticalAlignment?"center":e.verticalAlignment}),save({attributes:e,className:o}){const{wrapperTagName:t,titleTagName:i,title:a,subtitle:n,lede:r,imageID:s,imageURL:d,imageAlt:m,imageWidth:b,imageHeight:h,imageMediaType:_,textColor:p,imagePosition:k,imageSize:x,verticalAlignment:v,contentSize:y,contentHorizontalPosition:w,contentVerticalPosition:f,contentBackgroundColor:C,contentBackgroundOpacity:V,contentPadding:P,removeContentOutsidePadding:T,shadowColor:j,shadowHorizontalPosition:N,shadowVerticalPosition:O,maskColor:D,maskOpacity:B,mobileOrder:S}=e,z=t,$=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${k}`,{[`smb-section-break-the-grid--vertical-${f}`]:f&&v&&"middle"!==v,[`smb-section-break-the-grid--mobile-${S}`]:!!S,[o]:!!o}),H=c()("c-row","c-row--margin",{[`c-row--lg-${v}`]:!0}),I=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),M=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),L=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${x}`]:!!x}),R=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${y}`]:!!y,[`smb-section-break-the-grid__content--p-${P}`]:!!P,[`smb-section-break-the-grid__content--horizontal-${w}`]:!!w,"smb-section-break-the-grid__content--remove-outside-p":P&&T}),A=c()("smb-section-break-the-grid__shadow"),U=c()("smb-section-break-the-grid__mask"),G={color:p||void 0},F={};j&&(F.backgroundColor=j),(N||O)&&(F.transform=`translate(${N||0}%, ${O||0}%)`);const K={backgroundColor:C&&u()(C,V)},W={};D&&(W.backgroundColor=D);const E={opacity:B};let q;return d&&("image"===_||void 0===_?q=(0,l.jsx)("img",{src:d,alt:m,width:!!b&&b,height:!!h&&h,className:`wp-image-${s}`,style:E}):"video"===_&&(q=(0,l.jsx)("video",{controls:!0,src:d,width:!!b&&b,height:!!h&&h,style:E}))),(0,l.jsx)(z,{className:$,style:G,children:(0,l.jsx)("div",{className:"c-container",children:(0,l.jsxs)("div",{className:H,children:[(0,l.jsx)("div",{className:I,children:(0,l.jsxs)("div",{className:R,style:K,children:[!g.RichText.isEmpty(a)&&!g.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__subtitle smb-section-break-the-grid__subtitle",value:n}),!g.RichText.isEmpty(a)&&"none"!==i&&(0,l.jsx)(g.RichText.Content,{tagName:i,className:"smb-section__title smb-section-break-the-grid__title",value:a}),!g.RichText.isEmpty(a)&&!g.RichText.isEmpty(r)&&"none"!==i&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__lede smb-section-break-the-grid__lede",value:r}),(0,l.jsx)("div",{className:"smb-section__body smb-section-break-the-grid__body",children:(0,l.jsx)(g.InnerBlocks.Content,{})})]})}),(0,l.jsx)("div",{className:M,children:(0,l.jsxs)("div",{className:L,children:[j&&(0,l.jsx)("div",{className:A,style:F}),0<Number((1-B).toFixed(1))&&(0,l.jsx)("div",{className:U,style:W}),q]})})]})})})}}],me={to:[{type:"block",blocks:["snow-monkey-blocks/section"],transform:(e,o)=>(0,i.createBlock)("snow-monkey-blocks/section",e,o)},{type:"block",blocks:["snow-monkey-blocks/section-side-heading"],transform:(e,o)=>(0,i.createBlock)("snow-monkey-blocks/section-side-heading",e,o)},{type:"block",blocks:["snow-monkey-blocks/section-with-bgimage"],transform:(e,o)=>(e.lgImageID=e.imageID,e.lgImageURL=e.imageURL,e.lgImageAlt=e.imageAlt,e.lgImageWidth=e.imageWidth,e.lgImageHeight=e.imageHeight,e.lgImageMediaType=e.imageMediaType,(0,i.createBlock)("snow-monkey-blocks/section-with-bgimage",e,o))}]},be={attributes:{title:"Lorem",imageID:1,imageURL:`${smb.pluginUrl}/dist/img/photos/0117_xlarge.jpg`},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"}}]};(0,i.registerBlockType)(n.UU,{icon:{foreground:"#cd162c",src:r},keywords:[(0,a.__)("Outer","snow-monkey-blocks"),(0,a.__)("Wrapper","snow-monkey-blocks"),(0,a.__)("Container","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:o,isSelected:t,className:i,clientId:r}){const{align:s,imageID:d,imageURL:h,imageAlt:k,imageWidth:x,imageHeight:y,imageSizeSlug:f,imageMediaType:V,textColor:T,imagePosition:j,imageSize:N,imageMatchHeight:O,verticalAlignment:D,contentSize:S,contentHorizontalPosition:$,contentVerticalPosition:H,contentBackgroundColor:I,contentBackgroundOpacity:L,contentPadding:R,removeContentOutsidePadding:A,shadowColor:U,shadowHorizontalPosition:G,shadowVerticalPosition:F,maskColor:K,maskGradientColor:E,maskOpacity:q,mobileOrder:J,contentsAlignment:Y,title:re,subtitle:se,lede:ce,wrapperTagName:de,titleTagName:ue,containerAlign:ge,disableContainerPadding:me,backgroundHorizontalPosition:be,backgroundVerticalPosition:he,isBackgroundNoOver:_e,backgroundColor:pe,backgroundGradientColor:ke,backgroundTexture:xe,backgroundTextureOpacity:ve,backgroundTextureUrl:ye,fixedBackgroundColor:we,fixedBackgroundGradientColor:fe,fixedBackgroundTexture:Ce,fixedBackgroundTextureOpacity:Ve,fixedBackgroundTextureUrl:Pe,topDividerType:Te,topDividerLevel:je,topDividerColor:Ne,topDividerVerticalPosition:Oe,topDividerOverlay:De,bottomDividerType:Be,bottomDividerLevel:Se,bottomDividerColor:ze,bottomDividerVerticalPosition:$e,bottomDividerOverlay:He,backgroundText:Ie,templateLock:Me}=e,Le=(0,b.useSelect)((e=>!!e("core/block-editor").getBlock(r)?.innerBlocks?.length),[r]),Re=(0,b.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),Ae=(0,b.useSelect)((e=>d?e("core").getMedia(d,{context:"view"}):null),[d]),Ue=Re.filter((({slug:e})=>Ae?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:o})=>({value:o,label:e}))),Ge=["right","left"].includes(j),Fe="nowrap"===J&&Ge,Ke=de,We=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${j}`,{[`smb-section-break-the-grid--vertical-${H}`]:H&&D&&"center"!==D&&Ge,[`smb-section-break-the-grid--mobile-${J}`]:!!J&&Ge,[`smb-section--${Y}`]:!!Y,"smb-section--top-divider-no-overlay":!De,"smb-section--bottom-divider-no-overlay":!He,[i]:!!i,"smb-section-break-the-grid--match-height":O&&Ge}),Ee=c()("c-container",{alignfull:("full"===ge||"contents-full"===ge)&&"full"===s,alignwide:"wide"===ge||"contents-wide"===ge&&"full"===s,"c-container--no-padding":me}),qe=c()("c-row",{"c-row--lg-top":"top"===D&&Ge,"c-row--lg-middle":"center"===D&&Ge,"c-row--lg-bottom":"bottom"===D&&Ge}),Je=c()("c-row__col",{"c-row__col--1-1":!Fe,"c-row__col--1-2":Fe,"c-row__col--lg-1-2":Ge&&!Fe}),Ye=c()("c-row__col",{"c-row__col--1-1":!Fe,"c-row__col--1-2":Fe,"c-row__col--lg-1-2":Ge&&!Fe}),Qe=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${N}`]:!!N}),Xe=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${S}`]:!!S,[`smb-section-break-the-grid__content--p-${R}`]:!!R,[`smb-section-break-the-grid__content--horizontal-${$}`]:!!$,[`smb-section-break-the-grid__content--${Y}`]:!!Y,"smb-section-break-the-grid__content--remove-outside-p":R&&A}),Ze=c()("smb-section__body","smb-section-break-the-grid__body"),eo=c()("smb-section-break-the-grid__shadow"),oo=c()("smb-section-break-the-grid__mask"),to={"--smb-section--color":T||void 0,"--smb-section-break-the-grid--shadow-color":U||void 0,"--smb-section-break-the-grid--shadow-transform":G&&F?`translate(${G||0}%, ${F||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":I&&u()(I,L),"--smb-section-break-the-grid--mask-color":K||void 0,"--smb-section-break-the-grid--mask-image":E||void 0,"--smb-section-break-the-grid--mask-opacity":K||E?q:void 0,...te({backgroundHorizontalPosition:be,backgroundVerticalPosition:he,isBackgroundNoOver:_e,backgroundColor:pe,backgroundGradientColor:ke,backgroundTexture:xe,backgroundTextureOpacity:ve,backgroundTextureUrl:ye,fixedBackgroundColor:we,fixedBackgroundGradientColor:fe,fixedBackgroundTexture:Ce,fixedBackgroundTextureOpacity:Ve,fixedBackgroundTextureUrl:Pe,topDividerVerticalPosition:Oe,topDividerLevel:je,bottomDividerVerticalPosition:$e,bottomDividerLevel:Se,backgroundText:Ie})},io=(0,g.useBlockProps)({className:We,style:to}),ao=(0,g.useInnerBlocksProps)({className:Ze},{templateLock:Me,renderAppender:Le?void 0:g.InnerBlocks.ButtonBlockAppender}),no=P(),[lo]=null!=g.useSettings?(0,g.useSettings)("typography.fontSizes"):[(0,g.useSetting)("typography.fontSizes")].filter(Boolean),ro={...Ie,position:{...Ie.position}};let so=[{value:"-50",label:(0,a.__)("-50%","snow-monkey-blocks")},{value:"-40",label:(0,a.__)("-40%","snow-monkey-blocks")},{value:"-30",label:(0,a.__)("-30%","snow-monkey-blocks")},{value:"-20",label:(0,a.__)("-20%","snow-monkey-blocks")},{value:"-10",label:(0,a.__)("-10%","snow-monkey-blocks")},{value:"",label:(0,a.__)("+-0%","snow-monkey-blocks")}];return so=Ge?so.concat([{value:"10",label:(0,a.__)("+10%","snow-monkey-blocks")},{value:"20",label:(0,a.__)("+20%","snow-monkey-blocks")},{value:"30",label:(0,a.__)("+30%","snow-monkey-blocks")},{value:"40",label:(0,a.__)("+40%","snow-monkey-blocks")},{value:"50",label:(0,a.__)("+50%","snow-monkey-blocks")}]):so,(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g.InspectorControls,{group:"color",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{...(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:r,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:T,onColorChange:e=>o({textColor:e}),resetAllFilter:()=>({textColor:n.uK.textColor?.default}),label:(0,a.__)("Text color","snow-monkey-blocks")}]})}),(0,l.jsxs)(g.InspectorControls,{children:[(0,l.jsx)(M,{disableIsSlim:!0,disableContentsMaxWidth:!0,disableContainerAlign:"full"!==s,settings:[{wrapperTagNameValue:de,onWrapperTagNameChange:e=>o({wrapperTagName:e}),defaultValue:n.uK.wrapperTagName.default},{titleTagNameValue:ue,onTitleTagNameChange:e=>o({titleTagName:e}),defaultValue:n.uK.titleTagName.default},{containerAlignValue:ge,onContainerAlignChange:e=>o({containerAlign:e}),defaultValue:n.uK.containerAlign.default},{disableContainerPaddingValue:me,onDisableContainerPaddingChange:e=>o({disableContainerPadding:e}),defaultValue:n.uK.disableContainerPadding.default}]}),(0,l.jsxs)(m.__experimentalToolsPanel,{label:(0,a.__)("Media settings","snow-monkey-blocks"),dropdownMenuProps:no,children:[0<Ue.length&&(0,l.jsx)(z,{defaultValue:n.uK.imageSizeSlug.default,value:f,options:Ue,onChange:e=>{const t=Ae?.media_details?.sizes?.[e]?.source_url,i=Ae?.media_details?.sizes?.[e]?.width,a=Ae?.media_details?.sizes?.[e]?.height;o({imageURL:t,imageWidth:i,imageHeight:a,imageSizeSlug:e})}}),Ge&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>J!==n.uK.mobileOrder.default,isShownByDefault:!0,label:(0,a.__)("Sort by mobile","snow-monkey-blocks"),onDeselect:()=>o({mobileOrder:n.uK.mobileOrder.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Sort by mobile","snow-monkey-blocks"),value:J,options:[{value:"",label:(0,a.__)("Default","snow-monkey-blocks")},{value:"text",label:(0,a.__)("Text > Image","snow-monkey-blocks")},{value:"image",label:(0,a.__)("Image > Text","snow-monkey-blocks")},{value:"nowrap",label:(0,a.__)("No wrap","snow-monkey-blocks")}],onChange:e=>o({mobileOrder:""===e?void 0:e})})}),(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>N!==n.uK.imageSize.default,isShownByDefault:!0,label:(0,a.__)("Image Size Adjustment","snow-monkey-blocks"),onDeselect:()=>o({imageSize:n.uK.imageSize.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Image Size Adjustment","snow-monkey-blocks"),value:N,options:[{value:"",label:(0,a.__)("+-0%","snow-monkey-blocks")},{value:"10",label:(0,a.__)("+10%","snow-monkey-blocks")},{value:"20",label:(0,a.__)("+20%","snow-monkey-blocks")},{value:"30",label:(0,a.__)("+30%","snow-monkey-blocks")},{value:"40",label:(0,a.__)("+40%","snow-monkey-blocks")},{value:"50",label:(0,a.__)("+50%","snow-monkey-blocks")},{value:"60",label:(0,a.__)("+60%","snow-monkey-blocks")},{value:"70",label:(0,a.__)("+70%","snow-monkey-blocks")},{value:"80",label:(0,a.__)("+80%","snow-monkey-blocks")},{value:"90",label:(0,a.__)("+90%","snow-monkey-blocks")},{value:"100",label:(0,a.__)("+100%","snow-monkey-blocks")}],onChange:e=>o({imageSize:e})})}),Ge&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>O!==n.uK.imageMatchHeight.default,isShownByDefault:!0,label:(0,a.__)("Adjust the height of the media to the height of the block.","snow-monkey-blocks"),onDeselect:()=>o({imageMatchHeight:n.uK.imageMatchHeight.default}),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Adjust the height of the media to the height of the block.","snow-monkey-blocks"),checked:O,onChange:e=>o({imageMatchHeight:e})})})]}),(0,l.jsxs)(m.__experimentalToolsPanel,{label:(0,a.__)("Contents settings","snow-monkey-blocks"),dropdownMenuProps:no,children:[(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>S!==n.uK.contentSize.default,isShownByDefault:!0,label:(0,a.__)("Content size adjustment","snow-monkey-blocks"),onDeselect:()=>o({contentSize:n.uK.contentSize.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Content size adjustment","snow-monkey-blocks"),value:S,options:so,onChange:e=>o({contentSize:e})})}),(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>$!==n.uK.contentHorizontalPosition.default,isShownByDefault:!0,label:(0,a.__)("Degree of overlap of content to image","snow-monkey-blocks"),onDeselect:()=>o({contentHorizontalPosition:n.uK.contentHorizontalPosition.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Degree of overlap of content to image","snow-monkey-blocks"),value:$,options:[{value:"",label:(0,a.__)("+-0%","snow-monkey-blocks")},{value:"10",label:(0,a.__)("10%","snow-monkey-blocks")},{value:"20",label:(0,a.__)("20%","snow-monkey-blocks")},{value:"30",label:(0,a.__)("30%","snow-monkey-blocks")},{value:"40",label:(0,a.__)("40%","snow-monkey-blocks")},{value:"50",label:(0,a.__)("50%","snow-monkey-blocks")}],onChange:e=>o({contentHorizontalPosition:e})})}),!!D&&"center"!==D&&Ge&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>H!==n.uK.contentVerticalPosition.default,isShownByDefault:!0,label:(0,a.__)("Vertical position of content","snow-monkey-blocks"),onDeselect:()=>o({contentVerticalPosition:n.uK.contentVerticalPosition.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Vertical position of content","snow-monkey-blocks"),value:H,options:[{value:"",label:(0,a.__)("+-0%","snow-monkey-blocks")},{value:"t100",label:(0,a.sprintf)(1 (()=>{var e,o={6611:(e,o,t)=>{"use strict";const a=window.wp.blocks,i=window.wp.i18n,n=JSON.parse('{"UU":"snow-monkey-blocks/section-break-the-grid","uK":{"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-section-break-the-grid__figure > img, .smb-section-break-the-grid__figure > video","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-section-break-the-grid__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-section-break-the-grid__figure > img, .smb-section-break-the-grid__figure > video","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-section-break-the-grid__figure > img, .smb-section-break-the-grid__figure > video","attribute":"height","default":""},"imageMediaType":{"type":"string"},"textColor":{"type":"string"},"imagePosition":{"type":"string","default":"right"},"imageSize":{"type":"string","default":"40"},"imageMatchHeight":{"type":"boolean","default":false},"imageSizeSlug":{"type":"string","default":"full"},"verticalAlignment":{"type":"string","default":"center"},"contentSize":{"type":"string","default":"-20"},"contentHorizontalPosition":{"type":"string","default":"10"},"contentVerticalPosition":{"type":"string"},"contentBackgroundColor":{"type":"string"},"contentBackgroundOpacity":{"type":"number","default":0.98},"contentPadding":{"type":"string"},"removeContentOutsidePadding":{"type":"boolean","default":false},"shadowColor":{"type":"string"},"shadowHorizontalPosition":{"type":"number","default":5},"shadowVerticalPosition":{"type":"number","default":5},"maskColor":{"type":"string"},"maskGradientColor":{"type":"string"},"maskOpacity":{"type":"number","default":1},"mobileOrder":{"type":"string","default":""},"contentsAlignment":{"type":"string"},"title":{"type":"string","source":"html","selector":".smb-section__title","default":""},"subtitle":{"type":"string","source":"html","selector":".smb-section__subtitle","default":""},"lede":{"type":"string","source":"html","selector":".smb-section__lede","default":""},"wrapperTagName":{"type":"string","default":"div"},"titleTagName":{"type":"string","default":"h2"},"containerAlign":{"type":"string"},"disableContainerPadding":{"type":"boolean","default":false},"backgroundHorizontalPosition":{"type":"number","default":0},"backgroundVerticalPosition":{"type":"number","default":0},"isBackgroundNoOver":{"type":"boolean","default":false},"backgroundColor":{"type":"string"},"backgroundGradientColor":{"type":"string"},"backgroundTexture":{"type":"string"},"backgroundTextureOpacity":{"type":"number","default":1},"backgroundTextureUrl":{"type":"string"},"fixedBackgroundColor":{"type":"string"},"fixedBackgroundGradientColor":{"type":"string"},"fixedBackgroundTexture":{"type":"string"},"fixedBackgroundTextureOpacity":{"type":"number","default":1},"fixedBackgroundTextureUrl":{"type":"string"},"topDividerType":{"type":"string","default":"tilt"},"topDividerLevel":{"type":"number","default":0},"topDividerColor":{"type":"string","default":"#fff"},"topDividerVerticalPosition":{"type":"number","default":0},"topDividerOverlay":{"type":"boolean","default":true},"bottomDividerType":{"type":"string","default":"tilt"},"bottomDividerLevel":{"type":"number","default":0},"bottomDividerColor":{"type":"string","default":"#fff"},"bottomDividerVerticalPosition":{"type":"number","default":0},"bottomDividerOverlay":{"type":"boolean","default":true},"backgroundText":{"type":"object","default":{"text":"","color":"","fontSize":"","fontSizeSlug":"","lineHeight":"","opacity":0.2,"position":{"top":null,"right":null,"bottom":null,"left":null}}},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"align":["wide","full"],"anchor":true,"spacing":{"margin":true,"padding":["top","bottom"]},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":["title","subtitle","lede","backgroundText","imageID","imageURL","imageAlt","imageWidth","imageHeight","imageMediaType"]}}}}'),l=window.ReactJSXRuntime,r=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"6",y:"12.13",width:"12",height:"1"}),(0,l.jsx)("rect",{x:"3",y:"15.63",width:"18",height:"1"}),(0,l.jsx)("rect",{x:"6",y:"19.13",width:"12",height:"1"}),(0,l.jsx)("path",{d:"M9.41,9.05h.16L12,7.14l2.43,1.91h.16a.15.15,0,0,0,.16-.15V4a.15.15,0,0,0-.16-.15H9.41A.15.15,0,0,0,9.25,4V8.9A.15.15,0,0,0,9.41,9.05Z"})]});var s=t(6942),c=t.n(s),d=t(3558),u=t.n(d);const g=window.wp.blockEditor,m=window.wp.components,b=window.wp.data,h=window.wp.primitives;var _=(0,l.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(h.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),p=(0,l.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(h.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})});const k=window.lodash,x=window.wp.compose,v=(e,o=0,t=null)=>(e=Number(e),(isNaN(e)||e<o)&&(e=o),null!==t&&e>t&&(e=t),e),y=(e,o,t)=>{if(t=t||"#fff",0!==o)return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:(()=>{switch(e){case"tilt":return 0>o?(0,l.jsx)("path",{d:`m100,${100+o} L100,100 L0,100 z`,strokeWidth:"0",fill:t}):(0,l.jsx)("path",{d:`m0,${100-o} L100,100 L0,100 z`,strokeWidth:"0",fill:t});case"curve":return 0>o?(0,l.jsx)("path",{d:`m0,100 L100,100 Q50,${2*o+100},0,100 z`,strokeWidth:"0",fill:t}):(0,l.jsx)("path",{d:`m0,${100-o} q50,${2*o},100,0 V100 L0,100 z`,strokeWidth:"0",fill:t});case"wave":return 0>o?(0,l.jsx)("path",{d:`m0,${100+o/2} q20,${o},40,0 t40,0 t40,0 V100 L0,100 z`,strokeWidth:"0",fill:t}):(0,l.jsx)("path",{d:`m0,${100-o/2} q20,${o},40,0 t40,0 t40,0 V100 L0,100 z`,strokeWidth:"0",fill:t});case"triangle":return o=Math.abs(o),(0,l.jsx)("path",{d:`m${(100-o)/2},100 l${o},0 l${-1*o/2},${-1*o} z`,strokeWidth:"0",fill:t});case"triangle-large":return o=Math.abs(o),(0,l.jsx)("path",{d:`m0,100 l100,0 l-50,${-1*o} z`,strokeWidth:"0",fill:t})}})()})},w=e=>e.media_type?"image"===e.media_type?"image":"video":e.type,f=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function C(e=""){return!!e&&f.includes(function(e=""){const o=e.split(".");return o[o.length-1]}(e))}function V(e){if(null==e)return{};Object.keys(e).forEach((o=>{const t=e?.[o];null!==t&&""!==t||(e[o]=void 0)}));const o=0===parseFloat(e?.top)?0:e?.top,t=0===parseFloat(e?.right)?0:e?.right,a=0===parseFloat(e?.bottom)?0:e?.bottom,i=0===parseFloat(e?.left)?0:e?.left;return o===t===a===i&&void 0!==o?{padding:o}:o===a&&t===i&&void 0!==o&&void 0!==t?{padding:`${o} ${t}`}:o!==a&&t===i&&void 0!==o&&void 0!==a&&void 0!==t?{padding:`${o} ${t} ${a}`}:{paddingTop:o,paddingRight:t,paddingBottom:a,paddingLeft:i}}function P(){return(0,x.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const T=window.wp.element,j=({id:e,src:o,allowedTypes:t,accept:a,onSelect:n,onSelectURL:r,onRemove:s})=>(0,l.jsxs)(g.BlockControls,{group:"inline",children:[(0,l.jsx)(g.MediaReplaceFlow,{mediaId:e,mediaURL:o,allowedTypes:t,accept:a,onSelect:n,onSelectURL:r}),!!o&&!!s&&(0,l.jsx)(m.ToolbarButton,{onClick:s,children:(0,i.__)("Release","snow-monkey-blocks")})]}),N=({src:e,alt:o,id:t,style:a,width:i,height:n})=>(0,l.jsx)("img",{src:e,alt:o,className:`wp-image-${t}`,style:a,width:i,height:n}),O=({src:e,style:o,width:t,height:a})=>(0,l.jsx)("video",{src:e,style:o,width:t,height:a}),D=(0,T.memo)((({id:e,src:o,alt:t,url:a,width:i,height:n,target:r,allowedTypes:s,accept:c,onSelect:d,onSelectURL:u,onRemove:g,mediaType:m,style:b,rel:h,linkClass:_})=>{let p;if("image"===m){let s;p=(0,l.jsx)(N,{src:o,alt:t,id:e,style:b,width:i,height:n}),s=h?(0,k.isEmpty)(h)?void 0:h:"_self"!==r&&r?"noopener noreferrer":void 0,a&&(p=(0,l.jsx)("span",{href:a,target:"_self"===r?void 0:r,rel:s,className:_,children:p}))}else"video"===m&&(p=(0,l.jsx)(O,{src:o,style:b,width:i,height:n}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(j,{id:e,src:o,allowedTypes:s,accept:c,onSelect:d,onSelectURL:u,onRemove:g}),p]})}),((e,o)=>{const t=Object.keys(e);for(const a of t)if(e[a]!==o[a])return!1;return!0}));function B(e){const{src:o,onSelect:t,onSelectURL:a,mediaType:n,allowedTypes:r=["image"]}=e,s=!n&&o?"image":n;let c=(0,i.__)("Media","snow-monkey-blocks");1===r.length&&("image"===r[0]?c=(0,i.__)("Image","snow-monkey-blocks"):"video"===r[0]&&(c=(0,i.__)("Video","snow-monkey-blocks")));const d=(0,T.useMemo)((()=>r.map((e=>`${e}/*`)).join(",")),[r]);return o?(0,l.jsx)(D,{...e,accept:d,allowedTypes:r,mediaType:s}):(0,l.jsx)(g.MediaPlaceholder,{icon:"format-image",labels:{title:c},onSelect:t,onSelectURL:a,accept:d,allowedTypes:r})}const S=[{label:(0,i._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,i._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,i._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,i._x)("Full Size","Image size option for resolution control"),value:"full"}];function z({panelId:e,value:o,onChange:t,options:a=S,defaultValue:n=S[0].value,isShownByDefault:r=!0,withToolsPanelItem:s=!0}){const c=null!=o?o:n,d=()=>(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Resolution"),value:c,options:a,onChange:t,help:(0,i.__)("Select the size of the source image."),size:"__unstable-large"});return s?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>c!==n,label:(0,i.__)("Resolution"),onDeselect:()=>t(n),isShownByDefault:r,panelId:e,children:(0,l.jsx)(d,{})}):(0,l.jsx)(d,{})}var $=(0,l.jsxs)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,l.jsx)(h.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,l.jsx)(h.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});function H({label:e,onChange:o,value:t,withReset:a=!0},n){const r=(0,m.__experimentalUseCustomUnits)({availableUnits:["px","em","rem","%","vw"]}),s="smb-width-picker";return(0,l.jsx)("fieldset",{className:s,...n?{}:{ref:n},children:(0,l.jsx)("div",{className:`${s}__controls`,children:(0,l.jsxs)(m.Flex,{justify:"space-between",className:`${s}__custom-size-control`,children:[(0,l.jsx)(m.FlexItem,{isBlock:!0,children:(0,l.jsx)(m.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:e,labelPosition:"edge",value:t,onChange:e=>{e=0>parseFloat(e)||0===parseFloat(e)?void 0:e,o(e)},units:r})}),a&&(0,l.jsx)(m.FlexItem,{isBlock:!0,children:(0,l.jsx)(m.Button,{className:"components-color-palette__clear",disabled:void 0===t,onClick:()=>o(void 0),isSmall:!0,isSecondary:!0,children:(0,i.__)("Reset")})})]})})})}function I(e){const{label:o,sides:t,values:a,onChange:i,allowReset:n}=e,[r]=null!=g.useSettings?(0,g.useSettings)("spacing.units"):[(0,g.useSetting)("spacing.units")].filter(Boolean),s=(0,m.__experimentalUseCustomUnits)({availableUnits:r||["%","px","em","rem","vw"]});return(0,l.jsx)(m.BoxControl,{__next40pxDefaultSize:!0,values:a,onChange:i,label:o,sides:t,units:s,allowReset:n})}const M=({disableIsSlim:e,disableContentsMaxWidth:o,disableContainerAlign:t,disableDisableContainerPadding:a,disableCustomHeight:n,settings:r})=>{const[s,c]=(0,T.useState)(!n),d=P(),u=["div","section","aside"],g=["h1","h2","h3","none"];return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,i.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:d,children:r.map(((n,r)=>{if(n.hasOwnProperty("wrapperTagNameValue")&&n.hasOwnProperty("onWrapperTagNameChange")&&n.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.wrapperTagNameValue!==n.defaultValue,isShownByDefault:!0,label:(0,i.__)("Wrapper tag","snow-monkey-blocks"),onDeselect:()=>n.onWrapperTagNameChange(n.defaultValue),children:(0,l.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Wrapper tag","snow-monkey-blocks"),id:"snow-monkey-blocks/section/wrapper-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,k.times)(u.length,(e=>(0,l.jsx)(m.Button,{variant:n.wrapperTagNameValue===u[e]?"primary":"secondary",onClick:()=>{n.onWrapperTagNameChange(u[e])},children:u[e]},e)))})},r)},r);if(n.hasOwnProperty("titleTagNameValue")&&n.hasOwnProperty("onTitleTagNameChange")&&n.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.titleTagNameValue!==n.defaultValue,isShownByDefault:!0,label:(0,i.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>n.onTitleTagNameChange(n.defaultValue),children:(0,l.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/section/title-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,k.times)(g.length,(e=>(0,l.jsx)(m.Button,{variant:n.titleTagNameValue===g[e]?"primary":"secondary",onClick:()=>{n.onTitleTagNameChange(g[e])},children:g[e]},e)))})})},r);if(n.hasOwnProperty("heightValue")&&n.hasOwnProperty("onHeightChange")&&n.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.heightValue!==n.defaultValue,isShownByDefault:!0,label:(0,i.__)("Height","snow-monkey-blocks"),onDeselect:()=>{n.onHeightChange(n.defaultValue,n.defaultDisableCustomHeightValue),c(!n.defaultDisableCustomHeightValue)},children:(0,l.jsxs)("div",{children:[(0,l.jsx)(m.__experimentalSpacer,{children:(0,l.jsxs)(m.__experimentalHStack,{children:[(0,l.jsx)("span",{className:"components-base-control__label",children:s?(0,i.__)("Min height","snow-monkey-blocks"):(0,i.__)("Height","snow-monkey-blocks")}),(0,l.jsx)(m.Button,{label:s?(0,i.__)("Set custom size"):(0,i.__)("Use preset","snow-monkey-blocks"),icon:$,onClick:()=>{c(!s)},isPressed:s,isSmall:!0})]})}),s?(0,l.jsx)(m.__experimentalUnitControl,{__next40pxDefaultSize:!0,value:n.heightValue,onChange:e=>n.onHeightChange(e,!1)}):(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.heightValue,options:[{value:"fit",label:(0,i.__)("Fit","snow-monkey-blocks")},{value:"wide",label:(0,i.__)("Wide","snow-monkey-blocks")},{value:"full",label:(0,i.__)("Full","snow-monkey-blocks")}],onChange:e=>n.onHeightChange(e,!0)})]})},r);if(!t&&n.hasOwnProperty("containerAlignValue")&&n.hasOwnProperty("onContainerAlignChange")&&n.hasOwnProperty("defaultValue")){let e=[{value:"",label:(0,i.__)("Default","snow-monkey-blocks")},{value:"wide",label:(0,i.__)("Wide width","snow-monkey-blocks")},{value:"full",label:(0,i.__)("Full width","snow-monkey-blocks")}];return n.hasOwnProperty("contentsContainerControl")&&(e=e.concat([{value:"contents-wide",label:(0,i.__)("Wide width (Only contents)","snow-monkey-blocks")},{value:"contents-full",label:(0,i.__)("Full width (Only contents)","snow-monkey-blocks")}])),(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.containerAlignValue!==n.defaultValue,isShownByDefault:!0,label:(0,i.__)("Container alignment","snow-monkey-blocks"),onDeselect:()=>n.onContainerAlignChange(n.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Container alignment","snow-monkey-blocks"),value:n.containerAlignValue,onChange:n.onContainerAlignChange,options:e})},r)}return!a&&n.hasOwnProperty("disableContainerPaddingValue")&&n.hasOwnProperty("onDisableContainerPaddingChange")&&n.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.disableContainerPaddingValue!==n.defaultValue,isShownByDefault:!0,label:(0,i.__)("Remove container padding of the contents","snow-monkey-blocks"),onDeselect:()=>n.onDisableContainerPaddingChange(n.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Remove container padding of the contents","snow-monkey-blocks"),checked:n.disableContainerPaddingValue,onChange:n.onDisableContainerPaddingChange})},r):!o&&n.hasOwnProperty("contentsMaxWidthValue")&&n.hasOwnProperty("onContentsMaxWidthChange")&&n.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.contentsMaxWidthValue!==n.defaultValue,isShownByDefault:!0,label:(0,i.__)("Max width of the contents","snow-monkey-blocks"),onDeselect:()=>n.onContentsMaxWidthChange(n.defaultValue),children:(0,l.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Max width of the contents","snow-monkey-blocks"),id:"snow-monkey-blocks/section/contents-max-width",children:(0,l.jsx)(H,{value:n.contentsMaxWidthValue,onChange:n.onContentsMaxWidthChange})})},r):!e&&n.hasOwnProperty("isSlimValue")&&n.hasOwnProperty("onIsSlimChange")&&n.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.isSlimValue!==n.defaultValue,isShownByDefault:!0,label:(0,i.__)("Make the contents width slim","snow-monkey-blocks"),onDeselect:()=>n.onIsSlimChange(n.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Make the contents width slim","snow-monkey-blocks"),checked:n.isSlimValue,onChange:n.onIsSlimChange})},r):n.hasOwnProperty("paddingValue")&&n.hasOwnProperty("onPaddingChange")&&n.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>n.paddingValue!==n.defaultValue,isShownByDefault:!0,label:(0,i.__)("Padding","snow-monkey-blocks"),onDeselect:()=>n.onPaddingChange(n.defaultValue),children:(0,l.jsx)(I,{label:(0,i.__)("Padding","snow-monkey-blocks"),sides:n.sides?n.sides:void 0,values:n.paddingValue,onChange:n.onPaddingChange,allowReset:!1})},r):(0,l.jsx)(T.Fragment,{},r)}))})},L=e=>{const o=e.filter((e=>e.hasOwnProperty("titleValue")&&e.hasOwnProperty("titleTagNameValue")));return!!o&&o[0]},R=e=>c()("smb-section__header",{[`${e}__header`]:!!e}),A=e=>c()("smb-section__subtitle",{[`${e}__subtitle`]:!!e}),U=e=>c()("smb-section__title",{[`${e}__title`]:!!e}),G=e=>c()("smb-section__lede-wrapper",{[`${e}__lede-wrapper`]:!!e}),F=e=>c()("smb-section__lede",{[`${e}__lede`]:!!e}),K=({isSelected:e,className:o,settings:t})=>{const a=(e=>{const o=(e=>{const o=e.filter((e=>e.hasOwnProperty("subtitleValue")));return!!o&&o[0]})(e);return!!o&&!g.RichText.isEmpty(o.subtitleValue)})(t),n=(e=>{const o=(e=>{const o=e.filter((e=>e.hasOwnProperty("ledeValue")));return!!o&&o[0]})(e);return!!o&&!g.RichText.isEmpty(o.ledeValue)})(t),r=A(o),s=U(o),c=G(o),d=F(o);return(0,l.jsx)(l.Fragment,{children:t.map(((o,t)=>(a||e)&&o.hasOwnProperty("subtitleValue")&&o.hasOwnProperty("onSubtitleChange")?(0,l.jsx)(g.RichText,{className:r,value:o.subtitleValue,onChange:o.onSubtitleChange,placeholder:(0,i.__)("Write subtitle…","snow-monkey-blocks")},t):o.hasOwnProperty("titleTagNameValue")&&o.hasOwnProperty("titleValue")&&o.hasOwnProperty("onTitleChange")?(0,l.jsx)(g.RichText,{className:s,tagName:o.titleTagNameValue,value:o.titleValue,onChange:o.onTitleChange,placeholder:(0,i.__)("Write title…","snow-monkey-blocks")},t):(n||e)&&o.hasOwnProperty("ledeValue")&&o.hasOwnProperty("onLedeChange")?(0,l.jsx)("div",{className:c,children:(0,l.jsx)(g.RichText,{className:d,value:o.ledeValue,onChange:o.onLedeChange,placeholder:(0,i.__)("Write lede…","snow-monkey-blocks")})},t):(0,l.jsx)(T.Fragment,{},t)))})},W=({isSelected:e,hasContainer:o,containerClassName:t,className:a,settings:i})=>{const n=(e=>{const o=L(e);return!!o&&"none"!==o.titleTagNameValue})(i);if(!n)return(0,l.jsx)(l.Fragment,{});const r=(e=>{const o=L(e);return!!o&&!g.RichText.isEmpty(o.titleValue)&&"none"!==o.titleTagNameValue})(i);if(!r&&!e)return(0,l.jsx)(l.Fragment,{});const s=R(a);return(0,l.jsx)(l.Fragment,{children:o?(0,l.jsx)("div",{className:s,children:(0,l.jsx)("div",{className:t,children:(0,l.jsx)(K,{isSelected:e,className:a,settings:i})})}):(0,l.jsx)("div",{className:s,children:(0,l.jsx)(K,{isSelected:e,className:a,settings:i})})})},E=({title:e,titleTagName:o,subtitle:t,lede:a,className:i})=>{const n=!g.RichText.isEmpty(t),r=!g.RichText.isEmpty(a),s=A(i),c=U(i),d=G(i),u=F(i);return(0,l.jsxs)(l.Fragment,{children:[n&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:s,value:t}),(0,l.jsx)(g.RichText.Content,{tagName:o,className:c,value:e}),r&&(0,l.jsx)("div",{className:d,children:(0,l.jsx)(g.RichText.Content,{tagName:"div",className:u,value:a})})]})},q=({title:e,titleTagName:o,subtitle:t,lede:a,className:i,hasContainer:n,containerClassName:r})=>{if(g.RichText.isEmpty(e)||"none"===o)return(0,l.jsx)(l.Fragment,{});const s=R(i);return(0,l.jsx)(l.Fragment,{children:n?(0,l.jsx)("div",{className:s,children:(0,l.jsx)("div",{className:r,children:(0,l.jsx)(E,{title:e,titleTagName:o,subtitle:t,lede:a,className:i})})}):(0,l.jsx)("div",{className:s,children:(0,l.jsx)(E,{title:e,titleTagName:o,subtitle:t,lede:a,className:i})})})},J=[{value:"",label:(0,i.__)("None","snow-monkey-blocks")},{value:"stripe",label:(0,i.__)("Stripe","snow-monkey-blocks")},{value:"noise",label:(0,i.__)("Noise","snow-monkey-blocks")},{value:"dots",label:(0,i.__)("Dots","snow-monkey-blocks")},{value:"dots2",label:(0,i.__)("Dots 2","snow-monkey-blocks")}],Y=[{value:"tilt",label:(0,i.__)("Tilt","snow-monkey-blocks")},{value:"curve",label:(0,i.__)("Curve","snow-monkey-blocks")},{value:"wave",label:(0,i.__)("Wave","snow-monkey-blocks")},{value:"triangle",label:(0,i.__)("Triangle","snow-monkey-blocks")},{value:"triangle-large",label:(0,i.__)("Triangle (Large)","snow-monkey-blocks")}],Q=({hasColor:e,disableNoOver:o,hasTexture:t,settings:a})=>{const n=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),r=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,i.__)("Background (Movable)","snow-monkey-blocks"),dropdownMenuProps:r,children:a.map(((a,r)=>{if(a.hasOwnProperty("colorValue")&&a.hasOwnProperty("gradientValue")&&a.hasOwnProperty("onColorChange")&&a.hasOwnProperty("onGradientChange")&&a.hasOwnProperty("defaultColorValue")&&a.hasOwnProperty("defaultGradientValue"))return(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,i.__)("Color","snow-monkey-blocks"),colorValue:a.colorValue,gradientValue:a.gradientValue,onColorChange:a.onColorChange,onGradientChange:a.onGradientChange}],__experimentalIsRenderedInSidebar:!0,...n})},r);if(e){if(a.hasOwnProperty("horizontalPositionValue")&&a.hasOwnProperty("onHorizontalPositionChange")&&a.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a.horizontalPositionValue!==a.defaultValue,isShownByDefault:!0,label:(0,i.__)("Background position (Left / Right)","snow-monkey-blocks"),onDeselect:()=>a.onHorizontalPositionChange(a.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Background position (Left / Right)","snow-monkey-blocks"),value:a.horizontalPositionValue,onChange:a.onHorizontalPositionChange,min:"-90",max:"90"})},r);if(a.hasOwnProperty("verticalPositionValue")&&a.hasOwnProperty("onVerticalPositionChange")&&a.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a.verticalPositionValue!==a.defaultValue,isShownByDefault:!0,label:(0,i.__)("Background Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>a.onVerticalPositionChange(a.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Background Position (Top / Bottom)","snow-monkey-blocks"),value:a.verticalPositionValue,onChange:a.onVerticalPositionChange,min:"-90",max:"90"})},r);if(!o&&a.hasOwnProperty("isNoOverValue")&&a.hasOwnProperty("onIsNoOverChange")&&a.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a.isNoOverValue!==a.defaultValue,isShownByDefault:!0,label:(0,i.__)("Make sure the background doesn't overflow to the outside","snow-monkey-blocks"),onDeselect:()=>a.onIsNoOverChange(a.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Make sure the background doesn't overflow to the outside","snow-monkey-blocks"),checked:a.isNoOverValue,onChange:a.onIsNoOverChange})},r);if(a.hasOwnProperty("textureValue")&&a.hasOwnProperty("onTextureChange")&&a.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a.textureValue!==a.defaultValue,isShownByDefault:!0,label:(0,i.__)("Texture","snow-monkey-blocks"),onDeselect:()=>a.onTextureChange(a.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Texture","snow-monkey-blocks"),value:a.textureValue,onChange:a.onTextureChange,options:J})},r);if(t&&a.hasOwnProperty("textureOpacityValue")&&a.hasOwnProperty("onTextureOpacityChange")&&a.hasOwnProperty("defaultValue"))return(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>a.textureOpacityValue!==a.defaultValue,isShownByDefault:!0,label:(0,i.__)("Texture opacity","snow-monkey-blocks"),onDeselect:()=>a.onTextureOpacityChange(a.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Texture opacity","snow-monkey-blocks"),value:Number(a.textureOpacityValue.toFixed(1)),onChange:a.onTextureOpacityChange,min:.1,max:1,step:.1})},r)}return(0,l.jsx)(T.Fragment,{},r)}))})},X=({hasTexture:e,settings:o})=>{const t=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),a=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,i.__)("Background (Fixed)","snow-monkey-blocks"),dropdownMenuProps:a,children:o.map(((o,a)=>o.hasOwnProperty("colorValue")&&o.hasOwnProperty("gradientValue")&&o.hasOwnProperty("onColorChange")&&o.hasOwnProperty("onGradientChange")&&o.hasOwnProperty("defaultColorValue")&&o.hasOwnProperty("defaultGradientValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,i.__)("Color","snow-monkey-blocks"),colorValue:o.colorValue,gradientValue:o.gradientValue,onColorChange:o.onColorChange,onGradientChange:o.onGradientChange}],__experimentalIsRenderedInSidebar:!0,...t})},a):o.hasOwnProperty("textureValue")&&o.hasOwnProperty("onTextureChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>o.textureValue!==o.defaultValue,isShownByDefault:!0,label:(0,i.__)("Texture","snow-monkey-blocks"),onDeselect:()=>o.onTextureChange(o.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Texture","snow-monkey-blocks"),value:o.textureValue,onChange:o.onTextureChange,options:J},a)},a):e&&o.hasOwnProperty("textureOpacityValue")&&o.hasOwnProperty("onTextureOpacityChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>o.textureOpacityValue!==o.defaultValue,isShownByDefault:!0,label:(0,i.__)("Texture opacity","snow-monkey-blocks"),onDeselect:()=>o.onTextureOpacityChange(o.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Texture opacity","snow-monkey-blocks"),value:Number(o.textureOpacityValue.toFixed(1)),onChange:o.onTextureOpacityChange,min:.1,max:1,step:.1},a)},a):(0,l.jsx)(T.Fragment,{},a)))})},Z=({settings:e})=>{const o=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),t=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,i.__)("Top divider","snow-monkey-blocks"),dropdownMenuProps:t,children:e.map(((e,t)=>e.hasOwnProperty("typeValue")&&e.hasOwnProperty("onTypeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.typeValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Type","snow-monkey-blocks"),onDeselect:()=>e.onTypeChange(e.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Type","snow-monkey-blocks"),value:e.typeValue,onChange:e.onTypeChange,options:Y})},t):e.hasOwnProperty("levelValue")&&e.hasOwnProperty("onLevelChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.levelValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Level","snow-monkey-blocks"),onDeselect:()=>e.onLevelChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Level","snow-monkey-blocks"),value:e.levelValue,onChange:e.onLevelChange,min:"-100",max:"100"})},t):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultColorValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,i.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...o})},t):e.hasOwnProperty("verticalPositionValue")&&e.hasOwnProperty("onVerticalPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.verticalPositionValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>e.onVerticalPositionChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Position (Top / Bottom)","snow-monkey-blocks"),value:e.verticalPositionValue,onChange:e.onVerticalPositionChange,min:"-90",max:"90"})},t):e.hasOwnProperty("overlayValue")&&e.hasOwnProperty("onOverlayChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.overlayValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Overlap divider on content","snow-monkey-blocks"),onDeselect:()=>e.onOverlayChange(e.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Overlap divider on content","snow-monkey-blocks"),checked:e.overlayValue,onChange:e.onOverlayChange})},t):(0,l.jsx)(T.Fragment,{},t)))})},ee=({settings:e})=>{const o=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),t=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,i.__)("Bottom divider","snow-monkey-blocks"),dropdownMenuProps:t,children:e.map(((e,t)=>e.hasOwnProperty("typeValue")&&e.hasOwnProperty("onTypeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.typeValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Type","snow-monkey-blocks"),onDeselect:()=>e.onTypeChange(e.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Type","snow-monkey-blocks"),value:e.typeValue,onChange:e.onTypeChange,options:Y})},t):e.hasOwnProperty("levelValue")&&e.hasOwnProperty("onLevelChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.levelValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Level","snow-monkey-blocks"),onDeselect:()=>e.onLevelChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Level","snow-monkey-blocks"),value:e.levelValue,onChange:e.onLevelChange,min:"-100",max:"100"})},t):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultColorValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,i.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...o})},t):e.hasOwnProperty("verticalPositionValue")&&e.hasOwnProperty("onVerticalPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.verticalPositionValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>e.onVerticalPositionChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Position (Top / Bottom)","snow-monkey-blocks"),value:e.verticalPositionValue,onChange:e.onVerticalPositionChange,min:"-90",max:"90"})},t):e.hasOwnProperty("overlayValue")&&e.hasOwnProperty("onOverlayChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.overlayValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Overlap divider on content","snow-monkey-blocks"),onDeselect:()=>e.onOverlayChange(e.defaultValue),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Overlap divider on content","snow-monkey-blocks"),checked:e.overlayValue,onChange:e.onOverlayChange})},t):(0,l.jsx)(T.Fragment,{},t)))})},oe=({settings:e})=>{const o=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),t=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:(0,i.__)("Background text","snow-monkey-blocks"),dropdownMenuProps:t,children:e.map(((e,t)=>e.hasOwnProperty("textValue")&&e.hasOwnProperty("onTextChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.textValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Text","snow-monkey-blocks"),onDeselect:()=>e.onTextChange(e.defaultValue),children:(0,l.jsx)(m.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Text","snow-monkey-blocks"),value:e.textValue,onChange:e.onTextChange})},t):e.hasOwnProperty("fontSizeValue")&&e.hasOwnProperty("onFontSizeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.fontSizeValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Size","snow-monkey-blocks"),onDeselect:()=>e.onFontSizeChange(e.defaultValue),children:(0,l.jsx)(g.FontSizePicker,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.fontSizeValue,onChange:e.onFontSizeChange,withReset:!1})},t):e.hasOwnProperty("lineHeightValue")&&e.hasOwnProperty("onLineHeightChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.lineHeightValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Line height","snow-monkey-blocks"),onDeselect:()=>e.onLineHeightChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Line height","snow-monkey-blocks"),value:e.lineHeightValue,onChange:e.onLineHeightChange,min:"0",max:"5",step:"0.1",initialPosition:void 0,allowReset:!0})},t):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,i.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,gradientValue:e.gradientValue,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange}],__experimentalIsRenderedInSidebar:!0,...o})},t):e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.opacityValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>e.onOpacityChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:.1,max:1,step:.1})},t):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>e.positionValue!==e.defaultValue,isShownByDefault:!0,label:(0,i.__)("Position","snow-monkey-blocks"),onDeselect:()=>e.onPositionChange(e.defaultValue),children:(0,l.jsx)(I,{label:(0,i.__)("Position","snow-monkey-blocks"),values:e.positionValue,onChange:e.onPositionChange})},t):(0,l.jsx)(T.Fragment,{},t)))})},te=({backgroundHorizontalPosition:e,backgroundVerticalPosition:o,isBackgroundNoOver:t,backgroundColor:a,backgroundGradientColor:i,backgroundTexture:n,backgroundTextureOpacity:l,backgroundTextureUrl:r,fixedBackgroundColor:s,fixedBackgroundGradientColor:c,fixedBackgroundTexture:d,fixedBackgroundTextureOpacity:u,fixedBackgroundTextureUrl:g,topDividerVerticalPosition:m,topDividerLevel:b,bottomDividerVerticalPosition:h,bottomDividerLevel:_,backgroundText:p})=>{const k=!!n,x=!!d,v={};return(!!a||!!i)&&(v["--smb-section--background-color"]=a,v["--smb-section--background-image"]=i,t?(0<e?v["--smb-section--background-left"]=`${Math.abs(e)}%`:0>e&&(v["--smb-section--background-right"]=`${Math.abs(e)}%`),0<o?v["--smb-section--background-top"]=`${Math.abs(o)}%`:0>o&&(v["--smb-section--background-bottom"]=`${Math.abs(o)}%`)):(e||o)&&(v["--smb-section--background-transform"]=`translate(${e||0}%, ${o||0}%)`)),r&&(v["--smb-section--background-texture-image"]=k?r?`url(${r})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${n}.png)`:void 0,v["--smb-section--background-texture-opacity"]=l?String(l):void 0),v["--smb-section--fixed-background-color"]=s||void 0,v["--smb-section--fixed-background-image"]=c||void 0,g&&(v["--smb-section--fixed-background-texture-image"]=x?g?`url(${g})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${d}.png)`:void 0,v["--smb-section--fixed-background-texture-opacity"]=u?String(u):void 0),v["--smb-section--dividers-top"]=m?`${m}%`:void 0,v["--smb-section--top-divider-level"]=b?`${b}px`:void 0,v["--smb-section--dividers-bottom"]=h?`${h}%`:void 0,v["--smb-section--bottom-divider-level"]=_?`${_}px`:void 0,p?.text&&(v["--smb-section--background-text-color"]=p?.color?p.color:void 0,v["--smb-section--background-text-opacity"]=p?.opacity?String(p.opacity):void 0,v["--smb-section--background-text-font-size"]=p?.fontSize&&!p?.fontSizeSlug?p.fontSize:void 0,v["--smb-section--background-line-height"]=p?.lineHeight?p.lineHeight:void 0,v["--smb-section--background-text-top"]=p?.position?.top&&p?.position?.top.match(/^\d+$/)?`${p?.position?.top}px`:p?.position?.top,v["--smb-section--background-text-right"]=p?.position?.right&&p.position.right.match(/^\d+$/)?`${p?.position?.right}px`:p?.position?.right,v["--smb-section--background-text-bottom"]=p?.position?.bottom&&p?.position?.bottom.match(/^\d+$/)?`${p?.position?.bottom}px`:p?.position?.bottom,v["--smb-section--background-text-left"]=p?.position?.left&&p?.position?.left.match(/^\d+$/)?`${p?.position?.left}px`:p?.position?.left),v},ae=({backgroundColor:e,backgroundGradientColor:o,backgroundTexture:t,fixedBackgroundColor:a,fixedBackgroundGradientColor:i,fixedBackgroundTexture:n,topDividerType:r,topDividerLevel:s,topDividerColor:d,bottomDividerType:u,bottomDividerLevel:m,bottomDividerColor:b,backgroundText:h,containerClasses:_})=>{const p=!!e||!!o,k=!!t,x=!!a||!!i,v=!!n,w=!!s,f=!!m,C=!!h?.text,V=c()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${r}`),P=c()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${u}`);return(0,l.jsx)(l.Fragment,{children:(x||v||p||k||w||f||C)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",children:[v&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture"}),(p||k)&&(0,l.jsx)("div",{className:"smb-section__background",children:k&&(0,l.jsx)("div",{className:"smb-section__background__texture"})}),C&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:_,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:c()("smb-section__background-text__text",{[`has-${h?.fontSizeSlug.replace(/(\d+?)([^-])/,"$1-$2")}-font-size`]:!!h?.fontSizeSlug}),children:(0,l.jsx)(g.RichText.Content,{value:h.text?.replace(/\n/g,"<br>")})})})})}),(w||f)&&(0,l.jsxs)("div",{className:"smb-section__dividers",children:[w&&(0,l.jsx)("div",{className:V,children:y(r,s,d)}),f&&(0,l.jsx)("div",{className:P,children:y(u,m,b)})]})]})})};function ie({settings:e,label:o}){const t=(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),a=P();return(0,l.jsx)(m.__experimentalToolsPanel,{label:o||(0,i.__)("Box Shadow","snow-monkey-blocks"),className:"smb-box-shadow-tools-panel",dropdownMenuProps:a,resetAll:e=>{e.forEach((e=>e()))},children:e.map(((e,o)=>((e,o)=>{return e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultValue")?(t.colors=t.colors.map((e=>{const o=e.colors.filter((e=>!e.color.match(/^var\(/)));return!(1>o.length)&&(e.colors=o,e)})).filter(Boolean),(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,i.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange,resetAllFilter:()=>{e.onColorChange(e.defaultValue)}}],__experimentalIsRenderedInSidebar:!0,...t})},o)):e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,i.__)("Opacity","snow-monkey-blocks"),hasValue:()=>e.opacityValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onOpacityChange(e.defaultValue),resetAllFilter:()=>e.onOpacityChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:0,max:1,step:.1})},o):e.hasOwnProperty("horizontalValue")&&e.hasOwnProperty("onHorizontalChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,i.__)("Horizontal","snow-monkey-blocks"),hasValue:()=>e.horizontalValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onHorizontalChange(e.defaultValue),resetAllFilter:()=>e.onHorizontalChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Horizontal","snow-monkey-blocks"),value:e.horizontalValue,onChange:e.onHorizontalChange,min:null!==(a=e?.min)&&void 0!==a?a:-100,max:null!==(n=e?.max)&&void 0!==n?n:100})},o):e.hasOwnProperty("verticalValue")&&e.hasOwnProperty("onVerticalChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,i.__)("Vertical","snow-monkey-blocks"),hasValue:()=>e.verticalValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onVerticalChange(e.defaultValue),resetAllFilter:()=>e.onVerticalChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Vertical","snow-monkey-blocks"),value:e.verticalValue,onChange:e.onVerticalChange,min:null!==(r=e?.min)&&void 0!==r?r:-100,max:null!==(s=e?.max)&&void 0!==s?s:100})},o):e.hasOwnProperty("blurValue")&&e.hasOwnProperty("onBlurChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,i.__)("Blur","snow-monkey-blocks"),hasValue:()=>e.blurValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onBlurChange(e.defaultValue),resetAllFilter:()=>e.onBlurChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Blur","snow-monkey-blocks"),value:e.blurValue,onChange:e.onBlurChange,min:null!==(c=e?.min)&&void 0!==c?c:0,max:null!==(d=e?.max)&&void 0!==d?d:100})},o):e.hasOwnProperty("spreadValue")&&e.hasOwnProperty("onSpreadChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,i.__)("Spread","snow-monkey-blocks"),hasValue:()=>e.spreadValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onSpreadChange(e.defaultValue),resetAllFilter:()=>e.onSpreadChange(e.defaultValue),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Spread","snow-monkey-blocks"),value:e.spreadValue,onChange:e.onSpreadChange,min:null!==(u=e?.min)&&void 0!==u?u:-100,max:null!==(b=e?.max)&&void 0!==b?b:100})},o):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(m.__experimentalToolsPanelItem,{label:(0,i.__)("Position","snow-monkey-blocks"),hasValue:()=>e.positionValue!==e.defaultValue,isShownByDefault:!0,onDeselect:()=>e.onPositionChange(e.defaultValue),resetAllFilter:()=>e.onPositionChange(e.defaultValue),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Position","snow-monkey-blocks"),value:e.positionValue,onChange:e.onPositionChange,options:[{value:"",label:(0,i.__)("Outline","snow-monkey-blocks")},{value:"inset",label:(0,i.__)("Inset","snow-monkey-blocks")}]})},o):null;var a,n,r,s,c,d,u,b})(e,o)))})}const ne=["image","video"],le="full",re=({backgroundColor:e,backgroundGradientColor:o,backgroundTexture:t,fixedBackgroundColor:a,fixedBackgroundGradientColor:i,fixedBackgroundTexture:n,topDividerType:r,topDividerLevel:s,topDividerColor:d,bottomDividerType:u,bottomDividerLevel:m,bottomDividerColor:b,backgroundText:h,containerClasses:_})=>{const p=!!e||!!o,k=!!t,x=!!a||!!i,v=!!n,w=!!s,f=!!m,C=!!h?.text,V=c()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${r}`),P=c()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${u}`),T={paddingTop:s?Math.abs(s):0,paddingBottom:m?Math.abs(m):0};return(0,l.jsx)(l.Fragment,{children:(x||v||p||k||w||f||C)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",style:T,children:[v&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture"}),(p||k)&&(0,l.jsx)("div",{className:"smb-section__background",children:k&&(0,l.jsx)("div",{className:"smb-section__background__texture"})}),C&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:_,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:c()("smb-section__background-text__text",{[`has-${h?.fontSizeSlug.replace(/(\d+?)([^-])/,"$1-$2")}-font-size`]:!!h?.fontSizeSlug}),children:(0,l.jsx)(g.RichText.Content,{value:h.text?.replace(/\n/g,"<br>")})})})})}),(w||f)&&(0,l.jsxs)("div",{className:"smb-section__dividers",children:[w&&(0,l.jsx)("div",{className:V,children:y(r,s,d)}),f&&(0,l.jsx)("div",{className:P,children:y(u,m,b)})]})]})})},se=({backgroundHorizontalPosition:e,backgroundVerticalPosition:o,isBackgroundNoOver:t,backgroundColor:a,backgroundGradientColor:i,backgroundTexture:n,backgroundTextureOpacity:r,backgroundTextureUrl:s,fixedBackgroundColor:d,fixedBackgroundGradientColor:u,fixedBackgroundTexture:m,fixedBackgroundTextureOpacity:b,fixedBackgroundTextureUrl:h,topDividerType:_,topDividerLevel:p,topDividerColor:k,topDividerVerticalPosition:x,bottomDividerType:v,bottomDividerLevel:w,bottomDividerColor:f,bottomDividerVerticalPosition:C,backgroundText:V,containerClasses:P})=>{const T=!!a||!!i,j=!!n,N=!!d||!!u,O=!!m,D=!!p,B=!!w,S=!!V?.text,z=c()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${_}`),$=c()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${v}`),H={};T&&(H.backgroundColor=a,H.backgroundImage=i,t?(0<e?H.left=`${Math.abs(e)}%`:0>e&&(H.right=`${Math.abs(e)}%`),0<o?H.top=`${Math.abs(o)}%`:0>o&&(H.bottom=`${Math.abs(o)}%`)):(e||o)&&(H.transform=`translate(${e||0}%, ${o||0}%)`));const I={backgroundImage:j?s?`url(${s})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${n}.png)`:void 0,opacity:r||void 0},M={paddingTop:p?Math.abs(p):0,paddingBottom:w?Math.abs(w):0,backgroundColor:d||void 0,backgroundImage:u||void 0},L={backgroundImage:O?h?`url(${h})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${m}.png)`:void 0,opacity:b||void 0},R={};x&&(R.top=`${x}%`),C&&(R.bottom=`${C}%`);const A={};return A.color=V?.color?V.color:void 0,A.opacity=V?.opacity&&1>V.opacity?V.opacity:void 0,A.fontSize=V?.fontSize&&!V?.fontSizeSlug?V.fontSize:void 0,A.lineHeight=V?.lineHeight?V.lineHeight:void 0,A.top=V?.position?.top?V.position.top:void 0,A.right=V?.position?.right?V.position.right:void 0,A.bottom=V?.position?.bottom?V.position.bottom:void 0,A.left=V?.position?.left?V.position.left:void 0,(0,l.jsx)(l.Fragment,{children:(N||O||T||j||D||B||S)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",style:M,children:[O&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture",style:L}),(T||j)&&(0,l.jsx)("div",{className:"smb-section__background",style:H,children:j&&(0,l.jsx)("div",{className:"smb-section__background__texture",style:I})}),S&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:P,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:c()("smb-section__background-text__text",{[`has-${V?.fontSizeSlug}-font-size`]:!!V?.fontSizeSlug}),style:A,children:(0,l.jsx)(g.RichText.Content,{value:V.text?.replace(/\n/g,"<br>")})})})})}),(D||B)&&(0,l.jsxs)("div",{className:"smb-section__dividers",style:R,children:[D&&(0,l.jsx)("div",{className:z,children:y(_,p,k)}),B&&(0,l.jsx)("div",{className:$,children:y(v,w,f)})]})]})})},ce=({backgroundHorizontalPosition:e,backgroundVerticalPosition:o,isBackgroundNoOver:t,backgroundColor:a,backgroundGradientColor:i,backgroundTexture:n,backgroundTextureOpacity:r,backgroundTextureUrl:s,fixedBackgroundColor:d,fixedBackgroundGradientColor:u,fixedBackgroundTexture:m,fixedBackgroundTextureOpacity:b,fixedBackgroundTextureUrl:h,topDividerType:_,topDividerLevel:p,topDividerColor:k,topDividerVerticalPosition:x,bottomDividerType:v,bottomDividerLevel:w,bottomDividerColor:f,bottomDividerVerticalPosition:C,backgroundText:V,containerClasses:P})=>{const T=!!a||!!i,j=!!n,N=!!d||!!u,O=!!m,D=!!p,B=!!w,S=!!V?.text,z=c()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${_}`),$=c()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${v}`),H={};T&&(H.backgroundColor=a,H.backgroundImage=i,t?(0<e?H.left=`${Math.abs(e)}%`:0>e&&(H.right=`${Math.abs(e)}%`),0<o?H.top=`${Math.abs(o)}%`:0>o&&(H.bottom=`${Math.abs(o)}%`)):(e||o)&&(H.transform=`translate(${e||0}%, ${o||0}%)`));const I={backgroundImage:j?s?`url(${s})`:`url(${smb.pluginUrl}/dist/block/section/img/${n}.png)`:void 0,opacity:r||void 0},M={paddingTop:p?Math.abs(p):0,paddingBottom:w?Math.abs(w):0,backgroundColor:d||void 0,backgroundImage:u||void 0},L={backgroundImage:O?h?`url(${h})`:`url(${smb.pluginUrl}/dist/block/section/img/${m}.png)`:void 0,opacity:b||void 0},R={};x&&(R.top=`${x}%`),C&&(R.bottom=`${C}%`);const A={};return A.color=V?.color?V.color:void 0,A.opacity=V?.opacity&&1>V.opacity?V.opacity:void 0,A.fontSize=V?.fontSize&&!V?.fontSizeSlug?V.fontSize:void 0,A.lineHeight=V?.lineHeight?V.lineHeight:void 0,A.top=V?.position?.top?V.position.top:void 0,A.right=V?.position?.right?V.position.right:void 0,A.bottom=V?.position?.bottom?V.position.bottom:void 0,A.left=V?.position?.left?V.position.left:void 0,(0,l.jsx)(l.Fragment,{children:(N||O||T||j||D||B||S)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",style:M,children:[O&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture",style:L}),(T||j)&&(0,l.jsx)("div",{className:"smb-section__background",style:H,children:j&&(0,l.jsx)("div",{className:"smb-section__background__texture",style:I})}),S&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:P,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:c()("smb-section__background-text__text",{[`has-${V?.fontSizeSlug}-font-size`]:!!V?.fontSizeSlug}),style:A,children:(0,l.jsx)(g.RichText.Content,{value:V.text?.replace(/\n/g,"<br>")})})})})}),(D||B)&&(0,l.jsxs)("div",{className:"smb-section__dividers",style:R,children:[D&&(0,l.jsx)("div",{className:z,children:y(_,p,k)}),B&&(0,l.jsx)("div",{className:$,children:y(v,w,f)})]})]})})},de=n.uK,ue=n.xY,ge=[{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},migrate:e=>({...e,style:{...e?.style,spacing:{...e?.style?.spacing,padding:{...e?.padding}}}}),save({attributes:e,className:o}){const{align:t,imageID:a,imageURL:i,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskGradientColor:O,maskOpacity:D,mobileOrder:B,contentsAlignment:S,title:z,subtitle:$,lede:H,wrapperTagName:I,titleTagName:M,containerAlign:L,disableContainerPadding:R,padding:A,backgroundHorizontalPosition:U,backgroundVerticalPosition:G,isBackgroundNoOver:F,backgroundColor:K,backgroundGradientColor:W,backgroundTexture:E,backgroundTextureOpacity:J,backgroundTextureUrl:Y,fixedBackgroundColor:Q,fixedBackgroundGradientColor:X,fixedBackgroundTexture:Z,fixedBackgroundTextureOpacity:ee,fixedBackgroundTextureUrl:oe,topDividerType:ie,topDividerLevel:ne,topDividerColor:le,topDividerVerticalPosition:re,topDividerOverlay:se,bottomDividerType:ce,bottomDividerLevel:de,bottomDividerColor:ue,bottomDividerVerticalPosition:ge,bottomDividerOverlay:me,backgroundText:be}=e,he=["right","left"].includes(b),_e="nowrap"===B&&he,pe=I,ke=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&he,[`smb-section-break-the-grid--mobile-${B}`]:!!B&&he,[`smb-section--${S}`]:!!S,"smb-section--top-divider-no-overlay":!se,"smb-section--bottom-divider-no-overlay":!me,[o]:!!o,"smb-section-break-the-grid--match-height":_&&he}),xe=c()("c-container",{alignfull:("full"===L||"contents-full"===L)&&"full"===t,alignwide:"wide"===L||"contents-wide"===L&&"full"===t,"c-container--no-padding":R}),ve=c()("c-row",{"c-row--lg-top":"top"===p&&he,"c-row--lg-middle":"center"===p&&he,"c-row--lg-bottom":"bottom"===p&&he}),ye=c()("c-row__col",{"c-row__col--1-1":!_e,"c-row__col--1-2":_e,"c-row__col--lg-1-2":he&&!_e}),we=c()("c-row__col",{"c-row__col--1-1":!_e,"c-row__col--1-2":_e,"c-row__col--lg-1-2":he&&!_e}),fe=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),Ce=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${S}`]:!!S,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),Ve=c()("smb-section__body","smb-section-break-the-grid__body"),Pe=c()("smb-section-break-the-grid__shadow"),Te=c()("smb-section-break-the-grid__mask"),je={"--smb-section--color":m||void 0,"--smb-section-break-the-grid--shadow-color":P||void 0,"--smb-section-break-the-grid--shadow-transform":T&&j?`translate(${T||0}%, ${j||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":y&&u()(y,w),"--smb-section-break-the-grid--mask-color":N||void 0,"--smb-section-break-the-grid--mask-image":O||void 0,"--smb-section-break-the-grid--mask-opacity":N||O?D:void 0,...V(A),...te({backgroundHorizontalPosition:U,backgroundVerticalPosition:G,isBackgroundNoOver:F,backgroundColor:K,backgroundGradientColor:W,backgroundTexture:E,backgroundTextureOpacity:J,backgroundTextureUrl:Y,fixedBackgroundColor:Q,fixedBackgroundGradientColor:X,fixedBackgroundTexture:Z,fixedBackgroundTextureOpacity:ee,fixedBackgroundTextureUrl:oe,topDividerVerticalPosition:re,topDividerLevel:ne,bottomDividerVerticalPosition:ge,bottomDividerLevel:de,backgroundText:be})};let Ne;return i&&("image"===d||void 0===d?Ne=(0,l.jsx)("img",{src:i,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${a}`}):"video"===d&&(Ne=(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:i,width:!!r&&r,height:!!s&&s}))),(0,l.jsxs)(pe,{...g.useBlockProps.save({className:ke,style:je}),children:[(0,l.jsx)(ae,{backgroundColor:K,backgroundGradientColor:W,backgroundTexture:E,fixedBackgroundColor:Q,fixedBackgroundGradientColor:X,fixedBackgroundTexture:Z,topDividerType:ie,topDividerLevel:ne,topDividerColor:le,bottomDividerType:ce,bottomDividerLevel:de,bottomDividerColor:ue,backgroundText:be,containerClasses:xe}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:xe,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:ve,children:[(0,l.jsx)("div",{className:ye,children:(0,l.jsxs)("div",{className:Ce,children:[(0,l.jsx)(q,{title:z,titleTagName:M,subtitle:$,lede:H,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:Ve})})]})}),(0,l.jsx)("div",{className:we,children:(0,l.jsxs)("div",{className:fe,children:[P&&(0,l.jsx)("div",{className:Pe}),0<Number((1-D).toFixed(1))&&(0,l.jsx)("div",{className:Te}),Ne]})})]})})})})]})}},{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},save({attributes:e,className:o}){const{align:t,imageID:a,imageURL:i,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskGradientColor:O,maskOpacity:D,mobileOrder:B,contentsAlignment:S,title:z,subtitle:$,lede:H,wrapperTagName:I,titleTagName:M,containerAlign:L,padding:R,backgroundHorizontalPosition:A,backgroundVerticalPosition:U,isBackgroundNoOver:G,backgroundColor:F,backgroundGradientColor:K,backgroundTexture:W,backgroundTextureOpacity:E,backgroundTextureUrl:J,fixedBackgroundColor:Y,fixedBackgroundGradientColor:Q,fixedBackgroundTexture:X,fixedBackgroundTextureOpacity:Z,fixedBackgroundTextureUrl:ee,topDividerType:oe,topDividerLevel:ae,topDividerColor:ie,topDividerVerticalPosition:ne,bottomDividerType:le,bottomDividerLevel:se,bottomDividerColor:ce,bottomDividerVerticalPosition:de,backgroundText:ue}=e,ge=["right","left"].includes(b),me="nowrap"===B&&ge,be=I,he=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&ge,[`smb-section-break-the-grid--mobile-${B}`]:!!B&&ge,[`smb-section--${S}`]:!!S,[o]:!!o,"smb-section-break-the-grid--match-height":_&&ge}),_e=c()("c-container",{alignfull:"full"===L&&"full"===t,alignwide:"wide"===L&&"full"===t}),pe=c()("c-row",{"c-row--lg-top":"top"===p&&ge,"c-row--lg-middle":"center"===p&&ge,"c-row--lg-bottom":"bottom"===p&&ge}),ke=c()("c-row__col",{"c-row__col--1-1":!me,"c-row__col--1-2":me,"c-row__col--lg-1-2":ge&&!me}),xe=c()("c-row__col",{"c-row__col--1-1":!me,"c-row__col--1-2":me,"c-row__col--lg-1-2":ge&&!me}),ve=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),ye=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${S}`]:!!S,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),we=c()("smb-section__body","smb-section-break-the-grid__body"),fe=c()("smb-section-break-the-grid__shadow"),Ce=c()("smb-section-break-the-grid__mask"),Ve={"--smb-section--color":m||void 0,"--smb-section-break-the-grid--shadow-color":P||void 0,"--smb-section-break-the-grid--shadow-transform":T&&j?`translate(${T||0}%, ${j||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":y&&u()(y,w),"--smb-section-break-the-grid--mask-color":N||void 0,"--smb-section-break-the-grid--mask-image":O||void 0,"--smb-section-break-the-grid--mask-opacity":N||O?D:void 0,...V(R),...te({backgroundHorizontalPosition:A,backgroundVerticalPosition:U,isBackgroundNoOver:G,backgroundColor:F,backgroundGradientColor:K,backgroundTexture:W,backgroundTextureOpacity:E,backgroundTextureUrl:J,fixedBackgroundColor:Y,fixedBackgroundGradientColor:Q,fixedBackgroundTexture:X,fixedBackgroundTextureOpacity:Z,fixedBackgroundTextureUrl:ee,topDividerVerticalPosition:ne,bottomDividerVerticalPosition:de,backgroundText:ue})};let Pe;return i&&("image"===d||void 0===d?Pe=(0,l.jsx)("img",{src:i,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${a}`}):"video"===d&&(Pe=(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:i,width:!!r&&r,height:!!s&&s}))),(0,l.jsxs)(be,{...g.useBlockProps.save({className:he,style:Ve}),children:[(0,l.jsx)(re,{backgroundColor:F,backgroundGradientColor:K,backgroundTexture:W,fixedBackgroundColor:Y,fixedBackgroundGradientColor:Q,fixedBackgroundTexture:X,topDividerType:oe,topDividerLevel:ae,topDividerColor:ie,bottomDividerType:le,bottomDividerLevel:se,bottomDividerColor:ce,backgroundText:ue,containerClasses:_e}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:_e,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:pe,children:[(0,l.jsx)("div",{className:ke,children:(0,l.jsxs)("div",{className:ye,children:[(0,l.jsx)(q,{title:z,titleTagName:M,subtitle:$,lede:H,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:we})})]})}),(0,l.jsx)("div",{className:xe,children:(0,l.jsxs)("div",{className:ve,children:[P&&(0,l.jsx)("div",{className:fe}),0<Number((1-D).toFixed(1))&&(0,l.jsx)("div",{className:Ce}),Pe]})})]})})})})]})}},{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},save({attributes:e,className:o}){const{align:t,imageID:a,imageURL:i,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskOpacity:O,mobileOrder:D,contentsAlignment:B,title:S,subtitle:z,lede:$,wrapperTagName:H,titleTagName:I,containerAlign:M,padding:L,backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:ae,topDividerVerticalPosition:ie,bottomDividerType:ne,bottomDividerLevel:le,bottomDividerColor:se,bottomDividerVerticalPosition:ce,backgroundText:de}=e,ue=["right","left"].includes(b),ge="nowrap"===D&&ue,me=H,be=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&ue,[`smb-section-break-the-grid--mobile-${D}`]:!!D&&ue,[`smb-section--${B}`]:!!B,[o]:!!o,"smb-section-break-the-grid--match-height":_&&ue}),he=c()("c-container",{alignfull:"full"===M&&"full"===t,alignwide:"wide"===M&&"full"===t}),_e=c()("c-row",{"c-row--lg-top":"top"===p&&ue,"c-row--lg-middle":"center"===p&&ue,"c-row--lg-bottom":"bottom"===p&&ue}),pe=c()("c-row__col",{"c-row__col--1-1":!ge,"c-row__col--1-2":ge,"c-row__col--lg-1-2":ue&&!ge}),ke=c()("c-row__col",{"c-row__col--1-1":!ge,"c-row__col--1-2":ge,"c-row__col--lg-1-2":ue&&!ge}),xe=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),ve=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${B}`]:!!B,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),ye=c()("smb-section__body","smb-section-break-the-grid__body"),we=c()("smb-section-break-the-grid__shadow"),fe=c()("smb-section-break-the-grid__mask"),Ce={"--smb-section--color":m||void 0,"--smb-section-break-the-grid--shadow-color":P||void 0,"--smb-section-break-the-grid--shadow-transform":T&&j?`translate(${T||0}%, ${j||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":y&&u()(y,w),"--smb-section-break-the-grid--mask-color":N||void 0,"--smb-section-break-the-grid--mask-opacity":N?O:void 0,...V(L),...te({backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerVerticalPosition:ie,bottomDividerVerticalPosition:ce,backgroundText:de})};let Ve;return i&&("image"===d||void 0===d?Ve=(0,l.jsx)("img",{src:i,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${a}`}):"video"===d&&(Ve=(0,l.jsx)("video",{controls:!0,src:i,width:!!r&&r,height:!!s&&s}))),(0,l.jsxs)(me,{...g.useBlockProps.save({className:be,style:Ce}),children:[(0,l.jsx)(re,{backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,topDividerType:ee,topDividerLevel:oe,topDividerColor:ae,bottomDividerType:ne,bottomDividerLevel:le,bottomDividerColor:se,backgroundText:de,containerClasses:he}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:he,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:_e,children:[(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:ve,children:[(0,l.jsx)(q,{title:S,titleTagName:I,subtitle:z,lede:$,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:ye})})]})}),(0,l.jsx)("div",{className:ke,children:(0,l.jsxs)("div",{className:xe,children:[P&&(0,l.jsx)("div",{className:we}),0<Number((1-O).toFixed(1))&&(0,l.jsx)("div",{className:fe}),Ve]})})]})})})})]})}},{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},save({attributes:e,className:o}){const{align:t,imageID:a,imageURL:i,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskOpacity:O,mobileOrder:D,contentsAlignment:B,title:S,subtitle:z,lede:$,wrapperTagName:H,titleTagName:I,containerAlign:M,padding:L,backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:te,topDividerVerticalPosition:ae,bottomDividerType:ie,bottomDividerLevel:ne,bottomDividerColor:le,bottomDividerVerticalPosition:re,backgroundText:ce}=e,de=["right","left"].includes(b),ue="nowrap"===D&&de,ge=H,me=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&de,[`smb-section-break-the-grid--mobile-${D}`]:!!D&&de,[`smb-section--${B}`]:!!B,[o]:!!o,"smb-section-break-the-grid--match-height":_&&de}),be=c()("c-container",{alignfull:"full"===M&&"full"===t,alignwide:"wide"===M&&"full"===t}),he=c()("c-row",{"c-row--lg-top":"top"===p&&de,"c-row--lg-middle":"center"===p&&de,"c-row--lg-bottom":"bottom"===p&&de}),_e=c()("c-row__col",{"c-row__col--1-1":!ue,"c-row__col--1-2":ue,"c-row__col--lg-1-2":de&&!ue}),pe=c()("c-row__col",{"c-row__col--1-1":!ue,"c-row__col--1-2":ue,"c-row__col--lg-1-2":de&&!ue}),ke=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),xe=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${B}`]:!!B,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),ve=c()("smb-section__body","smb-section-break-the-grid__body"),ye=c()("smb-section-break-the-grid__shadow"),we=c()("smb-section-break-the-grid__mask"),fe={color:m||void 0,...V(L)},Ce={};P&&(Ce.backgroundColor=P),(T||j)&&(Ce.transform=`translate(${T||0}%, ${j||0}%)`);const Ve={backgroundColor:y&&u()(y,w)},Pe={};N&&(Pe.backgroundColor=N);const Te={opacity:N?O:void 0};let je;return i&&("image"===d||void 0===d?je=(0,l.jsx)("img",{src:i,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${a}`,style:Te}):"video"===d&&(je=(0,l.jsx)("video",{controls:!0,src:i,width:!!r&&r,height:!!s&&s,style:Te}))),(0,l.jsxs)(ge,{...g.useBlockProps.save({className:me,style:fe}),children:[(0,l.jsx)(se,{backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:te,topDividerVerticalPosition:ae,bottomDividerType:ie,bottomDividerLevel:ne,bottomDividerColor:le,bottomDividerVerticalPosition:re,backgroundText:ce,containerClasses:be}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:be,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:he,children:[(0,l.jsx)("div",{className:_e,children:(0,l.jsxs)("div",{className:xe,style:Ve,children:[(0,l.jsx)(q,{title:S,titleTagName:I,subtitle:z,lede:$,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:ve})})]})}),(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:ke,children:[P&&(0,l.jsx)("div",{className:ye,style:Ce}),0<Number((1-O).toFixed(1))&&(0,l.jsx)("div",{className:we,style:Pe}),je]})})]})})})})]})}},{attributes:{...de,padding:{type:"object",default:{}}},supports:{...ue},save({attributes:e,className:o}){const{align:t,imageID:a,imageURL:i,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:P,shadowHorizontalPosition:T,shadowVerticalPosition:j,maskColor:N,maskOpacity:O,mobileOrder:D,contentsAlignment:B,title:S,subtitle:z,lede:$,wrapperTagName:H,titleTagName:I,containerAlign:M,padding:L,backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:te,topDividerVerticalPosition:ae,bottomDividerType:ie,bottomDividerLevel:ne,bottomDividerColor:le,bottomDividerVerticalPosition:re,backgroundText:se}=e,de=["right","left"].includes(b),ue="nowrap"===D&&de,ge=H,me=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&de,[`smb-section-break-the-grid--mobile-${D}`]:!!D&&de,[`smb-section--${B}`]:!!B,[o]:!!o,"smb-section-break-the-grid--match-height":_&&de}),be=c()("c-container",{alignfull:"full"===M&&"full"===t,alignwide:"wide"===M&&"full"===t}),he=c()("c-row",{"c-row--lg-top":"top"===p&&de,"c-row--lg-middle":"center"===p&&de,"c-row--lg-bottom":"bottom"===p&&de}),_e=c()("c-row__col",{"c-row__col--1-1":!ue,"c-row__col--1-2":ue,"c-row__col--lg-1-2":de&&!ue}),pe=c()("c-row__col",{"c-row__col--1-1":!ue,"c-row__col--1-2":ue,"c-row__col--lg-1-2":de&&!ue}),ke=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),xe=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${B}`]:!!B,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),ve=c()("smb-section__body","smb-section-break-the-grid__body"),ye=c()("smb-section-break-the-grid__shadow"),we=c()("smb-section-break-the-grid__mask"),fe={color:m||void 0,...V(L)},Ce={};P&&(Ce.backgroundColor=P),(T||j)&&(Ce.transform=`translate(${T||0}%, ${j||0}%)`);const Ve={backgroundColor:y&&u()(y,w)},Pe={};N&&(Pe.backgroundColor=N);const Te={opacity:N?O:void 0};let je;return i&&("image"===d||void 0===d?je=(0,l.jsx)("img",{src:i,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${a}`,style:Te}):"video"===d&&(je=(0,l.jsx)("video",{controls:!0,src:i,width:!!r&&r,height:!!s&&s,style:Te}))),(0,l.jsxs)(ge,{...g.useBlockProps.save({className:me,style:fe}),children:[(0,l.jsx)(ce,{backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:te,topDividerVerticalPosition:ae,bottomDividerType:ie,bottomDividerLevel:ne,bottomDividerColor:le,bottomDividerVerticalPosition:re,backgroundText:se,containerClasses:be}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:be,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:he,children:[(0,l.jsx)("div",{className:_e,children:(0,l.jsxs)("div",{className:xe,style:Ve,children:[(0,l.jsx)(q,{title:S,titleTagName:I,subtitle:z,lede:$,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:ve})})]})}),(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:ke,children:[P&&(0,l.jsx)("div",{className:ye,style:Ce}),0<Number((1-O).toFixed(1))&&(0,l.jsx)("div",{className:we,style:Pe}),je]})})]})})})})]})}},{attributes:{...de,imageSize:{type:"string",default:"l"},contentSize:{type:"string",default:"s"},contentHorizontalPosition:{type:"string",default:"s"}},supports:{align:["wide","full"],anchor:!0},migrate(e){let o={...e};if(o.imageSize)switch(o.imageSize){case"m":default:o.imageSize="";break;case"l":o.imageSize="40";break;case"xl":o.imageSize="80"}if(o.contentSize)switch(o.contentSize){case"xs":o.contentSize="-40";break;case"s":o.contentSize="-20";break;case"m":default:o.contentSize="";break;case"l":o.contentSize="20";break;case"xl":o.contentSize="40"}if(o.contentHorizontalPosition)switch(o.contentHorizontalPosition){case"xs":o.contentHorizontalPosition="5";break;case"s":o.contentHorizontalPosition="10";break;case"m":o.contentHorizontalPosition="15";break;case"l":o.contentHorizontalPosition="20";break;case"xl":o.contentHorizontalPosition="25";break;default:o.contentHorizontalPosition=""}if(o.contentVerticalPosition)switch(o.contentVerticalPosition){case"txl":o.contentVerticalPosition="t100";break;case"tl":o.contentVerticalPosition="t80";break;case"tm":o.contentVerticalPosition="t60";break;case"ts":o.contentVerticalPosition="t40";break;case"bs":o.contentVerticalPosition="b40";break;case"bm":o.contentVerticalPosition="b60";break;case"bl":o.contentVerticalPosition="b80";break;case"bxl":o.contentVerticalPosition="b100";break;default:o.contentVerticalPosition=""}return o.className&&(o.className=(0,k.without)(o.className.split(" "),"smb-section--left","smb-section--center","smb-section--right").join(" ")),o.className||(o=(0,k.omit)(o,"className")),{...o}},save({attributes:e,className:o}){const{wrapperTagName:t,titleTagName:a,title:i,subtitle:n,lede:r,imageID:s,imageURL:d,imageAlt:m,imageWidth:b,imageHeight:h,imageMediaType:_,textColor:p,imagePosition:k,imageSize:x,verticalAlignment:v,contentSize:y,contentHorizontalPosition:w,contentVerticalPosition:f,contentBackgroundColor:C,contentBackgroundOpacity:V,contentPadding:P,removeContentOutsidePadding:T,shadowColor:j,shadowHorizontalPosition:N,shadowVerticalPosition:O,maskColor:D,maskOpacity:B,mobileOrder:S,contentsAlignment:z}=e,$=t,H=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${k}`,{[`smb-section-break-the-grid--vertical-${f}`]:f&&v&&"middle"!==v,[`smb-section-break-the-grid--mobile-${S}`]:!!S,[`smb-section--${z}`]:!!z,[o]:!!o}),I=c()("c-row","c-row--margin",{"c-row--lg-top":"top"===v,"c-row--lg-middle":"center"===v,"c-row--lg-bottom":"bottom"===v}),M=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),L=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),R=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${x}`]:!!x}),A=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${y}`]:!!y,[`smb-section-break-the-grid__content--p-${P}`]:!!P,[`smb-section-break-the-grid__content--horizontal-${w}`]:!!w,"smb-section-break-the-grid__content--remove-outside-p":P&&T}),U=c()("smb-section-break-the-grid__shadow"),G=c()("smb-section-break-the-grid__mask"),F=!g.RichText.isEmpty(i)&&"none"!==a,K=!g.RichText.isEmpty(n),W=!g.RichText.isEmpty(r),E={color:p||void 0},q={};j&&(q.backgroundColor=j),(N||O)&&(q.transform=`translate(${N||0}%, ${O||0}%)`);const J={backgroundColor:C&&u()(C,V)},Y={};D&&(Y.backgroundColor=D);const Q={opacity:D?B:void 0};let X;return d&&("image"===_||void 0===_?X=(0,l.jsx)("img",{src:d,alt:m,width:!!b&&b,height:!!h&&h,className:`wp-image-${s}`,style:Q}):"video"===_&&(X=(0,l.jsx)("video",{controls:!0,src:d,width:!!b&&b,height:!!h&&h,style:Q}))),(0,l.jsx)($,{...g.useBlockProps.save({className:H,style:E}),children:(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:"c-container",children:(0,l.jsxs)("div",{className:I,children:[(0,l.jsx)("div",{className:M,children:(0,l.jsxs)("div",{className:A,style:J,children:[F&&K&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__subtitle smb-section-break-the-grid__subtitle",value:n}),F&&(0,l.jsx)(g.RichText.Content,{tagName:a,className:"smb-section__title smb-section-break-the-grid__title",value:i}),F&&W&&(0,l.jsx)("div",{className:"smb-section__lede-wrapper smb-section-break-the-grid__lede-wrapper",children:(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__lede smb-section-break-the-grid__lede",value:r})}),(0,l.jsx)("div",{className:"smb-section__body smb-section-break-the-grid__body",children:(0,l.jsx)(g.InnerBlocks.Content,{})})]})}),(0,l.jsx)("div",{className:L,children:(0,l.jsxs)("div",{className:R,children:[j&&(0,l.jsx)("div",{className:U,style:q}),0<Number((1-B).toFixed(1))&&(0,l.jsx)("div",{className:G,style:Y}),X]})})]})})})})}},{attributes:{...de},supports:{align:["wide","full"],anchor:!0},save({attributes:e,className:o}){const{wrapperTagName:t,titleTagName:a,title:i,subtitle:n,lede:r,imageID:s,imageURL:d,imageAlt:m,imageWidth:b,imageHeight:h,imageMediaType:_,textColor:p,imagePosition:k,imageSize:x,verticalAlignment:v,contentSize:y,contentHorizontalPosition:w,contentVerticalPosition:f,contentBackgroundColor:C,contentBackgroundOpacity:V,contentPadding:P,removeContentOutsidePadding:T,shadowColor:j,shadowHorizontalPosition:N,shadowVerticalPosition:O,maskColor:D,maskOpacity:B,mobileOrder:S}=e,z=t,$=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${k}`,{[`smb-section-break-the-grid--vertical-${f}`]:f&&v&&"middle"!==v,[`smb-section-break-the-grid--mobile-${S}`]:!!S,[o]:!!o}),H=c()("c-row","c-row--margin",{"c-row--lg-top":"top"===v,"c-row--lg-middle":"center"===v,"c-row--lg-bottom":"bottom"===v}),I=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),M=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),L=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${x}`]:!!x}),R=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${y}`]:!!y,[`smb-section-break-the-grid__content--p-${P}`]:!!P,[`smb-section-break-the-grid__content--horizontal-${w}`]:!!w,"smb-section-break-the-grid__content--remove-outside-p":P&&T}),A=c()("smb-section-break-the-grid__shadow"),U=c()("smb-section-break-the-grid__mask"),G={color:p||void 0},F={};j&&(F.backgroundColor=j),(N||O)&&(F.transform=`translate(${N||0}%, ${O||0}%)`);const K={backgroundColor:C&&u()(C,V)},W={};D&&(W.backgroundColor=D);const E={opacity:D?B:void 0};let q;return d&&("image"===_||void 0===_?q=(0,l.jsx)("img",{src:d,alt:m,width:!!b&&b,height:!!h&&h,className:`wp-image-${s}`,style:E}):"video"===_&&(q=(0,l.jsx)("video",{controls:!0,src:d,width:!!b&&b,height:!!h&&h,style:E}))),(0,l.jsx)(z,{...g.useBlockProps.save({className:$,style:G}),children:(0,l.jsx)("div",{className:"c-container",children:(0,l.jsxs)("div",{className:H,children:[(0,l.jsx)("div",{className:I,children:(0,l.jsxs)("div",{className:R,style:K,children:[!g.RichText.isEmpty(i)&&!g.RichText.isEmpty(n)&&"none"!==a&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__subtitle smb-section-break-the-grid__subtitle",value:n}),!g.RichText.isEmpty(i)&&"none"!==a&&(0,l.jsx)(g.RichText.Content,{tagName:a,className:"smb-section__title smb-section-break-the-grid__title",value:i}),!g.RichText.isEmpty(i)&&!g.RichText.isEmpty(r)&&"none"!==a&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__lede smb-section-break-the-grid__lede",value:r}),(0,l.jsx)("div",{className:"smb-section__body smb-section-break-the-grid__body",children:(0,l.jsx)(g.InnerBlocks.Content,{})})]})}),(0,l.jsx)("div",{className:M,children:(0,l.jsxs)("div",{className:L,children:[j&&(0,l.jsx)("div",{className:A,style:F}),0<Number((1-B).toFixed(1))&&(0,l.jsx)("div",{className:U,style:W}),q]})})]})})})}},{attributes:{...de,verticalAlignment:{type:"string",default:"middle"}},migrate:e=>({...e,verticalAlignment:"middle"===e.verticalAlignment?"center":e.verticalAlignment}),save({attributes:e,className:o}){const{wrapperTagName:t,titleTagName:a,title:i,subtitle:n,lede:r,imageID:s,imageURL:d,imageAlt:m,imageWidth:b,imageHeight:h,imageMediaType:_,textColor:p,imagePosition:k,imageSize:x,verticalAlignment:v,contentSize:y,contentHorizontalPosition:w,contentVerticalPosition:f,contentBackgroundColor:C,contentBackgroundOpacity:V,contentPadding:P,removeContentOutsidePadding:T,shadowColor:j,shadowHorizontalPosition:N,shadowVerticalPosition:O,maskColor:D,maskOpacity:B,mobileOrder:S}=e,z=t,$=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${k}`,{[`smb-section-break-the-grid--vertical-${f}`]:f&&v&&"middle"!==v,[`smb-section-break-the-grid--mobile-${S}`]:!!S,[o]:!!o}),H=c()("c-row","c-row--margin",{[`c-row--lg-${v}`]:!0}),I=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),M=c()("c-row__col","c-row__col--1-1","c-row__col--lg-1-2"),L=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${x}`]:!!x}),R=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${y}`]:!!y,[`smb-section-break-the-grid__content--p-${P}`]:!!P,[`smb-section-break-the-grid__content--horizontal-${w}`]:!!w,"smb-section-break-the-grid__content--remove-outside-p":P&&T}),A=c()("smb-section-break-the-grid__shadow"),U=c()("smb-section-break-the-grid__mask"),G={color:p||void 0},F={};j&&(F.backgroundColor=j),(N||O)&&(F.transform=`translate(${N||0}%, ${O||0}%)`);const K={backgroundColor:C&&u()(C,V)},W={};D&&(W.backgroundColor=D);const E={opacity:B};let q;return d&&("image"===_||void 0===_?q=(0,l.jsx)("img",{src:d,alt:m,width:!!b&&b,height:!!h&&h,className:`wp-image-${s}`,style:E}):"video"===_&&(q=(0,l.jsx)("video",{controls:!0,src:d,width:!!b&&b,height:!!h&&h,style:E}))),(0,l.jsx)(z,{className:$,style:G,children:(0,l.jsx)("div",{className:"c-container",children:(0,l.jsxs)("div",{className:H,children:[(0,l.jsx)("div",{className:I,children:(0,l.jsxs)("div",{className:R,style:K,children:[!g.RichText.isEmpty(i)&&!g.RichText.isEmpty(n)&&"none"!==a&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__subtitle smb-section-break-the-grid__subtitle",value:n}),!g.RichText.isEmpty(i)&&"none"!==a&&(0,l.jsx)(g.RichText.Content,{tagName:a,className:"smb-section__title smb-section-break-the-grid__title",value:i}),!g.RichText.isEmpty(i)&&!g.RichText.isEmpty(r)&&"none"!==a&&(0,l.jsx)(g.RichText.Content,{tagName:"div",className:"smb-section__lede smb-section-break-the-grid__lede",value:r}),(0,l.jsx)("div",{className:"smb-section__body smb-section-break-the-grid__body",children:(0,l.jsx)(g.InnerBlocks.Content,{})})]})}),(0,l.jsx)("div",{className:M,children:(0,l.jsxs)("div",{className:L,children:[j&&(0,l.jsx)("div",{className:A,style:F}),0<Number((1-B).toFixed(1))&&(0,l.jsx)("div",{className:U,style:W}),q]})})]})})})}}],me={to:[{type:"block",blocks:["snow-monkey-blocks/section"],transform:(e,o)=>(0,a.createBlock)("snow-monkey-blocks/section",e,o)},{type:"block",blocks:["snow-monkey-blocks/section-side-heading"],transform:(e,o)=>(0,a.createBlock)("snow-monkey-blocks/section-side-heading",e,o)},{type:"block",blocks:["snow-monkey-blocks/section-with-bgimage"],transform:(e,o)=>(e.lgImageID=e.imageID,e.lgImageURL=e.imageURL,e.lgImageAlt=e.imageAlt,e.lgImageWidth=e.imageWidth,e.lgImageHeight=e.imageHeight,e.lgImageMediaType=e.imageMediaType,(0,a.createBlock)("snow-monkey-blocks/section-with-bgimage",e,o))}]},be={attributes:{title:"Lorem",imageID:1,imageURL:`${smb.pluginUrl}/dist/img/photos/0117_xlarge.jpg`},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"}}]};(0,a.registerBlockType)(n.UU,{icon:{foreground:"#cd162c",src:r},keywords:[(0,i.__)("Outer","snow-monkey-blocks"),(0,i.__)("Wrapper","snow-monkey-blocks"),(0,i.__)("Container","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:o,isSelected:t,className:a,clientId:r}){const{align:s,imageID:d,imageURL:h,imageAlt:k,imageWidth:x,imageHeight:y,imageSizeSlug:f,imageMediaType:V,textColor:T,imagePosition:j,imageSize:N,imageMatchHeight:O,verticalAlignment:D,contentSize:S,contentHorizontalPosition:$,contentVerticalPosition:H,contentBackgroundColor:I,contentBackgroundOpacity:L,contentPadding:R,removeContentOutsidePadding:A,shadowColor:U,shadowHorizontalPosition:G,shadowVerticalPosition:F,maskColor:K,maskGradientColor:E,maskOpacity:q,mobileOrder:J,contentsAlignment:Y,title:re,subtitle:se,lede:ce,wrapperTagName:de,titleTagName:ue,containerAlign:ge,disableContainerPadding:me,backgroundHorizontalPosition:be,backgroundVerticalPosition:he,isBackgroundNoOver:_e,backgroundColor:pe,backgroundGradientColor:ke,backgroundTexture:xe,backgroundTextureOpacity:ve,backgroundTextureUrl:ye,fixedBackgroundColor:we,fixedBackgroundGradientColor:fe,fixedBackgroundTexture:Ce,fixedBackgroundTextureOpacity:Ve,fixedBackgroundTextureUrl:Pe,topDividerType:Te,topDividerLevel:je,topDividerColor:Ne,topDividerVerticalPosition:Oe,topDividerOverlay:De,bottomDividerType:Be,bottomDividerLevel:Se,bottomDividerColor:ze,bottomDividerVerticalPosition:$e,bottomDividerOverlay:He,backgroundText:Ie,templateLock:Me}=e,Le=(0,b.useSelect)((e=>!!e("core/block-editor").getBlock(r)?.innerBlocks?.length),[r]),Re=(0,b.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),Ae=(0,b.useSelect)((e=>d?e("core").getEntityRecord("postType","attachment",d):null),[d]),Ue=Re.filter((({slug:e})=>Ae?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:o})=>({value:o,label:e}))),Ge=["right","left"].includes(j),Fe="nowrap"===J&&Ge,Ke=de,We=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${j}`,{[`smb-section-break-the-grid--vertical-${H}`]:H&&D&&"center"!==D&&Ge,[`smb-section-break-the-grid--mobile-${J}`]:!!J&&Ge,[`smb-section--${Y}`]:!!Y,"smb-section--top-divider-no-overlay":!De,"smb-section--bottom-divider-no-overlay":!He,[a]:!!a,"smb-section-break-the-grid--match-height":O&&Ge}),Ee=c()("c-container",{alignfull:("full"===ge||"contents-full"===ge)&&"full"===s,alignwide:"wide"===ge||"contents-wide"===ge&&"full"===s,"c-container--no-padding":me}),qe=c()("c-row",{"c-row--lg-top":"top"===D&&Ge,"c-row--lg-middle":"center"===D&&Ge,"c-row--lg-bottom":"bottom"===D&&Ge}),Je=c()("c-row__col",{"c-row__col--1-1":!Fe,"c-row__col--1-2":Fe,"c-row__col--lg-1-2":Ge&&!Fe}),Ye=c()("c-row__col",{"c-row__col--1-1":!Fe,"c-row__col--1-2":Fe,"c-row__col--lg-1-2":Ge&&!Fe}),Qe=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${N}`]:!!N}),Xe=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${S}`]:!!S,[`smb-section-break-the-grid__content--p-${R}`]:!!R,[`smb-section-break-the-grid__content--horizontal-${$}`]:!!$,[`smb-section-break-the-grid__content--${Y}`]:!!Y,"smb-section-break-the-grid__content--remove-outside-p":R&&A}),Ze=c()("smb-section__body","smb-section-break-the-grid__body"),eo=c()("smb-section-break-the-grid__shadow"),oo=c()("smb-section-break-the-grid__mask"),to={"--smb-section--color":T||void 0,"--smb-section-break-the-grid--shadow-color":U||void 0,"--smb-section-break-the-grid--shadow-transform":G&&F?`translate(${G||0}%, ${F||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":I&&u()(I,L),"--smb-section-break-the-grid--mask-color":K||void 0,"--smb-section-break-the-grid--mask-image":E||void 0,"--smb-section-break-the-grid--mask-opacity":K||E?q:void 0,...te({backgroundHorizontalPosition:be,backgroundVerticalPosition:he,isBackgroundNoOver:_e,backgroundColor:pe,backgroundGradientColor:ke,backgroundTexture:xe,backgroundTextureOpacity:ve,backgroundTextureUrl:ye,fixedBackgroundColor:we,fixedBackgroundGradientColor:fe,fixedBackgroundTexture:Ce,fixedBackgroundTextureOpacity:Ve,fixedBackgroundTextureUrl:Pe,topDividerVerticalPosition:Oe,topDividerLevel:je,bottomDividerVerticalPosition:$e,bottomDividerLevel:Se,backgroundText:Ie})},ao=(0,g.useBlockProps)({className:We,style:to}),io=(0,g.useInnerBlocksProps)({className:Ze},{templateLock:Me,renderAppender:Le?void 0:g.InnerBlocks.ButtonBlockAppender}),no=P(),[lo]=null!=g.useSettings?(0,g.useSettings)("typography.fontSizes"):[(0,g.useSetting)("typography.fontSizes")].filter(Boolean),ro={...Ie,position:{...Ie.position}};let so=[{value:"-50",label:(0,i.__)("-50%","snow-monkey-blocks")},{value:"-40",label:(0,i.__)("-40%","snow-monkey-blocks")},{value:"-30",label:(0,i.__)("-30%","snow-monkey-blocks")},{value:"-20",label:(0,i.__)("-20%","snow-monkey-blocks")},{value:"-10",label:(0,i.__)("-10%","snow-monkey-blocks")},{value:"",label:(0,i.__)("+-0%","snow-monkey-blocks")}];return so=Ge?so.concat([{value:"10",label:(0,i.__)("+10%","snow-monkey-blocks")},{value:"20",label:(0,i.__)("+20%","snow-monkey-blocks")},{value:"30",label:(0,i.__)("+30%","snow-monkey-blocks")},{value:"40",label:(0,i.__)("+40%","snow-monkey-blocks")},{value:"50",label:(0,i.__)("+50%","snow-monkey-blocks")}]):so,(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g.InspectorControls,{group:"color",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{...(0,g.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:r,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:T,onColorChange:e=>o({textColor:e}),resetAllFilter:()=>({textColor:n.uK.textColor?.default}),label:(0,i.__)("Text color","snow-monkey-blocks")}]})}),(0,l.jsxs)(g.InspectorControls,{children:[(0,l.jsx)(M,{disableIsSlim:!0,disableContentsMaxWidth:!0,disableContainerAlign:"full"!==s,settings:[{wrapperTagNameValue:de,onWrapperTagNameChange:e=>o({wrapperTagName:e}),defaultValue:n.uK.wrapperTagName.default},{titleTagNameValue:ue,onTitleTagNameChange:e=>o({titleTagName:e}),defaultValue:n.uK.titleTagName.default},{containerAlignValue:ge,onContainerAlignChange:e=>o({containerAlign:e}),defaultValue:n.uK.containerAlign.default},{disableContainerPaddingValue:me,onDisableContainerPaddingChange:e=>o({disableContainerPadding:e}),defaultValue:n.uK.disableContainerPadding.default}]}),(0,l.jsxs)(m.__experimentalToolsPanel,{label:(0,i.__)("Media settings","snow-monkey-blocks"),dropdownMenuProps:no,children:[0<Ue.length&&(0,l.jsx)(z,{defaultValue:n.uK.imageSizeSlug.default,value:f,options:Ue,onChange:e=>{const t=Ae?.media_details?.sizes?.[e]?.source_url,a=Ae?.media_details?.sizes?.[e]?.width,i=Ae?.media_details?.sizes?.[e]?.height;o({imageURL:t,imageWidth:a,imageHeight:i,imageSizeSlug:e})}}),Ge&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>J!==n.uK.mobileOrder.default,isShownByDefault:!0,label:(0,i.__)("Sort by mobile","snow-monkey-blocks"),onDeselect:()=>o({mobileOrder:n.uK.mobileOrder.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Sort by mobile","snow-monkey-blocks"),value:J,options:[{value:"",label:(0,i.__)("Default","snow-monkey-blocks")},{value:"text",label:(0,i.__)("Text > Image","snow-monkey-blocks")},{value:"image",label:(0,i.__)("Image > Text","snow-monkey-blocks")},{value:"nowrap",label:(0,i.__)("No wrap","snow-monkey-blocks")}],onChange:e=>o({mobileOrder:""===e?void 0:e})})}),(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>N!==n.uK.imageSize.default,isShownByDefault:!0,label:(0,i.__)("Image Size Adjustment","snow-monkey-blocks"),onDeselect:()=>o({imageSize:n.uK.imageSize.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Image Size Adjustment","snow-monkey-blocks"),value:N,options:[{value:"",label:(0,i.__)("+-0%","snow-monkey-blocks")},{value:"10",label:(0,i.__)("+10%","snow-monkey-blocks")},{value:"20",label:(0,i.__)("+20%","snow-monkey-blocks")},{value:"30",label:(0,i.__)("+30%","snow-monkey-blocks")},{value:"40",label:(0,i.__)("+40%","snow-monkey-blocks")},{value:"50",label:(0,i.__)("+50%","snow-monkey-blocks")},{value:"60",label:(0,i.__)("+60%","snow-monkey-blocks")},{value:"70",label:(0,i.__)("+70%","snow-monkey-blocks")},{value:"80",label:(0,i.__)("+80%","snow-monkey-blocks")},{value:"90",label:(0,i.__)("+90%","snow-monkey-blocks")},{value:"100",label:(0,i.__)("+100%","snow-monkey-blocks")}],onChange:e=>o({imageSize:e})})}),Ge&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>O!==n.uK.imageMatchHeight.default,isShownByDefault:!0,label:(0,i.__)("Adjust the height of the media to the height of the block.","snow-monkey-blocks"),onDeselect:()=>o({imageMatchHeight:n.uK.imageMatchHeight.default}),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Adjust the height of the media to the height of the block.","snow-monkey-blocks"),checked:O,onChange:e=>o({imageMatchHeight:e})})})]}),(0,l.jsxs)(m.__experimentalToolsPanel,{label:(0,i.__)("Contents settings","snow-monkey-blocks"),dropdownMenuProps:no,children:[(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>S!==n.uK.contentSize.default,isShownByDefault:!0,label:(0,i.__)("Content size adjustment","snow-monkey-blocks"),onDeselect:()=>o({contentSize:n.uK.contentSize.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Content size adjustment","snow-monkey-blocks"),value:S,options:so,onChange:e=>o({contentSize:e})})}),(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>$!==n.uK.contentHorizontalPosition.default,isShownByDefault:!0,label:(0,i.__)("Degree of overlap of content to image","snow-monkey-blocks"),onDeselect:()=>o({contentHorizontalPosition:n.uK.contentHorizontalPosition.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Degree of overlap of content to image","snow-monkey-blocks"),value:$,options:[{value:"",label:(0,i.__)("+-0%","snow-monkey-blocks")},{value:"10",label:(0,i.__)("10%","snow-monkey-blocks")},{value:"20",label:(0,i.__)("20%","snow-monkey-blocks")},{value:"30",label:(0,i.__)("30%","snow-monkey-blocks")},{value:"40",label:(0,i.__)("40%","snow-monkey-blocks")},{value:"50",label:(0,i.__)("50%","snow-monkey-blocks")}],onChange:e=>o({contentHorizontalPosition:e})})}),!!D&&"center"!==D&&Ge&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>H!==n.uK.contentVerticalPosition.default,isShownByDefault:!0,label:(0,i.__)("Vertical position of content","snow-monkey-blocks"),onDeselect:()=>o({contentVerticalPosition:n.uK.contentVerticalPosition.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Vertical position of content","snow-monkey-blocks"),value:H,options:[{value:"",label:(0,i.__)("+-0%","snow-monkey-blocks")},{value:"t100",label:(0,i.sprintf)( 2 2 // translators: %1$s: px 3 3 // translators: %1$s: px 4 (0, a.__)("Move %1$s up","snow-monkey-blocks"),"100px")},{value:"t80",label:(0,a.sprintf)(4 (0,i.__)("Move %1$s up","snow-monkey-blocks"),"100px")},{value:"t80",label:(0,i.sprintf)( 5 5 // translators: %1$s: px 6 6 // translators: %1$s: px 7 (0, a.__)("Move %1$s up","snow-monkey-blocks"),"80px")},{value:"t60",label:(0,a.sprintf)(7 (0,i.__)("Move %1$s up","snow-monkey-blocks"),"80px")},{value:"t60",label:(0,i.sprintf)( 8 8 // translators: %1$s: px 9 9 // translators: %1$s: px 10 (0, a.__)("Move %1$s up","snow-monkey-blocks"),"60px")},{value:"t40",label:(0,a.sprintf)(10 (0,i.__)("Move %1$s up","snow-monkey-blocks"),"60px")},{value:"t40",label:(0,i.sprintf)( 11 11 // translators: %1$s: px 12 12 // translators: %1$s: px 13 (0, a.__)("Move %1$s up","snow-monkey-blocks"),"40px")},{value:"b40",label:(0,a.sprintf)(13 (0,i.__)("Move %1$s up","snow-monkey-blocks"),"40px")},{value:"b40",label:(0,i.sprintf)( 14 14 // translators: %1$s: px 15 15 // translators: %1$s: px 16 (0, a.__)("Move %1$s down","snow-monkey-blocks"),"40px")},{value:"b60",label:(0,a.sprintf)(16 (0,i.__)("Move %1$s down","snow-monkey-blocks"),"40px")},{value:"b60",label:(0,i.sprintf)( 17 17 // translators: %1$s: px 18 18 // translators: %1$s: px 19 (0, a.__)("Move %1$s down","snow-monkey-blocks"),"60px")},{value:"b80",label:(0,a.sprintf)(19 (0,i.__)("Move %1$s down","snow-monkey-blocks"),"60px")},{value:"b80",label:(0,i.sprintf)( 20 20 // translators: %1$s: px 21 21 // translators: %1$s: px 22 (0, a.__)("Move %1$s down","snow-monkey-blocks"),"80px")},{value:"b100",label:(0,a.sprintf)(22 (0,i.__)("Move %1$s down","snow-monkey-blocks"),"80px")},{value:"b100",label:(0,i.sprintf)( 23 23 // translators: %1$s: px 24 24 // translators: %1$s: px 25 (0, a.__)("Move %1$s down","snow-monkey-blocks"),"100px")}],onChange:e=>o({contentVerticalPosition:e})})}),(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Background color","snow-monkey-blocks"),colorValue:I,onColorChange:e=>{let t=e;if(e){const o=e.match(/^var\((.+)\)$/);o&&(t=window.getComputedStyle(document.documentElement).getPropertyValue(o[1]).trim(),t||(t=window.getComputedStyle(document.body).getPropertyValue(o[1]).trim()))}o({contentBackgroundColor:t})}}],__experimentalIsRenderedInSidebar:!0,...(0,g.__experimentalUseMultipleOriginColorsAndGradients)()})}),!!I&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>L!==n.uK.contentBackgroundOpacity.default,isShownByDefault:!0,label:(0,a.__)("Background opacity","snow-monkey-blocks"),onDeselect:()=>o({contentBackgroundOpacity:n.uK.contentBackgroundOpacity.default}),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Background opacity","snow-monkey-blocks"),value:Number(L.toFixed(1)),onChange:e=>o({contentBackgroundOpacity:e}),min:0,max:1,step:.1})}),(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>R!==n.uK.contentPadding.default,isShownByDefault:!0,label:(0,a.__)("Padding","snow-monkey-blocks"),onDeselect:()=>o({contentPadding:n.uK.contentPadding.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Padding","snow-monkey-blocks"),value:R,options:[{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")}],onChange:e=>o({contentPadding:e})})}),R&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>A!==n.uK.removeContentOutsidePadding.default,isShownByDefault:!0,label:(0,a.__)("Remove outside padding","snow-monkey-blocks"),onDeselect:()=>o({removeContentOutsidePadding:n.uK.removeContentOutsidePadding.default}),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Remove outside padding","snow-monkey-blocks"),checked:A,onChange:e=>o({removeContentOutsidePadding:e})})})]}),(0,l.jsx)(ae,{label:(0,a.__)("Shadow settings","snow-monkey-blocks"),settings:[{colorValue:U||"",onColorChange:e=>o({shadowColor:e}),defaultValue:n.uK.shadowColor.default},{horizontalValue:G,onHorizontalChange:e=>o({shadowHorizontalPosition:v(e,-120,120)}),defaultValue:n.uK.shadowHorizontalPosition.default},{verticalValue:F,onVerticalChange:e=>o({shadowVerticalPosition:v(e,-120,120)}),defaultValue:n.uK.shadowVerticalPosition.default}]}),(0,l.jsxs)(m.__experimentalToolsPanel,{label:(0,a.__)("Overlay","snow-monkey-blocks"),dropdownMenuProps:no,children:[(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:K,gradientValue:E,onColorChange:e=>o({maskColor:e}),onGradientChange:e=>o({maskGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,g.__experimentalUseMultipleOriginColorsAndGradients)()})}),(!!K||!!E)&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>q!==n.uK.maskOpacity.default,isShownByDefault:!0,label:(0,a.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>o({maskOpacity:n.uK.maskOpacity.default}),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Opacity","snow-monkey-blocks"),value:Number((1-q).toFixed(1)),onChange:e=>o({maskOpacity:v((1-e).toFixed(1),0,1)}),min:0,max:1,step:.1})})]}),(0,l.jsx)(Q,{hasColor:pe||ke,disableNoOver:0===be&&0===he,hasTexture:!!xe,settings:[{colorValue:pe,gradientValue:ke,onColorChange:e=>o({backgroundColor:e}),onGradientChange:e=>o({backgroundGradientColor:e}),defaultColorValue:n.uK.backgroundColor.default,defaultGradientValue:n.uK.backgroundGradientColor.default},{horizontalPositionValue:be,onHorizontalPositionChange:e=>o({backgroundHorizontalPosition:v(e,-90,90)}),defaultValue:n.uK.backgroundHorizontalPosition.default},{verticalPositionValue:he,onVerticalPositionChange:e=>o({backgroundVerticalPosition:v(e,-90,90)}),defaultValue:n.uK.backgroundVerticalPosition.default},{isNoOverValue:_e,onIsNoOverChange:e=>o({isBackgroundNoOver:e}),defaultValue:n.uK.isBackgroundNoOver.default},{textureValue:xe,onTextureChange:e=>o({backgroundTexture:e,backgroundTextureUrl:e?`${smb.pluginUrl}/dist/blocks/section/img/${e}.png`:void 0}),defaultValue:n.uK.backgroundTexture.default},{textureOpacityValue:ve,onTextureOpacityChange:e=>o({backgroundTextureOpacity:v(e,.1,1)}),defaultValue:n.uK.backgroundTextureOpacity.default}]}),(0,l.jsx)(X,{hasTexture:!!Ce,settings:[{colorValue:we,gradientValue:fe,onColorChange:e=>o({fixedBackgroundColor:e}),onGradientChange:e=>o({fixedBackgroundGradientColor:e}),defaultColorValue:n.uK.fixedBackgroundColor.default,defaultGradientValue:n.uK.fixedBackgroundGradientColor.default},{textureValue:Ce,onTextureChange:e=>o({fixedBackgroundTexture:e,fixedBackgroundTextureUrl:e?`${smb.pluginUrl}/dist/blocks/section/img/${e}.png`:void 0}),defaultValue:n.uK.fixedBackgroundTexture.default},{textureOpacityValue:Ve,onTextureOpacityChange:e=>o({fixedBackgroundTextureOpacity:v(e,.1,1)}),defaultValue:n.uK.fixedBackgroundTextureOpacity.default}]}),(0,l.jsx)(oe,{settings:[{textValue:Ie.text,onTextChange:e=>{ro.text=e,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.text},{fontSizeValue:Ie.fontSize,onFontSizeChange:e=>{const t=lo.filter((o=>!!o?.size&&e===o?.size));ro.fontSize=e,ro.fontSizeSlug=0<t.length&&t[0]?.slug?t[0].slug:"",o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.fontSize},{lineHeightValue:Ie.lineHeight,onLineHeightChange:e=>{ro.lineHeight=e,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.lineHeight},{opacityValue:Ie.opacity,onOpacityChange:e=>{ro.opacity=e,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.opacity},{colorValue:Ie.color,onColorChange:e=>{ro.color=e,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.color},{positionValue:Ie.position,onPositionChange:e=>{ro.position.top=null!=e?.top&&e?.top.match(/^\d+$/)?`${e?.top}px`:e?.top,ro.position.right=null!=e?.right&&e?.right.match(/^\d+$/)?`${e?.right}px`:e?.right,ro.position.bottom=null!=e?.bottom&&e?.bottom.match(/^\d+$/)?`${e?.bottom}px`:e?.bottom,ro.position.left=null!=e?.left&&e?.left.match(/^\d+$/)?`${e?.left}px`:e?.left,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.position}]}),(0,l.jsx)(Z,{settings:[{typeValue:Te,onTypeChange:e=>o({topDividerType:e}),defaultValue:n.uK.topDividerType.default},{levelValue:je,onLevelChange:e=>o({topDividerLevel:v(e,-100,100)}),defaultValue:n.uK.topDividerLevel.default},{colorValue:Ne,onColorChange:e=>o({topDividerColor:e}),defaultColorValue:n.uK.topDividerColor.default},{verticalPosition:Oe,onVerticalPositionChange:e=>o({topDividerVerticalPosition:e}),defaultValue:n.uK.topDividerVerticalPosition.default},{overlayValue:De,onOverlayChange:e=>o({topDividerOverlay:e}),defaultValue:n.uK.topDividerOverlay.default}]}),(0,l.jsx)(ee,{settings:[{typeValue:Be,onTypeChange:e=>o({bottomDividerType:e}),defaultValue:n.uK.bottomDividerType.default},{levelValue:Se,onLevelChange:e=>o({bottomDividerLevel:v(e,-100,100)}),defaultValue:n.uK.bottomDividerLevel.default},{colorValue:ze,onColorChange:e=>o({bottomDividerColor:e}),defaultColorValue:n.uK.bottomDividerColor.default},{verticalPosition:$e,onVerticalPositionChange:e=>o({bottomDividerVerticalPosition:e}),defaultValue:n.uK.bottomDividerVerticalPosition.default},{overlayValue:He,onOverlayChange:e=>o({bottomDividerOverlay:e}),defaultValue:n.uK.bottomDividerOverlay.default}]})]}),(0,l.jsxs)(g.BlockControls,{group:"block",children:[Ge&&(0,l.jsx)(g.BlockVerticalAlignmentToolbar,{onChange:e=>o({verticalAlignment:e}),value:D}),(0,l.jsx)(g.AlignmentToolbar,{value:Y,onChange:e=>o({contentsAlignment:e})}),(0,l.jsxs)(m.ToolbarGroup,{children:[(0,l.jsx)(m.ToolbarButton,{icon:_,title:(0,a.__)("Show media on left","snow-monkey-blocks"),isActive:"left"===j,onClick:()=>o({imagePosition:"left"})}),(0,l.jsx)(m.ToolbarButton,{icon:p,title:(0,a.__)("Show media on right","snow-monkey-blocks"),isActive:"right"===j,onClick:()=>o({imagePosition:"right"})}),(0,l.jsx)(m.ToolbarButton,{icon:_,title:(0,a.__)("Show media on top","snow-monkey-blocks"),isActive:"top"===j,onClick:()=>o({imagePosition:"top"}),className:"smb-toolbar-button-rotate-90"}),(0,l.jsx)(m.ToolbarButton,{icon:p,title:(0,a.__)("Show media on bottom","snow-monkey-blocks"),isActive:"bottom"===j,onClick:()=>o({imagePosition:"bottom"}),className:"smb-toolbar-button-rotate-90"})]})]}),(0,l.jsxs)(Ke,{...io,children:[(0,l.jsx)(ie,{backgroundHorizontalPosition:be,backgroundVerticalPosition:he,isBackgroundNoOver:_e,backgroundColor:pe,backgroundGradientColor:ke,backgroundTexture:xe,backgroundTextureOpacity:ve,backgroundTextureUrl:ye,fixedBackgroundColor:we,fixedBackgroundGradientColor:fe,fixedBackgroundTexture:Ce,fixedBackgroundTextureOpacity:Ve,fixedBackgroundTextureUrl:Pe,topDividerType:Te,topDividerLevel:je,topDividerColor:Ne,topDividerVerticalPosition:Oe,bottomDividerType:Be,bottomDividerLevel:Se,bottomDividerColor:ze,bottomDividerVerticalPosition:$e,backgroundText:Ie,containerClasses:Ee}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:Ee,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:qe,children:[(0,l.jsx)("div",{className:Je,children:(0,l.jsxs)("div",{className:Xe,children:[(0,l.jsx)(W,{isSelected:t,className:"smb-section-break-the-grid",settings:[{subtitleValue:se,onSubtitleChange:e=>o({subtitle:e})},{titleTagNameValue:ue,titleValue:re,onTitleChange:e=>o({title:e})},{ledeValue:ce,onLedeChange:e=>o({lede:e})}]}),(0,l.jsx)("div",{...ao})]})}),(0,l.jsx)("div",{className:Ye,children:(0,l.jsxs)("div",{className:Qe,children:[U&&(0,l.jsx)("div",{className:eo}),0<Number((1-q).toFixed(1))&&(0,l.jsx)("div",{className:oo}),(0,l.jsx)(B,{src:h,id:d,alt:k,width:x,height:y,onSelect:e=>{const t=e?.sizes?.[f]?f:le,i=e?.sizes?.[t]?.url,a=e?.sizes?.[t]?.width,n=e?.sizes?.[t]?.height;o({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:a||e.width,imageHeight:n||e.height,imageMediaType:w(e),mediaSizeSlug:t})},onSelectURL:e=>{e!==h&&o({imageURL:e,imageID:0,mediaSizeSlug:le,mediaType:w({media_type:C(e)?"video":"image"})})},onRemove:()=>o({mdImageURL:n.uK.mdImageURL.default,mdImageAlt:n.uK.mdImageAlt.default,mdImageWidth:n.uK.mdImageWidth.default,mdImageHeight:n.uK.mdImageHeight.default,mdImageID:n.uK.mdImageID.default,mdImageMediaType:n.uK.mdImageMediaType.default}),mediaType:V,allowedTypes:ne})]})})]})})})})]})]})},save:function({attributes:e,className:o}){const{align:t,imageID:i,imageURL:a,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:V,shadowHorizontalPosition:P,shadowVerticalPosition:T,maskColor:j,maskGradientColor:N,maskOpacity:O,mobileOrder:D,contentsAlignment:B,title:S,subtitle:z,lede:$,wrapperTagName:H,titleTagName:I,containerAlign:M,disableContainerPadding:L,backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:ae,topDividerVerticalPosition:ne,topDividerOverlay:le,bottomDividerType:re,bottomDividerLevel:se,bottomDividerColor:ce,bottomDividerVerticalPosition:de,bottomDividerOverlay:ue,backgroundText:ge}=e,me=["right","left"].includes(b),be="nowrap"===D&&me,he=H,_e=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&me,[`smb-section-break-the-grid--mobile-${D}`]:!!D&&me,[`smb-section--${B}`]:!!B,"smb-section--top-divider-no-overlay":!le,"smb-section--bottom-divider-no-overlay":!ue,[o]:!!o,"smb-section-break-the-grid--match-height":_&&me}),pe=c()("c-container",{alignfull:("full"===M||"contents-full"===M)&&"full"===t,alignwide:"wide"===M||"contents-wide"===M&&"full"===t,"c-container--no-padding":L}),ke=c()("c-row",{"c-row--lg-top":"top"===p&&me,"c-row--lg-middle":"center"===p&&me,"c-row--lg-bottom":"bottom"===p&&me}),xe=c()("c-row__col",{"c-row__col--1-1":!be,"c-row__col--1-2":be,"c-row__col--lg-1-2":me&&!be}),ve=c()("c-row__col",{"c-row__col--1-1":!be,"c-row__col--1-2":be,"c-row__col--lg-1-2":me&&!be}),ye=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),we=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${B}`]:!!B,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),fe=c()("smb-section__body","smb-section-break-the-grid__body"),Ce=c()("smb-section-break-the-grid__shadow"),Ve=c()("smb-section-break-the-grid__mask"),Pe={"--smb-section--color":m||void 0,"--smb-section-break-the-grid--shadow-color":V||void 0,"--smb-section-break-the-grid--shadow-transform":P&&T?`translate(${P||0}%, ${T||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":y&&u()(y,w),"--smb-section-break-the-grid--mask-color":j||void 0,"--smb-section-break-the-grid--mask-image":N||void 0,"--smb-section-break-the-grid--mask-opacity":j||N?O:void 0,...te({backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerVerticalPosition:ne,topDividerLevel:oe,bottomDividerVerticalPosition:de,bottomDividerLevel:se,backgroundText:ge})};let Te;return a&&("image"===d||void 0===d?Te=(0,l.jsx)("img",{src:a,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${i}`}):"video"===d&&(Te=(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:a,width:!!r&&r,height:!!s&&s}))),(0,l.jsxs)(he,{...g.useBlockProps.save({className:_e,style:Pe}),children:[(0,l.jsx)(ie,{backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,topDividerType:ee,topDividerLevel:oe,topDividerColor:ae,bottomDividerType:re,bottomDividerLevel:se,bottomDividerColor:ce,backgroundText:ge,containerClasses:pe}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:pe,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:ke,children:[(0,l.jsx)("div",{className:xe,children:(0,l.jsxs)("div",{className:we,children:[(0,l.jsx)(q,{title:S,titleTagName:I,subtitle:z,lede:$,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:fe})})]})}),(0,l.jsx)("div",{className:ve,children:(0,l.jsxs)("div",{className:ye,children:[V&&(0,l.jsx)("div",{className:Ce}),0<Number((1-O).toFixed(1))&&(0,l.jsx)("div",{className:Ve}),Te]})})]})})})})]})},deprecated:ge,transforms:me,example:be})},3558:e=>{"use strict";var o=function(e){return parseInt(e,16)};e.exports=function(e,t){var i,a,n=function(e){return"#"===e.charAt(0)?e.slice(1):e}(e),l=function(e){var t=e.g,i=e.b,a=e.a;return{r:o(e.r),g:o(t),b:o(i),a:+(o(a)/255).toFixed(2)}}({r:(a=3===(i=n).length||4===i.length)?"".concat(i.slice(0,1)).concat(i.slice(0,1)):i.slice(0,2),g:a?"".concat(i.slice(1,2)).concat(i.slice(1,2)):i.slice(2,4),b:a?"".concat(i.slice(2,3)).concat(i.slice(2,3)):i.slice(4,6),a:(a?"".concat(i.slice(3,4)).concat(i.slice(3,4)):i.slice(6,8))||"ff"});return function(e,o){var t,i=e.r,a=e.g,n=e.b,l=e.a,r=(t=o,!isNaN(parseFloat(t))&&isFinite(t)?o:l);return"rgba(".concat(i,", ").concat(a,", ").concat(n,", ").concat(r,")")}(l,t)}},6942:(e,o)=>{var t;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var e="",o=0;o<arguments.length;o++){var t=arguments[o];t&&(e=l(e,n(t)))}return e}function n(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 o="";for(var t in e)i.call(e,t)&&e[t]&&(o=l(o,t));return o}function l(e,o){return o?e?e+" "+o:e+o:e}e.exports?(a.default=a,e.exports=a):void 0===(t=function(){return a}.apply(o,[]))||(e.exports=t)}()}},t={};function i(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.m=o,e=[],i.O=(o,t,a,n)=>{if(!t){var l=1/0;for(d=0;d<e.length;d++){for(var[t,a,n]=e[d],r=!0,s=0;s<t.length;s++)(!1&n||l>=n)&&Object.keys(i.O).every((e=>i.O[e](t[s])))?t.splice(s--,1):(r=!1,n<l&&(l=n));if(r){e.splice(d--,1);var c=a();void 0!==c&&(o=c)}}return o}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[t,a,n]},i.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return i.d(o,{a:o}),o},i.d=(e,o)=>{for(var t in o)i.o(o,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},i.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={9032:0,2256:0};i.O.j=o=>0===e[o];var o=(o,t)=>{var a,n,[l,r,s]=t,c=0;if(l.some((o=>0!==e[o]))){for(a in r)i.o(r,a)&&(i.m[a]=r[a]);if(s)var d=s(i)}for(o&&o(t);c<l.length;c++)n=l[c],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(d)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var a=i.O(void 0,[2256],(()=>i(6611)));a=i.O(a)})();25 (0,i.__)("Move %1$s down","snow-monkey-blocks"),"100px")}],onChange:e=>o({contentVerticalPosition:e})})}),(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,i.__)("Background color","snow-monkey-blocks"),colorValue:I,onColorChange:e=>{let t=e;if(e){const o=e.match(/^var\((.+)\)$/);o&&(t=window.getComputedStyle(document.documentElement).getPropertyValue(o[1]).trim(),t||(t=window.getComputedStyle(document.body).getPropertyValue(o[1]).trim()))}o({contentBackgroundColor:t})}}],__experimentalIsRenderedInSidebar:!0,...(0,g.__experimentalUseMultipleOriginColorsAndGradients)()})}),!!I&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>L!==n.uK.contentBackgroundOpacity.default,isShownByDefault:!0,label:(0,i.__)("Background opacity","snow-monkey-blocks"),onDeselect:()=>o({contentBackgroundOpacity:n.uK.contentBackgroundOpacity.default}),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Background opacity","snow-monkey-blocks"),value:Number(L.toFixed(1)),onChange:e=>o({contentBackgroundOpacity:e}),min:0,max:1,step:.1})}),(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>R!==n.uK.contentPadding.default,isShownByDefault:!0,label:(0,i.__)("Padding","snow-monkey-blocks"),onDeselect:()=>o({contentPadding:n.uK.contentPadding.default}),children:(0,l.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Padding","snow-monkey-blocks"),value:R,options:[{value:"",label:(0,i.__)("None","snow-monkey-blocks")},{value:"s",label:(0,i.__)("S","snow-monkey-blocks")},{value:"m",label:(0,i.__)("M","snow-monkey-blocks")},{value:"l",label:(0,i.__)("L","snow-monkey-blocks")}],onChange:e=>o({contentPadding:e})})}),R&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>A!==n.uK.removeContentOutsidePadding.default,isShownByDefault:!0,label:(0,i.__)("Remove outside padding","snow-monkey-blocks"),onDeselect:()=>o({removeContentOutsidePadding:n.uK.removeContentOutsidePadding.default}),children:(0,l.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Remove outside padding","snow-monkey-blocks"),checked:A,onChange:e=>o({removeContentOutsidePadding:e})})})]}),(0,l.jsx)(ie,{label:(0,i.__)("Shadow settings","snow-monkey-blocks"),settings:[{colorValue:U||"",onColorChange:e=>o({shadowColor:e}),defaultValue:n.uK.shadowColor.default},{horizontalValue:G,onHorizontalChange:e=>o({shadowHorizontalPosition:v(e,-120,120)}),defaultValue:n.uK.shadowHorizontalPosition.default},{verticalValue:F,onVerticalChange:e=>o({shadowVerticalPosition:v(e,-120,120)}),defaultValue:n.uK.shadowVerticalPosition.default}]}),(0,l.jsxs)(m.__experimentalToolsPanel,{label:(0,i.__)("Overlay","snow-monkey-blocks"),dropdownMenuProps:no,children:[(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(g.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,i.__)("Color","snow-monkey-blocks"),colorValue:K,gradientValue:E,onColorChange:e=>o({maskColor:e}),onGradientChange:e=>o({maskGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,g.__experimentalUseMultipleOriginColorsAndGradients)()})}),(!!K||!!E)&&(0,l.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>q!==n.uK.maskOpacity.default,isShownByDefault:!0,label:(0,i.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>o({maskOpacity:n.uK.maskOpacity.default}),children:(0,l.jsx)(m.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Opacity","snow-monkey-blocks"),value:Number((1-q).toFixed(1)),onChange:e=>o({maskOpacity:v((1-e).toFixed(1),0,1)}),min:0,max:1,step:.1})})]}),(0,l.jsx)(Q,{hasColor:pe||ke,disableNoOver:0===be&&0===he,hasTexture:!!xe,settings:[{colorValue:pe,gradientValue:ke,onColorChange:e=>o({backgroundColor:e}),onGradientChange:e=>o({backgroundGradientColor:e}),defaultColorValue:n.uK.backgroundColor.default,defaultGradientValue:n.uK.backgroundGradientColor.default},{horizontalPositionValue:be,onHorizontalPositionChange:e=>o({backgroundHorizontalPosition:v(e,-90,90)}),defaultValue:n.uK.backgroundHorizontalPosition.default},{verticalPositionValue:he,onVerticalPositionChange:e=>o({backgroundVerticalPosition:v(e,-90,90)}),defaultValue:n.uK.backgroundVerticalPosition.default},{isNoOverValue:_e,onIsNoOverChange:e=>o({isBackgroundNoOver:e}),defaultValue:n.uK.isBackgroundNoOver.default},{textureValue:xe,onTextureChange:e=>o({backgroundTexture:e,backgroundTextureUrl:e?`${smb.pluginUrl}/dist/blocks/section/img/${e}.png`:void 0}),defaultValue:n.uK.backgroundTexture.default},{textureOpacityValue:ve,onTextureOpacityChange:e=>o({backgroundTextureOpacity:v(e,.1,1)}),defaultValue:n.uK.backgroundTextureOpacity.default}]}),(0,l.jsx)(X,{hasTexture:!!Ce,settings:[{colorValue:we,gradientValue:fe,onColorChange:e=>o({fixedBackgroundColor:e}),onGradientChange:e=>o({fixedBackgroundGradientColor:e}),defaultColorValue:n.uK.fixedBackgroundColor.default,defaultGradientValue:n.uK.fixedBackgroundGradientColor.default},{textureValue:Ce,onTextureChange:e=>o({fixedBackgroundTexture:e,fixedBackgroundTextureUrl:e?`${smb.pluginUrl}/dist/blocks/section/img/${e}.png`:void 0}),defaultValue:n.uK.fixedBackgroundTexture.default},{textureOpacityValue:Ve,onTextureOpacityChange:e=>o({fixedBackgroundTextureOpacity:v(e,.1,1)}),defaultValue:n.uK.fixedBackgroundTextureOpacity.default}]}),(0,l.jsx)(oe,{settings:[{textValue:Ie.text,onTextChange:e=>{ro.text=e,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.text},{fontSizeValue:Ie.fontSize,onFontSizeChange:e=>{const t=lo.filter((o=>!!o?.size&&e===o?.size));ro.fontSize=e,ro.fontSizeSlug=0<t.length&&t[0]?.slug?t[0].slug:"",o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.fontSize},{lineHeightValue:Ie.lineHeight,onLineHeightChange:e=>{ro.lineHeight=e,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.lineHeight},{opacityValue:Ie.opacity,onOpacityChange:e=>{ro.opacity=e,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.opacity},{colorValue:Ie.color,onColorChange:e=>{ro.color=e,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.color},{positionValue:Ie.position,onPositionChange:e=>{ro.position.top=null!=e?.top&&e?.top.match(/^\d+$/)?`${e?.top}px`:e?.top,ro.position.right=null!=e?.right&&e?.right.match(/^\d+$/)?`${e?.right}px`:e?.right,ro.position.bottom=null!=e?.bottom&&e?.bottom.match(/^\d+$/)?`${e?.bottom}px`:e?.bottom,ro.position.left=null!=e?.left&&e?.left.match(/^\d+$/)?`${e?.left}px`:e?.left,o({backgroundText:{...ro}})},defaultValue:n.uK.backgroundText.default.position}]}),(0,l.jsx)(Z,{settings:[{typeValue:Te,onTypeChange:e=>o({topDividerType:e}),defaultValue:n.uK.topDividerType.default},{levelValue:je,onLevelChange:e=>o({topDividerLevel:v(e,-100,100)}),defaultValue:n.uK.topDividerLevel.default},{colorValue:Ne,onColorChange:e=>o({topDividerColor:e}),defaultColorValue:n.uK.topDividerColor.default},{verticalPosition:Oe,onVerticalPositionChange:e=>o({topDividerVerticalPosition:e}),defaultValue:n.uK.topDividerVerticalPosition.default},{overlayValue:De,onOverlayChange:e=>o({topDividerOverlay:e}),defaultValue:n.uK.topDividerOverlay.default}]}),(0,l.jsx)(ee,{settings:[{typeValue:Be,onTypeChange:e=>o({bottomDividerType:e}),defaultValue:n.uK.bottomDividerType.default},{levelValue:Se,onLevelChange:e=>o({bottomDividerLevel:v(e,-100,100)}),defaultValue:n.uK.bottomDividerLevel.default},{colorValue:ze,onColorChange:e=>o({bottomDividerColor:e}),defaultColorValue:n.uK.bottomDividerColor.default},{verticalPosition:$e,onVerticalPositionChange:e=>o({bottomDividerVerticalPosition:e}),defaultValue:n.uK.bottomDividerVerticalPosition.default},{overlayValue:He,onOverlayChange:e=>o({bottomDividerOverlay:e}),defaultValue:n.uK.bottomDividerOverlay.default}]})]}),(0,l.jsxs)(g.BlockControls,{group:"block",children:[Ge&&(0,l.jsx)(g.BlockVerticalAlignmentToolbar,{onChange:e=>o({verticalAlignment:e}),value:D}),(0,l.jsx)(g.AlignmentToolbar,{value:Y,onChange:e=>o({contentsAlignment:e})}),(0,l.jsxs)(m.ToolbarGroup,{children:[(0,l.jsx)(m.ToolbarButton,{icon:_,title:(0,i.__)("Show media on left","snow-monkey-blocks"),isActive:"left"===j,onClick:()=>o({imagePosition:"left"})}),(0,l.jsx)(m.ToolbarButton,{icon:p,title:(0,i.__)("Show media on right","snow-monkey-blocks"),isActive:"right"===j,onClick:()=>o({imagePosition:"right"})}),(0,l.jsx)(m.ToolbarButton,{icon:_,title:(0,i.__)("Show media on top","snow-monkey-blocks"),isActive:"top"===j,onClick:()=>o({imagePosition:"top"}),className:"smb-toolbar-button-rotate-90"}),(0,l.jsx)(m.ToolbarButton,{icon:p,title:(0,i.__)("Show media on bottom","snow-monkey-blocks"),isActive:"bottom"===j,onClick:()=>o({imagePosition:"bottom"}),className:"smb-toolbar-button-rotate-90"})]})]}),(0,l.jsxs)(Ke,{...ao,children:[(0,l.jsx)(ae,{backgroundHorizontalPosition:be,backgroundVerticalPosition:he,isBackgroundNoOver:_e,backgroundColor:pe,backgroundGradientColor:ke,backgroundTexture:xe,backgroundTextureOpacity:ve,backgroundTextureUrl:ye,fixedBackgroundColor:we,fixedBackgroundGradientColor:fe,fixedBackgroundTexture:Ce,fixedBackgroundTextureOpacity:Ve,fixedBackgroundTextureUrl:Pe,topDividerType:Te,topDividerLevel:je,topDividerColor:Ne,topDividerVerticalPosition:Oe,bottomDividerType:Be,bottomDividerLevel:Se,bottomDividerColor:ze,bottomDividerVerticalPosition:$e,backgroundText:Ie,containerClasses:Ee}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:Ee,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:qe,children:[(0,l.jsx)("div",{className:Je,children:(0,l.jsxs)("div",{className:Xe,children:[(0,l.jsx)(W,{isSelected:t,className:"smb-section-break-the-grid",settings:[{subtitleValue:se,onSubtitleChange:e=>o({subtitle:e})},{titleTagNameValue:ue,titleValue:re,onTitleChange:e=>o({title:e})},{ledeValue:ce,onLedeChange:e=>o({lede:e})}]}),(0,l.jsx)("div",{...io})]})}),(0,l.jsx)("div",{className:Ye,children:(0,l.jsxs)("div",{className:Qe,children:[U&&(0,l.jsx)("div",{className:eo}),0<Number((1-q).toFixed(1))&&(0,l.jsx)("div",{className:oo}),(0,l.jsx)(B,{src:h,id:d,alt:k,width:x,height:y,onSelect:e=>{const t=e?.sizes?.[f]?f:le,a=e?.sizes?.[t]?.url,i=e?.sizes?.[t]?.width,n=e?.sizes?.[t]?.height;o({imageURL:a||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:i||e.width,imageHeight:n||e.height,imageMediaType:w(e),mediaSizeSlug:t})},onSelectURL:e=>{e!==h&&o({imageURL:e,imageID:0,mediaSizeSlug:le,mediaType:w({media_type:C(e)?"video":"image"})})},onRemove:()=>o({mdImageURL:n.uK.mdImageURL.default,mdImageAlt:n.uK.mdImageAlt.default,mdImageWidth:n.uK.mdImageWidth.default,mdImageHeight:n.uK.mdImageHeight.default,mdImageID:n.uK.mdImageID.default,mdImageMediaType:n.uK.mdImageMediaType.default}),mediaType:V,allowedTypes:ne})]})})]})})})})]})]})},save:function({attributes:e,className:o}){const{align:t,imageID:a,imageURL:i,imageAlt:n,imageWidth:r,imageHeight:s,imageMediaType:d,textColor:m,imagePosition:b,imageSize:h,imageMatchHeight:_,verticalAlignment:p,contentSize:k,contentHorizontalPosition:x,contentVerticalPosition:v,contentBackgroundColor:y,contentBackgroundOpacity:w,contentPadding:f,removeContentOutsidePadding:C,shadowColor:V,shadowHorizontalPosition:P,shadowVerticalPosition:T,maskColor:j,maskGradientColor:N,maskOpacity:O,mobileOrder:D,contentsAlignment:B,title:S,subtitle:z,lede:$,wrapperTagName:H,titleTagName:I,containerAlign:M,disableContainerPadding:L,backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerType:ee,topDividerLevel:oe,topDividerColor:ie,topDividerVerticalPosition:ne,topDividerOverlay:le,bottomDividerType:re,bottomDividerLevel:se,bottomDividerColor:ce,bottomDividerVerticalPosition:de,bottomDividerOverlay:ue,backgroundText:ge}=e,me=["right","left"].includes(b),be="nowrap"===D&&me,he=H,_e=c()("smb-section","smb-section-break-the-grid",`smb-section-break-the-grid--${b}`,{[`smb-section-break-the-grid--vertical-${v}`]:v&&p&&"center"!==p&&me,[`smb-section-break-the-grid--mobile-${D}`]:!!D&&me,[`smb-section--${B}`]:!!B,"smb-section--top-divider-no-overlay":!le,"smb-section--bottom-divider-no-overlay":!ue,[o]:!!o,"smb-section-break-the-grid--match-height":_&&me}),pe=c()("c-container",{alignfull:("full"===M||"contents-full"===M)&&"full"===t,alignwide:"wide"===M||"contents-wide"===M&&"full"===t,"c-container--no-padding":L}),ke=c()("c-row",{"c-row--lg-top":"top"===p&&me,"c-row--lg-middle":"center"===p&&me,"c-row--lg-bottom":"bottom"===p&&me}),xe=c()("c-row__col",{"c-row__col--1-1":!be,"c-row__col--1-2":be,"c-row__col--lg-1-2":me&&!be}),ve=c()("c-row__col",{"c-row__col--1-1":!be,"c-row__col--1-2":be,"c-row__col--lg-1-2":me&&!be}),ye=c()("smb-section-break-the-grid__figure",{[`smb-section-break-the-grid__figure--w-${h}`]:!!h}),we=c()("smb-section-break-the-grid__content",{[`smb-section-break-the-grid__content--w-${k}`]:!!k,[`smb-section-break-the-grid__content--p-${f}`]:!!f,[`smb-section-break-the-grid__content--horizontal-${x}`]:!!x,[`smb-section-break-the-grid__content--${B}`]:!!B,"smb-section-break-the-grid__content--remove-outside-p":f&&C}),fe=c()("smb-section__body","smb-section-break-the-grid__body"),Ce=c()("smb-section-break-the-grid__shadow"),Ve=c()("smb-section-break-the-grid__mask"),Pe={"--smb-section--color":m||void 0,"--smb-section-break-the-grid--shadow-color":V||void 0,"--smb-section-break-the-grid--shadow-transform":P&&T?`translate(${P||0}%, ${T||0}%)`:void 0,"--smb-section-break-the-grid--content-background-color":y&&u()(y,w),"--smb-section-break-the-grid--mask-color":j||void 0,"--smb-section-break-the-grid--mask-image":N||void 0,"--smb-section-break-the-grid--mask-opacity":j||N?O:void 0,...te({backgroundHorizontalPosition:R,backgroundVerticalPosition:A,isBackgroundNoOver:U,backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,backgroundTextureOpacity:W,backgroundTextureUrl:E,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,fixedBackgroundTextureOpacity:X,fixedBackgroundTextureUrl:Z,topDividerVerticalPosition:ne,topDividerLevel:oe,bottomDividerVerticalPosition:de,bottomDividerLevel:se,backgroundText:ge})};let Te;return i&&("image"===d||void 0===d?Te=(0,l.jsx)("img",{src:i,alt:n,width:!!r&&r,height:!!s&&s,className:`wp-image-${a}`}):"video"===d&&(Te=(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:i,width:!!r&&r,height:!!s&&s}))),(0,l.jsxs)(he,{...g.useBlockProps.save({className:_e,style:Pe}),children:[(0,l.jsx)(ae,{backgroundColor:G,backgroundGradientColor:F,backgroundTexture:K,fixedBackgroundColor:J,fixedBackgroundGradientColor:Y,fixedBackgroundTexture:Q,topDividerType:ee,topDividerLevel:oe,topDividerColor:ie,bottomDividerType:re,bottomDividerLevel:se,bottomDividerColor:ce,backgroundText:ge,containerClasses:pe}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsx)("div",{className:pe,children:(0,l.jsx)("div",{className:"smb-section__contents-wrapper smb-section-break-the-grid__contents-wrapper",children:(0,l.jsxs)("div",{className:ke,children:[(0,l.jsx)("div",{className:xe,children:(0,l.jsxs)("div",{className:we,children:[(0,l.jsx)(q,{title:S,titleTagName:I,subtitle:z,lede:$,className:"smb-section-break-the-grid"}),(0,l.jsx)("div",{...g.useInnerBlocksProps.save({className:fe})})]})}),(0,l.jsx)("div",{className:ve,children:(0,l.jsxs)("div",{className:ye,children:[V&&(0,l.jsx)("div",{className:Ce}),0<Number((1-O).toFixed(1))&&(0,l.jsx)("div",{className:Ve}),Te]})})]})})})})]})},deprecated:ge,transforms:me,example:be})},3558:e=>{"use strict";var o=function(e){return parseInt(e,16)};e.exports=function(e,t){var a,i,n=function(e){return"#"===e.charAt(0)?e.slice(1):e}(e),l=function(e){var t=e.g,a=e.b,i=e.a;return{r:o(e.r),g:o(t),b:o(a),a:+(o(i)/255).toFixed(2)}}({r:(i=3===(a=n).length||4===a.length)?"".concat(a.slice(0,1)).concat(a.slice(0,1)):a.slice(0,2),g:i?"".concat(a.slice(1,2)).concat(a.slice(1,2)):a.slice(2,4),b:i?"".concat(a.slice(2,3)).concat(a.slice(2,3)):a.slice(4,6),a:(i?"".concat(a.slice(3,4)).concat(a.slice(3,4)):a.slice(6,8))||"ff"});return function(e,o){var t,a=e.r,i=e.g,n=e.b,l=e.a,r=(t=o,!isNaN(parseFloat(t))&&isFinite(t)?o:l);return"rgba(".concat(a,", ").concat(i,", ").concat(n,", ").concat(r,")")}(l,t)}},6942:(e,o)=>{var t;!function(){"use strict";var a={}.hasOwnProperty;function i(){for(var e="",o=0;o<arguments.length;o++){var t=arguments[o];t&&(e=l(e,n(t)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var o="";for(var t in e)a.call(e,t)&&e[t]&&(o=l(o,t));return o}function l(e,o){return o?e?e+" "+o:e+o:e}e.exports?(i.default=i,e.exports=i):void 0===(t=function(){return i}.apply(o,[]))||(e.exports=t)}()}},t={};function a(e){var i=t[e];if(void 0!==i)return i.exports;var n=t[e]={exports:{}};return o[e](n,n.exports,a),n.exports}a.m=o,e=[],a.O=(o,t,i,n)=>{if(!t){var l=1/0;for(d=0;d<e.length;d++){for(var[t,i,n]=e[d],r=!0,s=0;s<t.length;s++)(!1&n||l>=n)&&Object.keys(a.O).every((e=>a.O[e](t[s])))?t.splice(s--,1):(r=!1,n<l&&(l=n));if(r){e.splice(d--,1);var c=i();void 0!==c&&(o=c)}}return o}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[t,i,n]},a.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return a.d(o,{a:o}),o},a.d=(e,o)=>{for(var t in o)a.o(o,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},a.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={9032:0,2256:0};a.O.j=o=>0===e[o];var o=(o,t)=>{var i,n,[l,r,s]=t,c=0;if(l.some((o=>0!==e[o]))){for(i in r)a.o(r,i)&&(a.m[i]=r[i]);if(s)var d=s(a)}for(o&&o(t);c<l.length;c++)n=l[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(d)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var i=a.O(void 0,[2256],(()=>a(6611)));i=a.O(i)})(); -
snow-monkey-blocks/trunk/dist/blocks/section-with-bgimage/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' 443c147277892e1a0593');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '9673956d6819adfbf567'); -
snow-monkey-blocks/trunk/dist/blocks/section-with-bgimage/index.js
r3390754 r3400189 1 (()=>{var e,t={5240:(e,t,a)=>{"use strict";const i=window.wp.blocks,s=window.wp.i18n,o=JSON.parse('{"UU":"snow-monkey-blocks/section-with-bgimage","uK":{"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage > img","attribute":"alt","default":""},"lgImageID":{"type":"number","default":0},"lgImageURL":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--lg img, .smb-section-with-bgimage__bgimage--lg video","attribute":"src","default":""},"lgImageAlt":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--lg img","attribute":"alt","default":""},"lgImageWidth":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--lg img, .smb-section-with-bgimage__bgimage--lg video","attribute":"width","default":""},"lgImageHeight":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--lg img, .smb-section-with-bgimage__bgimage--lg video","attribute":"height","default":""},"lgImageMediaType":{"type":"string"},"lgImageRepeat":{"type":"boolean","default":false},"lgFocalPoint":{"type":"object"},"lgImageSizeSlug":{"type":"string","default":"full"},"mdImageID":{"type":"number","default":0},"mdImageURL":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--md img, .smb-section-with-bgimage__bgimage--md video","attribute":"src","default":""},"mdImageAlt":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--md img","attribute":"alt","default":""},"mdImageWidth":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--md img, .smb-section-with-bgimage__bgimage--md video","attribute":"width","default":""},"mdImageHeight":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--md img, .smb-section-with-bgimage__bgimage--md video","attribute":"height","default":""},"mdImageMediaType":{"type":"string"},"mdImageRepeat":{"type":"boolean","default":false},"mdFocalPoint":{"type":"object"},"mdImageSizeSlug":{"type":"string","default":"full"},"smImageID":{"type":"number","default":0},"smImageURL":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--sm img, .smb-section-with-bgimage__bgimage--sm video","attribute":"src","default":""},"smImageAlt":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--sm img","attribute":"alt","default":""},"smImageWidth":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--sm img, .smb-section-with-bgimage__bgimage--sm video","attribute":"width","default":""},"smImageHeight":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--sm img, .smb-section-with-bgimage__bgimage--sm video","attribute":"height","default":""},"smImageMediaType":{"type":"string"},"smImageRepeat":{"type":"boolean","default":false},"smFocalPoint":{"type":"object"},"smImageSizeSlug":{"type":"string","default":"full"},"contentsAlignment":{"type":"string"},"maskColor":{"type":"string"},"maskGradientColor":{"type":"string"},"maskOpacity":{"type":"number","default":1},"textColor":{"type":"string"},"parallax":{"type":"boolean","default":false},"contentsWidth":{"type":"boolean","default":false},"contentJustification":{"type":"string"},"itemsAlignment":{"type":"string"},"title":{"type":"string","source":"html","selector":".smb-section__title","default":""},"subtitle":{"type":"string","source":"html","selector":".smb-section__subtitle","default":""},"lede":{"type":"string","source":"html","selector":".smb-section__lede","default":""},"wrapperTagName":{"type":"string","default":"div"},"titleTagName":{"type":"string","default":"h2"},"height":{"type":"string","default":"fit"},"disableCustomHeight":{"type":"boolean","default":true},"containerAlign":{"type":"string"},"disableContainerPadding":{"type":"boolean","default":false},"contentsMaxWidth":{"type":"string"},"isSlim":{"type":"boolean","default":false},"topDividerType":{"type":"string","default":"tilt"},"topDividerLevel":{"type":"number","default":0},"topDividerColor":{"type":"string","default":"#fff"},"topDividerVerticalPosition":{"type":"number","default":0},"topDividerOverlay":{"type":"boolean","default":true},"bottomDividerType":{"type":"string","default":"tilt"},"bottomDividerLevel":{"type":"number","default":0},"bottomDividerColor":{"type":"string","default":"#fff"},"bottomDividerVerticalPosition":{"type":"number","default":0},"bottomDividerOverlay":{"type":"boolean","default":true},"backgroundText":{"type":"object","default":{"text":"","color":"","fontSize":"","fontSizeSlug":"","lineHeight":"","opacity":0.2,"position":{"top":null,"right":null,"bottom":null,"left":null}}},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"align":["wide","full"],"anchor":true,"spacing":{"margin":true,"padding":["top","bottom"]},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":["title","subtitle","lede","backgroundText","imageID","imageURL","imageAlt","lgImageID","lgImageURL","lgImageAlt","lgImageMediaType","lgImageRepeat","lgFocalPoint","lgImageSizeSlug","mdImageID","mdImageURL","mdImageAlt","mdImageMediaType","mdImageRepeat","mdFocalPoint","mdImageSizeSlug","smImageID","smImageURL","smImageAlt","smImageMediaType","smImageRepeat","smFocalPoint","smImageSizeSlug"]}}}}'),l=window.ReactJSXRuntime,n=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"6",y:"12.13",width:"12",height:"1"}),(0,l.jsx)("rect",{x:"3",y:"15.63",width:"18",height:"1"}),(0,l.jsx)("rect",{x:"6",y:"19.13",width:"12",height:"1"}),(0,l.jsx)("path",{d:"M9.41,9.05h.16L12,7.14l2.43,1.91h.16a.15.15,0,0,0,.16-.15V4a.15.15,0,0,0-.16-.15H9.41A.15.15,0,0,0,9.25,4V8.9A.15.15,0,0,0,9.41,9.05Z"})]});var m=a(6942),g=a.n(m);const c=window.wp.blockEditor,r=window.wp.components,d=window.wp.data;function b(e){const{desktop:t,tablet:a,mobile:i}=e,s=[];return t&&s.push({name:"desktop",title:(0,l.jsx)(r.Dashicon,{icon:"desktop"})}),a&&s.push({name:"tablet",title:(0,l.jsx)(r.Dashicon,{icon:"tablet"})}),i&&s.push({name:"mobile",title:(0,l.jsx)(r.Dashicon,{icon:"smartphone"})}),(0,l.jsx)(r.TabPanel,{className:"smb-inspector-tabs",tabs:s,children:e=>{if(e.name){if("desktop"===e.name)return t();if("tablet"===e.name)return a();if("mobile"===e.name)return i()}}})}const u=window.lodash,h=window.wp.element,p=({id:e,src:t,allowedTypes:a,accept:i,onSelect:o,onSelectURL:n,onRemove:m})=>(0,l.jsxs)(c.BlockControls,{group:"inline",children:[(0,l.jsx)(c.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:a,accept:i,onSelect:o,onSelectURL:n}),!!t&&!!m&&(0,l.jsx)(r.ToolbarButton,{onClick:m,children:(0,s.__)("Release","snow-monkey-blocks")})]}),x=({src:e,alt:t,id:a,style:i,width:s,height:o})=>(0,l.jsx)("img",{src:e,alt:t,className:`wp-image-${a}`,style:i,width:s,height:o}),_=({src:e,style:t,width:a,height:i})=>(0,l.jsx)("video",{src:e,style:t,width:a,height:i}),y=(0,h.memo)((({id:e,src:t,alt:a,url:i,width:s,height:o,target:n,allowedTypes:m,accept:g,onSelect:c,onSelectURL:r,onRemove:d,mediaType:b,style:h,rel:y,linkClass:v})=>{let w;if("image"===b){let m;w=(0,l.jsx)(x,{src:t,alt:a,id:e,style:h,width:s,height:o}),m=y?(0,u.isEmpty)(y)?void 0:y:"_self"!==n&&n?"noopener noreferrer":void 0,i&&(w=(0,l.jsx)("span",{href:i,target:"_self"===n?void 0:n,rel:m,className:v,children:w}))}else"video"===b&&(w=(0,l.jsx)(_,{src:t,style:h,width:s,height:o}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p,{id:e,src:t,allowedTypes:m,accept:g,onSelect:c,onSelectURL:r,onRemove:d}),w]})}),((e,t)=>{const a=Object.keys(e);for(const i of a)if(e[i]!==t[i])return!1;return!0}));function v(e){const{src:t,onSelect:a,onSelectURL:i,mediaType:o,allowedTypes:n=["image"]}=e,m=!o&&t?"image":o;let g=(0,s.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?g=(0,s.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(g=(0,s.__)("Video","snow-monkey-blocks")));const r=(0,h.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,l.jsx)(y,{...e,accept:r,allowedTypes:n,mediaType:m}):(0,l.jsx)(c.MediaPlaceholder,{icon:"format-image",labels:{title:g},onSelect:a,onSelectURL:i,accept:r,allowedTypes:n})}const w=[{label:(0,s._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,s._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,s._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,s._x)("Full Size","Image size option for resolution control"),value:"full"}];function j({panelId:e,value:t,onChange:a,options:i=w,defaultValue:o=w[0].value,isShownByDefault:n=!0,withToolsPanelItem:m=!0}){const g=null!=t?t:o,c=()=>(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Resolution"),value:g,options:i,onChange:a,help:(0,s.__)("Select the size of the source image."),size:"__unstable-large"});return m?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>g!==o,label:(0,s.__)("Resolution"),onDeselect:()=>a(o),isShownByDefault:n,panelId:e,children:(0,l.jsx)(c,{})}):(0,l.jsx)(c,{})}const k=window.wp.compose,I=(e,t=0,a=null)=>(e=Number(e),(isNaN(e)||e<t)&&(e=t),null!==a&&e>a&&(e=a),e),f=(e,t,a)=>{if(a=a||"#fff",0!==t)return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:(()=>{switch(e){case"tilt":return 0>t?(0,l.jsx)("path",{d:`m100,${100+t} L100,100 L0,100 z`,strokeWidth:"0",fill:a}):(0,l.jsx)("path",{d:`m0,${100-t} L100,100 L0,100 z`,strokeWidth:"0",fill:a});case"curve":return 0>t?(0,l.jsx)("path",{d:`m0,100 L100,100 Q50,${2*t+100},0,100 z`,strokeWidth:"0",fill:a}):(0,l.jsx)("path",{d:`m0,${100-t} q50,${2*t},100,0 V100 L0,100 z`,strokeWidth:"0",fill:a});case"wave":return 0>t?(0,l.jsx)("path",{d:`m0,${100+t/2} q20,${t},40,0 t40,0 t40,0 V100 L0,100 z`,strokeWidth:"0",fill:a}):(0,l.jsx)("path",{d:`m0,${100-t/2} q20,${t},40,0 t40,0 t40,0 V100 L0,100 z`,strokeWidth:"0",fill:a});case"triangle":return t=Math.abs(t),(0,l.jsx)("path",{d:`m${(100-t)/2},100 l${t},0 l${-1*t/2},${-1*t} z`,strokeWidth:"0",fill:a});case"triangle-large":return t=Math.abs(t),(0,l.jsx)("path",{d:`m0,100 l100,0 l-50,${-1*t} z`,strokeWidth:"0",fill:a})}})()})},N=e=>e.media_type?"image"===e.media_type?"image":"video":e.type,C=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function T(e=""){return!!e&&C.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e))}function P(e){if(null==e)return{};Object.keys(e).forEach((t=>{const a=e?.[t];null!==a&&""!==a||(e[t]=void 0)}));const t=0===parseFloat(e?.top)?0:e?.top,a=0===parseFloat(e?.right)?0:e?.right,i=0===parseFloat(e?.bottom)?0:e?.bottom,s=0===parseFloat(e?.left)?0:e?.left;return t===a===i===s&&void 0!==t?{padding:t}:t===i&&a===s&&void 0!==t&&void 0!==a?{padding:`${t} ${a}`}:t!==i&&a===s&&void 0!==t&&void 0!==i&&void 0!==a?{padding:`${t} ${a} ${i}`}:{paddingTop:t,paddingRight:a,paddingBottom:i,paddingLeft:s}}function $(){return(0,k.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const D=window.wp.primitives;var V=(0,l.jsxs)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,l.jsx)(D.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,l.jsx)(D.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});function R({label:e,onChange:t,value:a,withReset:i=!0},o){const n=(0,r.__experimentalUseCustomUnits)({availableUnits:["px","em","rem","%","vw"]}),m="smb-width-picker";return(0,l.jsx)("fieldset",{className:m,...o?{}:{ref:o},children:(0,l.jsx)("div",{className:`${m}__controls`,children:(0,l.jsxs)(r.Flex,{justify:"space-between",className:`${m}__custom-size-control`,children:[(0,l.jsx)(r.FlexItem,{isBlock:!0,children:(0,l.jsx)(r.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:e,labelPosition:"edge",value:a,onChange:e=>{e=0>parseFloat(e)||0===parseFloat(e)?void 0:e,t(e)},units:n})}),i&&(0,l.jsx)(r.FlexItem,{isBlock:!0,children:(0,l.jsx)(r.Button,{className:"components-color-palette__clear",disabled:void 0===a,onClick:()=>t(void 0),isSmall:!0,isSecondary:!0,children:(0,s.__)("Reset")})})]})})})}function S(e){const{label:t,sides:a,values:i,onChange:s,allowReset:o}=e,[n]=null!=c.useSettings?(0,c.useSettings)("spacing.units"):[(0,c.useSetting)("spacing.units")].filter(Boolean),m=(0,r.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vw"]});return(0,l.jsx)(r.BoxControl,{__next40pxDefaultSize:!0,values:i,onChange:s,label:t,sides:a,units:m,allowReset:o})}const O=({disableIsSlim:e,disableContentsMaxWidth:t,disableContainerAlign:a,disableDisableContainerPadding:i,disableCustomHeight:o,settings:n})=>{const[m,g]=(0,h.useState)(!o),c=$(),d=["div","section","aside"],b=["h1","h2","h3","none"];return(0,l.jsx)(r.__experimentalToolsPanel,{label:(0,s.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:c,children:n.map(((o,n)=>{if(o.hasOwnProperty("wrapperTagNameValue")&&o.hasOwnProperty("onWrapperTagNameChange")&&o.hasOwnProperty("defaultValue"))return(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.wrapperTagNameValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Wrapper tag","snow-monkey-blocks"),onDeselect:()=>o.onWrapperTagNameChange(o.defaultValue),children:(0,l.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Wrapper tag","snow-monkey-blocks"),id:"snow-monkey-blocks/section/wrapper-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,u.times)(d.length,(e=>(0,l.jsx)(r.Button,{variant:o.wrapperTagNameValue===d[e]?"primary":"secondary",onClick:()=>{o.onWrapperTagNameChange(d[e])},children:d[e]},e)))})},n)},n);if(o.hasOwnProperty("titleTagNameValue")&&o.hasOwnProperty("onTitleTagNameChange")&&o.hasOwnProperty("defaultValue"))return(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.titleTagNameValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>o.onTitleTagNameChange(o.defaultValue),children:(0,l.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/section/title-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,u.times)(b.length,(e=>(0,l.jsx)(r.Button,{variant:o.titleTagNameValue===b[e]?"primary":"secondary",onClick:()=>{o.onTitleTagNameChange(b[e])},children:b[e]},e)))})})},n);if(o.hasOwnProperty("heightValue")&&o.hasOwnProperty("onHeightChange")&&o.hasOwnProperty("defaultValue"))return(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.heightValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Height","snow-monkey-blocks"),onDeselect:()=>{o.onHeightChange(o.defaultValue,o.defaultDisableCustomHeightValue),g(!o.defaultDisableCustomHeightValue)},children:(0,l.jsxs)("div",{children:[(0,l.jsx)(r.__experimentalSpacer,{children:(0,l.jsxs)(r.__experimentalHStack,{children:[(0,l.jsx)("span",{className:"components-base-control__label",children:m?(0,s.__)("Min height","snow-monkey-blocks"):(0,s.__)("Height","snow-monkey-blocks")}),(0,l.jsx)(r.Button,{label:m?(0,s.__)("Set custom size"):(0,s.__)("Use preset","snow-monkey-blocks"),icon:V,onClick:()=>{g(!m)},isPressed:m,isSmall:!0})]})}),m?(0,l.jsx)(r.__experimentalUnitControl,{__next40pxDefaultSize:!0,value:o.heightValue,onChange:e=>o.onHeightChange(e,!1)}):(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:o.heightValue,options:[{value:"fit",label:(0,s.__)("Fit","snow-monkey-blocks")},{value:"wide",label:(0,s.__)("Wide","snow-monkey-blocks")},{value:"full",label:(0,s.__)("Full","snow-monkey-blocks")}],onChange:e=>o.onHeightChange(e,!0)})]})},n);if(!a&&o.hasOwnProperty("containerAlignValue")&&o.hasOwnProperty("onContainerAlignChange")&&o.hasOwnProperty("defaultValue")){let e=[{value:"",label:(0,s.__)("Default","snow-monkey-blocks")},{value:"wide",label:(0,s.__)("Wide width","snow-monkey-blocks")},{value:"full",label:(0,s.__)("Full width","snow-monkey-blocks")}];return o.hasOwnProperty("contentsContainerControl")&&(e=e.concat([{value:"contents-wide",label:(0,s.__)("Wide width (Only contents)","snow-monkey-blocks")},{value:"contents-full",label:(0,s.__)("Full width (Only contents)","snow-monkey-blocks")}])),(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.containerAlignValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Container alignment","snow-monkey-blocks"),onDeselect:()=>o.onContainerAlignChange(o.defaultValue),children:(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Container alignment","snow-monkey-blocks"),value:o.containerAlignValue,onChange:o.onContainerAlignChange,options:e})},n)}return!i&&o.hasOwnProperty("disableContainerPaddingValue")&&o.hasOwnProperty("onDisableContainerPaddingChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.disableContainerPaddingValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Remove container padding of the contents","snow-monkey-blocks"),onDeselect:()=>o.onDisableContainerPaddingChange(o.defaultValue),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Remove container padding of the contents","snow-monkey-blocks"),checked:o.disableContainerPaddingValue,onChange:o.onDisableContainerPaddingChange})},n):!t&&o.hasOwnProperty("contentsMaxWidthValue")&&o.hasOwnProperty("onContentsMaxWidthChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.contentsMaxWidthValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Max width of the contents","snow-monkey-blocks"),onDeselect:()=>o.onContentsMaxWidthChange(o.defaultValue),children:(0,l.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Max width of the contents","snow-monkey-blocks"),id:"snow-monkey-blocks/section/contents-max-width",children:(0,l.jsx)(R,{value:o.contentsMaxWidthValue,onChange:o.onContentsMaxWidthChange})})},n):!e&&o.hasOwnProperty("isSlimValue")&&o.hasOwnProperty("onIsSlimChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.isSlimValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Make the contents width slim","snow-monkey-blocks"),onDeselect:()=>o.onIsSlimChange(o.defaultValue),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Make the contents width slim","snow-monkey-blocks"),checked:o.isSlimValue,onChange:o.onIsSlimChange})},n):o.hasOwnProperty("paddingValue")&&o.hasOwnProperty("onPaddingChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.paddingValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Padding","snow-monkey-blocks"),onDeselect:()=>o.onPaddingChange(o.defaultValue),children:(0,l.jsx)(S,{label:(0,s.__)("Padding","snow-monkey-blocks"),sides:o.sides?o.sides:void 0,values:o.paddingValue,onChange:o.onPaddingChange,allowReset:!1})},n):(0,l.jsx)(h.Fragment,{},n)}))})},L=e=>{const t=e.filter((e=>e.hasOwnProperty("titleValue")&&e.hasOwnProperty("titleTagNameValue")));return!!t&&t[0]},M=e=>g()("smb-section__header",{[`${e}__header`]:!!e}),A=e=>g()("smb-section__subtitle",{[`${e}__subtitle`]:!!e}),B=e=>g()("smb-section__title",{[`${e}__title`]:!!e}),z=e=>g()("smb-section__lede-wrapper",{[`${e}__lede-wrapper`]:!!e}),U=e=>g()("smb-section__lede",{[`${e}__lede`]:!!e}),F=({isSelected:e,className:t,settings:a})=>{const i=(e=>{const t=(e=>{const t=e.filter((e=>e.hasOwnProperty("subtitleValue")));return!!t&&t[0]})(e);return!!t&&!c.RichText.isEmpty(t.subtitleValue)})(a),o=(e=>{const t=(e=>{const t=e.filter((e=>e.hasOwnProperty("ledeValue")));return!!t&&t[0]})(e);return!!t&&!c.RichText.isEmpty(t.ledeValue)})(a),n=A(t),m=B(t),g=z(t),r=U(t);return(0,l.jsx)(l.Fragment,{children:a.map(((t,a)=>(i||e)&&t.hasOwnProperty("subtitleValue")&&t.hasOwnProperty("onSubtitleChange")?(0,l.jsx)(c.RichText,{className:n,value:t.subtitleValue,onChange:t.onSubtitleChange,placeholder:(0,s.__)("Write subtitle…","snow-monkey-blocks")},a):t.hasOwnProperty("titleTagNameValue")&&t.hasOwnProperty("titleValue")&&t.hasOwnProperty("onTitleChange")?(0,l.jsx)(c.RichText,{className:m,tagName:t.titleTagNameValue,value:t.titleValue,onChange:t.onTitleChange,placeholder:(0,s.__)("Write title…","snow-monkey-blocks")},a):(o||e)&&t.hasOwnProperty("ledeValue")&&t.hasOwnProperty("onLedeChange")?(0,l.jsx)("div",{className:g,children:(0,l.jsx)(c.RichText,{className:r,value:t.ledeValue,onChange:t.onLedeChange,placeholder:(0,s.__)("Write lede…","snow-monkey-blocks")})},a):(0,l.jsx)(h.Fragment,{},a)))})},H=({isSelected:e,hasContainer:t,containerClassName:a,className:i,settings:s})=>{const o=(e=>{const t=L(e);return!!t&&"none"!==t.titleTagNameValue})(s);if(!o)return(0,l.jsx)(l.Fragment,{});const n=(e=>{const t=L(e);return!!t&&!c.RichText.isEmpty(t.titleValue)&&"none"!==t.titleTagNameValue})(s);if(!n&&!e)return(0,l.jsx)(l.Fragment,{});const m=M(i);return(0,l.jsx)(l.Fragment,{children:t?(0,l.jsx)("div",{className:m,children:(0,l.jsx)("div",{className:a,children:(0,l.jsx)(F,{isSelected:e,className:i,settings:s})})}):(0,l.jsx)("div",{className:m,children:(0,l.jsx)(F,{isSelected:e,className:i,settings:s})})})},W=({title:e,titleTagName:t,subtitle:a,lede:i,className:s})=>{const o=!c.RichText.isEmpty(a),n=!c.RichText.isEmpty(i),m=A(s),g=B(s),r=z(s),d=U(s);return(0,l.jsxs)(l.Fragment,{children:[o&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:m,value:a}),(0,l.jsx)(c.RichText.Content,{tagName:t,className:g,value:e}),n&&(0,l.jsx)("div",{className:r,children:(0,l.jsx)(c.RichText.Content,{tagName:"div",className:d,value:i})})]})},K=({title:e,titleTagName:t,subtitle:a,lede:i,className:s,hasContainer:o,containerClassName:n})=>{if(c.RichText.isEmpty(e)||"none"===t)return(0,l.jsx)(l.Fragment,{});const m=M(s);return(0,l.jsx)(l.Fragment,{children:o?(0,l.jsx)("div",{className:m,children:(0,l.jsx)("div",{className:n,children:(0,l.jsx)(W,{title:e,titleTagName:t,subtitle:a,lede:i,className:s})})}):(0,l.jsx)("div",{className:m,children:(0,l.jsx)(W,{title:e,titleTagName:t,subtitle:a,lede:i,className:s})})})},E=((0,s.__)("None","snow-monkey-blocks"),(0,s.__)("Stripe","snow-monkey-blocks"),(0,s.__)("Noise","snow-monkey-blocks"),(0,s.__)("Dots","snow-monkey-blocks"),(0,s.__)("Dots 2","snow-monkey-blocks"),[{value:"tilt",label:(0,s.__)("Tilt","snow-monkey-blocks")},{value:"curve",label:(0,s.__)("Curve","snow-monkey-blocks")},{value:"wave",label:(0,s.__)("Wave","snow-monkey-blocks")},{value:"triangle",label:(0,s.__)("Triangle","snow-monkey-blocks")},{value:"triangle-large",label:(0,s.__)("Triangle (Large)","snow-monkey-blocks")}]),G=({settings:e})=>{const t=(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),a=$();return(0,l.jsx)(r.__experimentalToolsPanel,{label:(0,s.__)("Top divider","snow-monkey-blocks"),dropdownMenuProps:a,children:e.map(((e,a)=>e.hasOwnProperty("typeValue")&&e.hasOwnProperty("onTypeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.typeValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Type","snow-monkey-blocks"),onDeselect:()=>e.onTypeChange(e.defaultValue),children:(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Type","snow-monkey-blocks"),value:e.typeValue,onChange:e.onTypeChange,options:E})},a):e.hasOwnProperty("levelValue")&&e.hasOwnProperty("onLevelChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.levelValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Level","snow-monkey-blocks"),onDeselect:()=>e.onLevelChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Level","snow-monkey-blocks"),value:e.levelValue,onChange:e.onLevelChange,min:"-100",max:"100"})},a):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultColorValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...t})},a):e.hasOwnProperty("verticalPositionValue")&&e.hasOwnProperty("onVerticalPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.verticalPositionValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>e.onVerticalPositionChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Position (Top / Bottom)","snow-monkey-blocks"),value:e.verticalPositionValue,onChange:e.onVerticalPositionChange,min:"-90",max:"90"})},a):e.hasOwnProperty("overlayValue")&&e.hasOwnProperty("onOverlayChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.overlayValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Overlap divider on content","snow-monkey-blocks"),onDeselect:()=>e.onOverlayChange(e.defaultValue),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Overlap divider on content","snow-monkey-blocks"),checked:e.overlayValue,onChange:e.onOverlayChange})},a):(0,l.jsx)(h.Fragment,{},a)))})},J=({settings:e})=>{const t=(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),a=$();return(0,l.jsx)(r.__experimentalToolsPanel,{label:(0,s.__)("Bottom divider","snow-monkey-blocks"),dropdownMenuProps:a,children:e.map(((e,a)=>e.hasOwnProperty("typeValue")&&e.hasOwnProperty("onTypeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.typeValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Type","snow-monkey-blocks"),onDeselect:()=>e.onTypeChange(e.defaultValue),children:(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Type","snow-monkey-blocks"),value:e.typeValue,onChange:e.onTypeChange,options:E})},a):e.hasOwnProperty("levelValue")&&e.hasOwnProperty("onLevelChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.levelValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Level","snow-monkey-blocks"),onDeselect:()=>e.onLevelChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Level","snow-monkey-blocks"),value:e.levelValue,onChange:e.onLevelChange,min:"-100",max:"100"})},a):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultColorValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...t})},a):e.hasOwnProperty("verticalPositionValue")&&e.hasOwnProperty("onVerticalPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.verticalPositionValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>e.onVerticalPositionChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Position (Top / Bottom)","snow-monkey-blocks"),value:e.verticalPositionValue,onChange:e.onVerticalPositionChange,min:"-90",max:"90"})},a):e.hasOwnProperty("overlayValue")&&e.hasOwnProperty("onOverlayChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.overlayValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Overlap divider on content","snow-monkey-blocks"),onDeselect:()=>e.onOverlayChange(e.defaultValue),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Overlap divider on content","snow-monkey-blocks"),checked:e.overlayValue,onChange:e.onOverlayChange})},a):(0,l.jsx)(h.Fragment,{},a)))})},q=({settings:e})=>{const t=(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),a=$();return(0,l.jsx)(r.__experimentalToolsPanel,{label:(0,s.__)("Background text","snow-monkey-blocks"),dropdownMenuProps:a,children:e.map(((e,a)=>e.hasOwnProperty("textValue")&&e.hasOwnProperty("onTextChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.textValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Text","snow-monkey-blocks"),onDeselect:()=>e.onTextChange(e.defaultValue),children:(0,l.jsx)(r.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Text","snow-monkey-blocks"),value:e.textValue,onChange:e.onTextChange})},a):e.hasOwnProperty("fontSizeValue")&&e.hasOwnProperty("onFontSizeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.fontSizeValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Size","snow-monkey-blocks"),onDeselect:()=>e.onFontSizeChange(e.defaultValue),children:(0,l.jsx)(c.FontSizePicker,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.fontSizeValue,onChange:e.onFontSizeChange,withReset:!1})},a):e.hasOwnProperty("lineHeightValue")&&e.hasOwnProperty("onLineHeightChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.lineHeightValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Line height","snow-monkey-blocks"),onDeselect:()=>e.onLineHeightChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Line height","snow-monkey-blocks"),value:e.lineHeightValue,onChange:e.onLineHeightChange,min:"0",max:"5",step:"0.1",initialPosition:void 0,allowReset:!0})},a):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,gradientValue:e.gradientValue,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange}],__experimentalIsRenderedInSidebar:!0,...t})},a):e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.opacityValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>e.onOpacityChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:.1,max:1,step:.1})},a):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.positionValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Position","snow-monkey-blocks"),onDeselect:()=>e.onPositionChange(e.defaultValue),children:(0,l.jsx)(S,{label:(0,s.__)("Position","snow-monkey-blocks"),values:e.positionValue,onChange:e.onPositionChange})},a):(0,l.jsx)(h.Fragment,{},a)))})},Y=({backgroundHorizontalPosition:e,backgroundVerticalPosition:t,isBackgroundNoOver:a,backgroundColor:i,backgroundGradientColor:s,backgroundTexture:o,backgroundTextureOpacity:l,backgroundTextureUrl:n,fixedBackgroundColor:m,fixedBackgroundGradientColor:g,fixedBackgroundTexture:c,fixedBackgroundTextureOpacity:r,fixedBackgroundTextureUrl:d,topDividerVerticalPosition:b,topDividerLevel:u,bottomDividerVerticalPosition:h,bottomDividerLevel:p,backgroundText:x})=>{const _=!!o,y=!!c,v={};return(!!i||!!s)&&(v["--smb-section--background-color"]=i,v["--smb-section--background-image"]=s,a?(0<e?v["--smb-section--background-left"]=`${Math.abs(e)}%`:0>e&&(v["--smb-section--background-right"]=`${Math.abs(e)}%`),0<t?v["--smb-section--background-top"]=`${Math.abs(t)}%`:0>t&&(v["--smb-section--background-bottom"]=`${Math.abs(t)}%`)):(e||t)&&(v["--smb-section--background-transform"]=`translate(${e||0}%, ${t||0}%)`)),n&&(v["--smb-section--background-texture-image"]=_?n?`url(${n})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${o}.png)`:void 0,v["--smb-section--background-texture-opacity"]=l?String(l):void 0),v["--smb-section--fixed-background-color"]=m||void 0,v["--smb-section--fixed-background-image"]=g||void 0,d&&(v["--smb-section--fixed-background-texture-image"]=y?d?`url(${d})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${c}.png)`:void 0,v["--smb-section--fixed-background-texture-opacity"]=r?String(r):void 0),v["--smb-section--dividers-top"]=b?`${b}%`:void 0,v["--smb-section--top-divider-level"]=u?`${u}px`:void 0,v["--smb-section--dividers-bottom"]=h?`${h}%`:void 0,v["--smb-section--bottom-divider-level"]=p?`${p}px`:void 0,x?.text&&(v["--smb-section--background-text-color"]=x?.color?x.color:void 0,v["--smb-section--background-text-opacity"]=x?.opacity?String(x.opacity):void 0,v["--smb-section--background-text-font-size"]=x?.fontSize&&!x?.fontSizeSlug?x.fontSize:void 0,v["--smb-section--background-line-height"]=x?.lineHeight?x.lineHeight:void 0,v["--smb-section--background-text-top"]=x?.position?.top&&x?.position?.top.match(/^\d+$/)?`${x?.position?.top}px`:x?.position?.top,v["--smb-section--background-text-right"]=x?.position?.right&&x.position.right.match(/^\d+$/)?`${x?.position?.right}px`:x?.position?.right,v["--smb-section--background-text-bottom"]=x?.position?.bottom&&x?.position?.bottom.match(/^\d+$/)?`${x?.position?.bottom}px`:x?.position?.bottom,v["--smb-section--background-text-left"]=x?.position?.left&&x?.position?.left.match(/^\d+$/)?`${x?.position?.left}px`:x?.position?.left),v},Q=({backgroundColor:e,backgroundGradientColor:t,backgroundTexture:a,fixedBackgroundColor:i,fixedBackgroundGradientColor:s,fixedBackgroundTexture:o,topDividerType:n,topDividerLevel:m,topDividerColor:r,bottomDividerType:d,bottomDividerLevel:b,bottomDividerColor:u,backgroundText:h,containerClasses:p})=>{const x=!!e||!!t,_=!!a,y=!!i||!!s,v=!!o,w=!!m,j=!!b,k=!!h?.text,I=g()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${n}`),N=g()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${d}`);return(0,l.jsx)(l.Fragment,{children:(y||v||x||_||w||j||k)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",children:[v&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture"}),(x||_)&&(0,l.jsx)("div",{className:"smb-section__background",children:_&&(0,l.jsx)("div",{className:"smb-section__background__texture"})}),k&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:p,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:g()("smb-section__background-text__text",{[`has-${h?.fontSizeSlug.replace(/(\d+?)([^-])/,"$1-$2")}-font-size`]:!!h?.fontSizeSlug}),children:(0,l.jsx)(c.RichText.Content,{value:h.text?.replace(/\n/g,"<br>")})})})})}),(w||j)&&(0,l.jsxs)("div",{className:"smb-section__dividers",children:[w&&(0,l.jsx)("div",{className:I,children:f(n,m,r)}),j&&(0,l.jsx)("div",{className:N,children:f(d,b,u)})]})]})})},X=["image","video"],Z="full",ee=["left","center","right"];var te=a(3558),ae=a.n(te);const ie=({backgroundHorizontalPosition:e,backgroundVerticalPosition:t,isBackgroundNoOver:a,backgroundColor:i,backgroundGradientColor:s,backgroundTexture:o,backgroundTextureOpacity:n,backgroundTextureUrl:m,fixedBackgroundColor:r,fixedBackgroundGradientColor:d,fixedBackgroundTexture:b,fixedBackgroundTextureOpacity:u,fixedBackgroundTextureUrl:h,topDividerType:p,topDividerLevel:x,topDividerColor:_,topDividerVerticalPosition:y,bottomDividerType:v,bottomDividerLevel:w,bottomDividerColor:j,bottomDividerVerticalPosition:k,backgroundText:I,containerClasses:N})=>{const C=!!i||!!s,T=!!o,P=!!r||!!d,$=!!b,D=!!x,V=!!w,R=!!I?.text,S=g()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${p}`),O=g()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${v}`),L={};C&&(L.backgroundColor=i,L.backgroundImage=s,a?(0<e?L.left=`${Math.abs(e)}%`:0>e&&(L.right=`${Math.abs(e)}%`),0<t?L.top=`${Math.abs(t)}%`:0>t&&(L.bottom=`${Math.abs(t)}%`)):(e||t)&&(L.transform=`translate(${e||0}%, ${t||0}%)`));const M={backgroundImage:T?m?`url(${m})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${o}.png)`:void 0,opacity:n||void 0},A={paddingTop:x?Math.abs(x):0,paddingBottom:w?Math.abs(w):0,backgroundColor:r||void 0,backgroundImage:d||void 0},B={backgroundImage:$?h?`url(${h})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${b}.png)`:void 0,opacity:u||void 0},z={};y&&(z.top=`${y}%`),k&&(z.bottom=`${k}%`);const U={};return U.color=I?.color?I.color:void 0,U.opacity=I?.opacity&&1>I.opacity?I.opacity:void 0,U.fontSize=I?.fontSize&&!I?.fontSizeSlug?I.fontSize:void 0,U.lineHeight=I?.lineHeight?I.lineHeight:void 0,U.top=I?.position?.top?I.position.top:void 0,U.right=I?.position?.right?I.position.right:void 0,U.bottom=I?.position?.bottom?I.position.bottom:void 0,U.left=I?.position?.left?I.position.left:void 0,(0,l.jsx)(l.Fragment,{children:(P||$||C||T||D||V||R)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",style:A,children:[$&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture",style:B}),(C||T)&&(0,l.jsx)("div",{className:"smb-section__background",style:L,children:T&&(0,l.jsx)("div",{className:"smb-section__background__texture",style:M})}),R&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:N,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:g()("smb-section__background-text__text",{[`has-${I?.fontSizeSlug}-font-size`]:!!I?.fontSizeSlug}),style:U,children:(0,l.jsx)(c.RichText.Content,{value:I.text?.replace(/\n/g,"<br>")})})})})}),(D||V)&&(0,l.jsxs)("div",{className:"smb-section__dividers",style:z,children:[D&&(0,l.jsx)("div",{className:S,children:f(p,x,_)}),V&&(0,l.jsx)("div",{className:O,children:f(v,w,j)})]})]})})},se=o.uK,oe=o.xY,le=[{attributes:{...se,padding:{type:"object",default:{}}},supports:{...oe},migrate:e=>({...e,style:{...e?.style,spacing:{...e?.style?.spacing,padding:{...e?.padding}}}}),save({attributes:e,className:t}){const{align:a,lgImageID:i,lgImageURL:s,lgImageAlt:o,lgImageWidth:n,lgImageHeight:m,lgImageMediaType:r,lgImageRepeat:d,lgFocalPoint:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageWidth:x,mdImageHeight:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageWidth:f,smImageHeight:N,smImageMediaType:C,smImageRepeat:T,smFocalPoint:$,contentsAlignment:D,maskColor:V,maskGradientColor:R,maskOpacity:S,textColor:O,parallax:L,contentJustification:M,itemsAlignment:A,title:B,subtitle:z,lede:U,wrapperTagName:F,titleTagName:H,height:W,disableCustomHeight:E,containerAlign:G,disableContainerPadding:J,contentsMaxWidth:q,isSlim:X,padding:Z,topDividerType:ee,topDividerLevel:te,topDividerColor:ae,topDividerVerticalPosition:ie,topDividerOverlay:se,bottomDividerType:oe,bottomDividerLevel:le,bottomDividerColor:ne,bottomDividerVerticalPosition:me,bottomDividerOverlay:ge,backgroundText:ce}=e,re=F,de="fit"!==W,be=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${D}`]:!!D,[`smb-section--${W}`]:!!W&&E,[`is-items-alignment-${A}`]:!!A&&de,"smb-section--top-divider-no-overlay":!se,"smb-section--bottom-divider-no-overlay":!ge,"js-bg-parallax":!!L}),ue=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!L}),he=g()("smb-section__inner",{[`is-content-justification-${M}`]:!!M}),pe=g()("c-container",{alignfull:("full"===G||"contents-full"===G)&&"full"===a,alignwide:"wide"===G||"contents-wide"===G&&"full"===a,"c-container--no-padding":J});let xe=pe.replace("c-container--no-padding","").trim();"contents-wide"!==G&&"contents-full"!==G||(xe=xe.replace("alignfull","").replace("alignwide","").trim());const _e=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${D}`]:!!D,"u-slim-width":X&&!q}),ye=0<Number((1-S).toFixed(1)),ve="video"===r,we="image"===r||void 0===r,je=!!s,ke=b&&!L?`${100*b.x}% ${100*b.y}%`:void 0,Ie="video"===y,fe="image"===y||void 0===y,Ne=!!h,Ce=w&&!L?`${100*w.x}% ${100*w.y}%`:void 0,Te="video"===C,Pe="image"===C||void 0===C,$e=!!k,De=$&&!L?`${100*$.x}% ${100*$.y}%`:void 0,Ve={"--smb-section--color":O||void 0,"--smb-section--contents-wrapper-width":q&&!X?q:void 0,"--smb-section--min-height":W&&!E?W:void 0,"--smb-section-with-bgimage--mask-color":V||void 0,"--smb-section-with-bgimage--mask-image":R||void 0,"--smb-section-with-bgimage--mask-opacity":String(S),"--smb-section-with-bgimage--lg-media-position":ke,"--smb-section-with-bgimage--lg-repeatable-image":d&&s?`url(${s})`:void 0,"--smb-section-with-bgimage--md-media-position":Ce,"--smb-section-with-bgimage--md-repeatable-image":v&&h?`url(${h})`:void 0,"--smb-section-with-bgimage--sm-media-position":De,"--smb-section-with-bgimage--sm-repeatable-image":T&&k?`url(${k})`:void 0,...P(Z),...Y({topDividerVerticalPosition:ie,topDividerLevel:te,bottomDividerVerticalPosition:me,bottomDividerLevel:le,backgroundText:ce})};return(0,l.jsxs)(re,{...c.useBlockProps.save({className:be,style:Ve}),children:[je&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--lg"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),we&&(d?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})}):(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})),ve&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:s,width:n,height:m})]}),Ne&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--md"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),fe&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})}):(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})),Ie&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,width:x,height:_})]}),$e&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--sm"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),Pe&&(T?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})}):(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})),Te&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,width:f,height:N})]}),(0,l.jsx)(Q,{topDividerType:ee,topDividerLevel:te,topDividerColor:ae,bottomDividerType:oe,bottomDividerLevel:le,bottomDividerColor:ne,backgroundText:ce,containerClasses:pe}),(0,l.jsx)("div",{className:he,children:(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:_e,children:[(0,l.jsx)(K,{title:B,titleTagName:H,subtitle:z,lede:U,hasContainer:J&&"full"===G&&"full"===a||"contents-wide"===G||"contents-full"===G,containerClassName:xe}),(0,l.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-section__body"})})]})})})]})}},{attributes:{...se,padding:{type:"object",default:{}}},supports:{...oe},save({attributes:e,className:t}){const{align:a,lgImageID:i,lgImageURL:s,lgImageAlt:o,lgImageWidth:n,lgImageHeight:m,lgImageMediaType:r,lgImageRepeat:d,lgFocalPoint:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageWidth:x,mdImageHeight:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageWidth:f,smImageHeight:N,smImageMediaType:C,smImageRepeat:T,smFocalPoint:$,contentsAlignment:D,maskColor:V,maskGradientColor:R,maskOpacity:S,textColor:O,parallax:L,contentJustification:M,itemsAlignment:A,title:B,subtitle:z,lede:U,wrapperTagName:F,titleTagName:H,height:W,disableCustomHeight:E,containerAlign:G,disableContainerPadding:J,contentsMaxWidth:q,isSlim:X,padding:Z,topDividerType:ee,topDividerLevel:te,topDividerColor:ae,topDividerVerticalPosition:ie,topDividerOverlay:se,bottomDividerType:oe,bottomDividerLevel:le,bottomDividerColor:ne,bottomDividerVerticalPosition:me,bottomDividerOverlay:ge,backgroundText:ce}=e,re=F,de="fit"!==W,be=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${D}`]:!!D,[`smb-section--${W}`]:!!W&&E,[`is-items-alignment-${A}`]:!!A&&de,"smb-section--top-divider-no-overlay":!se,"smb-section--bottom-divider-no-overlay":!ge,"js-bg-parallax":!!L}),ue=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!L}),he=g()("smb-section__inner",{[`is-content-justification-${M}`]:!!M}),pe=g()("c-container",{alignfull:("full"===G||"contents-full"===G)&&"full"===a,alignwide:"wide"===G||"contents-wide"===G&&"full"===a,"c-container--no-padding":J&&("full"===G||"contents-full"===G)&&"full"===a});let xe=pe.replace("c-container--no-padding","").trim();"contents-wide"!==G&&"contents-full"!==G||(xe=xe.replace("alignfull","").replace("alignwide","").trim());const _e=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${D}`]:!!D,"u-slim-width":X&&!q}),ye=0<Number((1-S).toFixed(1)),ve="video"===r,we="image"===r||void 0===r,je=!!s,ke=b&&!L?`${100*b.x}% ${100*b.y}%`:void 0,Ie="video"===y,fe="image"===y||void 0===y,Ne=!!h,Ce=w&&!L?`${100*w.x}% ${100*w.y}%`:void 0,Te="video"===C,Pe="image"===C||void 0===C,$e=!!k,De=$&&!L?`${100*$.x}% ${100*$.y}%`:void 0,Ve={"--smb-section--color":O||void 0,"--smb-section--contents-wrapper-width":q&&!X?q:void 0,"--smb-section--min-height":W&&!E?W:void 0,"--smb-section-with-bgimage--mask-color":V||void 0,"--smb-section-with-bgimage--mask-image":R||void 0,"--smb-section-with-bgimage--mask-opacity":String(S),"--smb-section-with-bgimage--lg-media-position":ke,"--smb-section-with-bgimage--lg-repeatable-image":d&&s?`url(${s})`:void 0,"--smb-section-with-bgimage--md-media-position":Ce,"--smb-section-with-bgimage--md-repeatable-image":v&&h?`url(${h})`:void 0,"--smb-section-with-bgimage--sm-media-position":De,"--smb-section-with-bgimage--sm-repeatable-image":T&&k?`url(${k})`:void 0,...P(Z),...Y({topDividerVerticalPosition:ie,topDividerLevel:te,bottomDividerVerticalPosition:me,bottomDividerLevel:le,backgroundText:ce})};return(0,l.jsxs)(re,{...c.useBlockProps.save({className:be,style:Ve}),children:[je&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--lg"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),we&&(d?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})}):(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})),ve&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:s,width:n,height:m})]}),Ne&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--md"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),fe&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})}):(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})),Ie&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,width:x,height:_})]}),$e&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--sm"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),Pe&&(T?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})}):(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})),Te&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,width:f,height:N})]}),(0,l.jsx)(Q,{topDividerType:ee,topDividerLevel:te,topDividerColor:ae,bottomDividerType:oe,bottomDividerLevel:le,bottomDividerColor:ne,backgroundText:ce,containerClasses:pe}),(0,l.jsx)("div",{className:he,children:(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:_e,children:[(0,l.jsx)(K,{title:B,titleTagName:H,subtitle:z,lede:U,hasContainer:J&&"full"===G&&"full"===a||"contents-wide"===G||"contents-full"===G,containerClassName:xe}),(0,l.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-section__body"})})]})})})]})}},{attributes:{...se},supports:{...oe},save({attributes:e,className:t}){const{align:a,lgImageID:i,lgImageURL:s,lgImageAlt:o,lgImageMediaType:n,lgImageRepeat:m,lgFocalPoint:r,mdImageID:d,mdImageURL:b,mdImageAlt:u,mdImageMediaType:h,mdImageRepeat:p,mdFocalPoint:x,smImageID:_,smImageURL:y,smImageAlt:v,smImageMediaType:w,smImageRepeat:j,smFocalPoint:k,contentsAlignment:I,maskColor:f,maskGradientColor:N,maskOpacity:C,textColor:T,parallax:P,contentJustification:$,itemsAlignment:D,title:V,subtitle:R,lede:S,wrapperTagName:O,titleTagName:L,height:M,containerAlign:A,disableContainerPadding:B,contentsMaxWidth:z,isSlim:U,backgroundText:F}=e,H=O,W="fit"!==M,E=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${I}`]:!!I,[`smb-section--${M}`]:!!M,[`is-items-alignment-${D}`]:!!D&&W,"js-bg-parallax":!!P}),G=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!P}),J=g()("smb-section__inner",{[`is-content-justification-${$}`]:!!$}),q=g()("c-container",{alignfull:("full"===A||"contents-full"===A)&&"full"===a,alignwide:"wide"===A||"contents-wide"===A&&"full"===a,"c-container--no-padding":B&&("full"===A||"contents-full"===A)&&"full"===a});let Y=q.replace("c-container--no-padding","").trim();"contents-wide"!==A&&"contents-full"!==A||(Y=Y.replace("alignfull","").replace("alignwide","").trim());const Q=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${I}`]:!!I,"u-slim-width":U&&!z}),X=0<Number((1-C).toFixed(1)),Z="video"===n,ee="image"===n||void 0===n,te=!!s,ae=r&&!P?`${100*r.x}% ${100*r.y}%`:void 0,se="video"===h,oe="image"===h||void 0===h,le=!!b,ne=x&&!P?`${100*x.x}% ${100*x.y}%`:void 0,me="video"===w,ge="image"===w||void 0===w,ce=!!y,re=k&&!P?`${100*k.x}% ${100*k.y}%`:void 0,de={color:T||void 0},be={};(f||N)&&(be.backgroundColor=f,be.backgroundImage=N);const ue={opacity:C,objectPosition:ae},he={opacity:C,objectPosition:ae},pe={opacity:C,backgroundImage:`url( ${s} )`,backgroundPosition:ae},xe={opacity:C,objectPosition:ne},_e={opacity:C,objectPosition:ne},ye={opacity:C,backgroundImage:`url( ${b} )`,backgroundPosition:ne},ve={opacity:C,objectPosition:re},we={opacity:C,objectPosition:re},je={opacity:C,backgroundImage:`url( ${y} )`,backgroundPosition:re},ke={width:z&&!U?z:void 0};return(0,l.jsxs)(H,{...c.useBlockProps.save({className:E,style:de}),children:[te&&(0,l.jsxs)("div",{className:g()(G,"smb-section-with-bgimage__bgimage--lg"),children:[X&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:be}),ee&&(m?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:pe,children:(0,l.jsx)("img",{src:s,alt:o,className:`wp-image-${i}`,style:he})}):(0,l.jsx)("img",{src:s,alt:o,className:`wp-image-${i}`,style:he})),Z&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:s,style:ue})]}),le&&(0,l.jsxs)("div",{className:g()(G,"smb-section-with-bgimage__bgimage--md"),children:[X&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:be}),oe&&(p?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ye,children:(0,l.jsx)("img",{src:b,alt:u,className:`wp-image-${d}`,style:_e})}):(0,l.jsx)("img",{src:b,alt:u,className:`wp-image-${d}`,style:_e})),se&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:b,style:xe})]}),ce&&(0,l.jsxs)("div",{className:g()(G,"smb-section-with-bgimage__bgimage--sm"),children:[X&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:be}),ge&&(j?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:je,children:(0,l.jsx)("img",{src:y,alt:v,className:`wp-image-${_}`,style:we})}):(0,l.jsx)("img",{src:y,alt:v,className:`wp-image-${_}`,style:we})),me&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:y,style:ve})]}),(0,l.jsx)(ie,{backgroundText:F,containerClasses:q}),(0,l.jsx)("div",{className:J,style:{},children:(0,l.jsx)("div",{className:q,children:(0,l.jsxs)("div",{className:Q,style:ke,children:[(0,l.jsx)(K,{title:V,titleTagName:L,subtitle:R,lede:S,hasContainer:B&&"full"===A&&"full"===a||"contents-wide"===A||"contents-full"===A,containerClassName:Y}),(0,l.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-section__body"})})]})})})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{lgImageID:a,lgImageURL:i,lgImageAlt:s,lgImageMediaType:o,lgImageRepeat:n,lgFocalPoint:m,mdImageID:r,mdImageURL:d,mdImageAlt:b,mdImageMediaType:u,mdImageRepeat:h,mdFocalPoint:p,smImageID:x,smImageURL:_,smImageAlt:y,smImageMediaType:v,smImageRepeat:w,smFocalPoint:j,contentsAlignment:k,maskColor:I,maskGradientColor:f,maskOpacity:N,textColor:C,parallax:T,contentJustification:P,itemsAlignment:$,title:D,subtitle:V,lede:R,wrapperTagName:S,titleTagName:O,height:L,containerAlign:M,contentsMaxWidth:A,isSlim:B}=e,z=S,U="fit"!==L,F=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${k}`]:!!k,[`smb-section--${L}`]:!!L,[`is-items-alignment-${$}`]:!!$&&U,"js-bg-parallax":!!T}),H=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!T}),W=g()("smb-section__inner",{[`is-content-justification-${P}`]:!!P}),E=g()("c-container",{alignfull:"full"===M,alignwide:"wide"===M}),G=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${k}`]:!!k,"u-slim-width":B&&!A}),J=0<Number((1-N).toFixed(1)),q="video"===o,Y="image"===o||void 0===o,Q=!!i,X=m&&!T?`${100*m.x}% ${100*m.y}%`:void 0,Z="video"===u,ee="image"===u||void 0===u,te=!!d,ae=p&&!T?`${100*p.x}% ${100*p.y}%`:void 0,ie="video"===v,se="image"===v||void 0===v,oe=!!_,le=j&&!T?`${100*j.x}% ${100*j.y}%`:void 0,ne={color:C||void 0},me={};(I||f)&&(me.backgroundColor=I,me.backgroundImage=f);const ge={opacity:N,objectPosition:X},ce={opacity:N,objectPosition:X},re={opacity:N,backgroundImage:`url( ${i} )`,backgroundPosition:X},de={opacity:N,objectPosition:ae},be={opacity:N,objectPosition:ae},ue={opacity:N,backgroundImage:`url( ${d} )`,backgroundPosition:ae},he={opacity:N,objectPosition:le},pe={opacity:N,objectPosition:le},xe={opacity:N,backgroundImage:`url( ${_} )`,backgroundPosition:le},_e={maxWidth:A&&!B?A:void 0};return(0,l.jsxs)(z,{...c.useBlockProps.save({className:F,style:ne}),children:[Q&&(0,l.jsxs)("div",{className:g()(H,"smb-section-with-bgimage__bgimage--lg"),children:[J&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:me}),Y&&(n?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:re,children:(0,l.jsx)("img",{src:i,alt:s,className:`wp-image-${a}`,style:ce})}):(0,l.jsx)("img",{src:i,alt:s,className:`wp-image-${a}`,style:ce})),q&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:i,style:ge})]}),te&&(0,l.jsxs)("div",{className:g()(H,"smb-section-with-bgimage__bgimage--md"),children:[J&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:me}),ee&&(h?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ue,children:(0,l.jsx)("img",{src:d,alt:b,className:`wp-image-${r}`,style:be})}):(0,l.jsx)("img",{src:d,alt:b,className:`wp-image-${r}`,style:be})),Z&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:d,style:de})]}),oe&&(0,l.jsxs)("div",{className:g()(H,"smb-section-with-bgimage__bgimage--sm"),children:[J&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:me}),se&&(w?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:xe,children:(0,l.jsx)("img",{src:_,alt:y,className:`wp-image-${x}`,style:pe})}):(0,l.jsx)("img",{src:_,alt:y,className:`wp-image-${x}`,style:pe})),ie&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:_,style:he})]}),(0,l.jsx)("div",{className:W,style:{},children:(0,l.jsx)("div",{className:E,children:(0,l.jsxs)("div",{className:G,style:_e,children:[(0,l.jsx)(K,{title:D,titleTagName:O,subtitle:V,lede:R}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})})})]})}},{attributes:{...se},supports:{align:["wide","full"]},migrate:e=>(e.className&&(e.className=(0,u.without)(e.className.split(" "),"smb-section--left","smb-section--center","smb-section--right").join(" ")),e.className||(e=(0,u.omit)(e,"className")),{...e}),save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskGradientColor:D,maskOpacity:V,textColor:R,parallax:S,isSlim:O,contentJustification:L,itemsAlignment:M}=e,A=a,B="fit"!==T,z=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${P}`]:!!P,[`smb-section--${T}`]:!!T,[`is-content-justification-${L}`]:!!L,[`is-items-alignment-${M}`]:!!M&&B,"js-bg-parallax":!!S}),U=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!S}),F=g()("c-container",{"u-slim-width":!!O}),H=!c.RichText.isEmpty(s)&&"none"!==i,W=!c.RichText.isEmpty(o),K=!c.RichText.isEmpty(n),E=0<Number((1-V).toFixed(1)),G="video"===b,J="image"===b||void 0===b,q=!!r,Y=h&&!S?`${100*h.x}% ${100*h.y}%`:void 0,Q="video"===y,X="image"===y||void 0===y,Z=!!x,ee=w&&!S?`${100*w.x}% ${100*w.y}%`:void 0,te="video"===f,ae="image"===f||void 0===f,ie=!!k,se=C&&!S?`${100*C.x}% ${100*C.y}%`:void 0,oe={color:R||void 0},le={};($||D)&&(le.backgroundColor=$,le.backgroundImage=D);const ne={opacity:V,objectPosition:Y},me={opacity:V,objectPosition:Y},ge={opacity:V,backgroundImage:`url( ${r} )`,backgroundPosition:Y},ce={opacity:V,objectPosition:ee},re={opacity:V,objectPosition:ee},de={opacity:V,backgroundImage:`url( ${x} )`,backgroundPosition:ee},be={opacity:V,objectPosition:se},ue={opacity:V,objectPosition:se},he={opacity:V,backgroundImage:`url( ${k} )`,backgroundPosition:se};return(0,l.jsxs)(A,{...c.useBlockProps.save({className:z,style:oe}),children:[q&&(0,l.jsxs)("div",{className:g()(U,"smb-section-with-bgimage__bgimage--lg"),children:[E&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:le}),J&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:me})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:me})),G&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:ne})]}),Z&&(0,l.jsxs)("div",{className:g()(U,"smb-section-with-bgimage__bgimage--md"),children:[E&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:le}),X&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:de,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:re})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:re})),Q&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:ce})]}),ie&&(0,l.jsxs)("div",{className:g()(U,"smb-section-with-bgimage__bgimage--sm"),children:[E&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:le}),ae&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:he,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:ue})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:ue})),te&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:be})]}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsxs)("div",{className:F,children:[H&&W&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),H&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),H&&K&&(0,l.jsx)("div",{className:"smb-section__lede-wrapper",children:(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskGradientColor:D,maskOpacity:V,textColor:R,parallax:S,isSlim:O}=e,L=a,M=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${P}`,`smb-section-with-bgimage--${T}`,t,{"js-bg-parallax":!!S}),A=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!S}),B=g()("c-container",{"u-slim-width":!!O}),z=!c.RichText.isEmpty(s)&&"none"!==i,U=!c.RichText.isEmpty(o),F=!c.RichText.isEmpty(n),H=0<Number((1-V).toFixed(1)),W="video"===b,K="image"===b||void 0===b,E=!!r,G=h&&!S?`${100*h.x}% ${100*h.y}%`:void 0,J="video"===y,q="image"===y||void 0===y,Y=!!x,Q=w&&!S?`${100*w.x}% ${100*w.y}%`:void 0,X="video"===f,Z="image"===f||void 0===f,ee=!!k,te=C&&!S?`${100*C.x}% ${100*C.y}%`:void 0,ae={color:R||void 0},ie={};($||D)&&(ie.backgroundColor=$,ie.backgroundImage=D);const se={opacity:V,objectPosition:G},oe={opacity:V,objectPosition:G},le={opacity:V,backgroundImage:`url( ${r} )`,backgroundPosition:G},ne={opacity:V,objectPosition:Q},me={opacity:V,objectPosition:Q},ge={opacity:V,backgroundImage:`url( ${x} )`,backgroundPosition:Q},ce={opacity:V,objectPosition:te},re={opacity:V,objectPosition:te},de={opacity:V,backgroundImage:`url( ${k} )`,backgroundPosition:te};return(0,l.jsxs)(L,{...c.useBlockProps.save({className:M,style:ae}),children:[E&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--lg"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),K&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:le,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:oe})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:oe})),W&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:se})]}),Y&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--md"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),q&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:me})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:me})),J&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:ne})]}),ee&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--sm"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),Z&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:de,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:re})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:re})),X&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:ce})]}),(0,l.jsxs)("div",{className:B,children:[z&&U&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),z&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),z&&F&&(0,l.jsx)("div",{className:"smb-section__lede-wrapper",children:(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskGradientColor:D,maskOpacity:V,textColor:R,parallax:S,isSlim:O}=e,L=a,M=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${P}`,`smb-section-with-bgimage--${T}`,t,{"js-bg-parallax":!!S}),A=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!S}),B=g()("c-container",{"u-slim-width":!!O}),z=!c.RichText.isEmpty(s)&&"none"!==i,U=!c.RichText.isEmpty(o),F=!c.RichText.isEmpty(n),H=0<Number((1-V).toFixed(1)),W="video"===b,K="image"===b||void 0===b,E=!!r,G=h&&!S?`${100*h.x}% ${100*h.y}%`:void 0,J="video"===y,q="image"===y||void 0===y,Y=!!x,Q=w&&!S?`${100*w.x}% ${100*w.y}%`:void 0,X="video"===f,Z="image"===f||void 0===f,ee=!!k,te=C&&!S?`${100*C.x}% ${100*C.y}%`:void 0,ae={color:R||void 0},ie={};($||D)&&(ie.backgroundColor=$,ie.backgroundImage=D);const se={opacity:V,objectPosition:G},oe={opacity:V,objectPosition:G},le={opacity:V,backgroundImage:`url( ${r} )`,backgroundPosition:G},ne={opacity:V,objectPosition:Q},me={opacity:V,objectPosition:Q},ge={opacity:V,backgroundImage:`url( ${x} )`,backgroundPosition:Q},ce={opacity:V,objectPosition:te},re={opacity:V,objectPosition:te},de={opacity:V,backgroundImage:`url( ${k} )`,backgroundPosition:te};return(0,l.jsxs)(L,{...c.useBlockProps.save({className:M,style:ae}),children:[E&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--lg"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),K&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:le,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:oe})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:oe})),W&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:se})]}),Y&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--md"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),q&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:me})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:me})),J&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:ne})]}),ee&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--sm"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),Z&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:de,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:re})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:re})),X&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:ce})]}),(0,l.jsxs)("div",{className:B,children:[z&&U&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),z&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),z&&F&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskColor2:D,maskColorAngle:V,maskOpacity:R,textColor:S,parallax:O,isSlim:L}=e,M=a,A=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${P}`,`smb-section-with-bgimage--${T}`,t,{"js-bg-parallax":!!O}),B=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!O}),z=g()("c-container",{"u-slim-width":!!L}),U="video"===b,F="image"===b||void 0===b,H=!!r,W=h&&!O?`${100*h.x}% ${100*h.y}%`:void 0,K="video"===y,E="image"===y||void 0===y,G=!!x,J=w&&!O?`${100*w.x}% ${100*w.y}%`:void 0,q="video"===f,Y="image"===f||void 0===f,Q=!!k,X=C&&!O?`${100*C.x}% ${100*C.y}%`:void 0,Z={color:S||void 0},ee={};$&&(ee.backgroundColor=$,D&&(ee.backgroundImage=`linear-gradient(${V}deg, ${$} 0%, ${D} 100%)`));const te={opacity:R,objectPosition:W},ae={opacity:R,objectPosition:W},ie={opacity:R,backgroundImage:`url( ${r} )`,backgroundPosition:W},se={opacity:R,objectPosition:J},oe={opacity:R,objectPosition:J},le={opacity:R,backgroundImage:`url( ${x} )`,backgroundPosition:J},ne={opacity:R,objectPosition:X},me={opacity:R,objectPosition:X},ge={opacity:R,backgroundImage:`url( ${k} )`,backgroundPosition:X};return(0,l.jsxs)(M,{...c.useBlockProps.save({className:A,style:Z}),children:[H&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--lg"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),F&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ie,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:ae})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:ae})),U&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:te})]}),G&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--md"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),E&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:le,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:oe})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:oe})),K&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:se})]}),Q&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--sm"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),Y&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:me})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:me})),q&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:ne})]}),(0,l.jsxs)("div",{className:z,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0}},supports:{align:["wide","full"]},migrate(e){let t;return e.maskColor2&&(t=`linear-gradient(${e.maskColorAngle}deg, ${ae()(e.maskColor)} 0%, ${ae()(e.maskColor2)} 100%)`,e.maskColor=void 0),{...e,maskGradientColor:t}},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskColor2:D,maskColorAngle:V,maskOpacity:R,textColor:S,parallax:O,isSlim:L}=e,M=a,A=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${P}`,`smb-section-with-bgimage--${T}`,t,{"js-bg-parallax":!!O}),B=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!O}),z=g()("c-container",{"u-slim-width":!!L}),U="video"===b,F="image"===b||void 0===b,H=!!r,W=h&&!O?`${100*h.x}% ${100*h.y}%`:void 0,K="video"===y,E="image"===y||void 0===y,G=!!x,J=w&&!O?`${100*w.x}% ${100*w.y}%`:void 0,q="video"===f,Y="image"===f||void 0===f,Q=!!k,X=C&&!O?`${100*C.x}% ${100*C.y}%`:void 0,Z={color:S||void 0},ee={};$&&(ee.backgroundColor=$,D&&(ee.backgroundImage=`linear-gradient(${V}deg, ${$} 0%, ${D} 100%)`));const te={opacity:R,objectPosition:W},ae={opacity:R,objectPosition:W},ie={opacity:R,backgroundImage:`url( ${r} )`,backgroundPosition:W},se={opacity:R,objectPosition:J},oe={opacity:R,objectPosition:J},le={opacity:R,backgroundImage:`url( ${x} )`,backgroundPosition:J},ne={opacity:R,objectPosition:X},me={opacity:R,objectPosition:X},ge={opacity:R,backgroundImage:`url( ${k} )`,backgroundPosition:X};return(0,l.jsxs)(M,{...c.useBlockProps.save({className:A,style:Z}),children:[H&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--lg"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),F&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ie,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:ae})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:ae})),U&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:te})]}),G&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--md"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),E&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:le,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:oe})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:oe})),K&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:se})]}),Q&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--sm"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),Y&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:me})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:me})),q&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:ne})]}),(0,l.jsxs)("div",{className:z,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,mdImageID:h,mdImageURL:p,mdImageAlt:x,mdImageMediaType:_,mdImageRepeat:y,smImageID:v,smImageURL:w,smImageAlt:j,smImageMediaType:k,smImageRepeat:I,height:f,contentsAlignment:N,maskColor:C,maskColor2:T,maskColorAngle:P,maskOpacity:$,textColor:D,parallax:V,isSlim:R}=e,S=a,O=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${N}`,`smb-section-with-bgimage--${f}`,t,{"js-bg-parallax":!!V}),L=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!V}),M=g()("c-container",{"u-slim-width":!!R}),A={color:D||void 0},B={};C&&(B.backgroundColor=C,T&&(B.backgroundImage=`linear-gradient(${P}deg, ${C} 0%, ${T} 100%)`));const z={opacity:$};return(0,l.jsxs)(S,{className:O,style:A,children:[r&&(0,l.jsxs)("div",{className:g()(L,"smb-section-with-bgimage__bgimage--lg"),children:[0<Math.abs(1-$)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:B}),("image"===b||void 0===b)&&u&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:{backgroundImage:`url( ${r} )`},children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:z})}),("image"===b||void 0===b)&&!u&&(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:z}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:z})]}),p&&(0,l.jsxs)("div",{className:g()(L,"smb-section-with-bgimage__bgimage--md"),children:[0<Math.abs(1-$)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:B}),("image"===_||void 0===_)&&y&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:{backgroundImage:`url( ${p} )`},children:(0,l.jsx)("img",{src:p,alt:x,className:`wp-image-${h}`,style:z})}),("image"===_||void 0===_)&&!y&&(0,l.jsx)("img",{src:p,alt:x,className:`wp-image-${h}`,style:z}),"video"===_&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:p,style:z})]}),w&&(0,l.jsxs)("div",{className:g()(L,"smb-section-with-bgimage__bgimage--sm"),children:[0<Math.abs(1-$)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:B}),("image"===k||void 0===k)&&I&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:{backgroundImage:`url( ${w} )`},children:(0,l.jsx)("img",{src:w,alt:j,className:`wp-image-${v}`,style:z})}),("image"===k||void 0===k)&&!I&&(0,l.jsx)("img",{src:w,alt:j,className:`wp-image-${v}`,style:z}),"video"===k&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:w,style:z})]}),(0,l.jsxs)("div",{className:M,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0},textColor:{type:"string",default:"#fff"}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageMediaType:x,smImageID:_,smImageURL:y,smImageAlt:v,smImageMediaType:w,height:j,contentsAlignment:k,maskColor:I,maskColor2:f,maskColorAngle:N,maskOpacity:C,textColor:T,parallax:P,isSlim:$}=e,D=a,V=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${k}`,`smb-section-with-bgimage--${j}`,t,{"js-bg-parallax":!!P}),R=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!P}),S=g()("c-container",{"u-slim-width":!!$}),O={color:T||void 0},L={};I&&(L.backgroundColor=I,f&&(L.backgroundImage=`linear-gradient(${N}deg, ${I} 0%, ${f} 100%)`));const M={opacity:C};return(0,l.jsxs)(D,{className:V,style:O,children:[r&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--lg"),children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:L}),("image"===b||void 0===b)&&(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:M}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:M})]}),h&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--md"),children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:L}),("image"===x||void 0===x)&&(0,l.jsx)("img",{src:h,alt:p,className:`wp-image-${u}`,style:M}),"video"===x&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,style:M})]}),y&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--sm"),children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:L}),("image"===w||void 0===w)&&(0,l.jsx)("img",{src:y,alt:v,className:`wp-image-${_}`,style:M}),"video"===w&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:y,style:M})]}),(0,l.jsxs)("div",{className:S,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageMediaType:x,smImageID:_,smImageURL:y,smImageAlt:v,smImageMediaType:w,height:j,contentsAlignment:k,maskColor:I,maskColor2:f,maskColorAngle:N,maskOpacity:C,textColor:T,parallax:P,isSlim:$}=e,D=a,V=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${k}`,`smb-section-with-bgimage--${j}`,t,{"js-bg-parallax":!!P}),R=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!P}),S=g()("c-container",{"u-slim-width":!!$}),O={color:T||void 0},L={};I&&(L.backgroundColor=I,f&&(L.backgroundImage=`linear-gradient(${N}deg, ${I} 0%, ${f} 100%)`));const M={opacity:C};return(0,l.jsxs)(D,{className:V,style:O,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:L}),r&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--lg"),style:M,children:[("image"===b||void 0===b)&&(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:r})]}),h&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--md"),style:M,children:[("image"===x||void 0===x)&&(0,l.jsx)("img",{src:h,alt:p,className:`wp-image-${u}`}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:h})]}),y&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--sm"),style:M,children:[("image"===w||void 0===w)&&(0,l.jsx)("img",{src:y,alt:v,className:`wp-image-${_}`}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:y})]}),(0,l.jsxs)("div",{className:S,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0}},migrate(e){const t=e.imageID,a=e.imageURL,i=e.imageAlt;return{...e,lgImageID:t,lgImageURL:a,lgImageAlt:i}},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,imageID:o,imageURL:n,imageAlt:m,height:r,contentsAlignment:d,maskColor:b,maskColor2:u,maskColorAngle:h,maskOpacity:p,textColor:x,parallax:_,isSlim:y}=e,v=a,w=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${d}`,`smb-section-with-bgimage--${r}`,t,{"js-bg-parallax":!!_}),j=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!_}),k=g()("c-container",{"u-slim-width":!!y}),I={color:x||void 0},f={};b&&(f.backgroundColor=b,u&&(f.backgroundImage=`linear-gradient(${h}deg, ${b} 0%, ${u} 100%)`));const N={opacity:p};return(0,l.jsxs)(v,{className:w,style:I,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:f}),n&&(0,l.jsx)("div",{className:j,style:N,children:(0,l.jsx)("img",{src:n,alt:m,className:`wp-image-${o}`})}),(0,l.jsxs)("div",{className:k,children:[!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{titleTagName:a,title:i,imageID:s,imageURL:o,imageAlt:n,height:m,contentsAlignment:r,maskColor:d,maskOpacity:b,textColor:u,parallax:h,isSlim:p}=e,x=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${r}`,`smb-section-with-bgimage--${m}`,t,{"js-bg-parallax":!!h}),_=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!h}),y=g()("c-container",{"u-slim-width":!!p}),v={color:u||void 0},w={backgroundColor:d||void 0},j={opacity:b};return(0,l.jsxs)("div",{className:x,style:v,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:w}),(0,l.jsx)("div",{className:_,style:j,children:(0,l.jsx)("img",{src:o,alt:n,className:`wp-image-${s}`})}),(0,l.jsxs)("div",{className:y,children:[!c.RichText.isEmpty(i)&&"none"!==a&&(0,l.jsx)(c.RichText.Content,{tagName:a,className:"smb-section__title",value:i}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},migrate(e){const t=!!e.contentsWidth;return{...e,isSlim:t}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{titleTagName:a,title:i,imageID:s,imageURL:o,imageAlt:n,height:m,contentsAlignment:r,maskColor:d,maskOpacity:b,textColor:u,parallax:h,contentsWidth:p}=e,x=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${r}`,`smb-section-with-bgimage--${m}`,t,{"js-bg-parallax":!!h}),_=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!h}),y=g()("c-container",{"u-slim-width":!!p}),v={color:u||void 0},w={backgroundColor:d||void 0},j={opacity:b};return(0,l.jsxs)("div",{className:x,style:v,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:w}),(0,l.jsx)("div",{className:_,style:j,children:(0,l.jsx)("img",{src:o,alt:n,className:`wp-image-${s}`})}),(0,l.jsxs)("div",{className:y,children:[!c.RichText.isEmpty(i)&&"none"!==a&&(0,l.jsx)(c.RichText.Content,{tagName:a,className:"smb-section__title",value:i}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e}){const{title:t,imageID:a,imageURL:i,height:s,contentsAlignment:o,maskColor:n,maskOpacity:m,textColor:r,parallax:d}=e;return(0,l.jsxs)("div",{className:g()(`smb-section smb-section-with-bgimage smb-section-with-bgimage--${o} smb-section-with-bgimage--${s}`,{"js-bg-parallax":!!d}),style:{color:r},children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:{backgroundColor:n}}),(0,l.jsx)("div",{className:g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!d}),style:{opacity:m},children:(0,l.jsx)("img",{src:i,alt:"",className:`wp-image-${a}`})}),(0,l.jsxs)("div",{className:"c-container",children:[!c.RichText.isEmpty(t)&&(0,l.jsx)("h2",{className:"smb-section__title",children:(0,l.jsx)(c.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...(0,u.omit)(se,["textColor","parallax"])},supports:{align:["wide","full"]},save({attributes:e}){const{title:t,imageID:a,imageURL:i,height:s,contentsAlignment:o,maskColor:n,maskOpacity:m}=e;return(0,l.jsxs)("div",{className:`smb-section smb-section-with-bgimage smb-section-with-bgimage--${o} smb-section-with-bgimage--${s}`,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:{backgroundColor:n}}),(0,l.jsx)("div",{className:"smb-section-with-bgimage__bgimage",style:{opacity:m},children:(0,l.jsx)("img",{src:i,alt:"",className:`wp-image-${a}`})}),(0,l.jsxs)("div",{className:"c-container",children:[!c.RichText.isEmpty(t)&&(0,l.jsx)("h2",{className:"smb-section__title",children:(0,l.jsx)(c.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...(0,u.omit)(se,["textColor","parallax"])},supports:{align:["wide","full"]},save({attributes:e}){const{title:t,imageURL:a,height:i,contentsAlignment:s,maskColor:o,maskOpacity:n}=e;return(0,l.jsxs)("div",{className:`smb-section smb-section-with-bgimage smb-section-with-bgimage--${s} smb-section-with-bgimage--${i}`,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:{backgroundColor:o}}),(0,l.jsx)("div",{className:"smb-section-with-bgimage__bgimage",style:{opacity:n},children:(0,l.jsx)("img",{src:a,alt:""})}),(0,l.jsxs)("div",{className:"c-container",children:[!c.RichText.isEmpty(t)&&(0,l.jsx)("h2",{className:"smb-section__title",children:(0,l.jsx)(c.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...(0,u.omit)(se,["maskColor","maskOpacity","textColor","parallax"])},supports:{align:["wide","full"]},save({attributes:e}){const{title:t,imageURL:a,height:i,contentsAlignment:s}=e;return(0,l.jsxs)("div",{className:`smb-section smb-section-with-bgimage smb-section-with-bgimage--${s} smb-section-with-bgimage--${i}`,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__bgimage",children:a&&(0,l.jsx)("img",{src:a,alt:""})}),(0,l.jsxs)("div",{className:"c-container",children:[!c.RichText.isEmpty(t)&&(0,l.jsx)("h2",{className:"smb-section__title",children:(0,l.jsx)(c.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}}],ne={to:[{type:"block",blocks:["snow-monkey-blocks/section"],transform:(e,t)=>(0,i.createBlock)("snow-monkey-blocks/section",e,t)},{type:"block",blocks:["snow-monkey-blocks/section-break-the-grid"],transform:(e,t)=>(e.imageID=e.lgImageID||e.mdImageID||e.smImageID,e.imageURL=e.lgImageURL||e.mdImageURL||e.smImageURL,e.imageAlt=e.lgImageAlt||e.mdImageAlt||e.smImageAlt,e.imageWidth=e.lgImageWidth||e.mdImageWidth||e.smImageWidth,e.imageHeight=e.lgImageHeight||e.mdImageHeight||e.smImageHeight,e.imageMediaType=e.lgImageMediaType||e.mdImageMediaType||e.smImageMediaType,(0,i.createBlock)("snow-monkey-blocks/section-break-the-grid",e,t))},{type:"block",blocks:["snow-monkey-blocks/section-side-heading"],transform:(e,t)=>(0,i.createBlock)("snow-monkey-blocks/section-side-heading",e,t)}]},me={attributes:{title:"Lorem ipsum dolor sit amet",imageID:1,imageURL:`${smb.pluginUrl}/dist/img/photos/dist/img/photos/stocksnap_lgg8nat9jy.jpg`,maskColor:"#000",maskOpacity:.7},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"}}]};(0,i.registerBlockType)(o.UU,{icon:{foreground:"#cd162c",src:n},keywords:[(0,s.__)("Outer","snow-monkey-blocks"),(0,s.__)("Wrapper","snow-monkey-blocks"),(0,s.__)("Container","snow-monkey-blocks"),(0,s.__)("Main visual","snow-monkey-blocks"),(0,s.__)("Image","snow-monkey-blocks"),(0,s.__)("Header image","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:t,isSelected:a,className:i,clientId:n}){const{align:m,lgImageID:u,lgImageURL:h,lgImageAlt:p,lgImageWidth:x,lgImageHeight:_,lgImageMediaType:y,lgImageRepeat:w,lgFocalPoint:k,lgImageSizeSlug:f,mdImageID:C,mdImageURL:P,mdImageAlt:D,mdImageWidth:V,mdImageHeight:R,mdImageMediaType:S,mdImageRepeat:L,mdFocalPoint:M,mdImageSizeSlug:A,smImageID:B,smImageURL:z,smImageAlt:U,smImageWidth:F,smImageHeight:W,smImageMediaType:K,smImageRepeat:E,smFocalPoint:te,smImageSizeSlug:ae,contentsAlignment:ie,maskColor:se,maskGradientColor:oe,maskOpacity:le,textColor:ne,parallax:me,contentJustification:ge,itemsAlignment:ce,title:re,subtitle:de,lede:be,wrapperTagName:ue,titleTagName:he,height:pe,disableCustomHeight:xe,containerAlign:_e,disableContainerPadding:ye,contentsMaxWidth:ve,isSlim:we,topDividerType:je,topDividerLevel:ke,topDividerColor:Ie,topDividerVerticalPosition:fe,topDividerOverlay:Ne,bottomDividerType:Ce,bottomDividerLevel:Te,bottomDividerColor:Pe,bottomDividerVerticalPosition:$e,bottomDividerOverlay:De,backgroundText:Ve,templateLock:Re}=e,Se=(0,d.useSelect)((e=>!!e("core/block-editor").getBlock(n)?.innerBlocks?.length),[n]),Oe=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),{lgImage:Le,mdImage:Me,smImage:Ae}=(0,d.useSelect)((e=>{const{get Media:t}=e("core");return{lgImage:u?t(u,{context:"view"}):null,mdImage:C?t(C,{context:"view"}):null,smImage:B?t(B,{context:"view"}):null}}),[u,C,B]),Be=Oe.filter((({slug:e})=>Le?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),ze=Oe.filter((({slug:e})=>Me?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),Ue=Oe.filter((({slug:e})=>Ae?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),Fe=ue,He="fit"!==pe,We=g()("smb-section","smb-section-with-bgimage",i,{[`smb-section--${ie}`]:!!ie,[`smb-section--${pe}`]:!!pe&&xe,[`is-items-alignment-${ce}`]:!!ce&&He,"smb-section--top-divider-no-overlay":!Ne,"smb-section--bottom-divider-no-overlay":!De,"js-bg-parallax":!!me}),Ke=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!me}),Ee=g()("smb-section__inner",{[`is-content-justification-${ge}`]:!!ge}),Ge=g()("c-container",{alignfull:("full"===_e||"contents-full"===_e)&&"full"===m,alignwide:"wide"===_e||"contents-wide"===_e&&"full"===m,"c-container--no-padding":ye});let Je=Ge.replace("c-container--no-padding","").trim();"contents-wide"!==_e&&"contents-full"!==_e||(Je=Je.replace("alignfull","").replace("alignwide","").trim());const qe=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${ie}`]:!!ie,"u-slim-width":we&&!ve}),Ye=0<Number((1-le).toFixed(1)),Qe="video"===y,Xe="image"===y||void 0===y,Ze=!!h,et=Qe||Xe&&Ze&&!me,tt=k&&!me?`${100*k.x}% ${100*k.y}%`:void 0,at="video"===S,it="image"===S||void 0===S,st=!!P,ot=at||it&&st&&!me,lt=M&&!me?`${100*M.x}% ${100*M.y}%`:void 0,nt="video"===K,mt="image"===K||void 0===K,gt=!!z,ct=nt||mt&>&&!me,rt=te&&!me?`${100*te.x}% ${100*te.y}%`:void 0,dt={"--smb-section--color":ne||void 0,"--smb-section--contents-wrapper-width":ve&&!we?ve:void 0,"--smb-section--min-height":pe&&!xe?pe:void 0,"--smb-section-with-bgimage--mask-color":se||void 0,"--smb-section-with-bgimage--mask-image":oe||void 0,"--smb-section-with-bgimage--mask-opacity":String(le),"--smb-section-with-bgimage--lg-media-position":tt,"--smb-section-with-bgimage--lg-repeatable-image":w&&h?`url(${h})`:void 0,"--smb-section-with-bgimage--md-media-position":lt,"--smb-section-with-bgimage--md-repeatable-image":L&&P?`url(${P})`:void 0,"--smb-section-with-bgimage--sm-media-position":rt,"--smb-section-with-bgimage--sm-repeatable-image":E&&z?`url(${z})`:void 0,...Y({topDividerVerticalPosition:fe,topDividerLevel:ke,bottomDividerVerticalPosition:$e,bottomDividerLevel:Te,backgroundText:Ve})},bt=(0,c.useBlockProps)({className:We,style:dt}),ut=(0,c.useInnerBlocksProps)({className:["smb-section__body"]},{templateLock:Re,renderAppender:Se?void 0:c.InnerBlocks.ButtonBlockAppender}),ht=$(),[pt]=null!=c.useSettings?(0,c.useSettings)("typography.fontSizes"):[(0,c.useSetting)("typography.fontSizes")].filter(Boolean),xt={...Ve,position:{...Ve.position}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.InspectorControls,{group:"color",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:n,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:ne,onColorChange:e=>t({textColor:e}),resetAllFilter:()=>({textColor:o.uK.textColor?.default}),label:(0,s.__)("Text color","snow-monkey-blocks")}]})}),(0,l.jsxs)(c.InspectorControls,{children:[(0,l.jsx)(O,{disableIsSlim:!!ve,disableContentsMaxWidth:we,disableContainerAlign:"full"!==m,disableCustomHeight:xe,settings:[{wrapperTagNameValue:ue,onWrapperTagNameChange:e=>t({wrapperTagName:e}),defaultValue:o.uK.wrapperTagName.default},{titleTagNameValue:he,onTitleTagNameChange:e=>t({titleTagName:e}),defaultValue:o.uK.titleTagName.default},{heightValue:pe,onHeightChange:(e,a)=>t({height:e,disableCustomHeight:a}),defaultValue:o.uK.height.default,defaultDisableCustomHeightValue:o.uK.disableCustomHeight.default},{contentsContainerControl:!0,containerAlignValue:_e,onContainerAlignChange:e=>t({containerAlign:e}),defaultValue:o.uK.containerAlign.default},{disableContainerPaddingValue:ye,onDisableContainerPaddingChange:e=>t({disableContainerPadding:e}),defaultValue:o.uK.disableContainerPadding.default},{contentsMaxWidthValue:ve,onContentsMaxWidthChange:e=>t({contentsMaxWidth:e}),defaultValue:o.uK.contentsMaxWidth.default},{isSlimValue:we,onIsSlimChange:e=>t({isSlim:e}),defaultValue:o.uK.isSlim.default}]}),(0,l.jsxs)(r.__experimentalToolsPanel,{label:(0,s.__)("Media settings","snow-monkey-blocks"),dropdownMenuProps:ht,children:[(Ze||st||gt)&&(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>me!==o.uK.parallax.default,isShownByDefault:!0,label:(0,s.__)("Parallax (Deprecated)","snow-monkey-blocks"),onDeselect:()=>t({parallax:o.uK.parallax.default}),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Parallax (Deprecated)","snow-monkey-blocks"),checked:me,onChange:e=>t({parallax:e}),help:(0,s.__)("This setting is being retained for backwards compatibility and is not recommended for use. Its use may slow down the page display.","snow-monkey-blocks")})}),(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>w!==o.uK.lgImageRepeat.default||f!==o.uK.lgImageSizeSlug.default||k!==o.uK.lgFocalPoint.default||L!==o.uK.mdImageRepeat.default||A!==o.uK.mdImageSizeSlug.default||M!==o.uK.mdFocalPoint.default||E!==o.uK.smImageRepeat.default||ae!==o.uK.smImageSizeSlug.default||te!==o.uK.smFocalPoint.default,isShownByDefault:!0,label:(0,s.__)("Image settings","snow-monkey-blocks"),onDeselect:()=>t({lgImageRepeat:o.uK.lgImageRepeat.default,lgImageSizeSlug:o.uK.lgImageSizeSlug.default,lgFocalPoint:o.uK.lgFocalPoint.default,mdImageRepeat:o.uK.mdImageRepeat.default,mdImageSizeSlug:o.uK.mdImageSizeSlug.default,mdFocalPoint:o.uK.mdFocalPoint.default,smImageRepeat:o.uK.smImageRepeat.default,smImageSizeSlug:o.uK.smImageSizeSlug.default,smFocalPoint:o.uK.smFocalPoint.default}),children:(0,l.jsx)(b,{desktop:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"smb-image-size-control",children:(0,l.jsx)(v,{src:h,id:u,alt:p,width:x,height:_,onSelect:e=>{const a=e?.sizes?.[f]?f:Z,i=e?.sizes?.[a]?.url,s=e?.sizes?.[a]?.width,o=e?.sizes?.[a]?.height;t({lgImageURL:i||e.url,lgImageID:e.id,lgImageAlt:e.alt,lgImageWidth:s||e.width,lgImageHeight:o||e.height,lgImageMediaType:N(e),lgImageSizeSlug:a})},onSelectURL:e=>{e!==h&&t({lgImageURL:e,lgImageID:0,lgImageSizeSlug:Z,lgImageMediaType:N({media_type:T(e)?"video":"image"})})},onRemove:()=>t({lgImageURL:o.uK.lgImageURL.default,lgImageAlt:o.uK.lgImageAlt.default,lgImageWidth:o.uK.lgImageWidth.default,lgImageHeight:o.uK.lgImageHeight.default,lgImageID:o.uK.lgImageID.default,lgImageMediaType:o.uK.lgImageMediaType.default}),mediaType:y,allowedTypes:X})}),Ze&&Xe&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Repeat images","snow-monkey-blocks"),checked:w,onChange:e=>t({lgImageRepeat:e})}),(0,l.jsx)(j,{defaultValue:o.uK.lgImageSizeSlug.default,value:f,options:Be,onChange:e=>{const a=Le?.media_details?.sizes?.[e]?.source_url,i=Le?.media_details?.sizes?.[e]?.width,s=Le?.media_details?.sizes?.[e]?.height;t({lgImageURL:a,lgImageWidth:i,lgImageHeight:s,lgImageSizeSlug:e})},withToolsPanelItem:!1})]}),et&&(0,l.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Focal point picker","snow-monkey-blocks"),url:h,value:k,onChange:e=>{t({lgFocalPoint:e})}})]}),tablet:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"smb-image-size-control",children:(0,l.jsx)(v,{src:P,id:C,alt:D,width:V,height:R,onSelect:e=>{const a=e?.sizes?.[A]?A:Z,i=e?.sizes?.[a]?.url,s=e?.sizes?.[a]?.width,o=e?.sizes?.[a]?.height;t({mdImageURL:i||e.url,mdImageID:e.id,mdImageAlt:e.alt,mdImageWidth:s||e.width,mdImageHeight:o||e.height,mdImageMediaType:N(e),mdImageSizeSlug:a})},onSelectURL:e=>{e!==P&&t({mdImageURL:e,mdImageID:0,mdImageSizeSlug:Z,mdImageMediaType:N({media_type:T(e)?"video":"image"})})},onRemove:()=>t({mdImageURL:o.uK.mdImageURL.default,mdImageAlt:o.uK.mdImageAlt.default,mdImageWidth:o.uK.mdImageWidth.default,mdImageHeight:o.uK.mdImageHeight.default,mdImageID:o.uK.mdImageID.default,mdImageMediaType:o.uK.mdImageMediaType.default}),mediaType:S,allowedTypes:X})}),st&&it&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Repeat images","snow-monkey-blocks"),checked:L,onChange:e=>t({mdImageRepeat:e})}),(0,l.jsx)(j,{defaultValue:o.uK.mdImageSizeSlug.default,value:A,options:ze,onChange:e=>{const a=Me?.media_details?.sizes?.[e]?.source_url,i=Me?.media_details?.sizes?.[e]?.width,s=Me?.media_details?.sizes?.[e]?.height;t({mdImageURL:a,mdImageWidth:i,mdImageHeight:s,mdImageSizeSlug:e})},withToolsPanelItem:!1})]}),ot&&(0,l.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Focal point picker","snow-monkey-blocks"),url:P,value:M,onChange:e=>{t({lgFocalPoint:e})}})]}),mobile:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"smb-image-size-control",children:(0,l.jsx)(v,{src:z,id:B,alt:U,width:F,height:W,onSelect:e=>{const a=e?.sizes?.[ae]?ae:Z,i=e?.sizes?.[a]?.url,s=e?.sizes?.[a]?.width,o=e?.sizes?.[a]?.height;t({smImageURL:i||e.url,smImageID:e.id,smImageAlt:e.alt,smImageWidth:s||e.width,smImageHeight:o||e.height,smImageMediaType:N(e),smImageSizeSlug:a})},onSelectURL:e=>{e!==z&&t({smImageURL:e,smImageID:0,smImageSizeSlug:Z,smImageMediaType:N({media_type:T(e)?"video":"image"})})},onRemove:()=>t({smImageURL:o.uK.smImageURL.default,smImageAlt:o.uK.smImageAlt.default,smImageWidth:o.uK.smImageWidth.default,smImageHeight:o.uK.smImageHeight.default,smImageID:o.uK.smImageID.default,smImageMediaType:o.uK.smImageMediaType.default}),mediaType:K,allowedTypes:X})}),gt&&mt&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Repeat images","snow-monkey-blocks"),checked:E,onChange:e=>t({smImageRepeat:e})}),(0,l.jsx)(j,{defaultValue:o.uK.smImageSizeSlug.default,value:ae,options:Ue,onChange:e=>{const a=Ae?.media_details?.sizes?.[e]?.source_url,i=Ae?.media_details?.sizes?.[e]?.width,s=Ae?.media_details?.sizes?.[e]?.height;t({smImageURL:a,smImageWidth:i,smImageHeight:s,smImageSizeSlug:e})},withToolsPanelItem:!1})]}),ct&&(0,l.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Focal point picker","snow-monkey-blocks"),url:z,value:te,onChange:e=>{t({lgFocalPoint:e})}})]})})})]}),(0,l.jsxs)(r.__experimentalToolsPanel,{label:(0,s.__)("Overlay","snow-monkey-blocks"),dropdownMenuProps:ht,children:[(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Color","snow-monkey-blocks"),colorValue:se,gradientValue:oe,onColorChange:e=>t({maskColor:e}),onGradientChange:e=>t({maskGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,c.__experimentalUseMultipleOriginColorsAndGradients)()})}),(!!se||!!oe)&&(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>le!==o.uK.maskOpacity.default,isShownByDefault:!0,label:(0,s.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>t({maskOpacity:o.uK.maskOpacity.default}),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Opacity","snow-monkey-blocks"),value:Number((1-le).toFixed(1)),onChange:e=>t({maskOpacity:I((1-e).toFixed(1),0,1)}),min:0,max:1,step:.1})})]}),(0,l.jsx)(q,{settings:[{textValue:Ve.text,onTextChange:e=>{xt.text=e,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.text},{fontSizeValue:Ve.fontSize,onFontSizeChange:e=>{const a=pt.filter((t=>!!t?.size&&e===t?.size));xt.fontSize=e,xt.fontSizeSlug=0<a.length&&a[0]?.slug?a[0].slug:"",t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.fontSize},{lineHeightValue:Ve.lineHeight,onLineHeightChange:e=>{xt.lineHeight=e,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.lineHeight},{colorValue:Ve.color,onColorChange:e=>{xt.color=e,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.color},{opacityValue:Ve.opacity,onOpacityChange:e=>{xt.opacity=e,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.opacity},{positionValue:Ve.position,onPositionChange:e=>{xt.position.top=null!=e?.top&&e?.top.match(/^\d+$/)?`${e?.top}px`:e?.top,xt.position.right=null!=e?.right&&e?.right.match(/^\d+$/)?`${e?.right}px`:e?.right,xt.position.bottom=null!=e?.bottom&&e?.bottom.match(/^\d+$/)?`${e?.bottom}px`:e?.bottom,xt.position.left=null!=e?.left&&e?.left.match(/^\d+$/)?`${e?.left}px`:e?.left,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.position}]}),(0,l.jsx)(G,{settings:[{typeValue:je,onTypeChange:e=>t({topDividerType:e}),defaultValue:o.uK.topDividerType.default},{levelValue:ke,onLevelChange:e=>t({topDividerLevel:I(e,-100,100)}),defaultValue:o.uK.topDividerLevel.default},{colorValue:Ie,onColorChange:e=>t({topDividerColor:e}),defaultColorValue:o.uK.topDividerColor.default},{verticalPositionValue:fe,onVerticalPositionChange:e=>t({topDividerVerticalPosition:e}),defaultValue:o.uK.topDividerVerticalPosition.default},{overlayValue:Ne,onOverlayChange:e=>t({topDividerOverlay:e}),defaultValue:o.uK.topDividerOverlay.default}]}),(0,l.jsx)(J,{settings:[{typeValue:Ce,onTypeChange:e=>t({bottomDividerType:e}),defaultValue:o.uK.bottomDividerType.default},{levelValue:Te,onLevelChange:e=>t({bottomDividerLevel:I(e,-100,100)}),defaultValue:o.uK.bottomDividerLevel.default},{colorValue:Pe,onColorChange:e=>t({bottomDividerColor:e}),defaultColorValue:o.uK.bottomDividerColor.default},{verticalPositionValue:$e,onVerticalPositionChange:e=>t({bottomDividerVerticalPosition:e}),defaultValue:o.uK.bottomDividerVerticalPosition.default},{overlayValue:De,onOverlayChange:e=>t({bottomDividerOverlay:e}),defaultValue:o.uK.bottomDividerOverlay.default}]})]}),(0,l.jsxs)(c.BlockControls,{group:"block",children:[He&&(0,l.jsx)(c.BlockVerticalAlignmentToolbar,{onChange:e=>t({itemsAlignment:e}),value:ce}),(0,l.jsx)(c.JustifyToolbar,{allowedControls:ee,onChange:e=>t({contentJustification:e}),value:ge}),(0,l.jsx)(c.AlignmentToolbar,{value:ie,onChange:e=>t({contentsAlignment:e})})]}),(0,l.jsxs)(Fe,{...bt,children:[Ze&&(0,l.jsxs)("div",{className:g()(Ke,"smb-section-with-bgimage__bgimage--lg"),children:[Ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),Xe&&(w?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})}):(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})),Qe&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,width:x,height:_})]}),st&&(0,l.jsxs)("div",{className:g()(Ke,"smb-section-with-bgimage__bgimage--md"),children:[Ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),it&&(L?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:P,alt:D,width:V,height:R,className:`wp-image-${C}`})}):(0,l.jsx)("img",{src:P,alt:D,width:V,height:R,className:`wp-image-${C}`})),at&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:P,width:V,height:R})]}),gt&&(0,l.jsxs)("div",{className:g()(Ke,"smb-section-with-bgimage__bgimage--sm"),children:[Ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),mt&&(E?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:z,alt:U,width:F,height:W,className:`wp-image-${B}`})}):(0,l.jsx)("img",{src:z,alt:U,width:F,height:W,className:`wp-image-${B}`})),nt&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:z,width:F,height:W})]}),(0,l.jsx)(Q,{topDividerType:je,topDividerLevel:ke,topDividerColor:Ie,bottomDividerType:Ce,bottomDividerLevel:Te,bottomDividerColor:Pe,backgroundText:Ve,containerClasses:Ge}),(0,l.jsx)("div",{className:Ee,children:(0,l.jsx)("div",{className:Ge,children:(0,l.jsxs)("div",{className:qe,children:[(0,l.jsx)(H,{isSelected:a,hasContainer:ye&&"full"===_e&&"full"===m||"contents-wide"===_e||"contents-full"===_e,containerClassName:Je,settings:[{subtitleValue:de,onSubtitleChange:e=>t({subtitle:e})},{titleTagNameValue:he,titleValue:re,onTitleChange:e=>t({title:e})},{ledeValue:be,onLedeChange:e=>t({lede:e})}]}),(0,l.jsx)("div",{...ut})]})})})]})]})},save:function({attributes:e,className:t}){const{align:a,lgImageID:i,lgImageURL:s,lgImageAlt:o,lgImageWidth:n,lgImageHeight:m,lgImageMediaType:r,lgImageRepeat:d,lgFocalPoint:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageWidth:x,mdImageHeight:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageWidth:f,smImageHeight:N,smImageMediaType:C,smImageRepeat:T,smFocalPoint:P,contentsAlignment:$,maskColor:D,maskGradientColor:V,maskOpacity:R,textColor:S,parallax:O,contentJustification:L,itemsAlignment:M,title:A,subtitle:B,lede:z,wrapperTagName:U,titleTagName:F,height:H,disableCustomHeight:W,containerAlign:E,disableContainerPadding:G,contentsMaxWidth:J,isSlim:q,topDividerType:X,topDividerLevel:Z,topDividerColor:ee,topDividerVerticalPosition:te,topDividerOverlay:ae,bottomDividerType:ie,bottomDividerLevel:se,bottomDividerColor:oe,bottomDividerVerticalPosition:le,bottomDividerOverlay:ne,backgroundText:me}=e,ge=U,ce="fit"!==H,re=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${$}`]:!!$,[`smb-section--${H}`]:!!H&&W,[`is-items-alignment-${M}`]:!!M&&ce,"smb-section--top-divider-no-overlay":!ae,"smb-section--bottom-divider-no-overlay":!ne,"js-bg-parallax":!!O}),de=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!O}),be=g()("smb-section__inner",{[`is-content-justification-${L}`]:!!L}),ue=g()("c-container",{alignfull:("full"===E||"contents-full"===E)&&"full"===a,alignwide:"wide"===E||"contents-wide"===E&&"full"===a,"c-container--no-padding":G});let he=ue.replace("c-container--no-padding","").trim();"contents-wide"!==E&&"contents-full"!==E||(he=he.replace("alignfull","").replace("alignwide","").trim());const pe=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${$}`]:!!$,"u-slim-width":q&&!J}),xe=0<Number((1-R).toFixed(1)),_e="video"===r,ye="image"===r||void 0===r,ve=!!s,we=b&&!O?`${100*b.x}% ${100*b.y}%`:void 0,je="video"===y,ke="image"===y||void 0===y,Ie=!!h,fe=w&&!O?`${100*w.x}% ${100*w.y}%`:void 0,Ne="video"===C,Ce="image"===C||void 0===C,Te=!!k,Pe=P&&!O?`${100*P.x}% ${100*P.y}%`:void 0,$e={"--smb-section--color":S||void 0,"--smb-section--contents-wrapper-width":J&&!q?J:void 0,"--smb-section--min-height":H&&!W?H:void 0,"--smb-section-with-bgimage--mask-color":D||void 0,"--smb-section-with-bgimage--mask-image":V||void 0,"--smb-section-with-bgimage--mask-opacity":String(R),"--smb-section-with-bgimage--lg-media-position":we,"--smb-section-with-bgimage--lg-repeatable-image":d&&s?`url(${s})`:void 0,"--smb-section-with-bgimage--md-media-position":fe,"--smb-section-with-bgimage--md-repeatable-image":v&&h?`url(${h})`:void 0,"--smb-section-with-bgimage--sm-media-position":Pe,"--smb-section-with-bgimage--sm-repeatable-image":T&&k?`url(${k})`:void 0,...Y({topDividerVerticalPosition:te,topDividerLevel:Z,bottomDividerVerticalPosition:le,bottomDividerLevel:se,backgroundText:me})};return(0,l.jsxs)(ge,{...c.useBlockProps.save({className:re,style:$e}),children:[ve&&(0,l.jsxs)("div",{className:g()(de,"smb-section-with-bgimage__bgimage--lg"),children:[xe&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),ye&&(d?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})}):(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})),_e&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:s,width:n,height:m})]}),Ie&&(0,l.jsxs)("div",{className:g()(de,"smb-section-with-bgimage__bgimage--md"),children:[xe&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),ke&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})}):(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})),je&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,width:x,height:_})]}),Te&&(0,l.jsxs)("div",{className:g()(de,"smb-section-with-bgimage__bgimage--sm"),children:[xe&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),Ce&&(T?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})}):(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})),Ne&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,width:f,height:N})]}),(0,l.jsx)(Q,{topDividerType:X,topDividerLevel:Z,topDividerColor:ee,bottomDividerType:ie,bottomDividerLevel:se,bottomDividerColor:oe,backgroundText:me,containerClasses:ue}),(0,l.jsx)("div",{className:be,children:(0,l.jsx)("div",{className:ue,children:(0,l.jsxs)("div",{className:pe,children:[(0,l.jsx)(K,{title:A,titleTagName:F,subtitle:B,lede:z,hasContainer:G&&"full"===E&&"full"===a||"contents-wide"===E||"contents-full"===E,containerClassName:he}),(0,l.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-section__body"})})]})})})]})},deprecated:le,transforms:ne,example:me})},3558:e=>{"use strict";var t=function(e){return parseInt(e,16)};e.exports=function(e,a){var i,s,o=function(e){return"#"===e.charAt(0)?e.slice(1):e}(e),l=function(e){var a=e.g,i=e.b,s=e.a;return{r:t(e.r),g:t(a),b:t(i),a:+(t(s)/255).toFixed(2)}}({r:(s=3===(i=o).length||4===i.length)?"".concat(i.slice(0,1)).concat(i.slice(0,1)):i.slice(0,2),g:s?"".concat(i.slice(1,2)).concat(i.slice(1,2)):i.slice(2,4),b:s?"".concat(i.slice(2,3)).concat(i.slice(2,3)):i.slice(4,6),a:(s?"".concat(i.slice(3,4)).concat(i.slice(3,4)):i.slice(6,8))||"ff"});return function(e,t){var a,i=e.r,s=e.g,o=e.b,l=e.a,n=(a=t,!isNaN(parseFloat(a))&&isFinite(a)?t:l);return"rgba(".concat(i,", ").concat(s,", ").concat(o,", ").concat(n,")")}(l,a)}},6942:(e,t)=>{var a;!function(){"use strict";var i={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=l(e,o(a)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var a in e)i.call(e,a)&&e[a]&&(t=l(t,a));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(a=function(){return s}.apply(t,[]))||(e.exports=a)}()}},a={};function i(e){var s=a[e];if(void 0!==s)return s.exports;var o=a[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.m=t,e=[],i.O=(t,a,s,o)=>{if(!a){var l=1/0;for(c=0;c<e.length;c++){for(var[a,s,o]=e[c],n=!0,m=0;m<a.length;m++)(!1&o||l>=o)&&Object.keys(i.O).every((e=>i.O[e](a[m])))?a.splice(m--,1):(n=!1,o<l&&(l=o));if(n){e.splice(c--,1);var g=s();void 0!==g&&(t=g)}}return t}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,s,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={79:0,6199:0};i.O.j=t=>0===e[t];var t=(t,a)=>{var s,o,[l,n,m]=a,g=0;if(l.some((t=>0!==e[t]))){for(s in n)i.o(n,s)&&(i.m[s]=n[s]);if(m)var c=m(i)}for(t&&t(a);g<l.length;g++)o=l[g],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(c)},a=globalThis.webpackChunk=globalThis.webpackChunk||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var s=i.O(void 0,[6199],(()=>i(5240)));s=i.O(s)})();1 (()=>{var e,t={5240:(e,t,a)=>{"use strict";const i=window.wp.blocks,s=window.wp.i18n,o=JSON.parse('{"UU":"snow-monkey-blocks/section-with-bgimage","uK":{"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage > img","attribute":"alt","default":""},"lgImageID":{"type":"number","default":0},"lgImageURL":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--lg img, .smb-section-with-bgimage__bgimage--lg video","attribute":"src","default":""},"lgImageAlt":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--lg img","attribute":"alt","default":""},"lgImageWidth":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--lg img, .smb-section-with-bgimage__bgimage--lg video","attribute":"width","default":""},"lgImageHeight":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--lg img, .smb-section-with-bgimage__bgimage--lg video","attribute":"height","default":""},"lgImageMediaType":{"type":"string"},"lgImageRepeat":{"type":"boolean","default":false},"lgFocalPoint":{"type":"object"},"lgImageSizeSlug":{"type":"string","default":"full"},"mdImageID":{"type":"number","default":0},"mdImageURL":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--md img, .smb-section-with-bgimage__bgimage--md video","attribute":"src","default":""},"mdImageAlt":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--md img","attribute":"alt","default":""},"mdImageWidth":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--md img, .smb-section-with-bgimage__bgimage--md video","attribute":"width","default":""},"mdImageHeight":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--md img, .smb-section-with-bgimage__bgimage--md video","attribute":"height","default":""},"mdImageMediaType":{"type":"string"},"mdImageRepeat":{"type":"boolean","default":false},"mdFocalPoint":{"type":"object"},"mdImageSizeSlug":{"type":"string","default":"full"},"smImageID":{"type":"number","default":0},"smImageURL":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--sm img, .smb-section-with-bgimage__bgimage--sm video","attribute":"src","default":""},"smImageAlt":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--sm img","attribute":"alt","default":""},"smImageWidth":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--sm img, .smb-section-with-bgimage__bgimage--sm video","attribute":"width","default":""},"smImageHeight":{"type":"string","source":"attribute","selector":".smb-section-with-bgimage__bgimage--sm img, .smb-section-with-bgimage__bgimage--sm video","attribute":"height","default":""},"smImageMediaType":{"type":"string"},"smImageRepeat":{"type":"boolean","default":false},"smFocalPoint":{"type":"object"},"smImageSizeSlug":{"type":"string","default":"full"},"contentsAlignment":{"type":"string"},"maskColor":{"type":"string"},"maskGradientColor":{"type":"string"},"maskOpacity":{"type":"number","default":1},"textColor":{"type":"string"},"parallax":{"type":"boolean","default":false},"contentsWidth":{"type":"boolean","default":false},"contentJustification":{"type":"string"},"itemsAlignment":{"type":"string"},"title":{"type":"string","source":"html","selector":".smb-section__title","default":""},"subtitle":{"type":"string","source":"html","selector":".smb-section__subtitle","default":""},"lede":{"type":"string","source":"html","selector":".smb-section__lede","default":""},"wrapperTagName":{"type":"string","default":"div"},"titleTagName":{"type":"string","default":"h2"},"height":{"type":"string","default":"fit"},"disableCustomHeight":{"type":"boolean","default":true},"containerAlign":{"type":"string"},"disableContainerPadding":{"type":"boolean","default":false},"contentsMaxWidth":{"type":"string"},"isSlim":{"type":"boolean","default":false},"topDividerType":{"type":"string","default":"tilt"},"topDividerLevel":{"type":"number","default":0},"topDividerColor":{"type":"string","default":"#fff"},"topDividerVerticalPosition":{"type":"number","default":0},"topDividerOverlay":{"type":"boolean","default":true},"bottomDividerType":{"type":"string","default":"tilt"},"bottomDividerLevel":{"type":"number","default":0},"bottomDividerColor":{"type":"string","default":"#fff"},"bottomDividerVerticalPosition":{"type":"number","default":0},"bottomDividerOverlay":{"type":"boolean","default":true},"backgroundText":{"type":"object","default":{"text":"","color":"","fontSize":"","fontSizeSlug":"","lineHeight":"","opacity":0.2,"position":{"top":null,"right":null,"bottom":null,"left":null}}},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"align":["wide","full"],"anchor":true,"spacing":{"margin":true,"padding":["top","bottom"]},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}},"snowmonkeyeditor":{"blockPresets":{"ignore":["title","subtitle","lede","backgroundText","imageID","imageURL","imageAlt","lgImageID","lgImageURL","lgImageAlt","lgImageMediaType","lgImageRepeat","lgFocalPoint","lgImageSizeSlug","mdImageID","mdImageURL","mdImageAlt","mdImageMediaType","mdImageRepeat","mdFocalPoint","mdImageSizeSlug","smImageID","smImageURL","smImageAlt","smImageMediaType","smImageRepeat","smFocalPoint","smImageSizeSlug"]}}}}'),l=window.ReactJSXRuntime,n=(0,l.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"6",y:"12.13",width:"12",height:"1"}),(0,l.jsx)("rect",{x:"3",y:"15.63",width:"18",height:"1"}),(0,l.jsx)("rect",{x:"6",y:"19.13",width:"12",height:"1"}),(0,l.jsx)("path",{d:"M9.41,9.05h.16L12,7.14l2.43,1.91h.16a.15.15,0,0,0,.16-.15V4a.15.15,0,0,0-.16-.15H9.41A.15.15,0,0,0,9.25,4V8.9A.15.15,0,0,0,9.41,9.05Z"})]});var m=a(6942),g=a.n(m);const c=window.wp.blockEditor,r=window.wp.components,d=window.wp.data;function b(e){const{desktop:t,tablet:a,mobile:i}=e,s=[];return t&&s.push({name:"desktop",title:(0,l.jsx)(r.Dashicon,{icon:"desktop"})}),a&&s.push({name:"tablet",title:(0,l.jsx)(r.Dashicon,{icon:"tablet"})}),i&&s.push({name:"mobile",title:(0,l.jsx)(r.Dashicon,{icon:"smartphone"})}),(0,l.jsx)(r.TabPanel,{className:"smb-inspector-tabs",tabs:s,children:e=>{if(e.name){if("desktop"===e.name)return t();if("tablet"===e.name)return a();if("mobile"===e.name)return i()}}})}const u=window.lodash,h=window.wp.element,p=({id:e,src:t,allowedTypes:a,accept:i,onSelect:o,onSelectURL:n,onRemove:m})=>(0,l.jsxs)(c.BlockControls,{group:"inline",children:[(0,l.jsx)(c.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:a,accept:i,onSelect:o,onSelectURL:n}),!!t&&!!m&&(0,l.jsx)(r.ToolbarButton,{onClick:m,children:(0,s.__)("Release","snow-monkey-blocks")})]}),x=({src:e,alt:t,id:a,style:i,width:s,height:o})=>(0,l.jsx)("img",{src:e,alt:t,className:`wp-image-${a}`,style:i,width:s,height:o}),_=({src:e,style:t,width:a,height:i})=>(0,l.jsx)("video",{src:e,style:t,width:a,height:i}),y=(0,h.memo)((({id:e,src:t,alt:a,url:i,width:s,height:o,target:n,allowedTypes:m,accept:g,onSelect:c,onSelectURL:r,onRemove:d,mediaType:b,style:h,rel:y,linkClass:v})=>{let w;if("image"===b){let m;w=(0,l.jsx)(x,{src:t,alt:a,id:e,style:h,width:s,height:o}),m=y?(0,u.isEmpty)(y)?void 0:y:"_self"!==n&&n?"noopener noreferrer":void 0,i&&(w=(0,l.jsx)("span",{href:i,target:"_self"===n?void 0:n,rel:m,className:v,children:w}))}else"video"===b&&(w=(0,l.jsx)(_,{src:t,style:h,width:s,height:o}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p,{id:e,src:t,allowedTypes:m,accept:g,onSelect:c,onSelectURL:r,onRemove:d}),w]})}),((e,t)=>{const a=Object.keys(e);for(const i of a)if(e[i]!==t[i])return!1;return!0}));function v(e){const{src:t,onSelect:a,onSelectURL:i,mediaType:o,allowedTypes:n=["image"]}=e,m=!o&&t?"image":o;let g=(0,s.__)("Media","snow-monkey-blocks");1===n.length&&("image"===n[0]?g=(0,s.__)("Image","snow-monkey-blocks"):"video"===n[0]&&(g=(0,s.__)("Video","snow-monkey-blocks")));const r=(0,h.useMemo)((()=>n.map((e=>`${e}/*`)).join(",")),[n]);return t?(0,l.jsx)(y,{...e,accept:r,allowedTypes:n,mediaType:m}):(0,l.jsx)(c.MediaPlaceholder,{icon:"format-image",labels:{title:g},onSelect:a,onSelectURL:i,accept:r,allowedTypes:n})}const w=[{label:(0,s._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,s._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,s._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,s._x)("Full Size","Image size option for resolution control"),value:"full"}];function j({panelId:e,value:t,onChange:a,options:i=w,defaultValue:o=w[0].value,isShownByDefault:n=!0,withToolsPanelItem:m=!0}){const g=null!=t?t:o,c=()=>(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Resolution"),value:g,options:i,onChange:a,help:(0,s.__)("Select the size of the source image."),size:"__unstable-large"});return m?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>g!==o,label:(0,s.__)("Resolution"),onDeselect:()=>a(o),isShownByDefault:n,panelId:e,children:(0,l.jsx)(c,{})}):(0,l.jsx)(c,{})}const k=window.wp.compose,I=(e,t=0,a=null)=>(e=Number(e),(isNaN(e)||e<t)&&(e=t),null!==a&&e>a&&(e=a),e),f=(e,t,a)=>{if(a=a||"#fff",0!==t)return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:(()=>{switch(e){case"tilt":return 0>t?(0,l.jsx)("path",{d:`m100,${100+t} L100,100 L0,100 z`,strokeWidth:"0",fill:a}):(0,l.jsx)("path",{d:`m0,${100-t} L100,100 L0,100 z`,strokeWidth:"0",fill:a});case"curve":return 0>t?(0,l.jsx)("path",{d:`m0,100 L100,100 Q50,${2*t+100},0,100 z`,strokeWidth:"0",fill:a}):(0,l.jsx)("path",{d:`m0,${100-t} q50,${2*t},100,0 V100 L0,100 z`,strokeWidth:"0",fill:a});case"wave":return 0>t?(0,l.jsx)("path",{d:`m0,${100+t/2} q20,${t},40,0 t40,0 t40,0 V100 L0,100 z`,strokeWidth:"0",fill:a}):(0,l.jsx)("path",{d:`m0,${100-t/2} q20,${t},40,0 t40,0 t40,0 V100 L0,100 z`,strokeWidth:"0",fill:a});case"triangle":return t=Math.abs(t),(0,l.jsx)("path",{d:`m${(100-t)/2},100 l${t},0 l${-1*t/2},${-1*t} z`,strokeWidth:"0",fill:a});case"triangle-large":return t=Math.abs(t),(0,l.jsx)("path",{d:`m0,100 l100,0 l-50,${-1*t} z`,strokeWidth:"0",fill:a})}})()})},N=e=>e.media_type?"image"===e.media_type?"image":"video":e.type,C=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function T(e=""){return!!e&&C.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e))}function P(e){if(null==e)return{};Object.keys(e).forEach((t=>{const a=e?.[t];null!==a&&""!==a||(e[t]=void 0)}));const t=0===parseFloat(e?.top)?0:e?.top,a=0===parseFloat(e?.right)?0:e?.right,i=0===parseFloat(e?.bottom)?0:e?.bottom,s=0===parseFloat(e?.left)?0:e?.left;return t===a===i===s&&void 0!==t?{padding:t}:t===i&&a===s&&void 0!==t&&void 0!==a?{padding:`${t} ${a}`}:t!==i&&a===s&&void 0!==t&&void 0!==i&&void 0!==a?{padding:`${t} ${a} ${i}`}:{paddingTop:t,paddingRight:a,paddingBottom:i,paddingLeft:s}}function $(){return(0,k.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const D=window.wp.primitives;var V=(0,l.jsxs)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,l.jsx)(D.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,l.jsx)(D.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});function R({label:e,onChange:t,value:a,withReset:i=!0},o){const n=(0,r.__experimentalUseCustomUnits)({availableUnits:["px","em","rem","%","vw"]}),m="smb-width-picker";return(0,l.jsx)("fieldset",{className:m,...o?{}:{ref:o},children:(0,l.jsx)("div",{className:`${m}__controls`,children:(0,l.jsxs)(r.Flex,{justify:"space-between",className:`${m}__custom-size-control`,children:[(0,l.jsx)(r.FlexItem,{isBlock:!0,children:(0,l.jsx)(r.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:e,labelPosition:"edge",value:a,onChange:e=>{e=0>parseFloat(e)||0===parseFloat(e)?void 0:e,t(e)},units:n})}),i&&(0,l.jsx)(r.FlexItem,{isBlock:!0,children:(0,l.jsx)(r.Button,{className:"components-color-palette__clear",disabled:void 0===a,onClick:()=>t(void 0),isSmall:!0,isSecondary:!0,children:(0,s.__)("Reset")})})]})})})}function S(e){const{label:t,sides:a,values:i,onChange:s,allowReset:o}=e,[n]=null!=c.useSettings?(0,c.useSettings)("spacing.units"):[(0,c.useSetting)("spacing.units")].filter(Boolean),m=(0,r.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vw"]});return(0,l.jsx)(r.BoxControl,{__next40pxDefaultSize:!0,values:i,onChange:s,label:t,sides:a,units:m,allowReset:o})}const O=({disableIsSlim:e,disableContentsMaxWidth:t,disableContainerAlign:a,disableDisableContainerPadding:i,disableCustomHeight:o,settings:n})=>{const[m,g]=(0,h.useState)(!o),c=$(),d=["div","section","aside"],b=["h1","h2","h3","none"];return(0,l.jsx)(r.__experimentalToolsPanel,{label:(0,s.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:c,children:n.map(((o,n)=>{if(o.hasOwnProperty("wrapperTagNameValue")&&o.hasOwnProperty("onWrapperTagNameChange")&&o.hasOwnProperty("defaultValue"))return(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.wrapperTagNameValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Wrapper tag","snow-monkey-blocks"),onDeselect:()=>o.onWrapperTagNameChange(o.defaultValue),children:(0,l.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Wrapper tag","snow-monkey-blocks"),id:"snow-monkey-blocks/section/wrapper-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,u.times)(d.length,(e=>(0,l.jsx)(r.Button,{variant:o.wrapperTagNameValue===d[e]?"primary":"secondary",onClick:()=>{o.onWrapperTagNameChange(d[e])},children:d[e]},e)))})},n)},n);if(o.hasOwnProperty("titleTagNameValue")&&o.hasOwnProperty("onTitleTagNameChange")&&o.hasOwnProperty("defaultValue"))return(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.titleTagNameValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>o.onTitleTagNameChange(o.defaultValue),children:(0,l.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/section/title-tag-name",children:(0,l.jsx)("div",{className:"smb-list-icon-selector",children:(0,u.times)(b.length,(e=>(0,l.jsx)(r.Button,{variant:o.titleTagNameValue===b[e]?"primary":"secondary",onClick:()=>{o.onTitleTagNameChange(b[e])},children:b[e]},e)))})})},n);if(o.hasOwnProperty("heightValue")&&o.hasOwnProperty("onHeightChange")&&o.hasOwnProperty("defaultValue"))return(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.heightValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Height","snow-monkey-blocks"),onDeselect:()=>{o.onHeightChange(o.defaultValue,o.defaultDisableCustomHeightValue),g(!o.defaultDisableCustomHeightValue)},children:(0,l.jsxs)("div",{children:[(0,l.jsx)(r.__experimentalSpacer,{children:(0,l.jsxs)(r.__experimentalHStack,{children:[(0,l.jsx)("span",{className:"components-base-control__label",children:m?(0,s.__)("Min height","snow-monkey-blocks"):(0,s.__)("Height","snow-monkey-blocks")}),(0,l.jsx)(r.Button,{label:m?(0,s.__)("Set custom size"):(0,s.__)("Use preset","snow-monkey-blocks"),icon:V,onClick:()=>{g(!m)},isPressed:m,isSmall:!0})]})}),m?(0,l.jsx)(r.__experimentalUnitControl,{__next40pxDefaultSize:!0,value:o.heightValue,onChange:e=>o.onHeightChange(e,!1)}):(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:o.heightValue,options:[{value:"fit",label:(0,s.__)("Fit","snow-monkey-blocks")},{value:"wide",label:(0,s.__)("Wide","snow-monkey-blocks")},{value:"full",label:(0,s.__)("Full","snow-monkey-blocks")}],onChange:e=>o.onHeightChange(e,!0)})]})},n);if(!a&&o.hasOwnProperty("containerAlignValue")&&o.hasOwnProperty("onContainerAlignChange")&&o.hasOwnProperty("defaultValue")){let e=[{value:"",label:(0,s.__)("Default","snow-monkey-blocks")},{value:"wide",label:(0,s.__)("Wide width","snow-monkey-blocks")},{value:"full",label:(0,s.__)("Full width","snow-monkey-blocks")}];return o.hasOwnProperty("contentsContainerControl")&&(e=e.concat([{value:"contents-wide",label:(0,s.__)("Wide width (Only contents)","snow-monkey-blocks")},{value:"contents-full",label:(0,s.__)("Full width (Only contents)","snow-monkey-blocks")}])),(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.containerAlignValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Container alignment","snow-monkey-blocks"),onDeselect:()=>o.onContainerAlignChange(o.defaultValue),children:(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Container alignment","snow-monkey-blocks"),value:o.containerAlignValue,onChange:o.onContainerAlignChange,options:e})},n)}return!i&&o.hasOwnProperty("disableContainerPaddingValue")&&o.hasOwnProperty("onDisableContainerPaddingChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.disableContainerPaddingValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Remove container padding of the contents","snow-monkey-blocks"),onDeselect:()=>o.onDisableContainerPaddingChange(o.defaultValue),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Remove container padding of the contents","snow-monkey-blocks"),checked:o.disableContainerPaddingValue,onChange:o.onDisableContainerPaddingChange})},n):!t&&o.hasOwnProperty("contentsMaxWidthValue")&&o.hasOwnProperty("onContentsMaxWidthChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.contentsMaxWidthValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Max width of the contents","snow-monkey-blocks"),onDeselect:()=>o.onContentsMaxWidthChange(o.defaultValue),children:(0,l.jsx)(r.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Max width of the contents","snow-monkey-blocks"),id:"snow-monkey-blocks/section/contents-max-width",children:(0,l.jsx)(R,{value:o.contentsMaxWidthValue,onChange:o.onContentsMaxWidthChange})})},n):!e&&o.hasOwnProperty("isSlimValue")&&o.hasOwnProperty("onIsSlimChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.isSlimValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Make the contents width slim","snow-monkey-blocks"),onDeselect:()=>o.onIsSlimChange(o.defaultValue),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Make the contents width slim","snow-monkey-blocks"),checked:o.isSlimValue,onChange:o.onIsSlimChange})},n):o.hasOwnProperty("paddingValue")&&o.hasOwnProperty("onPaddingChange")&&o.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>o.paddingValue!==o.defaultValue,isShownByDefault:!0,label:(0,s.__)("Padding","snow-monkey-blocks"),onDeselect:()=>o.onPaddingChange(o.defaultValue),children:(0,l.jsx)(S,{label:(0,s.__)("Padding","snow-monkey-blocks"),sides:o.sides?o.sides:void 0,values:o.paddingValue,onChange:o.onPaddingChange,allowReset:!1})},n):(0,l.jsx)(h.Fragment,{},n)}))})},L=e=>{const t=e.filter((e=>e.hasOwnProperty("titleValue")&&e.hasOwnProperty("titleTagNameValue")));return!!t&&t[0]},M=e=>g()("smb-section__header",{[`${e}__header`]:!!e}),A=e=>g()("smb-section__subtitle",{[`${e}__subtitle`]:!!e}),B=e=>g()("smb-section__title",{[`${e}__title`]:!!e}),z=e=>g()("smb-section__lede-wrapper",{[`${e}__lede-wrapper`]:!!e}),U=e=>g()("smb-section__lede",{[`${e}__lede`]:!!e}),F=({isSelected:e,className:t,settings:a})=>{const i=(e=>{const t=(e=>{const t=e.filter((e=>e.hasOwnProperty("subtitleValue")));return!!t&&t[0]})(e);return!!t&&!c.RichText.isEmpty(t.subtitleValue)})(a),o=(e=>{const t=(e=>{const t=e.filter((e=>e.hasOwnProperty("ledeValue")));return!!t&&t[0]})(e);return!!t&&!c.RichText.isEmpty(t.ledeValue)})(a),n=A(t),m=B(t),g=z(t),r=U(t);return(0,l.jsx)(l.Fragment,{children:a.map(((t,a)=>(i||e)&&t.hasOwnProperty("subtitleValue")&&t.hasOwnProperty("onSubtitleChange")?(0,l.jsx)(c.RichText,{className:n,value:t.subtitleValue,onChange:t.onSubtitleChange,placeholder:(0,s.__)("Write subtitle…","snow-monkey-blocks")},a):t.hasOwnProperty("titleTagNameValue")&&t.hasOwnProperty("titleValue")&&t.hasOwnProperty("onTitleChange")?(0,l.jsx)(c.RichText,{className:m,tagName:t.titleTagNameValue,value:t.titleValue,onChange:t.onTitleChange,placeholder:(0,s.__)("Write title…","snow-monkey-blocks")},a):(o||e)&&t.hasOwnProperty("ledeValue")&&t.hasOwnProperty("onLedeChange")?(0,l.jsx)("div",{className:g,children:(0,l.jsx)(c.RichText,{className:r,value:t.ledeValue,onChange:t.onLedeChange,placeholder:(0,s.__)("Write lede…","snow-monkey-blocks")})},a):(0,l.jsx)(h.Fragment,{},a)))})},H=({isSelected:e,hasContainer:t,containerClassName:a,className:i,settings:s})=>{const o=(e=>{const t=L(e);return!!t&&"none"!==t.titleTagNameValue})(s);if(!o)return(0,l.jsx)(l.Fragment,{});const n=(e=>{const t=L(e);return!!t&&!c.RichText.isEmpty(t.titleValue)&&"none"!==t.titleTagNameValue})(s);if(!n&&!e)return(0,l.jsx)(l.Fragment,{});const m=M(i);return(0,l.jsx)(l.Fragment,{children:t?(0,l.jsx)("div",{className:m,children:(0,l.jsx)("div",{className:a,children:(0,l.jsx)(F,{isSelected:e,className:i,settings:s})})}):(0,l.jsx)("div",{className:m,children:(0,l.jsx)(F,{isSelected:e,className:i,settings:s})})})},W=({title:e,titleTagName:t,subtitle:a,lede:i,className:s})=>{const o=!c.RichText.isEmpty(a),n=!c.RichText.isEmpty(i),m=A(s),g=B(s),r=z(s),d=U(s);return(0,l.jsxs)(l.Fragment,{children:[o&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:m,value:a}),(0,l.jsx)(c.RichText.Content,{tagName:t,className:g,value:e}),n&&(0,l.jsx)("div",{className:r,children:(0,l.jsx)(c.RichText.Content,{tagName:"div",className:d,value:i})})]})},K=({title:e,titleTagName:t,subtitle:a,lede:i,className:s,hasContainer:o,containerClassName:n})=>{if(c.RichText.isEmpty(e)||"none"===t)return(0,l.jsx)(l.Fragment,{});const m=M(s);return(0,l.jsx)(l.Fragment,{children:o?(0,l.jsx)("div",{className:m,children:(0,l.jsx)("div",{className:n,children:(0,l.jsx)(W,{title:e,titleTagName:t,subtitle:a,lede:i,className:s})})}):(0,l.jsx)("div",{className:m,children:(0,l.jsx)(W,{title:e,titleTagName:t,subtitle:a,lede:i,className:s})})})},E=((0,s.__)("None","snow-monkey-blocks"),(0,s.__)("Stripe","snow-monkey-blocks"),(0,s.__)("Noise","snow-monkey-blocks"),(0,s.__)("Dots","snow-monkey-blocks"),(0,s.__)("Dots 2","snow-monkey-blocks"),[{value:"tilt",label:(0,s.__)("Tilt","snow-monkey-blocks")},{value:"curve",label:(0,s.__)("Curve","snow-monkey-blocks")},{value:"wave",label:(0,s.__)("Wave","snow-monkey-blocks")},{value:"triangle",label:(0,s.__)("Triangle","snow-monkey-blocks")},{value:"triangle-large",label:(0,s.__)("Triangle (Large)","snow-monkey-blocks")}]),G=({settings:e})=>{const t=(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),a=$();return(0,l.jsx)(r.__experimentalToolsPanel,{label:(0,s.__)("Top divider","snow-monkey-blocks"),dropdownMenuProps:a,children:e.map(((e,a)=>e.hasOwnProperty("typeValue")&&e.hasOwnProperty("onTypeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.typeValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Type","snow-monkey-blocks"),onDeselect:()=>e.onTypeChange(e.defaultValue),children:(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Type","snow-monkey-blocks"),value:e.typeValue,onChange:e.onTypeChange,options:E})},a):e.hasOwnProperty("levelValue")&&e.hasOwnProperty("onLevelChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.levelValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Level","snow-monkey-blocks"),onDeselect:()=>e.onLevelChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Level","snow-monkey-blocks"),value:e.levelValue,onChange:e.onLevelChange,min:"-100",max:"100"})},a):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultColorValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...t})},a):e.hasOwnProperty("verticalPositionValue")&&e.hasOwnProperty("onVerticalPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.verticalPositionValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>e.onVerticalPositionChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Position (Top / Bottom)","snow-monkey-blocks"),value:e.verticalPositionValue,onChange:e.onVerticalPositionChange,min:"-90",max:"90"})},a):e.hasOwnProperty("overlayValue")&&e.hasOwnProperty("onOverlayChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.overlayValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Overlap divider on content","snow-monkey-blocks"),onDeselect:()=>e.onOverlayChange(e.defaultValue),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Overlap divider on content","snow-monkey-blocks"),checked:e.overlayValue,onChange:e.onOverlayChange})},a):(0,l.jsx)(h.Fragment,{},a)))})},J=({settings:e})=>{const t=(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),a=$();return(0,l.jsx)(r.__experimentalToolsPanel,{label:(0,s.__)("Bottom divider","snow-monkey-blocks"),dropdownMenuProps:a,children:e.map(((e,a)=>e.hasOwnProperty("typeValue")&&e.hasOwnProperty("onTypeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.typeValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Type","snow-monkey-blocks"),onDeselect:()=>e.onTypeChange(e.defaultValue),children:(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Type","snow-monkey-blocks"),value:e.typeValue,onChange:e.onTypeChange,options:E})},a):e.hasOwnProperty("levelValue")&&e.hasOwnProperty("onLevelChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.levelValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Level","snow-monkey-blocks"),onDeselect:()=>e.onLevelChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Level","snow-monkey-blocks"),value:e.levelValue,onChange:e.onLevelChange,min:"-100",max:"100"})},a):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultColorValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...t})},a):e.hasOwnProperty("verticalPositionValue")&&e.hasOwnProperty("onVerticalPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.verticalPositionValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Position (Top / Bottom)","snow-monkey-blocks"),onDeselect:()=>e.onVerticalPositionChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Position (Top / Bottom)","snow-monkey-blocks"),value:e.verticalPositionValue,onChange:e.onVerticalPositionChange,min:"-90",max:"90"})},a):e.hasOwnProperty("overlayValue")&&e.hasOwnProperty("onOverlayChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.overlayValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Overlap divider on content","snow-monkey-blocks"),onDeselect:()=>e.onOverlayChange(e.defaultValue),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Overlap divider on content","snow-monkey-blocks"),checked:e.overlayValue,onChange:e.onOverlayChange})},a):(0,l.jsx)(h.Fragment,{},a)))})},q=({settings:e})=>{const t=(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),a=$();return(0,l.jsx)(r.__experimentalToolsPanel,{label:(0,s.__)("Background text","snow-monkey-blocks"),dropdownMenuProps:a,children:e.map(((e,a)=>e.hasOwnProperty("textValue")&&e.hasOwnProperty("onTextChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.textValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Text","snow-monkey-blocks"),onDeselect:()=>e.onTextChange(e.defaultValue),children:(0,l.jsx)(r.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Text","snow-monkey-blocks"),value:e.textValue,onChange:e.onTextChange})},a):e.hasOwnProperty("fontSizeValue")&&e.hasOwnProperty("onFontSizeChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.fontSizeValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Size","snow-monkey-blocks"),onDeselect:()=>e.onFontSizeChange(e.defaultValue),children:(0,l.jsx)(c.FontSizePicker,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.fontSizeValue,onChange:e.onFontSizeChange,withReset:!1})},a):e.hasOwnProperty("lineHeightValue")&&e.hasOwnProperty("onLineHeightChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.lineHeightValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Line height","snow-monkey-blocks"),onDeselect:()=>e.onLineHeightChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Line height","snow-monkey-blocks"),value:e.lineHeightValue,onChange:e.onLineHeightChange,min:"0",max:"5",step:"0.1",initialPosition:void 0,allowReset:!0})},a):e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,gradientValue:e.gradientValue,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange}],__experimentalIsRenderedInSidebar:!0,...t})},a):e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.opacityValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>e.onOpacityChange(e.defaultValue),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:.1,max:1,step:.1})},a):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")&&e.hasOwnProperty("defaultValue")?(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>e.positionValue!==e.defaultValue,isShownByDefault:!0,label:(0,s.__)("Position","snow-monkey-blocks"),onDeselect:()=>e.onPositionChange(e.defaultValue),children:(0,l.jsx)(S,{label:(0,s.__)("Position","snow-monkey-blocks"),values:e.positionValue,onChange:e.onPositionChange})},a):(0,l.jsx)(h.Fragment,{},a)))})},Y=({backgroundHorizontalPosition:e,backgroundVerticalPosition:t,isBackgroundNoOver:a,backgroundColor:i,backgroundGradientColor:s,backgroundTexture:o,backgroundTextureOpacity:l,backgroundTextureUrl:n,fixedBackgroundColor:m,fixedBackgroundGradientColor:g,fixedBackgroundTexture:c,fixedBackgroundTextureOpacity:r,fixedBackgroundTextureUrl:d,topDividerVerticalPosition:b,topDividerLevel:u,bottomDividerVerticalPosition:h,bottomDividerLevel:p,backgroundText:x})=>{const _=!!o,y=!!c,v={};return(!!i||!!s)&&(v["--smb-section--background-color"]=i,v["--smb-section--background-image"]=s,a?(0<e?v["--smb-section--background-left"]=`${Math.abs(e)}%`:0>e&&(v["--smb-section--background-right"]=`${Math.abs(e)}%`),0<t?v["--smb-section--background-top"]=`${Math.abs(t)}%`:0>t&&(v["--smb-section--background-bottom"]=`${Math.abs(t)}%`)):(e||t)&&(v["--smb-section--background-transform"]=`translate(${e||0}%, ${t||0}%)`)),n&&(v["--smb-section--background-texture-image"]=_?n?`url(${n})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${o}.png)`:void 0,v["--smb-section--background-texture-opacity"]=l?String(l):void 0),v["--smb-section--fixed-background-color"]=m||void 0,v["--smb-section--fixed-background-image"]=g||void 0,d&&(v["--smb-section--fixed-background-texture-image"]=y?d?`url(${d})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${c}.png)`:void 0,v["--smb-section--fixed-background-texture-opacity"]=r?String(r):void 0),v["--smb-section--dividers-top"]=b?`${b}%`:void 0,v["--smb-section--top-divider-level"]=u?`${u}px`:void 0,v["--smb-section--dividers-bottom"]=h?`${h}%`:void 0,v["--smb-section--bottom-divider-level"]=p?`${p}px`:void 0,x?.text&&(v["--smb-section--background-text-color"]=x?.color?x.color:void 0,v["--smb-section--background-text-opacity"]=x?.opacity?String(x.opacity):void 0,v["--smb-section--background-text-font-size"]=x?.fontSize&&!x?.fontSizeSlug?x.fontSize:void 0,v["--smb-section--background-line-height"]=x?.lineHeight?x.lineHeight:void 0,v["--smb-section--background-text-top"]=x?.position?.top&&x?.position?.top.match(/^\d+$/)?`${x?.position?.top}px`:x?.position?.top,v["--smb-section--background-text-right"]=x?.position?.right&&x.position.right.match(/^\d+$/)?`${x?.position?.right}px`:x?.position?.right,v["--smb-section--background-text-bottom"]=x?.position?.bottom&&x?.position?.bottom.match(/^\d+$/)?`${x?.position?.bottom}px`:x?.position?.bottom,v["--smb-section--background-text-left"]=x?.position?.left&&x?.position?.left.match(/^\d+$/)?`${x?.position?.left}px`:x?.position?.left),v},Q=({backgroundColor:e,backgroundGradientColor:t,backgroundTexture:a,fixedBackgroundColor:i,fixedBackgroundGradientColor:s,fixedBackgroundTexture:o,topDividerType:n,topDividerLevel:m,topDividerColor:r,bottomDividerType:d,bottomDividerLevel:b,bottomDividerColor:u,backgroundText:h,containerClasses:p})=>{const x=!!e||!!t,_=!!a,y=!!i||!!s,v=!!o,w=!!m,j=!!b,k=!!h?.text,I=g()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${n}`),N=g()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${d}`);return(0,l.jsx)(l.Fragment,{children:(y||v||x||_||w||j||k)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",children:[v&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture"}),(x||_)&&(0,l.jsx)("div",{className:"smb-section__background",children:_&&(0,l.jsx)("div",{className:"smb-section__background__texture"})}),k&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:p,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:g()("smb-section__background-text__text",{[`has-${h?.fontSizeSlug.replace(/(\d+?)([^-])/,"$1-$2")}-font-size`]:!!h?.fontSizeSlug}),children:(0,l.jsx)(c.RichText.Content,{value:h.text?.replace(/\n/g,"<br>")})})})})}),(w||j)&&(0,l.jsxs)("div",{className:"smb-section__dividers",children:[w&&(0,l.jsx)("div",{className:I,children:f(n,m,r)}),j&&(0,l.jsx)("div",{className:N,children:f(d,b,u)})]})]})})},X=["image","video"],Z="full",ee=["left","center","right"];var te=a(3558),ae=a.n(te);const ie=({backgroundHorizontalPosition:e,backgroundVerticalPosition:t,isBackgroundNoOver:a,backgroundColor:i,backgroundGradientColor:s,backgroundTexture:o,backgroundTextureOpacity:n,backgroundTextureUrl:m,fixedBackgroundColor:r,fixedBackgroundGradientColor:d,fixedBackgroundTexture:b,fixedBackgroundTextureOpacity:u,fixedBackgroundTextureUrl:h,topDividerType:p,topDividerLevel:x,topDividerColor:_,topDividerVerticalPosition:y,bottomDividerType:v,bottomDividerLevel:w,bottomDividerColor:j,bottomDividerVerticalPosition:k,backgroundText:I,containerClasses:N})=>{const C=!!i||!!s,T=!!o,P=!!r||!!d,$=!!b,D=!!x,V=!!w,R=!!I?.text,S=g()("smb-section__divider","smb-section__divider--top",`smb-section__divider--${p}`),O=g()("smb-section__divider","smb-section__divider--bottom",`smb-section__divider--${v}`),L={};C&&(L.backgroundColor=i,L.backgroundImage=s,a?(0<e?L.left=`${Math.abs(e)}%`:0>e&&(L.right=`${Math.abs(e)}%`),0<t?L.top=`${Math.abs(t)}%`:0>t&&(L.bottom=`${Math.abs(t)}%`)):(e||t)&&(L.transform=`translate(${e||0}%, ${t||0}%)`));const M={backgroundImage:T?m?`url(${m})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${o}.png)`:void 0,opacity:n||void 0},A={paddingTop:x?Math.abs(x):0,paddingBottom:w?Math.abs(w):0,backgroundColor:r||void 0,backgroundImage:d||void 0},B={backgroundImage:$?h?`url(${h})`:`url(${smb.pluginUrl}/dist/blocks/section/img/${b}.png)`:void 0,opacity:u||void 0},z={};y&&(z.top=`${y}%`),k&&(z.bottom=`${k}%`);const U={};return U.color=I?.color?I.color:void 0,U.opacity=I?.opacity&&1>I.opacity?I.opacity:void 0,U.fontSize=I?.fontSize&&!I?.fontSizeSlug?I.fontSize:void 0,U.lineHeight=I?.lineHeight?I.lineHeight:void 0,U.top=I?.position?.top?I.position.top:void 0,U.right=I?.position?.right?I.position.right:void 0,U.bottom=I?.position?.bottom?I.position.bottom:void 0,U.left=I?.position?.left?I.position.left:void 0,(0,l.jsx)(l.Fragment,{children:(P||$||C||T||D||V||R)&&(0,l.jsxs)("div",{className:"smb-section__fixed-background",style:A,children:[$&&(0,l.jsx)("div",{className:"smb-section__fixed-background__texture",style:B}),(C||T)&&(0,l.jsx)("div",{className:"smb-section__background",style:L,children:T&&(0,l.jsx)("div",{className:"smb-section__background__texture",style:M})}),R&&(0,l.jsx)("div",{className:"smb-section__background-text","aria-hidden":"true",children:(0,l.jsx)("div",{className:N,children:(0,l.jsx)("div",{className:"smb-section__background-text__inner",children:(0,l.jsx)("div",{className:g()("smb-section__background-text__text",{[`has-${I?.fontSizeSlug}-font-size`]:!!I?.fontSizeSlug}),style:U,children:(0,l.jsx)(c.RichText.Content,{value:I.text?.replace(/\n/g,"<br>")})})})})}),(D||V)&&(0,l.jsxs)("div",{className:"smb-section__dividers",style:z,children:[D&&(0,l.jsx)("div",{className:S,children:f(p,x,_)}),V&&(0,l.jsx)("div",{className:O,children:f(v,w,j)})]})]})})},se=o.uK,oe=o.xY,le=[{attributes:{...se,padding:{type:"object",default:{}}},supports:{...oe},migrate:e=>({...e,style:{...e?.style,spacing:{...e?.style?.spacing,padding:{...e?.padding}}}}),save({attributes:e,className:t}){const{align:a,lgImageID:i,lgImageURL:s,lgImageAlt:o,lgImageWidth:n,lgImageHeight:m,lgImageMediaType:r,lgImageRepeat:d,lgFocalPoint:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageWidth:x,mdImageHeight:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageWidth:f,smImageHeight:N,smImageMediaType:C,smImageRepeat:T,smFocalPoint:$,contentsAlignment:D,maskColor:V,maskGradientColor:R,maskOpacity:S,textColor:O,parallax:L,contentJustification:M,itemsAlignment:A,title:B,subtitle:z,lede:U,wrapperTagName:F,titleTagName:H,height:W,disableCustomHeight:E,containerAlign:G,disableContainerPadding:J,contentsMaxWidth:q,isSlim:X,padding:Z,topDividerType:ee,topDividerLevel:te,topDividerColor:ae,topDividerVerticalPosition:ie,topDividerOverlay:se,bottomDividerType:oe,bottomDividerLevel:le,bottomDividerColor:ne,bottomDividerVerticalPosition:me,bottomDividerOverlay:ge,backgroundText:ce}=e,re=F,de="fit"!==W,be=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${D}`]:!!D,[`smb-section--${W}`]:!!W&&E,[`is-items-alignment-${A}`]:!!A&&de,"smb-section--top-divider-no-overlay":!se,"smb-section--bottom-divider-no-overlay":!ge,"js-bg-parallax":!!L}),ue=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!L}),he=g()("smb-section__inner",{[`is-content-justification-${M}`]:!!M}),pe=g()("c-container",{alignfull:("full"===G||"contents-full"===G)&&"full"===a,alignwide:"wide"===G||"contents-wide"===G&&"full"===a,"c-container--no-padding":J});let xe=pe.replace("c-container--no-padding","").trim();"contents-wide"!==G&&"contents-full"!==G||(xe=xe.replace("alignfull","").replace("alignwide","").trim());const _e=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${D}`]:!!D,"u-slim-width":X&&!q}),ye=0<Number((1-S).toFixed(1)),ve="video"===r,we="image"===r||void 0===r,je=!!s,ke=b&&!L?`${100*b.x}% ${100*b.y}%`:void 0,Ie="video"===y,fe="image"===y||void 0===y,Ne=!!h,Ce=w&&!L?`${100*w.x}% ${100*w.y}%`:void 0,Te="video"===C,Pe="image"===C||void 0===C,$e=!!k,De=$&&!L?`${100*$.x}% ${100*$.y}%`:void 0,Ve={"--smb-section--color":O||void 0,"--smb-section--contents-wrapper-width":q&&!X?q:void 0,"--smb-section--min-height":W&&!E?W:void 0,"--smb-section-with-bgimage--mask-color":V||void 0,"--smb-section-with-bgimage--mask-image":R||void 0,"--smb-section-with-bgimage--mask-opacity":String(S),"--smb-section-with-bgimage--lg-media-position":ke,"--smb-section-with-bgimage--lg-repeatable-image":d&&s?`url(${s})`:void 0,"--smb-section-with-bgimage--md-media-position":Ce,"--smb-section-with-bgimage--md-repeatable-image":v&&h?`url(${h})`:void 0,"--smb-section-with-bgimage--sm-media-position":De,"--smb-section-with-bgimage--sm-repeatable-image":T&&k?`url(${k})`:void 0,...P(Z),...Y({topDividerVerticalPosition:ie,topDividerLevel:te,bottomDividerVerticalPosition:me,bottomDividerLevel:le,backgroundText:ce})};return(0,l.jsxs)(re,{...c.useBlockProps.save({className:be,style:Ve}),children:[je&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--lg"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),we&&(d?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})}):(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})),ve&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:s,width:n,height:m})]}),Ne&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--md"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),fe&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})}):(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})),Ie&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,width:x,height:_})]}),$e&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--sm"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),Pe&&(T?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})}):(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})),Te&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,width:f,height:N})]}),(0,l.jsx)(Q,{topDividerType:ee,topDividerLevel:te,topDividerColor:ae,bottomDividerType:oe,bottomDividerLevel:le,bottomDividerColor:ne,backgroundText:ce,containerClasses:pe}),(0,l.jsx)("div",{className:he,children:(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:_e,children:[(0,l.jsx)(K,{title:B,titleTagName:H,subtitle:z,lede:U,hasContainer:J&&"full"===G&&"full"===a||"contents-wide"===G||"contents-full"===G,containerClassName:xe}),(0,l.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-section__body"})})]})})})]})}},{attributes:{...se,padding:{type:"object",default:{}}},supports:{...oe},save({attributes:e,className:t}){const{align:a,lgImageID:i,lgImageURL:s,lgImageAlt:o,lgImageWidth:n,lgImageHeight:m,lgImageMediaType:r,lgImageRepeat:d,lgFocalPoint:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageWidth:x,mdImageHeight:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageWidth:f,smImageHeight:N,smImageMediaType:C,smImageRepeat:T,smFocalPoint:$,contentsAlignment:D,maskColor:V,maskGradientColor:R,maskOpacity:S,textColor:O,parallax:L,contentJustification:M,itemsAlignment:A,title:B,subtitle:z,lede:U,wrapperTagName:F,titleTagName:H,height:W,disableCustomHeight:E,containerAlign:G,disableContainerPadding:J,contentsMaxWidth:q,isSlim:X,padding:Z,topDividerType:ee,topDividerLevel:te,topDividerColor:ae,topDividerVerticalPosition:ie,topDividerOverlay:se,bottomDividerType:oe,bottomDividerLevel:le,bottomDividerColor:ne,bottomDividerVerticalPosition:me,bottomDividerOverlay:ge,backgroundText:ce}=e,re=F,de="fit"!==W,be=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${D}`]:!!D,[`smb-section--${W}`]:!!W&&E,[`is-items-alignment-${A}`]:!!A&&de,"smb-section--top-divider-no-overlay":!se,"smb-section--bottom-divider-no-overlay":!ge,"js-bg-parallax":!!L}),ue=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!L}),he=g()("smb-section__inner",{[`is-content-justification-${M}`]:!!M}),pe=g()("c-container",{alignfull:("full"===G||"contents-full"===G)&&"full"===a,alignwide:"wide"===G||"contents-wide"===G&&"full"===a,"c-container--no-padding":J&&("full"===G||"contents-full"===G)&&"full"===a});let xe=pe.replace("c-container--no-padding","").trim();"contents-wide"!==G&&"contents-full"!==G||(xe=xe.replace("alignfull","").replace("alignwide","").trim());const _e=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${D}`]:!!D,"u-slim-width":X&&!q}),ye=0<Number((1-S).toFixed(1)),ve="video"===r,we="image"===r||void 0===r,je=!!s,ke=b&&!L?`${100*b.x}% ${100*b.y}%`:void 0,Ie="video"===y,fe="image"===y||void 0===y,Ne=!!h,Ce=w&&!L?`${100*w.x}% ${100*w.y}%`:void 0,Te="video"===C,Pe="image"===C||void 0===C,$e=!!k,De=$&&!L?`${100*$.x}% ${100*$.y}%`:void 0,Ve={"--smb-section--color":O||void 0,"--smb-section--contents-wrapper-width":q&&!X?q:void 0,"--smb-section--min-height":W&&!E?W:void 0,"--smb-section-with-bgimage--mask-color":V||void 0,"--smb-section-with-bgimage--mask-image":R||void 0,"--smb-section-with-bgimage--mask-opacity":String(S),"--smb-section-with-bgimage--lg-media-position":ke,"--smb-section-with-bgimage--lg-repeatable-image":d&&s?`url(${s})`:void 0,"--smb-section-with-bgimage--md-media-position":Ce,"--smb-section-with-bgimage--md-repeatable-image":v&&h?`url(${h})`:void 0,"--smb-section-with-bgimage--sm-media-position":De,"--smb-section-with-bgimage--sm-repeatable-image":T&&k?`url(${k})`:void 0,...P(Z),...Y({topDividerVerticalPosition:ie,topDividerLevel:te,bottomDividerVerticalPosition:me,bottomDividerLevel:le,backgroundText:ce})};return(0,l.jsxs)(re,{...c.useBlockProps.save({className:be,style:Ve}),children:[je&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--lg"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),we&&(d?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})}):(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})),ve&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:s,width:n,height:m})]}),Ne&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--md"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),fe&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})}):(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})),Ie&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,width:x,height:_})]}),$e&&(0,l.jsxs)("div",{className:g()(ue,"smb-section-with-bgimage__bgimage--sm"),children:[ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),Pe&&(T?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})}):(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})),Te&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,width:f,height:N})]}),(0,l.jsx)(Q,{topDividerType:ee,topDividerLevel:te,topDividerColor:ae,bottomDividerType:oe,bottomDividerLevel:le,bottomDividerColor:ne,backgroundText:ce,containerClasses:pe}),(0,l.jsx)("div",{className:he,children:(0,l.jsx)("div",{className:pe,children:(0,l.jsxs)("div",{className:_e,children:[(0,l.jsx)(K,{title:B,titleTagName:H,subtitle:z,lede:U,hasContainer:J&&"full"===G&&"full"===a||"contents-wide"===G||"contents-full"===G,containerClassName:xe}),(0,l.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-section__body"})})]})})})]})}},{attributes:{...se},supports:{...oe},save({attributes:e,className:t}){const{align:a,lgImageID:i,lgImageURL:s,lgImageAlt:o,lgImageMediaType:n,lgImageRepeat:m,lgFocalPoint:r,mdImageID:d,mdImageURL:b,mdImageAlt:u,mdImageMediaType:h,mdImageRepeat:p,mdFocalPoint:x,smImageID:_,smImageURL:y,smImageAlt:v,smImageMediaType:w,smImageRepeat:j,smFocalPoint:k,contentsAlignment:I,maskColor:f,maskGradientColor:N,maskOpacity:C,textColor:T,parallax:P,contentJustification:$,itemsAlignment:D,title:V,subtitle:R,lede:S,wrapperTagName:O,titleTagName:L,height:M,containerAlign:A,disableContainerPadding:B,contentsMaxWidth:z,isSlim:U,backgroundText:F}=e,H=O,W="fit"!==M,E=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${I}`]:!!I,[`smb-section--${M}`]:!!M,[`is-items-alignment-${D}`]:!!D&&W,"js-bg-parallax":!!P}),G=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!P}),J=g()("smb-section__inner",{[`is-content-justification-${$}`]:!!$}),q=g()("c-container",{alignfull:("full"===A||"contents-full"===A)&&"full"===a,alignwide:"wide"===A||"contents-wide"===A&&"full"===a,"c-container--no-padding":B&&("full"===A||"contents-full"===A)&&"full"===a});let Y=q.replace("c-container--no-padding","").trim();"contents-wide"!==A&&"contents-full"!==A||(Y=Y.replace("alignfull","").replace("alignwide","").trim());const Q=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${I}`]:!!I,"u-slim-width":U&&!z}),X=0<Number((1-C).toFixed(1)),Z="video"===n,ee="image"===n||void 0===n,te=!!s,ae=r&&!P?`${100*r.x}% ${100*r.y}%`:void 0,se="video"===h,oe="image"===h||void 0===h,le=!!b,ne=x&&!P?`${100*x.x}% ${100*x.y}%`:void 0,me="video"===w,ge="image"===w||void 0===w,ce=!!y,re=k&&!P?`${100*k.x}% ${100*k.y}%`:void 0,de={color:T||void 0},be={};(f||N)&&(be.backgroundColor=f,be.backgroundImage=N);const ue={opacity:C,objectPosition:ae},he={opacity:C,objectPosition:ae},pe={opacity:C,backgroundImage:`url( ${s} )`,backgroundPosition:ae},xe={opacity:C,objectPosition:ne},_e={opacity:C,objectPosition:ne},ye={opacity:C,backgroundImage:`url( ${b} )`,backgroundPosition:ne},ve={opacity:C,objectPosition:re},we={opacity:C,objectPosition:re},je={opacity:C,backgroundImage:`url( ${y} )`,backgroundPosition:re},ke={width:z&&!U?z:void 0};return(0,l.jsxs)(H,{...c.useBlockProps.save({className:E,style:de}),children:[te&&(0,l.jsxs)("div",{className:g()(G,"smb-section-with-bgimage__bgimage--lg"),children:[X&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:be}),ee&&(m?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:pe,children:(0,l.jsx)("img",{src:s,alt:o,className:`wp-image-${i}`,style:he})}):(0,l.jsx)("img",{src:s,alt:o,className:`wp-image-${i}`,style:he})),Z&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:s,style:ue})]}),le&&(0,l.jsxs)("div",{className:g()(G,"smb-section-with-bgimage__bgimage--md"),children:[X&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:be}),oe&&(p?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ye,children:(0,l.jsx)("img",{src:b,alt:u,className:`wp-image-${d}`,style:_e})}):(0,l.jsx)("img",{src:b,alt:u,className:`wp-image-${d}`,style:_e})),se&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:b,style:xe})]}),ce&&(0,l.jsxs)("div",{className:g()(G,"smb-section-with-bgimage__bgimage--sm"),children:[X&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:be}),ge&&(j?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:je,children:(0,l.jsx)("img",{src:y,alt:v,className:`wp-image-${_}`,style:we})}):(0,l.jsx)("img",{src:y,alt:v,className:`wp-image-${_}`,style:we})),me&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:y,style:ve})]}),(0,l.jsx)(ie,{backgroundText:F,containerClasses:q}),(0,l.jsx)("div",{className:J,style:{},children:(0,l.jsx)("div",{className:q,children:(0,l.jsxs)("div",{className:Q,style:ke,children:[(0,l.jsx)(K,{title:V,titleTagName:L,subtitle:R,lede:S,hasContainer:B&&"full"===A&&"full"===a||"contents-wide"===A||"contents-full"===A,containerClassName:Y}),(0,l.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-section__body"})})]})})})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{lgImageID:a,lgImageURL:i,lgImageAlt:s,lgImageMediaType:o,lgImageRepeat:n,lgFocalPoint:m,mdImageID:r,mdImageURL:d,mdImageAlt:b,mdImageMediaType:u,mdImageRepeat:h,mdFocalPoint:p,smImageID:x,smImageURL:_,smImageAlt:y,smImageMediaType:v,smImageRepeat:w,smFocalPoint:j,contentsAlignment:k,maskColor:I,maskGradientColor:f,maskOpacity:N,textColor:C,parallax:T,contentJustification:P,itemsAlignment:$,title:D,subtitle:V,lede:R,wrapperTagName:S,titleTagName:O,height:L,containerAlign:M,contentsMaxWidth:A,isSlim:B}=e,z=S,U="fit"!==L,F=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${k}`]:!!k,[`smb-section--${L}`]:!!L,[`is-items-alignment-${$}`]:!!$&&U,"js-bg-parallax":!!T}),H=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!T}),W=g()("smb-section__inner",{[`is-content-justification-${P}`]:!!P}),E=g()("c-container",{alignfull:"full"===M,alignwide:"wide"===M}),G=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${k}`]:!!k,"u-slim-width":B&&!A}),J=0<Number((1-N).toFixed(1)),q="video"===o,Y="image"===o||void 0===o,Q=!!i,X=m&&!T?`${100*m.x}% ${100*m.y}%`:void 0,Z="video"===u,ee="image"===u||void 0===u,te=!!d,ae=p&&!T?`${100*p.x}% ${100*p.y}%`:void 0,ie="video"===v,se="image"===v||void 0===v,oe=!!_,le=j&&!T?`${100*j.x}% ${100*j.y}%`:void 0,ne={color:C||void 0},me={};(I||f)&&(me.backgroundColor=I,me.backgroundImage=f);const ge={opacity:N,objectPosition:X},ce={opacity:N,objectPosition:X},re={opacity:N,backgroundImage:`url( ${i} )`,backgroundPosition:X},de={opacity:N,objectPosition:ae},be={opacity:N,objectPosition:ae},ue={opacity:N,backgroundImage:`url( ${d} )`,backgroundPosition:ae},he={opacity:N,objectPosition:le},pe={opacity:N,objectPosition:le},xe={opacity:N,backgroundImage:`url( ${_} )`,backgroundPosition:le},_e={maxWidth:A&&!B?A:void 0};return(0,l.jsxs)(z,{...c.useBlockProps.save({className:F,style:ne}),children:[Q&&(0,l.jsxs)("div",{className:g()(H,"smb-section-with-bgimage__bgimage--lg"),children:[J&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:me}),Y&&(n?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:re,children:(0,l.jsx)("img",{src:i,alt:s,className:`wp-image-${a}`,style:ce})}):(0,l.jsx)("img",{src:i,alt:s,className:`wp-image-${a}`,style:ce})),q&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:i,style:ge})]}),te&&(0,l.jsxs)("div",{className:g()(H,"smb-section-with-bgimage__bgimage--md"),children:[J&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:me}),ee&&(h?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ue,children:(0,l.jsx)("img",{src:d,alt:b,className:`wp-image-${r}`,style:be})}):(0,l.jsx)("img",{src:d,alt:b,className:`wp-image-${r}`,style:be})),Z&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:d,style:de})]}),oe&&(0,l.jsxs)("div",{className:g()(H,"smb-section-with-bgimage__bgimage--sm"),children:[J&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:me}),se&&(w?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:xe,children:(0,l.jsx)("img",{src:_,alt:y,className:`wp-image-${x}`,style:pe})}):(0,l.jsx)("img",{src:_,alt:y,className:`wp-image-${x}`,style:pe})),ie&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:_,style:he})]}),(0,l.jsx)("div",{className:W,style:{},children:(0,l.jsx)("div",{className:E,children:(0,l.jsxs)("div",{className:G,style:_e,children:[(0,l.jsx)(K,{title:D,titleTagName:O,subtitle:V,lede:R}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})})})]})}},{attributes:{...se},supports:{align:["wide","full"]},migrate:e=>(e.className&&(e.className=(0,u.without)(e.className.split(" "),"smb-section--left","smb-section--center","smb-section--right").join(" ")),e.className||(e=(0,u.omit)(e,"className")),{...e}),save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskGradientColor:D,maskOpacity:V,textColor:R,parallax:S,isSlim:O,contentJustification:L,itemsAlignment:M}=e,A=a,B="fit"!==T,z=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${P}`]:!!P,[`smb-section--${T}`]:!!T,[`is-content-justification-${L}`]:!!L,[`is-items-alignment-${M}`]:!!M&&B,"js-bg-parallax":!!S}),U=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!S}),F=g()("c-container",{"u-slim-width":!!O}),H=!c.RichText.isEmpty(s)&&"none"!==i,W=!c.RichText.isEmpty(o),K=!c.RichText.isEmpty(n),E=0<Number((1-V).toFixed(1)),G="video"===b,J="image"===b||void 0===b,q=!!r,Y=h&&!S?`${100*h.x}% ${100*h.y}%`:void 0,Q="video"===y,X="image"===y||void 0===y,Z=!!x,ee=w&&!S?`${100*w.x}% ${100*w.y}%`:void 0,te="video"===f,ae="image"===f||void 0===f,ie=!!k,se=C&&!S?`${100*C.x}% ${100*C.y}%`:void 0,oe={color:R||void 0},le={};($||D)&&(le.backgroundColor=$,le.backgroundImage=D);const ne={opacity:V,objectPosition:Y},me={opacity:V,objectPosition:Y},ge={opacity:V,backgroundImage:`url( ${r} )`,backgroundPosition:Y},ce={opacity:V,objectPosition:ee},re={opacity:V,objectPosition:ee},de={opacity:V,backgroundImage:`url( ${x} )`,backgroundPosition:ee},be={opacity:V,objectPosition:se},ue={opacity:V,objectPosition:se},he={opacity:V,backgroundImage:`url( ${k} )`,backgroundPosition:se};return(0,l.jsxs)(A,{...c.useBlockProps.save({className:z,style:oe}),children:[q&&(0,l.jsxs)("div",{className:g()(U,"smb-section-with-bgimage__bgimage--lg"),children:[E&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:le}),J&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:me})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:me})),G&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:ne})]}),Z&&(0,l.jsxs)("div",{className:g()(U,"smb-section-with-bgimage__bgimage--md"),children:[E&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:le}),X&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:de,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:re})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:re})),Q&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:ce})]}),ie&&(0,l.jsxs)("div",{className:g()(U,"smb-section-with-bgimage__bgimage--sm"),children:[E&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:le}),ae&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:he,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:ue})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:ue})),te&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:be})]}),(0,l.jsx)("div",{className:"smb-section__inner",children:(0,l.jsxs)("div",{className:F,children:[H&&W&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),H&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),H&&K&&(0,l.jsx)("div",{className:"smb-section__lede-wrapper",children:(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskGradientColor:D,maskOpacity:V,textColor:R,parallax:S,isSlim:O}=e,L=a,M=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${P}`,`smb-section-with-bgimage--${T}`,t,{"js-bg-parallax":!!S}),A=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!S}),B=g()("c-container",{"u-slim-width":!!O}),z=!c.RichText.isEmpty(s)&&"none"!==i,U=!c.RichText.isEmpty(o),F=!c.RichText.isEmpty(n),H=0<Number((1-V).toFixed(1)),W="video"===b,K="image"===b||void 0===b,E=!!r,G=h&&!S?`${100*h.x}% ${100*h.y}%`:void 0,J="video"===y,q="image"===y||void 0===y,Y=!!x,Q=w&&!S?`${100*w.x}% ${100*w.y}%`:void 0,X="video"===f,Z="image"===f||void 0===f,ee=!!k,te=C&&!S?`${100*C.x}% ${100*C.y}%`:void 0,ae={color:R||void 0},ie={};($||D)&&(ie.backgroundColor=$,ie.backgroundImage=D);const se={opacity:V,objectPosition:G},oe={opacity:V,objectPosition:G},le={opacity:V,backgroundImage:`url( ${r} )`,backgroundPosition:G},ne={opacity:V,objectPosition:Q},me={opacity:V,objectPosition:Q},ge={opacity:V,backgroundImage:`url( ${x} )`,backgroundPosition:Q},ce={opacity:V,objectPosition:te},re={opacity:V,objectPosition:te},de={opacity:V,backgroundImage:`url( ${k} )`,backgroundPosition:te};return(0,l.jsxs)(L,{...c.useBlockProps.save({className:M,style:ae}),children:[E&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--lg"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),K&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:le,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:oe})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:oe})),W&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:se})]}),Y&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--md"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),q&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:me})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:me})),J&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:ne})]}),ee&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--sm"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),Z&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:de,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:re})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:re})),X&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:ce})]}),(0,l.jsxs)("div",{className:B,children:[z&&U&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),z&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),z&&F&&(0,l.jsx)("div",{className:"smb-section__lede-wrapper",children:(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskGradientColor:D,maskOpacity:V,textColor:R,parallax:S,isSlim:O}=e,L=a,M=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${P}`,`smb-section-with-bgimage--${T}`,t,{"js-bg-parallax":!!S}),A=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!S}),B=g()("c-container",{"u-slim-width":!!O}),z=!c.RichText.isEmpty(s)&&"none"!==i,U=!c.RichText.isEmpty(o),F=!c.RichText.isEmpty(n),H=0<Number((1-V).toFixed(1)),W="video"===b,K="image"===b||void 0===b,E=!!r,G=h&&!S?`${100*h.x}% ${100*h.y}%`:void 0,J="video"===y,q="image"===y||void 0===y,Y=!!x,Q=w&&!S?`${100*w.x}% ${100*w.y}%`:void 0,X="video"===f,Z="image"===f||void 0===f,ee=!!k,te=C&&!S?`${100*C.x}% ${100*C.y}%`:void 0,ae={color:R||void 0},ie={};($||D)&&(ie.backgroundColor=$,ie.backgroundImage=D);const se={opacity:V,objectPosition:G},oe={opacity:V,objectPosition:G},le={opacity:V,backgroundImage:`url( ${r} )`,backgroundPosition:G},ne={opacity:V,objectPosition:Q},me={opacity:V,objectPosition:Q},ge={opacity:V,backgroundImage:`url( ${x} )`,backgroundPosition:Q},ce={opacity:V,objectPosition:te},re={opacity:V,objectPosition:te},de={opacity:V,backgroundImage:`url( ${k} )`,backgroundPosition:te};return(0,l.jsxs)(L,{...c.useBlockProps.save({className:M,style:ae}),children:[E&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--lg"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),K&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:le,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:oe})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:oe})),W&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:se})]}),Y&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--md"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),q&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:me})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:me})),J&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:ne})]}),ee&&(0,l.jsxs)("div",{className:g()(A,"smb-section-with-bgimage__bgimage--sm"),children:[H&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ie}),Z&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:de,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:re})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:re})),X&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:ce})]}),(0,l.jsxs)("div",{className:B,children:[z&&U&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),z&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),z&&F&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskColor2:D,maskColorAngle:V,maskOpacity:R,textColor:S,parallax:O,isSlim:L}=e,M=a,A=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${P}`,`smb-section-with-bgimage--${T}`,t,{"js-bg-parallax":!!O}),B=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!O}),z=g()("c-container",{"u-slim-width":!!L}),U="video"===b,F="image"===b||void 0===b,H=!!r,W=h&&!O?`${100*h.x}% ${100*h.y}%`:void 0,K="video"===y,E="image"===y||void 0===y,G=!!x,J=w&&!O?`${100*w.x}% ${100*w.y}%`:void 0,q="video"===f,Y="image"===f||void 0===f,Q=!!k,X=C&&!O?`${100*C.x}% ${100*C.y}%`:void 0,Z={color:S||void 0},ee={};$&&(ee.backgroundColor=$,D&&(ee.backgroundImage=`linear-gradient(${V}deg, ${$} 0%, ${D} 100%)`));const te={opacity:R,objectPosition:W},ae={opacity:R,objectPosition:W},ie={opacity:R,backgroundImage:`url( ${r} )`,backgroundPosition:W},se={opacity:R,objectPosition:J},oe={opacity:R,objectPosition:J},le={opacity:R,backgroundImage:`url( ${x} )`,backgroundPosition:J},ne={opacity:R,objectPosition:X},me={opacity:R,objectPosition:X},ge={opacity:R,backgroundImage:`url( ${k} )`,backgroundPosition:X};return(0,l.jsxs)(M,{...c.useBlockProps.save({className:A,style:Z}),children:[H&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--lg"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),F&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ie,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:ae})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:ae})),U&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:te})]}),G&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--md"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),E&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:le,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:oe})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:oe})),K&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:se})]}),Q&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--sm"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),Y&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:me})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:me})),q&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:ne})]}),(0,l.jsxs)("div",{className:z,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0}},supports:{align:["wide","full"]},migrate(e){let t;return e.maskColor2&&(t=`linear-gradient(${e.maskColorAngle}deg, ${ae()(e.maskColor)} 0%, ${ae()(e.maskColor2)} 100%)`,e.maskColor=void 0),{...e,maskGradientColor:t}},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,lgFocalPoint:h,mdImageID:p,mdImageURL:x,mdImageAlt:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageMediaType:f,smImageRepeat:N,smFocalPoint:C,height:T,contentsAlignment:P,maskColor:$,maskColor2:D,maskColorAngle:V,maskOpacity:R,textColor:S,parallax:O,isSlim:L}=e,M=a,A=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${P}`,`smb-section-with-bgimage--${T}`,t,{"js-bg-parallax":!!O}),B=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!O}),z=g()("c-container",{"u-slim-width":!!L}),U="video"===b,F="image"===b||void 0===b,H=!!r,W=h&&!O?`${100*h.x}% ${100*h.y}%`:void 0,K="video"===y,E="image"===y||void 0===y,G=!!x,J=w&&!O?`${100*w.x}% ${100*w.y}%`:void 0,q="video"===f,Y="image"===f||void 0===f,Q=!!k,X=C&&!O?`${100*C.x}% ${100*C.y}%`:void 0,Z={color:S||void 0},ee={};$&&(ee.backgroundColor=$,D&&(ee.backgroundImage=`linear-gradient(${V}deg, ${$} 0%, ${D} 100%)`));const te={opacity:R,objectPosition:W},ae={opacity:R,objectPosition:W},ie={opacity:R,backgroundImage:`url( ${r} )`,backgroundPosition:W},se={opacity:R,objectPosition:J},oe={opacity:R,objectPosition:J},le={opacity:R,backgroundImage:`url( ${x} )`,backgroundPosition:J},ne={opacity:R,objectPosition:X},me={opacity:R,objectPosition:X},ge={opacity:R,backgroundImage:`url( ${k} )`,backgroundPosition:X};return(0,l.jsxs)(M,{...c.useBlockProps.save({className:A,style:Z}),children:[H&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--lg"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),F&&(u?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ie,children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:ae})}):(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:ae})),U&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:te})]}),G&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--md"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),E&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:le,children:(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:oe})}):(0,l.jsx)("img",{src:x,alt:_,className:`wp-image-${p}`,style:oe})),K&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:x,style:se})]}),Q&&(0,l.jsxs)("div",{className:g()(B,"smb-section-with-bgimage__bgimage--sm"),children:[0<Math.abs(1-R)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:ee}),Y&&(N?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:ge,children:(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:me})}):(0,l.jsx)("img",{src:k,alt:I,className:`wp-image-${j}`,style:me})),q&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,style:ne})]}),(0,l.jsxs)("div",{className:z,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,lgImageRepeat:u,mdImageID:h,mdImageURL:p,mdImageAlt:x,mdImageMediaType:_,mdImageRepeat:y,smImageID:v,smImageURL:w,smImageAlt:j,smImageMediaType:k,smImageRepeat:I,height:f,contentsAlignment:N,maskColor:C,maskColor2:T,maskColorAngle:P,maskOpacity:$,textColor:D,parallax:V,isSlim:R}=e,S=a,O=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${N}`,`smb-section-with-bgimage--${f}`,t,{"js-bg-parallax":!!V}),L=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!V}),M=g()("c-container",{"u-slim-width":!!R}),A={color:D||void 0},B={};C&&(B.backgroundColor=C,T&&(B.backgroundImage=`linear-gradient(${P}deg, ${C} 0%, ${T} 100%)`));const z={opacity:$};return(0,l.jsxs)(S,{className:O,style:A,children:[r&&(0,l.jsxs)("div",{className:g()(L,"smb-section-with-bgimage__bgimage--lg"),children:[0<Math.abs(1-$)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:B}),("image"===b||void 0===b)&&u&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:{backgroundImage:`url( ${r} )`},children:(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:z})}),("image"===b||void 0===b)&&!u&&(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:z}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:z})]}),p&&(0,l.jsxs)("div",{className:g()(L,"smb-section-with-bgimage__bgimage--md"),children:[0<Math.abs(1-$)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:B}),("image"===_||void 0===_)&&y&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:{backgroundImage:`url( ${p} )`},children:(0,l.jsx)("img",{src:p,alt:x,className:`wp-image-${h}`,style:z})}),("image"===_||void 0===_)&&!y&&(0,l.jsx)("img",{src:p,alt:x,className:`wp-image-${h}`,style:z}),"video"===_&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:p,style:z})]}),w&&(0,l.jsxs)("div",{className:g()(L,"smb-section-with-bgimage__bgimage--sm"),children:[0<Math.abs(1-$)&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:B}),("image"===k||void 0===k)&&I&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",style:{backgroundImage:`url( ${w} )`},children:(0,l.jsx)("img",{src:w,alt:j,className:`wp-image-${v}`,style:z})}),("image"===k||void 0===k)&&!I&&(0,l.jsx)("img",{src:w,alt:j,className:`wp-image-${v}`,style:z}),"video"===k&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:w,style:z})]}),(0,l.jsxs)("div",{className:M,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0},textColor:{type:"string",default:"#fff"}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageMediaType:x,smImageID:_,smImageURL:y,smImageAlt:v,smImageMediaType:w,height:j,contentsAlignment:k,maskColor:I,maskColor2:f,maskColorAngle:N,maskOpacity:C,textColor:T,parallax:P,isSlim:$}=e,D=a,V=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${k}`,`smb-section-with-bgimage--${j}`,t,{"js-bg-parallax":!!P}),R=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!P}),S=g()("c-container",{"u-slim-width":!!$}),O={color:T||void 0},L={};I&&(L.backgroundColor=I,f&&(L.backgroundImage=`linear-gradient(${N}deg, ${I} 0%, ${f} 100%)`));const M={opacity:C};return(0,l.jsxs)(D,{className:V,style:O,children:[r&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--lg"),children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:L}),("image"===b||void 0===b)&&(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`,style:M}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:r,style:M})]}),h&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--md"),children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:L}),("image"===x||void 0===x)&&(0,l.jsx)("img",{src:h,alt:p,className:`wp-image-${u}`,style:M}),"video"===x&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,style:M})]}),y&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--sm"),children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:L}),("image"===w||void 0===w)&&(0,l.jsx)("img",{src:y,alt:v,className:`wp-image-${_}`,style:M}),"video"===w&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:y,style:M})]}),(0,l.jsxs)("div",{className:S,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,subtitle:o,lede:n,lgImageID:m,lgImageURL:r,lgImageAlt:d,lgImageMediaType:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageMediaType:x,smImageID:_,smImageURL:y,smImageAlt:v,smImageMediaType:w,height:j,contentsAlignment:k,maskColor:I,maskColor2:f,maskColorAngle:N,maskOpacity:C,textColor:T,parallax:P,isSlim:$}=e,D=a,V=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${k}`,`smb-section-with-bgimage--${j}`,t,{"js-bg-parallax":!!P}),R=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!P}),S=g()("c-container",{"u-slim-width":!!$}),O={color:T||void 0},L={};I&&(L.backgroundColor=I,f&&(L.backgroundImage=`linear-gradient(${N}deg, ${I} 0%, ${f} 100%)`));const M={opacity:C};return(0,l.jsxs)(D,{className:V,style:O,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:L}),r&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--lg"),style:M,children:[("image"===b||void 0===b)&&(0,l.jsx)("img",{src:r,alt:d,className:`wp-image-${m}`}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:r})]}),h&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--md"),style:M,children:[("image"===x||void 0===x)&&(0,l.jsx)("img",{src:h,alt:p,className:`wp-image-${u}`}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:h})]}),y&&(0,l.jsxs)("div",{className:g()(R,"smb-section-with-bgimage__bgimage--sm"),style:M,children:[("image"===w||void 0===w)&&(0,l.jsx)("img",{src:y,alt:v,className:`wp-image-${_}`}),"video"===b&&(0,l.jsx)("video",{playsinline:!0,loop:!0,autoPlay:!0,muted:!0,src:y})]}),(0,l.jsxs)("div",{className:S,children:[!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(o)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__subtitle",value:o}),!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),!c.RichText.isEmpty(s)&&!c.RichText.isEmpty(n)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:"div",className:"smb-section__lede",value:n}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se,maskColor2:{type:"string"},maskColorAngle:{type:"number",default:0}},migrate(e){const t=e.imageID,a=e.imageURL,i=e.imageAlt;return{...e,lgImageID:t,lgImageURL:a,lgImageAlt:i}},save({attributes:e,className:t}){const{wrapperTagName:a,titleTagName:i,title:s,imageID:o,imageURL:n,imageAlt:m,height:r,contentsAlignment:d,maskColor:b,maskColor2:u,maskColorAngle:h,maskOpacity:p,textColor:x,parallax:_,isSlim:y}=e,v=a,w=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${d}`,`smb-section-with-bgimage--${r}`,t,{"js-bg-parallax":!!_}),j=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!_}),k=g()("c-container",{"u-slim-width":!!y}),I={color:x||void 0},f={};b&&(f.backgroundColor=b,u&&(f.backgroundImage=`linear-gradient(${h}deg, ${b} 0%, ${u} 100%)`));const N={opacity:p};return(0,l.jsxs)(v,{className:w,style:I,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:f}),n&&(0,l.jsx)("div",{className:j,style:N,children:(0,l.jsx)("img",{src:n,alt:m,className:`wp-image-${o}`})}),(0,l.jsxs)("div",{className:k,children:[!c.RichText.isEmpty(s)&&"none"!==i&&(0,l.jsx)(c.RichText.Content,{tagName:i,className:"smb-section__title",value:s}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{titleTagName:a,title:i,imageID:s,imageURL:o,imageAlt:n,height:m,contentsAlignment:r,maskColor:d,maskOpacity:b,textColor:u,parallax:h,isSlim:p}=e,x=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${r}`,`smb-section-with-bgimage--${m}`,t,{"js-bg-parallax":!!h}),_=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!h}),y=g()("c-container",{"u-slim-width":!!p}),v={color:u||void 0},w={backgroundColor:d||void 0},j={opacity:b};return(0,l.jsxs)("div",{className:x,style:v,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:w}),(0,l.jsx)("div",{className:_,style:j,children:(0,l.jsx)("img",{src:o,alt:n,className:`wp-image-${s}`})}),(0,l.jsxs)("div",{className:y,children:[!c.RichText.isEmpty(i)&&"none"!==a&&(0,l.jsx)(c.RichText.Content,{tagName:a,className:"smb-section__title",value:i}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},migrate(e){const t=!!e.contentsWidth;return{...e,isSlim:t}},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{titleTagName:a,title:i,imageID:s,imageURL:o,imageAlt:n,height:m,contentsAlignment:r,maskColor:d,maskOpacity:b,textColor:u,parallax:h,contentsWidth:p}=e,x=g()("smb-section","smb-section-with-bgimage",`smb-section-with-bgimage--${r}`,`smb-section-with-bgimage--${m}`,t,{"js-bg-parallax":!!h}),_=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!h}),y=g()("c-container",{"u-slim-width":!!p}),v={color:u||void 0},w={backgroundColor:d||void 0},j={opacity:b};return(0,l.jsxs)("div",{className:x,style:v,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:w}),(0,l.jsx)("div",{className:_,style:j,children:(0,l.jsx)("img",{src:o,alt:n,className:`wp-image-${s}`})}),(0,l.jsxs)("div",{className:y,children:[!c.RichText.isEmpty(i)&&"none"!==a&&(0,l.jsx)(c.RichText.Content,{tagName:a,className:"smb-section__title",value:i}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...se},supports:{align:["wide","full"]},save({attributes:e}){const{title:t,imageID:a,imageURL:i,height:s,contentsAlignment:o,maskColor:n,maskOpacity:m,textColor:r,parallax:d}=e;return(0,l.jsxs)("div",{className:g()(`smb-section smb-section-with-bgimage smb-section-with-bgimage--${o} smb-section-with-bgimage--${s}`,{"js-bg-parallax":!!d}),style:{color:r},children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:{backgroundColor:n}}),(0,l.jsx)("div",{className:g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!d}),style:{opacity:m},children:(0,l.jsx)("img",{src:i,alt:"",className:`wp-image-${a}`})}),(0,l.jsxs)("div",{className:"c-container",children:[!c.RichText.isEmpty(t)&&(0,l.jsx)("h2",{className:"smb-section__title",children:(0,l.jsx)(c.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...(0,u.omit)(se,["textColor","parallax"])},supports:{align:["wide","full"]},save({attributes:e}){const{title:t,imageID:a,imageURL:i,height:s,contentsAlignment:o,maskColor:n,maskOpacity:m}=e;return(0,l.jsxs)("div",{className:`smb-section smb-section-with-bgimage smb-section-with-bgimage--${o} smb-section-with-bgimage--${s}`,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:{backgroundColor:n}}),(0,l.jsx)("div",{className:"smb-section-with-bgimage__bgimage",style:{opacity:m},children:(0,l.jsx)("img",{src:i,alt:"",className:`wp-image-${a}`})}),(0,l.jsxs)("div",{className:"c-container",children:[!c.RichText.isEmpty(t)&&(0,l.jsx)("h2",{className:"smb-section__title",children:(0,l.jsx)(c.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...(0,u.omit)(se,["textColor","parallax"])},supports:{align:["wide","full"]},save({attributes:e}){const{title:t,imageURL:a,height:i,contentsAlignment:s,maskColor:o,maskOpacity:n}=e;return(0,l.jsxs)("div",{className:`smb-section smb-section-with-bgimage smb-section-with-bgimage--${s} smb-section-with-bgimage--${i}`,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask",style:{backgroundColor:o}}),(0,l.jsx)("div",{className:"smb-section-with-bgimage__bgimage",style:{opacity:n},children:(0,l.jsx)("img",{src:a,alt:""})}),(0,l.jsxs)("div",{className:"c-container",children:[!c.RichText.isEmpty(t)&&(0,l.jsx)("h2",{className:"smb-section__title",children:(0,l.jsx)(c.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}},{attributes:{...(0,u.omit)(se,["maskColor","maskOpacity","textColor","parallax"])},supports:{align:["wide","full"]},save({attributes:e}){const{title:t,imageURL:a,height:i,contentsAlignment:s}=e;return(0,l.jsxs)("div",{className:`smb-section smb-section-with-bgimage smb-section-with-bgimage--${s} smb-section-with-bgimage--${i}`,children:[(0,l.jsx)("div",{className:"smb-section-with-bgimage__bgimage",children:a&&(0,l.jsx)("img",{src:a,alt:""})}),(0,l.jsxs)("div",{className:"c-container",children:[!c.RichText.isEmpty(t)&&(0,l.jsx)("h2",{className:"smb-section__title",children:(0,l.jsx)(c.RichText.Content,{value:t})}),(0,l.jsx)("div",{className:"smb-section__body",children:(0,l.jsx)(c.InnerBlocks.Content,{})})]})]})}}],ne={to:[{type:"block",blocks:["snow-monkey-blocks/section"],transform:(e,t)=>(0,i.createBlock)("snow-monkey-blocks/section",e,t)},{type:"block",blocks:["snow-monkey-blocks/section-break-the-grid"],transform:(e,t)=>(e.imageID=e.lgImageID||e.mdImageID||e.smImageID,e.imageURL=e.lgImageURL||e.mdImageURL||e.smImageURL,e.imageAlt=e.lgImageAlt||e.mdImageAlt||e.smImageAlt,e.imageWidth=e.lgImageWidth||e.mdImageWidth||e.smImageWidth,e.imageHeight=e.lgImageHeight||e.mdImageHeight||e.smImageHeight,e.imageMediaType=e.lgImageMediaType||e.mdImageMediaType||e.smImageMediaType,(0,i.createBlock)("snow-monkey-blocks/section-break-the-grid",e,t))},{type:"block",blocks:["snow-monkey-blocks/section-side-heading"],transform:(e,t)=>(0,i.createBlock)("snow-monkey-blocks/section-side-heading",e,t)}]},me={attributes:{title:"Lorem ipsum dolor sit amet",imageID:1,imageURL:`${smb.pluginUrl}/dist/img/photos/dist/img/photos/stocksnap_lgg8nat9jy.jpg`,maskColor:"#000",maskOpacity:.7},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"}}]};(0,i.registerBlockType)(o.UU,{icon:{foreground:"#cd162c",src:n},keywords:[(0,s.__)("Outer","snow-monkey-blocks"),(0,s.__)("Wrapper","snow-monkey-blocks"),(0,s.__)("Container","snow-monkey-blocks"),(0,s.__)("Main visual","snow-monkey-blocks"),(0,s.__)("Image","snow-monkey-blocks"),(0,s.__)("Header image","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:t,isSelected:a,className:i,clientId:n}){const{align:m,lgImageID:u,lgImageURL:h,lgImageAlt:p,lgImageWidth:x,lgImageHeight:_,lgImageMediaType:y,lgImageRepeat:w,lgFocalPoint:k,lgImageSizeSlug:f,mdImageID:C,mdImageURL:P,mdImageAlt:D,mdImageWidth:V,mdImageHeight:R,mdImageMediaType:S,mdImageRepeat:L,mdFocalPoint:M,mdImageSizeSlug:A,smImageID:B,smImageURL:z,smImageAlt:U,smImageWidth:F,smImageHeight:W,smImageMediaType:K,smImageRepeat:E,smFocalPoint:te,smImageSizeSlug:ae,contentsAlignment:ie,maskColor:se,maskGradientColor:oe,maskOpacity:le,textColor:ne,parallax:me,contentJustification:ge,itemsAlignment:ce,title:re,subtitle:de,lede:be,wrapperTagName:ue,titleTagName:he,height:pe,disableCustomHeight:xe,containerAlign:_e,disableContainerPadding:ye,contentsMaxWidth:ve,isSlim:we,topDividerType:je,topDividerLevel:ke,topDividerColor:Ie,topDividerVerticalPosition:fe,topDividerOverlay:Ne,bottomDividerType:Ce,bottomDividerLevel:Te,bottomDividerColor:Pe,bottomDividerVerticalPosition:$e,bottomDividerOverlay:De,backgroundText:Ve,templateLock:Re}=e,Se=(0,d.useSelect)((e=>!!e("core/block-editor").getBlock(n)?.innerBlocks?.length),[n]),Oe=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),{lgImage:Le,mdImage:Me,smImage:Ae}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e("core");return{lgImage:u?t("postType","attachment",u):null,mdImage:C?t("postType","attachment",C):null,smImage:B?t("postType","attachment",B):null}}),[u,C,B]),Be=Oe.filter((({slug:e})=>Le?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),ze=Oe.filter((({slug:e})=>Me?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),Ue=Oe.filter((({slug:e})=>Ae?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),Fe=ue,He="fit"!==pe,We=g()("smb-section","smb-section-with-bgimage",i,{[`smb-section--${ie}`]:!!ie,[`smb-section--${pe}`]:!!pe&&xe,[`is-items-alignment-${ce}`]:!!ce&&He,"smb-section--top-divider-no-overlay":!Ne,"smb-section--bottom-divider-no-overlay":!De,"js-bg-parallax":!!me}),Ke=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!me}),Ee=g()("smb-section__inner",{[`is-content-justification-${ge}`]:!!ge}),Ge=g()("c-container",{alignfull:("full"===_e||"contents-full"===_e)&&"full"===m,alignwide:"wide"===_e||"contents-wide"===_e&&"full"===m,"c-container--no-padding":ye});let Je=Ge.replace("c-container--no-padding","").trim();"contents-wide"!==_e&&"contents-full"!==_e||(Je=Je.replace("alignfull","").replace("alignwide","").trim());const qe=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${ie}`]:!!ie,"u-slim-width":we&&!ve}),Ye=0<Number((1-le).toFixed(1)),Qe="video"===y,Xe="image"===y||void 0===y,Ze=!!h,et=Qe||Xe&&Ze&&!me,tt=k&&!me?`${100*k.x}% ${100*k.y}%`:void 0,at="video"===S,it="image"===S||void 0===S,st=!!P,ot=at||it&&st&&!me,lt=M&&!me?`${100*M.x}% ${100*M.y}%`:void 0,nt="video"===K,mt="image"===K||void 0===K,gt=!!z,ct=nt||mt&>&&!me,rt=te&&!me?`${100*te.x}% ${100*te.y}%`:void 0,dt={"--smb-section--color":ne||void 0,"--smb-section--contents-wrapper-width":ve&&!we?ve:void 0,"--smb-section--min-height":pe&&!xe?pe:void 0,"--smb-section-with-bgimage--mask-color":se||void 0,"--smb-section-with-bgimage--mask-image":oe||void 0,"--smb-section-with-bgimage--mask-opacity":String(le),"--smb-section-with-bgimage--lg-media-position":tt,"--smb-section-with-bgimage--lg-repeatable-image":w&&h?`url(${h})`:void 0,"--smb-section-with-bgimage--md-media-position":lt,"--smb-section-with-bgimage--md-repeatable-image":L&&P?`url(${P})`:void 0,"--smb-section-with-bgimage--sm-media-position":rt,"--smb-section-with-bgimage--sm-repeatable-image":E&&z?`url(${z})`:void 0,...Y({topDividerVerticalPosition:fe,topDividerLevel:ke,bottomDividerVerticalPosition:$e,bottomDividerLevel:Te,backgroundText:Ve})},bt=(0,c.useBlockProps)({className:We,style:dt}),ut=(0,c.useInnerBlocksProps)({className:["smb-section__body"]},{templateLock:Re,renderAppender:Se?void 0:c.InnerBlocks.ButtonBlockAppender}),ht=$(),[pt]=null!=c.useSettings?(0,c.useSettings)("typography.fontSizes"):[(0,c.useSetting)("typography.fontSizes")].filter(Boolean),xt={...Ve,position:{...Ve.position}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.InspectorControls,{group:"color",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{...(0,c.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:n,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:ne,onColorChange:e=>t({textColor:e}),resetAllFilter:()=>({textColor:o.uK.textColor?.default}),label:(0,s.__)("Text color","snow-monkey-blocks")}]})}),(0,l.jsxs)(c.InspectorControls,{children:[(0,l.jsx)(O,{disableIsSlim:!!ve,disableContentsMaxWidth:we,disableContainerAlign:"full"!==m,disableCustomHeight:xe,settings:[{wrapperTagNameValue:ue,onWrapperTagNameChange:e=>t({wrapperTagName:e}),defaultValue:o.uK.wrapperTagName.default},{titleTagNameValue:he,onTitleTagNameChange:e=>t({titleTagName:e}),defaultValue:o.uK.titleTagName.default},{heightValue:pe,onHeightChange:(e,a)=>t({height:e,disableCustomHeight:a}),defaultValue:o.uK.height.default,defaultDisableCustomHeightValue:o.uK.disableCustomHeight.default},{contentsContainerControl:!0,containerAlignValue:_e,onContainerAlignChange:e=>t({containerAlign:e}),defaultValue:o.uK.containerAlign.default},{disableContainerPaddingValue:ye,onDisableContainerPaddingChange:e=>t({disableContainerPadding:e}),defaultValue:o.uK.disableContainerPadding.default},{contentsMaxWidthValue:ve,onContentsMaxWidthChange:e=>t({contentsMaxWidth:e}),defaultValue:o.uK.contentsMaxWidth.default},{isSlimValue:we,onIsSlimChange:e=>t({isSlim:e}),defaultValue:o.uK.isSlim.default}]}),(0,l.jsxs)(r.__experimentalToolsPanel,{label:(0,s.__)("Media settings","snow-monkey-blocks"),dropdownMenuProps:ht,children:[(Ze||st||gt)&&(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>me!==o.uK.parallax.default,isShownByDefault:!0,label:(0,s.__)("Parallax (Deprecated)","snow-monkey-blocks"),onDeselect:()=>t({parallax:o.uK.parallax.default}),children:(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Parallax (Deprecated)","snow-monkey-blocks"),checked:me,onChange:e=>t({parallax:e}),help:(0,s.__)("This setting is being retained for backwards compatibility and is not recommended for use. Its use may slow down the page display.","snow-monkey-blocks")})}),(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>w!==o.uK.lgImageRepeat.default||f!==o.uK.lgImageSizeSlug.default||k!==o.uK.lgFocalPoint.default||L!==o.uK.mdImageRepeat.default||A!==o.uK.mdImageSizeSlug.default||M!==o.uK.mdFocalPoint.default||E!==o.uK.smImageRepeat.default||ae!==o.uK.smImageSizeSlug.default||te!==o.uK.smFocalPoint.default,isShownByDefault:!0,label:(0,s.__)("Image settings","snow-monkey-blocks"),onDeselect:()=>t({lgImageRepeat:o.uK.lgImageRepeat.default,lgImageSizeSlug:o.uK.lgImageSizeSlug.default,lgFocalPoint:o.uK.lgFocalPoint.default,mdImageRepeat:o.uK.mdImageRepeat.default,mdImageSizeSlug:o.uK.mdImageSizeSlug.default,mdFocalPoint:o.uK.mdFocalPoint.default,smImageRepeat:o.uK.smImageRepeat.default,smImageSizeSlug:o.uK.smImageSizeSlug.default,smFocalPoint:o.uK.smFocalPoint.default}),children:(0,l.jsx)(b,{desktop:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"smb-image-size-control",children:(0,l.jsx)(v,{src:h,id:u,alt:p,width:x,height:_,onSelect:e=>{const a=e?.sizes?.[f]?f:Z,i=e?.sizes?.[a]?.url,s=e?.sizes?.[a]?.width,o=e?.sizes?.[a]?.height;t({lgImageURL:i||e.url,lgImageID:e.id,lgImageAlt:e.alt,lgImageWidth:s||e.width,lgImageHeight:o||e.height,lgImageMediaType:N(e),lgImageSizeSlug:a})},onSelectURL:e=>{e!==h&&t({lgImageURL:e,lgImageID:0,lgImageSizeSlug:Z,lgImageMediaType:N({media_type:T(e)?"video":"image"})})},onRemove:()=>t({lgImageURL:o.uK.lgImageURL.default,lgImageAlt:o.uK.lgImageAlt.default,lgImageWidth:o.uK.lgImageWidth.default,lgImageHeight:o.uK.lgImageHeight.default,lgImageID:o.uK.lgImageID.default,lgImageMediaType:o.uK.lgImageMediaType.default}),mediaType:y,allowedTypes:X})}),Ze&&Xe&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Repeat images","snow-monkey-blocks"),checked:w,onChange:e=>t({lgImageRepeat:e})}),(0,l.jsx)(j,{defaultValue:o.uK.lgImageSizeSlug.default,value:f,options:Be,onChange:e=>{const a=Le?.media_details?.sizes?.[e]?.source_url,i=Le?.media_details?.sizes?.[e]?.width,s=Le?.media_details?.sizes?.[e]?.height;t({lgImageURL:a,lgImageWidth:i,lgImageHeight:s,lgImageSizeSlug:e})},withToolsPanelItem:!1})]}),et&&(0,l.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Focal point picker","snow-monkey-blocks"),url:h,value:k,onChange:e=>{t({lgFocalPoint:e})}})]}),tablet:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"smb-image-size-control",children:(0,l.jsx)(v,{src:P,id:C,alt:D,width:V,height:R,onSelect:e=>{const a=e?.sizes?.[A]?A:Z,i=e?.sizes?.[a]?.url,s=e?.sizes?.[a]?.width,o=e?.sizes?.[a]?.height;t({mdImageURL:i||e.url,mdImageID:e.id,mdImageAlt:e.alt,mdImageWidth:s||e.width,mdImageHeight:o||e.height,mdImageMediaType:N(e),mdImageSizeSlug:a})},onSelectURL:e=>{e!==P&&t({mdImageURL:e,mdImageID:0,mdImageSizeSlug:Z,mdImageMediaType:N({media_type:T(e)?"video":"image"})})},onRemove:()=>t({mdImageURL:o.uK.mdImageURL.default,mdImageAlt:o.uK.mdImageAlt.default,mdImageWidth:o.uK.mdImageWidth.default,mdImageHeight:o.uK.mdImageHeight.default,mdImageID:o.uK.mdImageID.default,mdImageMediaType:o.uK.mdImageMediaType.default}),mediaType:S,allowedTypes:X})}),st&&it&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Repeat images","snow-monkey-blocks"),checked:L,onChange:e=>t({mdImageRepeat:e})}),(0,l.jsx)(j,{defaultValue:o.uK.mdImageSizeSlug.default,value:A,options:ze,onChange:e=>{const a=Me?.media_details?.sizes?.[e]?.source_url,i=Me?.media_details?.sizes?.[e]?.width,s=Me?.media_details?.sizes?.[e]?.height;t({mdImageURL:a,mdImageWidth:i,mdImageHeight:s,mdImageSizeSlug:e})},withToolsPanelItem:!1})]}),ot&&(0,l.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Focal point picker","snow-monkey-blocks"),url:P,value:M,onChange:e=>{t({lgFocalPoint:e})}})]}),mobile:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"smb-image-size-control",children:(0,l.jsx)(v,{src:z,id:B,alt:U,width:F,height:W,onSelect:e=>{const a=e?.sizes?.[ae]?ae:Z,i=e?.sizes?.[a]?.url,s=e?.sizes?.[a]?.width,o=e?.sizes?.[a]?.height;t({smImageURL:i||e.url,smImageID:e.id,smImageAlt:e.alt,smImageWidth:s||e.width,smImageHeight:o||e.height,smImageMediaType:N(e),smImageSizeSlug:a})},onSelectURL:e=>{e!==z&&t({smImageURL:e,smImageID:0,smImageSizeSlug:Z,smImageMediaType:N({media_type:T(e)?"video":"image"})})},onRemove:()=>t({smImageURL:o.uK.smImageURL.default,smImageAlt:o.uK.smImageAlt.default,smImageWidth:o.uK.smImageWidth.default,smImageHeight:o.uK.smImageHeight.default,smImageID:o.uK.smImageID.default,smImageMediaType:o.uK.smImageMediaType.default}),mediaType:K,allowedTypes:X})}),gt&&mt&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Repeat images","snow-monkey-blocks"),checked:E,onChange:e=>t({smImageRepeat:e})}),(0,l.jsx)(j,{defaultValue:o.uK.smImageSizeSlug.default,value:ae,options:Ue,onChange:e=>{const a=Ae?.media_details?.sizes?.[e]?.source_url,i=Ae?.media_details?.sizes?.[e]?.width,s=Ae?.media_details?.sizes?.[e]?.height;t({smImageURL:a,smImageWidth:i,smImageHeight:s,smImageSizeSlug:e})},withToolsPanelItem:!1})]}),ct&&(0,l.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Focal point picker","snow-monkey-blocks"),url:z,value:te,onChange:e=>{t({lgFocalPoint:e})}})]})})})]}),(0,l.jsxs)(r.__experimentalToolsPanel,{label:(0,s.__)("Overlay","snow-monkey-blocks"),dropdownMenuProps:ht,children:[(0,l.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,l.jsx)(c.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,s.__)("Color","snow-monkey-blocks"),colorValue:se,gradientValue:oe,onColorChange:e=>t({maskColor:e}),onGradientChange:e=>t({maskGradientColor:e})}],__experimentalIsRenderedInSidebar:!0,...(0,c.__experimentalUseMultipleOriginColorsAndGradients)()})}),(!!se||!!oe)&&(0,l.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>le!==o.uK.maskOpacity.default,isShownByDefault:!0,label:(0,s.__)("Opacity","snow-monkey-blocks"),onDeselect:()=>t({maskOpacity:o.uK.maskOpacity.default}),children:(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Opacity","snow-monkey-blocks"),value:Number((1-le).toFixed(1)),onChange:e=>t({maskOpacity:I((1-e).toFixed(1),0,1)}),min:0,max:1,step:.1})})]}),(0,l.jsx)(q,{settings:[{textValue:Ve.text,onTextChange:e=>{xt.text=e,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.text},{fontSizeValue:Ve.fontSize,onFontSizeChange:e=>{const a=pt.filter((t=>!!t?.size&&e===t?.size));xt.fontSize=e,xt.fontSizeSlug=0<a.length&&a[0]?.slug?a[0].slug:"",t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.fontSize},{lineHeightValue:Ve.lineHeight,onLineHeightChange:e=>{xt.lineHeight=e,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.lineHeight},{colorValue:Ve.color,onColorChange:e=>{xt.color=e,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.color},{opacityValue:Ve.opacity,onOpacityChange:e=>{xt.opacity=e,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.opacity},{positionValue:Ve.position,onPositionChange:e=>{xt.position.top=null!=e?.top&&e?.top.match(/^\d+$/)?`${e?.top}px`:e?.top,xt.position.right=null!=e?.right&&e?.right.match(/^\d+$/)?`${e?.right}px`:e?.right,xt.position.bottom=null!=e?.bottom&&e?.bottom.match(/^\d+$/)?`${e?.bottom}px`:e?.bottom,xt.position.left=null!=e?.left&&e?.left.match(/^\d+$/)?`${e?.left}px`:e?.left,t({backgroundText:{...xt}})},defaultValue:o.uK.backgroundText.default.position}]}),(0,l.jsx)(G,{settings:[{typeValue:je,onTypeChange:e=>t({topDividerType:e}),defaultValue:o.uK.topDividerType.default},{levelValue:ke,onLevelChange:e=>t({topDividerLevel:I(e,-100,100)}),defaultValue:o.uK.topDividerLevel.default},{colorValue:Ie,onColorChange:e=>t({topDividerColor:e}),defaultColorValue:o.uK.topDividerColor.default},{verticalPositionValue:fe,onVerticalPositionChange:e=>t({topDividerVerticalPosition:e}),defaultValue:o.uK.topDividerVerticalPosition.default},{overlayValue:Ne,onOverlayChange:e=>t({topDividerOverlay:e}),defaultValue:o.uK.topDividerOverlay.default}]}),(0,l.jsx)(J,{settings:[{typeValue:Ce,onTypeChange:e=>t({bottomDividerType:e}),defaultValue:o.uK.bottomDividerType.default},{levelValue:Te,onLevelChange:e=>t({bottomDividerLevel:I(e,-100,100)}),defaultValue:o.uK.bottomDividerLevel.default},{colorValue:Pe,onColorChange:e=>t({bottomDividerColor:e}),defaultColorValue:o.uK.bottomDividerColor.default},{verticalPositionValue:$e,onVerticalPositionChange:e=>t({bottomDividerVerticalPosition:e}),defaultValue:o.uK.bottomDividerVerticalPosition.default},{overlayValue:De,onOverlayChange:e=>t({bottomDividerOverlay:e}),defaultValue:o.uK.bottomDividerOverlay.default}]})]}),(0,l.jsxs)(c.BlockControls,{group:"block",children:[He&&(0,l.jsx)(c.BlockVerticalAlignmentToolbar,{onChange:e=>t({itemsAlignment:e}),value:ce}),(0,l.jsx)(c.JustifyToolbar,{allowedControls:ee,onChange:e=>t({contentJustification:e}),value:ge}),(0,l.jsx)(c.AlignmentToolbar,{value:ie,onChange:e=>t({contentsAlignment:e})})]}),(0,l.jsxs)(Fe,{...bt,children:[Ze&&(0,l.jsxs)("div",{className:g()(Ke,"smb-section-with-bgimage__bgimage--lg"),children:[Ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),Xe&&(w?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})}):(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})),Qe&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,width:x,height:_})]}),st&&(0,l.jsxs)("div",{className:g()(Ke,"smb-section-with-bgimage__bgimage--md"),children:[Ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),it&&(L?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:P,alt:D,width:V,height:R,className:`wp-image-${C}`})}):(0,l.jsx)("img",{src:P,alt:D,width:V,height:R,className:`wp-image-${C}`})),at&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:P,width:V,height:R})]}),gt&&(0,l.jsxs)("div",{className:g()(Ke,"smb-section-with-bgimage__bgimage--sm"),children:[Ye&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),mt&&(E?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:z,alt:U,width:F,height:W,className:`wp-image-${B}`})}):(0,l.jsx)("img",{src:z,alt:U,width:F,height:W,className:`wp-image-${B}`})),nt&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:z,width:F,height:W})]}),(0,l.jsx)(Q,{topDividerType:je,topDividerLevel:ke,topDividerColor:Ie,bottomDividerType:Ce,bottomDividerLevel:Te,bottomDividerColor:Pe,backgroundText:Ve,containerClasses:Ge}),(0,l.jsx)("div",{className:Ee,children:(0,l.jsx)("div",{className:Ge,children:(0,l.jsxs)("div",{className:qe,children:[(0,l.jsx)(H,{isSelected:a,hasContainer:ye&&"full"===_e&&"full"===m||"contents-wide"===_e||"contents-full"===_e,containerClassName:Je,settings:[{subtitleValue:de,onSubtitleChange:e=>t({subtitle:e})},{titleTagNameValue:he,titleValue:re,onTitleChange:e=>t({title:e})},{ledeValue:be,onLedeChange:e=>t({lede:e})}]}),(0,l.jsx)("div",{...ut})]})})})]})]})},save:function({attributes:e,className:t}){const{align:a,lgImageID:i,lgImageURL:s,lgImageAlt:o,lgImageWidth:n,lgImageHeight:m,lgImageMediaType:r,lgImageRepeat:d,lgFocalPoint:b,mdImageID:u,mdImageURL:h,mdImageAlt:p,mdImageWidth:x,mdImageHeight:_,mdImageMediaType:y,mdImageRepeat:v,mdFocalPoint:w,smImageID:j,smImageURL:k,smImageAlt:I,smImageWidth:f,smImageHeight:N,smImageMediaType:C,smImageRepeat:T,smFocalPoint:P,contentsAlignment:$,maskColor:D,maskGradientColor:V,maskOpacity:R,textColor:S,parallax:O,contentJustification:L,itemsAlignment:M,title:A,subtitle:B,lede:z,wrapperTagName:U,titleTagName:F,height:H,disableCustomHeight:W,containerAlign:E,disableContainerPadding:G,contentsMaxWidth:J,isSlim:q,topDividerType:X,topDividerLevel:Z,topDividerColor:ee,topDividerVerticalPosition:te,topDividerOverlay:ae,bottomDividerType:ie,bottomDividerLevel:se,bottomDividerColor:oe,bottomDividerVerticalPosition:le,bottomDividerOverlay:ne,backgroundText:me}=e,ge=U,ce="fit"!==H,re=g()("smb-section","smb-section-with-bgimage",t,{[`smb-section--${$}`]:!!$,[`smb-section--${H}`]:!!H&&W,[`is-items-alignment-${M}`]:!!M&&ce,"smb-section--top-divider-no-overlay":!ae,"smb-section--bottom-divider-no-overlay":!ne,"js-bg-parallax":!!O}),de=g()("smb-section-with-bgimage__bgimage",{"js-bg-parallax__bgimage":!!O}),be=g()("smb-section__inner",{[`is-content-justification-${L}`]:!!L}),ue=g()("c-container",{alignfull:("full"===E||"contents-full"===E)&&"full"===a,alignwide:"wide"===E||"contents-wide"===E&&"full"===a,"c-container--no-padding":G});let he=ue.replace("c-container--no-padding","").trim();"contents-wide"!==E&&"contents-full"!==E||(he=he.replace("alignfull","").replace("alignwide","").trim());const pe=g()("smb-section__contents-wrapper",{[`smb-section__contents-wrapper--${$}`]:!!$,"u-slim-width":q&&!J}),xe=0<Number((1-R).toFixed(1)),_e="video"===r,ye="image"===r||void 0===r,ve=!!s,we=b&&!O?`${100*b.x}% ${100*b.y}%`:void 0,je="video"===y,ke="image"===y||void 0===y,Ie=!!h,fe=w&&!O?`${100*w.x}% ${100*w.y}%`:void 0,Ne="video"===C,Ce="image"===C||void 0===C,Te=!!k,Pe=P&&!O?`${100*P.x}% ${100*P.y}%`:void 0,$e={"--smb-section--color":S||void 0,"--smb-section--contents-wrapper-width":J&&!q?J:void 0,"--smb-section--min-height":H&&!W?H:void 0,"--smb-section-with-bgimage--mask-color":D||void 0,"--smb-section-with-bgimage--mask-image":V||void 0,"--smb-section-with-bgimage--mask-opacity":String(R),"--smb-section-with-bgimage--lg-media-position":we,"--smb-section-with-bgimage--lg-repeatable-image":d&&s?`url(${s})`:void 0,"--smb-section-with-bgimage--md-media-position":fe,"--smb-section-with-bgimage--md-repeatable-image":v&&h?`url(${h})`:void 0,"--smb-section-with-bgimage--sm-media-position":Pe,"--smb-section-with-bgimage--sm-repeatable-image":T&&k?`url(${k})`:void 0,...Y({topDividerVerticalPosition:te,topDividerLevel:Z,bottomDividerVerticalPosition:le,bottomDividerLevel:se,backgroundText:me})};return(0,l.jsxs)(ge,{...c.useBlockProps.save({className:re,style:$e}),children:[ve&&(0,l.jsxs)("div",{className:g()(de,"smb-section-with-bgimage__bgimage--lg"),children:[xe&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),ye&&(d?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})}):(0,l.jsx)("img",{src:s,alt:o,width:n,height:m,className:`wp-image-${i}`})),_e&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:s,width:n,height:m})]}),Ie&&(0,l.jsxs)("div",{className:g()(de,"smb-section-with-bgimage__bgimage--md"),children:[xe&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),ke&&(v?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})}):(0,l.jsx)("img",{src:h,alt:p,width:x,height:_,className:`wp-image-${u}`})),je&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:h,width:x,height:_})]}),Te&&(0,l.jsxs)("div",{className:g()(de,"smb-section-with-bgimage__bgimage--sm"),children:[xe&&(0,l.jsx)("div",{className:"smb-section-with-bgimage__mask"}),Ce&&(T?(0,l.jsx)("div",{className:"smb-section-with-bgimage__repeatable-image",children:(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})}):(0,l.jsx)("img",{src:k,alt:I,width:f,height:N,className:`wp-image-${j}`})),Ne&&(0,l.jsx)("video",{playsInline:!0,loop:!0,autoPlay:!0,muted:!0,src:k,width:f,height:N})]}),(0,l.jsx)(Q,{topDividerType:X,topDividerLevel:Z,topDividerColor:ee,bottomDividerType:ie,bottomDividerLevel:se,bottomDividerColor:oe,backgroundText:me,containerClasses:ue}),(0,l.jsx)("div",{className:be,children:(0,l.jsx)("div",{className:ue,children:(0,l.jsxs)("div",{className:pe,children:[(0,l.jsx)(K,{title:A,titleTagName:F,subtitle:B,lede:z,hasContainer:G&&"full"===E&&"full"===a||"contents-wide"===E||"contents-full"===E,containerClassName:he}),(0,l.jsx)("div",{...c.useInnerBlocksProps.save({className:"smb-section__body"})})]})})})]})},deprecated:le,transforms:ne,example:me})},3558:e=>{"use strict";var t=function(e){return parseInt(e,16)};e.exports=function(e,a){var i,s,o=function(e){return"#"===e.charAt(0)?e.slice(1):e}(e),l=function(e){var a=e.g,i=e.b,s=e.a;return{r:t(e.r),g:t(a),b:t(i),a:+(t(s)/255).toFixed(2)}}({r:(s=3===(i=o).length||4===i.length)?"".concat(i.slice(0,1)).concat(i.slice(0,1)):i.slice(0,2),g:s?"".concat(i.slice(1,2)).concat(i.slice(1,2)):i.slice(2,4),b:s?"".concat(i.slice(2,3)).concat(i.slice(2,3)):i.slice(4,6),a:(s?"".concat(i.slice(3,4)).concat(i.slice(3,4)):i.slice(6,8))||"ff"});return function(e,t){var a,i=e.r,s=e.g,o=e.b,l=e.a,n=(a=t,!isNaN(parseFloat(a))&&isFinite(a)?t:l);return"rgba(".concat(i,", ").concat(s,", ").concat(o,", ").concat(n,")")}(l,a)}},6942:(e,t)=>{var a;!function(){"use strict";var i={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=l(e,o(a)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var a in e)i.call(e,a)&&e[a]&&(t=l(t,a));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(a=function(){return s}.apply(t,[]))||(e.exports=a)}()}},a={};function i(e){var s=a[e];if(void 0!==s)return s.exports;var o=a[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.m=t,e=[],i.O=(t,a,s,o)=>{if(!a){var l=1/0;for(c=0;c<e.length;c++){for(var[a,s,o]=e[c],n=!0,m=0;m<a.length;m++)(!1&o||l>=o)&&Object.keys(i.O).every((e=>i.O[e](a[m])))?a.splice(m--,1):(n=!1,o<l&&(l=o));if(n){e.splice(c--,1);var g=s();void 0!==g&&(t=g)}}return t}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,s,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={79:0,6199:0};i.O.j=t=>0===e[t];var t=(t,a)=>{var s,o,[l,n,m]=a,g=0;if(l.some((t=>0!==e[t]))){for(s in n)i.o(n,s)&&(i.m[s]=n[s]);if(m)var c=m(i)}for(t&&t(a);g<l.length;g++)o=l[g],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(c)},a=globalThis.webpackChunk=globalThis.webpackChunk||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var s=i.O(void 0,[6199],(()=>i(5240)));s=i.O(s)})(); -
snow-monkey-blocks/trunk/dist/blocks/slider/item/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'a 1b8944a2b3bfb47da1b');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'a32dbb1958b9d2c43f9b'); -
snow-monkey-blocks/trunk/dist/blocks/slider/item/index.js
r3390754 r3400189 1 (()=>{var e={6942:(e,t)=>{var i;!function(){"use strict";var s={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=o(e,a(i)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var i in e)s.call(e,i)&&e[i]&&(t=o(t,i));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(i=function(){return l}.apply(t,[]))||(e.exports=i)}()}},t={};function i(s){var l=t[s];if(void 0!==l)return l.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/slider-item","uK":{"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-slider__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-slider__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-slider__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-slider__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"caption":{"type":"string","source":"html","selector":".smb-slider__item__caption","default":""},"url":{"type":"string","default":""},"target":{"type":"string","default":"_self"}}}'),s=window.ReactJSXRuntime,l=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.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,s.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,s.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,s.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 a=i(6942),o=i.n(a);const r=window.wp.blockEditor,n=window.wp.components,c=window.wp.compose,d=window.wp.data,m=window.wp.element,u=window.wp.i18n,g=window.wp.primitives;var h=(0,s.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(g.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const p=window.lodash,_=({id:e,src:t,allowedTypes:i,accept:l,onSelect:a,onSelectURL:o,onRemove:c})=>(0,s.jsxs)(r.BlockControls,{group:"inline",children:[(0,s.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:i,accept:l,onSelect:a,onSelectURL:o}),!!t&&!!c&&(0,s.jsx)(n.ToolbarButton,{onClick:c,children:(0,u.__)("Release","snow-monkey-blocks")})]}),f=({src:e,alt:t,id:i,style:l,width:a,height:o})=>(0,s.jsx)("img",{src:e,alt:t,className:`wp-image-${i}`,style:l,width:a,height:o}),w=({src:e,style:t,width:i,height:l})=>(0,s.jsx)("video",{src:e,style:t,width:i,height:l}),x=(0,m.memo)((({id:e,src:t,alt:i,url:l,width:a,height:o,target:r,allowedTypes:n,accept:c,onSelect:d,onSelectURL:m,onRemove:u,mediaType:g,style:h,rel:x,linkClass:v})=>{let b;if("image"===g){let n;b=(0,s.jsx)(f,{src:t,alt:i,id:e,style:h,width:a,height:o}),n=x?(0,p.isEmpty)(x)?void 0:x:"_self"!==r&&r?"noopener noreferrer":void 0,l&&(b=(0,s.jsx)("span",{href:l,target:"_self"===r?void 0:r,rel:n,className:v,children:b}))}else"video"===g&&(b=(0,s.jsx)(w,{src:t,style:h,width:a,height:o}));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_,{id:e,src:t,allowedTypes:n,accept:c,onSelect:d,onSelectURL:m,onRemove:u}),b]})}),((e,t)=>{const i=Object.keys(e);for(const s of i)if(e[s]!==t[s])return!1;return!0}));function v(e){const{src:t,onSelect:i,onSelectURL:l,mediaType:a,allowedTypes:o=["image"]}=e,n=!a&&t?"image":a;let c=(0,u.__)("Media","snow-monkey-blocks");1===o.length&&("image"===o[0]?c=(0,u.__)("Image","snow-monkey-blocks"):"video"===o[0]&&(c=(0,u.__)("Video","snow-monkey-blocks")));const d=(0,m.useMemo)((()=>o.map((e=>`${e}/*`)).join(",")),[o]);return t?(0,s.jsx)(x,{...e,accept:d,allowedTypes:o,mediaType:n}):(0,s.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:c},onSelect:i,onSelectURL:l,accept:d,allowedTypes:o})}const b=[{label:(0,u._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,u._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,u._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,u._x)("Full Size","Image size option for resolution control"),value:"full"}];function j({panelId:e,value:t,onChange:i,options:l=b,defaultValue:a=b[0].value,isShownByDefault:o=!0,withToolsPanelItem:r=!0}){const c=null!=t?t:a,d=()=>(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,u.__)("Resolution"),value:c,options:l,onChange:i,help:(0,u.__)("Select the size of the source image."),size:"__unstable-large"});return r?(0,s.jsx)(n.__experimentalToolsPanelItem,{hasValue:()=>c!==a,label:(0,u.__)("Resolution"),onDeselect:()=>i(a),isShownByDefault:o,panelId:e,children:(0,s.jsx)(d,{})}):(0,s.jsx)(d,{})}const y=["image"],S="full",k=[{attributes:{...t.uK},save({attributes:e,className:t}){const{imageID:i,imageURL:l,imageAlt:a,imageWidth:n,imageHeight:c,caption:d,url:m,target:u}=e,g=o()("smb-slider__item",t),h=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"smb-slider__item__figure",children:(0,s.jsx)("img",{src:l,alt:a,width:!!n&&n,height:!!c&&c,className:`wp-image-${i}`})}),!r.RichText.isEmpty(d)&&(0,s.jsx)("div",{className:"smb-slider__item__caption",children:(0,s.jsx)(r.RichText.Content,{value:d})})]});return m?(0,s.jsx)("a",{className:g,href:m,target:"_self"===u?void 0:u,rel:"_self"===u?void 0:"noopener noreferrer",children:h}):(0,s.jsx)("div",{className:g,children:h})}}];(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:e,setAttributes:i,isSelected:l,className:a}){const{imageID:g,imageURL:p,imageAlt:_,imageWidth:f,imageHeight:w,imageSizeSlug:x,caption:b,url:k,target:R}=e,[H,T]=(0,m.useState)(!1),z=!!k,L="_blank"===R,[N,I]=(0,m.useState)(null),U=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),V=(0,d.useSelect)((e=>g?e("core").getMedia(g,{context:"view"}):null),[g]),M=U.filter((({slug:e})=>V?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),A=o()("c-row__col",a),C=(0,m.useRef)(),B=(0,r.useBlockProps)({className:A,ref:(0,c.useMergeRefs)([I,C])}),P=(0,c.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},D=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"smb-slider__item__figure",children:[(0,s.jsx)(v,{src:p,id:g,alt:_,width:f,height:w,onSelect:e=>{const t=e?.sizes?.[x]?x:S,s=e?.sizes?.[t]?.url,l=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;i({imageURL:s||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:l||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==p&&i({imageURL:e,imageID:0,mediaSizeSlug:S})},onRemove:()=>i({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:y}),l&&H&&(0,s.jsx)(n.Popover,{placement:"bottom",anchor:N,onClose:()=>{T(!1)},children:(0,s.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:k,opensInNewTab:L},onChange:({url:e,opensInNewTab:t})=>{i({url:e,target:t?"_blank":"_self"})},onRemove:()=>{i({url:void 0,target:void 0}),T(!1)},forceIsEditingLink:!z})})]}),l&&(0,s.jsx)(r.RichText,{className:"smb-slider__item__caption",placeholder:(0,u.__)("Write caption…","snow-monkey-blocks"),value:b,onChange:e=>i({caption:e})})]});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.InspectorControls,{children:0<M.length&&(0,s.jsx)(n.__experimentalToolsPanel,{label:(0,u.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:P,children:(0,s.jsx)(j,{defaultValue:t.uK.imageSizeSlug.default,value:x,options:M,onChange:e=>{const t=V?.media_details?.sizes?.[e]?.source_url,s=V?.media_details?.sizes?.[e]?.width,l=V?.media_details?.sizes?.[e]?.height;i({imageURL:t,imageWidth:s,imageHeight:l,imageSizeSlug:e})}})})}),(0,s.jsx)("div",{...B,children:D}),(0,s.jsx)(r.BlockControls,{group:"block",children:(0,s.jsx)(n.ToolbarButton,{name:"link",icon:h,title:(0,u.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),T(!0)},isActive:z})})]})},save:function({attributes:e,className:t}){const{imageID:i,imageURL:l,imageAlt:a,imageWidth:n,imageHeight:c,caption:d,url:m,target:u}=e,g=o()("smb-slider__item",t),h=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"smb-slider__item__figure",children:(0,s.jsx)("img",{src:l,alt:a,width:!!n&&n,height:!!c&&c,className:`wp-image-${i}`,decoding:"auto",loading:"auto"})}),!r.RichText.isEmpty(d)&&(0,s.jsx)("div",{className:"smb-slider__item__caption",children:(0,s.jsx)(r.RichText.Content,{value:d})})]});return m?(0,s.jsx)("a",{...r.useBlockProps.save({className:g}),href:m,target:"_self"===u?void 0:u,rel:"_self"===u?void 0:"noopener noreferrer",children:h}):(0,s.jsx)("div",{...r.useBlockProps.save({className:g}),children:h})},deprecated:k})})()})();1 (()=>{var e={6942:(e,t)=>{var i;!function(){"use strict";var s={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=o(e,l(i)))}return e}function l(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 t="";for(var i in e)s.call(e,i)&&e[i]&&(t=o(t,i));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(i=function(){return a}.apply(t,[]))||(e.exports=i)}()}},t={};function i(s){var a=t[s];if(void 0!==a)return a.exports;var l=t[s]={exports:{}};return e[s](l,l.exports,i),l.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/slider-item","uK":{"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-slider__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-slider__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-slider__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-slider__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"caption":{"type":"string","source":"html","selector":".smb-slider__item__caption","default":""},"url":{"type":"string","default":""},"target":{"type":"string","default":"_self"}}}'),s=window.ReactJSXRuntime,a=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,s.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,s.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,s.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,s.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 l=i(6942),o=i.n(l);const r=window.wp.blockEditor,n=window.wp.components,c=window.wp.compose,d=window.wp.data,m=window.wp.element,u=window.wp.i18n,g=window.wp.primitives;var h=(0,s.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(g.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const p=window.lodash,_=({id:e,src:t,allowedTypes:i,accept:a,onSelect:l,onSelectURL:o,onRemove:c})=>(0,s.jsxs)(r.BlockControls,{group:"inline",children:[(0,s.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:i,accept:a,onSelect:l,onSelectURL:o}),!!t&&!!c&&(0,s.jsx)(n.ToolbarButton,{onClick:c,children:(0,u.__)("Release","snow-monkey-blocks")})]}),f=({src:e,alt:t,id:i,style:a,width:l,height:o})=>(0,s.jsx)("img",{src:e,alt:t,className:`wp-image-${i}`,style:a,width:l,height:o}),w=({src:e,style:t,width:i,height:a})=>(0,s.jsx)("video",{src:e,style:t,width:i,height:a}),x=(0,m.memo)((({id:e,src:t,alt:i,url:a,width:l,height:o,target:r,allowedTypes:n,accept:c,onSelect:d,onSelectURL:m,onRemove:u,mediaType:g,style:h,rel:x,linkClass:v})=>{let b;if("image"===g){let n;b=(0,s.jsx)(f,{src:t,alt:i,id:e,style:h,width:l,height:o}),n=x?(0,p.isEmpty)(x)?void 0:x:"_self"!==r&&r?"noopener noreferrer":void 0,a&&(b=(0,s.jsx)("span",{href:a,target:"_self"===r?void 0:r,rel:n,className:v,children:b}))}else"video"===g&&(b=(0,s.jsx)(w,{src:t,style:h,width:l,height:o}));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_,{id:e,src:t,allowedTypes:n,accept:c,onSelect:d,onSelectURL:m,onRemove:u}),b]})}),((e,t)=>{const i=Object.keys(e);for(const s of i)if(e[s]!==t[s])return!1;return!0}));function v(e){const{src:t,onSelect:i,onSelectURL:a,mediaType:l,allowedTypes:o=["image"]}=e,n=!l&&t?"image":l;let c=(0,u.__)("Media","snow-monkey-blocks");1===o.length&&("image"===o[0]?c=(0,u.__)("Image","snow-monkey-blocks"):"video"===o[0]&&(c=(0,u.__)("Video","snow-monkey-blocks")));const d=(0,m.useMemo)((()=>o.map((e=>`${e}/*`)).join(",")),[o]);return t?(0,s.jsx)(x,{...e,accept:d,allowedTypes:o,mediaType:n}):(0,s.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:c},onSelect:i,onSelectURL:a,accept:d,allowedTypes:o})}const b=[{label:(0,u._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,u._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,u._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,u._x)("Full Size","Image size option for resolution control"),value:"full"}];function j({panelId:e,value:t,onChange:i,options:a=b,defaultValue:l=b[0].value,isShownByDefault:o=!0,withToolsPanelItem:r=!0}){const c=null!=t?t:l,d=()=>(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,u.__)("Resolution"),value:c,options:a,onChange:i,help:(0,u.__)("Select the size of the source image."),size:"__unstable-large"});return r?(0,s.jsx)(n.__experimentalToolsPanelItem,{hasValue:()=>c!==l,label:(0,u.__)("Resolution"),onDeselect:()=>i(l),isShownByDefault:o,panelId:e,children:(0,s.jsx)(d,{})}):(0,s.jsx)(d,{})}const y=["image"],S="full",k=[{attributes:{...t.uK},save({attributes:e,className:t}){const{imageID:i,imageURL:a,imageAlt:l,imageWidth:n,imageHeight:c,caption:d,url:m,target:u}=e,g=o()("smb-slider__item",t),h=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"smb-slider__item__figure",children:(0,s.jsx)("img",{src:a,alt:l,width:!!n&&n,height:!!c&&c,className:`wp-image-${i}`})}),!r.RichText.isEmpty(d)&&(0,s.jsx)("div",{className:"smb-slider__item__caption",children:(0,s.jsx)(r.RichText.Content,{value:d})})]});return m?(0,s.jsx)("a",{className:g,href:m,target:"_self"===u?void 0:u,rel:"_self"===u?void 0:"noopener noreferrer",children:h}):(0,s.jsx)("div",{className:g,children:h})}}];(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:a},edit:function({attributes:e,setAttributes:i,isSelected:a,className:l}){const{imageID:g,imageURL:p,imageAlt:_,imageWidth:f,imageHeight:w,imageSizeSlug:x,caption:b,url:k,target:R}=e,[H,T]=(0,m.useState)(!1),z=!!k,L="_blank"===R,[N,I]=(0,m.useState)(null),U=(0,d.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),V=(0,d.useSelect)((e=>g?e("core").getEntityRecord("postType","attachment",g):null),[g]),A=U.filter((({slug:e})=>V?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),C=o()("c-row__col",l),M=(0,m.useRef)(),B=(0,r.useBlockProps)({className:C,ref:(0,c.useMergeRefs)([I,M])}),P=(0,c.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},D=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"smb-slider__item__figure",children:[(0,s.jsx)(v,{src:p,id:g,alt:_,width:f,height:w,onSelect:e=>{const t=e?.sizes?.[x]?x:S,s=e?.sizes?.[t]?.url,a=e?.sizes?.[t]?.width,l=e?.sizes?.[t]?.height;i({imageURL:s||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:a||e.width,imageHeight:l||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==p&&i({imageURL:e,imageID:0,mediaSizeSlug:S})},onRemove:()=>i({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:y}),a&&H&&(0,s.jsx)(n.Popover,{placement:"bottom",anchor:N,onClose:()=>{T(!1)},children:(0,s.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:k,opensInNewTab:L},onChange:({url:e,opensInNewTab:t})=>{i({url:e,target:t?"_blank":"_self"})},onRemove:()=>{i({url:void 0,target:void 0}),T(!1)},forceIsEditingLink:!z})})]}),a&&(0,s.jsx)(r.RichText,{className:"smb-slider__item__caption",placeholder:(0,u.__)("Write caption…","snow-monkey-blocks"),value:b,onChange:e=>i({caption:e})})]});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.InspectorControls,{children:0<A.length&&(0,s.jsx)(n.__experimentalToolsPanel,{label:(0,u.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:P,children:(0,s.jsx)(j,{defaultValue:t.uK.imageSizeSlug.default,value:x,options:A,onChange:e=>{const t=V?.media_details?.sizes?.[e]?.source_url,s=V?.media_details?.sizes?.[e]?.width,a=V?.media_details?.sizes?.[e]?.height;i({imageURL:t,imageWidth:s,imageHeight:a,imageSizeSlug:e})}})})}),(0,s.jsx)("div",{...B,children:D}),(0,s.jsx)(r.BlockControls,{group:"block",children:(0,s.jsx)(n.ToolbarButton,{name:"link",icon:h,title:(0,u.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),T(!0)},isActive:z})})]})},save:function({attributes:e,className:t}){const{imageID:i,imageURL:a,imageAlt:l,imageWidth:n,imageHeight:c,caption:d,url:m,target:u}=e,g=o()("smb-slider__item",t),h=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"smb-slider__item__figure",children:(0,s.jsx)("img",{src:a,alt:l,width:!!n&&n,height:!!c&&c,className:`wp-image-${i}`,decoding:"auto",loading:"auto"})}),!r.RichText.isEmpty(d)&&(0,s.jsx)("div",{className:"smb-slider__item__caption",children:(0,s.jsx)(r.RichText.Content,{value:d})})]});return m?(0,s.jsx)("a",{...r.useBlockProps.save({className:g}),href:m,target:"_self"===u?void 0:u,rel:"_self"===u?void 0:"noopener noreferrer",children:h}):(0,s.jsx)("div",{...r.useBlockProps.save({className:g}),children:h})},deprecated:k})})()})(); -
snow-monkey-blocks/trunk/dist/blocks/spider-slider/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' 60a5c10464d737a323cd');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '22c605ca78241107a42c'); -
snow-monkey-blocks/trunk/dist/blocks/spider-slider/index.js
r3390754 r3400189 1 (()=>{var e,s={6688:(e,s,i)=>{"use strict";const a=window.wp.blocks,t=window.wp.i18n,l=JSON.parse('{"UU":"snow-monkey-blocks/spider-slider","uK":{"images":{"type":"array","default":[],"source":"query","selector":".smb-spider-slider .spider__slide","query":{"url":{"type":"string","source":"attribute","selector":".spider__figure","attribute":"src"},"alt":{"type":"string","source":"attribute","selector":".spider__figure","attribute":"alt"},"id":{"type":"string","source":"attribute","selector":".spider__figure","attribute":"data-image-id"},"width":{"type":"number","source":"attribute","selector":".spider__figure","attribute":"width"},"height":{"type":"number","source":"attribute","selector":".spider__figure","attribute":"height"},"caption":{"type":"string","source":"html","selector":".smb-spider-slider__item__caption","default":""}}},"sizeSlug":{"type":"string","default":"full"},"dots":{"type":"boolean","default":false},"dotsToThumbnail":{"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","default":""},"aspectRatio":{"type":"string","default":""},"displayCaption":{"type":"boolean","default":false},"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}},"xY":{"align":["wide","full"],"spacing":{"margin":true}}}'),d=window.ReactJSXRuntime,r=(0,d.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,d.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,d.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,d.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,d.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 o=i(6942),n=i.n(o);const c=window.wp.blockEditor,u=window.wp.components,h=window.wp.data,m=window.wp.element;var p=(0,m.forwardRef)((({icon:e,size:s=24,...i},a)=>(0,m.cloneElement)(e,{width:s,height:s,...i,ref:a})));const _=window.wp.primitives;var g=(0,d.jsx)(_.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(_.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});function f(e){const{desktop:s,tablet:i,mobile:a}=e,t=[];return s&&t.push({name:"desktop",title:(0,d.jsx)(u.Dashicon,{icon:"desktop"})}),i&&t.push({name:"tablet",title:(0,d.jsx)(u.Dashicon,{icon:"tablet"})}),a&&t.push({name:"mobile",title:(0,d.jsx)(u.Dashicon,{icon:"smartphone"})}),(0,d.jsx)(u.TabPanel,{className:"smb-inspector-tabs",tabs:t,children:e=>{if(e.name){if("desktop"===e.name)return s();if("tablet"===e.name)return i();if("mobile"===e.name)return a()}}})}window.lodash;const w=window.wp.compose,x=(e,s=0,i=null)=>(e=Number(e),(isNaN(e)||e<s)&&(e=s),null!==i&&e>i&&(e=i),e);const b=["image"],v="full",j=[],N=l.uK,y=l.xY,S=[{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:l,dots:r,dotsToThumbnail:o,fade:u,shuffle:h,shifted:m,gutter:p,displayCaption:_,interval:g,autoplayButton:f,duration:w,lgSlidesToShow:x,mdSlidesToShow:b,smSlidesToShow:v}=e;if(!i.length)return null;const j="wide"===e.align,N="full"===e.align,y=m&&!u&&(j||N),S=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":y,[`smb-spider-slider--gutter-${p}`]:!!p});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:S}),"data-fade":u?"true":"false","data-shuffle":h?"true":"false","data-interval":0<g?1e3*g:void 0,"data-duration":0<w?1e3*w:void 0,"data-lg-slide-to-show":!u&&1<x?x:void 0,"data-md-slide-to-show":!u&&1<b?b:void 0,"data-sm-slide-to-show":!u&&1<v?v:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[y&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height,"data-image-id":e.id})}),_&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),l&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<g&&f||r)&&(0,d.jsxs)("div",{className:"spider__dots","data-thumbnails":o?"true":"false",children:[f&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__stop",title:(0,t.__)("Pause autoplay","snow-monkey-blocks"),children:"⏸"}),(0,d.jsx)("button",{className:"spider__start",title:(0,t.__)("Start autoplay","snow-monkey-blocks"),children:"▶"})]}),r&&i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:o?(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))]})]})}},{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,shifted:u,gutter:h,displayCaption:m,interval:p,duration:_,lgSlidesToShow:g,mdSlidesToShow:f,smSlidesToShow:w}=e;if(!i.length)return null;const x="wide"===e.align,b="full"===e.align,v=u&&!o&&(x||b),j=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":v,[`smb-spider-slider--gutter-${h}`]:!!h});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:j}),"data-fade":o?"true":"false","data-interval":0<p?1e3*p:void 0,"data-duration":0<_?1e3*_:void 0,"data-lg-slide-to-show":!o&&1<g?g:void 0,"data-md-slide-to-show":!o&&1<f?f:void 0,"data-sm-slide-to-show":!o&&1<w?w:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[v&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height,"data-image-id":e.id})}),m&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}},{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,shifted:u,gutter:h,displayCaption:m,interval:p,duration:_,lgSlidesToShow:g,mdSlidesToShow:f,smSlidesToShow:w}=e;if(!i.length)return null;const x="wide"===e.align,b="full"===e.align,v=u&&!o&&(x||b),j=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":v,[`smb-spider-slider--gutter-${h}`]:!!h});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:j}),"data-fade":o?"true":"false","data-interval":0<p?1e3*p:void 0,"data-duration":0<_?1e3*_:void 0,"data-lg-slide-to-show":!o&&1<g?g:void 0,"data-md-slide-to-show":!o&&1<f?f:void 0,"data-sm-slide-to-show":!o&&1<w?w:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[v&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height,"data-image-id":e.id})}),m&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}},{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,shifted:u,gutter:h,displayCaption:m,interval:p,lgSlidesToShow:_,mdSlidesToShow:g,smSlidesToShow:f}=e;if(!i.length)return null;const w="wide"===e.align,x="full"===e.align,b=!!u&&!o,v=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":b,[`smb-spider-slider--gutter-${h}`]:!!h});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:v}),"data-fade":o?"true":"false","data-interval":0<p?1e3*p:void 0,"data-lg-slide-to-show":!o&&1<_?_:void 0,"data-md-slide-to-show":!o&&1<g?g:void 0,"data-sm-slide-to-show":!o&&1<f?f:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[(x||w)&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height,"data-image-id":e.id})}),m&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}},{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,shifted:u,gutter:h,displayCaption:m,interval:p,lgSlidesToShow:_,mdSlidesToShow:g,smSlidesToShow:f}=e;if(!i.length)return null;const w=!o&&"full"===e.align,x=!!u&&w,b=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":x,[`smb-spider-slider--gutter-${h}`]:!!h});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:b}),"data-fade":o?"true":"false","data-interval":0<p?1e3*p:void 0,"data-lg-slide-to-show":!o&&1<_?_:void 0,"data-md-slide-to-show":!o&&1<g?g:void 0,"data-sm-slide-to-show":!o&&1<f?f:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[x&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height,"data-image-id":e.id})}),m&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}},{attributes:{...N},supports:{align:["wide","full"]},migrate:e=>("16to9"===e.aspectRatio&&(e.aspectRatio="16x9"),"4to3"===e.aspectRatio&&(e.aspectRatio="4x3"),e),save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,displayCaption:u,interval:h,lgSlidesToShow:m,mdSlidesToShow:p,smSlidesToShow:_}=e;if(!i.length)return null;const g=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:g}),"data-fade":o?"true":"false","data-interval":0<h?1e3*h:void 0,"data-lg-slide-to-show":!o&&1<m?m:void 0,"data-md-slide-to-show":!o&&1<p?p:void 0,"data-sm-slide-to-show":!o&&1<_?_:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height,"data-image-id":e.id}),u&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}}],k={attributes:{images:[{url:`${smb.pluginUrl}/dist/img/photos/beach-sand-coast2756.jpg`},{url:`${smb.pluginUrl}/dist/img/photos/man-guy-photographer1579.jpg`},{url:`${smb.pluginUrl}/dist/img/photos/building-architecture-sky2096.jpg`}],arrows:!0,dots:!0}};(0,a.registerBlockType)(l.UU,{icon:{foreground:"#cd162c",src:r},keywords:[(0,t.__)("Carousel","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:s,className:i,isSelected:a,clientId:r}){const{images:o,sizeSlug:_,aspectRatio:N,arrows:y,dots:S,dotsToThumbnail:k,fade:T,shuffle:C,shifted:B,gutter:D,displayCaption:z,interval:P,autoplayButton: M,duration:K,lgSlidesToShow:R,mdSlidesToShow:V,smSlidesToShow:$}=e,H=!!o.length,{getSettings:I}=(0,h.useSelect)((e=>{const{getSettings:s}=e("core/block-editor");return{getSettings:s}}),[]),F=(0,h.useSelect)((e=>{var s;const i=o.map((e=>e.id)).filter((e=>void 0!==e));return 0===i.length?j:null!==(s=e("core").getMediaItems({include:i.join(","),per_page:-1,orderby:"include"}))&&void 0!==s?s:j}),[o]),O="wide"===e.align,A="full"===e.align,L=!T,Z=B&&L&&(O||A),U=(0,m.useRef)(),E=(0,m.useRef)(),G=(0,m.useRef)(),W=!!U.current&&U.current.offsetWidth;(0,m.useEffect)((()=>{const e=!!U.current&&!!G.current&&Z&&Math.floor(U.current.offsetWidth);e&&(U.current.style.setProperty("--spider--canvas-width",`${e}px`),G.current.style.width=`${e}px`);const s=!!E.current&&Z&&Math.floor(E.current.offsetWidth);s&&U.current.style.setProperty("--spider--reference-width",`${s}px`)}),[W,Z]);const q=n()("smb-spider-slider",i,{[`smb-spider-slider--${N}`]:!!N,"smb-spider-slider--shifted":Z,[`smb-spider-slider--gutter-${D}`]:!!D}),J=function(e,s,i){return(0,m.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:a}=i();let t={};s&&(t=e.reduce(((e,s)=>{if(!s.id)return e;const i=a.reduce(((e,i)=>{const a=s.sizes?.[i.slug]?.url,t=s.media_details?.sizes?.[i.slug]?.source_url;return{...e,[i.slug]:a||t}}),{});return{...e,[parseInt(s.id,10)]:i}}),{}));const l=Object.values(t);return a.filter((({slug:e})=>l.some((s=>s[e])))).map((({name:e,slug:s})=>({value:s,label:e})))}()),[e,s])}(F,a,I),Y=(0,w.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},X=[{value:"",label:(0,t.__)("Default","snow-monkey-blocks")},{value:"16x9",label:(0,t.__)("16:9","snow-monkey-blocks")},{value:"4x3",label:(0,t.__)("4:3","snow-monkey-blocks")}],Q=[{value:"",label:(0,t.__)("None","snow-monkey-blocks")},{value:"s",label:(0,t.__)("S","snow-monkey-blocks")},{value:"m",label:(0,t.__)("M","snow-monkey-blocks")},{value:"l",label:(0,t.__)("L","snow-monkey-blocks")}],ee=(0,d.jsx)(c.MediaPlaceholder,{addToGallery:H,isAppender:H,className:i,disableMediaButtons:H&&!a,icon:!H&&"format-gallery",labels:{title:!H&&(0,t.__)("Slider","snow-monkey-blocks"),instructions:!H&&(0,t.__)("Drag images, upload new ones or select files from your library.","snow-monkey-blocks")},onSelect:e=>{const i=e.map((e=>{if(!e?.id)return e;const s=e?.sizes[_]?_:v,i=e?.sizes[s]?.url,a=e?.sizes[s]?.width,t=e?.sizes[s]?.height;return{url:i,alt:e.alt,id:e.id,width:a,height:t,caption:e.caption}}));s({images:i})},accept:"image/*",allowedTypes:b,multiple:!0,value:o});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.InspectorControls,{group:"dimensions",children:(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>D!==l.uK.gutter.default,isShownByDefault:!0,label:(0,t.__)("Gap","snow-monkey-blocks"),onDeselect:()=>s({gutter:l.uK.gutter.default}),panelId:r,children:(0,d.jsx)(u.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Gap","snow-monkey-blocks"),value:D,onChange:e=>s({gutter:e}),options:Q})})}),(0,d.jsx)(c.InspectorControls,{children:(0,d.jsxs)(u.__experimentalToolsPanel,{label:(0,t.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:Y,children:[(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>_!==l.uK.sizeSlug.default,isShownByDefault:!0,label:(0,t.__)("Images size","snow-monkey-blocks"),onDeselect:()=>s({sizeSlug:l.uK.sizeSlug.default}),children:(0,d.jsx)(u.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Images size","snow-monkey-blocks"),value:_,options:J,onChange:e=>{const i=F.map((s=>{if(!s?.id)return s;const i=s?.media_details?.sizes?.[e]?e:v,a=s?.media_details?.sizes?.[i]?.source_url,t=s?.media_details?.sizes?.[i]?.width,l=s?.media_details?.sizes?.[i]?.height;return{url:a,alt:s.alt,id:s.id,width:t,height:l,caption:s.caption.rendered}}));s({images:i,sizeSlug:e})},help:(0,t.__)("Select the size of the source image.")})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>N!==l.uK.aspectRatio.default,isShownByDefault:!0,label:(0,t.__)("Aspect ratio","snow-monkey-blocks"),onDeselect:()=>s({aspectRatio:l.uK.aspectRatio.default}),children:(0,d.jsx)(u.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Aspect ratio","snow-monkey-blocks"),value:N,onChange:e=>s({aspectRatio:e}),options:X})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>y!==l.uK.arrows.default,isShownByDefault:!0,label:(0,t.__)("Display arrows","snow-monkey-blocks"),onDeselect:()=>s({arrows:l.uK.arrows.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Display arrows","snow-monkey-blocks"),checked:y,onChange:e=>s({arrows:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>S!==l.uK.dots.default,isShownByDefault:!0,label:(0,t.__)("Display dots","snow-monkey-blocks"),onDeselect:()=>s({dots:l.uK.dots.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Display dots","snow-monkey-blocks"),checked:S,onChange:e=>s({dots:e})})}),S&&(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>k!==l.uK.dotsToThumbnail.default,isShownByDefault:!0,label:(0,t.__)("Change dots to thumbnails","snow-monkey-blocks"),onDeselect:()=>s({dotsToThumbnail:l.uK.dotsToThumbnail.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Change dots to thumbnails","snow-monkey-blocks"),checked:k,onChange:e=>s({dotsToThumbnail:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>T!==l.uK.fade.default,isShownByDefault:!0,label:(0,t.__)("Fade","snow-monkey-blocks"),onDeselect:()=>s({fade:l.uK.fade.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Fade","snow-monkey-blocks"),checked:T,onChange:e=>s({fade:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>C!==l.uK.shuffle.default,isShownByDefault:!0,label:(0,t.__)("Shuffle slides","snow-monkey-blocks"),onDeselect:()=>s({shuffle:l.uK.shuffle.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Shuffle slides","snow-monkey-blocks"),checked:C,onChange:e=>s({shuffle:e})})}),L&&(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>B!==l.uK.shifted.default,isShownByDefault:!0,label:(0,t.__)("Shifting the slider","snow-monkey-blocks"),onDeselect:()=>s({shifted:l.uK.shifted.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Shifting the slider","snow-monkey-blocks"),help:B&&(!A||!O)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p,{icon:g,style:{fill:"#d94f4f"}}),(0,t.__)("It must be full width (.alignfull) or wide width (.alignwide).","snow-monkey-blocks")]}),checked:B,onChange:e=>s({shifted:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>z!==l.uK.displayCaption.default,isShownByDefault:!0,label:(0,t.__)("Display caption","snow-monkey-blocks"),onDeselect:()=>s({displayCaption:l.uK.displayCaption.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Display caption","snow-monkey-blocks"),checked:z,onChange:e=>s({displayCaption:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>P!==l.uK.interval.default,isShownByDefault:!0,label:(0,t.__)("Autoplay Speed in seconds","snow-monkey-blocks"),onDeselect:()=>s({interval:l.uK.interval.default}),children:(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Autoplay Speed in seconds","snow-monkey-blocks"),help:(0,t.__)('If "0", no scroll.',"snow-monkey-blocks"),value:P,onChange:e=>s({interval:x(e,0,10)}),min:"0",max:"10"})}),0<P&&(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>M!==l.uK.autoplayButton.default,isShownByDefault:!0,label:(0,t.__)("Display pause button for autoplay","snow-monkey-blocks"),onDeselect:()=>s({autoplayButton:l.uK.autoplayButton.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Display pause button for autoplay","snow-monkey-blocks"),checked:M,onChange:e=>s({autoplayButton:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>K!==l.uK.duration.default,isShownByDefault:!0,label:(0,t.__)("Animation speed in seconds","snow-monkey-blocks"),onDeselect:()=>s({duration:l.uK.duration.default}),children:(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Animation speed in seconds","snow-monkey-blocks"),help:(0,t.__)('If "0", default animation speed.',"snow-monkey-blocks"),value:K,onChange:e=>s({duration:x(e,0,10)}),min:"0",max:"5",step:"0.1"})}),!T&&(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>R!==l.uK.lgSlidesToShow.default||V!==l.uK.mdSlidesToShow.default||$!==l.uK.smSlidesToShow.default,isShownByDefault:!0,label:(0,t.__)("Slides settings","snow-monkey-blocks"),onDeselect:()=>s({lgSlidesToShow:l.uK.lgSlidesToShow.default,mdSlidesToShow:l.uK.mdSlidesToShow.default,smSlidesToShow:l.uK.smSlidesToShow.default}),children:(0,d.jsx)(f,{desktop:()=>(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("# of slides to show (Large window)","snow-monkey-blocks"),value:R,onChange:e=>s({lgSlidesToShow:x(e,1,6)}),min:"1",max:6<o.length?6:o.length}),tablet:()=>(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("# of slides to show (Medium window)","snow-monkey-blocks"),value:V,onChange:e=>s({mdSlidesToShow:x(e,1,6)}),min:"1",max:6<o.length?6:o.length}),mobile:()=>(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("# of slides to show (Small window)","snow-monkey-blocks"),value:$,onChange:e=>s({smSlidesToShow:x(e,1,6)}),min:"1",max:6<o.length?6:o.length})})})]})}),H?(0,d.jsxs)("div",{...(0,c.useBlockProps)({className:q,ref:U}),"data-fade":T?"true":"false","data-shuffle":C?"true":"false","data-lg-slide-to-show":!T&&1<R?R:void 0,"data-md-slide-to-show":!T&&1<V?V:void 0,"data-sm-slide-to-show":!T&&1<$?$:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[Z&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference",ref:E})}),(0,d.jsx)("div",{className:"spider__canvas",ref:G,children:o.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height,"data-image-id":e.id})}),z&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),y&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<P&&M||S)&&(0,d.jsxs)("div",{className:"spider__dots","data-thumbnails":k?"true":"false",children:[M&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__stop",children:(0,d.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,t.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,d.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,d.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,d.jsx)("button",{className:"spider__start",children:(0,d.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,t.__)("Start autoplay","snow-monkey-blocks"),children:(0,d.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),S&&o.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:k?(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))]}),ee]}):(0,d.jsx)("div",{...(0,c.useBlockProps)({ref:U}),children:ee})]})},save:function({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:l,dots:r,dotsToThumbnail:o,fade:u,shuffle:h,shifted:m,gutter:p,displayCaption:_,interval:g,autoplayButton:f,duration:w,lgSlidesToShow:x,mdSlidesToShow:b,smSlidesToShow:v}=e;if(!i.length)return null;const j="wide"===e.align,N="full"===e.align,y=m&&!u&&(j||N),S=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":y,[`smb-spider-slider--gutter-${p}`]:!!p});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:S}),"data-fade":u?"true":"false","data-shuffle":h?"true":"false","data-interval":0<g?1e3*g:void 0,"data-duration":0<w?1e3*w:void 0,"data-lg-slide-to-show":!u&&1<x?x:void 0,"data-md-slide-to-show":!u&&1<b?b:void 0,"data-sm-slide-to-show":!u&&1<v?v:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[y&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height,"data-image-id":e.id})}),_&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),l&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<g&&f||r)&&(0,d.jsxs)("div",{className:"spider__dots","data-thumbnails":o?"true":"false",children:[f&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__stop",children:(0,d.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,t.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,d.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,d.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,d.jsx)("button",{className:"spider__start",children:(0,d.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,t.__)("Start autoplay","snow-monkey-blocks"),children:(0,d.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),r&&i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:o?(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))]})]})},deprecated:S,example:k})},6942:(e,s)=>{var i;!function(){"use strict";var a={}.hasOwnProperty;function t(){for(var e="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(e=d(e,l(i)))}return e}function l(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return t.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var s="";for(var i in e)a.call(e,i)&&e[i]&&(s=d(s,i));return s}function d(e,s){return s?e?e+" "+s:e+s:e}e.exports?(t.default=t,e.exports=t):void 0===(i=function(){return t}.apply(s,[]))||(e.exports=i)}()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var l=i[e]={exports:{}};return s[e](l,l.exports,a),l.exports}a.m=s,e=[],a.O=(s,i,t,l)=>{if(!i){var d=1/0;for(c=0;c<e.length;c++){for(var[i,t,l]=e[c],r=!0,o=0;o<i.length;o++)(!1&l||d>=l)&&Object.keys(a.O).every((e=>a.O[e](i[o])))?i.splice(o--,1):(r=!1,l<d&&(d=l));if(r){e.splice(c--,1);var n=t();void 0!==n&&(s=n)}}return s}l=l||0;for(var c=e.length;c>0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[i,t,l]},a.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return a.d(s,{a:s}),s},a.d=(e,s)=>{for(var i in s)a.o(s,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},a.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={1427:0,8779:0};a.O.j=s=>0===e[s];var s=(s,i)=>{var t,l,[d,r,o]=i,n=0;if(d.some((s=>0!==e[s]))){for(t in r)a.o(r,t)&&(a.m[t]=r[t]);if(o)var c=o(a)}for(s&&s(i);n<d.length;n++)l=d[n],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return a.O(c)},i=globalThis.webpackChunk=globalThis.webpackChunk||[];i.forEach(s.bind(null,0)),i.push=s.bind(null,i.push.bind(i))})();var t=a.O(void 0,[8779],(()=>a(6688)));t=a.O(t)})();1 (()=>{var e,s={6688:(e,s,i)=>{"use strict";const a=window.wp.blocks,t=window.wp.i18n,l=JSON.parse('{"UU":"snow-monkey-blocks/spider-slider","uK":{"images":{"type":"array","default":[],"source":"query","selector":".smb-spider-slider .spider__slide","query":{"url":{"type":"string","source":"attribute","selector":".spider__figure","attribute":"src"},"alt":{"type":"string","source":"attribute","selector":".spider__figure","attribute":"alt"},"id":{"type":"string","source":"attribute","selector":".spider__figure","attribute":"data-image-id"},"width":{"type":"number","source":"attribute","selector":".spider__figure","attribute":"width"},"height":{"type":"number","source":"attribute","selector":".spider__figure","attribute":"height"},"caption":{"type":"string","source":"html","selector":".smb-spider-slider__item__caption","default":""}}},"sizeSlug":{"type":"string","default":"full"},"dots":{"type":"boolean","default":false},"dotsToThumbnail":{"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","default":""},"aspectRatio":{"type":"string","default":""},"displayCaption":{"type":"boolean","default":false},"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}},"xY":{"align":["wide","full"],"spacing":{"margin":true}}}'),d=window.ReactJSXRuntime,r=(0,d.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,d.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,d.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,d.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,d.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 o=i(6942),n=i.n(o);const c=window.wp.blockEditor,u=window.wp.components,h=window.wp.data,m=window.wp.element;var p=(0,m.forwardRef)((({icon:e,size:s=24,...i},a)=>(0,m.cloneElement)(e,{width:s,height:s,...i,ref:a})));const _=window.wp.primitives;var g=(0,d.jsx)(_.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(_.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});function f(e){const{desktop:s,tablet:i,mobile:a}=e,t=[];return s&&t.push({name:"desktop",title:(0,d.jsx)(u.Dashicon,{icon:"desktop"})}),i&&t.push({name:"tablet",title:(0,d.jsx)(u.Dashicon,{icon:"tablet"})}),a&&t.push({name:"mobile",title:(0,d.jsx)(u.Dashicon,{icon:"smartphone"})}),(0,d.jsx)(u.TabPanel,{className:"smb-inspector-tabs",tabs:t,children:e=>{if(e.name){if("desktop"===e.name)return s();if("tablet"===e.name)return i();if("mobile"===e.name)return a()}}})}window.lodash;const w=window.wp.compose,x=(e,s=0,i=null)=>(e=Number(e),(isNaN(e)||e<s)&&(e=s),null!==i&&e>i&&(e=i),e);const b=["image"],v="full",j=[],N=l.uK,y=l.xY,S=[{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:l,dots:r,dotsToThumbnail:o,fade:u,shuffle:h,shifted:m,gutter:p,displayCaption:_,interval:g,autoplayButton:f,duration:w,lgSlidesToShow:x,mdSlidesToShow:b,smSlidesToShow:v}=e;if(!i.length)return null;const j="wide"===e.align,N="full"===e.align,y=m&&!u&&(j||N),S=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":y,[`smb-spider-slider--gutter-${p}`]:!!p});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:S}),"data-fade":u?"true":"false","data-shuffle":h?"true":"false","data-interval":0<g?1e3*g:void 0,"data-duration":0<w?1e3*w:void 0,"data-lg-slide-to-show":!u&&1<x?x:void 0,"data-md-slide-to-show":!u&&1<b?b:void 0,"data-sm-slide-to-show":!u&&1<v?v:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[y&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height,"data-image-id":e.id})}),_&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),l&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<g&&f||r)&&(0,d.jsxs)("div",{className:"spider__dots","data-thumbnails":o?"true":"false",children:[f&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__stop",title:(0,t.__)("Pause autoplay","snow-monkey-blocks"),children:"⏸"}),(0,d.jsx)("button",{className:"spider__start",title:(0,t.__)("Start autoplay","snow-monkey-blocks"),children:"▶"})]}),r&&i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:o?(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))]})]})}},{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,shifted:u,gutter:h,displayCaption:m,interval:p,duration:_,lgSlidesToShow:g,mdSlidesToShow:f,smSlidesToShow:w}=e;if(!i.length)return null;const x="wide"===e.align,b="full"===e.align,v=u&&!o&&(x||b),j=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":v,[`smb-spider-slider--gutter-${h}`]:!!h});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:j}),"data-fade":o?"true":"false","data-interval":0<p?1e3*p:void 0,"data-duration":0<_?1e3*_:void 0,"data-lg-slide-to-show":!o&&1<g?g:void 0,"data-md-slide-to-show":!o&&1<f?f:void 0,"data-sm-slide-to-show":!o&&1<w?w:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[v&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height,"data-image-id":e.id})}),m&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}},{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,shifted:u,gutter:h,displayCaption:m,interval:p,duration:_,lgSlidesToShow:g,mdSlidesToShow:f,smSlidesToShow:w}=e;if(!i.length)return null;const x="wide"===e.align,b="full"===e.align,v=u&&!o&&(x||b),j=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":v,[`smb-spider-slider--gutter-${h}`]:!!h});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:j}),"data-fade":o?"true":"false","data-interval":0<p?1e3*p:void 0,"data-duration":0<_?1e3*_:void 0,"data-lg-slide-to-show":!o&&1<g?g:void 0,"data-md-slide-to-show":!o&&1<f?f:void 0,"data-sm-slide-to-show":!o&&1<w?w:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[v&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height,"data-image-id":e.id})}),m&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}},{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,shifted:u,gutter:h,displayCaption:m,interval:p,lgSlidesToShow:_,mdSlidesToShow:g,smSlidesToShow:f}=e;if(!i.length)return null;const w="wide"===e.align,x="full"===e.align,b=!!u&&!o,v=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":b,[`smb-spider-slider--gutter-${h}`]:!!h});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:v}),"data-fade":o?"true":"false","data-interval":0<p?1e3*p:void 0,"data-lg-slide-to-show":!o&&1<_?_:void 0,"data-md-slide-to-show":!o&&1<g?g:void 0,"data-sm-slide-to-show":!o&&1<f?f:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[(x||w)&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height,"data-image-id":e.id})}),m&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}},{attributes:{...N},supports:{...y},save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,shifted:u,gutter:h,displayCaption:m,interval:p,lgSlidesToShow:_,mdSlidesToShow:g,smSlidesToShow:f}=e;if(!i.length)return null;const w=!o&&"full"===e.align,x=!!u&&w,b=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":x,[`smb-spider-slider--gutter-${h}`]:!!h});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:b}),"data-fade":o?"true":"false","data-interval":0<p?1e3*p:void 0,"data-lg-slide-to-show":!o&&1<_?_:void 0,"data-md-slide-to-show":!o&&1<g?g:void 0,"data-sm-slide-to-show":!o&&1<f?f:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[x&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height,"data-image-id":e.id})}),m&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}},{attributes:{...N},supports:{align:["wide","full"]},migrate:e=>("16to9"===e.aspectRatio&&(e.aspectRatio="16x9"),"4to3"===e.aspectRatio&&(e.aspectRatio="4x3"),e),save({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:t,dots:l,dotsToThumbnail:r,fade:o,displayCaption:u,interval:h,lgSlidesToShow:m,mdSlidesToShow:p,smSlidesToShow:_}=e;if(!i.length)return null;const g=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:g}),"data-fade":o?"true":"false","data-interval":0<h?1e3*h:void 0,"data-lg-slide-to-show":!o&&1<m?m:void 0,"data-md-slide-to-show":!o&&1<p?p:void 0,"data-sm-slide-to-show":!o&&1<_?_:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height,"data-image-id":e.id}),u&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),t&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),l&&(0,d.jsx)("div",{className:"spider__dots","data-thumbnails":r?"true":"false",children:i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:r?(0,d.jsx)("img",{className:"spider__figure",src:e.url,alt:e.alt,width:e.width,height:e.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))})]})}}],k={attributes:{images:[{url:`${smb.pluginUrl}/dist/img/photos/beach-sand-coast2756.jpg`},{url:`${smb.pluginUrl}/dist/img/photos/man-guy-photographer1579.jpg`},{url:`${smb.pluginUrl}/dist/img/photos/building-architecture-sky2096.jpg`}],arrows:!0,dots:!0}};(0,a.registerBlockType)(l.UU,{icon:{foreground:"#cd162c",src:r},keywords:[(0,t.__)("Carousel","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:s,className:i,isSelected:a,clientId:r}){const{images:o,sizeSlug:_,aspectRatio:N,arrows:y,dots:S,dotsToThumbnail:k,fade:T,shuffle:C,shifted:B,gutter:D,displayCaption:z,interval:P,autoplayButton:K,duration:M,lgSlidesToShow:R,mdSlidesToShow:V,smSlidesToShow:$}=e,H=!!o.length,{getSettings:I}=(0,h.useSelect)((e=>{const{getSettings:s}=e("core/block-editor");return{getSettings:s}}),[]),F=(0,h.useSelect)((e=>{var s;const i=o.map((e=>e.id)).filter((e=>void 0!==e));return 0===i.length?j:null!==(s=e("core").getEntityRecords("postType","attachment",{include:i,per_page:-1,orderby:"include"}))&&void 0!==s?s:j}),[o]),O="wide"===e.align,A="full"===e.align,L=!T,Z=B&&L&&(O||A),U=(0,m.useRef)(),E=(0,m.useRef)(),G=(0,m.useRef)(),W=!!U.current&&U.current.offsetWidth;(0,m.useEffect)((()=>{const e=!!U.current&&!!G.current&&Z&&Math.floor(U.current.offsetWidth);e&&(U.current.style.setProperty("--spider--canvas-width",`${e}px`),G.current.style.width=`${e}px`);const s=!!E.current&&Z&&Math.floor(E.current.offsetWidth);s&&U.current.style.setProperty("--spider--reference-width",`${s}px`)}),[W,Z]);const q=n()("smb-spider-slider",i,{[`smb-spider-slider--${N}`]:!!N,"smb-spider-slider--shifted":Z,[`smb-spider-slider--gutter-${D}`]:!!D}),J=function(e,s,i){return(0,m.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:a}=i();let t={};s&&(t=e.reduce(((e,s)=>{if(!s.id)return e;const i=a.reduce(((e,i)=>{const a=s.sizes?.[i.slug]?.url,t=s.media_details?.sizes?.[i.slug]?.source_url;return{...e,[i.slug]:a||t}}),{});return{...e,[parseInt(s.id,10)]:i}}),{}));const l=Object.values(t);return a.filter((({slug:e})=>l.some((s=>s[e])))).map((({name:e,slug:s})=>({value:s,label:e})))}()),[e,s])}(F,a,I),Y=(0,w.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},X=[{value:"",label:(0,t.__)("Default","snow-monkey-blocks")},{value:"16x9",label:(0,t.__)("16:9","snow-monkey-blocks")},{value:"4x3",label:(0,t.__)("4:3","snow-monkey-blocks")}],Q=[{value:"",label:(0,t.__)("None","snow-monkey-blocks")},{value:"s",label:(0,t.__)("S","snow-monkey-blocks")},{value:"m",label:(0,t.__)("M","snow-monkey-blocks")},{value:"l",label:(0,t.__)("L","snow-monkey-blocks")}],ee=(0,d.jsx)(c.MediaPlaceholder,{addToGallery:H,isAppender:H,className:i,disableMediaButtons:H&&!a,icon:!H&&"format-gallery",labels:{title:!H&&(0,t.__)("Slider","snow-monkey-blocks"),instructions:!H&&(0,t.__)("Drag images, upload new ones or select files from your library.","snow-monkey-blocks")},onSelect:e=>{const i=e.map((e=>{if(!e?.id)return e;const s=e?.sizes[_]?_:v,i=e?.sizes[s]?.url,a=e?.sizes[s]?.width,t=e?.sizes[s]?.height;return{url:i,alt:e.alt,id:e.id,width:a,height:t,caption:e.caption}}));s({images:i})},accept:"image/*",allowedTypes:b,multiple:!0,value:o});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.InspectorControls,{group:"dimensions",children:(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>D!==l.uK.gutter.default,isShownByDefault:!0,label:(0,t.__)("Gap","snow-monkey-blocks"),onDeselect:()=>s({gutter:l.uK.gutter.default}),panelId:r,children:(0,d.jsx)(u.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Gap","snow-monkey-blocks"),value:D,onChange:e=>s({gutter:e}),options:Q})})}),(0,d.jsx)(c.InspectorControls,{children:(0,d.jsxs)(u.__experimentalToolsPanel,{label:(0,t.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:Y,children:[(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>_!==l.uK.sizeSlug.default,isShownByDefault:!0,label:(0,t.__)("Images size","snow-monkey-blocks"),onDeselect:()=>s({sizeSlug:l.uK.sizeSlug.default}),children:(0,d.jsx)(u.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Images size","snow-monkey-blocks"),value:_,options:J,onChange:e=>{const i=F.map((s=>{if(!s?.id)return s;const i=s?.media_details?.sizes?.[e]?e:v,a=s?.media_details?.sizes?.[i]?.source_url,t=s?.media_details?.sizes?.[i]?.width,l=s?.media_details?.sizes?.[i]?.height;return{url:a,alt:s.alt,id:s.id,width:t,height:l,caption:s.caption.rendered}}));s({images:i,sizeSlug:e})},help:(0,t.__)("Select the size of the source image.")})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>N!==l.uK.aspectRatio.default,isShownByDefault:!0,label:(0,t.__)("Aspect ratio","snow-monkey-blocks"),onDeselect:()=>s({aspectRatio:l.uK.aspectRatio.default}),children:(0,d.jsx)(u.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Aspect ratio","snow-monkey-blocks"),value:N,onChange:e=>s({aspectRatio:e}),options:X})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>y!==l.uK.arrows.default,isShownByDefault:!0,label:(0,t.__)("Display arrows","snow-monkey-blocks"),onDeselect:()=>s({arrows:l.uK.arrows.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Display arrows","snow-monkey-blocks"),checked:y,onChange:e=>s({arrows:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>S!==l.uK.dots.default,isShownByDefault:!0,label:(0,t.__)("Display dots","snow-monkey-blocks"),onDeselect:()=>s({dots:l.uK.dots.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Display dots","snow-monkey-blocks"),checked:S,onChange:e=>s({dots:e})})}),S&&(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>k!==l.uK.dotsToThumbnail.default,isShownByDefault:!0,label:(0,t.__)("Change dots to thumbnails","snow-monkey-blocks"),onDeselect:()=>s({dotsToThumbnail:l.uK.dotsToThumbnail.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Change dots to thumbnails","snow-monkey-blocks"),checked:k,onChange:e=>s({dotsToThumbnail:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>T!==l.uK.fade.default,isShownByDefault:!0,label:(0,t.__)("Fade","snow-monkey-blocks"),onDeselect:()=>s({fade:l.uK.fade.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Fade","snow-monkey-blocks"),checked:T,onChange:e=>s({fade:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>C!==l.uK.shuffle.default,isShownByDefault:!0,label:(0,t.__)("Shuffle slides","snow-monkey-blocks"),onDeselect:()=>s({shuffle:l.uK.shuffle.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Shuffle slides","snow-monkey-blocks"),checked:C,onChange:e=>s({shuffle:e})})}),L&&(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>B!==l.uK.shifted.default,isShownByDefault:!0,label:(0,t.__)("Shifting the slider","snow-monkey-blocks"),onDeselect:()=>s({shifted:l.uK.shifted.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Shifting the slider","snow-monkey-blocks"),help:B&&(!A||!O)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p,{icon:g,style:{fill:"#d94f4f"}}),(0,t.__)("It must be full width (.alignfull) or wide width (.alignwide).","snow-monkey-blocks")]}),checked:B,onChange:e=>s({shifted:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>z!==l.uK.displayCaption.default,isShownByDefault:!0,label:(0,t.__)("Display caption","snow-monkey-blocks"),onDeselect:()=>s({displayCaption:l.uK.displayCaption.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Display caption","snow-monkey-blocks"),checked:z,onChange:e=>s({displayCaption:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>P!==l.uK.interval.default,isShownByDefault:!0,label:(0,t.__)("Autoplay Speed in seconds","snow-monkey-blocks"),onDeselect:()=>s({interval:l.uK.interval.default}),children:(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Autoplay Speed in seconds","snow-monkey-blocks"),help:(0,t.__)('If "0", no scroll.',"snow-monkey-blocks"),value:P,onChange:e=>s({interval:x(e,0,10)}),min:"0",max:"10"})}),0<P&&(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>K!==l.uK.autoplayButton.default,isShownByDefault:!0,label:(0,t.__)("Display pause button for autoplay","snow-monkey-blocks"),onDeselect:()=>s({autoplayButton:l.uK.autoplayButton.default}),children:(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Display pause button for autoplay","snow-monkey-blocks"),checked:K,onChange:e=>s({autoplayButton:e})})}),(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>M!==l.uK.duration.default,isShownByDefault:!0,label:(0,t.__)("Animation speed in seconds","snow-monkey-blocks"),onDeselect:()=>s({duration:l.uK.duration.default}),children:(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("Animation speed in seconds","snow-monkey-blocks"),help:(0,t.__)('If "0", default animation speed.',"snow-monkey-blocks"),value:M,onChange:e=>s({duration:x(e,0,10)}),min:"0",max:"5",step:"0.1"})}),!T&&(0,d.jsx)(u.__experimentalToolsPanelItem,{hasValue:()=>R!==l.uK.lgSlidesToShow.default||V!==l.uK.mdSlidesToShow.default||$!==l.uK.smSlidesToShow.default,isShownByDefault:!0,label:(0,t.__)("Slides settings","snow-monkey-blocks"),onDeselect:()=>s({lgSlidesToShow:l.uK.lgSlidesToShow.default,mdSlidesToShow:l.uK.mdSlidesToShow.default,smSlidesToShow:l.uK.smSlidesToShow.default}),children:(0,d.jsx)(f,{desktop:()=>(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("# of slides to show (Large window)","snow-monkey-blocks"),value:R,onChange:e=>s({lgSlidesToShow:x(e,1,6)}),min:"1",max:6<o.length?6:o.length}),tablet:()=>(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("# of slides to show (Medium window)","snow-monkey-blocks"),value:V,onChange:e=>s({mdSlidesToShow:x(e,1,6)}),min:"1",max:6<o.length?6:o.length}),mobile:()=>(0,d.jsx)(u.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,t.__)("# of slides to show (Small window)","snow-monkey-blocks"),value:$,onChange:e=>s({smSlidesToShow:x(e,1,6)}),min:"1",max:6<o.length?6:o.length})})})]})}),H?(0,d.jsxs)("div",{...(0,c.useBlockProps)({className:q,ref:U}),"data-fade":T?"true":"false","data-shuffle":C?"true":"false","data-lg-slide-to-show":!T&&1<R?R:void 0,"data-md-slide-to-show":!T&&1<V?V:void 0,"data-sm-slide-to-show":!T&&1<$?$:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[Z&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference",ref:E})}),(0,d.jsx)("div",{className:"spider__canvas",ref:G,children:o.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height,"data-image-id":e.id})}),z&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),y&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<P&&K||S)&&(0,d.jsxs)("div",{className:"spider__dots","data-thumbnails":k?"true":"false",children:[K&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__stop",children:(0,d.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,t.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,d.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,d.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,d.jsx)("button",{className:"spider__start",children:(0,d.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,t.__)("Start autoplay","snow-monkey-blocks"),children:(0,d.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),S&&o.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:k?(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))]}),ee]}):(0,d.jsx)("div",{...(0,c.useBlockProps)({ref:U}),children:ee})]})},save:function({attributes:e,className:s}){const{images:i,aspectRatio:a,arrows:l,dots:r,dotsToThumbnail:o,fade:u,shuffle:h,shifted:m,gutter:p,displayCaption:_,interval:g,autoplayButton:f,duration:w,lgSlidesToShow:x,mdSlidesToShow:b,smSlidesToShow:v}=e;if(!i.length)return null;const j="wide"===e.align,N="full"===e.align,y=m&&!u&&(j||N),S=n()("smb-spider-slider",s,{[`smb-spider-slider--${a}`]:!!a,"smb-spider-slider--shifted":y,[`smb-spider-slider--gutter-${p}`]:!!p});return(0,d.jsxs)("div",{...c.useBlockProps.save({className:S}),"data-fade":u?"true":"false","data-shuffle":h?"true":"false","data-interval":0<g?1e3*g:void 0,"data-duration":0<w?1e3*w:void 0,"data-lg-slide-to-show":!u&&1<x?x:void 0,"data-md-slide-to-show":!u&&1<b?b:void 0,"data-sm-slide-to-show":!u&&1<v?v:void 0,children:[(0,d.jsxs)("div",{className:"spider",children:[y&&(0,d.jsx)("div",{className:"c-container",children:(0,d.jsx)("div",{className:"spider__reference"})}),(0,d.jsx)("div",{className:"spider__canvas",children:i.map(((e,s)=>(0,d.jsxs)("div",{className:"spider__slide","data-id":s,children:[(0,d.jsx)("div",{className:"smb-spider-slider__figure-wrapper",children:(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height,"data-image-id":e.id})}),_&&!!e.caption&&(0,d.jsx)("div",{className:"smb-spider-slider__item",children:(0,d.jsx)("div",{className:"smb-spider-slider__item__caption",children:e.caption})})]},s)))}),l&&(0,d.jsxs)("div",{className:"spider__arrows",children:[(0,d.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,d.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<g&&f||r)&&(0,d.jsxs)("div",{className:"spider__dots","data-thumbnails":o?"true":"false",children:[f&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"spider__stop",children:(0,d.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,t.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,d.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,d.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,d.jsx)("button",{className:"spider__start",children:(0,d.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,t.__)("Start autoplay","snow-monkey-blocks"),children:(0,d.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),r&&i.map(((e,s)=>(0,d.jsx)("button",{className:"spider__dot","data-id":s,children:o?(0,d.jsx)("img",{className:`spider__figure wp-image-${e.id}`,src:e.url,alt:e.alt,width:e.width||e.sizes?.full?.width,height:e.height||e.sizes?.full?.height}):(0,d.jsx)(d.Fragment,{children:s})},s)))]})]})},deprecated:S,example:k})},6942:(e,s)=>{var i;!function(){"use strict";var a={}.hasOwnProperty;function t(){for(var e="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(e=d(e,l(i)))}return e}function l(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return t.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var s="";for(var i in e)a.call(e,i)&&e[i]&&(s=d(s,i));return s}function d(e,s){return s?e?e+" "+s:e+s:e}e.exports?(t.default=t,e.exports=t):void 0===(i=function(){return t}.apply(s,[]))||(e.exports=i)}()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var l=i[e]={exports:{}};return s[e](l,l.exports,a),l.exports}a.m=s,e=[],a.O=(s,i,t,l)=>{if(!i){var d=1/0;for(c=0;c<e.length;c++){for(var[i,t,l]=e[c],r=!0,o=0;o<i.length;o++)(!1&l||d>=l)&&Object.keys(a.O).every((e=>a.O[e](i[o])))?i.splice(o--,1):(r=!1,l<d&&(d=l));if(r){e.splice(c--,1);var n=t();void 0!==n&&(s=n)}}return s}l=l||0;for(var c=e.length;c>0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[i,t,l]},a.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return a.d(s,{a:s}),s},a.d=(e,s)=>{for(var i in s)a.o(s,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},a.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={1427:0,8779:0};a.O.j=s=>0===e[s];var s=(s,i)=>{var t,l,[d,r,o]=i,n=0;if(d.some((s=>0!==e[s]))){for(t in r)a.o(r,t)&&(a.m[t]=r[t]);if(o)var c=o(a)}for(s&&s(i);n<d.length;n++)l=d[n],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return a.O(c)},i=globalThis.webpackChunk=globalThis.webpackChunk||[];i.forEach(s.bind(null,0)),i.push=s.bind(null,i.push.bind(i))})();var t=a.O(void 0,[8779],(()=>a(6688)));t=a.O(t)})(); -
snow-monkey-blocks/trunk/dist/blocks/step/item/standard/index.asset.php
r3390754 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' 7703d4c69df34f91b72e');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '1506854f66d887ae1fa1'); -
snow-monkey-blocks/trunk/dist/blocks/step/item/standard/index.js
r3390754 r3400189 1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=o(e,a(s)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var s in e)i.call(e,s)&&e[s]&&(t=o(t,s));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(s=function(){return l}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var l=t[i];if(void 0!==l)return l.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/step--item","uK":{"tagName":{"type":"string","default":"div"},"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-step__item__title > span","default":""},"numberColor":{"type":"string"},"imagePosition":{"type":"string","default":"center"},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-step__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-step__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-step__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-step__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"linkLabel":{"type":"string","source":"html","selector":".smb-step__item__link__label","default":""},"linkURL":{"type":"string","source":"attribute","selector":".smb-step__item__link","attribute":"href","default":""},"linkTarget":{"type":"string","source":"attribute","selector":".smb-step__item__link","attribute":"target","default":"_self"},"linkColor":{"type":"string"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}}}'),i=window.ReactJSXRuntime,l=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("rect",{x:"7.68",y:"6.14",width:"13",height:"1"}),(0,i.jsx)("rect",{x:"7.68",y:"11.14",width:"13",height:"1"}),(0,i.jsx)("rect",{x:"7.68",y:"16.14",width:"13",height:"1"}),(0,i.jsx)("path",{d:"M5.29,8.44H4.6V5.86a2.55,2.55,0,0,1-.89.52V5.75a1.87,1.87,0,0,0,.59-.33,1.24,1.24,0,0,0,.43-.57h.56Z"}),(0,i.jsx)("path",{d:"M5.85,12.8v.64H3.44a1.68,1.68,0,0,1,.24-.68,4.3,4.3,0,0,1,.77-.86A4.38,4.38,0,0,0,5,11.31a.78.78,0,0,0,.14-.42A.48.48,0,0,0,5,10.54a.49.49,0,0,0-.34-.12.46.46,0,0,0-.35.13.66.66,0,0,0-.14.43l-.69-.07a1.13,1.13,0,0,1,.39-.82,1.29,1.29,0,0,1,.8-.24,1.14,1.14,0,0,1,.83.28.92.92,0,0,1,.31.71,1.14,1.14,0,0,1-.09.46,2,2,0,0,1-.27.46,5.87,5.87,0,0,1-.45.46c-.22.2-.36.33-.41.39a1,1,0,0,0-.14.19Z"}),(0,i.jsx)("path",{d:"M3.51,17.46l.66-.08a.64.64,0,0,0,.17.39.5.5,0,0,0,.7,0,.65.65,0,0,0,.14-.43A.6.6,0,0,0,5,16.9a.43.43,0,0,0-.34-.15,1,1,0,0,0-.31.05l.07-.56a.67.67,0,0,0,.43-.12A.42.42,0,0,0,5,15.78a.39.39,0,0,0-.1-.29.4.4,0,0,0-.29-.11.41.41,0,0,0-.3.12.6.6,0,0,0-.15.36l-.63-.11a1.38,1.38,0,0,1,.2-.52.85.85,0,0,1,.37-.3,1.14,1.14,0,0,1,.53-.11,1,1,0,0,1,.81.32.83.83,0,0,1,.25.6.85.85,0,0,1-.51.75.82.82,0,0,1,.49.29.89.89,0,0,1,.18.56,1.07,1.07,0,0,1-.34.8,1.2,1.2,0,0,1-.86.33,1.15,1.15,0,0,1-.8-.28A1,1,0,0,1,3.51,17.46Z"})]});var a=s(6942),o=s.n(a);const n=window.lodash,r=window.wp.blockEditor,m=window.wp.components,c=window.wp.data,_=window.wp.element,d=window.wp.i18n,u=window.wp.primitives;var g=(0,i.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(u.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const p=({id:e,src:t,allowedTypes:s,accept:l,onSelect:a,onSelectURL:o,onRemove:n})=>(0,i.jsxs)(r.BlockControls,{group:"inline",children:[(0,i.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:l,onSelect:a,onSelectURL:o}),!!t&&!!n&&(0,i.jsx)(m.ToolbarButton,{onClick:n,children:(0,d.__)("Release","snow-monkey-blocks")})]}),h=({src:e,alt:t,id:s,style:l,width:a,height:o})=>(0,i.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:l,width:a,height:o}),b=({src:e,style:t,width:s,height:l})=>(0,i.jsx)("video",{src:e,style:t,width:s,height:l}),x=(0,_.memo)((({id:e,src:t,alt:s,url:l,width:a,height:o,target:r,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:u,mediaType:g,style:x,rel:k,linkClass:f})=>{let v;if("image"===g){let m;v=(0,i.jsx)(h,{src:t,alt:s,id:e,style:x,width:a,height:o}),m=k?(0,n.isEmpty)(k)?void 0:k:"_self"!==r&&r?"noopener noreferrer":void 0,l&&(v=(0,i.jsx)("span",{href:l,target:"_self"===r?void 0:r,rel:m,className:f,children:v}))}else"video"===g&&(v=(0,i.jsx)(b,{src:t,style:x,width:a,height:o}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p,{id:e,src:t,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:u}),v]})}),((e,t)=>{const s=Object.keys(e);for(const i of s)if(e[i]!==t[i])return!1;return!0}));function k(e){const{src:t,onSelect:s,onSelectURL:l,mediaType:a,allowedTypes:o=["image"]}=e,n=!a&&t?"image":a;let m=(0,d.__)("Media","snow-monkey-blocks");1===o.length&&("image"===o[0]?m=(0,d.__)("Image","snow-monkey-blocks"):"video"===o[0]&&(m=(0,d.__)("Video","snow-monkey-blocks")));const c=(0,_.useMemo)((()=>o.map((e=>`${e}/*`)).join(",")),[o]);return t?(0,i.jsx)(x,{...e,accept:c,allowedTypes:o,mediaType:n}):(0,i.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:s,onSelectURL:l,accept:c,allowedTypes:o})}const f=[{label:(0,d._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,d._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,d._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,d._x)("Full Size","Image size option for resolution control"),value:"full"}];function v({panelId:e,value:t,onChange:s,options:l=f,defaultValue:a=f[0].value,isShownByDefault:o=!0,withToolsPanelItem:n=!0}){const r=null!=t?t:a,c=()=>(0,i.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Resolution"),value:r,options:l,onChange:s,help:(0,d.__)("Select the size of the source image."),size:"__unstable-large"});return n?(0,i.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>r!==a,label:(0,d.__)("Resolution"),onDeselect:()=>s(a),isShownByDefault:o,panelId:e,children:(0,i.jsx)(c,{})}):(0,i.jsx)(c,{})}const j=window.wp.compose,y=["image"],w="full",N=t.uK,C=[{attributes:{...N},save({attributes:e,className:t}){const{title:s,numberColor:l,imagePosition:a,imageID:n,imageURL:m,imageAlt:c,imageWidth:_,imageHeight:d,linkLabel:u,linkURL:g,linkTarget:p,linkColor:h}=e,b=o()("smb-step__item",`smb-step__item--image-${a}`,t),x={backgroundColor:l||void 0},k={color:h||void 0};return(0,i.jsxs)("div",{...r.useBlockProps.save({className:b}),children:[(0,i.jsxs)("div",{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:x}),(0,i.jsx)(r.RichText.Content,{tagName:"span",value:s})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[!!m&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:m,alt:c,width:!!_&&_,height:!!d&&d,className:`wp-image-${n}`})}),(0,i.jsx)("div",{...r.useInnerBlocksProps.save({className:"smb-step__item__summary"})}),!r.RichText.isEmpty(u)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:g,style:k,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:[(0,i.jsx)("i",{className:"fas fa-arrow-circle-right"}),(0,i.jsx)(r.RichText.Content,{tagName:"span",className:"smb-step__item__link__label",value:u})]})]})]})}},{attributes:{...N},save({attributes:e}){const{title:t,numberColor:s,imagePosition:l,imageID:a,imageURL:o,linkLabel:n,linkURL:m,linkTarget:c,linkColor:_}=e;return(0,i.jsxs)("div",{className:`smb-step__item smb-step__item--image-${l}`,children:[(0,i.jsxs)("div",{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:{backgroundColor:s}}),(0,i.jsx)("span",{children:(0,i.jsx)(r.RichText.Content,{value:t})})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[!!a&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:o,alt:"",className:`wp-image-${a}`})}),(0,i.jsxs)("div",{className:"smb-step__item__summary",children:[(0,i.jsx)(r.InnerBlocks.Content,{}),!r.RichText.isEmpty(n)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:m,style:{color:_},target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:[(0,i.jsx)("i",{className:"fas fa-arrow-circle-right"}),(0,i.jsx)("span",{className:"smb-step__item__link__label",children:(0,i.jsx)(r.RichText.Content,{value:n})})]})]})]})]})}},{attributes:{...N,linkTarget:{type:"string",source:"attribute",selector:".smb-step__item__link",attribute:"target",default:"_self"}},save({attributes:e}){const{title:t,numberColor:s,imagePosition:l,imageID:a,imageURL:o,linkLabel:n,linkURL:m,linkTarget:c,linkColor:_}=e;return(0,i.jsxs)("div",{className:`smb-step__item smb-step__item--image-${l}`,children:[(0,i.jsxs)("div",{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:{backgroundColor:s}}),(0,i.jsx)("span",{children:(0,i.jsx)(r.RichText.Content,{value:t})})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[!!a&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:o,alt:"",className:`wp-image-${a}`})}),(0,i.jsxs)("div",{className:"smb-step__item__summary",children:[(0,i.jsx)(r.InnerBlocks.Content,{}),!r.RichText.isEmpty(n)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:m,target:c,style:{color:_},children:[(0,i.jsx)("i",{className:"fas fa-arrow-circle-right"}),(0,i.jsx)("span",{className:"smb-step__item__link__label",children:(0,i.jsx)(r.RichText.Content,{value:n})})]})]})]})]})}},{attributes:{...N},migrate:t=>[t,(()=>{let s=t.summary;return s=s.match("</p><p>")?t.summary.split("</p><p>"):t.summary.split(),(0,n.times)(s.length,(t=>{const i=s[t].replace("<p>","").replace("</p>","");return(0,e.createBlock)("core/paragraph",{content:i})}))})()],save({attributes:e}){const{title:t,summary:s,numberColor:l,imagePosition:a,imageID:o,imageURL:n,linkLabel:m,linkURL:c,linkTarget:_,linkColor:d}=e;return(0,i.jsxs)("div",{className:`smb-step__item smb-step__item--image-${a}`,children:[(0,i.jsxs)("div",{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:{backgroundColor:l}}),(0,i.jsx)("span",{children:(0,i.jsx)(r.RichText.Content,{value:t})})]}),!!o&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:n,alt:"",className:`wp-image-${o}`})}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[(0,i.jsx)("div",{className:"smb-step__item__summary",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(m)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:c,target:_,style:{color:d},children:[(0,i.jsx)("i",{className:"fas fa-arrow-circle-right"}),(0,i.jsx)("span",{className:"smb-step__item__link__label",children:(0,i.jsx)(r.RichText.Content,{value:m})})]})]})]})}}],R={to:[{type:"block",blocks:["snow-monkey-blocks/step-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/step-item-free",t)}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:e,setAttributes:s,isSelected:l,className:a,clientId:u,context:p}){const{tagName:h,titleTagName:b,title:x,numberColor:f,imagePosition:N,imageID:C,imageURL:R,imageAlt:T,imageWidth:S,imageHeight:L,imageSizeSlug:I,linkLabel:U,linkURL:B,linkTarget:P,linkColor:z,templateLock:A}=e,[D,H]=(0,_.useState)(!1),M=!!B,K="_blank"===P,[V,$]=(0,_.useState)(null),E=(0,c.useSelect)((e=>!!e("core/block-editor").getBlock(u)?.innerBlocks?.length),[u]),O=(0,c.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),W=(0,c.useSelect)((e=>C?e("core").get Media(C,{context:"view"}):null),[C]);(0,_.useEffect)((()=>{s({tagName:["ul","ol"].includes(p["snow-monkey-blocks/tagName"])?"li":"div"})}),[p["snow-monkey-blocks/tagName"]]);const F=h,Z=b,G=["div","h2","h3","h4"],J=O.filter((({slug:e})=>W?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),X=o()("smb-step__item",`smb-step__item--image-${N}`,a),q={backgroundColor:f||void 0},Q={color:z||void 0},Y=(0,_.useRef)(),ee=(0,r.useBlockProps)({className:X}),te=(0,r.useInnerBlocksProps)({className:"smb-step__item__summary"},{templateLock:A,renderAppender:E?void 0:r.InnerBlocks.ButtonBlockAppender}),se=(0,j.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.InspectorControls,{children:(0,i.jsx)(m.__experimentalToolsPanel,{label:(0,d.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:se,children:(0,i.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>h!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,d.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>s({tagName:t.uK.titleTagName.default}),children:(0,i.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/step-item/title-tag-name",children:(0,i.jsx)("div",{className:"smb-list-icon-selector",children:(0,n.times)(G.length,(e=>(0,i.jsx)(m.Button,{variant:b===G[e]?"primary":"secondary",onClick:()=>s({titleTagName:G[e]}),children:G[e]},e)))})})})})}),(0,i.jsx)(r.InspectorControls,{group:"color",children:(0,i.jsx)(r.__experimentalColorGradientSettingsDropdown,{...(0,r.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:u,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:f,onColorChange:e=>s({numberColor:e}),resetAllFilter:()=>({numberColor:t.uK.numberColor?.default}),label:(0,d.__)("Number color","snow-monkey-blocks")},{colorValue:z,onColorChange:e=>s({linkColor:e}),resetAllFilter:()=>({linkColor:t.uK.linkColor?.default}),label:(0,d.__)("Link color","snow-monkey-blocks")}]})}),(0,i.jsx)(r.InspectorControls,{children:(0,i.jsxs)(m.__experimentalToolsPanel,{label:(0,d.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:se,children:[(0,i.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>N!==t.uK.imagePosition.default,isShownByDefault:!0,label:(0,d.__)("Image position","snow-monkey-blocks"),onDeselect:()=>s({imagePosition:t.uK.imagePosition.default}),children:(0,i.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Image position","snow-monkey-blocks"),value:N,onChange:e=>s({imagePosition:e}),options:[{value:"left",label:(0,d.__)("Left side","snow-monkey-blocks")},{value:"center",label:(0,d.__)("Center","snow-monkey-blocks")},{value:"right",label:(0,d.__)("Right side","snow-monkey-blocks")}]})}),0<J.length&&(0,i.jsx)(v,{defaultValue:t.uK.imageSizeSlug.default,value:I,options:J,onChange:e=>{const t=W?.media_details?.sizes?.[e]?.source_url,i=W?.media_details?.sizes?.[e]?.width,l=W?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:i,imageHeight:l,imageSizeSlug:e})}})]})}),(0,i.jsxs)(F,{...ee,children:[(0,i.jsxs)(Z,{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:q}),(0,i.jsx)(r.RichText,{tagName:"span",placeholder:(0,d.__)("Write title…","snow-monkey-blocks"),value:x,multiline:!1,onChange:e=>s({title:e})})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[(!!R||l)&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)(k,{src:R,id:C,alt:T,width:S,height:L,onSelect:e=>{const t=e?.sizes?.[I]?I:w,i=e?.sizes?.[t]?.url,l=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;s({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:l||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==R&&s({imageURL:e,imageID:0,mediaSizeSlug:w})},onRemove:()=>s({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:y})}),(0,i.jsx)("div",{...te}),(0,i.jsxs)("span",{ref:$,className:"smb-step__item__link",href:B,style:Q,target:"_self"===P?void 0:P,rel:"_self"===P?void 0:"noopener noreferrer",children:[(0,i.jsx)("i",{className:"fas fa-circle-arrow-right"}),(0,i.jsx)(r.RichText,{className:"smb-step__item__link__label",placeholder:(0,d.__)("Link text","snow-monkey-blocks"),value:U,multiline:!1,onChange:e=>s({linkLabel:e}),withoutInteractiveFormatting:!0,ref:Y})]})]})]}),(0,i.jsx)(r.BlockControls,{group:"block",children:(0,i.jsx)(m.ToolbarButton,{name:"link",icon:g,title:(0,d.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),H(!0)},isActive:M})}),l&&D&&(0,i.jsx)(m.Popover,{placement:"bottom",anchor:V,onClose:()=>{H(!1),Y.current?.focus()},children:(0,i.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{ur:B,opensInNewTab:K},onChange:({url:e,opensInNewTab:t})=>s({linkURL:e,linkTarget:t?"_blank":"_self"}),onRemove:()=>{s({linkURL:void 0,linkTarget:void 0}),H(!1),Y.current?.focus()},forceIsEditingLink:!M})})]})},save:function({attributes:e,className:t}){const{tagName:s,titleTagName:l,title:a,numberColor:n,imagePosition:m,imageID:c,imageURL:_,imageAlt:d,imageWidth:u,imageHeight:g,linkLabel:p,linkURL:h,linkTarget:b,linkColor:x}=e,k=s,f=l,v=o()("smb-step__item",`smb-step__item--image-${m}`,t),j={backgroundColor:n||void 0},y={color:x||void 0};return(0,i.jsxs)(k,{...r.useBlockProps.save({className:v}),children:[(0,i.jsxs)(f,{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:j}),(0,i.jsx)(r.RichText.Content,{tagName:"span",value:a})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[!!_&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:_,alt:d,width:!!u&&u,height:!!g&&g,className:`wp-image-${c}`})}),(0,i.jsx)("div",{...r.useInnerBlocksProps.save({className:"smb-step__item__summary"})}),!r.RichText.isEmpty(p)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:h,style:y,target:"_self"===b?void 0:b,rel:"_self"===b?void 0:"noopener noreferrer",children:[(0,i.jsx)("i",{className:"fa-solid fa-circle-arrow-right"}),(0,i.jsx)(r.RichText.Content,{tagName:"span",className:"smb-step__item__link__label",value:p})]})]})]})},transforms:R,deprecated:C})})()})();1 (()=>{var e={6942:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=o(e,a(s)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var s in e)i.call(e,s)&&e[s]&&(t=o(t,s));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(s=function(){return l}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var l=t[i];if(void 0!==l)return l.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/step--item","uK":{"tagName":{"type":"string","default":"div"},"titleTagName":{"type":"string","default":"div"},"title":{"type":"string","source":"html","selector":".smb-step__item__title > span","default":""},"numberColor":{"type":"string"},"imagePosition":{"type":"string","default":"center"},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-step__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-step__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-step__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-step__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"linkLabel":{"type":"string","source":"html","selector":".smb-step__item__link__label","default":""},"linkURL":{"type":"string","source":"attribute","selector":".smb-step__item__link","attribute":"href","default":""},"linkTarget":{"type":"string","source":"attribute","selector":".smb-step__item__link","attribute":"target","default":"_self"},"linkColor":{"type":"string"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}}}'),i=window.ReactJSXRuntime,l=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("rect",{x:"7.68",y:"6.14",width:"13",height:"1"}),(0,i.jsx)("rect",{x:"7.68",y:"11.14",width:"13",height:"1"}),(0,i.jsx)("rect",{x:"7.68",y:"16.14",width:"13",height:"1"}),(0,i.jsx)("path",{d:"M5.29,8.44H4.6V5.86a2.55,2.55,0,0,1-.89.52V5.75a1.87,1.87,0,0,0,.59-.33,1.24,1.24,0,0,0,.43-.57h.56Z"}),(0,i.jsx)("path",{d:"M5.85,12.8v.64H3.44a1.68,1.68,0,0,1,.24-.68,4.3,4.3,0,0,1,.77-.86A4.38,4.38,0,0,0,5,11.31a.78.78,0,0,0,.14-.42A.48.48,0,0,0,5,10.54a.49.49,0,0,0-.34-.12.46.46,0,0,0-.35.13.66.66,0,0,0-.14.43l-.69-.07a1.13,1.13,0,0,1,.39-.82,1.29,1.29,0,0,1,.8-.24,1.14,1.14,0,0,1,.83.28.92.92,0,0,1,.31.71,1.14,1.14,0,0,1-.09.46,2,2,0,0,1-.27.46,5.87,5.87,0,0,1-.45.46c-.22.2-.36.33-.41.39a1,1,0,0,0-.14.19Z"}),(0,i.jsx)("path",{d:"M3.51,17.46l.66-.08a.64.64,0,0,0,.17.39.5.5,0,0,0,.7,0,.65.65,0,0,0,.14-.43A.6.6,0,0,0,5,16.9a.43.43,0,0,0-.34-.15,1,1,0,0,0-.31.05l.07-.56a.67.67,0,0,0,.43-.12A.42.42,0,0,0,5,15.78a.39.39,0,0,0-.1-.29.4.4,0,0,0-.29-.11.41.41,0,0,0-.3.12.6.6,0,0,0-.15.36l-.63-.11a1.38,1.38,0,0,1,.2-.52.85.85,0,0,1,.37-.3,1.14,1.14,0,0,1,.53-.11,1,1,0,0,1,.81.32.83.83,0,0,1,.25.6.85.85,0,0,1-.51.75.82.82,0,0,1,.49.29.89.89,0,0,1,.18.56,1.07,1.07,0,0,1-.34.8,1.2,1.2,0,0,1-.86.33,1.15,1.15,0,0,1-.8-.28A1,1,0,0,1,3.51,17.46Z"})]});var a=s(6942),o=s.n(a);const n=window.lodash,r=window.wp.blockEditor,m=window.wp.components,c=window.wp.data,_=window.wp.element,d=window.wp.i18n,u=window.wp.primitives;var g=(0,i.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(u.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const p=({id:e,src:t,allowedTypes:s,accept:l,onSelect:a,onSelectURL:o,onRemove:n})=>(0,i.jsxs)(r.BlockControls,{group:"inline",children:[(0,i.jsx)(r.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:s,accept:l,onSelect:a,onSelectURL:o}),!!t&&!!n&&(0,i.jsx)(m.ToolbarButton,{onClick:n,children:(0,d.__)("Release","snow-monkey-blocks")})]}),h=({src:e,alt:t,id:s,style:l,width:a,height:o})=>(0,i.jsx)("img",{src:e,alt:t,className:`wp-image-${s}`,style:l,width:a,height:o}),b=({src:e,style:t,width:s,height:l})=>(0,i.jsx)("video",{src:e,style:t,width:s,height:l}),x=(0,_.memo)((({id:e,src:t,alt:s,url:l,width:a,height:o,target:r,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:u,mediaType:g,style:x,rel:k,linkClass:f})=>{let v;if("image"===g){let m;v=(0,i.jsx)(h,{src:t,alt:s,id:e,style:x,width:a,height:o}),m=k?(0,n.isEmpty)(k)?void 0:k:"_self"!==r&&r?"noopener noreferrer":void 0,l&&(v=(0,i.jsx)("span",{href:l,target:"_self"===r?void 0:r,rel:m,className:f,children:v}))}else"video"===g&&(v=(0,i.jsx)(b,{src:t,style:x,width:a,height:o}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p,{id:e,src:t,allowedTypes:m,accept:c,onSelect:_,onSelectURL:d,onRemove:u}),v]})}),((e,t)=>{const s=Object.keys(e);for(const i of s)if(e[i]!==t[i])return!1;return!0}));function k(e){const{src:t,onSelect:s,onSelectURL:l,mediaType:a,allowedTypes:o=["image"]}=e,n=!a&&t?"image":a;let m=(0,d.__)("Media","snow-monkey-blocks");1===o.length&&("image"===o[0]?m=(0,d.__)("Image","snow-monkey-blocks"):"video"===o[0]&&(m=(0,d.__)("Video","snow-monkey-blocks")));const c=(0,_.useMemo)((()=>o.map((e=>`${e}/*`)).join(",")),[o]);return t?(0,i.jsx)(x,{...e,accept:c,allowedTypes:o,mediaType:n}):(0,i.jsx)(r.MediaPlaceholder,{icon:"format-image",labels:{title:m},onSelect:s,onSelectURL:l,accept:c,allowedTypes:o})}const f=[{label:(0,d._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,d._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,d._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,d._x)("Full Size","Image size option for resolution control"),value:"full"}];function v({panelId:e,value:t,onChange:s,options:l=f,defaultValue:a=f[0].value,isShownByDefault:o=!0,withToolsPanelItem:n=!0}){const r=null!=t?t:a,c=()=>(0,i.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Resolution"),value:r,options:l,onChange:s,help:(0,d.__)("Select the size of the source image."),size:"__unstable-large"});return n?(0,i.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>r!==a,label:(0,d.__)("Resolution"),onDeselect:()=>s(a),isShownByDefault:o,panelId:e,children:(0,i.jsx)(c,{})}):(0,i.jsx)(c,{})}const j=window.wp.compose,y=["image"],w="full",N=t.uK,C=[{attributes:{...N},save({attributes:e,className:t}){const{title:s,numberColor:l,imagePosition:a,imageID:n,imageURL:m,imageAlt:c,imageWidth:_,imageHeight:d,linkLabel:u,linkURL:g,linkTarget:p,linkColor:h}=e,b=o()("smb-step__item",`smb-step__item--image-${a}`,t),x={backgroundColor:l||void 0},k={color:h||void 0};return(0,i.jsxs)("div",{...r.useBlockProps.save({className:b}),children:[(0,i.jsxs)("div",{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:x}),(0,i.jsx)(r.RichText.Content,{tagName:"span",value:s})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[!!m&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:m,alt:c,width:!!_&&_,height:!!d&&d,className:`wp-image-${n}`})}),(0,i.jsx)("div",{...r.useInnerBlocksProps.save({className:"smb-step__item__summary"})}),!r.RichText.isEmpty(u)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:g,style:k,target:"_self"===p?void 0:p,rel:"_self"===p?void 0:"noopener noreferrer",children:[(0,i.jsx)("i",{className:"fas fa-arrow-circle-right"}),(0,i.jsx)(r.RichText.Content,{tagName:"span",className:"smb-step__item__link__label",value:u})]})]})]})}},{attributes:{...N},save({attributes:e}){const{title:t,numberColor:s,imagePosition:l,imageID:a,imageURL:o,linkLabel:n,linkURL:m,linkTarget:c,linkColor:_}=e;return(0,i.jsxs)("div",{className:`smb-step__item smb-step__item--image-${l}`,children:[(0,i.jsxs)("div",{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:{backgroundColor:s}}),(0,i.jsx)("span",{children:(0,i.jsx)(r.RichText.Content,{value:t})})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[!!a&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:o,alt:"",className:`wp-image-${a}`})}),(0,i.jsxs)("div",{className:"smb-step__item__summary",children:[(0,i.jsx)(r.InnerBlocks.Content,{}),!r.RichText.isEmpty(n)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:m,style:{color:_},target:"_self"===c?void 0:c,rel:"_self"===c?void 0:"noopener noreferrer",children:[(0,i.jsx)("i",{className:"fas fa-arrow-circle-right"}),(0,i.jsx)("span",{className:"smb-step__item__link__label",children:(0,i.jsx)(r.RichText.Content,{value:n})})]})]})]})]})}},{attributes:{...N,linkTarget:{type:"string",source:"attribute",selector:".smb-step__item__link",attribute:"target",default:"_self"}},save({attributes:e}){const{title:t,numberColor:s,imagePosition:l,imageID:a,imageURL:o,linkLabel:n,linkURL:m,linkTarget:c,linkColor:_}=e;return(0,i.jsxs)("div",{className:`smb-step__item smb-step__item--image-${l}`,children:[(0,i.jsxs)("div",{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:{backgroundColor:s}}),(0,i.jsx)("span",{children:(0,i.jsx)(r.RichText.Content,{value:t})})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[!!a&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:o,alt:"",className:`wp-image-${a}`})}),(0,i.jsxs)("div",{className:"smb-step__item__summary",children:[(0,i.jsx)(r.InnerBlocks.Content,{}),!r.RichText.isEmpty(n)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:m,target:c,style:{color:_},children:[(0,i.jsx)("i",{className:"fas fa-arrow-circle-right"}),(0,i.jsx)("span",{className:"smb-step__item__link__label",children:(0,i.jsx)(r.RichText.Content,{value:n})})]})]})]})]})}},{attributes:{...N},migrate:t=>[t,(()=>{let s=t.summary;return s=s.match("</p><p>")?t.summary.split("</p><p>"):t.summary.split(),(0,n.times)(s.length,(t=>{const i=s[t].replace("<p>","").replace("</p>","");return(0,e.createBlock)("core/paragraph",{content:i})}))})()],save({attributes:e}){const{title:t,summary:s,numberColor:l,imagePosition:a,imageID:o,imageURL:n,linkLabel:m,linkURL:c,linkTarget:_,linkColor:d}=e;return(0,i.jsxs)("div",{className:`smb-step__item smb-step__item--image-${a}`,children:[(0,i.jsxs)("div",{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:{backgroundColor:l}}),(0,i.jsx)("span",{children:(0,i.jsx)(r.RichText.Content,{value:t})})]}),!!o&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:n,alt:"",className:`wp-image-${o}`})}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[(0,i.jsx)("div",{className:"smb-step__item__summary",children:(0,i.jsx)(r.RichText.Content,{value:s})}),!r.RichText.isEmpty(m)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:c,target:_,style:{color:d},children:[(0,i.jsx)("i",{className:"fas fa-arrow-circle-right"}),(0,i.jsx)("span",{className:"smb-step__item__link__label",children:(0,i.jsx)(r.RichText.Content,{value:m})})]})]})]})}}],R={to:[{type:"block",blocks:["snow-monkey-blocks/step-item-free"],transform:t=>(0,e.createBlock)("snow-monkey-blocks/step-item-free",t)}]};(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:e,setAttributes:s,isSelected:l,className:a,clientId:u,context:p}){const{tagName:h,titleTagName:b,title:x,numberColor:f,imagePosition:N,imageID:C,imageURL:R,imageAlt:T,imageWidth:S,imageHeight:L,imageSizeSlug:I,linkLabel:U,linkURL:B,linkTarget:P,linkColor:z,templateLock:A}=e,[D,H]=(0,_.useState)(!1),M=!!B,K="_blank"===P,[V,$]=(0,_.useState)(null),E=(0,c.useSelect)((e=>!!e("core/block-editor").getBlock(u)?.innerBlocks?.length),[u]),O=(0,c.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),W=(0,c.useSelect)((e=>C?e("core").getEntityRecord("postType","attachment",C):null),[C]);(0,_.useEffect)((()=>{s({tagName:["ul","ol"].includes(p["snow-monkey-blocks/tagName"])?"li":"div"})}),[p["snow-monkey-blocks/tagName"]]);const F=h,Z=b,G=["div","h2","h3","h4"],J=O.filter((({slug:e})=>W?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),X=o()("smb-step__item",`smb-step__item--image-${N}`,a),q={backgroundColor:f||void 0},Q={color:z||void 0},Y=(0,_.useRef)(),ee=(0,r.useBlockProps)({className:X}),te=(0,r.useInnerBlocksProps)({className:"smb-step__item__summary"},{templateLock:A,renderAppender:E?void 0:r.InnerBlocks.ButtonBlockAppender}),se=(0,j.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.InspectorControls,{children:(0,i.jsx)(m.__experimentalToolsPanel,{label:(0,d.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:se,children:(0,i.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>h!==t.uK.titleTagName.default,isShownByDefault:!0,label:(0,d.__)("Title tag","snow-monkey-blocks"),onDeselect:()=>s({tagName:t.uK.titleTagName.default}),children:(0,i.jsx)(m.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Title tag","snow-monkey-blocks"),id:"snow-monkey-blocks/step-item/title-tag-name",children:(0,i.jsx)("div",{className:"smb-list-icon-selector",children:(0,n.times)(G.length,(e=>(0,i.jsx)(m.Button,{variant:b===G[e]?"primary":"secondary",onClick:()=>s({titleTagName:G[e]}),children:G[e]},e)))})})})})}),(0,i.jsx)(r.InspectorControls,{group:"color",children:(0,i.jsx)(r.__experimentalColorGradientSettingsDropdown,{...(0,r.__experimentalUseMultipleOriginColorsAndGradients)(),panelId:u,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:f,onColorChange:e=>s({numberColor:e}),resetAllFilter:()=>({numberColor:t.uK.numberColor?.default}),label:(0,d.__)("Number color","snow-monkey-blocks")},{colorValue:z,onColorChange:e=>s({linkColor:e}),resetAllFilter:()=>({linkColor:t.uK.linkColor?.default}),label:(0,d.__)("Link color","snow-monkey-blocks")}]})}),(0,i.jsx)(r.InspectorControls,{children:(0,i.jsxs)(m.__experimentalToolsPanel,{label:(0,d.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:se,children:[(0,i.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>N!==t.uK.imagePosition.default,isShownByDefault:!0,label:(0,d.__)("Image position","snow-monkey-blocks"),onDeselect:()=>s({imagePosition:t.uK.imagePosition.default}),children:(0,i.jsx)(m.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,d.__)("Image position","snow-monkey-blocks"),value:N,onChange:e=>s({imagePosition:e}),options:[{value:"left",label:(0,d.__)("Left side","snow-monkey-blocks")},{value:"center",label:(0,d.__)("Center","snow-monkey-blocks")},{value:"right",label:(0,d.__)("Right side","snow-monkey-blocks")}]})}),0<J.length&&(0,i.jsx)(v,{defaultValue:t.uK.imageSizeSlug.default,value:I,options:J,onChange:e=>{const t=W?.media_details?.sizes?.[e]?.source_url,i=W?.media_details?.sizes?.[e]?.width,l=W?.media_details?.sizes?.[e]?.height;s({imageURL:t,imageWidth:i,imageHeight:l,imageSizeSlug:e})}})]})}),(0,i.jsxs)(F,{...ee,children:[(0,i.jsxs)(Z,{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:q}),(0,i.jsx)(r.RichText,{tagName:"span",placeholder:(0,d.__)("Write title…","snow-monkey-blocks"),value:x,multiline:!1,onChange:e=>s({title:e})})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[(!!R||l)&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)(k,{src:R,id:C,alt:T,width:S,height:L,onSelect:e=>{const t=e?.sizes?.[I]?I:w,i=e?.sizes?.[t]?.url,l=e?.sizes?.[t]?.width,a=e?.sizes?.[t]?.height;s({imageURL:i||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:l||e.width,imageHeight:a||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==R&&s({imageURL:e,imageID:0,mediaSizeSlug:w})},onRemove:()=>s({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:y})}),(0,i.jsx)("div",{...te}),(0,i.jsxs)("span",{ref:$,className:"smb-step__item__link",href:B,style:Q,target:"_self"===P?void 0:P,rel:"_self"===P?void 0:"noopener noreferrer",children:[(0,i.jsx)("i",{className:"fas fa-circle-arrow-right"}),(0,i.jsx)(r.RichText,{className:"smb-step__item__link__label",placeholder:(0,d.__)("Link text","snow-monkey-blocks"),value:U,multiline:!1,onChange:e=>s({linkLabel:e}),withoutInteractiveFormatting:!0,ref:Y})]})]})]}),(0,i.jsx)(r.BlockControls,{group:"block",children:(0,i.jsx)(m.ToolbarButton,{name:"link",icon:g,title:(0,d.__)("Link","snow-monkey-blocks"),onClick:e=>{e.preventDefault(),H(!0)},isActive:M})}),l&&D&&(0,i.jsx)(m.Popover,{placement:"bottom",anchor:V,onClose:()=>{H(!1),Y.current?.focus()},children:(0,i.jsx)(r.LinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{ur:B,opensInNewTab:K},onChange:({url:e,opensInNewTab:t})=>s({linkURL:e,linkTarget:t?"_blank":"_self"}),onRemove:()=>{s({linkURL:void 0,linkTarget:void 0}),H(!1),Y.current?.focus()},forceIsEditingLink:!M})})]})},save:function({attributes:e,className:t}){const{tagName:s,titleTagName:l,title:a,numberColor:n,imagePosition:m,imageID:c,imageURL:_,imageAlt:d,imageWidth:u,imageHeight:g,linkLabel:p,linkURL:h,linkTarget:b,linkColor:x}=e,k=s,f=l,v=o()("smb-step__item",`smb-step__item--image-${m}`,t),j={backgroundColor:n||void 0},y={color:x||void 0};return(0,i.jsxs)(k,{...r.useBlockProps.save({className:v}),children:[(0,i.jsxs)(f,{className:"smb-step__item__title",children:[(0,i.jsx)("div",{className:"smb-step__item__number",style:j}),(0,i.jsx)(r.RichText.Content,{tagName:"span",value:a})]}),(0,i.jsxs)("div",{className:"smb-step__item__body",children:[!!_&&(0,i.jsx)("div",{className:"smb-step__item__figure",children:(0,i.jsx)("img",{src:_,alt:d,width:!!u&&u,height:!!g&&g,className:`wp-image-${c}`})}),(0,i.jsx)("div",{...r.useInnerBlocksProps.save({className:"smb-step__item__summary"})}),!r.RichText.isEmpty(p)&&(0,i.jsxs)("a",{className:"smb-step__item__link",href:h,style:y,target:"_self"===b?void 0:b,rel:"_self"===b?void 0:"noopener noreferrer",children:[(0,i.jsx)("i",{className:"fa-solid fa-circle-arrow-right"}),(0,i.jsx)(r.RichText.Content,{tagName:"span",className:"smb-step__item__link__label",value:p})]})]})]})},transforms:R,deprecated:C})})()})(); -
snow-monkey-blocks/trunk/dist/blocks/taxonomy-posts/index.asset.php
r3278039 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => ' 6727dd08705bba15e99a');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '451fc3a8054e8d499bce'); -
snow-monkey-blocks/trunk/dist/blocks/taxonomy-posts/index.js
r3278039 r3400189 1 (()=>{"use strict";var e={n:o=>{var l=o&&o.__esModule?()=>o.default:()=>o;return e.d(l,{a:l}),l},d:(o,l)=>{for(var t in l)e.o(l,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:l[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,l=window.wp.i18n,t=JSON.parse('{"UU":"snow-monkey-blocks/taxonomy-posts","uK":{"taxonomy":{"type":"string","default":null},"termId":{"type":"number","default":0},"postsPerPage":{"type":"number","default":6},"layout":{"type":"string","default":"rich-media"},"gap":{"type":"string","default":""},"ignoreStickyPosts":{"type":"boolean","default":true},"smCols":{"type":"number","default":0},"noPostsText":{"type":"string","default":""},"itemTitleTagName":{"type":"string","default":"h3"},"itemThumbnailSizeSlug":{"type":"string","default":"full"},"forceDisplayItemMeta":{"type":"boolean","default":false},"forceDisplayItemTerms":{"type":"boolean","default":false},"displayItemAuthor":{"type":"boolean"},"displayItemPublished":{"type":"boolean","default":true},"displayItemModified":{"type":"boolean","default":false},"displayItemExcerpt":{"type":"boolean"},"categoryLabelTaxonomy":{"type":"string","default":""},"arrows":{"type":"boolean","default":false},"dots":{"type":"boolean","default":true},"interval":{"type":"number","default":0},"autoplayButton":{"type":"boolean","default":false},"anchor":{"type":"string","default":""},"clientId":{"type":"string","default":""}}}'),a=window.ReactJSXRuntime,s=(0,a.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,a.jsx)("rect",{x:"3",y:"6.5",width:"4",height:"1"}),(0,a.jsx)("rect",{x:"9",y:"6.5",width:"13",height:"1"}),(0,a.jsx)("rect",{x:"3",y:"11.5",width:"4",height:"1"}),(0,a.jsx)("rect",{x:"9",y:"11.5",width:"13",height:"1"}),(0,a.jsx)("rect",{x:"3",y:"16.5",width:"4",height:"1"}),(0,a.jsx)("rect",{x:"9",y:"16.5",width:"13",height:"1"})]}),n=window.lodash,i=window.wp.components,r=window.wp.blockEditor,m=window.wp.data,c=window.wp.element,u=window.wp.serverSideRender;var d=e.n(u);const y=window.wp.compose,p=(e,o=0,l=null)=>(e=Number(e),(isNaN(e)||e<o)&&(e=o),null!==l&&e>l&&(e=l),e),_=e=>{const o=e.map((e=>({children:[],parent:null,...e}))),l=(0,n.groupBy)(o,"parent");if(l.null&&l.null.length)return o;const t=e=>e.map((e=>{const o=l[e.id];return{...e,children:o&&o.length?t(o):[]}}));return t(l[0]||[])},h=[],b=[{attributes:{...t.uK,myAnchor:{type:"string",default:""}},migrate:e=>(e.anchor=e.myAnchor,e),save:()=>null}];(0,o.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:s},keywords:[(0,l.__)("Posts list","snow-monkey-blocks"),(0,l.__)("Recent posts","snow-monkey-blocks"),(0,l.__)("Latest posts","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:o,clientId:s}){const{taxonomy:u,termId:b,postsPerPage:x,layout:g,gap:f,ignoreStickyPosts:k,smCols:w,noPostsText:T,itemTitleTagName:D,itemThumbnailSizeSlug:I,forceDisplayItemMeta:j,displayItemAuthor:S,displayItemPublished:P,displayItemModified:B,forceDisplayItemTerms:C,displayItemExcerpt:v,categoryLabelTaxonomy:M,arrows:K,dots:N,interval:H,autoplayButton:V}=e;(0,c.useEffect)((()=>{let e,l;e=null==S?!["text","text2"].includes(g):S,l=null==v?["rich-media","simple","caroucel"].includes(g):v,o({displayItemAuthor:e,displayItemExcerpt:l})}),[g]),(0,c.useEffect)((()=>{o({clientId:e.clientId||s})}),[]);const z=(0,y.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},L=(0,m.useSelect)((e=>e("core").getTaxonomies({per_page:-1})||h),[]),A=(0,c.useMemo)((()=>L.filter((e=>e.visibility.show_ui))),[L]), F=(0,m.useSelect)((e=>{const{getEntityRecords:o}=e("core");return A.map((e=>{const l=o("taxonomy",e.slug,{per_page:-1})||[];return 0<l.length?{taxonomy:e.slug,terms:l}:{}})).filter((e=>e))}),[A]),R=(0,m.useSelect)((e=>{const{getSettings:o}=e("core/block-editor");return o().imageSizes||h}),[]),E=(0,c.useMemo)((()=>R.map((e=>({value:e.slug,label:e.name})))),[R]),O=(0,c.useMemo)((()=>{const e=A.map((e=>({value:e.slug,label:e.name})));return e.unshift({value:"",label:(0,l.__)("Default (Taxonomy selected in this block)","snow-monkey-blocks")}),e}),[A]),U=(0,n.find)(F,{taxonomy:u}),$=U?(0,n.find)(U.terms,["id",p(b)]):[],J=["h2","h3","h4"],X=[{label:"S",value:1},{label:"M",value:2},{label:"L",value:3}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.InspectorControls,{children:(0,a.jsxs)(i.__experimentalToolsPanel,{label:(0,l.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:z,children:[F.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>u!==t.uK.taxonomy.default||b!==t.uK.termId.default,isShownByDefault:!0,label:(0,l.__)("Taxonomy","snow-monkey-blocks"),onDeselect:()=>o({taxonomy:t.uK.taxonomy.default,termId:t.uK.termId.default}),children:(0,a.jsx)(i.Flex,{direction:"column",children:F.map((e=>{const l=(0,n.find)(A,["slug",e.taxonomy]);return!!l&&(0,a.jsx)(i.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:l.name,noOptionLabel:"-",onChange:e=>{o({taxonomy:l.slug,termId:p(e)})},selectedId:b,tree:_(e.terms)},`${l.slug}-${b}`)}))})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>x!==t.uK.postsPerPage.default,isShownByDefault:!0,label:(0,l.__)("Number of posts","snow-monkey-blocks"),onDeselect:()=>o({postsPerPage:t.uK.postsPerPage.default}),children:(0,a.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Number of posts","snow-monkey-blocks"),value:x,onChange:e=>o({postsPerPage:p(e,1,50)}),min:"1",max:"50"})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>g!==t.uK.layout.default,isShownByDefault:!0,label:(0,l.__)("Layout","snow-monkey-blocks"),onDeselect:()=>o({layout:t.uK.layout.default}),children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Layout","snow-monkey-blocks"),value:g,onChange:e=>{o({layout:e})},options:[{value:"rich-media",label:(0,l.__)("Rich media","snow-monkey-blocks")},{value:"simple",label:(0,l.__)("Simple","snow-monkey-blocks")},{value:"text",label:(0,l.__)("Text","snow-monkey-blocks")},{value:"text2",label:(0,l.__)("Text 2","snow-monkey-blocks")},{value:"panel",label:(0,l.__)("Panels","snow-monkey-blocks")},{value:"carousel",label:(0,l.sprintf)(1 (()=>{"use strict";var e={n:o=>{var l=o&&o.__esModule?()=>o.default:()=>o;return e.d(l,{a:l}),l},d:(o,l)=>{for(var t in l)e.o(l,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:l[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,l=window.wp.i18n,t=JSON.parse('{"UU":"snow-monkey-blocks/taxonomy-posts","uK":{"taxonomy":{"type":"string","default":null},"termId":{"type":"number","default":0},"postsPerPage":{"type":"number","default":6},"layout":{"type":"string","default":"rich-media"},"gap":{"type":"string","default":""},"ignoreStickyPosts":{"type":"boolean","default":true},"smCols":{"type":"number","default":0},"noPostsText":{"type":"string","default":""},"itemTitleTagName":{"type":"string","default":"h3"},"itemThumbnailSizeSlug":{"type":"string","default":"full"},"forceDisplayItemMeta":{"type":"boolean","default":false},"forceDisplayItemTerms":{"type":"boolean","default":false},"displayItemAuthor":{"type":"boolean"},"displayItemPublished":{"type":"boolean","default":true},"displayItemModified":{"type":"boolean","default":false},"displayItemExcerpt":{"type":"boolean"},"categoryLabelTaxonomy":{"type":"string","default":""},"arrows":{"type":"boolean","default":false},"dots":{"type":"boolean","default":true},"interval":{"type":"number","default":0},"autoplayButton":{"type":"boolean","default":false},"anchor":{"type":"string","default":""},"clientId":{"type":"string","default":""}}}'),a=window.ReactJSXRuntime,s=(0,a.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,a.jsx)("rect",{x:"3",y:"6.5",width:"4",height:"1"}),(0,a.jsx)("rect",{x:"9",y:"6.5",width:"13",height:"1"}),(0,a.jsx)("rect",{x:"3",y:"11.5",width:"4",height:"1"}),(0,a.jsx)("rect",{x:"9",y:"11.5",width:"13",height:"1"}),(0,a.jsx)("rect",{x:"3",y:"16.5",width:"4",height:"1"}),(0,a.jsx)("rect",{x:"9",y:"16.5",width:"13",height:"1"})]}),n=window.lodash,i=window.wp.components,r=window.wp.blockEditor,m=window.wp.data,c=window.wp.element,u=window.wp.serverSideRender;var d=e.n(u);const y=window.wp.compose,p=(e,o=0,l=null)=>(e=Number(e),(isNaN(e)||e<o)&&(e=o),null!==l&&e>l&&(e=l),e),_=e=>{const o=e.map((e=>({children:[],parent:null,...e}))),l=(0,n.groupBy)(o,"parent");if(l.null&&l.null.length)return o;const t=e=>e.map((e=>{const o=l[e.id];return{...e,children:o&&o.length?t(o):[]}}));return t(l[0]||[])},h=[],b=[{attributes:{...t.uK,myAnchor:{type:"string",default:""}},migrate:e=>(e.anchor=e.myAnchor,e),save:()=>null}];(0,o.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:s},keywords:[(0,l.__)("Posts list","snow-monkey-blocks"),(0,l.__)("Recent posts","snow-monkey-blocks"),(0,l.__)("Latest posts","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:o,clientId:s}){const{taxonomy:u,termId:b,postsPerPage:x,layout:g,gap:f,ignoreStickyPosts:k,smCols:w,noPostsText:T,itemTitleTagName:D,itemThumbnailSizeSlug:I,forceDisplayItemMeta:j,displayItemAuthor:S,displayItemPublished:P,displayItemModified:B,forceDisplayItemTerms:C,displayItemExcerpt:v,categoryLabelTaxonomy:M,arrows:K,dots:N,interval:H,autoplayButton:V}=e;(0,c.useEffect)((()=>{let e,l;e=null==S?!["text","text2"].includes(g):S,l=null==v?["rich-media","simple","caroucel"].includes(g):v,o({displayItemAuthor:e,displayItemExcerpt:l})}),[g]),(0,c.useEffect)((()=>{o({clientId:e.clientId||s})}),[]);const z=(0,y.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},L=(0,m.useSelect)((e=>e("core").getTaxonomies({per_page:-1})||h),[]),A=(0,c.useMemo)((()=>L.filter((e=>e.visibility.show_ui))),[L]),{getEntityRecords:F}=(0,m.useSelect)((e=>e("core")),[]),R=(0,c.useMemo)((()=>A.map((e=>{const o=F("taxonomy",e.slug,{per_page:-1})||[];return 0<o.length?{taxonomy:e.slug,terms:o}:null})).filter(Boolean)),[A,F]),E=(0,m.useSelect)((e=>{const{getSettings:o}=e("core/block-editor");return o().imageSizes||h}),[]),O=(0,c.useMemo)((()=>E.map((e=>({value:e.slug,label:e.name})))),[E]),U=(0,c.useMemo)((()=>{const e=A.map((e=>({value:e.slug,label:e.name})));return e.unshift({value:"",label:(0,l.__)("Default (Taxonomy selected in this block)","snow-monkey-blocks")}),e}),[A]),$=(0,n.find)(R,{taxonomy:u}),J=$?(0,n.find)($.terms,["id",p(b)]):[],X=["h2","h3","h4"],q=[{label:"S",value:1},{label:"M",value:2},{label:"L",value:3}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.InspectorControls,{children:(0,a.jsxs)(i.__experimentalToolsPanel,{label:(0,l.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:z,children:[R.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>u!==t.uK.taxonomy.default||b!==t.uK.termId.default,isShownByDefault:!0,label:(0,l.__)("Taxonomy","snow-monkey-blocks"),onDeselect:()=>o({taxonomy:t.uK.taxonomy.default,termId:t.uK.termId.default}),children:(0,a.jsx)(i.Flex,{direction:"column",children:R.map((e=>{const l=(0,n.find)(A,["slug",e.taxonomy]);return!!l&&(0,a.jsx)(i.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:l.name,noOptionLabel:"-",onChange:e=>{o({taxonomy:l.slug,termId:p(e)})},selectedId:b,tree:_(e.terms)},`${l.slug}-${b}`)}))})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>x!==t.uK.postsPerPage.default,isShownByDefault:!0,label:(0,l.__)("Number of posts","snow-monkey-blocks"),onDeselect:()=>o({postsPerPage:t.uK.postsPerPage.default}),children:(0,a.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Number of posts","snow-monkey-blocks"),value:x,onChange:e=>o({postsPerPage:p(e,1,50)}),min:"1",max:"50"})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>g!==t.uK.layout.default,isShownByDefault:!0,label:(0,l.__)("Layout","snow-monkey-blocks"),onDeselect:()=>o({layout:t.uK.layout.default}),children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Layout","snow-monkey-blocks"),value:g,onChange:e=>{o({layout:e})},options:[{value:"rich-media",label:(0,l.__)("Rich media","snow-monkey-blocks")},{value:"simple",label:(0,l.__)("Simple","snow-monkey-blocks")},{value:"text",label:(0,l.__)("Text","snow-monkey-blocks")},{value:"text2",label:(0,l.__)("Text 2","snow-monkey-blocks")},{value:"panel",label:(0,l.__)("Panels","snow-monkey-blocks")},{value:"carousel",label:(0,l.sprintf)( 2 2 // translators: %1$s: Layout 3 3 // translators: %1$s: Layout 4 (0,l.__)("Carousel (%1$s)","snow-monkey-blocks"),(0,l.__)("Rich media","snow-monkey-blocks"))},{value:"large-image",label:(0,l.__)("Large image","snow-monkey-blocks")}]})})]}):(0,a.jsx)("div",{style:{gridColumn:"1/-1"},children:(0,a.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Loading taxonomies…","snow-monkey-blocks"),id:"snow-monkey-blocks/taxonomy-posts/taxonomies",children:(0,a.jsx)(i.Spinner,{})})}),"carousel"===g&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>K!==t.uK.arrows.default,isShownByDefault:!0,label:(0,l.__)("Display arrows","snow-monkey-blocks"),onDeselect:()=>o({arrows:t.uK.arrows.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display arrows","snow-monkey-blocks"),checked:K,onChange:e=>o({arrows:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>N!==t.uK.dots.default,isShownByDefault:!0,label:(0,l.__)("Display dots","snow-monkey-blocks"),onDeselect:()=>o({dots:t.uK.dots.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display dots","snow-monkey-blocks"),checked:N,onChange:e=>o({dots:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>H!==t.uK.interval.default,isShownByDefault:!0,label:(0,l.__)("Autoplay Speed in seconds","snow-monkey-blocks"),onDeselect:()=>o({interval:t.uK.interval.default}),children:(0,a.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Autoplay Speed in seconds","snow-monkey-blocks"),help:(0,l.__)('If "0", no scroll.',"snow-monkey-blocks"),value:H,onChange:e=>o({interval:p(e,0,10)}),min:"0",max:"10"})}),0<H&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>V!==t.uK.autoplayButton.default,isShownByDefault:!0,label:(0,l.__)("Display pause button for autoplay","snow-monkey-blocks"),onDeselect:()=>o({autoplayButton:t.uK.autoplayButton.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display pause button for autoplay","snow-monkey-blocks"),checked:V,onChange:e=>o({autoplayButton:e})})})]}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>D!==t.uK.itemTitleTagName.default,isShownByDefault:!0,label:(0,l.__)("Title tag of each items","snow-monkey-blocks"),onDeselect:()=>o({itemTitleTagName:t.uK.itemTitleTagName.default}),children:(0,a.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Title tag of each items","snow-monkey-blocks"),id:"snow-monkey-blocks/taxonomy-posts/item-title-tag-name",children:(0,a.jsx)("div",{className:"smb-list-icon-selector",children:(0,n.times)( J.length,(e=>(0,a.jsx)(i.Button,{variant:D===J[e]?"primary":"secondary",onClick:()=>o({itemTitleTagName:J[e]}),children:J[e]},e)))})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>I!==t.uK.itemThumbnailSizeSlug.default,isShownByDefault:!0,label:(0,l.__)("Images size of each items","snow-monkey-blocks"),onDeselect:()=>o({itemThumbnailSizeSlug:t.uK.itemThumbnailSizeSlug.default}),children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Images size of each items","snow-monkey-blocks"),value:I,options:E,onChange:e=>o({itemThumbnailSizeSlug:e})})}),"category"!==u&&"post_tag"!==u&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>j!==t.uK.forceDisplayItemMeta.default,isShownByDefault:!0,label:(0,l.__)("Force display meta of each items","snow-monkey-blocks"),onDeselect:()=>o({forceDisplayItemMeta:t.uK.forceDisplayItemMeta.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Force display meta of each items","snow-monkey-blocks"),help:(0,l.__)("If it's already displayed, this setting will be ignored.","snow-monkey-blocks"),checked:j,onChange:e=>o({forceDisplayItemMeta:e})})}),("category"===u||"post_tag"===u||j)&&"text"!==g&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>S!==!["text","text2"].includes(g),isShownByDefault:!0,label:(0,l.__)("Display author of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemAuthor:!["text","text2"].includes(g)}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display author of each items","snow-monkey-blocks"),checked:S,onChange:e=>o({displayItemAuthor:e})})}),("category"===u||"post_tag"===u||j)&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>P!==t.uK.displayItemPublished.default,isShownByDefault:!0,label:(0,l.__)("Display published date of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemPublished:t.uK.displayItemPublished.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display published date of each items","snow-monkey-blocks"),checked:P,onChange:e=>o({displayItemPublished:e})})}),("category"===u||"post_tag"===u||j)&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>B!==t.uK.displayItemModified.default,isShownByDefault:!0,label:(0,l.__)("Display modified date of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemModified:t.uK.displayItemModified.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display modified date of each items","snow-monkey-blocks"),checked:B,onChange:e=>o({displayItemModified:e})})}),["rich-media","simple","panel","carousel"].includes(g)&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>v===["rich-media","simple","panel","carousel"].includes(g),isShownByDefault:!0,label:(0,l.__)("Display excerpt of each items","snow-monkey-blocks"),onDeselect:()=>{o({displayItemExcerpt:["rich-media","simple","panel","carousel"].includes(g)})},children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display excerpt of each items","snow-monkey-blocks"),checked:v,onChange:e=>o({displayItemExcerpt:e})})}),"category"!==u&&"post_tag"!==u&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>C!==t.uK.forceDisplayItemTerms.default,isShownByDefault:!0,label:(0,l.__)("Force display category label of each items","snow-monkey-blocks"),onDeselect:()=>o({forceDisplayItemTerms:t.uK.forceDisplayItemTerms.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Force display category label of each items","snow-monkey-blocks"),help:(0,l.__)("If it's already displayed, this setting will be ignored.","snow-monkey-blocks"),checked:C,onChange:e=>o({forceDisplayItemTerms:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>M!==t.uK.categoryLabelTaxonomy.default,isShownByDefault:!0,label:(0,l.__)("Taxonomy to use for the category label","snow-monkey-blocks"),onDeselect:()=>o({categoryLabelTaxonomy:t.uK.categoryLabelTaxonomy.default}),children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Taxonomy to use for the category label","snow-monkey-blocks"),help:(0,l.__)("If no category labels are displayed, this setting will be ignored.","snow-monkey-blocks"),value:M,options:O,onChange:e=>o({categoryLabelTaxonomy:e})})}),("rich-media"===g||"panel"===g)&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>w!==t.uK.smCols.default,isShownByDefault:!0,label:(0,l.__)("Number of columns displayed on mobile device","snow-monkey-blocks"),onDeselect:()=>o({smCols:t.uK.smCols.default}),children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Number of columns displayed on mobile device","snow-monkey-blocks"),value:w,onChange:e=>o({smCols:p(e)}),options:[{value:0,label:(0,l.__)("Default","snow-monkey-blocks")},{value:1,label:(0,l.__)("1 column","snow-monkey-blocks")},{value:2,label:(0,l.__)("2 columns","snow-monkey-blocks")}]})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>k!==t.uK.ignoreStickyPosts.default,isShownByDefault:!0,label:(0,l.__)("Ignore sticky posts","snow-monkey-blocks"),onDeselect:()=>o({ignoreStickyPosts:t.uK.ignoreStickyPosts.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Ignore sticky posts","snow-monkey-blocks"),checked:k,onChange:e=>o({ignoreStickyPosts:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>T!==t.uK.noPostsText.default,isShownByDefault:!0,label:(0,l.__)("Text if no posts matched","snow-monkey-blocks"),onDeselect:()=>o({noPostsText:t.uK.noPostsText.default}),children:(0,a.jsx)(i.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Text if no posts matched","snow-monkey-blocks"),help:(0,l.__)("Allow HTML","snow-monkey-blocks"),value:T||"",onChange:e=>o({noPostsText:e})})})]})}),(0,a.jsx)(r.InspectorControls,{group:"dimensions",children:(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>f!==t.uK.gap.default,isShownByDefault:!0,label:(0,l.__)("The gap between each item","snow-monkey-blocks"),onDeselect:()=>o({gap:t.uK.gap.default}),panelId:s,children:(0,a.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,id:"snow-monkey-blocks/recent-posts/gap",label:(0,l.__)("The gap between each item","snow-monkey-blocks"),className:"spacing-sizes-control",children:(0,a.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"spacing-sizes-control__range-control",value:X.filter((e=>e.label?.toLowerCase()===f))?.[0]?.value,resetFallbackValue:void 0,onChange:e=>o({gap:X.filter((o=>o.value===e))?.[0]?.label?.toLowerCase()}),withInputField:!1,min:1,max:3,marks:!0,renderTooltipContent:e=>X.filter((o=>o.value===e))?.[0]?.label?.toUpperCase(),hideLabelFromVision:!0})})})}),(0,a.jsx)("div",{...(0,r.useBlockProps)(),children:$&&U?(0,a.jsx)(i.Disabled,{children:(0,a.jsx)(d(),{block:"snow-monkey-blocks/taxonomy-posts",attributes:e})}):(0,a.jsx)(i.Placeholder,{icon:"editor-ul",label:(0,l.__)("Taxonomy posts","snow-monkey-blocks"),children:(0,a.jsx)(i.Spinner,{})})})]})},save:function(){return(0,a.jsx)("div",{...r.useBlockProps.save(),"data-dynamic-block":"snow-monkey-blocks/taxonomy-posts","data-version":"2"})},deprecated:b})})();4 (0,l.__)("Carousel (%1$s)","snow-monkey-blocks"),(0,l.__)("Rich media","snow-monkey-blocks"))},{value:"large-image",label:(0,l.__)("Large image","snow-monkey-blocks")}]})})]}):(0,a.jsx)("div",{style:{gridColumn:"1/-1"},children:(0,a.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Loading taxonomies…","snow-monkey-blocks"),id:"snow-monkey-blocks/taxonomy-posts/taxonomies",children:(0,a.jsx)(i.Spinner,{})})}),"carousel"===g&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>K!==t.uK.arrows.default,isShownByDefault:!0,label:(0,l.__)("Display arrows","snow-monkey-blocks"),onDeselect:()=>o({arrows:t.uK.arrows.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display arrows","snow-monkey-blocks"),checked:K,onChange:e=>o({arrows:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>N!==t.uK.dots.default,isShownByDefault:!0,label:(0,l.__)("Display dots","snow-monkey-blocks"),onDeselect:()=>o({dots:t.uK.dots.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display dots","snow-monkey-blocks"),checked:N,onChange:e=>o({dots:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>H!==t.uK.interval.default,isShownByDefault:!0,label:(0,l.__)("Autoplay Speed in seconds","snow-monkey-blocks"),onDeselect:()=>o({interval:t.uK.interval.default}),children:(0,a.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Autoplay Speed in seconds","snow-monkey-blocks"),help:(0,l.__)('If "0", no scroll.',"snow-monkey-blocks"),value:H,onChange:e=>o({interval:p(e,0,10)}),min:"0",max:"10"})}),0<H&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>V!==t.uK.autoplayButton.default,isShownByDefault:!0,label:(0,l.__)("Display pause button for autoplay","snow-monkey-blocks"),onDeselect:()=>o({autoplayButton:t.uK.autoplayButton.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display pause button for autoplay","snow-monkey-blocks"),checked:V,onChange:e=>o({autoplayButton:e})})})]}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>D!==t.uK.itemTitleTagName.default,isShownByDefault:!0,label:(0,l.__)("Title tag of each items","snow-monkey-blocks"),onDeselect:()=>o({itemTitleTagName:t.uK.itemTitleTagName.default}),children:(0,a.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Title tag of each items","snow-monkey-blocks"),id:"snow-monkey-blocks/taxonomy-posts/item-title-tag-name",children:(0,a.jsx)("div",{className:"smb-list-icon-selector",children:(0,n.times)(X.length,(e=>(0,a.jsx)(i.Button,{variant:D===X[e]?"primary":"secondary",onClick:()=>o({itemTitleTagName:X[e]}),children:X[e]},e)))})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>I!==t.uK.itemThumbnailSizeSlug.default,isShownByDefault:!0,label:(0,l.__)("Images size of each items","snow-monkey-blocks"),onDeselect:()=>o({itemThumbnailSizeSlug:t.uK.itemThumbnailSizeSlug.default}),children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Images size of each items","snow-monkey-blocks"),value:I,options:O,onChange:e=>o({itemThumbnailSizeSlug:e})})}),"category"!==u&&"post_tag"!==u&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>j!==t.uK.forceDisplayItemMeta.default,isShownByDefault:!0,label:(0,l.__)("Force display meta of each items","snow-monkey-blocks"),onDeselect:()=>o({forceDisplayItemMeta:t.uK.forceDisplayItemMeta.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Force display meta of each items","snow-monkey-blocks"),help:(0,l.__)("If it's already displayed, this setting will be ignored.","snow-monkey-blocks"),checked:j,onChange:e=>o({forceDisplayItemMeta:e})})}),("category"===u||"post_tag"===u||j)&&"text"!==g&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>S!==!["text","text2"].includes(g),isShownByDefault:!0,label:(0,l.__)("Display author of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemAuthor:!["text","text2"].includes(g)}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display author of each items","snow-monkey-blocks"),checked:S,onChange:e=>o({displayItemAuthor:e})})}),("category"===u||"post_tag"===u||j)&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>P!==t.uK.displayItemPublished.default,isShownByDefault:!0,label:(0,l.__)("Display published date of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemPublished:t.uK.displayItemPublished.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display published date of each items","snow-monkey-blocks"),checked:P,onChange:e=>o({displayItemPublished:e})})}),("category"===u||"post_tag"===u||j)&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>B!==t.uK.displayItemModified.default,isShownByDefault:!0,label:(0,l.__)("Display modified date of each items","snow-monkey-blocks"),onDeselect:()=>o({displayItemModified:t.uK.displayItemModified.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display modified date of each items","snow-monkey-blocks"),checked:B,onChange:e=>o({displayItemModified:e})})}),["rich-media","simple","panel","carousel"].includes(g)&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>v===["rich-media","simple","panel","carousel"].includes(g),isShownByDefault:!0,label:(0,l.__)("Display excerpt of each items","snow-monkey-blocks"),onDeselect:()=>{o({displayItemExcerpt:["rich-media","simple","panel","carousel"].includes(g)})},children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Display excerpt of each items","snow-monkey-blocks"),checked:v,onChange:e=>o({displayItemExcerpt:e})})}),"category"!==u&&"post_tag"!==u&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>C!==t.uK.forceDisplayItemTerms.default,isShownByDefault:!0,label:(0,l.__)("Force display category label of each items","snow-monkey-blocks"),onDeselect:()=>o({forceDisplayItemTerms:t.uK.forceDisplayItemTerms.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Force display category label of each items","snow-monkey-blocks"),help:(0,l.__)("If it's already displayed, this setting will be ignored.","snow-monkey-blocks"),checked:C,onChange:e=>o({forceDisplayItemTerms:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>M!==t.uK.categoryLabelTaxonomy.default,isShownByDefault:!0,label:(0,l.__)("Taxonomy to use for the category label","snow-monkey-blocks"),onDeselect:()=>o({categoryLabelTaxonomy:t.uK.categoryLabelTaxonomy.default}),children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Taxonomy to use for the category label","snow-monkey-blocks"),help:(0,l.__)("If no category labels are displayed, this setting will be ignored.","snow-monkey-blocks"),value:M,options:U,onChange:e=>o({categoryLabelTaxonomy:e})})}),("rich-media"===g||"panel"===g)&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>w!==t.uK.smCols.default,isShownByDefault:!0,label:(0,l.__)("Number of columns displayed on mobile device","snow-monkey-blocks"),onDeselect:()=>o({smCols:t.uK.smCols.default}),children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Number of columns displayed on mobile device","snow-monkey-blocks"),value:w,onChange:e=>o({smCols:p(e)}),options:[{value:0,label:(0,l.__)("Default","snow-monkey-blocks")},{value:1,label:(0,l.__)("1 column","snow-monkey-blocks")},{value:2,label:(0,l.__)("2 columns","snow-monkey-blocks")}]})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>k!==t.uK.ignoreStickyPosts.default,isShownByDefault:!0,label:(0,l.__)("Ignore sticky posts","snow-monkey-blocks"),onDeselect:()=>o({ignoreStickyPosts:t.uK.ignoreStickyPosts.default}),children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Ignore sticky posts","snow-monkey-blocks"),checked:k,onChange:e=>o({ignoreStickyPosts:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>T!==t.uK.noPostsText.default,isShownByDefault:!0,label:(0,l.__)("Text if no posts matched","snow-monkey-blocks"),onDeselect:()=>o({noPostsText:t.uK.noPostsText.default}),children:(0,a.jsx)(i.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Text if no posts matched","snow-monkey-blocks"),help:(0,l.__)("Allow HTML","snow-monkey-blocks"),value:T||"",onChange:e=>o({noPostsText:e})})})]})}),(0,a.jsx)(r.InspectorControls,{group:"dimensions",children:(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>f!==t.uK.gap.default,isShownByDefault:!0,label:(0,l.__)("The gap between each item","snow-monkey-blocks"),onDeselect:()=>o({gap:t.uK.gap.default}),panelId:s,children:(0,a.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,id:"snow-monkey-blocks/recent-posts/gap",label:(0,l.__)("The gap between each item","snow-monkey-blocks"),className:"spacing-sizes-control",children:(0,a.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"spacing-sizes-control__range-control",value:q.filter((e=>e.label?.toLowerCase()===f))?.[0]?.value,resetFallbackValue:void 0,onChange:e=>o({gap:q.filter((o=>o.value===e))?.[0]?.label?.toLowerCase()}),withInputField:!1,min:1,max:3,marks:!0,renderTooltipContent:e=>q.filter((o=>o.value===e))?.[0]?.label?.toUpperCase(),hideLabelFromVision:!0})})})}),(0,a.jsx)("div",{...(0,r.useBlockProps)(),children:J&&$?(0,a.jsx)(i.Disabled,{children:(0,a.jsx)(d(),{block:"snow-monkey-blocks/taxonomy-posts",attributes:e})}):(0,a.jsx)(i.Placeholder,{icon:"editor-ul",label:(0,l.__)("Taxonomy posts","snow-monkey-blocks"),children:(0,a.jsx)(i.Spinner,{})})})]})},save:function(){return(0,a.jsx)("div",{...r.useBlockProps.save(),"data-dynamic-block":"snow-monkey-blocks/taxonomy-posts","data-version":"2"})},deprecated:b})})(); -
snow-monkey-blocks/trunk/dist/blocks/thumbnail-gallery/item/index.asset.php
r3278039 r3400189 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' e3a9cc019b137fa28cdf');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'dfff8c0167e70ff0b1b8'); -
snow-monkey-blocks/trunk/dist/blocks/thumbnail-gallery/item/index.js
r3278039 r3400189 1 (()=>{var e={6942:(e,t)=>{var i;!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=o(e,s(i)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var i in e)a.call(e,i)&&e[i]&&(t=o(t,i));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(i=function(){return l}.apply(t,[]))||(e.exports=i)}()}},t={};function i(a){var l=t[a];if(void 0!==l)return l.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/thumbnail-gallery-item","uK":{"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-thumbnail-gallery__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-thumbnail-gallery__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-thumbnail-gallery__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-thumbnail-gallery__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"caption":{"type":"string","source":"html","selector":".smb-thumbnail-gallery__item__caption","default":""}}}'),a=window.ReactJSXRuntime,l=(0,a.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,a.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,a.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,a.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,a.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 s=i(6942),o=i.n(s);const n=window.wp.blockEditor,r=window.wp.components,c=window.wp.data,m=window.wp.i18n,u=window.lodash,g=window.wp.compose,d=window.wp.element,h=({id:e,src:t,allowedTypes:i,accept:l,onSelect:s,onSelectURL:o,onRemove:c})=>(0,a.jsxs)(n.BlockControls,{group:"inline",children:[(0,a.jsx)(n.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:i,accept:l,onSelect:s,onSelectURL:o}),!!t&&!!c&&(0,a.jsx)(r.ToolbarButton,{onClick:c,children:(0,m.__)("Release","snow-monkey-blocks")})]}),p=({src:e,alt:t,id:i,style:l,width:s,height:o})=>(0,a.jsx)("img",{src:e,alt:t,className:`wp-image-${i}`,style:l,width:s,height:o}),_=({src:e,style:t,width:i,height:l})=>(0,a.jsx)("video",{src:e,style:t,width:i,height:l}),f=(0,d.memo)((({id:e,src:t,alt:i,url:l,width:s,height:o,target:n,allowedTypes:r,accept:c,onSelect:m,onSelectURL:g,onRemove:d,mediaType:f,style:w,rel:b,linkClass:y})=>{let x;if("image"===f){let r;x=(0,a.jsx)(p,{src:t,alt:i,id:e,style:w,width:s,height:o}),r=b?(0,u.isEmpty)(b)?void 0:b:"_self"!==n&&n?"noopener noreferrer":void 0,l&&(x=(0,a.jsx)("span",{href:l,target:"_self"===n?void 0:n,rel:r,className:y,children:x}))}else"video"===f&&(x=(0,a.jsx)(_,{src:t,style:w,width:s,height:o}));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h,{id:e,src:t,allowedTypes:r,accept:c,onSelect:m,onSelectURL:g,onRemove:d}),x]})}),((e,t)=>{const i=Object.keys(e);for(const a of i)if(e[a]!==t[a])return!1;return!0}));function w(e){const{src:t,onSelect:i,onSelectURL:l,mediaType:s,allowedTypes:o=["image"]}=e,r=!s&&t?"image":s;let c=(0,m.__)("Media","snow-monkey-blocks");1===o.length&&("image"===o[0]?c=(0,m.__)("Image","snow-monkey-blocks"):"video"===o[0]&&(c=(0,m.__)("Video","snow-monkey-blocks")));const u=(0,d.useMemo)((()=>o.map((e=>`${e}/*`)).join(",")),[o]);return t?(0,a.jsx)(f,{...e,accept:u,allowedTypes:o,mediaType:r}):(0,a.jsx)(n.MediaPlaceholder,{icon:"format-image",labels:{title:c},onSelect:i,onSelectURL:l,accept:u,allowedTypes:o})}const b=[{label:(0,m._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,m._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,m._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,m._x)("Full Size","Image size option for resolution control"),value:"full"}];function y({panelId:e,value:t,onChange:i,options:l=b,defaultValue:s=b[0].value,isShownByDefault:o=!0,withToolsPanelItem:n=!0}){const c=null!=t?t:s,u=()=>(0,a.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,m.__)("Resolution"),value:c,options:l,onChange:i,help:(0,m.__)("Select the size of the source image."),size:"__unstable-large"});return n?(0,a.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>c!==s,label:(0,m.__)("Resolution"),onDeselect:()=>i(s),isShownByDefault:o,panelId:e,children:(0,a.jsx)(u,{})}):(0,a.jsx)(u,{})}const x=["image"],v="full",S=[{attributes:{...t.uK},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{imageID:i,imageURL:l,imageAlt:s}=e,n=o()("smb-thumbnail-gallery__item",t);return(0,a.jsx)(a.Fragment,{children:!!i&&(0,a.jsx)("div",{className:n,children:(0,a.jsx)("div",{className:"smb-thumbnail-gallery__item__figure",children:(0,a.jsx)("img",{src:l,alt:s,className:`wp-image-${i}`})})})})}}];(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:e,setAttributes:i,isSelected:l,className:s}){const{imageID:u,imageURL:d,imageAlt:h,imageWidth:p,imageHeight:_,imageSizeSlug:f,caption:b}=e,S=(0,c.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),j=(0,c.useSelect)((e=>u?e("core").get Media(u,{context:"view"}):null),[u]),R=S.filter((({slug:e})=>j?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),k=o()("c-row__col",s),z=(0,n.useBlockProps)({className:k}),T=(0,g.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.InspectorControls,{children:0<R.length&&(0,a.jsx)(r.__experimentalToolsPanel,{label:(0,m.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:T,children:(0,a.jsx)(y,{defaultValue:t.uK.imageSizeSlug.default,value:f,options:R,onChange:e=>{const t=j?.media_details?.sizes?.[e]?.source_url,a=j?.media_details?.sizes?.[e]?.width,l=j?.media_details?.sizes?.[e]?.height;i({imageURL:t,imageWidth:a,imageHeight:l,imageSizeSlug:e})}})})}),(0,a.jsxs)("div",{...z,children:[(0,a.jsx)(w,{src:d,id:u,alt:h,width:p,height:_,onSelect:e=>{const t=e?.sizes?.[f]?f:v,a=e?.sizes?.[t]?.url,l=e?.sizes?.[t]?.width,s=e?.sizes?.[t]?.height;i({imageURL:a||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:l||e.width,imageHeight:s||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==d&&i({imageURL:e,imageID:0,mediaSizeSlug:v})},onRemove:()=>i({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:x}),(!n.RichText.isEmpty(b)||l)&&(0,a.jsx)(n.RichText,{placeholder:(0,m.__)("Write caption…","snow-monkey-blocks"),value:b,onChange:e=>i({caption:e})})]})]})},save:function({attributes:e,className:t}){const{imageID:i,imageURL:l,imageAlt:s,imageWidth:r,imageHeight:c,caption:m}=e,u=o()("smb-thumbnail-gallery__item",t);return(0,a.jsxs)("div",{...n.useBlockProps.save({className:u}),children:[(0,a.jsx)("div",{className:"smb-thumbnail-gallery__item__figure",children:(0,a.jsx)("img",{src:l,alt:s,width:!!r&&r,height:!!c&&c,className:`wp-image-${i}`})}),!n.RichText.isEmpty(m)&&(0,a.jsx)("div",{className:"smb-thumbnail-gallery__item__caption",children:(0,a.jsx)(n.RichText.Content,{value:m})})]})},deprecated:S})})()})();1 (()=>{var e={6942:(e,t)=>{var i;!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=o(e,s(i)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var i in e)a.call(e,i)&&e[i]&&(t=o(t,i));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(i=function(){return l}.apply(t,[]))||(e.exports=i)}()}},t={};function i(a){var l=t[a];if(void 0!==l)return l.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/thumbnail-gallery-item","uK":{"imageID":{"type":"number","default":0},"imageURL":{"type":"string","source":"attribute","selector":".smb-thumbnail-gallery__item__figure > img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":".smb-thumbnail-gallery__item__figure > img","attribute":"alt","default":""},"imageWidth":{"type":"string","source":"attribute","selector":".smb-thumbnail-gallery__item__figure > img","attribute":"width","default":""},"imageHeight":{"type":"string","source":"attribute","selector":".smb-thumbnail-gallery__item__figure > img","attribute":"height","default":""},"imageSizeSlug":{"type":"string","default":"full"},"caption":{"type":"string","source":"html","selector":".smb-thumbnail-gallery__item__caption","default":""}}}'),a=window.ReactJSXRuntime,l=(0,a.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,a.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,a.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,a.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,a.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 s=i(6942),o=i.n(s);const n=window.wp.blockEditor,r=window.wp.components,c=window.wp.data,m=window.wp.i18n,u=window.lodash,g=window.wp.compose,d=window.wp.element,h=({id:e,src:t,allowedTypes:i,accept:l,onSelect:s,onSelectURL:o,onRemove:c})=>(0,a.jsxs)(n.BlockControls,{group:"inline",children:[(0,a.jsx)(n.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:i,accept:l,onSelect:s,onSelectURL:o}),!!t&&!!c&&(0,a.jsx)(r.ToolbarButton,{onClick:c,children:(0,m.__)("Release","snow-monkey-blocks")})]}),p=({src:e,alt:t,id:i,style:l,width:s,height:o})=>(0,a.jsx)("img",{src:e,alt:t,className:`wp-image-${i}`,style:l,width:s,height:o}),_=({src:e,style:t,width:i,height:l})=>(0,a.jsx)("video",{src:e,style:t,width:i,height:l}),f=(0,d.memo)((({id:e,src:t,alt:i,url:l,width:s,height:o,target:n,allowedTypes:r,accept:c,onSelect:m,onSelectURL:g,onRemove:d,mediaType:f,style:w,rel:b,linkClass:y})=>{let x;if("image"===f){let r;x=(0,a.jsx)(p,{src:t,alt:i,id:e,style:w,width:s,height:o}),r=b?(0,u.isEmpty)(b)?void 0:b:"_self"!==n&&n?"noopener noreferrer":void 0,l&&(x=(0,a.jsx)("span",{href:l,target:"_self"===n?void 0:n,rel:r,className:y,children:x}))}else"video"===f&&(x=(0,a.jsx)(_,{src:t,style:w,width:s,height:o}));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h,{id:e,src:t,allowedTypes:r,accept:c,onSelect:m,onSelectURL:g,onRemove:d}),x]})}),((e,t)=>{const i=Object.keys(e);for(const a of i)if(e[a]!==t[a])return!1;return!0}));function w(e){const{src:t,onSelect:i,onSelectURL:l,mediaType:s,allowedTypes:o=["image"]}=e,r=!s&&t?"image":s;let c=(0,m.__)("Media","snow-monkey-blocks");1===o.length&&("image"===o[0]?c=(0,m.__)("Image","snow-monkey-blocks"):"video"===o[0]&&(c=(0,m.__)("Video","snow-monkey-blocks")));const u=(0,d.useMemo)((()=>o.map((e=>`${e}/*`)).join(",")),[o]);return t?(0,a.jsx)(f,{...e,accept:u,allowedTypes:o,mediaType:r}):(0,a.jsx)(n.MediaPlaceholder,{icon:"format-image",labels:{title:c},onSelect:i,onSelectURL:l,accept:u,allowedTypes:o})}const b=[{label:(0,m._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,m._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,m._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,m._x)("Full Size","Image size option for resolution control"),value:"full"}];function y({panelId:e,value:t,onChange:i,options:l=b,defaultValue:s=b[0].value,isShownByDefault:o=!0,withToolsPanelItem:n=!0}){const c=null!=t?t:s,u=()=>(0,a.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,m.__)("Resolution"),value:c,options:l,onChange:i,help:(0,m.__)("Select the size of the source image."),size:"__unstable-large"});return n?(0,a.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>c!==s,label:(0,m.__)("Resolution"),onDeselect:()=>i(s),isShownByDefault:o,panelId:e,children:(0,a.jsx)(u,{})}):(0,a.jsx)(u,{})}const x=["image"],v="full",S=[{attributes:{...t.uK},supports:{align:["wide","full"]},save({attributes:e,className:t}){const{imageID:i,imageURL:l,imageAlt:s}=e,n=o()("smb-thumbnail-gallery__item",t);return(0,a.jsx)(a.Fragment,{children:!!i&&(0,a.jsx)("div",{className:n,children:(0,a.jsx)("div",{className:"smb-thumbnail-gallery__item__figure",children:(0,a.jsx)("img",{src:l,alt:s,className:`wp-image-${i}`})})})})}}];(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:e,setAttributes:i,isSelected:l,className:s}){const{imageID:u,imageURL:d,imageAlt:h,imageWidth:p,imageHeight:_,imageSizeSlug:f,caption:b}=e,S=(0,c.useSelect)((e=>e("core/block-editor").getSettings()?.imageSizes),[]),j=(0,c.useSelect)((e=>u?e("core").getEntityRecord("postType","attachment",u):null),[u]),R=S.filter((({slug:e})=>j?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),k=o()("c-row__col",s),z=(0,n.useBlockProps)({className:k}),T=(0,g.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.InspectorControls,{children:0<R.length&&(0,a.jsx)(r.__experimentalToolsPanel,{label:(0,m.__)("Block settings","snow-monkey-blocks"),dropdownMenuProps:T,children:(0,a.jsx)(y,{defaultValue:t.uK.imageSizeSlug.default,value:f,options:R,onChange:e=>{const t=j?.media_details?.sizes?.[e]?.source_url,a=j?.media_details?.sizes?.[e]?.width,l=j?.media_details?.sizes?.[e]?.height;i({imageURL:t,imageWidth:a,imageHeight:l,imageSizeSlug:e})}})})}),(0,a.jsxs)("div",{...z,children:[(0,a.jsx)(w,{src:d,id:u,alt:h,width:p,height:_,onSelect:e=>{const t=e?.sizes?.[f]?f:v,a=e?.sizes?.[t]?.url,l=e?.sizes?.[t]?.width,s=e?.sizes?.[t]?.height;i({imageURL:a||e.url,imageID:e.id,imageAlt:e.alt,imageWidth:l||e.width,imageHeight:s||e.height,imageSizeSlug:t})},onSelectURL:e=>{e!==d&&i({imageURL:e,imageID:0,mediaSizeSlug:v})},onRemove:()=>i({imageURL:t.uK.imageURL.default,imageAlt:t.uK.imageAlt.default,imageWidth:t.uK.imageWidth.default,imageHeight:t.uK.imageHeight.default,imageID:t.uK.imageID.default}),allowedTypes:x}),(!n.RichText.isEmpty(b)||l)&&(0,a.jsx)(n.RichText,{placeholder:(0,m.__)("Write caption…","snow-monkey-blocks"),value:b,onChange:e=>i({caption:e})})]})]})},save:function({attributes:e,className:t}){const{imageID:i,imageURL:l,imageAlt:s,imageWidth:r,imageHeight:c,caption:m}=e,u=o()("smb-thumbnail-gallery__item",t);return(0,a.jsxs)("div",{...n.useBlockProps.save({className:u}),children:[(0,a.jsx)("div",{className:"smb-thumbnail-gallery__item__figure",children:(0,a.jsx)("img",{src:l,alt:s,width:!!r&&r,height:!!c&&c,className:`wp-image-${i}`})}),!n.RichText.isEmpty(m)&&(0,a.jsx)("div",{className:"smb-thumbnail-gallery__item__caption",children:(0,a.jsx)(n.RichText.Content,{value:m})})]})},deprecated:S})})()})(); -
snow-monkey-blocks/trunk/readme.txt
r3390891 r3400189 3 3 Donate link: https://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40 4 4 Tags: gutenberg, block, blocks, editor, gutenberg blocks 5 Stable tag: 24.1. 65 Stable tag: 24.1.7 6 6 Requires at least: 6.8 7 Tested up to: 6. 87 Tested up to: 6.9-RC2 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later -
snow-monkey-blocks/trunk/snow-monkey-blocks.php
r3390891 r3400189 2 2 /** 3 3 * Plugin name: Snow Monkey Blocks 4 * Version: 24.1. 64 * Version: 24.1.7 5 5 * Description: Gutenberg blocks collection made by MonkeyWrench. 6 6 * Author: inc2734 -
snow-monkey-blocks/trunk/vendor/composer/autoload_static.php
r3278039 r3400189 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'S' => 10 'S' => 11 11 array ( 12 12 'Snow_Monkey\\Plugin\\Blocks\\' => 26, … … 15 15 16 16 public static $prefixDirsPsr4 = array ( 17 'Snow_Monkey\\Plugin\\Blocks\\' => 17 'Snow_Monkey\\Plugin\\Blocks\\' => 18 18 array ( 19 19 0 => __DIR__ . '/../..' . '/',
Note: See TracChangeset
for help on using the changeset viewer.