Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | Gutenberg Blocks and Template Library by Otter |
Version | 2.1.4 |
Comparing to | |
See all releases |
Code changes from version 2.1.3 to 2.1.4
- CHANGELOG.md +9 -0
- build/blocks/advanced-columns/editor.css +1 -1
- build/blocks/advanced-columns/editor.css.map +1 -1
- build/blocks/advanced-columns/style.css +1 -1
- build/blocks/advanced-columns/style.css.map +1 -1
- build/blocks/advanced-heading/block.json +31 -35
- build/blocks/advanced-heading/editor.css +1 -1
- build/blocks/advanced-heading/editor.css.map +1 -1
- build/blocks/advanced-heading/style.css +1 -1
- build/blocks/advanced-heading/style.css.map +1 -1
- build/blocks/blocks.asset.php +1 -1
- build/blocks/blocks.js +4 -5
CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 2.1.3](https://github.com/Codeinwp/otter-blocks/compare/v2.1.2...v2.1.3) (2022-11-10)
|
2 |
|
3 |
- Fixed a crash issue for users with PHP8.0 & PHP8.1 with WP version lower than 6.1
|
1 |
+
##### [Version 2.1.4](https://github.com/Codeinwp/otter-blocks/compare/v2.1.3...v2.1.4) (2022-11-21)
|
2 |
+
|
3 |
+
- Advanced Heading Enhancements
|
4 |
+
- Fix the Widgets page not loading with Otter on Chrome
|
5 |
+
- Fix Custom CSS work with FSE
|
6 |
+
- Fix the Button Color Issue
|
7 |
+
- Migrate WooCommerce Comparison to Sparks Plugin
|
8 |
+
- Fix Flip Block not saving Responsive Attributes
|
9 |
+
|
10 |
##### [Version 2.1.3](https://github.com/Codeinwp/otter-blocks/compare/v2.1.2...v2.1.3) (2022-11-10)
|
11 |
|
12 |
- Fixed a crash issue for users with PHP8.0 & PHP8.1 with WP version lower than 6.1
|
build/blocks/advanced-columns/editor.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wp-block-themeisle-blocks-advanced-columns-layout-control{margin:0 0 1.5em 0}.wp-block-themeisle-blocks-advanced-columns-layout-control .components-base-control__title{display:flex;justify-content:space-between;margin-bottom:5px}.wp-block-themeisle-blocks-advanced-columns-layout-control .components-base-control__title label{padding:5px 0}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout{cursor:pointer;width:33.3333333333%;height:auto;display:inline-block;padding:10px;border-radius:4px}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout svg{fill:#d5dadf}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout:hover:not(:disabled):not([aria-disabled=true]):not(.is-secondary):not(.is-primary):not(.is-tertiary):not(.is-link){background:#f1f1f1;border-color:#005d8c;color:#005d8c;text-decoration:none}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout:hover:not(:disabled):not([aria-disabled=true]):not(.is-secondary):not(.is-primary):not(.is-tertiary):not(.is-link):not(.selected){box-shadow:none}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout:hover:not(:disabled):not([aria-disabled=true]):not(.is-secondary):not(.is-primary):not(.is-tertiary):not(.is-link) svg{fill:#0075af}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout.selected{box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout.selected svg{fill:#6d7882}.wp-block-themeisle-blocks-advanced-columns-separators{position:absolute;left:0;width:100%}.wp-block-themeisle-blocks-advanced-columns-separators.top{top:0}.wp-block-themeisle-blocks-advanced-columns-separators.bottom{bottom:0}.wp-block-themeisle-blocks-advanced-columns-separators.bottom svg{position:absolute;bottom:0}.wp-block-themeisle-blocks-advanced-columns-separators .rotate{transform:rotate(180deg)}html[lang=ja] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=ko] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh-Hans] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh-Hant] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{word-break:normal}.wp-block-themeisle-blocks-advanced-columns{--background: transparent;--columns-width: initial;display:flex}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap{flex-basis:100%;width:100%;word-break:keep-all;max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{display:flex;flex-wrap:nowrap}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout .wp-block-themeisle-blocks-advanced-column{display:flex;max-width:unset;margin:inherit;flex:1}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout .wp-block-themeisle-blocks-advanced-column>.block-editor-inner-blocks{flex:1}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout .wp-block-themeisle-blocks-advanced-column .wp-block-themeisle-blocks-advanced-columns{max-width:unset}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column{--background: transparent;--background-color-hover: var( --background )
|
1 |
+
.wp-block-themeisle-blocks-advanced-columns-layout-control{margin:0 0 1.5em 0}.wp-block-themeisle-blocks-advanced-columns-layout-control .components-base-control__title{display:flex;justify-content:space-between;margin-bottom:5px}.wp-block-themeisle-blocks-advanced-columns-layout-control .components-base-control__title label{padding:5px 0}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout{cursor:pointer;width:33.3333333333%;height:auto;display:inline-block;padding:10px;border-radius:4px}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout svg{fill:#d5dadf}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout:hover:not(:disabled):not([aria-disabled=true]):not(.is-secondary):not(.is-primary):not(.is-tertiary):not(.is-link){background:#f1f1f1;border-color:#005d8c;color:#005d8c;text-decoration:none}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout:hover:not(:disabled):not([aria-disabled=true]):not(.is-secondary):not(.is-primary):not(.is-tertiary):not(.is-link):not(.selected){box-shadow:none}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout:hover:not(:disabled):not([aria-disabled=true]):not(.is-secondary):not(.is-primary):not(.is-tertiary):not(.is-link) svg{fill:#0075af}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout.selected{box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff}.wp-block-themeisle-blocks-advanced-columns-layout-control .wp-block-themeisle-blocks-advanced-column-layout.selected svg{fill:#6d7882}.wp-block-themeisle-blocks-advanced-columns-separators{position:absolute;left:0;width:100%}.wp-block-themeisle-blocks-advanced-columns-separators.top{top:0}.wp-block-themeisle-blocks-advanced-columns-separators.bottom{bottom:0}.wp-block-themeisle-blocks-advanced-columns-separators.bottom svg{position:absolute;bottom:0}.wp-block-themeisle-blocks-advanced-columns-separators .rotate{transform:rotate(180deg)}html[lang=ja] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=ko] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh-Hans] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh-Hant] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{word-break:normal}.wp-block-themeisle-blocks-advanced-columns{--background: transparent;--columns-width: initial;display:flex}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap{flex-basis:100%;width:100%;word-break:keep-all;max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{display:flex;flex-wrap:nowrap}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout .wp-block-themeisle-blocks-advanced-column{display:flex;max-width:unset;margin:inherit;flex:1}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout .wp-block-themeisle-blocks-advanced-column>.block-editor-inner-blocks{flex:1}.wp-block-themeisle-blocks-advanced-columns>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout .wp-block-themeisle-blocks-advanced-column .wp-block-themeisle-blocks-advanced-columns{max-width:unset}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column{--background: transparent;--background-color-hover: var( --background );background:var(--background)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column:hover{background:var(--background-color-hover)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column>*{position:relative}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column a:not(.wp-block-button__link){color:var(--link-color)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .wp-block-themeisle-blocks-advanced-column-overlay{position:absolute;width:100%;height:100%;top:0;left:0}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .wp-block-themeisle-blocks-slider{display:block}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .aligncenter{margin-left:auto;margin-right:auto}.wp-block-themeisle-blocks-advanced-columns .wp-themeisle-block-overlay,.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-columns-overlay{position:absolute;width:100%;height:100%;top:0;left:0}.wp-block-themeisle-blocks-advanced-columns.has-default-gap .wp-block-themeisle-blocks-advanced-column{margin-left:10px;margin-right:10px}.wp-block-themeisle-blocks-advanced-columns.has-nogap-gap .wp-block-themeisle-blocks-advanced-column{margin-left:0;margin-right:0}.wp-block-themeisle-blocks-advanced-columns.has-narrow-gap .wp-block-themeisle-blocks-advanced-column{margin-left:5px;margin-right:5px}.wp-block-themeisle-blocks-advanced-columns.has-extended-gap .wp-block-themeisle-blocks-advanced-column{margin-left:15px;margin-right:15px}.wp-block-themeisle-blocks-advanced-columns.has-wide-gap .wp-block-themeisle-blocks-advanced-column{margin-left:20px;margin-right:20px}.wp-block-themeisle-blocks-advanced-columns.has-wider-gap .wp-block-themeisle-blocks-advanced-column{margin-left:30px;margin-right:30px}.wp-block-themeisle-blocks-advanced-columns.has-vertical-flex-start,.wp-block-themeisle-blocks-advanced-columns.has-vertical-top{align-items:flex-start}.wp-block-themeisle-blocks-advanced-columns.has-vertical-flex-start .wp-block-themeisle-blocks-advanced-column,.wp-block-themeisle-blocks-advanced-columns.has-vertical-top .wp-block-themeisle-blocks-advanced-column{align-items:flex-start}.wp-block-themeisle-blocks-advanced-columns.has-vertical-center{align-items:center}.wp-block-themeisle-blocks-advanced-columns.has-vertical-center .wp-block-themeisle-blocks-advanced-column{align-items:center}.wp-block-themeisle-blocks-advanced-columns.has-vertical-flex-end,.wp-block-themeisle-blocks-advanced-columns.has-vertical-bottom{align-items:flex-end}.wp-block-themeisle-blocks-advanced-columns.has-vertical-flex-end .wp-block-themeisle-blocks-advanced-column,.wp-block-themeisle-blocks-advanced-columns.has-vertical-bottom .wp-block-themeisle-blocks-advanced-column{align-items:flex-end}.wp-block-themeisle-blocks-advanced-columns.has-horizontal-flex-start{justify-content:flex-start}.wp-block-themeisle-blocks-advanced-columns.has-horizontal-center{justify-content:center}.wp-block-themeisle-blocks-advanced-columns.has-horizontal-flex-end{justify-content:flex-end}.wp-block-themeisle-blocks-advanced-columns.has-viewport-tablet.has-tablet-collapsedRows-layout>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{flex-direction:column}.wp-block-themeisle-blocks-advanced-columns.has-viewport-tablet.has-tablet-collapsedRows-layout.has-reverse-columns-tablet>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{flex-direction:column-reverse}.wp-block-themeisle-blocks-advanced-columns.has-viewport-tablet.has-tablet-twoColumnGrid-layout>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{display:grid;grid-template-columns:auto auto}.wp-block-themeisle-blocks-advanced-columns.has-viewport-tablet.has-tablet-threeColumnGrid-layout>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{display:grid;grid-template-columns:auto auto auto}.wp-block-themeisle-blocks-advanced-columns.has-viewport-mobile.has-mobile-collapsedRows-layout>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{flex-direction:column}.wp-block-themeisle-blocks-advanced-columns.has-viewport-mobile.has-mobile-collapsedRows-layout.has-reverse-columns-mobile>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{flex-direction:column-reverse}.wp-block-themeisle-blocks-advanced-columns.has-viewport-mobile.has-mobile-twoColumnGrid-layout>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{display:grid;grid-template-columns:auto auto}.wp-block-themeisle-blocks-advanced-columns.has-viewport-mobile.has-mobile-threeColumnGrid-layout>.innerblocks-wrap>.block-editor-inner-blocks>.block-editor-block-list__layout{display:grid;grid-template-columns:auto auto auto}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column:before{inset:0}.components-popover.block-editor-block-list__block-popover>.components-popover__content .block-editor-block-contextual-toolbar.wp-block-themeisle-blocks-advanced-column{margin:0}.o-section-border-container.components-panel__body>.components-toggle-control{margin:1.5em 0 0 0}.o-section-border-container.components-panel__body>.components-toggle-control .components-base-control__field{margin-bottom:0}/*# sourceMappingURL=editor.css.map */
|
build/blocks/advanced-columns/editor.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sourceRoot":"","sources":["../../../src/blocks/blocks/section/components/layout-control/editor.scss","../../../src/blocks/blocks/section/components/separators/editor.scss","../../../src/blocks/blocks/section/editor.scss"],"names":[],"mappings":"AAAA,2DACC,mBAEA,2FACC,aACA,8BACA,kBAEA,iGACC,cAIF,6GACC,eACA,qBACA,YACA,qBACA,aACA,kBAEA,iHACC,aAIA,gOACC,mBACA,qBACA,cACA,qBAEA,+OACC,gBAGD,oOACC,aAKH,sHACC,wDAEA,0HACC,aC9CJ,uDACC,kBACA,OACA,WAEA,2DACC,MAGD,8DACC,SAEA,kEACC,kBACA,SAIF,+DACC,yBCfD,sYACC,kBAIF,4CACC,0BACA,yBACA,aAEA,8DACC,gBACA,WACA,oBACA,+BAEA,0HACC,aACA,iBAEA,qKACC,aACA,gBACA,eACA,OAEA,gMACC,OAGD,iNACC,gBAMJ,uFACC,0BACA,
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../../../src/blocks/blocks/section/components/layout-control/editor.scss","../../../src/blocks/blocks/section/components/separators/editor.scss","../../../src/blocks/blocks/section/editor.scss"],"names":[],"mappings":"AAAA,2DACC,mBAEA,2FACC,aACA,8BACA,kBAEA,iGACC,cAIF,6GACC,eACA,qBACA,YACA,qBACA,aACA,kBAEA,iHACC,aAIA,gOACC,mBACA,qBACA,cACA,qBAEA,+OACC,gBAGD,oOACC,aAKH,sHACC,wDAEA,0HACC,aC9CJ,uDACC,kBACA,OACA,WAEA,2DACC,MAGD,8DACC,SAEA,kEACC,kBACA,SAIF,+DACC,yBCfD,sYACC,kBAIF,4CACC,0BACA,yBACA,aAEA,8DACC,gBACA,WACA,oBACA,+BAEA,0HACC,aACA,iBAEA,qKACC,aACA,gBACA,eACA,OAEA,gMACC,OAGD,iNACC,gBAMJ,uFACC,0BACA,8CAEA,6BAEA,6FACC,yCAGD,yFACC,kBAGD,qHACC,wBAGD,0IACC,kBACA,WACA,YACA,MACA,OAGD,yHACC,cAGD,oGACC,iBACA,kBAIF,wKAEC,kBACA,WACA,YACA,MACA,OAIA,uGACC,iBACA,kBAKD,qGACC,cACA,eAKD,sGACC,gBACA,iBAKD,wGACC,iBACA,kBAKD,oGACC,iBACA,kBAKD,qGACC,iBACA,kBAIF,iIAEC,uBAEA,uNACC,uBAIF,gEACC,mBAEA,2GACC,mBAIF,kIAEC,qBAEA,wNACC,qBAIF,sEACC,2BAGD,kEACC,uBAGD,oEACC,yBAKC,8KACC,sBAIA,yMACC,8BAMF,8KACC,aACA,gCAKD,gLACC,aACA,qCAOD,8KACC,sBAIA,yMACC,8BAMF,8KACC,aACA,gCAKD,gLACC,aACA,qCAMF,8FACC,QAOD,yKACC,SAOD,8EACC,mBAEA,8GACC","file":"editor.css"}
|
build/blocks/advanced-columns/style.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wp-block-themeisle-blocks-advanced-columns-separators{position:absolute;left:0;width:100%}.wp-block-themeisle-blocks-advanced-columns-separators.top{top:0}.wp-block-themeisle-blocks-advanced-columns-separators.bottom{bottom:0}.wp-block-themeisle-blocks-advanced-columns-separators.bottom svg{position:absolute;bottom:0}.wp-block-themeisle-blocks-advanced-columns-separators svg{height:100px}.wp-block-themeisle-blocks-advanced-columns-separators .rotate{transform:rotate(180deg)}html[lang=ja] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=ko] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh-Hans] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh-Hant] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{word-break:normal}.wp-block-themeisle-blocks-advanced-columns{--background: transparent;--columns-width: initial;--horizontal-align: unset;background:var(--background);justify-content:var(--horizontal-align)}.wp-block-themeisle-blocks-advanced-columns .wp-themeisle-block-overlay,.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-columns-overlay{position:absolute;width:100%;height:100%;top:0;left:0}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column:only-child{max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column{--background: transparent;--background-color-hover: var( --background );--text-color: var( --content-color, inherit );--link-color: inherit;--text-color-hover: var( --content-color-hover, inherit );color:var(--text-color);background:var(--background)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column:hover{color:var(--text-color-hover);background:var(--background-color-hover)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column>*{position:relative}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column a{color:var(--link-color)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .wp-block-themeisle-blocks-advanced-column-overlay{position:absolute;width:100%;height:100%;top:0;left:0}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .wp-block-themeisle-blocks-slider{display:grid}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .aligncenter{margin-left:auto;margin-right:auto}.wp-block-themeisle-blocks-advanced-columns.has-default-gap .wp-block-themeisle-blocks-advanced-column{margin-left:10px;margin-right:10px}.wp-block-themeisle-blocks-advanced-columns.has-nogap-gap .wp-block-themeisle-blocks-advanced-column{margin-left:0;margin-right:0}.wp-block-themeisle-blocks-advanced-columns.has-narrow-gap .wp-block-themeisle-blocks-advanced-column{margin-left:5px;margin-right:5px}.wp-block-themeisle-blocks-advanced-columns.has-extended-gap .wp-block-themeisle-blocks-advanced-column{margin-left:15px;margin-right:15px}.wp-block-themeisle-blocks-advanced-columns.has-wide-gap .wp-block-themeisle-blocks-advanced-column{margin-left:20px;margin-right:20px}.wp-block-themeisle-blocks-advanced-columns.has-wider-gap .wp-block-themeisle-blocks-advanced-column{margin-left:30px;margin-right:30px}@media(min-width: 960px){.wp-block-themeisle-blocks-advanced-columns{display:flex;position:relative}.wp-block-themeisle-blocks-advanced-columns.has-vertical-flex-start>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns.has-vertical-top>.innerblocks-wrap{align-items:flex-start}.wp-block-themeisle-blocks-advanced-columns.has-vertical-center>.innerblocks-wrap{align-items:center}.wp-block-themeisle-blocks-advanced-columns.has-vertical-flex-end>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns.has-vertical-bottom>.innerblocks-wrap{align-items:flex-end}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{display:flex;flex-basis:100%;word-break:keep-all;max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column{position:relative}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column:first-child{margin-left:0}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column:last-child{margin-right:0}.wp-block-themeisle-blocks-advanced-columns.hide-in-desktop{display:none}.wp-block-themeisle-blocks-advanced-columns.has-1-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:100%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:50%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-oneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:33.34%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-oneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex-basis:66.66%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-twoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:33.34%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-twoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex-basis:66.66%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:33.33%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneOneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneOneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex-basis:50%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-twoOneOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-twoOneOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex-basis:50%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:50%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:60%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex-basis:20%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex-basis:20%}.wp-block-themeisle-blocks-advanced-columns.has-4-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-5-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:20%}.wp-block-themeisle-blocks-advanced-columns.has-6-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:16.66%}}@media(min-width: 600px)and (max-width: 960px){.wp-block-themeisle-blocks-advanced-columns{display:flex;position:relative}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{display:flex;flex-basis:100%;word-break:keep-all;max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column{position:relative;flex:1}.wp-block-themeisle-blocks-advanced-columns.hide-in-tablet{display:none}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-tablet-oneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-tablet-twoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneOneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-twoOneOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:3}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:1}.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-flex-start>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-top>.innerblocks-wrap{align-items:flex-start}.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-center>.innerblocks-wrap{align-items:center}.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-flex-end>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-bottom>.innerblocks-wrap{align-items:flex-end}.wp-block-themeisle-blocks-advanced-columns.has-tablet-collapsedRows-layout>.innerblocks-wrap{flex-direction:column}.wp-block-themeisle-blocks-advanced-columns.has-tablet-collapsedRows-layout.has-reverse-columns-tablet>.innerblocks-wrap{flex-direction:column-reverse}.wp-block-themeisle-blocks-advanced-columns.has-tablet-twoColumnGrid-layout>.innerblocks-wrap{display:flex;flex-wrap:wrap}.wp-block-themeisle-blocks-advanced-columns.has-tablet-twoColumnGrid-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:1 1 40%}.wp-block-themeisle-blocks-advanced-columns.has-tablet-threeColumnGrid-layout>.innerblocks-wrap{display:flex;flex-wrap:wrap}.wp-block-themeisle-blocks-advanced-columns.has-tablet-threeColumnGrid-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:1 1 30%}}@media(max-width: 600px){.wp-block-themeisle-blocks-advanced-columns{display:flex;position:relative}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{display:flex;flex-basis:100%;word-break:keep-all;max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column{position:relative;flex:1}.wp-block-themeisle-blocks-advanced-columns.hide-in-mobile{display:none}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-mobile-oneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-mobile-twoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneOneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-twoOneOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:3}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:1}.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-flex-start>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-top>.innerblocks-wrap{align-items:flex-start}.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-center>.innerblocks-wrap{align-items:center}.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-flex-end>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-bottom>.innerblocks-wrap{align-items:flex-end}.wp-block-themeisle-blocks-advanced-columns.has-mobile-collapsedRows-layout>.innerblocks-wrap{flex-direction:column}.wp-block-themeisle-blocks-advanced-columns.has-mobile-collapsedRows-layout.has-reverse-columns-mobile>.innerblocks-wrap{flex-direction:column-reverse}.wp-block-themeisle-blocks-advanced-columns.has-mobile-twoColumnGrid-layout>.innerblocks-wrap{display:flex;flex-wrap:wrap}.wp-block-themeisle-blocks-advanced-columns.has-mobile-twoColumnGrid-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:1 1 40%}.wp-block-themeisle-blocks-advanced-columns.has-mobile-threeColumnGrid-layout>.innerblocks-wrap{display:flex;flex-wrap:wrap}.wp-block-themeisle-blocks-advanced-columns.has-mobile-threeColumnGrid-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:1 1 30%}}/*# sourceMappingURL=style.css.map */
|
1 |
+
.wp-block-themeisle-blocks-advanced-columns-separators{position:absolute;left:0;width:100%}.wp-block-themeisle-blocks-advanced-columns-separators.top{top:0}.wp-block-themeisle-blocks-advanced-columns-separators.bottom{bottom:0}.wp-block-themeisle-blocks-advanced-columns-separators.bottom svg{position:absolute;bottom:0}.wp-block-themeisle-blocks-advanced-columns-separators svg{height:100px}.wp-block-themeisle-blocks-advanced-columns-separators .rotate{transform:rotate(180deg)}html[lang=ja] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=ko] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh-Hans] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap,html[lang=zh-Hant] .wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{word-break:normal}.wp-block-themeisle-blocks-advanced-columns{--background: transparent;--columns-width: initial;--horizontal-align: unset;background:var(--background);justify-content:var(--horizontal-align)}.wp-block-themeisle-blocks-advanced-columns .wp-themeisle-block-overlay,.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-columns-overlay{position:absolute;width:100%;height:100%;top:0;left:0}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column:only-child{max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column{--background: transparent;--background-color-hover: var( --background );--link-color: inherit;background:var(--background)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column:hover{background:var(--background-color-hover)}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column>*{position:relative}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .wp-block-themeisle-blocks-advanced-column-overlay{position:absolute;width:100%;height:100%;top:0;left:0}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .wp-block-themeisle-blocks-slider{display:grid}.wp-block-themeisle-blocks-advanced-columns .wp-block-themeisle-blocks-advanced-column .aligncenter{margin-left:auto;margin-right:auto}.wp-block-themeisle-blocks-advanced-columns.has-default-gap .wp-block-themeisle-blocks-advanced-column{margin-left:10px;margin-right:10px}.wp-block-themeisle-blocks-advanced-columns.has-nogap-gap .wp-block-themeisle-blocks-advanced-column{margin-left:0;margin-right:0}.wp-block-themeisle-blocks-advanced-columns.has-narrow-gap .wp-block-themeisle-blocks-advanced-column{margin-left:5px;margin-right:5px}.wp-block-themeisle-blocks-advanced-columns.has-extended-gap .wp-block-themeisle-blocks-advanced-column{margin-left:15px;margin-right:15px}.wp-block-themeisle-blocks-advanced-columns.has-wide-gap .wp-block-themeisle-blocks-advanced-column{margin-left:20px;margin-right:20px}.wp-block-themeisle-blocks-advanced-columns.has-wider-gap .wp-block-themeisle-blocks-advanced-column{margin-left:30px;margin-right:30px}@media(min-width: 960px){.wp-block-themeisle-blocks-advanced-columns{display:flex;position:relative}.wp-block-themeisle-blocks-advanced-columns.has-vertical-flex-start>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns.has-vertical-top>.innerblocks-wrap{align-items:flex-start}.wp-block-themeisle-blocks-advanced-columns.has-vertical-center>.innerblocks-wrap{align-items:center}.wp-block-themeisle-blocks-advanced-columns.has-vertical-flex-end>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns.has-vertical-bottom>.innerblocks-wrap{align-items:flex-end}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{display:flex;flex-basis:100%;word-break:keep-all;max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column{position:relative}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column:first-child{margin-left:0}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column:last-child{margin-right:0}.wp-block-themeisle-blocks-advanced-columns.hide-in-desktop{display:none}.wp-block-themeisle-blocks-advanced-columns.has-1-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:100%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:50%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-oneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:33.34%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-oneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex-basis:66.66%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-twoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:33.34%}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-desktop-twoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex-basis:66.66%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:33.33%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneOneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneOneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex-basis:50%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-twoOneOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-twoOneOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex-basis:50%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:50%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:60%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex-basis:20%}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-desktop-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex-basis:20%}.wp-block-themeisle-blocks-advanced-columns.has-4-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:25%}.wp-block-themeisle-blocks-advanced-columns.has-5-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:20%}.wp-block-themeisle-blocks-advanced-columns.has-6-columns.has-desktop-equal-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex-basis:16.66%}}@media(min-width: 600px)and (max-width: 960px){.wp-block-themeisle-blocks-advanced-columns{display:flex;position:relative}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{display:flex;flex-basis:100%;word-break:keep-all;max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column{position:relative;flex:1}.wp-block-themeisle-blocks-advanced-columns.hide-in-tablet{display:none}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-tablet-oneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-tablet-twoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneOneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-twoOneOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:3}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-tablet-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:1}.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-flex-start>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-top>.innerblocks-wrap{align-items:flex-start}.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-center>.innerblocks-wrap{align-items:center}.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-flex-end>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns:not(.has-tablet-collapsedRows-layout).has-vertical-bottom>.innerblocks-wrap{align-items:flex-end}.wp-block-themeisle-blocks-advanced-columns.has-tablet-collapsedRows-layout>.innerblocks-wrap{flex-direction:column}.wp-block-themeisle-blocks-advanced-columns.has-tablet-collapsedRows-layout.has-reverse-columns-tablet>.innerblocks-wrap{flex-direction:column-reverse}.wp-block-themeisle-blocks-advanced-columns.has-tablet-twoColumnGrid-layout>.innerblocks-wrap{display:flex;flex-wrap:wrap}.wp-block-themeisle-blocks-advanced-columns.has-tablet-twoColumnGrid-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:1 1 40%}.wp-block-themeisle-blocks-advanced-columns.has-tablet-threeColumnGrid-layout>.innerblocks-wrap{display:flex;flex-wrap:wrap}.wp-block-themeisle-blocks-advanced-columns.has-tablet-threeColumnGrid-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:1 1 30%}}@media(max-width: 600px){.wp-block-themeisle-blocks-advanced-columns{display:flex;position:relative}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap{display:flex;flex-basis:100%;word-break:keep-all;max-width:var(--columns-width)}.wp-block-themeisle-blocks-advanced-columns .innerblocks-wrap .wp-block-themeisle-blocks-advanced-column{position:relative;flex:1}.wp-block-themeisle-blocks-advanced-columns.hide-in-mobile{display:none}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-mobile-oneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-2-columns.has-mobile-twoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneOneTwo-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-twoOneOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:2}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneTwoOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:3}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:first-child{flex:1}.wp-block-themeisle-blocks-advanced-columns.has-3-columns.has-mobile-oneThreeOne-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column:last-child{flex:1}.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-flex-start>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-top>.innerblocks-wrap{align-items:flex-start}.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-center>.innerblocks-wrap{align-items:center}.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-flex-end>.innerblocks-wrap,.wp-block-themeisle-blocks-advanced-columns:not(.has-mobile-collapsedRows-layout).has-vertical-bottom>.innerblocks-wrap{align-items:flex-end}.wp-block-themeisle-blocks-advanced-columns.has-mobile-collapsedRows-layout>.innerblocks-wrap{flex-direction:column}.wp-block-themeisle-blocks-advanced-columns.has-mobile-collapsedRows-layout.has-reverse-columns-mobile>.innerblocks-wrap{flex-direction:column-reverse}.wp-block-themeisle-blocks-advanced-columns.has-mobile-twoColumnGrid-layout>.innerblocks-wrap{display:flex;flex-wrap:wrap}.wp-block-themeisle-blocks-advanced-columns.has-mobile-twoColumnGrid-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:1 1 40%}.wp-block-themeisle-blocks-advanced-columns.has-mobile-threeColumnGrid-layout>.innerblocks-wrap{display:flex;flex-wrap:wrap}.wp-block-themeisle-blocks-advanced-columns.has-mobile-threeColumnGrid-layout>.innerblocks-wrap>.wp-block-themeisle-blocks-advanced-column{flex:1 1 30%}}/*# sourceMappingURL=style.css.map */
|
build/blocks/advanced-columns/style.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sourceRoot":"","sources":["../../../src/blocks/blocks/section/components/separators/style.scss","../../../src/blocks/blocks/section/style.scss"],"names":[],"mappings":"AAAA,uDACC,kBACA,OACA,WAEA,2DACC,MAGD,8DACC,SAEA,kEACC,kBACA,SAIF,2DACC,aAGD,+DACC,yBCpBD,sYACC,kBA0BF,4CACC,0BACA,yBACA,0BAEA,6BACA,wCAEA,wKAEC,kBACA,WACA,YACA,MACA,OAGD,kGACC,+BAGD,uFACC,0BACA,8CACA,
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../../../src/blocks/blocks/section/components/separators/style.scss","../../../src/blocks/blocks/section/style.scss"],"names":[],"mappings":"AAAA,uDACC,kBACA,OACA,WAEA,2DACC,MAGD,8DACC,SAEA,kEACC,kBACA,SAIF,2DACC,aAGD,+DACC,yBCpBD,sYACC,kBA0BF,4CACC,0BACA,yBACA,0BAEA,6BACA,wCAEA,wKAEC,kBACA,WACA,YACA,MACA,OAGD,kGACC,+BAGD,uFACC,0BACA,8CACA,sBAEA,6BAEA,6FACC,yCAGD,yFACC,kBAGD,0IACC,kBACA,WACA,YACA,MACA,OAGD,yHACC,aAGD,oGACC,iBACA,kBAKD,uGACC,iBACA,kBAKD,qGACC,cACA,eAKD,sGACC,gBACA,iBAKD,wGACC,iBACA,kBAKD,oGACC,iBACA,kBAKD,qGACC,iBACA,kBAKH,yBACC,4CACC,aACA,kBAvHA,qKACC,uBAKD,kFACC,mBAMD,sKACC,qBA6GD,8DACC,aACA,gBACA,oBACA,+BAEA,yGACC,kBAEA,qHACC,cAGD,oHACC,eAKH,4DACC,aAQE,gJACC,gBAWD,gJACC,eAQD,iJACC,kBAEA,4JACC,kBASF,iJACC,kBAEA,6JACC,kBAYF,gJACC,kBAQD,oJACC,eAEA,+JACC,eASF,oJACC,eAEA,gKACC,eASF,oJACC,eAEA,gKACC,eAGD,+JACC,eASF,sJACC,eAEA,kKACC,eAGD,iKACC,eAYF,gJACC,eAWD,gJACC,eAWD,gJACC,mBAQN,+CACC,4CACC,aACA,kBAEA,8DACC,aACA,gBACA,oBACA,+BAEA,yGACC,kBACA,OAIF,2DACC,aAUG,2JACC,OAWD,4JACC,OAcD,8JACC,OAWD,+JACC,OASF,mJACC,OAEA,+JACC,OAGD,8JACC,OASF,qJACC,OAEA,iKACC,OAGD,gKACC,OAxZL,iPACC,uBAKD,wHACC,mBAMD,kPACC,qBAsZA,8FACC,sBAIA,yHACC,8BAMF,8FACC,aACA,eAEA,yIACC,aAMF,gGACC,aACA,eAEA,2IACC,cAOL,yBACC,4CACC,aACA,kBAEA,8DACC,aACA,gBACA,oBACA,+BAEA,yGACC,kBACA,OAIF,2DACC,aAUG,2JACC,OAWD,4JACC,OAcD,8JACC,OAWD,+JACC,OASF,mJACC,OAEA,+JACC,OAGD,8JACC,OASF,qJACC,OAEA,iKACC,OAGD,gKACC,OA7iBL,iPACC,uBAKD,wHACC,mBAMD,kPACC,qBA2iBA,8FACC,sBAIA,yHACC,8BAMF,8FACC,aACA,eAEA,yIACC,aAMF,gGACC,aACA,eAEA,2IACC","file":"style.css"}
|
build/blocks/advanced-heading/block.json
CHANGED
@@ -40,13 +40,13 @@
|
|
40 |
"type": "string"
|
41 |
},
|
42 |
"fontSize": {
|
43 |
-
"type": "number"
|
44 |
},
|
45 |
"fontSizeTablet": {
|
46 |
-
"type": "number"
|
47 |
},
|
48 |
"fontSizeMobile": {
|
49 |
-
"type": "number"
|
50 |
},
|
51 |
"fontFamily": {
|
52 |
"type": "string"
|
@@ -61,10 +61,10 @@
|
|
61 |
"type": "string"
|
62 |
},
|
63 |
"lineHeight": {
|
64 |
-
"type": "number"
|
65 |
},
|
66 |
"letterSpacing": {
|
67 |
-
"type": "number"
|
68 |
},
|
69 |
"textShadow": {
|
70 |
"type": "boolean",
|
@@ -91,26 +91,22 @@
|
|
91 |
"default": 0
|
92 |
},
|
93 |
"paddingType": {
|
94 |
-
"type": "string"
|
95 |
-
"default": "linked"
|
96 |
},
|
97 |
"paddingTypeTablet": {
|
98 |
-
"type": "string"
|
99 |
-
"default": "linked"
|
100 |
},
|
101 |
"paddingTypeMobile": {
|
102 |
-
"type": "string"
|
103 |
-
"default": "linked"
|
104 |
},
|
105 |
"padding": {
|
106 |
-
"type": "number",
|
107 |
-
"default": 0
|
108 |
},
|
109 |
"paddingTablet": {
|
110 |
-
"type": "number"
|
111 |
},
|
112 |
"paddingMobile": {
|
113 |
-
"type": "number"
|
114 |
},
|
115 |
"paddingTop": {
|
116 |
"type": "number",
|
@@ -123,8 +119,7 @@
|
|
123 |
"type": "number"
|
124 |
},
|
125 |
"paddingRight": {
|
126 |
-
"type": "number"
|
127 |
-
"default": 0
|
128 |
},
|
129 |
"paddingRightTablet": {
|
130 |
"type": "number"
|
@@ -133,8 +128,7 @@
|
|
133 |
"type": "number"
|
134 |
},
|
135 |
"paddingBottom": {
|
136 |
-
"type": "number"
|
137 |
-
"default": 0
|
138 |
},
|
139 |
"paddingBottomTablet": {
|
140 |
"type": "number"
|
@@ -143,8 +137,7 @@
|
|
143 |
"type": "number"
|
144 |
},
|
145 |
"paddingLeft": {
|
146 |
-
"type": "number"
|
147 |
-
"default": 0
|
148 |
},
|
149 |
"paddingLeftTablet": {
|
150 |
"type": "number"
|
@@ -153,30 +146,25 @@
|
|
153 |
"type": "number"
|
154 |
},
|
155 |
"marginType": {
|
156 |
-
"type": "string"
|
157 |
-
"default": "unlinked"
|
158 |
},
|
159 |
"marginTypeTablet": {
|
160 |
-
"type": "string"
|
161 |
-
"default": "unlinked"
|
162 |
},
|
163 |
"marginTypeMobile": {
|
164 |
-
"type": "string"
|
165 |
-
"default": "unlinked"
|
166 |
},
|
167 |
"margin": {
|
168 |
-
"type": "number",
|
169 |
-
"default": 0
|
170 |
},
|
171 |
"marginTablet": {
|
172 |
-
"type": "number"
|
173 |
},
|
174 |
"marginMobile": {
|
175 |
-
"type": "number"
|
176 |
},
|
177 |
"marginTop": {
|
178 |
-
"type": "number"
|
179 |
-
"default": 0
|
180 |
},
|
181 |
"marginTopTablet": {
|
182 |
"type": "number"
|
@@ -185,14 +173,22 @@
|
|
185 |
"type": "number"
|
186 |
},
|
187 |
"marginBottom": {
|
188 |
-
"type": "number"
|
189 |
-
"default": 25
|
190 |
},
|
191 |
"marginBottomTablet": {
|
192 |
"type": "number"
|
193 |
},
|
194 |
"marginBottomMobile": {
|
195 |
"type": "number"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
}
|
197 |
},
|
198 |
"editorStyle": "otter-advanced-heading-editor",
|
40 |
"type": "string"
|
41 |
},
|
42 |
"fontSize": {
|
43 |
+
"type": ["number", "string"]
|
44 |
},
|
45 |
"fontSizeTablet": {
|
46 |
+
"type": ["number", "string"]
|
47 |
},
|
48 |
"fontSizeMobile": {
|
49 |
+
"type": ["number", "string"]
|
50 |
},
|
51 |
"fontFamily": {
|
52 |
"type": "string"
|
61 |
"type": "string"
|
62 |
},
|
63 |
"lineHeight": {
|
64 |
+
"type": ["number", "string"]
|
65 |
},
|
66 |
"letterSpacing": {
|
67 |
+
"type": ["number", "string"]
|
68 |
},
|
69 |
"textShadow": {
|
70 |
"type": "boolean",
|
91 |
"default": 0
|
92 |
},
|
93 |
"paddingType": {
|
94 |
+
"type": "string"
|
|
|
95 |
},
|
96 |
"paddingTypeTablet": {
|
97 |
+
"type": "string"
|
|
|
98 |
},
|
99 |
"paddingTypeMobile": {
|
100 |
+
"type": "string"
|
|
|
101 |
},
|
102 |
"padding": {
|
103 |
+
"type": ["number", "object"]
|
|
|
104 |
},
|
105 |
"paddingTablet": {
|
106 |
+
"type": ["number", "object"]
|
107 |
},
|
108 |
"paddingMobile": {
|
109 |
+
"type": ["number", "object"]
|
110 |
},
|
111 |
"paddingTop": {
|
112 |
"type": "number",
|
119 |
"type": "number"
|
120 |
},
|
121 |
"paddingRight": {
|
122 |
+
"type": "number"
|
|
|
123 |
},
|
124 |
"paddingRightTablet": {
|
125 |
"type": "number"
|
128 |
"type": "number"
|
129 |
},
|
130 |
"paddingBottom": {
|
131 |
+
"type": "number"
|
|
|
132 |
},
|
133 |
"paddingBottomTablet": {
|
134 |
"type": "number"
|
137 |
"type": "number"
|
138 |
},
|
139 |
"paddingLeft": {
|
140 |
+
"type": "number"
|
|
|
141 |
},
|
142 |
"paddingLeftTablet": {
|
143 |
"type": "number"
|
146 |
"type": "number"
|
147 |
},
|
148 |
"marginType": {
|
149 |
+
"type": "string"
|
|
|
150 |
},
|
151 |
"marginTypeTablet": {
|
152 |
+
"type": "string"
|
|
|
153 |
},
|
154 |
"marginTypeMobile": {
|
155 |
+
"type": "string"
|
|
|
156 |
},
|
157 |
"margin": {
|
158 |
+
"type": ["number", "object"]
|
|
|
159 |
},
|
160 |
"marginTablet": {
|
161 |
+
"type": ["number", "object"]
|
162 |
},
|
163 |
"marginMobile": {
|
164 |
+
"type": ["number", "object"]
|
165 |
},
|
166 |
"marginTop": {
|
167 |
+
"type": "number"
|
|
|
168 |
},
|
169 |
"marginTopTablet": {
|
170 |
"type": "number"
|
173 |
"type": "number"
|
174 |
},
|
175 |
"marginBottom": {
|
176 |
+
"type": "number"
|
|
|
177 |
},
|
178 |
"marginBottomTablet": {
|
179 |
"type": "number"
|
180 |
},
|
181 |
"marginBottomMobile": {
|
182 |
"type": "number"
|
183 |
+
},
|
184 |
+
"backgroundColor": {
|
185 |
+
"type": "string"
|
186 |
+
},
|
187 |
+
"linkColor": {
|
188 |
+
"type": "string"
|
189 |
+
},
|
190 |
+
"linkHoverColor": {
|
191 |
+
"type": "string"
|
192 |
}
|
193 |
},
|
194 |
"editorStyle": "otter-advanced-heading-editor",
|
build/blocks/advanced-heading/editor.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
span.wp-block-themeisle-blocks-advanced-heading{display:block}.wp-block-themeisle-blocks-advanced-heading.highlight{background-color:#ff0;color:#000}.edit-post-settings-sidebar__panel-block .components-panel__body .components-color-palette{display:inline-block}.wp-themesiel-blocks-advanced-heading-popover-content .components-popover__content{padding:20px;width:300px}/*# sourceMappingURL=editor.css.map */
|
1 |
+
span.wp-block-themeisle-blocks-advanced-heading{display:block}.wp-block-themeisle-blocks-advanced-heading{--padding: 0px;--padding-tablet: var(--padding);--padding-mobile: var(--padding-tablet);--margin: 0px 0px 25px 0px;--margin-tablet: var(--margin);--margin-mobile: var(--margin-tablet);--text-align: left;--text-align-tablet: var(--text-align);--text-align-mobile: var(--text-align-tablet);padding:var(--padding);margin:var(--margin);text-align:var(--text-align)}@media(min-width: 600px)and (max-width: 960px){.wp-block-themeisle-blocks-advanced-heading{padding:var(--padding-tablet);margin:var(--margin-tablet);text-align:var(--text-align-tablet)}}@media(max-width: 600px){.wp-block-themeisle-blocks-advanced-heading{padding:var(--padding-mobile);margin:var(--margin-mobile);text-align:var(--text-align-mobile)}}.wp-block-themeisle-blocks-advanced-heading.highlight{background-color:#ff0;color:#000}.edit-post-settings-sidebar__panel-block .components-panel__body .components-color-palette{display:inline-block}.wp-themesiel-blocks-advanced-heading-popover-content .components-popover__content{padding:20px;width:300px}.o-list-elem-controls{margin-right:10px;text-transform:uppercase;font-size:14px;font-weight:bold;min-width:40px}/*# sourceMappingURL=editor.css.map */
|
build/blocks/advanced-heading/editor.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sourceRoot":"","sources":["../../../src/blocks/blocks/advanced-heading/style.scss","../../../src/blocks/blocks/advanced-heading/editor.scss"],"names":[],"mappings":"AAAA,gDACC,
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../../../src/blocks/blocks/advanced-heading/style.scss","../../../src/blocks/blocks/advanced-heading/editor.scss"],"names":[],"mappings":"AAAA,gDACC,cAGD,4CAEC,eACA,iCACA,wCAEA,2BACA,+BACA,sCAEA,mBACA,uCACA,8CAEA,uBACA,qBACA,6BAGA,+CAnBD,4CAoBE,8BACA,4BACA,qCAGD,yBAzBD,4CA0BE,8BACA,4BACA,qCAGD,sDACC,sBACA,WClCD,2FACC,qBAKD,mFACC,aACA,YAIF,sBACC,kBACA,yBACA,eACA,iBACA","file":"editor.css"}
|
build/blocks/advanced-heading/style.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
span.wp-block-themeisle-blocks-advanced-heading{display:block}.wp-block-themeisle-blocks-advanced-heading.highlight{background-color:#ff0;color:#000}/*# sourceMappingURL=style.css.map */
|
1 |
+
span.wp-block-themeisle-blocks-advanced-heading{display:block}.wp-block-themeisle-blocks-advanced-heading{--padding: 0px;--padding-tablet: var(--padding);--padding-mobile: var(--padding-tablet);--margin: 0px 0px 25px 0px;--margin-tablet: var(--margin);--margin-mobile: var(--margin-tablet);--text-align: left;--text-align-tablet: var(--text-align);--text-align-mobile: var(--text-align-tablet);padding:var(--padding);margin:var(--margin);text-align:var(--text-align)}@media(min-width: 600px)and (max-width: 960px){.wp-block-themeisle-blocks-advanced-heading{padding:var(--padding-tablet);margin:var(--margin-tablet);text-align:var(--text-align-tablet)}}@media(max-width: 600px){.wp-block-themeisle-blocks-advanced-heading{padding:var(--padding-mobile);margin:var(--margin-mobile);text-align:var(--text-align-mobile)}}.wp-block-themeisle-blocks-advanced-heading.highlight{background-color:#ff0;color:#000}/*# sourceMappingURL=style.css.map */
|
build/blocks/advanced-heading/style.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sourceRoot":"","sources":["../../../src/blocks/blocks/advanced-heading/style.scss"],"names":[],"mappings":"AAAA,gDACC,
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../../../src/blocks/blocks/advanced-heading/style.scss"],"names":[],"mappings":"AAAA,gDACC,cAGD,4CAEC,eACA,iCACA,wCAEA,2BACA,+BACA,sCAEA,mBACA,uCACA,8CAEA,uBACA,qBACA,6BAGA,+CAnBD,4CAoBE,8BACA,4BACA,qCAGD,yBAzBD,4CA0BE,8BACA,4BACA,qCAGD,sDACC,sBACA","file":"style.css"}
|
build/blocks/blocks.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render'), 'version' => '0b464a01bad3a4f83872');
|
build/blocks/blocks.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
!function(){"use strict";var e,t={5568:function(e,t,l){var o=l(5736),a=l(4981),n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/about-author","title":"About Author","category":"themeisle-blocks","description":"About Author block is the easiest way to add a author bio below your posts. Powered by Otter.","keywords":["about","author","profile"],"textdomain":"otter-blocks","supports":{"html":false},"editorStyle":"otter-about-author-editor","style":"otter-about-author-style"}'),r=l(340),i=l(9307),s=l(2175),c=l(5609),d=window.wp.serverSideRender,u=l.n(d);const{name:b}=n;(0,a.registerBlockType)(b,{...n,title:(0,o.__)("About Author","otter-blocks"),description:(0,o.__)("About Author block is the easiest way to add a author bio below your posts. Powered by Otter.","otter-blocks"),icon:r.authorIcon,keywords:["about","author","profile"],edit:()=>(0,i.createElement)("div",(0,s.useBlockProps)(),(0,i.createElement)(c.Disabled,null,(0,i.createElement)(u(),{block:"themeisle-blocks/about-author"}))),save:()=>null,supports:{inserter:Boolean(window.themeisleGutenberg.isLegacyPre59),html:!1},example:{}});var m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/accordion","title":"Accordion","category":"themeisle-blocks","description":"Vertically collapsing accordions perfect for displaying your FAQs. Powered by Otter.","keywords":["accordions","collapse","faq"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"FAQSchema":{"type":"boolean"},"gap":{"type":["string","number"]},"titleColor":{"type":"string"},"titleBackground":{"type":"string"},"contentBackground":{"type":"string"},"borderColor":{"type":"string"},"borderWidth":{"type":"string"},"isSynced":{"type":"array"},"fontFamily":{"type":"string"},"fontVariant":{"type":"string"},"fontStyle":{"type":"string"},"textTransform":{"type":"string"},"fontSize":{"type":"number"},"letterSpacing":{"type":"string"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"tag":{"type":"string"},"alwaysOpen":{"type":"boolean"},"boxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"iconFirst":{"type":"boolean","default":false},"activeTitleColor":{"type":"string"},"activeTitleBackground":{"type":"string"},"activeContentBackground":{"type":"string"},"icon":{"type":"object"},"openItemIcon":{"type":"object"}},"supports":{"html":false},"editorStyle":"otter-accordion-editor","style":"otter-accordion-style","script":"otter-accordion"}'),p=l(4184),g=l.n(p),h=l(2154),v=l(9818),y=l(9977),k=l(8675),f=l(3075),_=l(1070),w=l(7638),C=l(3532),E=l(2645),x=l(4715);const S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};return(0,v.useSelect)((t=>{const{getView:l}=t("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:o}=!!t("core/edit-post")&&t("core/edit-post"),a=o?o():l();return{responsiveSetAttributes:(0,x.GM)(e,a),responsiveGetAttributes:(0,x._c)(a)}}),[])};var T=l(817),M=l(6993);const B=[{label:(0,o.__)("Default","otter-blocks"),value:"default",isDefault:!0},{label:(0,o.__)("Boxed","otter-blocks"),value:"boxed"}],z={narrow:5,wide:10,wider:20};var P=e=>{var t,l,a,n;let{clientId:r,attributes:d,setAttributes:u,getValue:b}=e;const[m,p]=(0,i.useState)("settings"),g=[{label:(0,o.__)("Title","otter-blocks"),slug:"titleColor",value:b("titleColor")},{label:(0,o.__)("Active Tab Title","otter-blocks"),slug:"activeTitleColor",value:b("activeTitleColor")},{label:(0,o.__)("Title Background","otter-blocks"),slug:"titleBackground",value:b("titleBackground")},{label:(0,o.__)("Active Tab Title Background","otter-blocks"),slug:"activeTitleBackground",value:b("activeTitleBackground")},{label:(0,o.__)("Content Background","otter-blocks"),slug:"contentBackground",value:b("contentBackground")},{label:(0,o.__)("Border","otter-blocks"),slug:"borderColor",value:b("borderColor")}],{responsiveSetAttributes:h,responsiveGetAttributes:P}=S(u);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:m,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:p}),"settings"===m&&(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Place Icon on Left","otter-blocks"),checked:d.iconFirst,onChange:e=>u({iconFirst:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Keep Multiple Items Expanded","otter-blocks"),help:(0,o.__)("When enabled, multiple accordion items can be expanded at the same time","otter-blocks"),checked:d.alwaysOpen||!1,onChange:e=>{u({alwaysOpen:e}),!0!==e&&(0,v.select)("core/block-editor").getBlocksByClientId(r)[0].innerBlocks.forEach((e=>{(0,v.dispatch)("core/block-editor").updateBlockAttributes(e.clientId,{initialOpen:!1})}))}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Enable FAQ Schema","otter-blocks"),checked:d.FAQSchema||!1,onChange:e=>u({FAQSchema:e})}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Accordion title HTML tag","otter-blocks"),value:d.tag||"div",options:[{label:(0,o.__)("H1","otter-blocks"),value:"h1"},{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"},{label:(0,o.__)("div","otter-blocks"),value:"div"}],onChange:e=>{(0,v.select)("core/block-editor").getBlocksByClientId(r)[0].innerBlocks.forEach((t=>{(0,v.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{tag:e})})),u({tag:e})}})),"style"===m&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks")},(0,i.createElement)(E.Z,{options:B,value:(0,x.tB)(B,null==d?void 0:d.className),onChange:e=>{const t=(0,x.L4)(null==d?void 0:d.className,B,e);u({className:t})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Title Typography","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{value:d.fontSize,fontSizes:[{name:(0,o.__)("Extra Small","otter-blocks"),slug:"extra-small",size:14},{name:(0,o.__)("Small","otter-blocks"),slug:"small",size:16},{name:(0,o.__)("Medium","otter-blocks"),slug:"medium",size:18},{name:(0,o.__)("Large","otter-blocks"),slug:"large",size:24},{name:(0,o.__)("Extra Large","otter-blocks"),slug:"extra-large",size:28}],onChange:e=>u({fontSize:e})}),(0,i.createElement)(y.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:d.fontFamily,onChangeFontFamily:e=>{u(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},valueVariant:d.fontVariant,onChangeFontVariant:e=>u({fontVariant:e}),valueStyle:d.fontStyle,onChangeFontStyle:e=>u({fontStyle:e}),valueTransform:d.textTransform,onChangeTextTransform:e=>u({textTransform:e})}),(0,i.createElement)(k.Z,{values:["fontFamily","fontVariant","fontStyle","textTransform"],setAttributes:u}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:d.letterSpacing,onChange:e=>u({letterSpacing:e}),min:-50,max:100,allowReset:!0})),(0,i.createElement)(T.Z,{label:(0,o.__)("Color","otter-blocks"),isSynced:d.isSynced,options:g,setAttributes:u},(0,i.createElement)(s.ContrastChecker,{textColor:b("titleColor"),backgroundColor:b("titleBackground")}),(0,i.createElement)(s.ContrastChecker,{textColor:b("activeTitleColor"),backgroundColor:b("activeTitleBackground")})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:P([d.padding,d.paddingTablet,d.paddingMobile]),onChange:e=>h(e,["padding","paddingTablet","paddingMobile"])})),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Gap Between Panels","otter-blocks"),value:"string"==typeof d.gap?z[d.gap]:d.gap,onChange:e=>u({gap:e}),allowReset:!0})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Icons","otter-blocks"),initialOpen:!1},(0,i.createElement)(_.Z,{label:(0,o.__)("Closed Item Icon","otter-blocks"),library:"fontawesome",prefix:null===(t=d.icon)||void 0===t?void 0:t.prefix,icon:null===(l=d.icon)||void 0===l?void 0:l.name,allowThemeisleIcons:!1,onChange:e=>u({icon:e})}),(0,i.createElement)(_.Z,{label:(0,o.__)("Open Item Icon","otter-blocks"),library:"fontawesome",prefix:null===(a=d.openItemIcon)||void 0===a?void 0:a.prefix,icon:null===(n=d.openItemIcon)||void 0===n?void 0:n.name,allowThemeisleIcons:!1,onChange:e=>u({openItemIcon:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:d.borderWidth,units:[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"vw",label:"vw"},{value:"vh",label:"vh"}],onChange:e=>u({borderWidth:e})}),(0,i.createElement)(f.Z,{boxShadow:d.boxShadow,onChange:e=>{const t={...d.boxShadow};Object.entries(e).map((function(){let[l,o]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;t[l]=o})),u({boxShadow:t})}}))),(0,i.createElement)(C.p,null))},L=l(5225),R=l(4824);const{attributes:F}=m,A={fas:"Font Awesome 5 Free",far:"Font Awesome 5 Free",fal:"Font Awesome 5 Free",fab:"Font Awesome 5 Brands"};const{name:H}=m;(0,a.registerBlockType)(H,{...m,title:(0,o.__)("Accordion","otter-blocks"),description:(0,o.__)("Vertically collapsing accordions perfect for displaying your FAQs. Powered by Otter.","otter-blocks"),icon:r.buttonsIcon,keywords:["accordions","collapse","faq"],edit:e=>{let{name:t,attributes:l,setAttributes:o,clientId:a,isSelected:n}=e;(0,i.useEffect)((()=>{h.Z.attach();const e=(0,L.blockInit)(a,F);return()=>e(l.id)}),[l.id]);const r=(0,v.useSelect)((e=>e("core/block-editor").getBlocksByClientId(a)[0].innerBlocks));(0,i.useEffect)((()=>{void 0===l.alwaysOpen&&o({alwaysOpen:1<r.filter((e=>!0===e.attributes.initialOpen)).length})}),[]);const c=e=>(0,L.getDefaultValueByField)({name:t,field:e,defaultAttributes:F,attributes:l}),d={"--title-color":c("titleColor"),"--title-background":c("titleBackground"),"--content-background":c("contentBackground"),"--border-color":c("borderColor"),"--border-width":c("borderWidth"),"--box-shadow":l.boxShadow.active&&`${l.boxShadow.horizontal}px ${l.boxShadow.vertical}px ${l.boxShadow.blur}px ${l.boxShadow.spread}px ${(0,x.rW)(l.boxShadow.color,l.boxShadow.colorOpacity)}`,"--padding":(0,x.bv)(l.padding,{top:"18px",right:"24px",bottom:"18px",left:"24px"}),"--padding-tablet":(0,x.bv)(l.paddingTablet,{top:"18px",right:"24px",bottom:"18px",left:"24px"}),"--padding-mobile":(0,x.bv)(l.paddingMobile,{top:"18px",right:"24px",bottom:"18px",left:"24px"}),"--gap":(u=l.gap,u?`${u}px`:u)};var u;const[b,m]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{m([`> * > * > .wp-block-themeisle-blocks-accordion-item .wp-block-themeisle-blocks-accordion-item__title > * {\n\t\t\t\t${l.fontSize?"font-size:"+l.fontSize+"px":""};\n\t\t\t\t${l.fontFamily?"font-family:"+l.fontFamily:""};\n\t\t\t\t${l.fontVariant?"font-variant:"+l.fontVariant:""};\n\t\t\t\t${l.fontStyle?"font-style:"+l.fontStyle:""};\n\t\t\t\t${l.textTransform?"text-transform:"+l.textTransform:""};\n\t\t\t\t${l.letterSpacing?"letter-spacing:"+l.letterSpacing+"px":""};\n\t\t\t}`])}),[l.fontSize,l.fontFamily,l.fontVariant,l.fontStyle,l.textTransform,l.letterSpacing]);const[p,y]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{const e=c("icon"),t=c("openItemIcon");y([...e?[`> * > * > .wp-block-themeisle-blocks-accordion-item:not(.is-open) > .wp-block-themeisle-blocks-accordion-item__title::after {\n\t\t\t\tcontent: "\\${R[e.name].unicode}" !important;\n\t\t\t\tfont-family: "${A[e.prefix]}" !important;\n\t\t\t\tfont-weight: ${"fas"!==e.prefix?"400":"900"}\n\t\t\t}`]:[],...t?[`> * > * > .wp-block-themeisle-blocks-accordion-item.is-open > .wp-block-themeisle-blocks-accordion-item__title::after {\n\t\t\t\tcontent: "\\${R[t.name].unicode}" !important;\n\t\t\t\tfont-family: "${A[t.prefix]}" !important;\n\t\t\t\tfont-weight: ${"fas"!==t.prefix?"400":"900"}\n\t\t\t}`]:[]])}),[l.icon,l.openItemIcon]);const[k,f]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{const e=c("activeTitleColor"),t=c("activeTitleBackground");f([...e?[`> * > * > .wp-block-themeisle-blocks-accordion-item.is-open > .wp-block-themeisle-blocks-accordion-item__title {\n\t\t\t\t--title-color: ${e};\n\t\t\t}`]:[],...t?[`> * > * > .wp-block-themeisle-blocks-accordion-item.is-open > .wp-block-themeisle-blocks-accordion-item__title {\n\t\t\t\t--title-background: ${t};\n\t\t\t}`]:[]])}),[l.activeTitleColor,l.activeTitleBackground]),(0,i.useEffect)((()=>{l.fontFamily&&h.Z.loadFontToBrowser(l.fontFamily,l.fontVariant)}),[l.fontFamily]);const _=(0,s.useBlockProps)({id:l.id,className:g()({[p]:p,[k]:k,[b]:b,[`is-${l.gap}-gap`]:"string"==typeof l.gap,"no-gap":0===l.gap,"has-gap":"string"!=typeof l.gap&&0<l.gap,"icon-first":l.iconFirst,"has-icon":!!l.icon,"has-open-icon":!!l.openItemIcon}),style:d});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(P,{clientId:a,attributes:l,setAttributes:o,getValue:c}),(0,i.createElement)("div",_,(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/accordion-item"],template:[["themeisle-blocks/accordion-item"]],renderAppender:n?s.InnerBlocks.ButtonBlockAppender:""})))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,"data-has-schema":t.FAQSchema,className:g()({exclusive:!1===t.alwaysOpen,[`is-${t.gap}-gap`]:t.gap&&"string"==typeof t.gap,"no-gap":0===t.gap,"has-gap":t.gap&&"string"!=typeof t.gap&&0!==t.gap,"icon-first":t.iconFirst,"has-icon":!!t.icon,"has-open-icon":!!t.openItemIcon})});return(0,i.createElement)("div",l,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"themeisle-blocks/accordion-item",attributes:{initialOpen:!0,title:(0,o.__)("Accordion Item","otter-blocks")},innerBlocks:[{name:"core/paragraph",attributes:{customFontSize:48,content:"Lorem ipsum dolor sit amet, eu liber saperet est. Recusabo volutpat has ne, sed dicit eruditi detraxit ut, modus ancillae mei eu.",align:"left"}}]}]}});var O=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/accordion-item","title":"Accordion Item","category":"themeisle-blocks","description":"Vertically collapsing accordions perfect for displaying your FAQs. Powered by Otter.","keywords":["accordions","collapse","faq"],"parent":["themeisle-blocks/accordion"],"textdomain":"otter-blocks","attributes":{"title":{"type":"string"},"initialOpen":{"type":"boolean","default":false},"tag":{"type":"string"}},"supports":{"reusable":false}}'),N=e=>{let{clientId:t,attributes:l,setAttributes:a}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Initially Open","otter-blocks"),checked:l.initialOpen,onChange:e=>{if(a({initialOpen:e}),!e)return;const l=(0,v.select)("core/block-editor").getBlockParents(t).at(-1),o=(0,v.select)("core/block-editor").getBlock(l);o.attributes.alwaysOpen||o.innerBlocks.forEach((e=>{e.clientId!==t&&(0,v.dispatch)("core/editor").updateBlockAttributes(e.clientId,{initialOpen:!1})}))}})))};const{name:V}=O;(0,a.registerBlockType)(V,{...O,title:(0,o.__)("Accordion Item","otter-blocks"),description:(0,o.__)("Vertically collapsing accordions perfect for displaying your FAQs. Powered by Otter.","otter-blocks"),icon:r.buttonsIcon,keywords:["accordions","collapse","faq"],edit:e=>{let{clientId:t,attributes:l,setAttributes:a}=e;const[n,r]=(0,i.useState)(!0);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(N,{clientId:t,attributes:l,setAttributes:a}),(0,i.createElement)("div",(0,s.useBlockProps)({className:g()({"is-open":n})}),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__title",onClick:e=>{"string"==typeof e.target.className&&e.target.className.includes("block-editor-rich-text__editable")?r(!0):r(!n)}},(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:l.title,onChange:e=>{n||r(!0),a({title:e})},tagName:l.tag||"div"})),n&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__content"},(0,i.createElement)(s.InnerBlocks,{template:[["core/paragraph"]]}))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({open:!!t.initialOpen});return(0,i.createElement)("details",l,(0,i.createElement)("summary",{className:"wp-block-themeisle-blocks-accordion-item__title"},(0,i.createElement)(s.RichText.Content,{tagName:t.tag||"div",value:t.title})),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__content"},(0,i.createElement)(s.InnerBlocks.Content,null)))}});var I=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/advanced-heading","title":"Advanced Heading","category":"themeisle-blocks","description":"Advanced Heading gives a spin to editor\'s Heading block with much needed customization options. Powered by Otter.","keywords":["heading","title","advanced heading"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"content":{"type":"string","source":"html","selector":"h1,h2,h3,h4,h5,h6,div,p,span","default":""},"tag":{"default":"h2","type":"string"},"align":{"type":"string"},"alignTablet":{"type":"string"},"alignMobile":{"type":"string"},"headingColor":{"type":"string"},"highlightColor":{"type":"string"},"highlightBackground":{"type":"string"},"fontSize":{"type":"number"},"fontSizeTablet":{"type":"number"},"fontSizeMobile":{"type":"number"},"fontFamily":{"type":"string"},"fontVariant":{"type":"string"},"fontStyle":{"type":"string"},"textTransform":{"type":"string"},"lineHeight":{"type":"number"},"letterSpacing":{"type":"number"},"textShadow":{"type":"boolean","default":false},"textShadowColor":{"type":"string","default":"#000000"},"textShadowColorOpacity":{"type":"number","default":50},"textShadowBlur":{"type":"number","default":5},"textShadowHorizontal":{"type":"number","default":0},"textShadowVertical":{"type":"number","default":0},"paddingType":{"type":"string","default":"linked"},"paddingTypeTablet":{"type":"string","default":"linked"},"paddingTypeMobile":{"type":"string","default":"linked"},"padding":{"type":"number","default":0},"paddingTablet":{"type":"number"},"paddingMobile":{"type":"number"},"paddingTop":{"type":"number","default":0},"paddingTopTablet":{"type":"number"},"paddingTopMobile":{"type":"number"},"paddingRight":{"type":"number","default":0},"paddingRightTablet":{"type":"number"},"paddingRightMobile":{"type":"number"},"paddingBottom":{"type":"number","default":0},"paddingBottomTablet":{"type":"number"},"paddingBottomMobile":{"type":"number"},"paddingLeft":{"type":"number","default":0},"paddingLeftTablet":{"type":"number"},"paddingLeftMobile":{"type":"number"},"marginType":{"type":"string","default":"unlinked"},"marginTypeTablet":{"type":"string","default":"unlinked"},"marginTypeMobile":{"type":"string","default":"unlinked"},"margin":{"type":"number","default":0},"marginTablet":{"type":"number"},"marginMobile":{"type":"number"},"marginTop":{"type":"number","default":0},"marginTopTablet":{"type":"number"},"marginTopMobile":{"type":"number"},"marginBottom":{"type":"number","default":25},"marginBottomTablet":{"type":"number"},"marginBottomMobile":{"type":"number"}},"editorStyle":"otter-advanced-heading-editor","style":"otter-advanced-heading-style"}'),D=l(6713),G=l(2629);const $="themeisle-blocks/highlight";(0,G.registerFormatType)($,{name:$,title:(0,o.__)("Highlight","otter-blocks"),tagName:"span",className:"highlight",edit:e=>{let{isActive:t,value:l,onChange:a}=e;const n=()=>a((0,G.toggleFormat)(l,{type:$}));return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.RichTextShortcut,{type:"primary",character:"h",onUse:n}),(0,i.createElement)(s.RichTextToolbarButton,{icon:D.Z,title:(0,o.__)("Highlight","otter-blocks"),onClick:n,isActive:t,shortcutType:"access",shortcutCharacter:"h"}))}});var W=l(80),Z=l.n(W);const j=[{attributes:{id:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6,div,p,span",default:""},tag:{default:"h2",type:"string"},align:{type:"string"},alignTablet:{type:"string"},alignMobile:{type:"string"},headingColor:{type:"string",default:"#000000"},highlightColor:{type:"string"},highlightBackground:{type:"string"},fontSize:{type:"number"},fontSizeTablet:{type:"number"},fontSizeMobile:{type:"number"},fontFamily:{type:"string"},fontVariant:{type:"string"},fontStyle:{type:"string",default:"normal"},textTransform:{type:"string",default:"none"},lineHeight:{type:"number"},letterSpacing:{type:"number"},textShadow:{type:"boolean",default:!1},textShadowColor:{type:"string",default:"#000000"},textShadowColorOpacity:{type:"number",default:50},textShadowBlur:{type:"number",default:5},textShadowHorizontal:{type:"number",default:0},textShadowVertical:{type:"number",default:0},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:0},paddingTablet:{type:"number",default:0},paddingMobile:{type:"number",default:0},paddingTop:{type:"number",default:0},paddingTopTablet:{type:"number",default:0},paddingTopMobile:{type:"number",default:0},paddingRight:{type:"number",default:0},paddingRightTablet:{type:"number",default:0},paddingRightMobile:{type:"number",default:0},paddingBottom:{type:"number",default:0},paddingBottomTablet:{type:"number",default:0},paddingBottomMobile:{type:"number",default:0},paddingLeft:{type:"number",default:0},paddingLeftTablet:{type:"number",default:0},paddingLeftMobile:{type:"number",default:0},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:0},marginTablet:{type:"number",default:0},marginMobile:{type:"number",default:0},marginTop:{type:"number",default:0},marginTopTablet:{type:"number",default:0},marginTopMobile:{type:"number",default:0},marginBottom:{type:"number",default:25},marginBottomTablet:{type:"number",default:25},marginBottomMobile:{type:"number",default:20}},save:e=>{let t,{attributes:l,className:o}=e;l.textShadow&&(t={textShadow:`${l.textShadowHorizontal}px ${l.textShadowVertical}px ${l.textShadowBlur}px ${Z()(l.textShadowColor?l.textShadowColor:"#000000",l.textShadowColorOpacity)}`});const a={color:l.headingColor,fontFamily:l.fontFamily,fontWeight:"regular"===l.fontVariant?"normal":l.fontVariant,fontStyle:l.fontStyle,textTransform:l.textTransform,lineHeight:l.lineHeight&&`${l.lineHeight}px`,letterSpacing:l.letterSpacing&&`${l.letterSpacing}px`,...t};return(0,i.createElement)(s.RichText.Content,{tagName:l.tag,value:l.content,id:l.id,className:g()(l.id,o),style:a})}}];var U=j,q={from:[{type:"block",blocks:["core/heading"],transform:e=>{let{content:t}=e;return(0,a.createBlock)("themeisle-blocks/advanced-heading",{content:t})}},{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,a.createBlock)("themeisle-blocks/advanced-heading",{content:t})}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,a.createBlock)("core/paragraph",{content:t})}}]},J=l(7462),K=l(2819),Y=l(4333),Q=e=>{let{attributes:t,setAttributes:l}=e;const a=e=>{l(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},n=e=>{switch(e){case"h1":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H1"));case"h2":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H2"));case"h3":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H3"));case"h4":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H4"));case"h5":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H5"));case"h6":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H6"));case"div":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"DIV"));case"p":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{x:"0",y:"15"},"P"));case"span":return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"SPAN"));default:return(0,i.createElement)(c.SVG,{style:{width:"25px",height:"20px"}},(0,i.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"DEFAULT"))}},r=e=>{l({tag:e})};return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.DropdownMenu,{icon:n(t.tag),label:(0,o.__)("Select tag","otter-blocks"),className:"components-toolbar",controls:[{title:(0,o.__)("Heading","otter-blocks")+" 1",icon:n("h1"),onClick:()=>r("h1")},{title:(0,o.__)("Heading","otter-blocks")+" 2",icon:n("h2"),onClick:()=>r("h2")},{title:(0,o.__)("Heading","otter-blocks")+" 3",icon:n("h3"),onClick:()=>r("h3")},{title:(0,o.__)("Heading","otter-blocks")+" 4",icon:n("h4"),onClick:()=>r("h4")},{title:(0,o.__)("Heading","otter-blocks")+" 5",icon:n("h5"),onClick:()=>r("h5")},{title:(0,o.__)("Heading","otter-blocks")+" 6",icon:n("h6"),onClick:()=>r("h6")},{title:(0,o.__)("Division","otter-blocks"),icon:n("div"),onClick:()=>r("div")},{title:(0,o.__)("Paragraph","otter-blocks"),icon:n("p"),onClick:()=>r("p")},{title:(0,o.__)("Span Tag","otter-blocks"),icon:n("span"),onClick:()=>r("span")}]}),(0,i.createElement)(c.ToolbarGroup,null,(0,i.createElement)(c.Dropdown,{contentClassName:"wp-themesiel-blocks-advanced-heading-popover-content",position:"bottom center",renderToggle:e=>{let{isOpen:t,onToggle:l}=e;return(0,i.createElement)(c.Button,{className:"components-dropdown-menu__toggle",icon:"editor-textcolor",onClick:l,"aria-haspopup":"true","aria-expanded":t,label:(0,o.__)("Typography Settings","otter-blocks"),showTooltip:!0},(0,i.createElement)("span",{className:"components-dropdown-menu__indicator"}))},renderContent:()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)(y.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:t.fontFamily,onChangeFontFamily:a,valueVariant:t.fontVariant,onChangeFontVariant:e=>l({fontVariant:e}),valueStyle:t.fontStyle,onChangeFontStyle:e=>l({fontStyle:e}),valueTransform:t.textTransform,onChangeTextTransform:e=>l({textTransform:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:t.lineHeight,onChange:e=>l({lineHeight:e}),step:.1,min:0,max:3}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:t.letterSpacing,onChange:e=>l({letterSpacing:e}),step:.1,min:-50,max:100}))})))},X=l(2136),ee=l(2372),te=l(1661),le=e=>{let{attributes:t,setAttributes:l}=e;const a=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]),[n,r]=(0,i.useState)("style"),d={top:"paddingTop",right:"paddingRight",bottom:"paddingBottom",left:"paddingLeft"},u={top:"paddingTopTablet",right:"paddingRightTablet",bottom:"paddingBottomTablet",left:"paddingLeftTablet"},b={top:"paddingTopMobile",right:"paddingRightMobile",bottom:"paddingBottomMobile",left:"paddingLeftMobile"},m=e=>{if("top"==e)switch(a){case"Desktop":return"linked"===t.paddingType?t.padding:t.paddingTop;case"Tablet":return"linked"===t.paddingTypeTablet?t.paddingTablet:t.paddingTopTablet;case"Mobile":return"linked"===t.paddingTypeMobile?t.paddingMobile:t.paddingTopMobile}else if("right"==e)switch(a){case"Desktop":return"linked"===t.paddingType?t.padding:t.paddingRight;case"Tablet":return"linked"===t.paddingTypeTablet?t.paddingTablet:t.paddingRightTablet;case"Mobile":return"linked"===t.paddingTypeMobile?t.paddingMobile:t.paddingRightMobile}else if("bottom"==e)switch(a){case"Desktop":return"linked"===t.paddingType?t.padding:t.paddingBottom;case"Tablet":return"linked"===t.paddingTypeTablet?t.paddingTablet:t.paddingBottomTablet;case"Mobile":return"linked"===t.paddingTypeMobile?t.paddingMobile:t.paddingBottomMobile}else if("left"==e)switch(a){case"Desktop":return"linked"===t.paddingType?t.padding:t.paddingLeft;case"Tablet":return"linked"===t.paddingTypeTablet?t.paddingTablet:t.paddingLeftTablet;case"Mobile":return"linked"===t.paddingTypeMobile?t.paddingMobile:t.paddingLeftMobile}},p={top:"marginTop",bottom:"marginBottom"},g={top:"marginTopTablet",bottom:"marginBottomTablet"},h={top:"marginTopMobile",bottom:"marginBottomMobile"},f=e=>{if("top"==e)switch(a){case"Desktop":return"linked"===t.marginType?t.margin:t.marginTop;case"Tablet":return"linked"===t.marginTypeTablet?t.marginTablet:t.marginTopTablet;case"Mobile":return"linked"===t.marginTypeMobile?t.marginMobile:t.marginTopMobile}else if("bottom"==e)switch(a){case"Desktop":return"linked"===t.marginType?t.margin:t.marginBottom;case"Tablet":return"linked"===t.marginTypeTablet?t.marginTablet:t.marginBottomTablet;case"Mobile":return"linked"===t.marginTypeMobile?t.marginMobile:t.marginBottomMobile}};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:n,options:[{label:(0,o.__)("Style","otter-blocks"),value:"style"},{label:(0,o.__)("Advanced","otter-blocks"),value:"advanced"}],onChange:r}),"style"===n&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("General Settings","otter-blocks"),className:"o-adv-h-panel"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Heading Color","otter-blocks"),colorValue:t.headingColor,onColorChange:e=>l({headingColor:e})}),(0,i.createElement)(M.Z,{label:(0,o.__)("Font Size","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:(()=>{switch(a){case"Desktop":return t.fontSize;case"Tablet":return t.fontSizeTablet;case"Mobile":return t.fontSizeMobile;default:return}})()||"",onChange:e=>{"Desktop"===a?l({fontSize:e}):"Tablet"===a?l({fontSizeTablet:e}):"Mobile"===a&&l({fontSizeMobile:e})},step:.1,min:1,max:500,allowReset:!0})),(0,i.createElement)(M.Z,{label:(0,o.__)("Alignment","otter-blocks")},(0,i.createElement)(s.AlignmentToolbar,{value:(()=>{switch(a){case"Desktop":return t.align;case"Tablet":return t.alignTablet;case"Mobile":return t.alignMobile;default:return}})(),onChange:e=>{"Desktop"===a?l({align:e}):"Tablet"===a?l({alignTablet:e}):"Mobile"===a&&l({alignMobile:e})},isCollapsed:!1}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(y.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:t.fontFamily,onChangeFontFamily:e=>{l(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},valueVariant:t.fontVariant,onChangeFontVariant:e=>l({fontVariant:e}),valueStyle:t.fontStyle,onChangeFontStyle:e=>l({fontStyle:e}),valueTransform:t.textTransform,onChangeTextTransform:e=>l({textTransform:e})}),(0,i.createElement)(k.Z,{values:["fontFamily","fontVariant","fontStyle","textTransform"],setAttributes:l}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:t.lineHeight,onChange:e=>l({lineHeight:e}),step:.1,min:0,max:3,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:t.letterSpacing,onChange:e=>l({letterSpacing:e}),step:.1,min:-50,max:100,allowReset:!0}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Shadow Properties","otter-blocks"),checked:t.textShadow,onChange:e=>l({textShadow:e})}),t.textShadow&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Color","otter-blocks"),colorValue:t.textShadowColor,onColorChange:e=>l({textShadowColor:e})}),(0,i.createElement)(X.Z,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:t.textShadowColorOpacity,onChange:e=>l({textShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:t.textShadowBlur,onChange:e=>l({textShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:t.textShadowHorizontal,onChange:e=>l({textShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:t.textShadowVertical,onChange:e=>l({textShadowVertical:e}),min:-100,max:100})))))||"advanced"===n&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Highlight Color","otter-blocks")},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Highlight Color","otter-blocks"),colorValue:t.highlightColor,onColorChange:e=>l({highlightColor:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Highlight Background","otter-blocks"),colorValue:t.highlightBackground,onColorChange:e=>l({highlightBackground:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Spacing","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Padding","otter-blocks")},(0,i.createElement)(ee.Z,{type:(()=>{switch(a){case"Desktop":return t.paddingType;case"Tablet":return t.paddingTypeTablet;case"Mobile":return t.paddingTypeMobile;default:return}})(),min:0,max:500,changeType:e=>{"Desktop"===a?l({paddingType:e}):"Tablet"===a?l({paddingTypeTablet:e}):"Mobile"===a&&l({paddingTypeMobile:e})},onChange:(e,o)=>{switch(a){case"Desktop":"linked"===t.paddingType?l({padding:o}):l({[d[e]]:o});break;case"Tablet":"linked"===t.paddingTypeTablet?l({paddingTablet:o}):l({[u[e]]:o});break;case"Mobile":"linked"===t.paddingTypeMobile?l({paddingMobile:o}):l({[b[e]]:o})}},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:m("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:m("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:m("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:m("left")}]})),(0,i.createElement)(k.Z,{values:[{padding:"Desktop"===a&&"linked"===t.paddingType},{paddingTablet:"Tablet"===a&&"linked"===t.paddingType},{paddingMobile:"Mobile"===a&&"linked"===t.paddingType},{paddingRight:"Desktop"===a&&"linked"!==t.paddingType},{paddingRightTablet:"Tablet"===a&&"linked"!==t.paddingType},{paddingRightMobile:"Mobile"===a&&"linked"!==t.paddingType},{paddingTop:"Desktop"===a&&"linked"!==t.paddingType},{paddingTopTablet:"Tablet"===a&&"linked"!==t.paddingType},{paddingTopMobile:"Mobile"===a&&"linked"!==t.paddingType},{paddingBottom:"Desktop"===a&&"linked"!==t.paddingType},{paddingBottomTablet:"Tablet"===a&&"linked"!==t.paddingType},{paddingBottomMobile:"Mobile"===a&&"linked"!==t.paddingType},{paddingLeft:"Desktop"===a&&"linked"!==t.paddingType},{paddingLeftTablet:"Tablet"===a&&"linked"!==t.paddingType},{paddingLeftMobile:"Mobile"===a&&"linked"!==t.paddingType}],setAttributes:l}),(0,i.createElement)(M.Z,{label:(0,o.__)("Margin","otter-blocks")},(0,i.createElement)(ee.Z,{type:(()=>{switch(a){case"Desktop":return t.marginType;case"Tablet":return t.marginTypeTablet;case"Mobile":return t.marginTypeMobile;default:return}})(),min:-500,max:500,changeType:e=>{switch(a){case"Desktop":l({marginType:e});break;case"Tablet":l({marginTypeTablet:e});break;case"Mobile":l({marginTypeMobile:e})}},onChange:(e,o)=>{switch(a){case"Desktop":"linked"===t.marginType?l({margin:o}):l({[p[e]]:o});break;case"Tablet":"linked"===t.marginTypeTablet?l({marginTablet:o}):l({[g[e]]:o});break;case"Mobile":"linked"===t.marginTypeMobile?l({marginMobile:o}):l({[h[e]]:o})}},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:f("top")},{label:(0,o.__)("Right","otter-blocks"),disabled:!0},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:f("bottom")},{label:(0,o.__)("Left","otter-blocks"),disabled:!0}]})),(0,i.createElement)(k.Z,{values:[{margin:"Desktop"===a&&"linked"===t.marginType},{marginTablet:"Tablet"===a&&"linked"===t.marginType},{marginMobile:"Mobile"===a&&"linked"===t.marginType},{marginTop:"Desktop"===a&&"linked"!==t.marginType},{marginTopTablet:"Tablet"===a&&"linked"!==t.marginType},{marginTopMobile:"Mobile"===a&&"linked"!==t.marginType},{marginBottom:"Desktop"===a&&"linked"!==t.marginType},{marginBottomTablet:"Tablet"===a&&"linked"!==t.marginType},{marginBottomMobile:"Mobile"===a&&"linked"!==t.marginType}],setAttributes:l}))),(0,i.createElement)(C.p,null)),(0,i.createElement)(te.Z,{value:t.id,onChange:e=>l({id:e})}))};const{attributes:oe}=I;const{name:ae}=I;(0,a.registerBlockType)(ae,{...I,title:(0,o.__)("Advanced Heading","otter-blocks"),description:(0,o.__)("Advanced Heading gives a spin to editor's Heading block with much needed customization options. Powered by Otter.","otter-blocks"),icon:r.headingIcon,keywords:["heading","title","advanced heading"],deprecated:U,transforms:q,edit:e=>{let{attributes:t,setAttributes:l,clientId:n,mergeBlocks:r,onReplace:c}=e;const{isViewportAvailable:d,isPreviewDesktop:u,isPreviewTablet:b,isPreviewMobile:m}=(0,v.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=!!e("core/edit-post")&&e("core/edit-post");return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[]),p=(0,Y.useViewportMatch)("large",">="),g=(0,Y.useViewportMatch)("large","<="),y=(0,Y.useViewportMatch)("small",">="),k=(0,Y.useViewportMatch)("small","<=");(0,i.useEffect)((()=>{h.Z.attach();const e=(0,L.blockInit)(n,oe);return()=>e(t.id)}),[t.id]);let f,_,w,C=p&&!g&&y&&!k,E=!p&&!g&&y&&!k,x=!(p||g||y||k);d&&!x&&(C=u,E=b,x=m),C&&(f={fontSize:t.fontSize?`${t.fontSize}px`:void 0},_={textAlign:t.align,paddingTop:"linked"===t.paddingType?`${t.padding}px`:`${t.paddingTop}px`,paddingRight:"linked"===t.paddingType?`${t.padding}px`:`${t.paddingRight}px`,paddingBottom:"linked"===t.paddingType?`${t.padding}px`:`${t.paddingBottom}px`,paddingLeft:"linked"===t.paddingType?`${t.padding}px`:`${t.paddingLeft}px`,marginTop:"linked"===t.marginType?`${t.margin}px`:`${t.marginTop}px`,marginBottom:"linked"===t.marginType?`${t.margin}px`:`${t.marginBottom}px`}),E&&(f={fontSize:t.fontSizeTablet?`${t.fontSizeTablet}px`:void 0},_={textAlign:t.alignTablet,paddingTop:"linked"===t.paddingTypeTablet?`${t.paddingTablet}px`:`${t.paddingTopTablet}px`,paddingRight:"linked"===t.paddingTypeTablet?`${t.paddingTablet}px`:`${t.paddingRightTablet}px`,paddingBottom:"linked"===t.paddingTypeTablet?`${t.paddingTablet}px`:`${t.paddingBottomTablet}px`,paddingLeft:"linked"===t.paddingTypeTablet?`${t.paddingTablet}px`:`${t.paddingLeftTablet}px`,marginTop:"linked"===t.marginTypeTablet?`${t.marginTablet}px`:`${t.marginTopTablet}px`,marginBottom:"linked"===t.marginTypeTablet?`${t.marginTablet}px`:`${t.marginBottomTablet}px`}),x&&(f={fontSize:t.fontSizeMobile?`${t.fontSizeMobile}px`:void 0},_={textAlign:t.alignMobile,paddingTop:"linked"===t.paddingTypeMobile?`${t.paddingMobile}px`:`${t.paddingTopMobile}px`,paddingRight:"linked"===t.paddingTypeMobile?`${t.paddingMobile}px`:`${t.paddingRightMobile}px`,paddingBottom:"linked"===t.paddingTypeMobile?`${t.paddingMobile}px`:`${t.paddingBottomMobile}px`,paddingLeft:"linked"===t.paddingTypeMobile?`${t.paddingMobile}px`:`${t.paddingLeftMobile}px`,marginTop:"linked"===t.marginTypeMobile?`${t.marginMobile}px`:`${t.marginTopMobile}px`,marginBottom:"linked"===t.marginTypeMobile?`${t.marginMobile}px`:`${t.marginBottomMobile}px`}),t.textShadow&&(w={textShadow:`${t.textShadowHorizontal}px ${t.textShadowVertical}px ${t.textShadowBlur}px ${Z()(t.textShadowColor?t.textShadowColor:"#000000",0<=t.textShadowColorOpacity?t.textShadowColorOpacity||1e-5:1)}`});const S=(0,K.omitBy)({color:t.headingColor,...f,fontFamily:t.fontFamily||void 0,fontWeight:"regular"===t.fontVariant?"normal":t.fontVariant,fontStyle:t.fontStyle||void 0,textTransform:t.textTransform||void 0,lineHeight:(3<t.lineHeight?t.lineHeight+"px":t.lineHeight)||void 0,letterSpacing:t.letterSpacing&&`${t.letterSpacing}px`,..._,...w},(e=>{var t;return null==e||null===(t=e.includes)||void 0===t?void 0:t.call(e,"undefined")})),T=(0,s.useBlockProps)({id:t.id,style:S});return(0,i.useEffect)((()=>{t.fontFamily&&h.Z.loadFontToBrowser(t.fontFamily,t.fontVariant)}),[t.fontFamily]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("style",null,`#block-${n} mark, #block-${n} .highlight {\n\t\t\t\t\t\tcolor: ${t.highlightColor};\n\t\t\t\t\t\tbackground: ${t.highlightBackground};\n\t\t\t\t\t}`),(0,i.createElement)(Q,{attributes:t,setAttributes:l}),(0,i.createElement)(le,{attributes:t,setAttributes:l}),(0,i.createElement)(s.RichText,(0,J.Z)({identifier:"content",value:t.content,placeholder:(0,o.__)("Write heading…","otter-blocks"),tagName:t.tag,allowedFormats:["core/bold","core/italic","core/link","core/strikethrough","themeisle-blocks/highlight","themeisle-blocks/count-animation","themeisle-blocks/typing-animation","themeisle-blocks/dynamic-value","themeisle-blocks/dynamic-link"],onMerge:r,onSplit:(e,l)=>{let o;var r;return o=l||e?(0,a.createBlock)("themeisle-blocks/advanced-heading",{...t,content:e}):(0,a.createBlock)(null!==(r=(0,a.getDefaultBlockName)())&&void 0!==r?r:"themeisle-blocks/advanced-heading"),l&&(o.clientId=n),o},onReplace:c,onRemove:()=>c([]),onChange:e=>{l({content:e})}},T)))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,className:t.id});return(0,i.createElement)(s.RichText.Content,(0,J.Z)({tagName:t.tag,value:t.content},l))},example:{attributes:{content:(0,o.__)("A heading with more customization options","otter-blocks")}}});var ne=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/button-group","title":"Button Group","category":"themeisle-blocks","description":"Prompt visitors to take action with a button group. Powered by Otter.","keywords":["button","buttons","button group"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"align":{"type":["string","object"]},"spacing":{"type":"number","default":20},"paddingTopBottom":{"type":"number"},"paddingLeftRight":{"type":"number"},"collapse":{"type":"string","default":"collapse-none"},"fontSize":{"type":"number"},"fontFamily":{"type":"string"},"fontVariant":{"type":"string"},"textTransform":{"type":"string"},"fontStyle":{"type":"string"},"lineHeight":{"type":"number"}},"editorStyle":"otter-button-group-editor","style":"otter-button-group-style"}');const re={id:{type:"string"},buttons:{type:"number",default:2},align:{type:"string"},spacing:{type:"number",default:20},collapse:{type:"string",default:"collapse-none"},fontSize:{type:"number",default:18},fontFamily:{type:"string"},fontVariant:{type:"string"},textTransform:{type:"string"},fontStyle:{type:"string",default:"normal"},lineHeight:{type:"number"},data:{type:"array",default:[{text:"",link:"",newTab:!1,color:"#ffffff",background:"#32373c",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:0,borderRadius:0,boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:12,paddingLeftRight:24},{text:"",link:"",newTab:!1,color:"#ffffff",background:"#32373c",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:0,borderRadius:0,boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:12,paddingLeftRight:24}]}},ie=[{attributes:re,save:e=>{let{attributes:t,className:l}=e;const o="collapse-none"!==t.collapse?t.collapse:"",a={fontSize:`${t.fontSize}px`,fontFamily:t.fontFamily,fontWeight:t.fontVariant,fontStyle:t.fontStyle,textTransform:t.textTransform,lineHeight:t.lineHeight&&`${t.lineHeight}px`};return(0,i.createElement)("div",{id:t.id,className:g()(l,o),style:{justifyContent:t.align,alignItems:t.align?t.align:"flex-start"}},(0,K.times)(t.buttons,(e=>(e=>{const l={...a,borderWidth:`${t.data[e].borderSize}px`,borderRadius:`${t.data[e].borderRadius}px`,padding:`${t.data[e].paddingTopBottom}px ${t.data[e].paddingLeftRight}px`};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("a",{href:t.data[e].link,target:t.data[e].newTab?"_blank":"_self",className:g()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${e}`),style:l},("left"===t.data[e].iconType||"only"===t.data[e].iconType)&&(0,i.createElement)("i",{className:g()(t.data[e].prefix,"fa-fw",`fa-${t.data[e].icon}`,{"margin-right":"left"===t.data[e].iconType})}),"only"!==t.data[e].iconType&&(0,i.createElement)(s.RichText.Content,{tagName:"span",value:t.data[e].text}),"right"===t.data[e].iconType&&(0,i.createElement)("i",{className:`${t.data[e].prefix} fa-fw fa-${t.data[e].icon} margin-left`})))})(e))))}},{attributes:re,save:e=>{let{attributes:t,className:l}=e;const o="collapse-none"!==t.collapse?t.collapse:"",a={fontSize:`${t.fontSize}px`,fontFamily:t.fontFamily,fontWeight:t.fontVariant,fontStyle:t.fontStyle,textTransform:t.textTransform,lineHeight:t.lineHeight&&`${t.lineHeight}px`};return(0,i.createElement)("div",{id:t.id,className:g()(l,o),style:{justifyContent:t.align,alignItems:t.align?t.align:"flex-start"}},(0,K.times)(t.buttons,(e=>(e=>{const l={...a,borderWidth:`${t.data[e].borderSize}px`,borderRadius:`${t.data[e].borderRadius}px`,padding:`${t.data[e].paddingTopBottom}px ${t.data[e].paddingLeftRight}px`};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("a",{href:t.data[e].link,target:t.data[e].newTab?"_blank":"_self",className:g()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${e}`),style:l,rel:"noopener noreferrer"},("left"===t.data[e].iconType||"only"===t.data[e].iconType)&&(0,i.createElement)("i",{className:g()(t.data[e].prefix,"fa-fw",`fa-${t.data[e].icon}`,{"margin-right":"left"===t.data[e].iconType})}),"only"!==t.data[e].iconType&&(0,i.createElement)(s.RichText.Content,{tagName:"span",value:t.data[e].text}),"right"===t.data[e].iconType&&(0,i.createElement)("i",{className:`${t.data[e].prefix} fa-fw fa-${t.data[e].icon} margin-left`})))})(e))))}},{attributes:{...re,fontSize:{type:"number"},fontStyle:{type:"string"},data:{type:"array",default:[{text:"",link:"",newTab:!1,color:"",background:"",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:"",borderRadius:"",boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:"",paddingLeftRight:""},{text:"",link:"",newTab:!1,color:"",background:"",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:"",borderRadius:"",boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:"",paddingLeftRight:""}]}},migrate:(e,t)=>{let l,o,n;return"flex-start"===e.align&&(l="left"),"center"===e.align&&(l="center"),"flex-end"===e.align&&(l="right"),e.data&&(o=(0,K.pick)(e.data[0],["paddingLeftRight","paddingTopBottom"]),1<=Object.keys(o).length&&(o=(0,K.pick)(o,Object.keys(o).filter((e=>""!==o[e])))),n=e.data.filter(((t,l)=>l<e.buttons)).map((e=>{const t=(0,K.omit)(e,["paddingLeftRight","paddingTopBottom"]);return(0,a.createBlock)("themeisle-blocks/button",{...t})}))),[{...(0,K.omit)(e,["buttons","data"]),align:l,...o},[...n,...t]]},save:e=>{let{attributes:t,className:l}=e;const o="collapse-none"!==t.collapse?t.collapse:"";return(0,i.createElement)("div",{id:t.id,className:g()(l,o,"wp-block-button")},(0,K.times)(t.buttons,(e=>(e=>(0,i.createElement)("a",{href:t.data[e].link,target:t.data[e].newTab?"_blank":"_self",className:g()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${e}`,"wp-block-button__link"),rel:"noopener noreferrer"},("left"===t.data[e].iconType||"only"===t.data[e].iconType)&&(0,i.createElement)("i",{className:g()(t.data[e].prefix,"fa-fw",`fa-${t.data[e].icon}`,{"margin-right":"left"===t.data[e].iconType})}),"only"!==t.data[e].iconType&&(0,i.createElement)(s.RichText.Content,{tagName:"span",value:t.data[e].text}),"right"===t.data[e].iconType&&(0,i.createElement)("i",{className:`${t.data[e].prefix} fa-fw fa-${t.data[e].icon} margin-left`})))(e))))}}];var se=ie,ce=l(4022),de=l(1138),ue=l(4934),be=l(2380),me=l(9700),pe=l(8286),ge=e=>{var t,l;let{attributes:a,setAttributes:n,currentDevice:r}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Spacing","otter-blocks")},(0,i.createElement)(ee.Z,{label:(0,o.__)("Padding","otter-blocks"),min:0,max:100,onChange:(e,t)=>{"top"!==e&&"bottom"!==e||n({paddingTopBottom:t}),"right"!==e&&"left"!==e||n({paddingLeftRight:t})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:a.paddingTopBottom},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:a.paddingLeftRight},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:a.paddingTopBottom},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:a.paddingLeftRight}]}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spacing","otter-blocks"),value:a.spacing,onChange:e=>n({spacing:e}),step:.1,min:0,max:50}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Collapse On","otter-blocks"),value:a.collapse,options:[{label:(0,o.__)("None","otter-blocks"),value:"collapse-none"},{label:(0,o.__)("Desktop","otter-blocks"),value:"collapse-desktop"},{label:(0,o.__)("Tablet","otter-blocks"),value:"collapse-tablet"},{label:(0,o.__)("Mobile","otter-blocks"),value:"collapse-mobile"}],onChange:e=>n({collapse:e})}),(0,i.createElement)(M.Z,{label:(0,o.__)("Alignment","otter-blocks"),className:"buttons-alignment-control"},(0,i.createElement)(pe.Z,{value:null!==(t=null==a||null===(l=a.align)||void 0===l?void 0:l[r])&&void 0!==t?t:"none",options:[{icon:ce.Z,label:(0,o.__)("None","otter-blocks"),value:"none"},{icon:de.Z,label:(0,o.__)("Full","otter-blocks"),value:"full"},{icon:ue.Z,label:(0,o.__)("Left","otter-blocks"),value:"left"},{icon:be.Z,label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:me.Z,label:(0,o.__)("Right","otter-blocks"),value:"right"}],onChange:e=>{const t=a.align?{desktop:a.align.desktop,tablet:a.align.tablet,mobile:a.align.mobile}:{};t[r]="none"===e?void 0:e,n({align:t})},hasIcon:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Font Size","otter-blocks"),value:a.fontSize,onChange:e=>n({fontSize:e}),step:.1,min:0,max:50}),(0,i.createElement)(y.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:a.fontFamily,onChangeFontFamily:e=>{n(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:void 0,fontVariant:void 0,fontStyle:void 0})},valueVariant:a.fontVariant,onChangeFontVariant:e=>n({fontVariant:e}),valueStyle:a.fontStyle,onChangeFontStyle:e=>n({fontStyle:e}),valueTransform:a.textTransform,onChangeTextTransform:e=>n({textTransform:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:a.lineHeight,onChange:e=>n({lineHeight:e}),step:.1,min:0,max:200})))};const{attributes:he}=ne;const{name:ve}=ne;(0,a.registerBlockType)(ve,{...ne,title:(0,o.__)("Button Group","otter-blocks"),description:(0,o.__)("Prompt visitors to take action with a button group. Powered by Otter.","otter-blocks"),icon:r.buttonsIcon,keywords:["button","buttons","button group"],deprecated:se,edit:e=>{let{attributes:t,setAttributes:l,clientId:o}=e;const{isViewportAvailable:a,isPreviewDesktop:n,isPreviewTablet:r,isPreviewMobile:c}=(0,v.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=!!e("core/edit-post")&&e("core/edit-post");return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[]),d=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l().toLowerCase():t().toLowerCase()}),[]),u=(0,Y.useViewportMatch)("large",">="),b=(0,Y.useViewportMatch)("large","<="),m=(0,Y.useViewportMatch)("small",">="),p=(0,Y.useViewportMatch)("small","<=");(0,i.useEffect)((()=>{h.Z.attach();const e=(0,L.blockInit)(o,he);return()=>e(t.id)}),[]);let y=u&&!b&&m&&!p,k=!u&&!b&&m&&!p,f=!(u||b||m||p);a&&!f&&(y=n,k=r,f=c);const _={"--spacing":t.spacing&&t.spacing+"px"},w=["desktop","tablet","mobile"].reduce(((e,l)=>(t.align&&t.align[l]&&e.push(`align-${t.align[l]}-${l}`),e)),[]),C=(0,s.useBlockProps)({id:t.id,className:g()("wp-block-buttons",{[`align-${t.align}`]:"string"==typeof t.align,collapse:"collapse-desktop"===t.collapse&&(y||k||f)||"collapse-tablet"===t.collapse&&(k||f)||"collapse-mobile"===t.collapse&&f},...w),style:_});return(0,i.useEffect)((()=>{t.fontFamily&&h.Z.loadFontToBrowser(t.fontFamily,t.fontVariant)}),[t.fontFamily]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ge,{attributes:t,setAttributes:l,currentDevice:d}),(0,i.createElement)("div",C,(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/button"],__experimentalMoverDirection:"horizontal",orientation:"horizontal",template:[["themeisle-blocks/button"]],renderAppender:s.InnerBlocks.DefaultAppender})))},save:e=>{let{attributes:t}=e;const l="collapse-none"!==t.collapse?t.collapse:"",o=["desktop","tablet","mobile"].reduce(((e,l)=>(t.align&&t.align[l]&&e.push(`align-${t.align[l]}-${l}`),e)),[]),a=s.useBlockProps.save({id:t.id,className:g()(l,"wp-block-buttons",{[`align-${t.align}`]:"string"==typeof t.align},...o)});return(0,i.createElement)("div",a,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{attributes:{spacing:20},innerBlocks:[{name:"themeisle-blocks/button",attributes:{text:(0,o.__)("Button 1","otter-blocks")}},{name:"themeisle-blocks/button",attributes:{text:(0,o.__)("Button 2","otter-blocks")}}]}});var ye=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/button","title":"Button","category":"themeisle-blocks","description":"Prompt visitors to take action with a button group. Powered by Otter.","keywords":["button","buttons","button group"],"parent":["themeisle-blocks/button-group"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"text":{"type":"string","source":"html","selector":"span"},"link":{"type":"string","source":"attribute","selector":"a","attribute":"href"},"newTab":{"type":"boolean","default":false},"color":{"type":"string"},"background":{"type":"string"},"backgroundGradient":{"type":"string"},"border":{"type":"string"},"hoverColor":{"type":"string"},"hoverBackground":{"type":"string"},"hoverBackgroundGradient":{"type":"string"},"hoverBorder":{"type":"string"},"borderSize":{"type":"number"},"borderRadius":{"type":"number"},"boxShadow":{"type":"boolean","default":false},"boxShadowColor":{"type":"string"},"boxShadowColorOpacity":{"type":"number","default":50},"boxShadowBlur":{"type":"number","default":5},"boxShadowSpread":{"type":"number","default":1},"boxShadowHorizontal":{"type":"number","default":0},"boxShadowVertical":{"type":"number","default":0},"hoverBoxShadowColor":{"type":"string"},"hoverBoxShadowColorOpacity":{"type":"number","default":50},"hoverBoxShadowBlur":{"type":"number","default":5},"hoverBoxShadowSpread":{"type":"number","default":1},"hoverBoxShadowHorizontal":{"type":"number","default":0},"hoverBoxShadowVertical":{"type":"number","default":0},"iconType":{"type":"string","default":"none"},"library":{"type":"string","default":"fontawesome"},"prefix":{"type":"string"},"icon":{"type":"string"}},"supports":{"reusable":false},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}]}'),ke=l(8504),fe=e=>{let{attributes:t,setAttributes:l,isSelected:o}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(ke.Z,{isSelected:o,setAttributes:l,url:t.link,opensInNewTab:t.newTab}))},_e=e=>{let{attributes:t,setAttributes:l}=e;const[a,n]=(0,i.useState)(!1),r=()=>(0,i.createElement)(c.ButtonGroup,null,(0,i.createElement)(c.Button,{isSmall:!0,isSecondary:a,isPrimary:!a,onClick:()=>n(!1)},(0,o.__)("Normal","otter-blocks")),(0,i.createElement)(c.Button,{isSmall:!0,isSecondary:!a,isPrimary:a,onClick:()=>n(!0)},(0,o.__)("Hover","otter-blocks")));return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Color","otter-blocks")},(0,i.createElement)(r,null),a?(0,i.createElement)(i.Fragment,{key:"with-hover"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Color","otter-blocks"),colorValue:t.hoverColor,onColorChange:e=>l({hoverColor:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Background","otter-blocks"),colorValue:t.hoverBackground,gradientValue:t.hoverBackgroundGradient,onColorChange:e=>l({hoverBackground:e}),onGradientChange:e=>l({hoverBackgroundGradient:e})})):(0,i.createElement)(i.Fragment,{key:"without-hover"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Color","otter-blocks"),colorValue:t.color,onColorChange:e=>l({color:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Background","otter-blocks"),colorValue:t.background,gradientValue:t.backgroundGradient,onColorChange:e=>l({background:e}),onGradientChange:e=>l({backgroundGradient:e})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border & Box Shadow","otter-blocks"),initialOpen:!1},(0,i.createElement)(r,null),a?(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Border","otter-blocks"),colorValue:t.hoverBorder,onColorChange:e=>l({hoverBorder:e})}):(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Border","otter-blocks"),colorValue:t.border,onColorChange:e=>l({border:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Width","otter-blocks"),value:t.borderSize,onChange:e=>l({borderSize:e}),step:.1,min:0,max:10}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),value:t.borderRadius,onChange:e=>l({borderRadius:e}),step:.1,min:0,max:100}),(0,i.createElement)(X.Z,{label:(0,o.__)("Box Shadow","otter-blocks"),attributes:t,setAttributes:l,resetValues:{boxShadow:!1,boxShadowColor:void 0,boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:void 0,hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0},onClick:()=>l({boxShadow:!0})},(0,i.createElement)(r,null),a?(0,i.createElement)(i.Fragment,{key:"with-hover"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Shadow Color on Hover","otter-blocks"),colorValue:t.hoverBoxShadowColor,onColorChange:e=>l({hoverBoxShadowColor:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:t.hoverBoxShadowColorOpacity,onChange:e=>l({hoverBoxShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:t.hoverBoxShadowBlur,onChange:e=>l({hoverBoxShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:t.hoverBoxShadowSpread,onChange:e=>l({hoverBoxShadowSpread:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:t.hoverBoxShadowHorizontal,onChange:e=>l({hoverBoxShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:t.hoverBoxShadowVertical,onChange:e=>l({hoverBoxShadowVertical:e}),min:-100,max:100})):(0,i.createElement)(i.Fragment,{key:"without-hover"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:t.boxShadowColor,onColorChange:e=>l({boxShadowColor:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:t.boxShadowColorOpacity,onChange:e=>l({boxShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:t.boxShadowBlur,onChange:e=>l({boxShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:t.boxShadowSpread,onChange:e=>l({boxShadowSpread:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:t.boxShadowHorizontal,onChange:e=>l({boxShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:t.boxShadowVertical,onChange:e=>l({boxShadowVertical:e}),min:-100,max:100})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Icon Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Icon Position","otter-blocks"),value:t.iconType,options:[{label:(0,o.__)("No Icon","otter-blocks"),value:"none"},{label:(0,o.__)("Left","otter-blocks"),value:"left"},{label:(0,o.__)("Right","otter-blocks"),value:"right"},{label:(0,o.__)("Icon Only","otter-blocks"),value:"only"}],onChange:e=>l({iconType:e})}),"none"!==t.iconType&&(0,i.createElement)(_.Z,{label:(0,o.__)("Icon Picker","otter-blocks"),library:t.library,prefix:t.prefix,icon:t.icon,changeLibrary:e=>{l({library:e,icon:void 0,prefix:"fab"})},onChange:e=>{l("object"==typeof e?{icon:e.name,prefix:e.prefix}:{icon:e})}})))},we=l(48);const{attributes:Ce}=ye;const{name:Ee}=ye;(0,a.registerBlockType)(Ee,{...ye,title:(0,o.__)("Button","otter-blocks"),description:(0,o.__)("Prompt visitors to take action with a button group. Powered by Otter.","otter-blocks"),icon:r.buttonsIcon,keywords:["button","buttons","button group"],styles:[{name:"fill",label:(0,o.__)("Fill","otter-blocks"),isDefault:!0},{name:"outline",label:(0,o.__)("Outline","otter-blocks")},...window.themeisleGutenberg.hasNeve?[{name:"primary",label:(0,o.__)("Primary","otter-blocks")},{name:"secondary",label:(0,o.__)("Secondary","otter-blocks")}]:[]],edit:e=>{let{attributes:t,setAttributes:l,isSelected:a,clientId:n}=e;const{hasParent:r,parentAttributes:c}=(0,v.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor"),o=t(l(n));return{hasParent:!!o,parentAttributes:o?o.attributes:{}}}),[]);(0,i.useEffect)((()=>{const e=(0,L.blockInit)(n,Ce);return()=>e(t.id)}),[]);let d={},u={};t.boxShadow&&(d={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`}),r&&(u={paddingTop:`${c.paddingTopBottom}px`,paddingBottom:`${c.paddingTopBottom}px`,paddingLeft:`${c.paddingLeftRight}px`,paddingRight:`${c.paddingLeftRight}px`,fontSize:c.fontSize&&`${c.fontSize}px`,fontFamily:c.fontFamily,fontWeight:c.fontVariant,fontStyle:c.fontStyle,textTransform:c.textTransform,lineHeight:c.lineHeight&&`${c.lineHeight}px`});const b={color:t.color,background:t.background||t.backgroundGradient,border:`${t.borderSize}px solid ${t.border}`,borderRadius:t.borderRadius,...d,...u},m={fill:t.color,width:c.fontSize&&`${c.fontSize}px`},p=we.ZP.icons[t.icon],[h,y]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{y([`.wp-block-button__link:hover {\n\t\t\t\tcolor: ${t.hoverColor} !important;\n\t\t\t\tbackground: ${t.hoverBackground||t.hoverBackgroundGradient} !important;\n\t\t\t\tborder-color: ${t.hoverBorder} !important;\n\t\t\t\t${t.boxShadow&&`box-shadow: ${t.hoverBoxShadowHorizontal}px ${t.hoverBoxShadowVertical}px ${t.hoverBoxShadowBlur}px ${t.hoverBoxShadowSpread}px ${Z()(t.hoverBoxShadowColor?t.hoverBoxShadowColor:"#000000",t.hoverBoxShadowColorOpacity)} !important;`}\n\t\t\t}`,`.wp-block-button__link:hover svg {\n\t\t\t\tfill: ${t.hoverColor} !important;\n\t\t\t}`])}),[t.hoverColor,t.hoverBackground,t.hoverBackgroundGradient,t.hoverBorder,t.hoverColor,t.boxShadow,t.hoverBoxShadowHorizontal,t.hoverBoxShadowBlur,t.hoverBoxShadowSpread,t.hoverBoxShadowColor,t.hoverBoxShadowColorOpacity]);const k=(0,s.useBlockProps)({id:t.id,className:g()("wp-block-button",h),style:{}});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(fe,{attributes:t,setAttributes:l,isSelected:a}),(0,i.createElement)(_e,{attributes:t,setAttributes:l}),(0,i.createElement)("div",k,"none"!==t.iconType?(0,i.createElement)("div",{className:"wp-block-button__link",style:b},("left"===t.iconType||"only"===t.iconType)&&("themeisle-icons"===t.library&&t.icon?(0,i.createElement)(p,{className:g()({"margin-right":"left"===t.iconType}),style:m}):(0,i.createElement)("i",{className:g()(t.prefix,"fa-fw",`fa-${t.icon}`,{"margin-right":"left"===t.iconType})})),"only"!==t.iconType&&(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:t.text,onChange:e=>l({text:e}),tagName:"div",withoutInteractiveFormatting:!0}),"right"===t.iconType&&("themeisle-icons"===t.library&&t.icon?(0,i.createElement)(p,{className:"margin-left",style:m}):(0,i.createElement)("i",{className:`${t.prefix} fa-fw fa-${t.icon} margin-left`}))):(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:t.text,onChange:e=>l({text:e}),tagName:"div",withoutInteractiveFormatting:!0,className:"wp-block-button__link",style:b})))},save:e=>{let{attributes:t}=e;const l=we.ZP.icons[t.icon],o=s.useBlockProps.save({id:t.id,className:"wp-block-button"});return(0,i.createElement)("div",o,(0,i.createElement)("a",{href:t.link,target:t.newTab?"_blank":"_self",rel:"noopener noreferrer",className:"wp-block-button__link"},("left"===t.iconType||"only"===t.iconType)&&("themeisle-icons"===t.library&&t.icon?(0,i.createElement)(l,{className:g()({"margin-right":"left"===t.iconType})}):(0,i.createElement)("i",{className:g()(t.prefix,"fa-fw",`fa-${t.icon}`,{"margin-right":"left"===t.iconType})})),"only"!==t.iconType&&(0,i.createElement)(s.RichText.Content,{tagName:"span",value:t.text}),"right"===t.iconType&&("themeisle-icons"===t.library&&t.icon?(0,i.createElement)(l,{className:"margin-left"}):(0,i.createElement)("i",{className:`${t.prefix} fa-fw fa-${t.icon} margin-left`}))))},example:{attributes:{}}});var xe=l(269),Se=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/circle-counter","title":"Circle Counter","category":"themeisle-blocks","description":"Show your progress with a beautiful Circle Counter block. Powered by Otter.","keywords":["progress","circle","counter"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"title":{"type":"string","default":"Skill"},"percentage":{"type":"number","default":50},"duration":{"type":"number","default":2},"titleStyle":{"type":"string","default":"default"},"height":{"type":"number","default":100},"fontSizeTitle":{"type":"number"},"fontSizePercent":{"type":"number"},"strokeWidth":{"type":"number","default":10},"backgroundColor":{"type":"string"},"progressColor":{"type":"string"},"titleColor":{"type":"string"}},"editorStyle":"otter-circle-counter-editor","style":"otter-circle-counter-style","script":"otter-circle-counter"}'),Te=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Percentage","otter-blocks"),help:(0,o.__)("The value of the counter.","otter-blocks"),value:t.percentage,onChange:e=>{void 0!==e&&(e=(0,K.clamp)(e,0,100),l({percentage:e}))},min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Duration","otter-blocks"),help:(0,o.__)("The duration of the animation.","otter-blocks"),value:t.duration,onChange:e=>{void 0!==e&&(e=(0,K.clamp)(e,0,3),l({duration:e}))},min:0,max:3}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Title Style","otter-blocks"),value:t.titleStyle,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Hide","otter-blocks"),value:"hide"},{label:(0,o.__)("Bottom","otter-blocks"),value:"bottom"}],onChange:e=>l({titleStyle:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Height","otter-blocks"),help:(0,o.__)("The height of the circle counter.","otter-blocks"),value:t.height,onChange:e=>l({height:e}),min:0,max:240}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Circle Thickness","otter-blocks"),help:(0,o.__)("Change the thickness (stroke width) of the circle.","otter-blocks"),value:t.strokeWidth,onChange:e=>l({strokeWidth:e}),initialPosition:10,min:0,max:20}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Font Size Title","otter-blocks"),help:(0,o.__)("Change the font size of the title.","otter-blocks"),value:t.fontSizeTitle,onChange:e=>l({fontSizeTitle:e}),initialPosition:37,min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Font Size Percent","otter-blocks"),help:(0,o.__)("Change the font size of the inner text.","otter-blocks"),value:t.fontSizePercent,onChange:e=>l({fontSizePercent:e}),initialPosition:27,min:0,max:80}),"hide"!==t.titleStyle&&(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Title Color","otter-blocks"),colorValue:t.titleColor,onColorChange:e=>l({titleColor:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Progress Color","otter-blocks"),colorValue:t.progressColor,onColorChange:e=>l({progressColor:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Background Color","otter-blocks"),colorValue:t.backgroundColor,onColorChange:e=>l({backgroundColor:e})})))},Me=e=>{let{attributes:t,progressRef:l,valueRef:o}=e;const a=t.height,n=a/2,r=a/2-t.strokeWidth/2,s=2*Math.PI*r;return 0>r?(0,i.createElement)("div",null):(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter__bar",style:{height:a+"px",width:a+"px"}},(0,i.createElement)("svg",{className:"wp-block-themeisle-blocks-circle-counter-container",width:a,height:a},(0,i.createElement)("circle",{className:"wp-block-themeisle-blocks-circle-counter-bg",cx:n,cy:n,r:r,strokeWidth:t.strokeWidth,style:{stroke:t.backgroundColor}}),(0,i.createElement)("circle",{ref:l,className:"wp-block-themeisle-blocks-circle-counter-progress",cx:n,cy:n,r:r,strokeWidth:t.strokeWidth,strokeDasharray:s,style:{stroke:t.progressColor}}),(0,i.createElement)("text",{ref:o,className:"wp-block-themeisle-blocks-circle-counter-text",x:"50%",y:"50%",style:{fill:t.progressColor,fontSize:t.fontSizePercent+"px"}},t.percentage,"%")))};const{attributes:Be}=Se;const{clamp:ze,omit:Pe}=lodash,Le={to:[{type:"block",blocks:["themeisle-blocks/progress-bar"],transform:e=>{const t=Pe(e,["titleStyle","height","fontSize","strokeWidth","progressColor"]);return(0,a.createBlock)("themeisle-blocks/progress-bar",{...t,barBackgroundColor:e.progressColor,height:ze(e.height/4,0,100),titleStyle:"default"})}}]};var Re=Le;const{name:Fe}=Se;(0,a.registerBlockType)(Fe,{...Se,title:(0,o.__)("Circle Counter","otter-blocks"),description:(0,o.__)("Show your progress with a beautiful Circle Counter block. Powered by Otter.","otter-blocks"),icon:xe.Z,keywords:["progress","circle","counter"],transforms:Re,edit:e=>{let{clientId:t,attributes:l,setAttributes:a,isSelected:n,toggleSelection:r}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(t,Be);return()=>e(l.id)}),[l.id]);const d=(0,i.useRef)(null),u=(0,i.useRef)(null),[b,m]=(0,i.useState)({}),p=l.height/2-l.strokeWidth/2,g=2*Math.PI*p;(0,i.useEffect)((()=>{if(!d.current||!d.current||0===l.duration)return;const e=l.percentage/(1e3*l.duration),t=(0,K.range)(0,1e3*l.duration+20,20).map((t=>t*e)).reverse();b&&clearInterval(b),d.current.style.strokeDashoffset=g,u.current.innerText="0%";const o=setInterval((()=>{if(!d.current)return void clearInterval(o);const e=Math.round(t.pop());d.current.style.strokeDashoffset=(100-e)/100*g,u.current.innerHTML=e+"%",0===t.length&&clearInterval(o)}),20);return m(o),()=>{clearInterval(o)}}),[l.duration]),(0,i.useEffect)((()=>{if(d.current&&d.current)return d.current.style.strokeDashoffset=(100-l.percentage)/100*g,u.current.innerHTML=l.percentage+"%",clearInterval(b),()=>{clearInterval(b)}}),[l.percentage,l.height]);const h={"--font-size-title":(v=l.fontSizeTitle,v?`${v}px`:v)};var v;const y=(0,s.useBlockProps)({id:l.id,style:h});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Te,{attributes:l,setAttributes:a}),(0,i.createElement)("div",y,"default"===l.titleStyle&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,i.createElement)(s.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-circle-counter-title__value",placeholder:n?(0,o.__)("Write caption…","otter-blocks"):null,value:l.title,onChange:e=>a({title:e}),multiline:!1,style:{color:l.titleColor}})),(0,i.createElement)(c.ResizableBox,{size:{height:l.height,width:l.height},minHeight:0,maxHeight:240,enable:{top:!1,right:!1,bottom:!0,left:!1},showHandle:n,onResizeStop:(e,t,o,n)=>{a({height:parseInt(l.height+n.height,10)}),r(!0)},onResizeStart:()=>{r(!1)}},(0,i.createElement)(Me,{attributes:l,progressRef:d,valueRef:u})),"bottom"===l.titleStyle&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,i.createElement)(s.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-circle-counter-title__value",placeholder:n?(0,o.__)("Write caption…","otter-blocks"):null,value:l.title,onChange:e=>a({title:e}),multiline:!1,style:{color:l.titleColor}}))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,"data-percentage":t.percentage,"data-duration":t.duration,"data-height":t.height,"data-stroke-width":t.strokeWidth,"data-font-size-percent":t.fontSizePercent,"data-background-stroke":t.backgroundColor,"data-progress-stroke":t.progressColor});return(0,i.createElement)("div",l,"default"===t.titleStyle&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-circle-counter-title__value"},t.title)),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter__bar"}),"bottom"===t.titleStyle&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-circle-counter-title__value"},t.title)))},example:{attributes:{title:"Lorem ipsum"}}});var Ae=l(2506),He=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/countdown","title":"Countdown","category":"themeisle-blocks","description":"Set a countdown for a date. Powered by Otter.","keywords":["countdown","time","counter"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"date":{"type":"string"},"exclude":{"type":"array"},"backgroundColor":{"type":"string"},"valueColor":{"type":"string"},"labelColor":{"type":"string"},"labelDistance":{"type":"number"},"separatorColor":{"type":"string"},"gap":{"type":"number"},"gapTablet":{"type":"number"},"gapMobile":{"type":"number"},"width":{"type":"number"},"widthTablet":{"type":"number"},"widthMobile":{"type":"number"},"containerWidth":{"type":"string"},"containerWidthTablet":{"type":"string"},"containerWidthMobile":{"type":"string"},"height":{"type":"number"},"heightTablet":{"type":"number"},"heightMobile":{"type":"number"},"borderRadius":{"type":["number","object"]},"borderRadiusBox":{"type":"object"},"borderStyle":{"type":"string"},"borderWidth":{"type":"number"},"borderWidthTablet":{"type":"number"},"borderWidthMobile":{"type":"number"},"borderColor":{"type":"string"},"valueFontSize":{"type":["number","string"]},"valueFontSizeTablet":{"type":["number","string"]},"valueFontSizeMobile":{"type":["number","string"]},"labelFontSize":{"type":["number","string"]},"labelFontSizeTablet":{"type":["number","string"]},"labelFontSizeMobile":{"type":["number","string"]},"hasSeparators":{"type":"boolean"},"valueFontWeight":{"type":"string"},"labelFontWeight":{"type":"string"},"alignment":{"type":"string"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"borderRadiusTopRight":{"type":"number"},"borderRadiusTopLeft":{"type":"number"},"borderRadiusBottomRight":{"type":"number"},"borderRadiusBottomLeft":{"type":"number"},"borderRadiusType":{"type":"string","default":"linked"},"separatorAlignment":{"type":"string"},"behaviour":{"type":"string"},"redirectLink":{"type":"string"},"mode":{"type":"string"},"timer":{"type":"object"},"startInterval":{"type":"string"},"endInterval":{"type":"string"},"onEndAction":{"type":"string"}},"supports":{"align":["wide","full"]},"editorStyle":"otter-countdown-editor","style":"otter-countdown-style","script":"otter-countdown"}'),Oe=l(6292),Ne=l.n(Oe),Ve=l(9771),Ie=l(2694),De=l(9084);const Ge=[{name:(0,o.__)("Small","otter-blocks"),size:"0.875em",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"1em",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"1.125em",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"1.25em",slug:"xl"}],$e=["","100","200","300","400","500","600","700","800","900"].map((e=>({label:e||"Default",value:e}))),We=e=>{var t;let{attributes:l}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Countdown Type","otter-blocks"),value:l.mode,options:[{label:(0,o.__)("Static","otter-blocks"),value:""},{label:(0,o.__)("Evergreen (Pro)","otter-blocks"),value:"timer",disabled:!0},{label:(0,o.__)("Interval (Pro)","otter-blocks"),value:"interval",disabled:!0}],help:(0,o.__)("An universal deadline for all visitors","otter-blocks")}),!Boolean(null===(t=window.themeisleGutenberg)||void 0===t?void 0:t.hasPro)&&(0,i.createElement)(De.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"countdownfeature")},(0,o.__)("Get more options with Otter Pro.","otter-blocks")),variant:"upsell"}))},Ze=()=>{var e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("On Expire","otter-blocks"),value:"default",onChange:()=>{},options:[{label:(0,o.__)("No action","otter-blocks"),value:"default"},{label:(0,o.__)("Hide the Countdown","otter-blocks"),value:"hide"},{label:(0,o.__)("Redirect to link","otter-blocks"),value:"redirectLink"}],help:(0,o.__)("The countdown remains visible when it reaches 0","otter-blocks"),disabled:!0}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide/Show Blocks When the Countdown Ends","otter-blocks"),help:(0,o.__)("Enable Hide/Show other blocks when the Countdown ends.","otter-blocks"),checked:!1,onChange:()=>{},disabled:!0}),!Boolean(null===(e=window.themeisleGutenberg)||void 0===e?void 0:e.hasPro)&&(0,i.createElement)(De.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"countdownfeature")},(0,o.__)("Get more options with Otter Pro.","otter-blocks")),variant:"upsell"}))};var je=e=>{var t,l,a,n,r,d,u,b,m;let{attributes:p,setAttributes:g}=e;const{responsiveSetAttributes:h,responsiveGetAttributes:v}=S(g),y=(e,t)=>{var l;g(e?{exclude:null==p||null===(l=p.exclude)||void 0===l?void 0:l.filter((e=>e!==t))}:{exclude:null!=p&&p.exclude?[...null==p?void 0:p.exclude,t]:[t]})},k=(0,Ve.__experimentalGetSettings)();return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Time Settings","otter-blocks")},(0,Ie.applyFilters)("otter.countdown.controls.settings",(0,i.createElement)(We,{attributes:p}),{attributes:p,setAttributes:g}),void 0===p.mode&&(0,i.createElement)(c.Dropdown,{position:"bottom left",headerTitle:(0,o.__)("Select the date for the deadline","otter-blocks"),renderToggle:e=>{let{onToggle:t,isOpen:l}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Button,{onClick:t,isSecondary:!0,"aria-expanded":l,className:"o-extend-btn"},p.date?(0,Ve.format)(k.formats.datetime,p.date):(0,o.__)("Select Date","otter-blocks")))},renderContent:()=>(0,i.createElement)(c.DateTimePicker,{currentDate:p.date,onChange:e=>g({date:e})}),className:"o-extend"})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Display","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Days","otter-blocks"),checked:!(null!=p&&null!==(t=p.exclude)&&void 0!==t&&t.includes("day")),onChange:e=>y(e,"day")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Hours","otter-blocks"),checked:!(null!=p&&null!==(l=p.exclude)&&void 0!==l&&l.includes("hour")),onChange:e=>y(e,"hour")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Minutes","otter-blocks"),checked:!(null!=p&&null!==(a=p.exclude)&&void 0!==a&&a.includes("minute")),onChange:e=>y(e,"minute")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Seconds","otter-blocks"),checked:!(null!=p&&null!==(n=p.exclude)&&void 0!==n&&n.includes("second")),onChange:e=>y(e,"second")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Separators","otter-blocks"),checked:null==p?void 0:p.hasSeparators,onChange:e=>g({hasSeparators:e})}),(0,i.createElement)(M.Z,{label:(0,o.__)("Space Between boxes","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:null!==(r=v([p.gap,p.gapTablet,p.gapMobile]))&&void 0!==r?r:6,onChange:e=>h(e,["gap","gapTablet","gapMobile"]),min:0,max:100,allowReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("End Action","otter-blocks"),initialOpen:!1},(0,Ie.applyFilters)("otter.countdown.controls.end",(0,i.createElement)(Ze,null),{attributes:p,setAttributes:g})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:null!==(d=v([p.containerWidth,p.containerWidthTablet,p.containerWidthMobile]))&&void 0!==d?d:"100%",onChange:e=>h(e,["containerWidth","containerWidthTablet","containerWidthMobile"])})),(0,i.createElement)(M.Z,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:null!==(u=v([p.height,p.heightTablet,p.heightMobile]))&&void 0!==u?u:100,onChange:e=>h(e,["height","heightTablet","heightMobile"]),min:50,max:800,allowReset:!0})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Position","otter-blocks"),value:p.alingment,onChange:e=>g({alignment:e||void 0}),options:[{label:(0,o.__)("Default","otter-blocks"),value:""},{label:(0,o.__)("Left","otter-blocks"),value:"flex-start"},{label:(0,o.__)("Center","otter-blocks"),value:"center"},{label:(0,o.__)("Right","otter-blocks"),value:"flex-end"}]}),p.hasSeparators&&(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Separator Alignment","otter-blocks"),value:p.separatorAlignment,onChange:e=>{g(e?{separatorAlignment:e}:{separatorAlignment:void 0})},options:[{label:(0,o.__)("Default","otter-blocks"),value:""},{label:(0,o.__)("Center","otter-blocks"),value:"center"}]})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Time Value Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:Ge,withReset:!0,value:v([p.valueFontSize,p.valueFontSizeTablet,p.valueFontSizeMobile]),onChange:e=>h(e,["valueFontSize","valueFontSizeTablet","valueFontSizeMobile"])})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Time Value Font Weight","otter-blocks"),value:p.valueFontWeight,onChange:e=>g({valueFontWeight:e||void 0}),options:$e}),(0,i.createElement)(M.Z,{label:(0,o.__)("Label Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:Ge,withReset:!0,value:v([p.labelFontSize,p.labelFontSizeTablet,p.labelFontSizeMobile]),onChange:e=>h(e,["labelFontSize","labelFontSizeTablet","labelFontSizeMobile"])})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Label Font Weight","otter-blocks"),value:p.labelFontWeight,onChange:e=>g({labelFontWeight:e||void 0}),options:$e})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:p.backgroundColor,onChange:e=>g({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:p.valueColor,onChange:e=>g({valueColor:e}),label:(0,o.__)("Time Value","otter-blocks")},{value:p.labelColor,onChange:e=>g({labelColor:e}),label:(0,o.__)("Label","otter-blocks")},{value:p.separatorColor,onChange:e=>g({separatorColor:e}),label:(0,o.__)("Separator","otter-blocks")},{value:p.borderColor,onChange:e=>g({borderColor:e}),label:(0,o.__)("Border","otter-blocks")}]},(0,i.createElement)(s.ContrastChecker,{textColor:p.backgroundColor,backgroundColor:p.valueColor})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Type","otter-blocks"),value:null!==(b=p.borderStyle)&&void 0!==b?b:"solid",onChange:e=>g({borderStyle:"solid"===e?void 0:e}),options:[{label:(0,o.__)("None","otter-blocks"),value:"none"},{label:(0,o.__)("Solid","otter-blocks"),value:"solid"},{label:(0,o.__)("Double","otter-blocks"),value:"double"},{label:(0,o.__)("Dotted","otter-blocks"),value:"dotted"},{label:(0,o.__)("Dashed","otter-blocks"),value:"dashed"}]}),"none"!==p.borderStyle&&(0,i.createElement)(M.Z,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:null!==(m=v([p.borderWidth,p.borderWidthTablet,p.borderWidthMobile]))&&void 0!==m?m:2,onChange:e=>h(e,["borderWidth","borderWidthTablet","borderWidthMobile"]),min:0,max:50,allowReset:!0})),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Radius","otter-blocks"),values:(0,x.Dv)(p.borderRadiusBox,{left:"0px",right:"0px",bottom:"0px",top:"0px"}),onChange:e=>{g({borderRadiusBox:(0,x.cg)(e,{left:"0px",right:"0px",bottom:"0px",top:"0px"})})},id:"o-border-raduis-box"})))};const Ue=1e3,qe=6e4,Je=36e5,Ke=864e5,Ye=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return null!==(e=parseInt((null==t?void 0:t.days)||"0")*Ke+parseInt((null==t?void 0:t.hours)||"0")*Je+parseInt((null==t?void 0:t.minutes)||"0")*qe+parseInt((null==t?void 0:t.seconds)||"0")*Ue)&&void 0!==e?e:0},Qe=(e,t)=>{var l;null!==(l=e)&&void 0!==l||(e=0);const a=Math.floor(e/Ke),n=Math.floor(e/Je%24),r=Math.floor(e/qe%60),i=Math.floor(e/Ue%60);return[{tag:"day",name:1<a?(0,o.__)("Days","otter-blocks"):(0,o.__)("Day","otter-blocks"),value:a},{tag:"hour",name:1<n?(0,o.__)("Hours","otter-blocks"):(0,o.__)("Hour","otter-blocks"),value:n},{tag:"minute",name:1<r?(0,o.__)("Minutes","otter-blocks"):(0,o.__)("Minute","otter-blocks"),value:r},{tag:"second",name:1<i?(0,o.__)("Seconds","otter-blocks"):(0,o.__)("Second","otter-blocks"),value:i}].filter((e=>{var l;let{tag:o}=e;return!(null!=t&&null!==(l=t.exclude)&&void 0!==l&&l.includes(o))})).map((e=>(null!=t&&t.keepNeg||(e.value=Math.max(0,e.value)),e)))},Xe=e=>{let{name:t,value:l,tag:o}=e;return(0,i.createElement)("div",{name:o,className:g()("otter-countdown__display-area",{"is-main-component":"separator"!==o})},(0,i.createElement)("div",{className:"otter-countdown__value"},l),(0,i.createElement)("div",{className:"otter-countdown__label"},t))};var et=e=>{var t;let{time:l,settings:o,hasSeparators:a}=e;const n=4===(null==o||null===(t=o.exclude)||void 0===t?void 0:t.length)?Qe(null!=l?l:0,{}):Qe(null!=l?l:0,{exclude:null==o?void 0:o.exclude}),r=a?(0,x.S3)(n,{name:"sep",value:":",tag:"separator"}):n,s=null==r?void 0:r.map(((e,t)=>(0,i.createElement)(Xe,(0,J.Z)({},e,{key:t}))));return(0,i.createElement)("div",{className:"otter-countdown__container"},void 0!==l&&(0,i.createElement)("div",{className:"otter-countdown__display"},s))};const{attributes:tt}=He,lt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px";return(0,K.isNumber)(e)?`${e}${t}`:e};const ot=e=>{let{name:t,value:l,tag:o}=e;return(0,i.createElement)("div",{name:o,className:g()("otter-countdown__display-area",{"is-main-component":"separator"!==o})},(0,i.createElement)("div",{className:"otter-countdown__value"},l),(0,i.createElement)("div",{className:"otter-countdown__label"},t))},at=e=>{let{time:t,hasSeparators:l}=e;const o=l?(0,x.S3)(t,{name:"sep",value:":",tag:"separator"}):t,a=null==o?void 0:o.map(((e,t)=>(0,i.createElement)(ot,(0,J.Z)({},e,{key:t}))));return void 0!==t?(0,i.createElement)("div",{className:"otter-countdown__container"},(0,i.createElement)("div",{className:"otter-countdown__display"},a)):(0,i.createElement)(i.Fragment,null)};const{name:nt}=He;(0,a.registerBlockType)(nt,{...He,title:(0,o.__)("Countdown","otter-blocks"),description:(0,o.__)("Set a countdown for a date. Powered by Otter.","otter-blocks"),icon:Ae.Z,keywords:["countdown","time","counter"],edit:e=>{var t;let{attributes:l,setAttributes:a,clientId:n}=e;const[r,d]=(0,i.useState)(0);(0,i.useEffect)((()=>{const e=(0,L.blockInit)(n,tt);return()=>e(l.id)}),[l.id]),(0,i.useEffect)((()=>{if(void 0===l.borderRadiusBox&&(l.borderRadius||l.borderRadiusBottomLeft||l.borderRadiusTopRight||l.borderRadiusTopLeft||l.borderRadiusBottomRight)){const e=(0,K.pickBy)("linked"===(null==l?void 0:l.borderRadiusType)?{left:lt(l.borderRadius,"%"),right:lt(l.borderRadius,"%"),bottom:lt(l.borderRadius,"%"),top:lt(l.borderRadius,"%")}:{left:lt(l.borderRadiusBottomLeft,"%"),right:lt(l.borderRadiusTopRight,"%"),bottom:lt(l.borderRadiusBottomRight,"%"),top:lt(l.borderRadiusTopLeft,"%")},(e=>e));(0,K.isEmpty)(e)||a({borderRadiusBox:e,borderRadius:void 0,borderRadiusBottomLeft:void 0,borderRadiusTopRight:void 0,borderRadiusBottomRight:void 0,borderRadiusTopLeft:void 0,borderRadiusType:void 0})}}),[]),(0,i.useEffect)((()=>{let e;return"timer"!==l.mode&&(e=setInterval((()=>{if(l.date){const e=1e3*Ne()(l.date+(0,x.EP)()).unix();d(e-Date.now())}}),500)),()=>{clearInterval(e)}}),[l.date,l.mode]);const u={"--border-radius":(0,x.bv)(l.borderRadiusBox),"--border-style":l.borderStyle,"--background-color":l.backgroundColor,"--border-color":l.borderColor,"--container-width":l.containerWidth,"--container-width-tablet":l.containerWidthTablet,"--container-width-mobile":l.containerWidthMobile,"--height":lt(l.height),"--height-tablet":lt(l.heightTablet),"--height-mobile":lt(l.heightMobile),"--border-width":lt(l.borderWidth),"--border-width-tablet":lt(l.borderWidthTablet),"--border-width-mobile":lt(l.borderWidthMobile),"--gap":lt(l.gap),"--gap-tablet":lt(l.gapTablet),"--gap-mobile":lt(l.gapMobile),"--value-font-size":lt(l.valueFontSize),"--value-font-size-tablet":lt(l.valueFontSizeTablet),"--value-font-size-mobile":lt(l.valueFontSizeMobile),"--label-font-size":lt(l.labelFontSize),"--label-font-size-tablet":lt(l.labelFontSizeTablet),"--label-font-size-mobile":lt(l.labelFontSizeMobile),"--alignment":l.alignment,"--padding":(0,x.bv)(l.padding),"--padding-tablet":(0,x.bv)(l.paddingTablet),"--padding-mobile":(0,x.bv)(l.paddingMobile),"--value-font-weight":l.valueFontWeight,"--label-font-weight":l.labelFontWeight},[b,m]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{m([`.otter-countdown__display-area .otter-countdown__value {\n\t\t\t\tcolor: ${l.valueColor};\n\t\t\t}`,`.otter-countdown__display-area .otter-countdown__label {\n\t\t\t\tcolor: ${l.labelColor};\n\t\t\t}`,`.otter-countdown__display-area[name="separator"] .otter-countdown__value {\n\t\t\t\tcolor: ${l.separatorColor};\n\t\t\t}`,"center"===l.separatorAlignment?'\n\t\t\t.otter-countdown__display-area[name="separator"] .otter-countdown__label {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t':""])}),[l.valueColor,l.labelColor,l.separatorColor,l.separatorAlignment]);const p=(0,s.useBlockProps)({id:l.id,className:g()(b,"ready"),style:u});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(je,{attributes:l,setAttributes:a}),(0,i.createElement)("div",p,(0,i.createElement)(et,{time:(()=>{switch(l.mode){case"timer":return Ye(l.timer);case"interval":return((e,t)=>{if(!e||!t)return 0;const l=new Date(e).getTime();return new Date(t).getTime()-l})(l.startInterval,l.endInterval);default:return r}})(),settings:{exclude:null==l?void 0:l.exclude},hasSeparators:l.hasSeparators}),4===(null==l||null===(t=l.exclude)||void 0===t?void 0:t.length)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("br",null),(0,i.createElement)(c.Notice,{isDismissible:!1,status:"info"},(0,o.__)("The Countdown will be hidden in page","otter-blocks")))))},save:e=>{let{attributes:t}=e;const l=t.startInterval&&t.endInterval?{"data-intv-start":t.startInterval,"data-intv-end":t.endInterval}:{},o=s.useBlockProps.save({id:t.id,"data-date":t.date,"data-bhv":t.behaviour?t.behaviour:void 0,"data-redirect-link":"redirectLink"===t.behaviour&&t.redirectLink?t.redirectLink:void 0,"data-mode":t.mode?t.mode:void 0,"data-timer":(0,K.isEmpty)(t.timer)?void 0:(a=t.timer,Ye(a).toString()),"data-on-end-action":t.onEndAction?t.onEndAction:void 0,...l});var a;return(0,i.createElement)("div",o,(0,i.createElement)(at,{time:Qe(0,{exclude:null==t?void 0:t.exclude}),hasSeparators:null==t?void 0:t.hasSeparators}))},example:{attributes:{date:"2024-07-15T15:03:00"}}});var rt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/flip","title":"Flip Card","category":"themeisle-blocks","description":"Make a card with a flip effect. Powered by Otter.","keywords":["flip card","container","animation"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"isInverted":{"type":"boolean"},"title":{"type":"string"},"description":{"type":"string"},"animType":{"type":"string","default":"flipY"},"width":{"type":["number","object"]},"widthTablet":{"type":"object"},"widthMobile":{"type":"object"},"height":{"type":["number","object"]},"heightTablet":{"type":"object"},"heightMobile":{"type":"object"},"padding":{"type":["number","object"]},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"borderWidth":{"type":["number","object"]},"borderColor":{"type":"string"},"borderRadius":{"type":["number","object"]},"backgroundColor":{"type":"string"},"frontVerticalAlign":{"type":"string"},"frontHorizontalAlign":{"type":"string"},"backVerticalAlign":{"type":"string"},"frontMedia":{"type":"object"},"frontMediaWidth":{"type":["number","string"]},"frontMediaHeight":{"type":["number","string"]},"frontBackgroundImage":{"type":"object"},"frontBackgroundType":{"type":"string","default":"color"},"frontBackgroundColor":{"type":"string"},"frontBackgroundGradient":{"type":"string"},"frontBackgroundPosition":{"type":"object"},"frontBackgroundRepeat":{"type":"string"},"frontBackgroundAttachment":{"type":"string"},"frontBackgroundSize":{"type":"string"},"backBackgroundImage":{"type":"object"},"backBackgroundType":{"type":"string","default":"color"},"backBackgroundColor":{"type":"string"},"backBackgroundGradient":{"type":"string"},"backBackgroundPosition":{"type":"object"},"backBackgroundRepeat":{"type":"string"},"backBackgroundSize":{"type":"string"},"backBackgroundAttachment":{"type":"string"},"boxShadow":{"type":"boolean","default":false},"boxShadowColor":{"type":"string","default":"#000000"},"boxShadowColorOpacity":{"type":"number","default":50},"boxShadowBlur":{"type":"number","default":5},"boxShadowHorizontal":{"type":"number","default":0},"boxShadowVertical":{"type":"number","default":0},"titleFontSize":{"type":["number","string"]},"descriptionFontSize":{"type":["number","string"]},"titleColor":{"type":"string"},"descriptionColor":{"type":"string"},"frontContentType":{"type":"string"}},"editorStyle":"otter-flip-editor","style":"otter-flip-style"}');const it={top:"flex-start",left:"flex-start",bottom:"flex-end",right:"flex-end",center:"center"},st={"flex-start":"top",center:"center","flex-end":"bottom"},ct={"flex-start":"left",center:"center","flex-end":"right"},dt=(e,t)=>{if(e&&t)return`${st[e]} ${ct[t]}`};var ut=e=>{let{attributes:t,setAttributes:l,currentSide:a}=e;const n=s.__experimentalBlockAlignmentMatrixControl||s.__experimentalBlockAlignmentMatrixToolbar;return(0,i.createElement)(s.BlockControls,null,("front"===a&&!Boolean(t.isInverted)||"back"===a&&Boolean(t.isInverted))&&(0,i.createElement)(c.Toolbar,null,(0,i.createElement)(n,{label:(0,o.__)("Change front side content position","otter-blocks"),value:dt(t.frontVerticalAlign,t.frontHorizontalAlign),onChange:e=>{const t=null==e?void 0:e.split(" ");l({frontVerticalAlign:null==it?void 0:it[null==t?void 0:t[0]],frontHorizontalAlign:null==it?void 0:it[null==t?void 0:t[1]]})}})))},bt=l(1150),mt=l(8065),pt=l(199),gt=l(5452);const ht=e=>(0,K.isNumber)(e)?(0,x.nT)((0,x.Yj)(e)):e,vt=[{name:"14",size:"14px",slug:"14"},{name:"16",size:"16px",slug:"16"},{name:"18",size:"18px",slug:"18"},{name:"24",size:"24px",slug:"24"}];var yt=e=>{var t,l,a,n,d,u,b;let{attributes:m,setAttributes:p,currentSide:g,setSide:h}=e;const[v,y]=(0,i.useState)("settings"),{responsiveSetAttributes:k,responsiveGetAttributes:f}=S(p);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:v,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:y}),(0,i.createElement)("div",null,"settings"===v&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Flip Settings","otter-blocks")},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Flip Direction","otter-blocks"),value:m.animType,options:[{label:(0,o.__)("Bottom to Top","otter-blocks"),value:"flipX"},{label:(0,o.__)("Top to Bottom","otter-blocks"),value:"flipX-rev"},{label:(0,o.__)("Left to Right","otter-blocks"),value:"flipY"},{label:(0,o.__)("Right to Left","otter-blocks"),value:"flipY-rev"}],onChange:e=>p({animType:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Invert the Sides","otter-blocks"),checked:m.isInverted,onChange:e=>p({isInverted:e}),help:(0,o.__)("Use this to display the back side first.","otter-blocks")})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Front Side Content","otter-blocks"),initialOpen:!1},(0,i.createElement)(E.Z,{label:(0,o.__)("Content Type","otter-blocks"),options:[{label:(0,o.__)("None","otter-blocks"),value:"none"},{label:(0,o.__)("Image","otter-blocks"),value:"image"}],value:null!==(t=null==m?void 0:m.frontContentType)&&void 0!==t?t:"none",onChange:e=>{const t={frontContentType:(0,K.isEmpty)(e)||"none"===e?void 0:e};((0,K.isEmpty)(e)||"none"===e)&&(t.frontMedia=void 0),p(t)}}),"image"===m.frontContentType&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Media Image","otter-blocks"),help:(0,o.__)("Set an image as showcase.","otter-blocks")},null!==(l=m.frontMedia)&&void 0!==l&&l.url?(0,i.createElement)(c.BaseControl,null,(0,i.createElement)("img",{src:m.frontMedia.url,alt:m.frontMedia.alt,style:{border:"2px solid var( --wp-admin-theme-color)",maxHeight:"250px"}}),(0,i.createElement)(c.Button,{isSecondary:!0,onClick:()=>p({frontMedia:void 0})},(0,o.__)("Remove image","otter-blocks"))):(0,i.createElement)(s.MediaPlaceholder,{labels:{title:(0,o.__)("Media Image","otter-blocks")},accept:"image/*",allowedTypes:["image"],value:m.frontMedia,onSelect:e=>{var t,l;console.log(e),p({frontMedia:(0,K.pick)(e,["id","alt","url"]),frontMediaHeight:(0,x.Yj)(null==e||null===(t=e.sizes)||void 0===t?void 0:t.medium.height),frontMediaWidth:(0,x.Yj)(null==e||null===(l=e.sizes)||void 0===l?void 0:l.medium.width)})}})),(0,i.createElement)(c.__experimentalUnitControl,{onChange:e=>p({frontMediaWidth:e}),label:(0,o.__)("Media Width","otter-blocks"),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,value:(0,x.Yj)(m.frontMediaWidth)}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{onChange:e=>p({frontMediaHeight:e}),label:(0,o.__)("Media Height","otter-blocks"),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,value:(0,x.Yj)(m.frontMediaHeight)}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Alignment","otter-blocks"),initialOpen:!1},(0,i.createElement)(E.Z,{label:(0,o.__)("Sides","otter-blocks"),options:[{label:(0,o.__)("Front","otter-blocks"),value:"front"},{label:(0,o.__)("Back","otter-blocks"),value:"back"}],value:g,onChange:h}),"front"===g&&!Boolean(m.isInverted)||"back"===g&&Boolean(m.isInverted)?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Vertical Alignment","otter-blocks")},(0,i.createElement)(pe.Z,{options:[{icon:r.alignTop,value:"flex-start"},{icon:r.alignCenter,value:"center"},{icon:r.alignBottom,value:"flex-end"}],value:null!==(a=m.frontVerticalAlign)&&void 0!==a?a:"center",onChange:e=>p({frontVerticalAlign:e})})),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Horizontal Alignment","otter-blocks")},(0,i.createElement)(pe.Z,{options:[{icon:bt.Z,value:"flex-start"},{icon:mt.Z,value:"center"},{icon:pt.Z,value:"flex-end"}],value:null!==(n=m.frontHorizontalAlign)&&void 0!==n?n:"center",onChange:e=>p({frontHorizontalAlign:e})}))):(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Vertical Alignment","otter-blocks")},(0,i.createElement)(pe.Z,{options:[{icon:r.alignTop,value:"flex-start"},{icon:r.alignCenter,value:"center"},{icon:r.alignBottom,value:"flex-end"}],value:m.backVerticalAlign,onChange:e=>p({backVerticalAlign:e})})))),"style"===v&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(M.Z,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:null!==(d=f([(0,K.isNumber)(m.width)?(0,x.Yj)(m.width):null==m?void 0:m.width,m.widthTablet,null==m?void 0:m.widthMobile]))&&void 0!==d?d:"100%",onChange:e=>k(e,["width","widthTablet","widthMobile"],m.width),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,allowReset:!0})),(0,i.createElement)(M.Z,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:null!==(u=f([(0,K.isNumber)(m.height)?(0,x.Yj)(m.height):null==m?void 0:m.height,m.heightTablet,null==m?void 0:m.heightMobile]))&&void 0!==u?u:"300px",onChange:e=>k(e,["height","heightTablet","heightMobile"],m.height),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,allowReset:!0,units:[{default:300,label:"px",value:"px"},{default:20,label:"em",value:"em"},{default:20,label:"rem",value:"rem"},{default:30,label:"vw",value:"vw"},{default:35,label:"vh",value:"vh"}]})),(0,i.createElement)(M.Z,{label:(0,o.__)("","otter-blocks")},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:null!==(b=f([null==m?void 0:m.padding,m.paddingTablet,null==m?void 0:m.paddingMobile]))&&void 0!==b?b:(0,K.isNumber)(m.padding)?(0,x.nT)((0,x.Yj)(m.padding)):(0,x.nT)("20px"),onChange:e=>{let t={};"object"==typeof e&&(t=Object.fromEntries(Object.entries((0,K.pick)(e,["top","bottom","left","right"])).filter((e=>{let[t,l]=e;return null!=l})))),(0,K.isEmpty)(t)&&(t=void 0),k((0,x.cg)(t,(0,x.nT)("20px")),["padding","paddingTablet","paddingMobile"])},allowReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography Front Side","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Title","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{value:(0,x.Yj)(m.titleFontSize),onChange:e=>p({titleFontSize:e}),fontSizes:[...vt,{name:"32",size:"32px",slug:"32"}],allowReset:!0})),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Description","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{value:ht(m.descriptionFontSize),onChange:e=>p({descriptionFontSize:e}),fontSizes:[...vt,{name:"28",size:"28px",slug:"28"}],allowReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Front Side","otter-blocks"),initialOpen:!1},(0,i.createElement)(gt.Z,{backgroundType:m.frontBackgroundType,backgroundColor:m.frontBackgroundColor,image:m.frontBackgroundImage,gradient:m.frontBackgroundGradient,focalPoint:m.frontBackgroundPosition,backgroundAttachment:m.frontBackgroundAttachment,backgroundRepeat:m.frontBackgroundRepeat,backgroundSize:m.frontBackgroundSize,changeBackgroundType:e=>p({frontBackgroundType:e}),changeImage:e=>{p({frontBackgroundImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>p({frontBackgroundImage:void 0}),changeColor:e=>p({frontBackgroundColor:e}),changeGradient:e=>p({frontBackgroundGradient:e}),changeBackgroundAttachment:e=>p({frontBackgroundAttachment:e}),changeBackgroundRepeat:e=>p({frontBackgroundRepeat:e}),changeFocalPoint:e=>p({frontBackgroundPosition:e}),changeBackgroundSize:e=>p({frontBackgroundSize:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Back Side","otter-blocks"),initialOpen:!1},(0,i.createElement)(gt.Z,{backgroundType:m.backBackgroundType,backgroundColor:m.backBackgroundColor,image:m.backBackgroundImage,gradient:m.backBackgroundGradient,focalPoint:m.backBackgroundPosition,backgroundAttachment:m.backBackgroundAttachment,backgroundRepeat:m.backBackgroundRepeat,backgroundSize:m.backBackgroundSize,changeBackgroundType:e=>p({backBackgroundType:e}),changeImage:e=>{p({backBackgroundImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>p({backBackgroundImage:void 0}),changeColor:e=>p({backBackgroundColor:e}),changeGradient:e=>p({backBackgroundGradient:e}),changeBackgroundAttachment:e=>p({backBackgroundAttachment:e}),changeBackgroundRepeat:e=>p({backBackgroundRepeat:e}),changeFocalPoint:e=>p({backBackgroundPosition:e}),changeBackgroundSize:e=>p({backBackgroundSize:e})})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:m.borderColor,onChange:e=>p({borderColor:e}),label:(0,o.__)("Border Color","otter-blocks")},{value:m.titleColor,onChange:e=>p({titleColor:e}),label:(0,o.__)("Title Color","otter-blocks")},{value:m.descriptionColor,onChange:e=>p({descriptionColor:e}),label:(0,o.__)("Description Color","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Width","otter-blocks"),values:(0,x.Dv)(ht(m.borderWidth),(0,x.nT)("3px")),onChange:e=>{p({borderWidth:(0,x.cg)(e,{left:"3px",right:"3px",bottom:"3px",top:"3px"})})},allowReset:!0}),(0,i.createElement)(c.__experimentalBoxControl,{id:"o-border-raduis-box",label:(0,o.__)("Border Radius","otter-blocks"),values:(0,x.Dv)(ht(m.borderRadius),(0,x.nT)("10px")),onChange:e=>{p({borderRadius:(0,x.cg)(e,{left:"10px",right:"10px",bottom:"10px",top:"10px"})})},allowReset:!0}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Shadow Properties","otter-blocks"),checked:m.boxShadow,onChange:e=>p({boxShadow:e})}),m.boxShadow&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Color","otter-blocks"),colorValue:m.boxShadowColor,onColorChange:e=>{var t,l;p({boxShadowColor:100>m.boxShadowColorOpacity&&null!==(t=m.boxShadowColor)&&void 0!==t&&t.includes("var(")?getComputedStyle(document.documentElement,null).getPropertyValue(null==e||null===(l=e.replace("var(",""))||void 0===l?void 0:l.replace(")","")):e})}}),(0,i.createElement)(X.Z,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:m.boxShadowColorOpacity,onChange:e=>{var t;const l={boxShadowColorOpacity:e};100>e&&null!==(t=m.boxShadowColor)&&void 0!==t&&t.includes("var(")&&(l.boxShadowColor=getComputedStyle(document.documentElement,null).getPropertyValue(m.boxShadowColor.replace("var(","").replace(")",""))),p(l)},min:0,max:100,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:m.boxShadowBlur,onChange:e=>p({boxShadowBlur:e}),min:0,max:100,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:m.boxShadowHorizontal,onChange:e=>p({boxShadowHorizontal:e}),min:-100,max:100,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:m.boxShadowVertical,onChange:e=>p({boxShadowVertical:e}),min:-100,max:100,allowReset:!0})))))),(0,i.createElement)(C.p,null))};const{attributes:kt}=rt;const{name:ft}=rt;(0,a.registerBlockType)(ft,{...rt,title:(0,o.__)("Flip Card","otter-blocks"),description:(0,o.__)("Make a card with a flip effect. Powered by Otter.","otter-blocks"),icon:xe.Z,keywords:["flip card","container","animation"],edit:e=>{var t,l,a,n,r,d,u,b,m,p,h,v,y,k,f,_;let{attributes:w,setAttributes:C,clientId:E,isSelected:S}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(E,kt);return()=>e(w.id)}),[w.id]);const[T,M]=(0,i.useState)("front"),B={"--width":void 0!==w.width&&(0,K.isNumber)(w.width)&&(0,x.Yj)(w.width)||w.width,"--width-tablet":w.widthTablet,"--width-mobile":w.widthMobile,"--height":void 0!==w.height&&(0,K.isNumber)(w.height)&&(0,x.Yj)(w.height)||w.height,"--height-tablet":w.heightTablet,"--height-mobile":w.heightMobile,"--border-width":void 0!==w.borderWidth&&(0,x.um)((0,x.Dv)((0,x.nT)((0,x.Yj)(w.borderWidth)),{left:"3px",right:"3px",bottom:"3px",top:"3px"})),"--border-color":w.borderColor,"--border-radius":void 0!==w.borderRadius&&(0,x.um)((0,x.Dv)((0,x.nT)((0,x.Yj)(w.borderRadius)),{left:"10px",right:"10px",bottom:"10px",top:"10px"})),"--front-background":(0,x.nG)([["gradient"===w.frontBackgroundType&&w.frontBackgroundGradient,w.frontBackgroundGradient],["image"===w.frontBackgroundType&&(null===(t=w.frontBackgroundImage)||void 0===t?void 0:t.url),`url( ${null===(l=w.frontBackgroundImage)||void 0===l?void 0:l.url} ) ${w.frontBackgroundRepeat||"repeat"} ${w.frontBackgroundAttachment||"scroll"} ${Math.round(null!==(a=null===(n=w.frontBackgroundPosition)||void 0===n?void 0:n.x)&&void 0!==a?a:50)}% ${Math.round(null!==(r=null===(d=w.frontBackgroundPosition)||void 0===d?void 0:d.y)&&void 0!==r?r:50)}%/${w.frontBackgroundSize||"auto"}`],[w.frontBackgroundColor]]),"--back-background":(0,x.nG)([["gradient"===w.backBackgroundType&&w.backBackgroundGradient,w.backBackgroundGradient],["image"===w.backBackgroundType&&(null===(u=w.backBackgroundImage)||void 0===u?void 0:u.url),`url( ${null===(b=w.backBackgroundImage)||void 0===b?void 0:b.url} ) ${w.backBackgroundRepeat||"repeat"} ${w.backBackgroundAttachment||"scroll"} ${Math.round(null!==(m=null===(p=w.backBackgroundPosition)||void 0===p?void 0:p.x)&&void 0!==m?m:50)}% ${Math.round(null!==(h=null===(v=w.backBackgroundPosition)||void 0===v?void 0:v.y)&&void 0!==h?h:50)}%/${w.backBackgroundSize||"auto"}`],[w.backBackgroundColor]]),"--box-shadow":w.boxShadow&&`${w.boxShadowHorizontal}px ${w.boxShadowVertical}px ${w.boxShadowBlur}px ${w.boxShadowColor?w.boxShadowColor.includes("#")&&null!=w&&w.boxShadowColorOpacity&&0<=w.boxShadowColorOpacity?Z()(w.boxShadowColor,w.boxShadowColorOpacity||1e-5):w.boxShadowColor:Z()("#000000",void 0!==w.boxShadowColorOpacity?w.boxShadowColorOpacity||1e-5:1)}`,"--front-vertical-align":w.frontVerticalAlign,"--front-horizontal-align":w.frontHorizontalAlign,"--back-vertical-align":w.backVerticalAlign,"--front-media-width":(0,x.Yj)(w.frontMediaWidth),"--front-media-height":(0,x.Yj)(w.frontMediaHeight),"--padding":void 0!==w.padding&&(0,K.isNumber)(w.padding)&&(0,x.Yj)(w.padding)||(0,x.um)(null==w?void 0:w.padding),"--padding-tablet":(0,x.um)(null==w?void 0:w.paddingTablet),"--padding-mobile":(0,x.um)(null==w?void 0:w.paddingMobile)},[z,P]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{P([`.o-flip-inner {\n\t\t\t\ttransform: ${"back"===T?"var( --flip-anim )":"unset"};\n\t\t\t}`,`.o-flip-front .o-flip-content h3 {\n\t\t\t\tcolor: ${w.titleColor};\n\t\t\t\t${w.titleFontSize&&`font-size: ${(0,x.Yj)(w.titleFontSize)}`}\n\t\t\t}`,`.o-flip-front .o-flip-content p {\n\t\t\t\tcolor: ${w.descriptionColor};\n\t\t\t\t${w.descriptionFontSize&&`font-size: ${(0,x.Yj)(w.descriptionFontSize)}`}\n\t\t\t}`])}),[T,w.titleFontSize,w.descriptionFontSize,w.titleColor,w.descriptionColor]);const R=(0,s.useBlockProps)({id:w.id,className:g()({flipX:"flipX"===w.animType,flipY:"flipY"===w.animType,"flipY-rev":"flipY-rev"===w.animType,"flipX-rev":"flipX-rev"===w.animType},z),style:B});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ut,{attributes:w,setAttributes:C,currentSide:T}),(0,i.createElement)(yt,{attributes:w,setAttributes:C,currentSide:T,setSide:M}),(0,i.createElement)("div",R,(0,i.createElement)("div",{className:g()("o-flip-inner",{invert:w.isInverted})},(0,i.createElement)("div",{className:"o-flip-front"},(0,i.createElement)("div",{className:"o-flip-content"},(null===(y=w.frontMedia)||void 0===y?void 0:y.url)&&(0,i.createElement)("img",{className:"o-img",srcSet:null===(k=w.frontMedia)||void 0===k?void 0:k.url}),(0,i.createElement)(s.RichText,{tagName:"h3",value:null!==(f=w.title)&&void 0!==f?f:"",onChange:e=>C({title:e}),placeholder:(0,o.__)("Insert a title","otter-blocks")}),(0,i.createElement)(s.RichText,{tagName:"p",value:null!==(_=w.description)&&void 0!==_?_:"",onChange:e=>C({description:e}),placeholder:(0,o.__)("Insert a description","otter-blocks")}))),(0,i.createElement)("div",{className:"o-flip-back"},(0,i.createElement)(s.InnerBlocks,{renderAppender:S?s.InnerBlocks.ButtonBlockAppender:void 0,template:[["core/heading",{content:"Lorem ipsum",level:3}],["core/paragraph",{content:"Tellus posuere sem fermentum facilisis platea."}],["core/buttons",{layout:{type:"flex",justifyContent:"center"},innerBlocks:[{name:"core/button",attributes:{className:"is-style-outline",text:"Learn more"}}]}]]}))),S&&(0,i.createElement)("div",{className:"o-switcher"},(0,i.createElement)(c.Button,{isPrimary:!0,onClick:()=>M("back"===T?"front":"back")},"back"===T?(0,o.__)("Flip to Front","otter-blocks"):(0,o.__)("Flip to Back","otter-blocks")))))},save:e=>{var t,l,o,a;let{attributes:n}=e;const r=s.useBlockProps.save({id:n.id,className:g()("anim",{flipX:"flipX"===n.animType,flipY:"flipY"===n.animType,"flipY-rev":"flipY-rev"===n.animType,"flipX-rev":"flipX-rev"===n.animType})});return(0,i.createElement)("div",r,(0,i.createElement)("div",{className:g()("o-flip-inner",{invert:n.isInverted})},(0,i.createElement)("div",{className:"o-flip-front"},(0,i.createElement)("div",{className:"o-flip-content"},(null===(t=n.frontMedia)||void 0===t?void 0:t.url)&&(0,i.createElement)("img",{className:"o-img",src:null===(l=n.frontMedia)||void 0===l?void 0:l.url,srcSet:null===(o=n.frontMedia)||void 0===o?void 0:o.url,alt:null===(a=n.frontMedia)||void 0===a?void 0:a.alt}),(0,i.createElement)(s.RichText.Content,{tagName:"h3",value:n.title}),(0,i.createElement)(s.RichText.Content,{tagName:"p",value:n.description}))),(0,i.createElement)("div",{className:"o-flip-back"},(0,i.createElement)(s.InnerBlocks.Content,null))))},example:{attributes:{}}});var _t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/font-awesome-icons","title":"Icon","category":"themeisle-blocks","description":"Add icons from Font Awesome or ThemeIsle Icons library to your website. Powered by Otter.","keywords":["font awesome","dashicons","icons"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"align":{"type":["string","object"]},"library":{"type":"string","default":"fontawesome"},"prefix":{"type":"string","default":"fab"},"icon":{"type":"string","default":"themeisle"},"link":{"type":"string"},"newTab":{"type":"boolean","default":false},"fontSize":{"type":["number","string"],"default":"16px"},"padding":{"type":"number","default":5},"margin":{"type":"number","default":5},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"borderColor":{"type":"string"},"backgroundColorHover":{"type":"string"},"textColorHover":{"type":"string"},"borderColorHover":{"type":"string"},"borderSize":{"type":"number","default":0},"borderRadius":{"type":"number","default":0},"isSynced":{"type":"array"}},"editorStyle":"otter-font-awesome-editor","style":"otter-font-awesome-style"}');const wt={prefix:{type:"string",default:"fab"},icon:{type:"string",default:"themeisle"},fontSize:{type:"number",default:16},padding:{type:"number",default:5},margin:{type:"number",default:5},backgroundColor:{type:"string"},textColor:{type:"string"},borderColor:{type:"string"},borderSize:{type:"number",default:0},borderRadius:{type:"number",default:0}},Ct=[{attributes:{id:{type:"string"},align:{type:"string"},library:{type:"string",default:"fontawesome"},prefix:{type:"string",default:"fab"},icon:{type:"string",default:"themeisle"},link:{type:"string"},newTab:{type:"boolean",default:!1},fontSize:{type:"number",default:16},padding:{type:"number",default:5},margin:{type:"number",default:5},backgroundColor:{type:"string"},textColor:{type:"string"},borderColor:{type:"string"},backgroundColorHover:{type:"string"},textColorHover:{type:"string"},borderColorHover:{type:"string"},borderSize:{type:"number",default:0},borderRadius:{type:"number",default:0},isSynced:{type:"array"}},supports:{align:["left","center","right"]},save:e=>{let{attributes:t}=e;const l=we.ZP.icons[t.icon],o=s.useBlockProps.save({id:t.id});return(0,i.createElement)("p",o,(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container"},t.link?(0,i.createElement)("a",{href:t.link,target:t.newTab?"_blank":"_self",rel:"noopener noreferrer"},"themeisle-icons"===t.library?(0,i.createElement)(l,null):(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`})):"themeisle-icons"===t.library?(0,i.createElement)(l,null):(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`})))}},{attributes:wt,supports:{align:["left","center","right"]},migrate:e=>{let t="center";return e.className.includes("alignleft")&&(t="left"),e.className.includes("aligncenter")&&(t="center"),e.className.includes("alignright")&&(t="right"),{...e,align:t,className:""}},save:e=>{let{attributes:t,className:l}=e;const o={borderRadius:t.borderRadius+"%",fontSize:t.fontSize+"px",padding:t.padding+"px"},a={color:t.textColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderRadius:t.borderRadius+"%",borderStyle:"solid",borderWidth:t.borderSize+"px",display:"inline-block",margin:t.margin+"px"};return(0,i.createElement)("p",{className:l,style:{textAlign:t.align}},(0,i.createElement)("span",{className:`${l}-container`,style:a},(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`,style:o})))}},{attributes:{...wt,align:{type:"string"}},save:e=>{let{attributes:t,className:l}=e;const o={borderRadius:t.borderRadius+"%",fontSize:t.fontSize+"px",padding:t.padding+"px"},a={color:t.textColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderRadius:t.borderRadius+"%",borderStyle:"solid",borderWidth:t.borderSize+"px",display:"inline-block",margin:t.margin+"px"};return(0,i.createElement)("p",{className:l,style:{textAlign:t.align}},(0,i.createElement)("span",{className:"undefined-container",style:a},(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`,style:o})))}},{attributes:{...wt,id:{type:"string"},align:{type:"string"},link:{type:"string"},newTab:{type:"boolean",default:!1},backgroundColorHover:{type:"string"},textColorHover:{type:"string"},borderColorHover:{type:"string"}},save:e=>{let{attributes:t,className:l}=e;const o={borderRadius:t.borderRadius+"%",borderStyle:"solid",borderWidth:t.borderSize+"px",display:"inline-block",margin:t.margin+"px"},a={borderRadius:t.borderRadius+"%",fontSize:t.fontSize+"px",padding:t.padding+"px"},n=()=>(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`,style:a});return(0,i.createElement)("p",{className:l,id:t.id,style:{textAlign:t.align}},(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container",style:o},t.link?(0,i.createElement)("a",{href:t.link,target:t.newTab?"_blank":"_self",style:{color:t.textColor},rel:"noopener noreferrer"},(0,i.createElement)(n,null)):(0,i.createElement)(n,null)))}}];var Et=Ct;const xt={left:"flex-start",center:"center",right:"flex-end","flex-start":"left","flex-end":"right"};var St=e=>{var t,l,o,a;let{attributes:n,setAttributes:r,isSelected:c}=e;const{responsiveSetAttributes:d,responsiveGetAttributes:u}=S(r);return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(s.AlignmentToolbar,{value:xt[null!==(t=u([null===(l=Lt(n.align))||void 0===l?void 0:l.desktop,null===(o=Lt(n.align))||void 0===o?void 0:o.tablet,null===(a=Lt(n.align))||void 0===a?void 0:a.mobile]))&&void 0!==t?t:"center"],onChange:e=>d(""===e?void 0:xt[e],["align.desktop","align.tablet","align.mobile"],Lt(n.align))}),(0,i.createElement)(ke.Z,{isSelected:c,setAttributes:r,url:n.link,opensInNewTab:n.newTab}))},Tt=l(3159);const Mt=[{name:(0,o.__)("Small","otter-blocks"),size:"16px",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"32px",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"48px",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"60px",slug:"xl"}];var Bt=e=>{var t,l,a,n,r;let{attributes:d,setAttributes:u,getValue:b}=e;const[m,p]=(0,i.useState)(!1),{responsiveSetAttributes:g,responsiveGetAttributes:h}=S(u);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Icon","otter-blocks")},(0,i.createElement)(_.Z,{label:(0,o.__)("Icon Picker","otter-blocks"),library:d.library,prefix:d.prefix,icon:d.icon,changeLibrary:e=>{u({library:e,icon:"fontawesome"===e?"themeisle":"balance",prefix:"fab"})},onChange:e=>{u("object"==typeof e?{icon:e.name,prefix:e.prefix}:{icon:e})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(Tt.Z,{field:"fontSize",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(c.FontSizePicker,{fontSizes:Mt,withReset:!0,value:null!==(t=d.fontSize)&&void 0!==t?t:"16px",onChange:e=>u({fontSize:e})})),(0,i.createElement)(Tt.Z,{field:"padding",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Padding","otter-blocks"),value:b("padding"),initialPosition:5,onChange:e=>u({padding:e}),step:.1,min:0,max:100})),(0,i.createElement)(Tt.Z,{field:"margin",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Margin","otter-blocks"),value:b("margin"),initialPosition:5,onChange:e=>u({margin:e}),step:.1,min:0,max:100})),(0,i.createElement)(M.Z,{label:(0,o.__)("Alignment","otter-blocks"),className:"buttons-alignment-control"},(0,i.createElement)(pe.Z,{value:null!==(l=h([null===(a=Lt(d.align))||void 0===a?void 0:a.desktop,null===(n=Lt(d.align))||void 0===n?void 0:n.tablet,null===(r=Lt(d.align))||void 0===r?void 0:r.mobile]))&&void 0!==l?l:"center",onChange:e=>g(""===e?void 0:e,["align.desktop","align.tablet","align.mobile"],Lt(d.align)),options:[{icon:bt.Z,label:(0,o.__)("Left","otter-blocks"),value:"flex-start"},{icon:mt.Z,label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:pt.Z,label:(0,o.__)("Right","otter-blocks"),value:"flex-end"}],hasIcon:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ButtonGroup,null,(0,i.createElement)(c.Button,{isSmall:!0,isSecondary:m,isPrimary:!m,onClick:()=>p(!1)},(0,o.__)("Normal","otter-blocks")),(0,i.createElement)(c.Button,{isSmall:!0,isSecondary:!m,isPrimary:m,onClick:()=>p(!0)},(0,o.__)("Hover","otter-blocks"))),m?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Tt.Z,{field:"backgroundColorHover",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Background","otter-blocks"),colorValue:b("backgroundColorHover"),onColorChange:e=>u({backgroundColorHover:e})})),(0,i.createElement)(Tt.Z,{field:"textColorHover",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Icon","otter-blocks"),colorValue:b("textColorHover"),onColorChange:e=>u({textColorHover:e})})),(0,i.createElement)(s.ContrastChecker,{textColor:b("textColorHover"),backgroundColor:b("backgroundColorHover")}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Border","otter-blocks"),colorValue:d.borderColorHover,onColorChange:e=>u({borderColorHover:e})})):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Tt.Z,{field:"backgroundColor",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Background","otter-blocks"),colorValue:b("backgroundColor"),onColorChange:e=>u({backgroundColor:e})})),(0,i.createElement)(Tt.Z,{field:"textColor",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Icon","otter-blocks"),colorValue:b("textColor"),onColorChange:e=>u({textColor:e})})),(0,i.createElement)(s.ContrastChecker,{textColor:b("textColor"),backgroundColor:b("backgroundColor")}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Border","otter-blocks"),colorValue:d.borderColor,onColorChange:e=>u({borderColor:e})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Size","otter-blocks"),value:d.borderSize,onChange:e=>u({borderSize:e}),step:.1,min:0,max:120}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),value:d.borderRadius,onChange:e=>u({borderRadius:e}),step:.1,min:0,max:100})))};const{attributes:zt}=_t,Pt={right:"flex-end",center:"center",left:"flex-start"},Lt=e=>{var t;return(0,K.isString)(e)?{desktop:null!==(t=null==Pt?void 0:Pt[e])&&void 0!==t?t:"center"}:e};const{name:Rt}=_t;(0,a.registerBlockType)(Rt,{..._t,title:(0,o.__)("Icon","otter-blocks"),description:(0,o.__)("Add icons from Font Awesome or ThemeIsle Icons library to your website. Powered by Otter.","otter-blocks"),icon:r.faIcon,keywords:["font awesome","dashicons","icons"],deprecated:Et,edit:e=>{var t,l,o;let{name:a,attributes:n,setAttributes:r,isSelected:c,clientId:d}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(d,zt);return()=>e(n.id)}),[n.id]);const u=we.ZP.icons[n.icon],b=e=>(0,L.getDefaultValueByField)({name:a,field:e,defaultAttributes:zt,attributes:n}),m={"--align":n.align,"--border-color":n.borderColor,"--border-size":void 0!==n.borderSize&&`${n.borderSize}px`,"--border-radius":void 0!==n.borderRadius&&`${n.borderRadius}%`,"--margin":void 0!==n.margin&&`${b("margin")}px`,"--padding":void 0!==n.padding&&`${b("padding")}px`,"--font-size":void 0!==n.fontSize&&((0,K.isNumber)(b("fontSize"))?`${b("fontSize")}px`:b("fontSize")),"--align":null===(t=Lt(n.align))||void 0===t?void 0:t.desktop,"--align-tablet":null===(l=Lt(n.align))||void 0===l?void 0:l.tablet,"--align-mobile":null===(o=Lt(n.align))||void 0===o?void 0:o.mobile},[p,g]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{g([`.wp-block-themeisle-blocks-font-awesome-icons-container {\n\t\t\t\tcolor: ${b("textColor")};\n\t\t\t\tbackground-color: ${b("backgroundColor")};\n\t\t\t}`,`.wp-block-themeisle-blocks-font-awesome-icons-container:hover {\n\t\t\t\tcolor: ${b("textColorHover")};\n\t\t\t\tbackground-color: ${b("backgroundColorHover")};\n\t\t\t\tborder-color: ${n.borderColorHover};\n\t\t\t}`,`.wp-block-themeisle-blocks-font-awesome-icons-container a {\n\t\t\t\tcolor: ${b("textColor")};\n\t\t\t}`,`.wp-block-themeisle-blocks-font-awesome-icons-container svg {\n\t\t\t\tfill: ${b("textColor")};\n\t\t\t}`,`.wp-block-themeisle-blocks-font-awesome-icons-container:hover svg {\n\t\t\t\tfill: ${b("textColorHover")};\n\t\t\t}`])}),[n.textColor,n.backgroundColor,n.textColorHover,n.backgroundColorHover,n.borderColorHover,n.fontSize]);const h=(0,s.useBlockProps)({id:n.id,style:m,className:p});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(St,{attributes:n,setAttributes:r,isSelected:c}),(0,i.createElement)(Bt,{attributes:n,setAttributes:r,getValue:b}),(0,i.createElement)("div",h,(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container"},"themeisle-icons"===n.library?(0,i.createElement)(u,null):(0,i.createElement)("i",{className:`${n.prefix} fa-${n.icon}`}))))},save:e=>{let{attributes:t}=e;const l=we.ZP.icons[t.icon],o=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",o,(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container"},t.link?(0,i.createElement)("a",{href:t.link,target:t.newTab?"_blank":"_self",rel:"noopener noreferrer"},"themeisle-icons"===t.library?(0,i.createElement)(l,null):(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`})):"themeisle-icons"===t.library?(0,i.createElement)(l,null):(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`})))},example:{attributes:{fontSize:70}}});var Ft=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/form","title":"Form","category":"themeisle-blocks","description":"Display a form for your clients. Powered by Otter.","keywords":["business","form","email"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"subject":{"type":"string"},"emailTo":{"type":"string"},"fromName":{"type":"string"},"optionName":{"type":"string"},"hasCaptcha":{"type":"boolean"},"provider":{"type":"string","default":""},"listId":{"type":"string"},"action":{"type":"string","default":"subscribe"},"submitLabel":{"type":"string"},"sendUserEmail":{"type":"boolean"},"redirectLink":{"type":"string"},"inputPadding":{"type":"object"},"labelColor":{"type":"string"},"helpLabelColor":{"type":"string"},"inputRequiredColor":{"type":"string"},"inputBorderRadius":{"type":"number"},"inputBorderColor":{"type":"string"},"inputBorderWidth":{"type":"number"},"submitMessage":{"type":"string"},"inputWidth":{"type":"number"},"submitMessageColor":{"type":"string"},"submitMessageErrorColor":{"type":"string"},"submitBackgroundColor":{"type":"string"},"submitBackgroundColorHover":{"type":"string"},"submitColor":{"type":"string"},"inputGap":{"type":"number"},"inputColor":{"type":"string"},"inputBackgroundColor":{"type":"string"},"inputsGap":{"type":"number"},"labelFontSize":{"type":"string"},"submitFontSize":{"type":"string"},"messageFontSize":{"type":"string"},"helpFontSize":{"type":"string"},"inputFontSize":{"type":"string"},"submitStyle":{"type":"string"},"isSynced":{"type":"array"}},"supports":{"align":["wide","full"]},"editorStyle":"otter-form-editor","style":"otter-form-style","script":"otter-form"}');const At=[{attributes:{id:{type:"string"},subject:{type:"string"},emailTo:{type:"string"},optionName:{type:"string"},hasCaptcha:{type:"boolean"},provider:{type:"string",default:""},apiKey:{type:"string"},listId:{type:"string"},action:{type:"string",default:"subscribe"}},supports:{align:["wide","full"]},save:e=>{let{attributes:t}=e;const l=t.provider&&t.apiKey&&t.listId,a=s.useBlockProps.save({id:t.id,className:g()({"is-subscription":l&&"subscribe"===t.action,"can-submit-and-subscribe":l&&"submit-subscribe"===t.action,"has-captcha":t.hasCaptcha}),"data-email-subject":t.subject,"data-option-name":t.optionName});return(0,i.createElement)("div",a,(0,i.createElement)("div",{className:"otter-form__container"},(0,i.createElement)(s.InnerBlocks.Content,null),(0,i.createElement)("div",{className:"wp-block-button"},(0,i.createElement)("button",{className:"wp-block-button__link"},"subscribe"===t.action?(0,o.__)("Subscribe","otter-blocks"):(0,o.__)("Submit","otter-blocks")))))}}];var Ht=At,Ot=l(8101),Nt=l.n(Ot),Vt=l(6989),It=l.n(Vt);const Dt=e=>(null==e?void 0:e[1])&&e[0]!==e[1],Gt=e=>Boolean(0<e.filter(Dt).length),$t=[{name:(0,o.__)("Small","otter-blocks"),size:"0.875em",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"1em",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"1.125em",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"1.25em",slug:"xl"}];var Wt=e=>{var t,l,a,n,r,d,u,b,m,p,g;let{attributes:h,setAttributes:v}=e;const{listIDOptions:y,setListIDOptions:k,saveFormEmailOptions:f,saveIntegration:_,savedFormOptions:w,sendTestEmail:C,loadingState:E,formOptions:x,setFormOption:S,testService:T,hasEmailField:M}=(0,i.useContext)(Ut),B=Gt([[x.emailTo,null==w?void 0:w.email],[x.subject,null==w?void 0:w.emailSubject],[x.redirectLink,null==w?void 0:w.redirectLink],[x.fromName,null==w?void 0:w.fromName],[x.submitMessage,null==w?void 0:w.submitMessage],[x.cc,null==w?void 0:w.cc],[x.bcc,null==w?void 0:w.bcc],[x.hasCaptcha,null==w?void 0:w.hasCaptcha]]),z=Gt([[x.provider,null==w||null===(t=w.integration)||void 0===t?void 0:t.provider],[x.listId,null==w||null===(l=w.integration)||void 0===l?void 0:l.listId],[x.action,null==w||null===(a=w.integration)||void 0===a?void 0:a.action]]);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Form Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:h.labelColor,onChange:e=>v({labelColor:e}),label:(0,o.__)("Label","otter-blocks")},{value:h.helpLabelColor,onChange:e=>v({helpLabelColor:e}),label:(0,o.__)("Help Label","otter-blocks")},{value:h.inputBorderColor,onChange:e=>v({inputBorderColor:e}),label:(0,o.__)("Border","otter-blocks")},{value:h.inputRequiredColor,onChange:e=>v({inputRequiredColor:e}),label:(0,o.__)("Label Required","otter-blocks")},{value:h.inputColor,onChange:e=>v({inputColor:e}),label:(0,o.__)("Input Text","otter-blocks")},{value:h.inputBackgroundColor,onChange:e=>v({inputBackgroundColor:e}),label:(0,o.__)("Input Background","otter-blocks")}]}),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Button Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:h.submitColor,onChange:e=>v({submitColor:e}),label:(0,o.__)("Submit Text","otter-blocks")},{value:h.submitBackgroundColor,onChange:e=>v({submitBackgroundColor:e}),label:(0,o.__)("Button Background","otter-blocks")},{value:h.submitBackgroundColorHover,onChange:e=>v({submitBackgroundColorHover:e}),label:(0,o.__)("Button Background on Hover","otter-blocks")},{value:h.submitMessageColor,onChange:e=>v({submitMessageColor:e}),label:(0,o.__)("Successful Message","otter-blocks")},{value:h.submitMessageErrorColor,onChange:e=>v({submitMessageErrorColor:e}),label:(0,o.__)("Error Message","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Label Styling","otter-blocks"),initialOpen:!1},(0,i.createElement)(Tt.Z,{field:"inputGap",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spacing","otter-blocks"),value:null!==(n=h.inputGap)&&void 0!==n?n:10,onChange:e=>v({inputGap:e}),allowReset:!0,step:.1,min:0,max:50,initialPositino:10})),(0,i.createElement)(Tt.Z,{field:"labelFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Font Size","otter-blocks"),fontSizes:$t,withReset:!0,value:h.labelFontSize,onChange:e=>v({labelFontSize:e})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Input Styling","otter-blocks"),initialOpen:!1},(0,i.createElement)(Tt.Z,{field:"inputFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Input Font Size","otter-blocks"),fontSizes:$t,withReset:!0,value:h.inputFontSize,onChange:e=>v({inputFontSize:e})})),(0,i.createElement)(Tt.Z,{field:"inputsGap",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Fields Spacing","otter-blocks"),value:null!==(r=h.inputsGap)&&void 0!==r?r:16,onChange:e=>v({inputsGap:e}),allowReset:!0,min:0,max:50,initialPosition:16})),(0,i.createElement)(Tt.Z,{field:"inputPadding",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Input Padding","otter-blocks"),values:null!==(d=h.inputPadding)&&void 0!==d?d:{top:"8px",right:"8px",bottom:"8px",left:"8px"},inputProps:{min:0,max:500},onChange:e=>v({inputPadding:e})})),(0,i.createElement)(Tt.Z,{field:"inputsBorderRadius",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),value:null!==(u=h.inputBorderRadius)&&void 0!==u?u:4,onChange:e=>v({inputBorderRadius:e}),allowReset:!0,step:.1,min:0,max:50})),(0,i.createElement)(Tt.Z,{field:"inputsBorderWidth",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Width","otter-blocks"),value:null!==(b=h.inputBorderWidth)&&void 0!==b?b:1,onChange:e=>v({inputBorderWidth:e}),allowReset:!0,step:.1,min:0,max:50})),(0,i.createElement)(Tt.Z,{field:"helpFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Help Text Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Help Font Size","otter-blocks"),fontSizes:$t,withReset:!0,value:h.helpFontSize,onChange:e=>v({helpFontSize:e})})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Button","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),placeholder:(0,o.__)("Submit","otter-blocks"),value:h.submitLabel,onChange:e=>v({submitLabel:e}),help:(0,o.__)("Set the label for the submit button.","otter-blocks")}),(0,i.createElement)(Tt.Z,{field:"submitFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Font Size","otter-blocks"),fontSizes:$t,withReset:!0,value:h.submitFontSize,onChange:e=>v({submitFontSize:e})})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Alignment","otter-blocks"),value:h.submitStyle,options:[{label:"Default",value:""},{label:"Right",value:"right"},{label:"Full",value:"full"}],onChange:e=>v({submitStyle:e})}),(0,i.createElement)(Tt.Z,{field:"messageFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Message Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Message Font Size","otter-blocks"),fontSizes:$t,withReset:!0,value:h.messageFontSize,onChange:e=>v({messageFontSize:e})})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Form Options","otter-blocks"),initialOpen:!1},"loading"===(null==E?void 0:E.formOptions)&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,i.createElement)(c.Spinner,null),(0,o.__)("Loading the options. Please wait...","otter-blocks")),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Email Subject","otter-blocks"),placeholder:(0,o.__)("A new submission","otter-blocks"),value:x.subject,onChange:e=>S({subject:e}),help:(0,o.__)("Customize the title of the email that you are gonna receive after a user submits the form.","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("From Name","otter-blocks"),value:x.fromName,onChange:e=>S({fromName:e}),help:(0,o.__)("Set the name of the sender. Some SMTP plugins might override this value.","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Email To","otter-blocks"),placeholder:(0,o.__)("Default is to admin site","otter-blocks"),type:"email",value:x.emailTo,onChange:e=>S({emailTo:e}),help:(0,o.__)("Send the form's data to another email. (Admin's email is default).","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Cc","otter-blocks"),placeholder:(0,o.__)("Send copies to","otter-blocks"),type:"text",value:x.cc,onChange:e=>S({cc:e}),help:(0,o.__)("Add emails separated by commas: example1@otter.com, example2@otter.com.","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Bcc","otter-blocks"),placeholder:(0,o.__)("Send copies to","otter-blocks"),type:"text",value:x.bcc,onChange:e=>S({bcc:e}),help:(0,o.__)("Add emails separated by commas: example1@otter.com, example2@otter.com.","otter-blocks")}),(0,i.createElement)(c.TextareaControl,{label:(0,o.__)("Submit Success Message","otter-blocks"),placeholder:(0,o.__)("Success","otter-blocks"),value:x.submitMessage,onChange:e=>S({submitMessage:e}),help:(0,o.__)("Show this message after the form was successfully submitted.","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Redirect To","otter-blocks"),type:"url",placeholder:(0,o.__)("https://example.com","otter-blocks"),value:x.redirectLink,onChange:e=>S({redirectLink:e}),help:(0,o.__)("Redirect the user to another page when submit is successful.","otter-blocks")}),x.redirectLink&&(0,i.createElement)(c.ExternalLink,{href:x.redirectLink,style:{marginBottom:"10px",display:"block"}},(0,o.__)("Preview Redirect link.","otter-blocks")),(0,i.createElement)(c.Button,{isPrimary:!0,onClick:f,help:(0,o.__)("[WIP] Do not forget to save the options ","otter-blocks"),isBusy:"saving"===(null==E?void 0:E.formOptions)},"saving"===(null==E?void 0:E.formOptions)?(0,o.__)("Saving...","otter-blocks"):(0,o.__)("Apply Options","otter-blocks")),"done"===(null==E?void 0:E.formOptions)&&B&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,o.__)("You have made some modifications. Do not forget to save the options.","otter-blocks")),"error"===(null==E?void 0:E.formOptions)&&(0,i.createElement)("div",{className:"o-fetch-msg o-error"},(0,o.__)("An error has occurred while saving. Please try again.","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Test SMTP","otter-blocks"),initialOpen:!1},(0,i.createElement)("span",null,(0,o.__)("In order for the Form to work properly, make sure your SMTP server is set up. The test email will be send to the address from the field Email To on Form Options.","otter-blocks")),(0,i.createElement)(c.ExternalLink,{href:"https://www.wpbeginner.com/wp-tutorials/how-to-use-smtp-server-to-send-wordpress-emails/",style:{marginLeft:"3px"}},(0,o.__)("Learn more.","otter-blocks")),(0,i.createElement)("br",null),(0,i.createElement)(c.Button,{variant:"primary",isPrimary:!0,style:{marginTop:"8px"},onClick:C},(0,o.__)("Send Test Email","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Bot Protection","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Add captcha checkbox","otter-blocks"),checked:h.hasCaptcha,onChange:e=>v({hasCaptcha:e}),help:(0,o.__)("Add Google reCaptcha V2 for protection againts bots. You will need an API Key.","otter-blocks")}),x.hasCaptcha&&(0,i.createElement)("div",{style:{display:"flow-root",margin:"10px 0px"}},(0,o.__)("You can change the reCaptcha API Keys in Settings > Otter. ","otter-blocks"),(0,i.createElement)(c.ExternalLink,{href:"https://www.google.com/recaptcha/about/",target:"_blank"},(0,o.__)("Learn more about reCaptcha.","otter-blocks")))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Marketing Integration","otter-blocks"),initialOpen:!1},(0,o.__)("Add your client email to a Digital Marketing provider.","otter-blocks"),(0,i.createElement)("br",null)," ",(0,i.createElement)("br",null),"loading"===(null==E?void 0:E.formIntegration)&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,i.createElement)(c.Spinner,null),(0,o.__)("Fetching data from server. Please wait.","otter-blocks")),(0,i.createElement)("b",null,(0,o.__)("You need to have at least one email field in your form. For multiple email fields, only the first will be used.","otter-blocks")),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Provider","otter-blocks"),value:x.provider,options:[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Mailchimp","otter-blocks"),value:"mailchimp"},{label:(0,o.__)("Sendinblue","otter-blocks"),value:"sendinblue"}],onChange:e=>{S({provider:e,listId:"",apiKey:""})}}),x.provider&&(0,i.createElement)(i.Fragment,null,!x.apiKey&&(0,i.createElement)(i.Fragment,null,"mailchimp"===(null==x?void 0:x.provider)&&(0,i.createElement)(c.ExternalLink,{href:"https://us5.admin.mailchimp.com/account/api/",style:{marginBottom:"10px",display:"block"},target:"_blank"},(0,o.__)("Guide to generate the API Key.","otter-blocks")),"sendinblue"===(null==x?void 0:x.provider)&&(0,i.createElement)(c.ExternalLink,{href:"https://help.sendinblue.com/hc/en-us/articles/209467485-What-s-an-API-key-and-how-can-I-get-mine-",style:{marginBottom:"10px",display:"block"},target:"_blank"},(0,o.__)("Guide to generate the API Key.","otter-blocks"))),(0,i.createElement)(c.TextControl,{label:(0,o.__)("API Key","otter-blocks"),help:(0,o.__)("You can find the key in the provider's website","otter-blocks"),value:x.apiKey?`*************************${x.apiKey.slice(-8)}`:"",onChange:e=>{k([]),S({listId:"",apiKey:e})}}),x.apiKey&&2>y.length&&"loading"===(null==E?void 0:E.listId)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Spinner,null),(0,o.__)("Loading the options.","otter-blocks"),(0,i.createElement)("br",null),(0,i.createElement)("br",null)),x.apiKey&&"error"===(null==E?void 0:E.listId)&&(0,i.createElement)(i.Fragment,null,(0,o.__)("Invalid API Key. Please check your API Key in the provider's Dashboard.","otter-blocks"),(0,i.createElement)(c.ExternalLink,{target:"_blank",style:{marginBottom:"10px",display:"block"},href:"sendinblue"===x.provider?"https://account.sendinblue.com/advanced/api":"https://us5.admin.mailchimp.com/account/api/"},(0,o.__)("Go to Dashboard.","otter-blocks"))),x.apiKey&&"timeout"===(null==E?void 0:E.listId)&&(0,i.createElement)("p",null,(0,o.__)("Could no connect to the server. Please try again.","otter-blocks")),x.apiKey&&"done"===(null==E?void 0:E.listId)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Contact List","otter-blocks"),value:x.listId,options:y,onChange:e=>S({listId:e})}),1>=(null==y?void 0:y.length)&&(0,i.createElement)("p",null,(0,o.__)("No Contact list found. Please create a list in your provider interface or check if the API key is correct.","otter-blocks")),2<=(null==y?void 0:y.length)&&x.listId&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Action","otter-blocks"),value:x.action,options:[{label:(0,o.__)("Default","otter-blocks"),value:""},{label:(0,o.__)("Subscribe","otter-blocks"),value:"subscribe"},{label:(0,o.__)("Submit & Subscribe","otter-blocks"),value:"submit-subscribe"}],onChange:e=>S({action:e})}),"submit-subscribe"===x.action&&(0,i.createElement)("div",{style:{marginBottom:"10px"}},(0,o.__)("This action will add the client to the contact list and send a separate email with the form data to administrator or to the email mentioned in 'Form to' field. A checkbox for data-sharing consent with third-party will be added on form.","otter-blocks"))))),(0,i.createElement)("div",{style:{display:"flex",flexDirection:"row",gap:"10px"}},(0,i.createElement)(c.Button,{isPrimary:!0,variant:"primary",onClick:_,isBusy:"saving"===(null==E?void 0:E.formIntegration)},"saving"===(null==E?void 0:E.formIntegration)?(0,o.__)("Saving","otter-blocks"):(0,o.__)("Save","otter-blocks")),h.optionName&&(null==w||null===(m=w.integration)||void 0===m?void 0:m.provider)&&(null==w||null===(p=w.integration)||void 0===p?void 0:p.apiKey)&&(null==w||null===(g=w.integration)||void 0===g?void 0:g.listId)&&(0,i.createElement)(c.Button,{isSecondary:!0,variant:"secondary",onClick:T,isBusy:"saving"===(null==E?void 0:E.serviceTesting)},(0,i.createElement)(i.Fragment,null,(0,o.__)("Test Service","otter-blocks")))),"done"===(null==E?void 0:E.formIntegration)&&z&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,o.__)("You have made some modifications. Do not forget to save the options.","otter-blocks")),"done"===(null==E?void 0:E.serviceTesting)&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,o.__)("Remember to delete the test email from your provider's contact list.","otter-blocks")),"done"===(null==E?void 0:E.formIntegration)&&(null==x?void 0:x.apiKey)&&(null==x?void 0:x.listId)&&!M&&(0,i.createElement)("div",{className:"o-fetch-msg o-error"},(0,o.__)("Please add a Text Field with Email as type in your form for email registration.","otter-blocks")),"error"===(null==E?void 0:E.formIntegration)&&(0,i.createElement)("div",{className:"o-fetch-msg o-error"},(0,o.__)("An error has occurred while saving. Please try again.","otter-blocks"))))},Zt=e=>{let{className:t,loadingState:l,isSaving:a,saveAPIKey:n,siteKey:r,secretKey:s,setSiteKey:d,setSecretKey:u}=e;if("loading"===(null==l?void 0:l.captcha))return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("br",null),(0,i.createElement)(c.Placeholder,null,(0,i.createElement)("div",null,(0,i.createElement)(c.Spinner,null),(0,o.__)("Checking the API Keys for reCaptcha","otter-blocks"))));const b=s&&0<(null==s?void 0:s.length)-13?Array(s.length-13).fill("*").join("")+s.slice(-13):s;return(0,i.createElement)(c.Placeholder,{icon:"admin-site",label:(0,o.__)("Google reCaptcha","otter-blocks"),instructions:(0,o.__)("A Google reCaptcha V2 API keys are required, please enter one below.","otter-blocks"),className:t},(0,i.createElement)("div",{className:"components-placeholder__actions",style:{width:"100%"}},(0,i.createElement)(c.TextControl,{type:"text",label:(0,o.__)("Site Key","otter-blocks"),value:r,className:"components-placeholder__input",onChange:d}),(0,i.createElement)(c.TextControl,{type:"text",label:(0,o.__)("Secret Key","otter-blocks"),value:b,className:"components-placeholder__input",onChange:u}),(0,i.createElement)(c.Button,{isPrimary:!0,type:"submit",onClick:n,isBusy:a,disabled:""===r||""===s},(0,o.__)("Save","otter-blocks"))),(0,i.createElement)("div",{className:"components-placeholder__learn-more",style:{margin:"10px 0px"}},(0,o.__)("You need to activate reCaptcha API.","otter-blocks")," ",(0,i.createElement)(c.ExternalLink,{href:"http://www.google.com/recaptcha/admin"},(0,o.__)("Need an API key? Get one here.","otter-blocks"))))};const{attributes:jt}=Ft,Ut=(0,i.createContext)({});var qt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/form-input","title":"Text Field","category":"themeisle-blocks","description":"Display a contact form for your clients.","keywords":["input","text","email"],"ancestor":["themeisle-blocks/form"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"type":{"type":"string","default":"text"},"label":{"type":"string"},"placeholder":{"type":"string"},"isRequired":{"type":"boolean"},"mappedName":{"type":"string"},"labelColor":{"type":"string"},"inputWidth":{"type":"number"},"helpText":{"type":"string"}},"supports":{"align":["wide","full"]}}'),Jt=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Field Type","otter-blocks"),value:t.type,options:[{label:(0,o.__)("Text","otter-blocks"),value:"text"},{label:(0,o.__)("Email","otter-blocks"),value:"email"},{label:(0,o.__)("Date","otter-blocks"),value:"date"},{label:(0,o.__)("Number","otter-blocks"),value:"number"}],onChange:e=>l({type:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),value:t.label,onChange:e=>l({label:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Placeholder","otter-blocks"),value:t.placeholder,onChange:e=>l({placeholder:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Help Text","otter-blocks"),value:t.helpText,onChange:e=>l({helpText:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Required","otter-blocks"),help:(0,o.__)("If enabled, the input field must be filled out before submitting the form.","otter-blocks"),checked:t.isRequired,onChange:e=>l({isRequired:e})})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:t.labelColor,onChange:e=>l({labelColor:e}),label:(0,o.__)("Label Color","otter-blocks")}]}))};const{attributes:Kt}=qt;const Yt=[{attributes:{id:{type:"string"},type:{type:"string",default:"text"},label:{type:"string"},placeholder:{type:"string"},isRequired:{type:"boolean"},mappedName:{type:"string"}},supports:{align:["wide","full"]},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save();return(0,i.createElement)("div",l,(0,i.createElement)("label",{htmlFor:t.id,className:"otter-form-input-label"},(0,i.createElement)(s.RichText.Content,{value:t.label,className:"otter-form-input-label__label",tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,i.createElement)("input",{type:t.type,name:t.mappedName,id:t.id,required:t.isRequired,placeholder:t.placeholder,className:"otter-form-input"}))}}];var Qt=Yt;const{name:Xt}=qt;window.themeisleGutenberg.isAncestorTypeAvailable||(qt.parent=["themeisle-blocks/form"]),(0,a.registerBlockType)(Xt,{...qt,title:(0,o.__)("Text Field","otter-blocks"),description:(0,o.__)("Display a contact form for your clients.","otter-blocks"),icon:r.inputIcon,deprecated:Qt,keywords:["input","text","email"],variations:[{name:"themeisle-blocks/form-input-email",description:(0,o.__)("Insert an email field","otter-blocks"),icon:"email",title:(0,o.__)("Email Field","otter-blocks"),attributes:{type:"email"}},{name:"themeisle-blocks/form-input-number",description:(0,o.__)("Insert a number field","otter-blocks"),icon:"calculator",title:(0,o.__)("Number Field","otter-blocks"),attributes:{type:"number"}},{name:"themeisle-blocks/form-input-date",description:(0,o.__)("Insert a date field","otter-blocks"),icon:"calendar-alt",title:(0,o.__)("Date Field","otter-blocks"),attributes:{type:"date"}}],edit:e=>{let{attributes:t,setAttributes:l,clientId:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,Kt);return()=>e(t.id)}),[t.id]);const n=(0,s.useBlockProps)(),r=(0,i.useRef)(null),c=(0,i.useRef)(null),d=(0,i.useRef)(null);return(0,i.useEffect)((()=>{var e,l,o,a,n,i,s;c.current&&(null===(e=c.current)||void 0===e||null===(l=e.style)||void 0===l||l.setProperty("--input-width",(o=t.inputWidth)?o+"%":null)),r.current&&(null===(a=r.current)||void 0===a||null===(n=a.style)||void 0===n||n.setProperty("--label-color",t.labelColor||null)),d.current&&(null===(i=d.current)||void 0===i||null===(s=i.style)||void 0===s||s.setProperty("--label-color",t.labelColor||null))}),[c.current,r.current,d.current,t.labelColor,t.inputWidth]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Jt,{attributes:t,setAttributes:l}),(0,i.createElement)("div",n,(0,i.createElement)("label",{ref:r,htmlFor:t.id,className:"otter-form-input-label"},(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Type here…","otter-blocks"),className:"otter-form-input-label__label",value:t.label,onChange:e=>l({label:e}),tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},"*")),(0,i.createElement)("input",{ref:c,type:t.type,placeholder:t.placeholder,name:t.id,id:t.id,required:t.isRequired,disabled:!0,className:"otter-form-input components-text-control__input"}),t.helpText&&(0,i.createElement)("span",{className:"o-form-help",ref:d},t.helpText)))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",l,(0,i.createElement)("label",{htmlFor:t.id?t.id+"-input":"",className:"otter-form-input-label"},(0,i.createElement)(s.RichText.Content,{value:t.label,className:"otter-form-input-label__label",tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},"*")),(0,i.createElement)("input",{type:t.type,name:t.mappedName,id:t.id?t.id+"-input":"",required:t.isRequired,placeholder:t.placeholder,className:"otter-form-input"}),t.helpText&&(0,i.createElement)("span",{className:"o-form-help"},t.helpText))}});var el=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/form-nonce","title":"Nonce Field","category":"themeisle-blocks","description":"Protect the form from CSRF.","keywords":["protection","csrf","field"],"textdomain":"otter-blocks","attributes":{"formId":{"type":"string"}},"supports":{"align":["wide","full"],"inserter":false}}');const{name:tl}=el;(0,a.registerBlockType)(tl,{...el,title:(0,o.__)("Nonce Field","otter-blocks"),description:(0,o.__)("Protect the form from CSRF.","otter-blocks"),icon:r.inputIcon,keywords:["protection","csrf","field"],edit:e=>{let{setAttributes:t,clientId:l}=e;const{parent:o}=(0,v.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:o}=e("core/block-editor");return{parent:t(o(l))}}),[]);return(0,i.useEffect)((()=>{o&&t({formId:o.attributes.id})}),[o]),null},save:()=>null});var ll=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/form-textarea","title":"Textarea Field","category":"themeisle-blocks","description":"Display a contact form for your clients.","keywords":["textarea","message","input"],"ancestor":["themeisle-blocks/form"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"isRequired":{"type":"boolean"},"mappedName":{"type":"string"},"labelColor":{"type":"string"},"inputWidth":{"type":"number"},"helpText":{"type":"string"}},"supports":{"align":["wide","full"]}}'),ol=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),value:t.label,onChange:e=>l({label:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Placeholder","otter-blocks"),value:t.placeholder,onChange:e=>l({placeholder:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Help Text","otter-blocks"),value:t.helpText,onChange:e=>l({helpText:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Required","otter-blocks"),help:(0,o.__)("If enabled, the input field must be filled out before submitting the form.","otter-blocks"),checked:t.isRequired,onChange:e=>l({isRequired:e})})))};const{attributes:al}=ll;const nl=[{attributes:{id:{type:"string"},type:{type:"string",default:"text"},label:{type:"string"},placeholder:{type:"string"},isRequired:{type:"boolean"},mappedName:{type:"string"}},supports:{align:["wide","full"]},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save();return(0,i.createElement)("div",l,(0,i.createElement)("label",{htmlFor:t.id,className:"otter-form-textarea-label"},(0,i.createElement)(s.RichText.Content,{value:t.label,className:"otter-form-textarea-label__label",tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,i.createElement)("textarea",{name:t.mappedName,id:t.id,required:t.isRequired,placeholder:t.placeholder,rows:10,className:"otter-form-textarea-input"}))}}];var rl=nl;const{name:il}=ll;window.themeisleGutenberg.isAncestorTypeAvailable||(ll.parent=["themeisle-blocks/form"]),(0,a.registerBlockType)(il,{...ll,title:(0,o.__)("Textarea Field","otter-blocks"),description:(0,o.__)("Display a contact form for your clients.","otter-blocks"),icon:r.inputIcon,deprecated:rl,keywords:["textarea","message","input"],edit:e=>{let{attributes:t,setAttributes:l,clientId:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,al);return()=>e(t.id)}),[t.id]);const n=(0,s.useBlockProps)(),r=(0,i.useRef)(null),c=(0,i.useRef)(null),d=(0,i.useRef)(null);return(0,i.useEffect)((()=>{var e,l,o,a,n,i,s;c.current&&(null===(e=c.current)||void 0===e||null===(l=e.style)||void 0===l||l.setProperty("--input-width",(o=t.inputWidth)?o+"%":o)),r.current&&(null===(a=r.current)||void 0===a||null===(n=a.style)||void 0===n||n.setProperty("--label-color",t.labelColor||null)),d.current&&(null===(i=d.current)||void 0===i||null===(s=i.style)||void 0===s||s.setProperty("--label-color",t.labelColor||null))}),[c.current,r.current,t]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ol,{attributes:t,setAttributes:l}),(0,i.createElement)("div",n,(0,i.createElement)("label",{ref:r,htmlFor:t.id?t.id+"-input":"",className:"otter-form-textarea-label"},(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Type here…","otter-blocks"),className:"otter-form-textarea-label__label",value:t.label,onChange:e=>l({label:e}),tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},"*")),(0,i.createElement)("textarea",{ref:c,placeholder:t.placeholder,name:t.id,id:t.id?t.id+"-input":"",required:t.isRequired,disabled:!0,rows:10,className:"otter-form-textarea-input components-textarea-control__input"}),t.helpText&&(0,i.createElement)("span",{className:"o-form-help",ref:d},t.helpText)))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",l,(0,i.createElement)("label",{htmlFor:t.id?t.id+"-input":"",className:"otter-form-textarea-label"},(0,i.createElement)(s.RichText.Content,{value:t.label,className:"otter-form-textarea-label__label",tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},"*")),(0,i.createElement)("textarea",{name:t.mappedName,id:t.id?t.id+"-input":"",required:t.isRequired,placeholder:t.placeholder,rows:10,className:"otter-form-textarea-input"}),t.helpText&&(0,i.createElement)("span",{className:"o-form-help"},t.helpText))}});const{name:sl}=Ft;(0,a.registerBlockType)(sl,{...Ft,title:(0,o.__)("Form","otter-blocks"),description:(0,o.__)("Display a form for your clients. Powered by Otter.","otter-blocks"),icon:r.contactIcon,keywords:["business","form","email"],edit:e=>{let{attributes:t,setAttributes:l,clientId:n,isSelected:r,name:c}=e;const[d,u]=(0,i.useState)(""),[b,m]=(0,i.useState)(""),[p,h]=(0,i.useState)({formOptions:"done",formIntegration:"done",listId:"init",captcha:"init",serviceTesting:"init"}),y=e=>{h((t=>({...t,...e})))},[k,f]=(0,i.useState)({provider:void 0,redirectLink:void 0,fromName:void 0,emailTo:void 0,subject:void 0,email:void 0,listId:void 0,action:void 0,hasCaptcha:void 0,submitMessage:void 0,apiKey:void 0,cc:void 0,bcc:void 0}),[_,w]=(0,i.useState)(!0),[C,E]=(0,i.useState)([{label:(0,o.__)("None","otter-blocks"),value:""}]),{insertBlock:x,removeBlock:S}=(0,v.useDispatch)("core/block-editor"),{replaceInnerBlocks:T}=(0,v.useDispatch)("core/block-editor"),{createNotice:M}=(0,v.dispatch)("core/notices"),B=(0,v.useSelect)((e=>0<e("core/block-editor").getBlocks(n).length),[n]),{blockType:z,defaultVariation:P,variations:R}=(0,v.useSelect)((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:o}=e("core/blocks");return{blockType:l(c),defaultVariation:o(c,"block"),variations:t(c,"block")}}),[c]),{children:F,hasEmailField:A}=(0,v.useSelect)((e=>{const{getBlock:t}=e("core/block-editor"),l=t(n).innerBlocks;return{children:l,hasEmailField:null==l?void 0:l.some((e=>{var t;return"email"===(null==e||null===(t=e.attributes)||void 0===t?void 0:t.type)}))}}));(0,i.useEffect)((()=>{const e=(0,L.blockInit)(n,jt);return()=>e(t.id)}),[t.id]),(0,i.useEffect)((()=>{var e;t.id&&(0,v.select)("core/edit-widgets")?l({optionName:`widget_${t.id.slice(-8)}`}):t.id&&Boolean(window.themeisleGutenberg.isBlockEditor)&&null!==(e=(0,v.select)("core/editor"))&&void 0!==e&&e.getCurrentPostId()&&l({optionName:`${(0,v.select)("core/editor").getCurrentPostId()}_${t.id.slice(-8)}`})}),[t.id]),(0,i.useEffect)((()=>{if(F){const e=F.filter((e=>{let{name:t}=e;return"themeisle-blocks/form-nonce"===t}));if(2<=(null==e?void 0:e.length))e.slice(1).forEach((e=>{S(e.clientId,!1)}));else if(0===(null==e?void 0:e.length)&&n){const e=(0,a.createBlock)("themeisle-blocks/form-nonce");e&&(null==x||x(e,(null==F?void 0:F.length)||0,n,!1))}}}),[F]);const H=e=>null==e?void 0:e.filter((e=>{let{form:l}=e;return l===t.optionName})).pop(),O=e=>{var t,l,o,a;f({emailTo:null==e?void 0:e.email,fromName:null==e?void 0:e.fromName,redirectLink:null==e?void 0:e.redirectLink,subject:null==e?void 0:e.emailSubject,cc:null==e?void 0:e.cc,bcc:null==e?void 0:e.bcc,submitMessage:null==e?void 0:e.submitMessage,provider:null==e||null===(t=e.integration)||void 0===t?void 0:t.provider,apiKey:null==e||null===(l=e.integration)||void 0===l?void 0:l.apiKey,listId:null==e||null===(o=e.integration)||void 0===o?void 0:o.listId,action:null==e||null===(a=e.integration)||void 0===a?void 0:a.action,hasCaptcha:null==e?void 0:e.hasCaptcha})};(0,i.useEffect)((()=>{let e=new AbortController;const l=setTimeout((()=>{y({formOptions:"done",formIntegration:"done"})}),3e3);return t.optionName&&Nt().loadPromise.then((()=>{y({formOptions:"loading",formIntegration:"loading"}),(new(Nt().models.Settings)).fetch({signal:e.signal}).done((t=>{e=null;const o=H(t.themeisle_blocks_form_emails);o&&(O(o),w(o)),y({formIntegration:"done",formOptions:"done"}),clearTimeout(l)})).catch((()=>{y({formIntegration:"done",formOptions:"done"}),clearTimeout(l)}))})),()=>{var t;null===(t=e)||void 0===t||t.abort(),clearTimeout(l)}}),[t.optionName]),(0,i.useEffect)((()=>{let e,t=new AbortController;return k.apiKey&&k.provider&&(e=setTimeout((()=>y({listId:"timeout"})),6e3),y({listId:"loading"}),It()({path:"otter/v1/form/editor",method:"POST",data:{handler:"listId",payload:{provider:k.provider,apiKey:k.apiKey,action:k.action}},signal:t.signal}).then((l=>{if(t=null,clearTimeout(e),null!=l&&l.success){var a;const e=(null==l||null===(a=l.list_id)||void 0===a?void 0:a.map((e=>{var t;return{label:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}})))||[];e.splice(0,0,{label:(0,o.__)("None","otter-blocks"),value:""}),E(e),y({listId:"done"});const t=1===e.map((e=>{let{value:t}=e;return t})).filter((e=>e===k.listId)).length;k.listId&&!t&&M("error",(0,o.__)("The current contact list is invalid. Please choose a new contact list.","otter-blocks"),{isDismissible:!0,type:"snackbar"})}else M("error",null==l?void 0:l.error,{isDismissible:!0,type:"snackbar",id:"themeisle-form-server-error"}),y({listId:"error"})})).catch((e=>{console.error(e),y({listId:"error"})}))),()=>{var l;null===(l=t)||void 0===l||l.abort(),clearTimeout(e)}}),[k.apiKey,k.provider]),(0,i.useEffect)((()=>{let e=new AbortController;if(void 0!==t.hasCaptcha&&t.optionName)try{var l,a;null===(l=new(Nt().models.Settings))||void 0===l||null===(a=l.current)||void 0===a||a.fetch({signal:e.signal}).done((l=>{e=null;const a=l.themeisle_blocks_form_emails?l.themeisle_blocks_form_emails:[];let n=!0,r=!1;null==a||a.forEach(((e,l)=>{let{form:o}=e;o===t.optionName&&(a[l].hasCaptcha!==t.hasCaptcha&&(r=!0),a[l].hasCaptcha=t.hasCaptcha,n=!1)})),n&&a.push({form:t.optionName,hasCaptcha:t.hasCaptcha}),(n||r)&&(new(Nt().models.Settings)({themeisle_blocks_form_emails:a}).save(),M("info",(0,o.__)("Form preferences have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"}))}))}catch(e){console.warn(e.message)}return()=>{var t;return null===(t=e)||void 0===t?void 0:t.abort()}}),[t.hasCaptcha,t.optionName]),(0,i.useEffect)((()=>{let e=new AbortController;return t.hasCaptcha&&"init"===(null==p?void 0:p.captcha)&&(()=>{y({captcha:"loading"});try{var t;null===(t=new(Nt().models.Settings))||void 0===t||t.fetch({signal:e.signal}).then((t=>{e=null,""!==t.themeisle_google_captcha_api_site_key&&""!==t.themeisle_google_captcha_api_secret_key?y({captcha:"done"}):(y({captcha:"missing"}),u(t.themeisle_google_captcha_api_site_key),m(t.themeisle_google_captcha_api_secret_key))})).catch((e=>{console.error(e),y({captcha:"error"})}))}catch(e){console.warn(e.message),y({captcha:"error"})}})(),()=>{var t;return null===(t=e)||void 0===t?void 0:t.abort()}}),[p.captcha,t.hasCaptcha]);const N={"--message-font-size":void 0!==t.messageFontSize&&t.messageFontSize,"--input-font-size":void 0!==t.inputFontSize&&t.inputFontSize,"--help-font-size":void 0!==t.helpFontSize&&t.helpFontSize,"--input-color":t.inputColor,"--padding":(V=t.inputPadding,V?V.top+" "+V.right+" "+V.bottom+" "+V.left:null),"--border-radius":void 0!==t.inputBorderRadius&&t.inputBorderRadius+"px","--border-width":void 0!==t.inputBorderWidth&&t.inputBorderWidth+"px","--border-color":t.inputBorderColor,"--label-color":t.labelColor,"--input-width":void 0!==t.inputWidth&&t.inputWidth+"%","--submit-color":t.submitColor,"--required-color":t.inputRequiredColor,"--input-gap":void 0!==t.inputGap&&t.inputGap+"px","--inputs-gap":void 0!==t.inputsGap&&t.inputsGap+"px","--label-font-size":void 0!==t.labelFontSize&&t.labelFontSize,"--submit-font-size":void 0!==t.submitFontSize&&t.submitFontSize,"--help-label-color":t.helpLabelColor,"--input-bg-color":t.inputBackgroundColor};var V;const[I,D]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{D([`.otter-form__container .wp-block-button__link {\n\t\t\t\tbackground-color: ${t.submitBackgroundColor}\n\t\t\t}`,`.otter-form__container .wp-block-button__link:hover {\n\t\t\t\t${t.submitBackgroundColorHover&&`background-color: ${t.submitBackgroundColorHover}`}\n\t\t\t}`])}),[t.submitBackgroundColor,t.submitBackgroundColorHover]);const G=(0,s.useBlockProps)({id:t.id,style:N,className:I});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Ut.Provider,{value:{savedFormOptions:_,listIDOptions:C,setListIDOptions:E,saveFormEmailOptions:()=>{y({formOptions:"saving"}),(new(Nt().models.Settings)).fetch().done((e=>{const l=e.themeisle_blocks_form_emails?e.themeisle_blocks_form_emails:[];let a=!0,n=!1;null==l||l.forEach(((e,o)=>{let{form:r}=e;r===t.optionName&&(n=l[o].email!==k.emailTo||l[o].redirectLink!==k.redirectLink||l[o].emailSubject!==k.subject||l[o].submitMessage!==k.submitMessage||l[o].fromName!==k.fromName||l[o].cc!==k.cc||l[o].bcc!==k.bcc,l[o].email=k.emailTo,l[o].redirectLink=k.redirectLink,l[o].emailSubject=k.subject,l[o].submitMessage=k.submitMessage,l[o].fromName=k.fromName,l[o].cc=k.cc,l[o].bcc=k.bcc,a=!1)})),a&&l.push({form:t.optionName,email:k.emailTo,fromName:k.fromName,redirectLink:k.redirectLink,emailSubject:k.subject,submitMessage:k.submitMessage,cc:k.cc,bcc:k.bcc}),a||n?new(Nt().models.Settings)({themeisle_blocks_form_emails:l}).save().then((e=>{const t=H(e.themeisle_blocks_form_emails);t?(O(t),w(t),y({formOptions:"done"}),M("info",(0,o.__)("Form options have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"})):y({formOptions:"error"})})):y({formOptions:"done"})})).catch((()=>y({formOptions:"error"})))},formOptions:k,setFormOption:e=>{f((t=>({...t,...e})))},saveIntegration:()=>{var e;y({formIntegration:"saving"}),null===(e=new(Nt().models.Settings))||void 0===e||e.fetch().done((e=>{const a=e.themeisle_blocks_form_emails?e.themeisle_blocks_form_emails:[];let n=!0,r=!1;null==a||a.forEach(((e,l)=>{let{form:o}=e;var i,s,c,d,u;o===t.optionName&&(null!==(i=a[l])&&void 0!==i&&i.integration||(a[l].integration={}),r=(null===(s=a[l].integration)||void 0===s?void 0:s.provider)!==k.provider||(null===(c=a[l].integration)||void 0===c?void 0:c.listId)!==k.listId||(null===(d=a[l].integration)||void 0===d?void 0:d.action)!==k.action||(null===(u=a[l].integration)||void 0===u?void 0:u.apiKey)!==k.apiKey,n=!1,a[l].integration.provider=k.provider,a[l].integration.apiKey=k.apiKey,a[l].integration.listId=k.listId,a[l].integration.action=k.action)})),n&&a.push({form:t.optionName,integration:{provider:k.provider,apiKey:k.apiKey,listId:k.listId,action:k.action}}),n||r?new(Nt().models.Settings)({themeisle_blocks_form_emails:a}).save().then((e=>{const t=H(e.themeisle_blocks_form_emails);var a;t&&(O(t),w(t),l({action:null==t||null===(a=t.integration)||void 0===a?void 0:a.action})),y({formIntegration:"done"}),r&&M("info",(0,o.__)("Integration details have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"})})).catch((e=>{console.error(e),y({formIntegration:"error"})})):y({formIntegration:"done"})})).catch((()=>{y({formIntegration:"error"})}))},sendTestEmail:()=>{It()({path:"otter/v1/form/editor",method:"POST",data:{handler:"testEmail",payload:{provider:"default",to:null==k?void 0:k.emailTo,site:window.location.href}}}).then((e=>{null!=e&&e.success?M("info",(0,o.__)("The test email has been send. Check your emails for confirmation.","otter-blocks"),{isDismissible:!0,type:"snackbar"}):M("error",(0,o.__)("An error has occurred: ","otter-blocks")+((null==e?void 0:e.error)||(0,o.__)("unknown","otter-blocks")),{isDismissible:!0,type:"snackbar"})})).catch((e=>{console.error(e),M("error",null==e?void 0:e.message,{isDismissible:!0,type:"snackbar"})}))},loadingState:p,testService:()=>{y({serviceTesting:"loading"}),It()({path:"otter/v1/form/editor",method:"POST",data:{handler:"testEmail",payload:{formOption:t.optionName}}}).then((e=>{null!=e&&e.success?(M("info",(0,o.__)("A test email has been registered to your contact list. Check your provider for confirmation.","otter-blocks"),{isDismissible:!0,type:"snackbar"}),y({serviceTesting:"done"})):(M("error",(0,o.__)("An error has occurred: ","otter-blocks")+((null==e?void 0:e.error)||(0,o.__)("unknown","otter-blocks")+(0,o.__)(". Check your provider for confirmation.","otter-blocks")),{isDismissible:!0,type:"snackbar"}),y({serviceTesting:"error"}))})).catch((e=>{console.error(e),M("error",null==e?void 0:e.message,{isDismissible:!0,type:"snackbar"}),y({testService:"error"})}))},hasEmailField:A}},(0,i.createElement)(Wt,{attributes:t,setAttributes:l}),(0,i.createElement)("div",G,B?(0,i.createElement)("form",{className:"otter-form__container",onSubmit:()=>!1},(0,i.createElement)(s.InnerBlocks,null),t.hasCaptcha&&"done"!==(null==p?void 0:p.captcha)&&(0,i.createElement)(Zt,{className:"otter-form-captcha",loadingState:p,saveAPIKey:()=>{y({captcha:"loading"});try{var e,t,l;const a=new(Nt().models.Settings)({themeisle_google_captcha_api_site_key:d,themeisle_google_captcha_api_secret_key:b});null==a||null===(e=a.save)||void 0===e||null===(t=e.call(a))||void 0===t||null===(l=t.then((e=>{""!==e.themeisle_google_captcha_api_site_key&&""!==e.themeisle_google_captcha_api_secret_key?y({captcha:"done"}):y({captcha:"missing"}),m(""),u(""),M("info",(0,o.__)("Google reCaptcha API Keys have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"}).catch((e=>{console.error(e),y({captcha:"error"})}))})))||void 0===l||l.catch((e=>{console.error(e),y({captcha:"error"})}))}catch(e){console.warn(e.message),y({captcha:"error"})}},siteKey:d,secretKey:b,setSiteKey:u,setSecretKey:m}),"submit-subscribe"===t.action&&(0,i.createElement)("div",{className:"otter-form-consent"},(0,i.createElement)("input",{id:"o-consent",name:"o-consent",type:"checkbox"}),(0,i.createElement)("label",{htmlFor:"o-consent"},(0,o.__)("I have read and agreed the privacy statement.","otter-blocks"))),(0,i.createElement)("div",{className:g()("wp-block-button has-submit-msg",{right:"right"===t.submitStyle},{full:"full"===t.submitStyle})},(0,i.createElement)("button",{className:"wp-block-button__link",type:"submit",disabled:!0},t.submitLabel?t.submitLabel:(0,o.__)("Submit","otter-blocks")),r&&(0,i.createElement)("div",null,(0,i.createElement)("div",{className:"o-form-server-response o-success",style:{color:t.submitMessageColor}},k.submitMessage||(0,o.__)("Success","otter-blocks")),(0,i.createElement)("div",{className:"o-form-server-response o-error",style:{color:t.submitMessageErrorColor,margin:"0px"}},(0,o.__)("Error. Please try again.","otter-blocks"))))):(0,i.createElement)(s.__experimentalBlockVariationPicker,{icon:(0,K.get)(z,["icon","src"]),label:(0,K.get)(z,["title"]),variations:R,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;e&&T(n,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,className:g()({"can-submit-and-subscribe":"submit-subscribe"===t.action,"has-captcha":t.hasCaptcha}),"data-option-name":t.optionName});return(0,i.createElement)("div",l,(0,i.createElement)("form",{className:"otter-form__container"},(0,i.createElement)(s.InnerBlocks.Content,null),(0,i.createElement)("div",{className:g()("wp-block-button",{right:"right"===t.submitStyle},{full:"full"===t.submitStyle})},(0,i.createElement)("button",{className:"wp-block-button__link",type:"submit"},t.submitLabel?t.submitLabel:(0,o.__)("Submit","otter-blocks")))))},deprecated:Ht,example:{attributes:{},innerBlocks:[{name:"themeisle-blocks/form-input",attributes:{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}},{name:"themeisle-blocks/form-input",attributes:{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}},{name:"themeisle-blocks/form-textarea",attributes:{label:(0,o.__)("Message","otter-blocks")}},{name:"core/paragraph",attributes:{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}}]},variations:[{name:"themeisle-blocks/form-contact",description:(0,o.__)("Contact form for clients","otter-blocks"),icon:r.contactIcon,title:(0,o.__)("Contact Form","otter-blocks"),innerBlocks:[["themeisle-blocks/form-input",{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}],["themeisle-blocks/form-input",{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}],["themeisle-blocks/form-textarea",{label:(0,o.__)("Message","otter-blocks")}],["core/paragraph",{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}]]},{name:"themeisle-blocks/form-subscribe",description:(0,o.__)("Add the clients to your subscription list","otter-blocks"),icon:r.contactIcon,title:(0,o.__)("Subscribe Form","otter-blocks"),innerBlocks:[["themeisle-blocks/form-input",{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}],["themeisle-blocks/form-input",{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}],["core/paragraph",{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}]]}]});var cl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/google-map","title":"Google Maps","category":"themeisle-blocks","description":"Display Google Maps on your website with Google Map block. Powered by Otter.","keywords":["map","google","orbitfox"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"style":{"type":"string","default":"standard"},"location":{"type":"string","default":"La Sagrada Familia, Barcelona, Spain"},"latitude":{"type":"string"},"longitude":{"type":"string"},"type":{"type":"string","default":"roadmap"},"zoom":{"type":"number","default":15},"height":{"type":["number","string"],"default":"400px"},"heightTablet":{"type":"string"},"heightMobile":{"type":"string"},"draggable":{"type":"boolean","default":true},"mapTypeControl":{"type":"boolean","default":true},"zoomControl":{"type":"boolean","default":true},"fullscreenControl":{"type":"boolean","default":true},"streetViewControl":{"type":"boolean","default":true},"markers":{"type":"array","default":[]}},"supports":{"align":["wide","full"],"html":false},"editorStyle":"otter-google-map-editor","style":"otter-google-map-style","script":"google-maps"}'),dl=l(4586),ul=e=>{let{api:t,error:l,isAPILoaded:a,isAPISaved:n,isSaving:r,changeAPI:s,saveAPIKey:d}=e;return a?n?void 0:(0,i.createElement)(c.Placeholder,{icon:"admin-site",label:(0,o.__)("Google Maps","otter-blocks"),instructions:(0,o.__)("A Google Maps API key is required, please enter one below.","otter-blocks")},(0,i.createElement)("div",{className:"components-placeholder__actions"},(0,i.createElement)(c.TextControl,{type:"text",placeholder:(0,o.__)("Google Maps API Key","otter-blocks"),value:t,className:g()("components-placeholder__input",{"is-invalid":l}),onChange:s}),(0,i.createElement)(c.Button,{isPrimary:!0,type:"submit",onClick:d,isBusy:r,disabled:""===t||l},(0,o.__)("Save","otter-blocks"))),(0,i.createElement)("div",{className:"components-placeholder__learn-more"},l&&(0,i.createElement)("p",null,(0,o.__)("The API key could not be validated.","otter-blocks")),(0,i.createElement)("p",null,(0,o.__)("You need to activate Maps and Places API.","otter-blocks")," ",(0,i.createElement)(c.ExternalLink,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},(0,o.__)("Need an API key? Get one here.","otter-blocks"))))):(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null),(0,o.__)("Loading…","otter-blocks"))},bl=l(5241);const ml=e=>{let{value:t,onChange:l}=e;const a=(0,Y.useInstanceId)(ml);(0,i.useEffect)((()=>{window.wp.oldEditor.initialize(r.current.id,{tinymce:{classic_block_editor:!0,plugins:"lists,media,paste,tabfocus,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wpdialogs,wptextpattern,wpview",toolbar1:"formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_add_media"}});const e=window.tinymce.get(r.current.id);return e.on("change",(()=>l(e.getContent()))),()=>window.wp.oldEditor.remove(r.current.id)}),[]);const n=`inspector-textarea-control-${a}`,r=(0,i.useRef)(null);return(0,i.createElement)(c.BaseControl,{id:n,label:(0,o.__)("Description","otter-blocks")},(0,i.createElement)("textarea",{id:n,className:"components-textarea-control__input",rows:4,value:t,onChange:e=>l(e.target.value),ref:r}))};var pl=ml,gl=e=>{let{marker:t,isOpen:l,isPlaceAPIAvailable:a,openMarker:n,removeMarker:r,changeMarkerProp:s}=e;const d=(0,i.useRef)(null);return(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker"},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker-title-area"},(0,i.createElement)(c.Button,{className:"wp-block-themeisle-blocks-google-map-marker-title",onClick:()=>n(t.id)},t.title||(0,o.__)("Custom Marker","otter-blocks")),(0,i.createElement)(c.Button,{icon:"no-alt",label:(0,o.__)("Remove Marker","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-google-map-marker-remove",onClick:()=>r(t.id)})),(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-google-map-marker-control-area",{opened:t.id===l})},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Location","otter-blocks"),id:`themeisle-location-search-${t.id}`},(0,i.createElement)("input",{type:"text",id:`themeisle-location-search-${t.id}`,placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:t.location,className:"wp-block-themeisle-blocks-google-map-search",ref:d,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const l=new window.google.maps.places.SearchBox(d.current);l.addListener("places_changed",(()=>{const e=l.getPlaces();e&&0<e.length&&e.forEach((e=>{const l=e.formatted_address||e.name,o=e.geometry.location.lat(),a=e.geometry.location.lng();s(t.id,"location",l),s(t.id,"latitude",o),s(t.id,"longitude",a)}))}))},onChange:e=>s(t.id,"location",e.target.value),disabled:!a}),!a&&(0,i.createElement)("p",null,(0,o.__)("To enable locations earch, please ensure Places API is activated in the Google Developers Console.","otter-blocks")+" ",(0,i.createElement)(c.ExternalLink,{href:"https://developers.google.com/places/web-service/intro"},(0,o.__)("More info.","otter-blocks")))),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:t.latitude,onChange:e=>s(t.id,"latitude",e)}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:t.longitude,onChange:e=>s(t.id,"longitude",e)}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Map Icon","otter-blocks"),value:t.icon||"https://maps.google.com/mapfiles/ms/icons/red-dot.png",options:[{label:(0,o.__)("Red","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/red-dot.png"},{label:(0,o.__)("Blue","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/blue-dot.png"},{label:(0,o.__)("Yellow","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/yellow-dot.png"},{label:(0,o.__)("Green","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/green-dot.png"},{label:(0,o.__)("Orange","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/orange-dot.png"}],onChange:e=>s(t.id,"icon",e)}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:t.title,onChange:e=>s(t.id,"title",e)}),(0,i.createElement)(pl,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:t.description,onChange:e=>s(t.id,"description",e)})))},hl=e=>{let{initialOpen:t,markers:l,isPlaceAPIAvailable:a,addMarker:n,removeMarker:r,changeMarkerProp:s}=e;(0,i.useEffect)((()=>{!1!==t&&u(t)}),[t]);const[d,u]=(0,i.useState)(null),b=e=>{d===e&&(e=null),u(e)};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker-group"},l.map((e=>(0,i.createElement)(gl,{key:e.id,marker:e,isOpen:d,isPlaceAPIAvailable:a,openMarker:b,removeMarker:r,changeMarkerProp:s})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-google-map-marker-add",onClick:n},(0,o.__)("Add Marker","otter-blocks")))},vl=e=>{let{attributes:t,setAttributes:l,map:a,changeStyle:n,isPlaceAPIAvailable:r,isMarkerOpen:d,setMarkerOpen:u,removeMarker:b,changeMarkerProp:m,addMarkerManual:p,api:g,isSaving:h,changeAPI:v,saveAPIKey:y}=e;const[f,_]=(0,i.useState)("settings"),{responsiveSetAttributes:E,responsiveGetAttributes:x}=S(l),T=(0,i.useRef)(null);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:f,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:_}),"settings"===f&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Location","otter-blocks")},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Location"),id:"wp-block-themeisle-blocks-google-map-search"},(0,i.createElement)("input",{type:"text",id:"wp-block-themeisle-blocks-google-map-search",placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:t.location,className:"wp-block-themeisle-blocks-google-map-search",ref:T,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const t=new window.google.maps.places.SearchBox(T.current);t.addListener("places_changed",(()=>{const e=t.getPlaces();e&&0<e.length&&e.forEach((e=>{const t=e.geometry.location.lat(),o=e.geometry.location.lng(),n=new window.google.maps.LatLng(t,o);a.setCenter(n),l({location:e.formatted_address||e.name,latitude:t.toString(),longitude:o.toString()})}))}))},onChange:e=>{l({location:e.target.value})},disabled:!r}),!r&&(0,i.createElement)("p",null,(0,o.__)("To enable locations earch, please ensure Places API is activated in the Google Developers Console.","otter-blocks")+" ",(0,i.createElement)(c.ExternalLink,{href:"https://developers.google.com/places/web-service/intro"},(0,o.__)("More info.","otter-blocks")))),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter latitude…","otter-blocks"),value:t.latitude,onChange:e=>{l({latitude:e.toString()});const o=Number(e),{longitude:n}=t,r=new window.google.maps.LatLng(o,n);a.setCenter(r)}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter longitude","otter-blocks"),value:t.longitude,onChange:e=>{l({longitude:e.toString()});const{latitude:o}=t,n=Number(e),r=new window.google.maps.LatLng(o,n);a.setCenter(r)}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Positioning & Zooming","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Map Zoom Level","otter-blocks"),value:t.zoom,onChange:e=>{l({zoom:e}),a.setZoom(e)},min:0,max:20}),(0,i.createElement)(M.Z,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:x([(B=t.height,(0,K.isNumber)(B)?(e=>e?`${e}px`:e)(B):B),t.heightTablet,t.heightMobile]),onChange:e=>E(e,["height","heightTablet","heightMobile"])}),(0,i.createElement)(k.Z,{values:["height","heightTablet","heightMobile"],setAttributes:l}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Controls","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.BaseControl,null,(0,o.__)("The following changes will not affect block preview during the editing process. You can click outside the block to see the changes take effect.","otter-blocks")),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Draggable Map","otter-blocks"),checked:t.draggable,onChange:()=>{l({draggable:!t.draggable})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Map Type Control","otter-blocks"),checked:t.mapTypeControl,onChange:()=>{l({mapTypeControl:!t.mapTypeControl})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Zoom Control","otter-blocks"),checked:t.zoomControl,onChange:()=>{l({zoomControl:!t.zoomControl})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Full Screen Control","otter-blocks"),checked:t.fullscreenControl,onChange:()=>{l({fullscreenControl:!t.fullscreenControl})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Street View Control","otter-blocks"),checked:t.streetViewControl,onChange:()=>{l({streetViewControl:!t.streetViewControl})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Markers","otter-blocks"),initialOpen:!1,opened:!1!==d||void 0,onToggle:()=>{!1!==d&&u(!0)}},(0,i.createElement)(hl,{markers:t.markers,removeMarker:b,changeMarkerProp:m,addMarker:p,isPlaceAPIAvailable:r,initialOpen:d})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Global Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Google Maps API Key","otter-blocks"),type:"text",placeholder:(0,o.__)("Google Maps API Key","otter-blocks"),value:g,className:"components-placeholder__input",onChange:v,help:(0,o.__)("Changing the API key effects all Google Map Embed blocks. You will have to refresh the page after changing your API keys.","otter-blocks")}),(0,i.createElement)(c.Button,{isSecondary:!0,type:"submit",onClick:y,isBusy:h},(0,o.__)("Save API Key","otter-blocks")))),"style"===f&&(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Styles","otter-blocks")},(0,i.createElement)(bl.V,{value:t.style,options:[{label:(0,o.__)("Standard","otter-blocks"),value:"standard",image:window.themeisleGutenberg.assetsPath+"/icons/map-standard.png"},{label:(0,o.__)("Silver","otter-blocks"),value:"silver",image:window.themeisleGutenberg.assetsPath+"/icons/map-silver.png"},{label:(0,o.__)("Retro","otter-blocks"),value:"retro",image:window.themeisleGutenberg.assetsPath+"/icons/map-retro.png"},{label:(0,o.__)("Dark","otter-blocks"),value:"dark",image:window.themeisleGutenberg.assetsPath+"/icons/map-dark.png"},{label:(0,o.__)("Night","otter-blocks"),value:"night",image:window.themeisleGutenberg.assetsPath+"/icons/map-night.png"},{label:(0,o.__)("Aubergine","otter-blocks"),value:"aubergine",image:window.themeisleGutenberg.assetsPath+"/icons/map-aubergine.png"}],onChange:n}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Map Type","otter-blocks"),value:t.type,options:[{label:(0,o.__)("Road Map","otter-blocks"),value:"roadmap"},{label:(0,o.__)("Satellite View","otter-blocks"),value:"satellite"},{label:(0,o.__)("Hybrid","otter-blocks"),value:"hybrid"},{label:(0,o.__)("Terrain","otter-blocks"),value:"terrain"}],onChange:e=>{l({type:e}),a.setMapTypeId(window.google.maps.MapTypeId[e.toUpperCase()])}})),(0,i.createElement)(C.p,null));var B},yl=e=>{let{marker:t,isAdvanced:l,isPlaceAPIAvailable:a,addMarker:n,close:r}=e;(0,i.useEffect)((()=>{u(t.id),m(t.location),g(t.title),v(t.icon),k(t.description),_(t.latitude),C(t.longitude)}),[t]);const s=(0,i.useRef)(null),[d,u]=(0,i.useState)(t.id),[b,m]=(0,i.useState)(t.location),[p,g]=(0,i.useState)(t.title),[h,v]=(0,i.useState)(t.icon),[y,k]=(0,i.useState)(t.description),[f,_]=(0,i.useState)(t.latitude),[w,C]=(0,i.useState)(t.longitude);return(0,i.createElement)(c.Modal,{title:(0,o.__)("Add Marker","otter-blocks"),onRequestClose:r,shouldCloseOnClickOutside:!1},l&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Location","otter-blocks"),id:`themeisle-location-search-${t.id}`},(0,i.createElement)("input",{type:"text",id:`themeisle-location-search-${d}`,placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:b,className:"wp-block-themeisle-blocks-google-map-search",ref:s,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const t=new window.google.maps.places.SearchBox(s.current);t.addListener("places_changed",(()=>{const e=t.getPlaces();e&&0<e.length&&e.forEach((e=>{const t=e.formatted_address||e.name,l=e.geometry.location.lat(),o=e.geometry.location.lng();m(t),_(l),C(o)}))}))},onChange:e=>m(e.target.value),disabled:!a})),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:f,onChange:_}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:w,onChange:C})),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:p,onChange:g}),(0,i.createElement)(pl,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:y,onChange:k}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Map Icon","otter-blocks"),value:h||"https://maps.google.com/mapfiles/ms/icons/red-dot.png",options:[{label:(0,o.__)("Red","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/red-dot.png"},{label:(0,o.__)("Blue","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/blue-dot.png"},{label:(0,o.__)("Yellow","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/yellow-dot.png"},{label:(0,o.__)("Green","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/green-dot.png"},{label:(0,o.__)("Orange","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/orange-dot.png"}],onChange:v}),(0,i.createElement)(c.ButtonGroup,null,(0,i.createElement)(c.Button,{isPrimary:!0,onClick:()=>n(b,p,h,y,f,w)},(0,o.__)("Add","otter-blocks")),(0,i.createElement)(c.Button,{isSecondary:!0,onClick:r},(0,o.__)("Cancel","otter-blocks"))))},kl=e=>{let{attributes:t,initMap:l,displayMap:a,isMapLoaded:n,selectMarker:r,isSelectingMarker:s}=e;(0,i.useEffect)((()=>{a&&l()}),[a]);const{responsiveGetAttributes:d}=S();return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{id:t.id,className:g()("wp-block-themeisle-blocks-google-map-container",{"is-selecting-marker":s}),style:{height:d([(u=t.height,(0,K.isNumber)(u)?(e=>e?`${e}px`:e)(u):u),t.heightTablet,t.heightMobile])}}),n&&(0,i.createElement)(c.Button,{className:"wp-block-themeisle-blocks-google-map-marker-button",title:(0,o.__)("Add Button","otter-blocks"),onClick:r},(0,i.createElement)("span",{className:"dashicons dashicons-sticky"})));var u},fl={standard:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"administrative.land_parcel",elementType:"geometry.stroke",stylers:[{color:"#dcd2be"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#ae9e90"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#93817c"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#447530"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#fdfcf8"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#e98d58"}]},{featureType:"road.highway.controlled_access",elementType:"geometry.stroke",stylers:[{color:"#db8555"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#806b63"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"transit.line",elementType:"labels.text.fill",stylers:[{color:"#8f7d77"}]},{featureType:"transit.line",elementType:"labels.text.stroke",stylers:[{color:"#ebe3cd"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#92998d"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#64779e"}]},{featureType:"administrative.province",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#023e58"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#6f9ba5"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#3C7680"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#255763"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#b0d5ce"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{color:"#023e58"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"transit",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"transit.line",elementType:"geometry.fill",stylers:[{color:"#283d6a"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#3a4762"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]};const{attributes:_l}=cl;const wl={to:[{type:"block",blocks:["themeisle-blocks/leaflet-map"],transform:e=>{const t=(0,K.omit)(e,["style","mapTypeControl","fullscreenControl","streetViewControl"]);return(0,a.createBlock)("themeisle-blocks/leaflet-map",{...t})}}]};var Cl=wl;const{name:El}=cl;(0,a.registerBlockType)(El,{...cl,title:(0,o.__)("Google Maps","otter-blocks"),description:(0,o.__)("Display Google Maps on your website with Google Map block. Powered by Otter.","otter-blocks"),icon:r.mapIcon,keywords:["map","google","orbitfox"],transforms:Cl,edit:e=>{let{attributes:t,setAttributes:l,clientId:a,isSelected:n}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,_l);return()=>e(t.id)}),[t.id]),(0,i.useEffect)((()=>{let e=!0;return(async()=>{await window.wp.api.loadPromise.then((()=>{c.current=new window.wp.api.models.Settings})),!1===Boolean(window.themeisleGutenberg.mapsAPI)?v||c.current.fetch().then((t=>{e&&(h(t.themeisle_google_map_block_api_key),y(!0),""!==t.themeisle_google_map_block_api_key&&(f(!0),G(t.themeisle_google_map_block_api_key)))})):!v&&e&&(h(window.themeisleGutenberg.mapsAPI),y(!0),f(!0),G(window.themeisleGutenberg.mapsAPI))})(),window.isMapLoaded=window.isMapLoaded||!1,window[`removeMarker_${a.substr(0,8)}`]=j,window.gm_authFailure=function(){f(!1),D(!0)},d.current=document.createElement("script"),d.current.type="text/javascript",d.current.async=!0,d.current.defer=!0,d.current.id="themeisle-google-map-api-loading",()=>{e=!1}}),[]),(0,i.useEffect)((()=>{!1!==k&&void 0!==window.google&&u.current.setOptions({mapTypeControl:!!n||t.mapTypeControl,zoomControl:!!n||t.zoomControl,fullscreenControl:!!n||t.fullscreenControl,streetViewControl:!!n||t.streetViewControl})}),[n]),(0,i.useEffect)((()=>{m.current=[...t.markers]}),[t.markers]);const r=(0,i.useRef)([]),c=(0,i.useRef)(null),d=(0,i.useRef)(null),u=(0,i.useRef)(null),b=(0,i.useRef)(null),m=(0,i.useRef)([...t.markers]),[p,h]=(0,i.useState)(""),[v,y]=(0,i.useState)(!1),[k,f]=(0,i.useState)(!1),[_,w]=(0,i.useState)(!1),[C,E]=(0,i.useState)(!1),[x,S]=(0,i.useState)(!0),[T,M]=(0,i.useState)(!1),[B,z]=(0,i.useState)(!1),[P,R]=(0,i.useState)(!1),[F,A]=(0,i.useState)(!1),[H,O]=(0,i.useState)(!1),[N,V]=(0,i.useState)({}),[I,D]=(0,i.useState)(!1),G=e=>{window.isMapLoaded||(window.isMapLoaded=!0,d.current.onload=()=>{document.getElementById("themeisle-google-map-api-loading").id="themeisle-google-map-api",M(!0)},d.current.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=places&cache=${Math.random()}`,document.head.appendChild(d.current)),document.getElementById("themeisle-google-map-api")&&M(!0)},$=(e,t,l,n)=>{const r=`<div class="wp-block-themeisle-blocks-map-overview"><h6 class="wp-block-themeisle-blocks-map-overview-title">${l}</h6><div class="wp-block-themeisle-blocks-map-overview-content">${n?`<p>${n}</p>`:""}<a class="wp-block-themeisle-blocks-map-overview-delete" onclick="removeMarker_${a.substr(0,8)}( '${t}' )">${(0,o.__)("Delete Marker","otter-blocks")}</a></div></div>`,i=new window.google.maps.InfoWindow({content:r});e.addListener("click",(()=>{b.current=i,i.open(u.current,e)})),window.google.maps.event.addListener(i,"domready",(()=>{z(t)})),window.google.maps.event.addListener(i,"closeclick",(()=>{z(!1)}))},W=e=>{e.forEach((e=>{const{latitude:t}=e,{longitude:l}=e,o=new window.google.maps.LatLng(t,l),a=new window.google.maps.Marker({position:o,map:u.current,title:e.title,draggable:!0,icon:e.icon||"https://maps.google.com/mapfiles/ms/icons/red-dot.png"});window.google.maps.event.addListener(a,"dragend",(t=>{const l=t.latLng.lat(),o=t.latLng.lng();Z(e.id,"latitude",l),Z(e.id,"longitude",o)})),r.current.push(a),window.google.maps.event.addListener(a,"click",(()=>{b.current&&b.current.close()})),$(a,e.id,e.title,e.description)}))},Z=(e,t,o)=>{const a=[...m.current];a.find((t=>t.id===e))[t]=o.toString(),U(),W(a),l({markers:a})},j=e=>{let t=[...m.current];t=t.filter((t=>t.id!==e)),l({markers:t}),U(),z(!1),0<t.length&&W(t)},U=()=>{for(let e=0;e<r.current.length;e++)r.current[e].setMap(null);r.current=[]},q=()=>{!1===Boolean(window.themeisleGutenberg.mapsAPI)&&(E(!0),new window.wp.api.models.Settings({themeisle_google_map_block_api_key:p}).save().then((e=>{let t=!1;""!==e.themeisle_google_map_block_api_key&&(t=!0),E(!1),f(t),""!==e.themeisle_google_map_block_api_key&&(window.isMapLoaded=!1,G(e.themeisle_google_map_block_api_key))})))},J=e=>{l({style:e}),u.current.setOptions({styles:fl[e]})},K=(0,s.useBlockProps)({className:g()("wp-block-themeisle-blocks-google-map-resizer",{"is-focused":n})});return v&&k?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(bl.d,{label:(0,o.__)("Block Styles","otter-blocks"),value:t.style,options:[{label:(0,o.__)("Standard","otter-blocks"),value:"standard",image:window.themeisleGutenberg.assetsPath+"/icons/map-standard.png"},{label:(0,o.__)("Silver","otter-blocks"),value:"silver",image:window.themeisleGutenberg.assetsPath+"/icons/map-silver.png"},{label:(0,o.__)("Retro","otter-blocks"),value:"retro",image:window.themeisleGutenberg.assetsPath+"/icons/map-retro.png"},{label:(0,o.__)("Dark","otter-blocks"),value:"dark",image:window.themeisleGutenberg.assetsPath+"/icons/map-dark.png"},{label:(0,o.__)("Night","otter-blocks"),value:"night",image:window.themeisleGutenberg.assetsPath+"/icons/map-night.png"},{label:(0,o.__)("Aubergine","otter-blocks"),value:"aubergine",image:window.themeisleGutenberg.assetsPath+"/icons/map-aubergine.png"}],onChange:J}),(0,i.createElement)(vl,{attributes:t,setAttributes:l,map:u.current,changeStyle:J,isPlaceAPIAvailable:x,isMarkerOpen:B,setMarkerOpen:z,removeMarker:j,changeMarkerProp:Z,addMarkerManual:()=>{const e=(0,dl.Z)(),t=(0,o.__)("Custom Marker","otter-blocks"),l=u.current.getCenter(),a=l.lat(),n=l.lng();A(!0),O(!0),V({id:e,location:"",title:t,icon:"https://maps.google.com/mapfiles/ms/icons/red-dot.png",description:"",latitude:a,longitude:n})},api:p,isSaving:C,changeAPI:h,saveAPIKey:q}),F&&(0,i.createElement)(yl,{marker:N,isAdvanced:H,isPlaceAPIAvailable:x,close:()=>A(!1),addMarker:(e,o,a,n,i,s)=>{const c=new window.google.maps.LatLng(i,s),d=(0,dl.Z)(),m=new window.google.maps.Marker({position:c,map:u.current,title:o,draggable:!0,icon:a});window.google.maps.event.addListener(m,"dragend",(e=>{const t=e.latLng.lat(),l=e.latLng.lng();Z(d,"latitude",t),Z(d,"longitude",l)})),r.current.push(m);const p=[...t.markers],g={id:d,location:e,title:o,icon:a,description:n,latitude:i,longitude:s};p.push(g),l({markers:p}),window.google.maps.event.addListener(m,"click",(()=>{b.current&&b.current.close()})),$(m,g.id,o,n),A(!1),R(!1)}}),(0,i.createElement)("div",K,(0,i.createElement)(kl,{attributes:t,initMap:()=>{var e,o,a;const n=null!==(e=null===(o=(0,L.getEditorIframe)())||void 0===o||null===(a=o.contentWindow)||void 0===a?void 0:a.document)&&void 0!==e?e:document;if(u.current=new window.google.maps.Map(n.getElementById(t.id),{center:{lat:Number(t.latitude)||41.4036299,lng:Number(t.longitude)||2.1743558000000576},gestureHandling:"cooperative",zoom:t.zoom,mapTypeId:t.type,styles:fl[t.style]}),t.location&&void 0===t.latitude&&void 0===t.longitude){const e={query:t.location,fields:["name","geometry"]};new window.google.maps.places.PlacesService(u.current).findPlaceFromQuery(e,((e,t)=>{t===window.google.maps.places.PlacesServiceStatus.OK&&0<e.length&&u.current.setCenter(e[0].geometry.location)}))}window.google.maps.event.addListenerOnce(u.current,"idle",(()=>{w(!0)})),u.current.addListener("zoom_changed",(()=>{const e=u.current.getZoom();l({zoom:e})})),u.current.addListener("maptypeid_changed",(()=>{const e=u.current.getMapTypeId();l({type:e})})),u.current.addListener("bounds_changed",(()=>{const e=u.current.getCenter(),t=e.lat(),o=e.lng();l({latitude:t.toString(),longitude:o.toString()})})),0<t.markers.length&&W(t.markers);const r={query:t.location,fields:["name","geometry"]};new window.google.maps.places.PlacesService(u.current).findPlaceFromQuery(r,((e,t)=>{"REQUEST_DENIED"===t&&S(!1)}))},displayMap:T,isMapLoaded:_,selectMarker:()=>{R(!P),P?window.google.maps.event.clearListeners(u.current,"click"):u.current.addListener("click",(e=>{window.google.maps.event.clearListeners(u.current,"click");const t=(0,dl.Z)(),l=(0,o.__)("Custom Marker","otter-blocks"),a=e.latLng.lat(),n=e.latLng.lng();A(!0),O(!1),V({id:t,location:"",title:l,icon:"https://maps.google.com/mapfiles/ms/icons/red-dot.png",description:"",latitude:a,longitude:n})}))},isSelectingMarker:P}))):(0,i.createElement)("div",K,(0,i.createElement)(ul,{api:p,error:I,isAPILoaded:v,isAPISaved:k,isSaving:C,changeAPI:e=>{h(e),D(!1)},saveAPIKey:q}))},save:()=>null});var xl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/icon-list","title":"Icon List","category":"themeisle-blocks","description":"Display an icon list in a beautiful layout. Powered by Otter.","keywords":["icon","list","items"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"defaultLibrary":{"type":"string","default":"fontawesome"},"defaultPrefix":{"type":"string","default":"fas"},"defaultIcon":{"type":"string","default":"angle-right"},"defaultContentColor":{"type":"string"},"defaultIconColor":{"type":"string"},"defaultSize":{"type":["number","string"]},"defaultIconSize":{"type":"string"},"gap":{"type":["number","string"]},"gapIconLabel":{"type":["string"]},"horizontalAlign":{"type":"string"},"alignmentTablet":{"type":"string"},"alignmentMobile":{"type":"string"},"hideLabels":{"type":"boolean"},"hasDivider":{"type":"boolean"},"dividerWidth":{"type":"string"},"dividerColor":{"type":"string"},"dividerLength":{"type":"string"}},"editorStyle":"otter-icon-list-editor","style":"otter-icon-list-style"}'),Sl=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(s.AlignmentToolbar,{value:{"flex-start":"left",center:"center","flex-end":"right"}[t.horizontalAlign],onChange:e=>{switch(e){case"left":l({horizontalAlign:"flex-start"});break;case"center":l({horizontalAlign:"center"});break;case"right":l({horizontalAlign:"flex-end"});break;default:l({horizontalAlign:void 0})}}}))},Tl=e=>{var t,l,a,n,r,d,u,b,m;let{attributes:p,setAttributes:g}=e;const[h,v]=(0,i.useState)("settings"),{responsiveSetAttributes:y,responsiveGetAttributes:k}=S(g);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)("div",null,(0,i.createElement)(w.Z,{value:h,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:v}),"settings"===h&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Layout","otter-blocks")},(0,i.createElement)(E.Z,{label:(0,o.__)("List Orientation","otter-blocks"),options:[{label:(0,o.__)("Vertical","otter-blocks"),value:"default"},{label:(0,o.__)("Horizontal","otter-blocks"),value:"is-style-horizontal"}],value:null!=p&&null!==(t=p.className)&&void 0!==t&&t.includes("is-style-horizontal")?"is-style-horizontal":"default",onChange:e=>{var t;const l=(null==p||null===(t=p.className)||void 0===t?void 0:t.split(" "))||[];"default"===e&&l.includes("is-style-horizontal")?l.splice(l.indexOf("is-style-horizontal"),1):"is-style-horizontal"!==e||l.includes("is-style-horizontal")||l.push("is-style-horizontal"),g({className:l.join(" ")})}}),(0,i.createElement)(M.Z,{label:(0,o.__)("Alignment","otter-blocks")},(0,i.createElement)(pe.Z,{value:null!==(l=k([p.horizontalAlign,p.alignmentTablet,p.alignmentMobile]))&&void 0!==l?l:"flex-start",onChange:e=>{y(e,["horizontalAlign","alignmentTablet","alignmentMobile"])},options:[{icon:bt.Z,label:(0,o.__)("Left","otter-blocks"),value:"flex-start"},{icon:mt.Z,label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:pt.Z,label:(0,o.__)("Right","otter-blocks"),value:"flex-end"}],hasIcon:!0})),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide Labels","otter-blocks"),checked:Boolean(p.hideLabels),onChange:()=>g({hideLabels:!p.hideLabels})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Icons","otter-blocks")},(0,i.createElement)(i.Suspense,{fallback:(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null))},(0,i.createElement)(_.Z,{label:(0,o.__)("Icon Picker","otter-blocks"),library:p.defaultLibrary,prefix:p.defaultPrefix,icon:p.defaultIcon,changeLibrary:e=>{g({defaultLibrary:e,defaultIcon:void 0,defaultPrefix:"fas"})},onChange:e=>{if("image"===p.defaultLibrary&&null!=e&&e.url)return g({defaultIcon:e.url});g("object"==typeof e?{defaultIcon:e.name,defaultPrefix:e.prefix}:{defaultIcon:e})},allowImage:!0})))),"style"===h&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!0,colorSettings:[{value:p.defaultIconColor,onChange:e=>g({defaultIconColor:e}),label:(0,o.__)("Icon","otter-blocks")},{value:p.defaultContentColor,onChange:e=>g({defaultContentColor:e}),label:(0,o.__)("Text","otter-blocks")},...p.hasDivider?[{value:p.dividerColor,onChange:e=>g({dividerColor:e}),label:(0,o.__)("Divider","otter-blocks")}]:[]]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Size","otter-blocks")},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Font Size","otter-blocks"),__nextHasNoMarginBottom:!0},(0,i.createElement)(c.FontSizePicker,{value:null!==(a=(0,x.Yj)(p.defaultSize))&&void 0!==a?a:"16px",onChange:e=>g({defaultSize:e}),fontSizes:[{name:"Small",size:"12px",slug:"small"},{name:"Normal",size:"16px",slug:"Normal"},{name:"Medium",size:"20px",slug:"medium"},{name:"Large",size:"36px",slug:"large"}],withReset:!0})),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Icon Size","otter-blocks"),__nextHasNoMarginBottom:!0},(0,i.createElement)(c.FontSizePicker,{value:null!==(n=null!==(r=p.defaultIconSize)&&void 0!==r?r:(0,x.Yj)(p.defaultSize))&&void 0!==n?n:"16px",onChange:e=>g({defaultIconSize:e}),fontSizes:[{name:"Small",size:"12px",slug:"small"},{name:"Normal",size:"16px",slug:"Normal"},{name:"Medium",size:"20px",slug:"medium"},{name:"Large",size:"36px",slug:"large"}],withReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Space between List items","otter-blocks"),value:null!==(d=p.gap)&&void 0!==d?d:"5px",onChange:e=>g({gap:e}),units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"}]}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Space between Icon and Label","otter-blocks"),value:null!==(u=p.gapIconLabel)&&void 0!==u?u:"16px",onChange:e=>g({gapIconLabel:e}),units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"}]})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Divider","otter-blocks")},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Enable Divider","otter-blocks"),checked:Boolean(p.hasDivider),onChange:()=>g({hasDivider:!p.hasDivider})}),p.hasDivider&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:null!==(b=p.dividerWidth)&&void 0!==b?b:"2px",onChange:e=>g({dividerWidth:e}),units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"}],max:5}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Length","otter-blocks"),value:null!==(m=p.dividerLength)&&void 0!==m?m:"100%",onChange:e=>g({dividerLength:e}),isResetValueOnUnitChange:!0}))))))};const{attributes:Ml}=xl;var Bl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/icon-list-item","title":"Icon List Item","category":"themeisle-blocks","description":"Display an item for the icon list. Powered by Otter.","keywords":["icon","list","items"],"parent":["themeisle-blocks/icon-list"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"content":{"type":"string"},"contentColor":{"type":"string"},"iconColor":{"type":"string"},"library":{"type":"string"},"iconPrefix":{"type":"string"},"icon":{"type":"string"}}}'),zl=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(_.Z,{label:(0,o.__)("Icon Picker","otter-blocks"),library:t.library,prefix:t.iconPrefix,icon:t.icon,changeLibrary:e=>{l({library:e,icon:void 0,iconPrefix:"fab"})},onChange:e=>{if("image"===t.library&&null!=e&&e.url)return l({icon:e.url});l("object"==typeof e?{icon:e.name,iconPrefix:e.prefix}:{icon:e})},allowImage:!0})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!0,colorSettings:[{value:t.contentColor,onChange:e=>l({contentColor:e}),label:(0,o.__)("Content Color","otter-blocks")},..."image"!==t.library?[{value:t.iconColor,onChange:e=>l({iconColor:e}),label:(0,o.__)("Icon Color","otter-blocks")}]:[]]}))};const{attributes:Pl}=Bl;const{name:Ll}=Bl;(0,a.registerBlockType)(Ll,{...Bl,title:(0,o.__)("Icon List Item","otter-blocks"),description:(0,o.__)("Display an item for the icon list. Powered by Otter.","otter-blocks"),icon:r.faIcon,keywords:["item","icon","list"],merge(e,t){return{content:(e.content||"")+(t.content||"")}},edit:e=>{var t,l;let{attributes:n,setAttributes:r,name:c,clientId:d,onReplace:u,onRemove:b,mergeBlocks:m}=e;const[p,h]=(0,i.useState)(!1),{hasParent:y,parentAttributes:k}=(0,v.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor"),o=t(l(d));return{hasParent:!!o,parentAttributes:o?o.attributes:{}}}),[]);(0,i.useEffect)((()=>{const e=(0,L.blockInit)(d,Pl);return()=>e(n.id)}),[n.id]),(0,i.useEffect)((()=>{r({library:n.library||k.defaultLibrary,icon:n.icon||k.defaultIcon,iconPrefix:n.iconPrefix||k.defaultPrefix})}),[y,k,n]),(0,i.useEffect)((()=>{if("image"===n.library)try{const e=new URL(n.icon);"http:"!==(null==e?void 0:e.protocol)&&"https:"!==(null==e?void 0:e.protocol)||h(!0)}catch(e){h(!1)}}),[n.library,n.icon]);const f=we.ZP.icons[n.icon],_=`${n.iconPrefix||k.defaultPrefix} fa-${n.icon||k.defaultIcon}`,w={"--content-color":null!==(t=n.contentColor)&&void 0!==t?t:k.defaultContentColor,"--icon-color":null!==(l=n.iconColor)&&void 0!==l?l:k.defaultIconColor},C=(0,s.useBlockProps)({style:w});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(zl,{attributes:n,setAttributes:r}),(0,i.createElement)("div",C,"image"===n.library&&p?(0,i.createElement)("img",{src:n.icon}):"themeisle-icons"===n.library&&n.icon&&void 0!==f?(0,i.createElement)(f,{className:g()({"wp-block-themeisle-blocks-icon-list-item-icon":!n.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":n.iconColor})}):(0,i.createElement)("i",{className:g()(_,{"wp-block-themeisle-blocks-icon-list-item-icon":!n.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":n.iconColor})}),(0,i.createElement)(s.RichText,{identifier:"content",tagName:"p",placeholder:(0,o.__)("Write your content…","otter-blocks"),className:g()({"wp-block-themeisle-blocks-icon-list-item-content":!n.contentColor},{"wp-block-themeisle-blocks-icon-list-item-content-custom":n.contentColor}),value:n.content,onChange:e=>{r({content:e})},onSplit:e=>e?(0,a.createBlock)(c,{...n,content:e}):(0,a.createBlock)(c),onMerge:m,onReplace:u,onRemove:b})))},save:e=>{let{attributes:t}=e;const l=`${t.iconPrefix} fa-${t.icon}`,o=we.ZP.icons[t.icon],a=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",a,"image"===t.library&&t.icon?(0,i.createElement)("img",{src:t.icon}):"themeisle-icons"===t.library&&t.icon?(0,i.createElement)(o,{className:g()({"wp-block-themeisle-blocks-icon-list-item-icon":!t.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":t.iconColor})}):(0,i.createElement)("i",{className:g()(l,{"wp-block-themeisle-blocks-icon-list-item-icon":!t.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":t.iconColor})}),(0,i.createElement)(s.RichText.Content,{tagName:"p",className:g()({"wp-block-themeisle-blocks-icon-list-item-content":!t.contentColor},{"wp-block-themeisle-blocks-icon-list-item-content-custom":t.contentColor}),value:t.content}))}});const{name:Rl}=xl;(0,a.registerBlockType)(Rl,{...xl,title:(0,o.__)("Icon List","otter-blocks"),description:(0,o.__)("Display an icon list in a beautiful layout. Powered by Otter.","otter-blocks"),icon:r.faIcon,keywords:["icon","list","items"],edit:e=>{let{attributes:t,setAttributes:l,clientId:o,className:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(o,Ml);return()=>e(t.id)}),[t.id]);const{responsiveGetAttributes:n}=S(l),r={"--icon-align":n([t.horizontalAlign,t.alignmentTablet,t.alignmentMobile]),"--icon-align-tablet":t.alignmentTablet,"--icon-align-mobile":t.alignmentMobile,"--gap":(0,x.Yj)(t.gap),"--gap-icon-label":t.gapIconLabel,"--font-size":(0,x.Yj)(t.defaultSize),"--icon-size":t.defaultIconSize,"--label-visibility":t.hideLabels?"none":void 0,"--divider-color":t.dividerColor,"--divider-width":t.dividerWidth,"--divider-length":t.dividerLength,"--divider-margin-left":t.horizontalAlign?"auto":void 0,"--divider-margin-right":"flex-end"===t.horizontalAlign?"0":void 0,"--divider-margin-left-tablet":t.alignmentTablet?"auto":void 0,"--divider-margin-right-tablet":"flex-end"===t.alignmentTablet?"0":void 0,"--divider-margin-left-mobile":t.alignmentMobile?"auto":void 0,"--divider-margin-right-mobile":"flex-end"===t.alignmentMobile?"0":void 0},c=(0,s.useBlockProps)({id:t.id,style:r,className:g()(a,{"has-divider":Boolean(t.hasDivider)})});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Sl,{attributes:t,setAttributes:l}),(0,i.createElement)(Tl,{attributes:t,setAttributes:l}),(0,i.createElement)("div",c,(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/icon-list-item"],__experimentalMoverDirection:"vertical",orientation:"vertical",template:[["themeisle-blocks/icon-list-item"]],renderAppender:s.InnerBlocks.DefaultAppender})))},save:e=>{let{attributes:t,className:l}=e;const o=s.useBlockProps.save({id:t.id,className:g()(l,{"has-divider":Boolean(t.hasDivider)})});return(0,i.createElement)("div",o,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{innerBlocks:[{name:"themeisle-blocks/icon-list-item",attributes:{content:(0,o.__)("List Item 1","otter-blocks")}},{name:"themeisle-blocks/icon-list-item",attributes:{content:(0,o.__)("List Item 2","otter-blocks")}},{name:"themeisle-blocks/icon-list-item",attributes:{content:(0,o.__)("List Item 3","otter-blocks")}}]}});var Fl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/leaflet-map","title":"Maps","category":"themeisle-blocks","description":"Display Open Street Maps on your website with Maps block. Powered by Otter.","keywords":["map","opeenstreetmap","location"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"location":{"type":"string","default":"La Sagrada Familia, Barcelona, Spain"},"latitude":{"type":"string","default":"41.4034789"},"longitude":{"type":"string","default":"2.174410333009705"},"bbox":{"type":"string","default":"2.1207046508789067%2C41.34807736149302%2C2.2288513183593754%2C41.45816618938139"},"zoom":{"type":"number"},"height":{"type":["number","string"],"default":"400px"},"heightTablet":{"type":"string"},"heightMobile":{"type":"string"},"markers":{"type":"array","default":[]},"zoomControl":{"type":"boolean","default":true},"draggable":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false},"editorStyle":"otter-leaflet-map-editor","style":"otter-leaflet-map-style","editorScript":"leaflet-gesture-handling","script":"otter-leaflet"}');async function Al(e){const t=await async function(e){if("string"!=typeof e)throw(0,o.__)("Location must be a string","otter-blocks");const t="https://nominatim.openstreetmap.org/search?q="+e.split(" ").map((e=>encodeURIComponent(e))).join("+")+"&format=geojson",l=await fetch(t);return l.ok&&200===l.status?l.json():console.warn((0,o.__)("An error has occured: ","otter-blocks")+l.status)}(e);if(null!=t&&t.features.length){var l;const e=t.features[0];if(null!=e&&null!==(l=e.geometry)&&void 0!==l&&l.coordinates.length)return{longitude:e.geometry.coordinates[0],latitude:e.geometry.coordinates[1]}}return null}const Hl=e=>{let{value:t,onChange:l}=e;const a=(0,Y.useInstanceId)(Hl);(0,i.useEffect)((()=>{wp.oldEditor.initialize(r.current.id,{tinymce:{classic_block_editor:!0,plugins:"lists,media,paste,tabfocus,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wpdialogs,wptextpattern,wpview",toolbar1:"formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_add_media"}});const e=window.tinymce.get(r.current.id);return e.on("change",(()=>l(e.getContent()))),()=>wp.oldEditor.remove(r.current.id)}),[]);const n=`inspector-textarea-control-${a}`,r=(0,i.useRef)(null);return(0,i.createElement)(c.BaseControl,{id:n,label:(0,o.__)("Description","otter-blocks")},(0,i.createElement)("textarea",{id:n,className:"components-textarea-control__input",rows:4,value:t,onChange:e=>l(e.target.value),ref:r}))};var Ol=Hl,Nl=e=>{let{marker:t,isOpen:l,openMarker:a,dispatch:n}=e;const[r,s]=(0,i.useState)(t.location),[d,u]=(0,i.useState)(t.longitude),[b,m]=(0,i.useState)(t.latitude),[p,h]=(0,i.useState)(t.title),[v,y]=(0,i.useState)(t.description),[k,f]=(0,i.useState)({target:"",reason:""});return(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker"},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-title-area"},(0,i.createElement)(c.Button,{className:"wp-block-themeisle-blocks-leaflet-map-marker-title",onClick:()=>a()},t.title||(0,o.__)("Custom Marker","otter-blocks")),(0,i.createElement)(c.Button,{icon:"no-alt",label:(0,o.__)("Remove Marker","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-leaflet-map-marker-remove",onClick:()=>n({type:Gl.REMOVE,ids:[t.id]})})),l&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-control-area"},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Location","otter-blocks"),type:"text",className:g()({"wp-block-themeisle-blocks-leaflet-map-input-error":"LOCATION"===k.target}),value:r,onChange:e=>{s(e)},help:(0,o.__)("Press Enter to search the location","otter-blocks"),onKeyDown:e=>((e,l)=>{e.key===l&&(async()=>{const e=await Al(r);e?(n({type:Gl.UPDATE,ids:[t.id],updatedProps:{location:r,latitude:e.latitude,longitude:e.longitude}}),m(e.latitude),u(e.longitude),"LOCATION"===k.target&&f({})):f({target:"LOCATION",reason:(0,o.__)("Location couldn't been found!","otter-blocks")})})()})(e,"Enter")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:b,onChange:e=>{m(e),n({type:Gl.UPDATE,ids:[t.id],updatedProps:{latitude:e}})}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:d,onChange:e=>{u(e),n({type:Gl.UPDATE,ids:[t.id],updatedProps:{longitude:e}})}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:p,onChange:e=>{h(e),n({type:Gl.UPDATE,ids:[t.id],updatedProps:{title:e}})}}),(0,i.createElement)(Ol,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:t.description,onChange:e=>{y(v),n({type:Gl.UPDATE,ids:[t.id],updatedProps:{description:e}})}})))},Vl=e=>{let{markers:t,dispatch:l,markersInteraction:a}=e;const{openMarker:n,setOpenMarker:r}=a;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-group"},t.map((e=>(0,i.createElement)(Nl,{key:e.id,marker:e,isOpen:n===e.id,openMarker:()=>r(a.openMarker!==e.id?e.id:null),dispatch:l})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-leaflet-map-marker-add",onClick:()=>{l({type:Gl.ADD,marker:{id:(0,dl.Z)()},dispatch:l})}},(0,o.__)("Add Marker","otter-blocks")))},Il=e=>{let{attributes:t,setAttributes:l,dispatch:a,markersInteraction:n}=e;const[r,d]=(0,i.useState)(t.location),[u,b]=(0,i.useState)({target:"",reason:""}),{responsiveSetAttributes:m,responsiveGetAttributes:p}=S(l);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Location","otter-blocks")},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Location","otter-blocks"),type:"text",className:g()({"wp-block-themeisle-blocks-leaflet-map-input-error":"LOCATION"===u.target}),placeholder:(0,o.__)("Enter location. E.g: La Sagrada Familia, Barcelona, Spain","otter-blocks"),help:(0,o.__)("Press Enter to search the location","otter-blocks"),value:r,onChange:d,onKeyDown:e=>((e,t)=>{e.key===t&&(async()=>{l({location:r});const e=await Al(r);e?(l({latitude:e.latitude.toString(),longitude:e.longitude.toString()}),"LOCATION"===u.target&&b({})):b({target:"LOCATION",reason:(0,o.__)("Location couldn't been found!","otter-blocks")})})()})(e,"Enter")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter latitude…","otter-blocks"),value:t.latitude,onChange:e=>{l({latitude:e.toString()})}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter longitude","otter-blocks"),value:t.longitude,onChange:e=>{l({longitude:e.toString()})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Positioning & Zooming","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Map Zoom Level","otter-blocks"),value:t.zoom,onChange:e=>{l({zoom:e})},min:0,max:20}),(0,i.createElement)(M.Z,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:p([(h=t.height,(0,K.isNumber)(h)?(e=>e?`${e}px`:e)(h):h),t.heightTablet,t.heightMobile]),onChange:e=>m(e,["height","heightTablet","heightMobile"])}),(0,i.createElement)(k.Z,{values:["height","heightTablet","heightMobile"],setAttributes:l}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Controls","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.BaseControl,null,(0,o.__)("The following changes will not affect block preview during the editing process. You can click outside the block to see the changes take effect.","otter-blocks")),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Draggable Map","otter-blocks"),checked:t.draggable,onChange:()=>{l({draggable:!t.draggable})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Zoom Control","otter-blocks"),checked:t.zoomControl,onChange:()=>{l({zoomControl:!t.zoomControl})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Markers","otter-blocks"),initialOpen:!1},(0,i.createElement)(Vl,{markers:t.markers,dispatch:a,markersInteraction:n})));var h};const{attributes:Dl}=Fl,Gl={ADD:"ADD",ADD_MANUAL:"ADD_MANUAL",REMOVE:"REMOVE",UPDATE:"UPDATE",INIT:"INIT"};const $l={to:[{type:"block",blocks:["themeisle-blocks/google-map"],transform:e=>{const t=e;return(0,a.createBlock)("themeisle-blocks/google-map",{...t})}}]};var Wl=$l;const{name:Zl}=Fl;(0,a.registerBlockType)(Zl,{...Fl,title:(0,o.__)("Maps","otter-blocks"),description:(0,o.__)("Display Open Street Maps on your website with Maps block. Powered by Otter.","otter-blocks"),icon:r.mapIcon,keywords:["map","opeenstreetmap","location"],transforms:Wl,edit:e=>{let{clientId:t,attributes:l,setAttributes:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(t,Dl);return()=>e(l.id)}),[l.id]);const{responsiveGetAttributes:n}=S(),r=(0,i.useRef)(null),[c,d]=(0,i.useState)(null),[u,b]=(0,i.useState)(!1),[m,p]=(0,i.useState)(null),g=(e,t)=>{if(window.L&&c&&t&&e){var l,a,n,r,i;null!==(l=e.id)&&void 0!==l||(e.id=(0,dl.Z)()),null!==(a=e.latitude)&&void 0!==a||(e.latitude=c.getCenter().lat),null!==(n=e.longitude)&&void 0!==n||(e.longitude=c.getCenter().lng),null!==(r=e.title)&&void 0!==r||(e.title=(0,o.__)("Add a title","otter-blocks")),null!==(i=e.description)&&void 0!==i||(e.description="");const s=window.L.marker([e.latitude,e.longitude]||0,{draggable:!0});return s.on("movestart",(()=>{s.closeTooltip(),s.closePopup()})),s.on("moveend",(()=>{const l=s.getLatLng();t({type:Gl.UPDATE,ids:[e.id],updatedProps:{latitude:l.lat,longitude:l.lng}})})),s.on("click",(()=>{p(e.id)})),s.markerProps=e,s}return null},[h,v]=(0,i.useReducer)(((e,t)=>{switch(t.type){case Gl.ADD:const l=g(t.marker,t.dispatch);return[...e,l];case Gl.ADD_MANUAL:if(u){const l=g(t.marker,t.dispatch);return[...e,l]}return e;case Gl.REMOVE:return e.filter((e=>{let{markerProps:l}=e;return t.ids.includes(l.id)})).forEach((e=>{c.hasLayer(e)&&c.removeLayer(e)})),e.filter((e=>{let{markerProps:l}=e;return!t.ids.includes(l.id)}));case Gl.INIT:const a=t.markers.map((e=>g(e,t.dispatch)));return[...e,...a];case Gl.UPDATE:return e.map((e=>{const l=e.markerProps;return t.ids.includes(l.id)&&(e.markerProps=(0,K.merge)(e.markerProps,t.updatedProps)),e}));default:console.warn((0,o.__)("The action for the leaflet block do not have a defined action in marker's reducer: ","otter-blocks")+t.type)}return e}),[],(()=>[])),y=()=>{if(!r.current&&!window.L)return;let{L:e}=window;const t=(0,L.getEditorIframe)();var n;if(Boolean(t)&&(e=null===(n=t.contentWindow)||void 0===n?void 0:n.L),!e)return;r.current.innerHTML="";const i=e.map(r.current,{gestureHandling:!0,gestureHandlingOptions:{text:{touch:(0,o.__)("Use two fingers to move the map","otter-blocks"),scroll:(0,o.__)("Use ctrl + scroll to zoom the map","otter-blocks"),scrollMac:(0,o.__)("Use ⌘ + scroll to zoom the map","otter-blocks")}}});e.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:["a","b","c"]}).addTo(i),i.on("zoom",(()=>{a({zoom:i.getZoom()})})),i.on("moveend",(()=>{const e=i.getCenter();a({latitude:e.lat.toString(),longitude:e.lng.toString()})})),i.on("click",(e=>{v({type:Gl.ADD_MANUAL,marker:{latitude:e.latlng.lat,longitude:e.latlng.lng},dispatch:v}),b(!1)})),e.Control.AddMarker=e.Control.extend({onAdd:()=>{const t=e.DomUtil.create("button","wp-block-themeisle-blocks-leaflet-map-marker-button"),l=e.DomUtil.create("span","dashicons dashicons-sticky",t);return e.DomEvent.on(t,"click",(t=>{e.DomEvent.stopPropagation(t),b(!u)})),t.title=(0,o.__)("Add marker on the map with a click","otter-blocks"),t.appendChild(l),t},onRemove:()=>{}}),e.control.addmarker=t=>new e.Control.AddMarker(t),e.control.addmarker({position:"bottomleft"}).addTo(i),d(i),v({type:Gl.INIT,markers:l.markers,dispatch:v})};(0,i.useEffect)((()=>{(0,L.getEditorIframe)()?((0,L.copyScriptAssetToIframe)("#leaflet-js",(()=>{y()})),(0,L.copyScriptAssetToIframe)("#leaflet-gesture-handling-js",(()=>{}))):y()}),[]),(0,i.useEffect)((()=>{l.height&&c&&c.invalidateSize(!0)}),[l.height,c]),(0,i.useEffect)((()=>{l.latitude&&l.longitude&&c&&c.setView([l.latitude,l.longitude],l.zoom||15)}),[l.latitude,l.longitude,l.zoom,c]),(0,i.useEffect)((()=>{var e;null===(e=r.current)||void 0===e||e.classList.toggle("is-selecting-location",u)}),[u]),(0,i.useEffect)((()=>{l.latitude&&l.longitude&&c&&a({bbox:c.getBounds().toBBoxString()})}),[l.latitude,l.longitude,c]),(0,i.useEffect)((()=>{h&&(h.forEach((e=>{c.hasLayer(e)||c.addLayer(e);const{markerProps:t}=e;e.setLatLng([t.latitude,t.longitude]),e.closeTooltip(),e.unbindTooltip(),e.bindTooltip(t.title,{direction:"auto"}),e.closePopup(),e.unbindPopup(),e.bindPopup(((e,t)=>{const l=document.createElement("div"),a=document.createElement("h6"),n=document.createElement("div"),r=document.createElement("p"),i=document.createElement("button");return a.innerHTML=e.title,r.innerHTML=e.description,i.onclick=()=>t({type:Gl.REMOVE,ids:[e.id]}),i.innerHTML=(0,o.__)("Delete Marker","otter-blocks"),l.classList.add("wp-block-themeisle-blocks-map-overview"),n.classList.add("wp-block-themeisle-blocks-map-overview-content"),a.classList.add("wp-block-themeisle-blocks-map-overview-title"),i.classList.add("wp-block-themeisle-blocks-map-overview-delete"),l.appendChild(a),l.appendChild(n),l.appendChild(i),n.appendChild(r),l})(t,v))})),l.markers.length!==h.length&&c&&a({markers:h.map((e=>{let{markerProps:t}=e;return t}))}))}),[h,c,l.markers]);const k=(0,s.useBlockProps)();return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Il,{attributes:l,setAttributes:a,dispatch:v,markersInteraction:{openMarker:m,setOpenMarker:p}}),(0,i.createElement)("div",k,(0,i.createElement)("div",{id:l.id,ref:r,style:{width:"100%",height:n([(f=l.height||400,(0,K.isNumber)(f)?(e=>e?`${e}px`:e)(f):f),l.heightTablet,l.heightMobile])}})));var f},save:()=>null,example:{attributes:{}}});var jl=l(2553),Ul=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/lottie","title":"Lottie Animation","category":"themeisle-blocks","description":"Add Lottie animations to your WordPress. Powered by Otter.","keywords":["media","lottie","animation"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"file":{"type":"object"},"trigger":{"type":"string","default":"none"},"loop":{"type":"boolean","default":false},"count":{"type":"number","default":0},"speed":{"type":"number","default":1},"direction":{"type":"boolean","default":false},"width":{"type":["string","number"]},"ariaLabel":{"type":"string","default":""},"backgroundColor":{"type":"string"},"backgroundGradient":{"type":"string"}},"supports":{"align":["left","center","right"]},"editorStyle":"otter-lottie-editor","script":"otter-lottie"}'),ql=e=>{var t;let{className:l,file:a,onChange:n,attributes:r}=e;const[d,u]=(0,i.useState)((null===(t=r.file)||void 0===t?void 0:t.url)||null);return Boolean(window.themeisleGutenberg.isWPVIP)?(0,i.createElement)(c.Placeholder,{label:(0,o.__)("Lottie","otter-blocks"),instructions:(0,o.__)("Add Lottie animations and files to your website. You need to use a .json file.","otter-blocks"),icon:(0,i.createElement)(s.BlockIcon,{icon:jl.Z}),className:l},(0,i.createElement)("form",{onSubmit:e=>(e&&e.preventDefault(),n(d))},(0,i.createElement)("input",{type:"url",value:d||"",className:"components-placeholder__input","aria-label":(0,o.__)("Lottie","otter-blocks"),placeholder:(0,o.__)("Enter URL to embed here…","otter-blocks"),onChange:e=>u(e.target.value)}),(0,i.createElement)(c.Button,{isPrimary:!0,disabled:!d,type:"submit"},(0,o.__)("Embed","otter-blocks")))):(0,i.createElement)(s.MediaPlaceholder,{labels:{title:(0,o.__)("Lottie","otter-blocks"),instructions:(0,o.__)("Add Lottie animations and files to your website.","otter-blocks")},icon:(0,i.createElement)(s.BlockIcon,{icon:jl.Z}),accept:["application/json",".lottie"],allowedTypes:["application/json"],value:{...a},onSelectURL:n,onSelect:n})},Jl=e=>{let{attributes:t,setAttributes:l,playerRef:a}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks"),initialOpen:!0},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Trigger","otter-blocks"),help:(0,o.__)("Animation trigger. This will only work on the front-end.","otter-blocks"),value:t.trigger,options:[{label:(0,o.__)("Autoplay","otter-blocks"),value:"none"},{label:(0,o.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,o.__)("Hover","otter-blocks"),value:"hover"},{label:(0,o.__)("Click","otter-blocks"),value:"click"}],onChange:e=>{l({trigger:e})}}),"scroll"!==t.trigger&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Loop","otter-blocks"),help:(0,o.__)("Whether to loop animation.","otter-blocks"),checked:t.loop,onChange:e=>{l({loop:e}),a.current.setLooping(e),t.direction&&a.current.seek("100%"),a.current.play()}}),t.loop&&(0,i.createElement)(c.TextControl,{label:(0,o.__)("Numbers of loops","otter-blocks"),help:(0,o.__)("Number of times to loop animation.","otter-blocks"),type:"number",value:t.count,onChange:e=>{l({count:Number(e)}),a.current.load(t.file.url)}}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Speed","otter-blocks"),help:(0,o.__)("Animation speed.","otter-blocks"),value:t.speed,onChange:e=>{l({speed:Number(e)}),a.current.setSpeed(e)},step:.1,min:.1,max:5}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Reverse","otter-blocks"),help:(0,o.__)("Direction of animation.","otter-blocks"),checked:t.direction,onChange:e=>{l({direction:e}),a.current.setDirection(e?-1:1),a.current.seek(e?"100%":0)}})),(0,i.createElement)(s.__experimentalUnitControl,{onChange:e=>{const t=parseInt(e.slice(0,-1)),o=e.slice(-1);100<t&&"%"===o&&(e="100%"),l({width:e})},label:(0,o.__)("Width","otter-blocks"),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,__unstableInputWidth:"50%",value:Number.isInteger(t.width)?`${t.width}px`:t.width,units:[{value:"%",label:"%",default:100},{value:"px",label:"px",default:300}]})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Background","otter-blocks"),initialOpen:!1},(0,i.createElement)(s.__experimentalColorGradientControl,{colorValue:t.backgroundColor,gradientValue:t.backgroundGradient,onColorChange:e=>l({backgroundColor:e}),onGradientChange:e=>l({backgroundGradient:e}),showTitle:!1,className:"otter-lottie-background-control"}))),(0,i.createElement)(s.InspectorAdvancedControls,null,(0,i.createElement)(c.TextControl,{label:(0,o.__)("Aria Label","otter-blocks"),help:(0,o.__)("Describe the purpose of this animation on the page.","otter-blocks"),value:t.ariaLabel,onChange:e=>l({ariaLabel:e})})))},Kl=e=>{let{isEditing:t,setEditing:l}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.ToolbarGroup,null,(0,i.createElement)(c.Tooltip,{text:t?(0,o.__)("Save","otter-blocks"):(0,o.__)("Edit","otter-blocks")},(0,i.createElement)(c.Button,{onClick:()=>l(!t)},(0,i.createElement)(c.Dashicon,{icon:t?"yes":"edit"})))))},Yl=e=>{let{attributes:t,playerRef:l}=e;(0,i.useEffect)((()=>{const e=(0,L.getEditorIframe)();Boolean(e)?((0,L.copyScriptAssetToIframe)("#lottie-player-js",(()=>{!(0,K.isEmpty)(t.file)&&t.loop&&null!==l.current&&l.current.addEventListener("complete",o)})),(0,L.copyScriptAssetToIframe)("#dotlottie-player-js",(()=>{!(0,K.isEmpty)(t.file)&&t.loop&&null!==l.current&&l.current.addEventListener("complete",o)}))):!(0,K.isEmpty)(t.file)&&t.loop&&null!==l.current&&l.current.addEventListener("complete",o)}),[]);const o=()=>{l.current&&(l.current.setLooping(t.loop),l.current.play(),l.current.removeEventListener("complete",o))};let a=(0,i.createElement)("lottie-player");return t.file.url.endsWith(".lottie")&&(a=(0,i.createElement)("dotlottie-player")),(0,i.cloneElement)(a,{id:t.id,ref:l,src:t.file.url,autoplay:!t.trigger||"none"===t.trigger,loop:t.loop,count:t.direction?-1*t.count:t.count,speed:t.speed,background:t.backgroundColor||t.backgroundGradient,direction:t.direction?-1:1,trigger:t.trigger,"data-loop":t.loop,mode:"normal",style:{width:!(!t.width||"%"===t.width.toString().slice(-1))&&`${t.width}px`,maxWidth:!(!t.width||"%"!==t.width.toString().slice(-1))&&`${t.width}`,height:"auto"},..."hover"===t.trigger&&{hover:"hover"},...t.ariaLabel&&{"aria-label":t.ariaLabel}})};const{attributes:Ql}=Ul;const{name:Xl}=Ul;(0,a.registerBlockType)(Xl,{...Ul,title:(0,o.__)("Lottie Animation","otter-blocks"),description:(0,o.__)("Add Lottie animations to your WordPress. Powered by Otter.","otter-blocks"),icon:jl.Z,keywords:["media","lottie","animation"],edit:e=>{let{attributes:t,setAttributes:l,isSelected:o,clientId:a}=e;const n=(0,i.useRef)(null),[r,c]=(0,i.useState)(!Boolean(t.file));(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,Ql);return()=>e(t.id)}),[t.id]),(0,i.useEffect)((()=>{var e,l,a,r,i,s;o?(null===(e=n.current)||void 0===e||null===(l=e.play)||void 0===l||l.call(e),t.direction&&(null===(a=n.current)||void 0===a||null===(r=a.seek)||void 0===r||r.call(a,"100%"))):null===(i=n.current)||void 0===i||null===(s=i.stop)||void 0===s||s.call(i)}),[o]);const d=(0,s.useBlockProps)();return(0,i.createElement)(i.Fragment,null,(!(0,K.isEmpty)(t.file)&&r||!r)&&(0,i.createElement)(Kl,{isEditing:r,setEditing:c}),!((0,K.isEmpty)(t.file)||r)&&(0,i.createElement)(Jl,{attributes:t,setAttributes:l,playerRef:n}),(0,i.createElement)("div",d,((0,K.isEmpty)(t.file)||r)&&(0,i.createElement)(ql,{value:t.file,onChange:e=>{if(""===e||null===e)return;const t=(0,K.pick)(e,["id","url"]);(0,K.isEmpty)(t)&&(t.url=e),l({file:{...t}}),c(!1)},attributes:t}),!((0,K.isEmpty)(t.file)||r)&&(0,i.createElement)(Yl,{attributes:t,isSelected:o,playerRef:n})))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,...t.file.url.endsWith(".lottie")?{"data-src":t.file?t.file.url:""}:{src:t.file?t.file.url:""},width:t.width});let o=(0,i.createElement)("lottie-player");return t.file.url.endsWith(".lottie")&&(o=(0,i.createElement)("dotlottie-player")),o=(0,i.cloneElement)(o,{trigger:t.trigger,background:t.backgroundColor||t.backgroundGradient,...t.ariaLabel&&{"aria-label":t.ariaLabel},...l}),"scroll"===t.trigger?o:(0,i.cloneElement)(o,{autoplay:!0,loop:!0,count:t.direction?-1*t.count:t.count,speed:t.speed,direction:t.direction?-1:1,trigger:t.trigger,"data-loop":t.loop,mode:"normal",..."hover"===t.trigger&&{hover:"hover"}})},example:{viewportWidth:1200,attributes:{id:"wp-block-themeisle-blocks-lottie-2",file:{url:"https://assets8.lottiefiles.com/packages/lf20_kd5rzej5.json"}}}});var eo=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/plugin-cards","title":"Plugin Card","category":"themeisle-blocks","description":"Plugin Card block lets you display plugins data in your blog posts. Powered by Otter.","keywords":["plugin","card","orbitfox"],"textdomain":"otter-blocks","attributes":{"slug":{"type":"string"}},"supports":{"html":false},"editorStyle":"otter-plugin-card-editor","style":"otter-plugin-card-style"}'),to=l(9630),lo=e=>{let{setAttributes:t,hasError:l,setError:a,className:n}=e;const[r,s]=(0,i.useState)(!1),[d,u]=(0,i.useState)(""),[b,m]=(0,i.useState)({}),[p,g]=(0,i.useState)(null),h=e=>{if(Object.keys(b).length){e.stopPropagation(),e.preventDefault();const t=p?p-1:Object.keys(b).length-1;g(t)}},v=e=>{if(Object.keys(b).length){e.stopPropagation(),e.preventDefault();const t=null===p||p===Object.keys(b).length-1?0:p+1;g(t)}},y=e=>{t({slug:e.slug}),m({})};return(0,i.createElement)(c.Placeholder,{icon:"admin-plugins",label:(0,o.__)("Plugin Card","otter-blocks"),instructions:(0,o.__)("Search for the plugin you want to display.","otter-blocks"),className:n},(0,i.createElement)("div",{className:"o-plugin-cards-search-field"},(0,i.createElement)(c.Dashicon,{icon:"search"}),r&&(0,i.createElement)(c.Spinner,null),(0,i.createElement)(c.TextControl,{type:"text",placeholder:(0,o.__)("Search for plugin…","otter-blocks"),value:d,onChange:u,onKeyDown:e=>{switch(e.keyCode){case to.UP:h(e);break;case to.DOWN:v(e);break;case to.TAB:Object.keys(b).length&&!e.shiftKey&&g(0);break;case to.ENTER:(async e=>{t({slug:""}),s(!0),a(!1);const l=await It()({path:`otter/v1/plugins?search=${encodeURIComponent(e)}`});if(l.data.errors)return a(!0),s(!1),g(null),void m({});s(!1),g(null),m(l.data.plugins)})(e.target.value)}},onFocus:()=>g(null)}),b&&(0,i.createElement)("div",{tabIndex:"-1",className:"o-plugin-cards-search-results"},Object.keys(b).map((e=>{const t=b[e];let l;return t.icons.svg&&(l=t.icons.svg),t.icons["2x"]&&(l=t.icons["2x"]),t.icons["1x"]&&(l=t.icons["1x"]),t.icons.default&&(l=t.icons.default),(0,i.createElement)("button",{className:"o-plugin-cards-list-item",key:e,onClick:e=>{e.preventDefault(),y(t)},onKeyDown:e=>((e,t)=>{switch(e.keyCode){case to.UP:h(e);break;case to.DOWN:v(e);break;case to.TAB:if(e.shiftKey){0!==p&&h(e);break}if(p===Object.keys(b).length-1)break;v(e);break;case to.ENTER:y(t)}})(e,t)},(0,i.createElement)("img",{src:l}),(0,i.createElement)("span",{dangerouslySetInnerHTML:{__html:(0,K.unescape)(t.name)}}))})))),l&&(0,i.createElement)("div",{className:"o-plugin-cards-error"},(0,i.createElement)("span",null,(0,o.__)("There seems to be an error. Make sure your internet is working properly.","otter-blocks"))))},oo=e=>{let{setAttributes:t}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.ToolbarGroup,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Edit","otter-blocks")},(0,i.createElement)(c.Button,{className:"components-icon-button components-toolbar__control o-plugin-cards-edit-plugin-card",onClick:()=>t({slug:void 0})},(0,i.createElement)(c.Dashicon,{icon:"edit"})))))};const{name:ao}=eo;(0,a.registerBlockType)(ao,{...eo,title:(0,o.__)("Plugin Card","otter-blocks"),description:(0,o.__)("Plugin Card block lets you display plugins data in your blog posts. Powered by Otter.","otter-blocks"),icon:r.pluginsIcon,keywords:["plugin","card","orbitfox"],edit:e=>{let{attributes:t,setAttributes:l}=e;const[o,a]=(0,i.useState)(!1),n=(0,s.useBlockProps)();return t.slug?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(oo,{setAttributes:l}),(0,i.createElement)("div",n,(0,i.createElement)(c.Disabled,null,(0,i.createElement)(u(),{block:"themeisle-blocks/plugin-cards",attributes:{...t}})))):(0,i.createElement)("div",n,(0,i.createElement)(lo,{attributes:t,setAttributes:l,hasError:o,setError:a}))},save:()=>null,example:{attributes:{slug:"otter-blocks"}}});var no=l(7682),ro=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/popup","title":"Popup","category":"themeisle-blocks","description":"Display your content in beautiful popup with many customization options. Powered by Otter.","keywords":["popup","modal","lightbox"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"minWidth":{"type":["number","string"]},"maxWidth":{"type":["number","string"]},"trigger":{"type":"string"},"wait":{"type":"number"},"anchor":{"type":"string"},"scroll":{"type":"number"},"showClose":{"type":"boolean","default":true},"outsideClose":{"type":"boolean","default":true},"anchorClose":{"type":"boolean","default":false},"closeAnchor":{"type":"string"},"recurringClose":{"type":"boolean","default":false},"recurringTime":{"type":"number"},"backgroundColor":{"type":"string"},"closeColor":{"type":"string"},"overlayColor":{"type":"string"},"overlayOpacity":{"type":"number"},"lockScrolling":{"type":"boolean"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"borderWidth":{"type":"object"},"borderRadius":{"type":"object"},"borderColor":{"type":"string"},"borderStyle":{"type":"string"},"width":{"type":"string"},"widthTablet":{"type":"string"},"widthMobile":{"type":"string"},"heightMode":{"type":"string"},"height":{"type":"string"},"heightTablet":{"type":"string"},"heightMobile":{"type":"string"},"verticalPosition":{"type":"string"},"horizontalPosition":{"type":"string"},"verticalPositionTablet":{"type":"string"},"horizontalPositionTablet":{"type":"string"},"verticalPositionMobile":{"type":"string"},"horizontalPositionMobile":{"type":"string"},"closeButtonType":{"type":"string"},"boxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"disableOn":{"type":"string"}},"editorStyle":"otter-popup-editor","style":"otter-popup-style","script":"otter-popup"}'),io=l(6755),so=l(7231);const co=()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Disabled,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Close On Anchor Click","otter-blocks"),checked:!1,onChange:()=>{},className:"o-disabled"}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Dismiss for Recurring Visitors","otter-blocks"),checked:!1,onChange:()=>{},className:"o-disabled"})),(0,i.createElement)(De.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"popupblock")},(0,o.__)("Get more options with Otter Pro. ","otter-blocks")),variant:"upsell"}));var uo=e=>{var t,l,a,n,r,d,u,b,m,p,g,h;let{attributes:v,setAttributes:y}=e;const[k,_]=(0,i.useState)("settings"),{responsiveSetAttributes:C,responsiveGetAttributes:E}=S(y);let T=[{label:(0,o.__)("On Load","otter-blocks"),value:"onLoad"},{label:(0,o.__)("On Anchor Click (Pro)","otter-blocks"),value:"onClick",disabled:!0},{label:(0,o.__)("On Scroll (Pro)","otter-blocks"),value:"onScroll",disabled:!0},{label:(0,o.__)("On Exit (Pro)","otter-blocks"),value:"onExit",disabled:!0}];return T=(0,Ie.applyFilters)("otter.popupBlock.triggers",T),(0,i.createElement)(s.InspectorControls,null,(0,Ie.applyFilters)("otter.feedback","","popup-block",(0,o.__)("Help us improve this block","otter-blocks")),(0,i.createElement)(w.Z,{value:k,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:_}),(0,i.createElement)("div",null,"settings"===k&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Popup settings","otter-blocks")},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Open Trigger","otter-blocks"),help:!Boolean(window.themeisleGutenberg.hasPro)&&(0,o.__)("You need to have Otter Pro to activate Pro features.","otter-blocks"),options:T,value:v.trigger,onChange:e=>y({trigger:e})}),(void 0===v.trigger||"onLoad"===v.trigger)&&(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Trigger Delay","otter-blocks"),help:(0,o.__)("How much time in seconds to wait before showing the popup.","otter-blocks"),min:0,max:100,value:null!==(t=v.wait)&&void 0!==t?t:0,onChange:e=>y({wait:Number(e)}),allowReset:!0}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Disable Page Scrolling","otter-blocks"),checked:v.lockScrolling,onChange:()=>y({lockScrolling:!v.lockScrolling})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Show on mobile","otter-blocks"),checked:!Boolean(v.disableOn),onChange:e=>y({disableOn:e?void 0:"mobile"})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Popup Position","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)("div",{className:"o-position-picker"},(0,i.createElement)(c.__experimentalAlignmentMatrixControl,{value:E([`${null!==(l=v.verticalPosition)&&void 0!==l?l:"center"} ${null!==(a=v.horizontalPosition)&&void 0!==a?a:"center"}`,`${null!==(n=v.verticalPositionTablet)&&void 0!==n?n:"center"} ${null!==(r=v.horizontalPositionTablet)&&void 0!==r?r:"center"}`,`${null!==(d=v.verticalPositionMobile)&&void 0!==d?d:"center"} ${null!==(u=v.horizontalPositionMobile)&&void 0!==u?u:"center"}`]),onChange:e=>{const[t,l]=e.split(" ");switch(view){case"Desktop":y({verticalPosition:Boolean(t)&&"center"!==t?t:void 0,horizontalPosition:Boolean(l)&&"center"!==l?l:void 0});break;case"Tablet":y({verticalPositionTabelt:Boolean(t)&&"center"!==t?t:void 0,horizontalPositionTablet:Boolean(l)&&"center"!==l?l:void 0});break;case"Mobile":y({verticalPositionMobile:Boolean(t)&&"center"!==t?t:void 0,horizontalPositionMobile:Boolean(l)&&"center"!==l?l:void 0})}}})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Frequency & Close Settings","otter-blocks"),initialOpen:!1},(0,Ie.applyFilters)("otter.popupBlock.controls",(0,i.createElement)((()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Show Close Button","otter-blocks"),checked:v.showClose,onChange:()=>y({showClose:!v.showClose})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Close on Click Outside","otter-blocks"),checked:v.outsideClose,onChange:()=>y({outsideClose:!v.outsideClose})}),!Boolean(window.themeisleGutenberg.hasPro)&&(0,i.createElement)(co,null))),null),v,y))),"style"===k&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(M.Z,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:null!==(b=E([v.width,v.widthTablet,v.widthMobile]))&&void 0!==b?b:"500px",onChange:e=>{C(e,["width","widthTablet","widthMobile"])}})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Height","otter-blocks"),options:[{label:(0,o.__)("Fit Content","otter-blocks"),value:"none"},{label:(0,o.__)("Custom","otter-blocks"),value:"custom"}],value:v.heightMode,onChange:e=>y({heightMode:"none"!==e?e:void 0})}),"custom"===v.heightMode&&(0,i.createElement)(M.Z,{label:(0,o.__)("Custom Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:null!==(m=E([v.height,v.heightTablet,v.heightMobile]))&&void 0!==m?m:"400px",onChange:e=>{C(e,["height","heightTablet","heightMobile"])}})),(0,i.createElement)(M.Z,null,(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:null!==(p=E([v.padding,v.paddingTablet,v.paddingMobile]))&&void 0!==p?p:{top:"20px",bottom:"20px",left:"20px",right:"20px"},onChange:e=>{C((0,x.cg)(e,{top:"20px",bottom:"20px",left:"20px",right:"20px"}),["padding","paddingTablet","paddingMobile"])}}))),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:v.backgroundColor,onChange:e=>y({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:v.closeColor,onChange:e=>y({closeColor:e}),label:(0,o.__)("Close Button","otter-blocks")},{value:v.overlayColor,onChange:e=>y({overlayColor:e}),label:(0,o.__)("Overlay","otter-blocks")},{value:v.borderColor,onChange:e=>y({borderColor:e}),label:(0,o.__)("Border","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Overlay","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Overlay Opacity","otter-blocks"),value:v.overlayOpacity,initialPosition:100,onChange:e=>y({overlayOpacity:void 0!==e?Number(e):void 0}),allowReset:!0})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Close Button","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Show Close Button","otter-blocks"),checked:v.showClose,onChange:()=>y({showClose:!v.showClose})}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Position","otter-blocks"),options:[{label:(0,o.__)("Inside","otter-blocks"),value:"none"},{label:(0,o.__)("Outside","otter-blocks"),value:"outside"}],value:v.closeButtonType,onChange:e=>y({closeButtonType:"none"!==e?e:void 0})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Width","otter-blocks"),values:null!==(g=v.borderWidth)&&void 0!==g?g:{top:"0px",bottom:"0px",left:"0px",right:"0px"},onChange:e=>{y({borderWidth:(0,x.cg)(e,{top:"0px",bottom:"0px",left:"0px",right:"0px"})})}}),(0,i.createElement)(c.__experimentalBoxControl,{id:"o-border-raduis-box",label:(0,o.__)("Border Radius","otter-blocks"),values:null!==(h=v.borderRadius)&&void 0!==h?h:{top:"0px",bottom:"0px",left:"0px",right:"0px"},onChange:e=>{y({borderRadius:(0,x.cg)(e,{top:"0px",bottom:"0px",left:"0px",right:"0px"})})}}),(0,i.createElement)(f.Z,{boxShadow:v.boxShadow,onChange:e=>{const t={...v.boxShadow};Object.entries(e).map((function(){let[l,o]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;t[l]=o})),y({boxShadow:t})}})))))};const{attributes:bo}=ro,mo=e=>({top:e,bottom:e,left:e,right:e});const{name:po}=ro;(0,a.registerBlockType)(po,{...ro,title:(0,o.__)("Popup","otter-blocks"),description:(0,o.__)("Display your content in beautiful popup with many customization options. Powered by Otter.","otter-blocks"),icon:no.Z,keywords:["popup","modal","lightbox"],edit:e=>{var t,l,a;let{attributes:n,setAttributes:r,clientId:d,className:u}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(d,bo);return()=>e(n.id)}),[]);const[b,m]=(0,i.useState)(!1),p="custom"===n.heightMode?{"--height":n.height,"--height-tablet":n.heightMobile,"--height-mobile":n.heightMobile}:{"--height":"fit-content"},h={"--min-width":n.minWidth?n.minWidth+"px":"400px","--max-width":n.maxWidth?n.maxWidth+"px":void 0,"--background-color":n.backgroundColor,"--close-color":n.closeColor,"--overlay-color":n.overlayColor,"--overlay-opacity":void 0!==n.overlayOpacity?n.overlayOpacity/100:1,"--brd-width":(0,x.bv)(n.borderWidth),"--brd-radius":(0,x.bv)(n.borderRadius),"--brd-color":n.borderColor,"--brd-style":n.borderStyle,"--width":!Boolean(n.width)&&n.maxWidth?n.maxWidth+"px":n.width,"--width-tablet":n.widthTablet,"--width-mobile":n.widthMobile,"--padding":n.padding?(0,x.bv)((0,K.merge)(mo("20px"),n.padding)):void 0,"--padding-tablet":n.paddingTablet?(0,x.bv)((0,K.merge)(mo("20px"),null!==(t=n.padding)&&void 0!==t?t:{},n.paddingTablet)):void 0,"--padding-mobile":n.paddingMobile?(0,x.bv)((0,K.merge)(mo("20px"),null!==(l=n.padding)&&void 0!==l?l:{},null!==(a=n.paddingTablet)&&void 0!==a?a:{},n.paddingMobile)):void 0,"--box-shadow":n.boxShadow.active&&`${n.boxShadow.horizontal}px ${n.boxShadow.vertical}px ${n.boxShadow.blur}px ${n.boxShadow.spread}px ${hexToRgba(n.boxShadow.color||"#FFFFFF",n.boxShadow.colorOpacity)}`,...p},[v,y]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{y([" .otter-popup__modal_content "+(0,x.iC)([["top","30px","top"===n.verticalPosition],["bottom","30px","bottom"===n.verticalPosition],["left","30px","left"===n.horizontalPosition],["right","30px","right"===n.horizontalPosition]])," .otter-popup__modal_content "+(0,x.iC)([["top","15px","top"===n.verticalPositionTablet],["bottom","15px","bottom"===n.verticalPositionTablet],["left","15px","left"===n.horizontalPositionTablet],["right","15px","right"===n.horizontalPositionTablet]])," .otter-popup__modal_content "+(0,x.iC)([["top","10px","top"===n.verticalPositionMobile],["bottom","10px","bottom"===n.verticalPositionMobile],["left","10px","left"===n.horizontalPositionMobile],["right","10px","right"===n.horizontalPositionMobile]])],["@media ( min-width: 960px )","@media ( min-width: 600px ) and ( max-width: 960px )","@media ( max-width: 600px )"])}),[n.horizontalPosition,n.verticalPosition,n.horizontalPositionTablet,n.verticalPositionTablet,n.horizontalPositionMobile,n.verticalPositionMobile]);const k=(0,s.useBlockProps)({id:n.id,style:h,className:g()(u,v,{"with-outside-button":"outside"===n.closeButtonType})});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(uo,{attributes:n,setAttributes:r}),(0,i.createElement)("div",k,(0,i.createElement)(c.Button,{variant:"primary",isPrimary:!0,icon:io.Z,onClick:()=>m(!0)},(0,o.__)("Edit Popup","otter-blocks")),b&&(0,i.createElement)("div",{className:"otter-popup__modal_wrap"},(0,i.createElement)("div",{role:"presentation",className:"otter-popup__modal_wrap_overlay",onClick:()=>m(!1)}),(0,i.createElement)("div",{className:"otter-popup__modal_content"},n.showClose&&(0,i.createElement)("div",{className:"otter-popup__modal_header"},(0,i.createElement)(c.Button,{icon:so.Z,onClick:()=>m(!1)})),(0,i.createElement)("div",{className:"otter-popup__modal_body"},(0,i.createElement)(s.InnerBlocks,null))))))},save:e=>{let{attributes:t,className:l}=e;const o=s.useBlockProps.save({id:t.id,className:g()(l,"is-front",{"with-outside-button":"outside"===t.closeButtonType}),"data-open":t.trigger,"data-dismiss":t.recurringClose?t.recurringTime:"","data-time":void 0===t.trigger||"onLoad"===t.trigger?t.wait||0:"","data-anchor":"onClick"===t.trigger?t.anchor:"","data-offset":"onScroll"===t.trigger?t.scroll:"","data-outside":t.outsideClose?t.outsideClose:"","data-anchorclose":t.anchorClose?t.closeAnchor:"","data-lock-scrolling":t.lockScrolling?"1":void 0,"data-disable-on":t.disableOn?t.disableOn:void 0});return(0,i.createElement)("div",o,(0,i.createElement)("div",{className:"otter-popup__modal_wrap"},(0,i.createElement)("div",{role:"presentation",className:"otter-popup__modal_wrap_overlay"}),(0,i.createElement)("div",{className:"otter-popup__modal_content"},t.showClose&&(0,i.createElement)("div",{className:"otter-popup__modal_header"},(0,i.createElement)("button",{type:"button",class:"components-button has-icon"},(0,i.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},(0,i.createElement)("path",{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})))),(0,i.createElement)("div",{className:"otter-popup__modal_body"},(0,i.createElement)(s.InnerBlocks.Content,null)))))},example:{attributes:{}}});var go=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/posts-grid","title":"Posts","category":"themeisle-blocks","description":"Display a list of your most recent posts in a beautiful layout. Powered by Otter.","keywords":["posts","grid","news"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"style":{"type":"string","default":"grid"},"postTypes":{"type":"array","default":[]},"columns":{"type":"number","default":3},"template":{"type":"array","default":["category","title","meta","description"]},"categories":{"type":"array","items":{"type":"object"}},"postsToShow":{"type":"number","default":5},"order":{"type":"string","default":"desc"},"orderBy":{"type":"string","default":"date"},"offset":{"type":"number","default":0},"imageSize":{"type":"string","default":"full"},"displayFeaturedImage":{"type":"boolean","default":true},"displayCategory":{"type":"boolean","default":true},"displayTitle":{"type":"boolean","default":true},"titleTag":{"type":"string","default":"h5"},"displayMeta":{"type":"boolean","default":true},"displayDescription":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":100},"displayDate":{"type":"boolean","default":true},"displayAuthor":{"type":"boolean","default":true},"displayComments":{"type":"boolean","default":true},"displayPostCategory":{"type":"boolean","default":false},"displayReadMoreLink":{"type":"boolean","default":false},"cropImage":{"type":"boolean","default":false},"customTitleFontSize":{"type":["string","number"]},"customTitleFontSizeTablet":{"type":["string","number"]},"customTitleFontSizeMobile":{"type":["string","number"]},"customDescriptionFontSize":{"type":["string","number"]},"customDescriptionFontSizeTablet":{"type":["string","number"]},"customDescriptionFontSizeMobile":{"type":["string","number"]},"customMetaFontSize":{"type":"string"},"customMetaFontSizeTablet":{"type":"string"},"customMetaFontSizeMobile":{"type":"string"},"textColor":{"type":"string"},"backgroundColor":{"type":"string"},"borderColor":{"type":"string"},"borderRadius":{"type":["number","object"]},"borderWidth":{"type":"string"},"cardBorderRadius":{"type":"object"},"boxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"imageBoxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"textAlign":{"type":"string"},"verticalAlign":{"type":"string"},"enableFeaturedPost":{"type":"boolean"},"imageWidth":{"type":["string","number"]},"imageWidthTablet":{"type":"string"},"imageWidthMobile":{"type":"string"},"columnGap":{"type":"string"},"columnGapTablet":{"type":"string"},"columnGapMobile":{"type":"string"},"rowGap":{"type":"string"},"rowGapTablet":{"type":"string"},"rowGapMobile":{"type":"string"},"padding":{"type":"string"},"paddingTablet":{"type":"string"},"paddingMobile":{"type":"string"},"contentGap":{"type":"string"}},"supports":{"align":["wide","full"],"html":false},"editorStyle":"otter-posts-grid-editor","style":"otter-posts-grid-style"}');const{attributes:ho}=go;var vo=[{attributes:{...ho,categories:{type:"string"}},supports:{align:["wide","full"],html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:e=>{let{categories:t}=e;return t&&"string"==typeof t},save:()=>null}],yo=e=>{let{attributes:t,setAttributes:l}=e;const a=s.BlockVerticalAlignmentToolbar;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(a,{label:(0,o.__)("Change Vertical Alignment","otter-blocks"),value:t.verticalAlign,onChange:e=>l({verticalAlign:e})}))},ko=l(454),fo=l.n(ko),_o=l(1286);const wo=(0,_o.W6)((()=>(0,i.createElement)("div",{className:"o-sortable-handle",tabIndex:"0"},(0,i.createElement)("span",null)))),Co={image:"displayFeaturedImage",category:"displayCategory",title:"displayTitle",meta:"displayMeta",description:"displayDescription"},Eo=e=>{var t,l;let{attributes:a,setAttributes:n,template:r,disabled:s}=e;const[d,u]=(0,i.useState)(!1),b=null==r?void 0:r.startsWith("custom_"),m=null==a||null===(t=a.customMetas)||void 0===t||null===(l=t.filter((e=>{let{id:t}=e;return t===r})))||void 0===l?void 0:l.pop(),p={image:a.displayFeaturedImage,category:a.displayCategory,title:a.displayTitle,meta:a.displayMeta,description:a.displayDescription},h=e=>{const t={...m,...e};n({customMetas:a.customMetas.map((e=>e.id===m.id?t:e))})},v=b?(0,Ie.applyFilters)("otter.postsBlock.panelLabel","",m):(0,K.startCase)((0,K.toLower)(r)),y=p[r]||(null==m?void 0:m.display),k=y?"visibility":"hidden";
|
2 |
/* translators: %s Label */
|
3 |
let f=(0,o.sprintf)((0,o.__)("Display %s","otter-blocks"),v);return y&&(
|
4 |
/* translators: %s Label */
|
5 |
-
f=(0,o.sprintf)((0,o.__)("Hide %s","otter-blocks"),v)),(0,i.createElement)("div",{className:g()("o-sortable-item-area",`o-sortable-item-area-${r}`)},(0,i.createElement)("div",{className:g()("o-sortable-item",{disabled:s,hidden:!y,editable:y})},!s&&(0,i.createElement)(wo,null),(0,i.createElement)("div",{className:"o-sortable-label"},v),y&&!["category","title"].includes(r)&&(0,i.createElement)(c.Button,{icon:d?"arrow-up-alt2":"arrow-down-alt2",label:d?(0,o.__)("Close Settings","otter-blocks"):(0,o.__)("Open Settings","otter-blocks"),showTooltip:!0,className:"o-sortable-button",onClick:()=>u(!d)}),(0,i.createElement)(c.Button,{icon:k,label:f,showTooltip:!0,className:"o-sortable-button",onClick:()=>{b?h({display:!m.display}):(e=>{const t=Co[e]||e;n({[t]:!a[t]})})(r),u(!1)}})),y&&!["category","title"].includes(r)&&(0,i.createElement)("div",{className:g()("o-sortable-control-area",{opened:d&&y})},"image"===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Image Size","otter-blocks"),value:a.imageSize,options:window.themeisleGutenberg.imageSizes.map((e=>({label:(0,K.startCase)((0,K.toLower)(e)),value:e}))),onChange:e=>n({imageSize:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Crop Image to Fit","otter-blocks"),checked:a.cropImage,onChange:e=>n({cropImage:e})})),"meta"===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Post Date","otter-blocks"),checked:a.displayDate,onChange:e=>n({displayDate:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Author","otter-blocks"),checked:a.displayAuthor,onChange:e=>n({displayAuthor:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Comments","otter-blocks"),checked:a.displayComments,onChange:e=>n({displayComments:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Category","otter-blocks"),checked:a.displayPostCategory,onChange:e=>n({displayPostCategory:e})})),"description"===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.TextControl,{label:(0,o.__)("Excerpt Limit","otter-blocks"),type:"number",value:a.excerptLength,onChange:e=>n({excerptLength:Number(e)})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Read More Link","otter-blocks"),checked:a.displayReadMoreLink,onChange:e=>n({displayReadMoreLink:e})})),(0,Ie.applyFilters)("otter.postsBlock.controls","",a,n,b,m,h)))},xo=(0,_o.W8)((e=>{let{attributes:t,setAttributes:l,template:o,disabled:a}=e;return(0,i.createElement)(Eo,{attributes:t,setAttributes:l,template:o,disabled:a})})),So=(0,_o.JN)((e=>{var t;let{attributes:l,setAttributes:o}=e;return(0,i.createElement)("div",null,null==l||null===(t=l.template)||void 0===t?void 0:t.filter((e=>{var t,l;return!(null!=e&&e.startsWith("custom_")&&(void 0===(null===(t=window)||void 0===t?void 0:t.acf)||null===(l=window.themeisleGutenberg)||void 0===l||!l.hasPro))})).map(((e,t)=>(0,i.createElement)(xo,{key:`item-${e}`,index:t,attributes:l,setAttributes:o,template:e}))))})),To=()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,(0,o.__)("Add custom fields for the posts, using the ACF plugin & Otter Pro.","otter-blocks")),(0,i.createElement)(c.Button,{variant:"secondary",isSecondary:!0,className:"o-conditions__add",disabled:!0,onClick:()=>{}},(0,o.__)("Add Custom Field","otter-blocks")),(0,i.createElement)("br",null),(0,i.createElement)(De.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"customfield")},(0,o.__)("Get more options with Otter Pro. ","otter-blocks")),variant:"upsell"}));var Mo=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:g()("o-sortable",t.style)},(0,i.createElement)(Eo,{attributes:t,setAttributes:l,template:"image",disabled:!0}),(0,i.createElement)(So,{attributes:t,setAttributes:l,onSortEnd:e=>{let{oldIndex:o,newIndex:a}=e;const n=fo()(t.template,o,a);l({template:n})},useDragHandle:!0,axis:"y",lockAxis:"y"}),(0,Ie.applyFilters)("otter.postsBlock.sortableContainer",(0,i.createElement)(To,null),t,l)))};const Bo=[{label:(0,o.__)("Default","otter-blocks"),value:"default",isDefault:!0},{label:(0,o.__)("Boxed","otter-blocks"),value:"boxed"}],zo=[{name:(0,o.__)("XS","otter-blocks"),size:"14px",slug:"xs"},{name:(0,o.__)("Small","otter-blocks"),size:"16px",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"18px",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"24px",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"28px",slug:"xl"}],Po=e=>e?`${e}px`:e;var Lo=e=>{let{attributes:t,setAttributes:l,categoriesList:a}=e;const[n,r]=(0,i.useState)("settings"),{slugs:d}=(0,v.useSelect)((e=>({slugs:e("otter-store").getPostsSlugs()})),[t.postTypes]),{responsiveSetAttributes:u,responsiveGetAttributes:b}=S(l),m=a.reduce(((e,t)=>({...e,[t.name]:t})),{}),p=t.categories?t.categories.map((e=>{const t=a.find((t=>t.id===Number(e.id)));return{id:e.id,name:(null==t?void 0:t.name)||(null==t?void 0:t.slug)||""}})):[],g="object"==typeof t.categories?1<=t.categories.length?t.categories[0].id:void 0:t.categories,h=(e,o)=>{const a={...t[e]};Object.entries(o).map((function(){let[e,t]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;a[e]=t})),l({[e]:a})};return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:n,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:r}),"settings"===n&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Layout","otter-blocks")},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Post Type","otter-blocks"),help:(0,o.__)('WordPress contains different types of content and they are divided into collections called "Post types". By default there are a few different ones such as blog posts and pages, but plugins could add more.',"otter-blocks"),value:t.postTypes[0]||null,onChange:e=>e&&l({postTypes:[e]}),options:d.map((e=>({label:(0,x.__)(e),value:e})))}),(0,i.createElement)(E.Z,{label:(0,o.__)("Layout","otter-blocks"),options:[{label:(0,o.__)("Grid","otter-blocks"),value:"grid"},{label:(0,o.__)("List","otter-blocks"),value:"list"}],value:t.style,onChange:e=>l({style:e})}),"grid"===t.style&&(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Columns","otter-blocks"),value:t.columns,onChange:e=>{l({columns:e})},min:1,max:5}),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Content Alignment","otter-blocks")},(0,i.createElement)(pe.Z,{value:t.textAlign,options:[{icon:"editor-alignleft",label:(0,o.__)("Left","otter-blocks"),value:"left"},{icon:"editor-aligncenter",label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:"editor-alignright",label:(0,o.__)("Right","otter-blocks"),value:"right"}],onChange:e=>l({textAlign:e}),hasIcon:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.QueryControls,{order:t.order,orderBy:t.orderBy,onOrderChange:e=>l({order:e}),onOrderByChange:e=>l({orderBy:e}),numberOfItems:t.postsToShow,onNumberOfItemsChange:e=>l({postsToShow:e}),categorySuggestions:m,selectedCategoryId:g,selectedCategories:p,onCategoryChange:e=>{let t;"object"==typeof e?0<e.length&&(t=e.map((e=>{if("object"==typeof e)return e;const t=a.find((t=>t.name===e));return t?{id:t.id,name:e}:void 0})).filter((e=>void 0!==e))):""!==e&&(t=[{id:e,name:a.find((t=>t.id===Number(e))).name}]),l({categories:t})}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Offset","otter-blocks"),help:(0,o.__)("Number of post to displace or pass over.","otter-blocks"),type:"number",value:t.offset,min:0,onChange:e=>l({offset:Number(e)})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Enable Featured Post","otter-blocks"),checked:t.enableFeaturedPost,onChange:e=>l({enableFeaturedPost:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Elements","otter-blocks"),initialOpen:!1},(0,i.createElement)(Mo,{attributes:t,setAttributes:l}))),"style"===n&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks")},(0,i.createElement)(E.Z,{options:Bo,value:(0,x.tB)(Bo,null==t?void 0:t.className),onChange:e=>{const o=(0,x.L4)(null==t?void 0:t.className,Bo,e);l({className:o})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Title Tag","otter-blocks"),value:t.titleTag||"h5",options:[{label:(0,o.__)("H1","otter-blocks"),value:"h1"},{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"}],onChange:e=>l({titleTag:e})}),(0,i.createElement)(M.Z,{label:(0,o.__)("Title Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:zo,withReset:!0,value:b([t.customTitleFontSize,t.customTitleFontSizeTablet,t.customTitleFontSizeMobile]),onChange:e=>u(e,["customTitleFontSize","customTitleFontSizeTablet","customTitleFontSizeMobile"])})),(0,i.createElement)(M.Z,{label:(0,o.__)("Description Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:zo,withReset:!0,value:b([t.customDescriptionFontSize,t.customDescriptionFontSizeTablet,t.customDescriptionFontSizeMobile]),onChange:e=>u(e,["customDescriptionFontSize","customDescriptionFontSizeTablet","customDescriptionFontSizeMobile"])})),(0,i.createElement)(M.Z,{label:(0,o.__)("Meta Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:zo,withReset:!0,value:b([t.customMetaFontSize,t.customMetaFontSizeTablet,t.customMetaFontSizeMobile]),onChange:e=>u(e,["customMetaFontSize","customMetaFontSizeTablet","customMetaFontSizeMobile"])}))),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:t.textColor,onChange:e=>l({textColor:e}),label:(0,o.__)("Text","otter-blocks")},{value:t.backgroundColor,onChange:e=>l({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:t.borderColor,onChange:e=>l({borderColor:e}),label:(0,o.__)("Border","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Image","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Radius","otter-blocks"),values:(y=t.borderRadius,(0,K.isNumber)(y)?{top:Po(y),right:Po(y),bottom:Po(y),left:Po(y)}:y),onChange:e=>l({borderRadius:e}),id:"o-border-raduis-box"}),"list"===t.style&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(M.Z,{label:(0,o.__)("Image Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:b([t.imageWidth,t.imageWidthTablet,t.imageWidthMobile]),onChange:e=>u(e,["imageWidth","imageWidthTablet","imageWidthMobile"])}),(0,i.createElement)(k.Z,{values:["imageWidth","imageWidthTablet","imageWidthMobile"],setAttributes:l}))),(0,i.createElement)(f.Z,{boxShadow:t.imageBoxShadow,onChange:e=>h("imageBoxShadow",e)})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Spacing","otter-blocks"),initialOpen:!1},"list"!==t.style&&(0,i.createElement)(M.Z,{label:(0,o.__)("Column Gap","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:b([t.columnGap,t.columnGapTablet,t.columnGapMobile]),onChange:e=>u(e,["columnGap","columnGapTablet","columnGapMobile"])}),(0,i.createElement)(k.Z,{values:["columnGap","columnGapTablet","columnGapMobile"],setAttributes:l})),(0,i.createElement)(M.Z,{label:(0,o.__)("Row Gap","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:b([t.rowGap,t.rowGapTablet,t.rowGapMobile]),onChange:e=>u(e,["rowGap","rowGapTablet","rowGapMobile"])}),(0,i.createElement)(k.Z,{values:["rowGap","rowGapTablet","rowGapMobile"],setAttributes:l})),(0,i.createElement)(M.Z,{label:(0,o.__)("Content Padding","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:b([t.padding,t.paddingTablet,t.paddingMobile]),onChange:e=>u(e,["padding","paddingTablet","paddingMobile"])}),(0,i.createElement)(k.Z,{values:["padding","paddingTablet","paddingMobile"],setAttributes:l})),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Space Between","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:zo,withReset:!0,value:t.contentGap,onChange:e=>l({contentGap:e})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:t.borderWidth,onChange:e=>l({borderWidth:e})}),(0,i.createElement)(k.Z,{values:["borderWidth"],setAttributes:l}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Radius","otter-blocks"),value:t.cardBorderRadius,onChange:e=>l({cardBorderRadius:e}),id:"o-border-raduis-box"}),(0,i.createElement)(f.Z,{boxShadow:t.boxShadow,onChange:e=>h("boxShadow",e)}))),(0,i.createElement)(C.p,null));var y},Ro=e=>{let{id:t,link:l,alt:o,size:a,imgStyle:n}=e;const{featuredImage:r,altText:s}=(0,v.useSelect)((e=>{const l=e("core").getMedia(t,{context:"view"});return{featuredImage:l?0<Object.keys(l.media_details.sizes).length&&l.media_details.sizes[a]?l.media_details.sizes[a].source_url:l.source_url:null,altText:l&&l.alt_text?l.alt_text:o}}),[a,t]);return null===r?(0,i.createElement)(i.Fragment,null):(0,i.createElement)("div",{className:"o-posts-grid-post-image"},(0,i.createElement)("a",{href:l},r?(0,i.createElement)("img",{src:r,size:a,alt:s,"data-id":t,style:n}):(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null))))};const Fo=e=>{let{attributes:t,element:l,category:o,categoriesList:a}=e;return void 0!==o&&t.displayCategory&&a?(0,i.createElement)("span",{key:l,className:"o-posts-grid-post-category"},o.name):""},Ao=e=>{let{attributes:t,element:l,post:o}=e;const a=t.titleTag||"h5";var n;return t.displayTitle?(0,i.createElement)(a,{key:l,className:"o-posts-grid-post-title"},(0,i.createElement)("a",{href:o.link},(0,x.Uo)(null===(n=o.title)||void 0===n?void 0:n.rendered))):""},Ho=e=>{let{attributes:t,element:l,post:a,author:n,categories:r}=e;if(t.displayMeta&&(t.displayDate||t.displayAuthor||t.displayComments||t.displayPostCategory)){const e=[];let s="";return t.displayDate&&(
|
6 |
/* translators: %s Date posted */
|
7 |
s+=(0,o.sprintf)((0,o.__)("Posted on %s","otter-blocks"),(0,x.p6)(a.date))),t.displayAuthor&&void 0!==n&&(
|
8 |
/* translators: %s Author of the post */
|
9 |
-
s+=(0,o.sprintf)((0,o.__)(" by %s","otter-blocks"),n.name)),e.push(s),t.displayComments&&e.push((0,o.sprintf)("%1$s %2$s","0",(0,o.__)("comments","otter-blocks"))),t.displayPostCategory&&Boolean(r.length)&&e.push(r.map((e=>{let{name:t}=e;return t})).join(", ")),(0,i.createElement)("p",{key:l,className:"o-posts-grid-post-meta"},e.join(" / "))}return""},Oo=e=>{let{attributes:t,element:l,post:a}=e;var n;return 0<t.excerptLength&&t.displayDescription?(0,i.createElement)("div",{key:l,className:"o-posts-grid-post-description"},(0,i.createElement)("p",null,(null===(n=a.excerpt)||void 0===n?void 0:n.rendered)&&(0,x.Uo)(a.excerpt.rendered).substring(0,t.excerptLength)+"…"),t.displayReadMoreLink&&(0,i.createElement)("a",{href:a.link,className:"o-posts-read-more"},(0,o.__)("Read more","otter-blocks"))):""};var No=e=>{let{attributes:t,posts:l,categoriesList:o,authors:a}=e;return(0,i.createElement)("div",{className:"grid"===t.style?g()("is-grid",`o-posts-grid-columns-${t.columns}`,{"o-crop-img":t.cropImage}):g()("is-list",{"o-crop-img":t.cropImage})},l.filter((e=>e)).slice(t.enableFeaturedPost?1:0).map((e=>{var l,n,r;const s=o&&0<(null==e||null===(l=e.categories)||void 0===l?void 0:l.length)?o.find((t=>t.id===e.categories[0])):void 0,c=o&&0<(null==e||null===(n=e.categories)||void 0===n?void 0:n.length)?o.filter((t=>e.categories.includes(t.id))):[],d=a&&e.author?a.find((t=>t.id===e.author)):void 0;return(0,i.createElement)("div",{key:e.link,className:"o-posts-grid-post-blog o-posts-grid-post-plain"},(0,i.createElement)("div",{className:g()("o-posts-grid-post")},0!==e.featured_media&&t.displayFeaturedImage&&(0,i.createElement)(Ro,{id:e.featured_media,link:e.link,alt:null===(r=e.title)||void 0===r?void 0:r.rendered,size:t.imageSize,imgStyle:{borderRadius:void 0!==t.borderRadius?t.borderRadius+"px":void 0}}),(0,i.createElement)("div",{className:g()("o-posts-grid-post-body",{"is-full":!t.displayFeaturedImage})},t.template.map((l=>{switch(l){case"category":return(0,i.createElement)(Fo,{key:l,attributes:t,element:l,category:s,categoriesList:o});case"title":return(0,i.createElement)(Ao,{key:l,attributes:t,element:l,post:e});case"meta":return(0,i.createElement)(Ho,{key:l,attributes:t,element:l,post:e,author:d,categories:c});case"description":return(0,i.createElement)(Oo,{key:l,attributes:t,element:l,post:e});default:return(0,Ie.applyFilters)("otter.postsBlock.templateLoop","",l,t)}})))))})))};const Vo={posts:{slugs:[],usedSlugs:[]}};(0,v.registerGenericStore)("otter-store",(()=>{let e=()=>{};const t=Vo,l={getPostsSlugs(){return t.posts.slugs},getPostsUsedSlugs(){return t.posts.usedSlugs}},o={setPostsSlugs(l){t.posts.slugs=l,e()},setPostsUsedSlugs(l){t.posts.usedSlugs.push(...l),e()},setOnlyOneSlug(l){t.posts.usedSlugs=[l],e()},removePostsUsedSlugs(l){t.posts.usedSlugs=t.posts.usedSlugs.filter((e=>!l.includes(e))),e()}};return{getSelectors(){return l},getActions(){return o},subscribe(t){e=t}}})());var Io=e=>{var t;let{post:l,attributes:o,author:a,category:n,categoriesList:r}=e;return l?(0,i.createElement)("div",{className:"o-featured-container"},(0,i.createElement)("div",{className:"o-featured-post"},o.displayFeaturedImage&&(0,i.createElement)(Ro,{id:l.featured_media,link:l.link,alt:null===(t=l.title)||void 0===t?void 0:t.rendered,imgStyle:{borderRadius:void 0!==o.borderRadius?o.borderRadius+"px":void 0}}),(0,i.createElement)("div",{className:"o-posts-grid-post-body"},o.template.map((e=>{var t;const s=r&&0<(null==l||null===(t=l.categories)||void 0===t?void 0:t.length)?r.filter((e=>l.categories.includes(e.id))):[];switch(e){case"category":return(0,i.createElement)(Fo,{attributes:o,element:e,category:n,categoriesList:r});case"title":return(0,i.createElement)(Ao,{attributes:o,element:e,post:l});case"meta":return(0,i.createElement)(Ho,{attributes:o,element:e,post:l,author:a,categories:s});case"description":return(0,i.createElement)(Oo,{attributes:o,element:e,post:l});default:return(0,Ie.applyFilters)("otter.postsBlock.templateLoop","",e,o)}}))))):""};const{attributes:Do}=go,Go=e=>(0,K.isNumber)(e)?(e=>e?`${e}px`:e)(e):e;const{name:$o}=go;(0,a.registerBlockType)($o,{...go,title:(0,o.__)("Posts","otter-blocks"),description:(0,o.__)("Display a list of your most recent posts in a beautiful layout. Powered by Otter.","otter-blocks"),icon:r.postsIcon,keywords:["posts","grid","news"],deprecated:vo,edit:e=>{let{attributes:t,setAttributes:l,clientId:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,Do);return()=>e(t.id)}),[t.id]);const[n,r]=(0,i.useState)([]),{posts:d,categoriesList:u,authors:b}=(0,v.useSelect)((e=>{const l=t.categories&&0<t.categories.length?t.categories.map((e=>e.id)):[],o=(0,K.pickBy)({categories:l,order:t.order,orderby:t.orderBy,per_page:t.postsToShow,offset:t.offset,context:"view"},(e=>!(0,K.isUndefined)(e))),a=t.postTypes;return{posts:0<a.length?a.map((t=>e("core").getEntityRecords("postType",t,o))).flat():e("core").getEntityRecords("postType","post",o),categoriesList:e("core").getEntityRecords("taxonomy","category",{per_page:100,context:"view"}),authors:e("core").getUsers({who:"authors",context:"view"})}}),[t.categories,t.order,t.orderBy,t.postsToShow,t.offset,t.postTypes]),{responsiveGetAttributes:m}=S();(0,i.useEffect)((()=>{(async()=>{r(await(0,x.R3)())})()}),[]),(0,i.useEffect)((()=>{(0,v.dispatch)("otter-store").setPostsSlugs(n)}),[n]);const p=e=>(0,L.getDefaultValueByField)({name:name,field:e,defaultAttributes:Do,attributes:t}),g=p("imageBoxShadow"),h=p("boxShadow"),y={"--img-border-radius":(k=t.borderRadius,(0,K.isObject)(k)?(0,x.bv)(k):Go(k)),"--img-box-shadow":g.active&&`${g.horizontal}px ${g.vertical}px ${g.blur}px ${g.spread}px ${(0,x.rW)(g.color,g.colorOpacity)}`,"--border-width":Go(t.borderWidth),"--border-radius":(0,x.bv)(t.cardBorderRadius),"--box-shadow":h.active&&`${h.horizontal}px ${h.vertical}px ${h.blur}px ${h.spread}px ${(0,x.rW)(h.color,h.colorOpacity)}`,"--vert-align":(0,x.Vg)(t.verticalAlign),"--text-align":t.textAlign,"--text-color":t.textColor,"--background-color":t.backgroundColor,"--border-color":t.borderColor,"--content-gap":t.contentGap,"--img-width":m([Go(t.imageWidth),t.imageWidthTablet,t.imageWidthMobile]),"--img-width-tablet":t.imageWidthTablet,"--img-width-mobile":t.imageWidthMobile,"--title-text-size":m([Go(t.customTitleFontSize),Go(t.customTitleFontSizeTablet),Go(t.customTitleFontSizeTablet)]),"--title-text-size-tablet":Go(t.customTitleFontSizeTablet),"--title-text-size-mobile":Go(t.customTitleFontSizeMobile),"--description-text-size":m([Go(t.customDescriptionFontSize),Go(t.customDescriptionFontSizeTablet),Go(t.customDescriptionFontSizeMobile)]),"--description-text-size-tablet":Go(t.customDescriptionFontSizeTablet),"--description-text-size-mobile":Go(t.customDescriptionFontSizeMobile),"--meta-text-size":m([t.customMetaFontSize,t.customMetaFontSizeTablet,t.customMetaFontSizeMobile]),"--meta-text-size-tablet":t.customMetaFontSizeTablet,"--meta-text-size-mobile":t.customMetaFontSizeMobile,"--column-gap":m([t.columnGap,t.columnGapTablet,t.columnGapMobile]),"--column-gap-tablet":t.columnGapTablet,"--column-gap-mobile":t.columnGapMobile,"--row-gap":m([t.rowGap,t.rowGapTablet,t.rowGapMobile]),"--row-gap-tablet":t.rowGapTablet,"--row-gap-mobile":t.rowGapMobile,"--content-padding":m([t.padding,t.paddingTablet,t.paddingMobile]),"--content-padding-tablet":t.paddingTablet,"--content-padding-mobile":t.paddingMobile};var k;const f=(0,s.useBlockProps)();return(0,i.createElement)(i.Fragment,null,u&&(0,i.createElement)(Lo,{attributes:t,setAttributes:l,categoriesList:u}),(0,i.createElement)(yo,{attributes:t,setAttributes:l}),(0,i.createElement)((e=>{let{posts:t,categoriesList:l,authors:a,blockProps:n,inlineStyles:r,attributes:s}=e;return t&&l&&a?0===t.length?(0,i.createElement)("div",n,(0,i.createElement)(c.Placeholder,null,(0,o.__)("No Posts","otter-blocks"))):(0,i.createElement)("div",(0,J.Z)({},n,{style:r}),(0,i.createElement)(c.Disabled,null,s.enableFeaturedPost&&(0,i.createElement)(Io,{attributes:s,post:null==t?void 0:t[0],category:l[0],categoriesList:l,author:a[0]}),(0,i.createElement)(No,{attributes:s,posts:t,categoriesList:l,authors:a}))):(0,i.createElement)("div",n,(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null),(0,o.__)("Loading Posts","otter-blocks")))}),{posts:d,categoriesList:u,authors:b,blockProps:f,inlineStyles:y,attributes:t}))},save:()=>null,example:{attributes:{}}});var Wo=JSON.parse('{"kQ":"\x3c!-- wp:themeisle-blocks/advanced-columns {\\"id\\":\\"wp-block-themeisle-blocks-advanced-columns-e0e1ab2e\\",\\"columns\\":3,\\"layout\\":\\"equal\\",\\"layoutMobile\\":\\"collapsedRows\\",\\"padding\\":{\\"top\\":\\"80px\\",\\"bottom\\":\\"80px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"paddingTablet\\":{\\"top\\":\\"40px\\",\\"bottom\\":\\"40px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"margin\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\"},\\"columnsWidth\\":1170,\\"horizontalAlign\\":\\"center\\",\\"verticalAlign\\":\\"flex-start\\",\\"backgroundPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"backgroundOverlayPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"columnsHTMLTag\\":\\"section\\",\\"align\\":\\"full\\"} --\x3e\\n<section id=\\"wp-block-themeisle-blocks-advanced-columns-e0e1ab2e\\" class=\\"wp-block-themeisle-blocks-advanced-columns alignfull has-3-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-collapsedRows-layout has-vertical-flex-start\\"><div class=\\"wp-block-themeisle-blocks-advanced-columns-overlay\\"></div><div class=\\"innerblocks-wrap\\">\x3c!-- wp:themeisle-blocks/advanced-column {\\"id\\":\\"wp-block-themeisle-blocks-advanced-column-43e17023\\",\\"padding\\":{\\"top\\":\\"32px\\",\\"bottom\\":\\"32px\\",\\"left\\":\\"32px\\",\\"right\\":\\"32px\\"},\\"paddingTablet\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"paddingMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"margin\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"marginMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"backgroundPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"borderRadius\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"boxShadow\\":true,\\"boxShadowColorOpacity\\":10,\\"boxShadowBlur\\":80,\\"boxShadowVertical\\":2,\\"columnWidth\\":\\"33.33\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-advanced-column-43e17023\\" class=\\"wp-block-themeisle-blocks-advanced-column\\">\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-cd4d5bb0\\",\\"tag\\":\\"h3\\",\\"align\\":\\"center\\",\\"marginBottom\\":8} --\x3e\\n<h3 id=\\"wp-block-themeisle-blocks-advanced-heading-cd4d5bb0\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-cd4d5bb0\\">Essential</h3>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-7d521980\\",\\"tag\\":\\"span\\",\\"align\\":\\"center\\",\\"fontSize\\":48} --\x3e\\n<span id=\\"wp-block-themeisle-blocks-advanced-heading-7d521980\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-7d521980\\"><strong>$59</strong></span>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-ee4f525b\\",\\"tag\\":\\"p\\",\\"align\\":\\"center\\",\\"headingColor\\":\\"#9b9b9b\\",\\"fontSize\\":15} --\x3e\\n<p id=\\"wp-block-themeisle-blocks-advanced-heading-ee4f525b\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-ee4f525b\\">Party snackwave four dollar toast tumeric cold-pressed.</p>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:buttons {\\"layout\\":{\\"type\\":\\"flex\\",\\"justifyContent\\":\\"center\\",\\"orientation\\":\\"horizontal\\"}} --\x3e\\n<div class=\\"wp-block-buttons\\">\x3c!-- wp:button {\\"width\\":100,\\"className\\":\\"is-style-primary\\"} --\x3e\\n<div class=\\"wp-block-button has-custom-width wp-block-button__width-100 is-style-primary\\"><a class=\\"wp-block-button__link\\">Get Started</a></div>\\n\x3c!-- /wp:button --\x3e</div>\\n\x3c!-- /wp:buttons --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":10} --\x3e\\n<div style=\\"height:10px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e\\n\\n\x3c!-- wp:separator {\\"color\\":\\"nv-light-bg\\",\\"className\\":\\"is-style-default\\"} --\x3e\\n<hr class=\\"wp-block-separator has-text-color has-background has-nv-light-bg-background-color has-nv-light-bg-color is-style-default\\"/>\\n\x3c!-- /wp:separator --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-1806e8e7\\",\\"defaultIcon\\":\\"check\\",\\"defaultIconColor\\":\\"var(\\\\u002d\\\\u002dnv-primary-accent)\\",\\"defaultSize\\":16,\\"gap\\":10} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-1806e8e7\\" class=\\"wp-block-themeisle-blocks-icon-list\\">\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-26b966e4\\",\\"content\\":\\"Custom Layouts \\\\u0026amp; Hooks\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-26b966e4\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Custom Layouts & Hooks</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-4aebde54\\",\\"content\\":\\"Unlimited Website Usage\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-4aebde54\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Unlimited Website Usage</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-64264549\\",\\"content\\":\\"Risk-Free Guarantee\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-64264549\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Risk-Free Guarantee</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/icon-list --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":20} --\x3e\\n<div style=\\"height:20px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/advanced-column --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-column {\\"id\\":\\"wp-block-themeisle-blocks-advanced-column-2489d76c\\",\\"padding\\":{\\"top\\":\\"32px\\",\\"bottom\\":\\"32px\\",\\"left\\":\\"32px\\",\\"right\\":\\"32px\\"},\\"paddingTablet\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"paddingMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"margin\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"marginMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"backgroundPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"borderRadius\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"boxShadow\\":true,\\"boxShadowColorOpacity\\":10,\\"boxShadowBlur\\":80,\\"boxShadowVertical\\":2,\\"columnWidth\\":\\"33.33\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-advanced-column-2489d76c\\" class=\\"wp-block-themeisle-blocks-advanced-column\\">\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-e30ccf77\\",\\"tag\\":\\"h3\\",\\"align\\":\\"center\\",\\"marginBottom\\":8} --\x3e\\n<h3 id=\\"wp-block-themeisle-blocks-advanced-heading-e30ccf77\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-e30ccf77\\">Business</h3>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-01f7ed6b\\",\\"tag\\":\\"span\\",\\"align\\":\\"center\\",\\"fontSize\\":48} --\x3e\\n<span id=\\"wp-block-themeisle-blocks-advanced-heading-01f7ed6b\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-01f7ed6b\\"><strong>$129</strong></span>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-fe18de7e\\",\\"tag\\":\\"p\\",\\"align\\":\\"center\\",\\"headingColor\\":\\"#9b9b9b\\",\\"fontSize\\":15} --\x3e\\n<p id=\\"wp-block-themeisle-blocks-advanced-heading-fe18de7e\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-fe18de7e\\">Party snackwave four dollar toast tumeric cold-pressed.</p>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:buttons {\\"layout\\":{\\"type\\":\\"flex\\",\\"justifyContent\\":\\"center\\",\\"orientation\\":\\"horizontal\\"}} --\x3e\\n<div class=\\"wp-block-buttons\\">\x3c!-- wp:button {\\"width\\":100,\\"className\\":\\"is-style-primary\\"} --\x3e\\n<div class=\\"wp-block-button has-custom-width wp-block-button__width-100 is-style-primary\\"><a class=\\"wp-block-button__link\\">Get Started</a></div>\\n\x3c!-- /wp:button --\x3e</div>\\n\x3c!-- /wp:buttons --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":10} --\x3e\\n<div style=\\"height:10px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e\\n\\n\x3c!-- wp:separator {\\"color\\":\\"nv-light-bg\\",\\"className\\":\\"is-style-default\\"} --\x3e\\n<hr class=\\"wp-block-separator has-text-color has-background has-nv-light-bg-background-color has-nv-light-bg-color is-style-default\\"/>\\n\x3c!-- /wp:separator --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-fb8b7e9c\\",\\"defaultIcon\\":\\"check\\",\\"defaultIconColor\\":\\"var(\\\\u002d\\\\u002dnv-primary-accent)\\",\\"defaultSize\\":16,\\"gap\\":10} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-fb8b7e9c\\" class=\\"wp-block-themeisle-blocks-icon-list\\">\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-78a49dfc\\",\\"content\\":\\"Custom Layouts \\\\u0026amp; Hooks\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-78a49dfc\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Custom Layouts & Hooks</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-f341b063\\",\\"content\\":\\"Unlimited Website Usage\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-f341b063\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Unlimited Website Usage</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-8216d9b3\\",\\"content\\":\\"Risk-Free Guarantee\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-8216d9b3\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Risk-Free Guarantee</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/icon-list --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":20} --\x3e\\n<div style=\\"height:20px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/advanced-column --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-column {\\"id\\":\\"wp-block-themeisle-blocks-advanced-column-09158d16\\",\\"padding\\":{\\"top\\":\\"32px\\",\\"bottom\\":\\"32px\\",\\"left\\":\\"32px\\",\\"right\\":\\"32px\\"},\\"paddingTablet\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"paddingMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"margin\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"marginMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"backgroundPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"borderRadius\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"boxShadow\\":true,\\"boxShadowColorOpacity\\":10,\\"boxShadowBlur\\":80,\\"boxShadowVertical\\":2,\\"columnWidth\\":\\"33.33\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-advanced-column-09158d16\\" class=\\"wp-block-themeisle-blocks-advanced-column\\">\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-b3766bd8\\",\\"tag\\":\\"h3\\",\\"align\\":\\"center\\",\\"marginBottom\\":8} --\x3e\\n<h3 id=\\"wp-block-themeisle-blocks-advanced-heading-b3766bd8\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-b3766bd8\\">VIP</h3>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-e601353c\\",\\"tag\\":\\"span\\",\\"align\\":\\"center\\",\\"fontSize\\":48} --\x3e\\n<span id=\\"wp-block-themeisle-blocks-advanced-heading-e601353c\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-e601353c\\"><strong>$199</strong></span>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-39d2e261\\",\\"tag\\":\\"p\\",\\"align\\":\\"center\\",\\"headingColor\\":\\"#9b9b9b\\",\\"fontSize\\":15} --\x3e\\n<p id=\\"wp-block-themeisle-blocks-advanced-heading-39d2e261\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-39d2e261\\">Party snackwave four dollar toast tumeric cold-pressed.</p>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:buttons {\\"layout\\":{\\"type\\":\\"flex\\",\\"justifyContent\\":\\"center\\",\\"orientation\\":\\"horizontal\\"}} --\x3e\\n<div class=\\"wp-block-buttons\\">\x3c!-- wp:button {\\"width\\":100,\\"className\\":\\"is-style-primary\\"} --\x3e\\n<div class=\\"wp-block-button has-custom-width wp-block-button__width-100 is-style-primary\\"><a class=\\"wp-block-button__link\\">Get Started</a></div>\\n\x3c!-- /wp:button --\x3e</div>\\n\x3c!-- /wp:buttons --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":10} --\x3e\\n<div style=\\"height:10px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e\\n\\n\x3c!-- wp:separator {\\"color\\":\\"nv-light-bg\\",\\"className\\":\\"is-style-default\\"} --\x3e\\n<hr class=\\"wp-block-separator has-text-color has-background has-nv-light-bg-background-color has-nv-light-bg-color is-style-default\\"/>\\n\x3c!-- /wp:separator --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-2c744428\\",\\"defaultIcon\\":\\"check\\",\\"defaultIconColor\\":\\"var(\\\\u002d\\\\u002dnv-primary-accent)\\",\\"defaultSize\\":16,\\"gap\\":10} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-2c744428\\" class=\\"wp-block-themeisle-blocks-icon-list\\">\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-b78d20f0\\",\\"content\\":\\"Custom Layouts \\\\u0026amp; Hooks\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-b78d20f0\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Custom Layouts & Hooks</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-14fe631b\\",\\"content\\":\\"Unlimited Website Usage\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-14fe631b\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Unlimited Website Usage</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-0ce7030d\\",\\"content\\":\\"Risk-Free Guarantee\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-0ce7030d\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Risk-Free Guarantee</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/icon-list --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":20} --\x3e\\n<div style=\\"height:20px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/advanced-column --\x3e</div></section>\\n\x3c!-- /wp:themeisle-blocks/advanced-columns --\x3e"}');const{getBlockType:Zo}=(0,v.select)("core/blocks"),jo=()=>{const e=setInterval((()=>{if(void 0===Zo("themeisle-blocks/advanced-columns"))return jo();const t=(0,a.parse)(Wo.kQ);(0,a.registerBlockVariation)("themeisle-blocks/advanced-columns",{name:"themeisle-blocks/section-pricing",title:(0,o.__)("Pricing Section","otter-blocks"),icon:r.pricingIcon,scope:"inserter",attributes:t[0].attributes,innerBlocks:t[0].innerBlocks,example:{attributes:t[0].attributes,innerBlocks:t[0].innerBlocks}}),clearInterval(e)}),2e3)};jo();var Uo=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/progress-bar","title":"Progress Bar","category":"themeisle-blocks","description":"Show your progress with a beautiful Progress Bar block. Powered by Otter.","keywords":["progress","bar","skills"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"title":{"type":"string","default":"Skill"},"percentage":{"type":"number","default":50},"duration":{"type":"number","default":2},"titleStyle":{"type":"string","default":"default"},"percentagePosition":{"type":"string","default":"default"},"height":{"type":"number","default":30},"borderRadius":{"type":"number"},"backgroundColor":{"type":"string"},"barBackgroundColor":{"type":"string"},"titleColor":{"type":"string"},"percentageColor":{"type":"string"},"titleFontSize":{"type":"string"}},"editorStyle":"otter-progress-bar-editor","style":"otter-progress-bar-style","script":"otter-progress-bar"}');const qo=[{name:(0,o.__)("Small","otter-blocks"),size:"0.875em",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"1em",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"1.125em",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"1.25em",slug:"xl"}];var Jo=e=>{let{attributes:t,setAttributes:l,onHeightChange:a,heightMode:n,setHeightMode:r}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),value:t.title,onChange:e=>{l({title:e})}}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Percentage","otter-blocks"),help:(0,o.__)("The value of the progress bar.","otter-blocks"),value:t.percentage,onChange:e=>{void 0!==e&&(e=(0,K.clamp)(e,0,100),l({percentage:e}))},min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Duration","otter-blocks"),help:(0,o.__)("The duration of the animation.","otter-blocks"),value:t.duration,onChange:e=>{void 0!==e&&(e=(0,K.clamp)(e,0,3),l({duration:e}))},min:0,max:3,step:.1})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:t.titleColor,onChange:e=>l({titleColor:e}),label:(0,o.__)("Title","otter-blocks")},{value:t.barBackgroundColor,onChange:e=>l({barBackgroundColor:e}),label:(0,o.__)("Progress","otter-blocks")},{value:t.percentageColor,onChange:e=>l({percentageColor:e}),label:(0,o.__)("Percentage","otter-blocks")},{value:t.backgroundColor,onChange:e=>l({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks"),initialOpen:!1},30<=t.height&&(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Title Style","otter-blocks"),value:t.titleStyle,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Highlight","otter-blocks"),value:"highlight"},{label:(0,o.__)("Outer","otter-blocks"),value:"outer"}],onChange:e=>{l({titleStyle:e})}}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Show Percentage","otter-blocks"),value:t.percentagePosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Append","otter-blocks"),value:"append"},{label:(0,o.__)("Tooltip","otter-blocks"),value:"tooltip"},{label:(0,o.__)("Outer","otter-blocks"),value:"outer"},{label:(0,o.__)("Hide","otter-blocks"),value:"hide"}],onChange:e=>{n.isAutomatic&&(n.percentagePosition=e,r({...n})),l({percentagePosition:e})}}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Height","otter-blocks"),help:(0,o.__)("The height of the progress bar.","otter-blocks"),value:t.height,onChange:a,step:.1,min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),help:(0,o.__)("Round the corners of the progress bar.","otter-blocks"),value:t.borderRadius,onChange:e=>{l({borderRadius:e})},step:.1,initialPosition:5,min:0,max:35}),("outer"===t.titleStyle||"tooltip"===t.percentagePosition&&"outer"===t.percentagePosition)&&(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Outer Text Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:qo,withReset:!0,value:t.titleFontSize,onChange:e=>l({titleFontSize:e})}))))};const{attributes:Ko}=Uo;const Yo={to:[{type:"block",blocks:["themeisle-blocks/circle-counter"],transform:e=>{const t=(0,K.omit)(e,["titleStyle","percentagePosition","height","borderRadius","barBackgroundColor","percentageColor"]);return(0,a.createBlock)("themeisle-blocks/circle-counter",{...t,progressColor:e.barBackgroundColor,height:(0,K.clamp)(4*e.height,0,240),titleStyle:"default"})}}]};var Qo=Yo;const{name:Xo}=Uo;(0,a.registerBlockType)(Xo,{...Uo,title:(0,o.__)("Progress Bar","otter-blocks"),description:(0,o.__)("Show your progress with a beautiful Progress Bar block. Powered by Otter.","otter-blocks"),icon:"minus",keywords:["progress","bar","skills"],transforms:Qo,edit:e=>{let{attributes:t,setAttributes:l,isSelected:o,clientId:a,toggleSelection:n}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,Ko);return()=>e(t.id)}),[t.id]);const r=(0,i.useRef)(null),[d,u]=(0,i.useState)(!1),[b,m]=(0,i.useState)({isAutomatic:!1,titleStyle:t.titleStyle,percentagePosition:t.percentagePosition}),p=(0,i.useRef)(null);(0,i.useEffect)((()=>{let e=null;if(p.current)return u(!1),e=setTimeout((()=>u(!0)),1e3*t.duration),p.current.animate({width:`${t.percentage}%`},{duration:1e3*t.duration,easing:"linear",fill:"forwards"}),()=>{clearTimeout(e)}}),[t.percentage,t.duration]);const h={"--title-color":t.titleColor,"--percentage-color":t.percentageColor,"--percentage-color-outer":t.percentageColor,"--percentage-color-tooltip":t.percentageColor,"--percentage-color-append":t.percentageColor,"--background-color":t.backgroundColor,"--border-radius":void 0!==t.borderRadius&&t.borderRadius+"px","--height":void 0!==t.height&&t.height+"px","--bar-background":t.barBackgroundColor,"--title-font-size":t.titleFontSize},v=e=>{30>e?(b.isAutomatic||m({isAutomatic:!0,titleStyle:t.titleStyle,percentagePosition:t.percentagePosition}),l({height:e,titleStyle:"outer",percentagePosition:"append"===t.percentagePosition||"default"===t.percentagePosition?"outer":t.percentagePosition})):(b.isAutomatic&&m({isAutomatic:!1}),l({titleStyle:b.isAutomatic?b.titleStyle:t.titleStyle,percentagePosition:b.isAutomatic?b.percentagePosition:t.percentagePosition,height:e}))},y=(0,s.useBlockProps)({id:t.id,className:g()({"has-tooltip":"tooltip"===t.percentagePosition}),style:h});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Jo,{attributes:t,setAttributes:l,onHeightChange:v,heightMode:b,setHeightMode:m}),(0,i.createElement)("div",y,("outer"===t.titleStyle||"outer"===t.percentagePosition)&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer"},"outer"===t.titleStyle&&(0,i.createElement)(s.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-progress-bar__outer__title",value:t.title,onChange:e=>l({title:e})}),"outer"===t.percentagePosition&&d&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer__value wp-block-themeisle-blocks-progress-bar__number"},`${t.percentage}%`)),(0,i.createElement)(c.ResizableBox,{size:{height:t.height},minHeight:5,maxHeight:100,enable:{top:!1,right:!1,bottom:!0,left:!1},showHandle:o,onResizeStop:(e,l,o,a)=>{v(parseInt(t.height+a.height,10)),n(!0)},onResizeStart:()=>{n(!1)}},(0,i.createElement)("div",{ref:r,className:"wp-block-themeisle-blocks-progress-bar__area"},("default"===t.titleStyle||"highlight"===t.titleStyle)&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-progress-bar__area__title",{highlight:"highlight"===t.titleStyle})},(0,i.createElement)(s.RichText,{tagName:"span",allowedFormats:[],value:t.title,onChange:e=>l({title:e})})),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area__bar show",ref:p},"tooltip"===t.percentagePosition&&d&&(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__tooltip show"},`${t.percentage}%`,(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__arrow"})),"append"===t.percentagePosition&&d&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress__append show"},`${t.percentage}%`)),"default"===t.percentagePosition&&d&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress"},`${t.percentage}%`)))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,className:g()({"has-tooltip":"tooltip"===t.percentagePosition}),"data-percent":t.percentage,"data-duration":t.duration});return(0,i.createElement)("div",l,("outer"===t.titleStyle||"outer"===t.percentagePosition)&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer"},"outer"===t.titleStyle&&(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__outer__title"},t.title),"outer"===t.percentagePosition&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer__value wp-block-themeisle-blocks-progress-bar__number"},t.percentage)),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area"},("default"===t.titleStyle||"highlight"===t.titleStyle)&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-progress-bar__area__title",{highlight:"highlight"===t.titleStyle})},(0,i.createElement)("span",null,t.title)),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area__bar"},"tooltip"===t.percentagePosition&&(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__tooltip"},(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__number"},t.percentage),(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__arrow"})),"append"===t.percentagePosition&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress__append wp-block-themeisle-blocks-progress-bar__number"},t.percentage)),"default"===t.percentagePosition&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress wp-block-themeisle-blocks-progress-bar__number"},`${t.percentage}%`)))},example:{}});var ea=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/review","title":"Product Review","category":"themeisle-blocks","description":"Turn your posts into smart reviews with ratings and generate leads with a performing review block. Powered by Otter.","keywords":["product","review","stars"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"title":{"type":"string"},"currency":{"type":"string","default":"USD"},"price":{"type":"number"},"discounted":{"type":"number"},"image":{"type":"object"},"description":{"type":"string"},"features":{"type":"array","default":[{"title":"Stability","rating":9},{"title":"Ease of Use","rating":4},{"title":"Look & Feel","rating":9},{"title":"Price","rating":7}]},"pros":{"type":"array","default":["Easy to use","Good price","Sturdy build and ergonomics"]},"cons":{"type":"array","default":["Incompatible with old versions","Hard to assemble","Bad color combination"]},"links":{"type":"array","default":[{"label":"Buy on Amazon","href":"","isSponsored":false},{"label":"Buy on eBay","href":"","isSponsored":false}]},"prosLabel":{"type":"string","default":"Pros"},"consLabel":{"type":"string","default":"Cons"},"buttonsLabel":{"type":"string","default":"Buy this Product"},"imageWidth":{"type":"number"},"mainHeading":{"type":"string"},"subHeading":{"type":"string"},"contentFontSize":{"type":"string"},"primaryColor":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"buttonTextColor":{"type":"string"},"borderColor":{"type":"string"},"starsColor":{"type":"string"},"prosColor":{"type":"string"},"consColor":{"type":"string"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"borderWidth":{"type":"number"},"borderRadius":{"type":"number"},"boxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"isSynced":{"type":"array"}},"supports":{"align":["full","wide"],"html":false},"editorStyle":"otter-review-editor","style":"otter-review-style"}'),ta=l(1463),la=l.n(ta);const oa=[{label:(0,o.__)("Default","otter-blocks"),value:"default",isDefault:!0},{label:(0,o.__)("Boxed","otter-blocks"),value:"boxed"}],aa=[{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"}],na=[{name:(0,o.__)("XS","otter-blocks"),size:"14px",slug:"xs"},{name:(0,o.__)("Small","otter-blocks"),size:"16px",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"18px",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"24px",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"28px",slug:"xl"}],ra=e=>{let{title:t,remove:l,children:a}=e;const[n,r]=(0,i.useState)(!1);return(0,i.createElement)("div",{className:"o-review__inspector_panel_item"},(0,i.createElement)("div",{className:"o-review__inspector_panel_item__header"},(0,i.createElement)(c.Button,{className:"o-review__inspector_panel_item__title",onClick:()=>r(!n)},t),(0,i.createElement)(c.Button,{icon:"no-alt",label:(0,o.__)("Remove","otter-blocks"),showTooltip:!0,className:"o-review__inspector_panel_item__arrow",onClick:l})),n&&(0,i.createElement)("div",{className:"o-review__inspector_panel_item__content"},a))};var ia=e=>{var t,l,a,n,r,d;let{attributes:u,setAttributes:b,getValue:m,productAttributes:p}=e;const[g,h]=(0,i.useState)("settings"),{responsiveSetAttributes:v,responsiveGetAttributes:y}=S(b),k=e=>{const t=[...u.features];switch(e.action){case"add":t.push({title:(0,o.__)("Feature","otter-blocks"),rating:9});break;case"remove":t.splice(e.index,1);break;case"update":t[e.index]={...t[e.index],...e.value}}b({features:t})},_=e=>{const t=[...u[e.type]];switch(e.action){case"add":t.push("");break;case"remove":t.splice(e.index,1);break;case"update":t[e.index]=e.value}b({[e.type]:t})},B=e=>{const t=[...u.links];switch(e.action){case"add":t.push({label:(0,o.__)("Buy Now","otter-blocks"),href:""});break;case"remove":t.splice(e.index,1);break;case"update":t[e.index]={...t[e.index],...e.value}}b({links:t})};return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:g,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:h}),"settings"===g&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(E.Z,{label:(0,o.__)("Column Structure","otter-blocks"),options:[{label:(0,o.__)("One Column","otter-blocks"),value:"is-style-single-column"},{label:(0,o.__)("Two Columns","otter-blocks"),value:"default"}],value:null!=u&&null!==(t=u.className)&&void 0!==t&&t.includes("is-style-single-column")?"is-style-single-column":"default",onChange:e=>{var t;const l=(null==u||null===(t=u.className)||void 0===t?void 0:t.split(" "))||[];"default"===e&&l.includes("is-style-single-column")?l.splice(l.indexOf("is-style-single-column"),1):"is-style-single-column"!==e||l.includes("is-style-single-column")||l.push("is-style-single-column"),b({className:l.join(" ")})}}),(u.image||(null==p?void 0:p.image))&&(0,i.createElement)(E.Z,{label:(0,o.__)("Image Width","otter-blocks"),options:[{label:(0,o.__)("25%","otter-blocks"),value:25},{label:(0,o.__)("33%","otter-blocks"),value:33},{label:(0,o.__)("50%","otter-blocks"),value:50},{label:(0,o.__)("100%","otter-blocks"),value:100}],value:u.imageWidth||33,onChange:e=>b({imageWidth:Number(e)})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Product Details","otter-blocks"),initialOpen:!1},u.product&&(0,i.createElement)(c.Notice,{status:"warning",isDismissible:!1,className:"o-html-anchor-control-notice"},(0,o.__)("WooCommerce product synchronization is active. Some options might be disabled.","otter-blocks")),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Product Name","otter-blocks"),type:"text",placeholder:(0,o.__)("Name of your product…","otter-blocks"),value:(null==p?void 0:p.title)||u.title,disabled:u.product,onChange:e=>b({title:e})}),(0,i.createElement)(c.BaseControl,null,(0,i.createElement)(c.TextControl,{label:(0,o.__)("Currency","otter-blocks"),type:"text",placeholder:(0,o.__)("Currency code, like USD or EUR.","otter-blocks"),value:(null==p?void 0:p.currency)||u.currency,disabled:u.product,onChange:e=>b({currency:e})}),(0,o.__)("Currency code in three digit ISO 4217 code.","otter-blocks")+" ",(0,i.createElement)(c.ExternalLink,{href:"https://en.wikipedia.org/wiki/ISO_4217#Active_codes"},(0,o.__)("List of ISO 4217 codes.","otter-blocks"))),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Price","otter-blocks"),type:"number",value:(null==p?void 0:p.price)||u.price,disabled:u.product,onChange:e=>b({price:""!==e?Number(e):void 0})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Discounted Price","otter-blocks"),type:"number",value:(null==p?void 0:p.discounted)||u.discounted,disabled:u.product,onChange:e=>b({discounted:""!==e?Number(e):void 0})}),u.image||null!=p&&p.image?(0,i.createElement)(c.BaseControl,{className:"o-review__inspector_image"},(0,i.createElement)("img",{src:(null==p||null===(l=p.image)||void 0===l?void 0:l.url)||u.image.url,alt:(null==p||null===(a=p.image)||void 0===a?void 0:a.url)||u.image.alt}),(0,i.createElement)(c.Button,{isSecondary:!0,onClick:()=>b({image:void 0}),disabled:u.product},(0,o.__)("Remove image","otter-blocks"))):(0,i.createElement)(s.MediaPlaceholder,{labels:{title:(0,o.__)("Product Image","otter-blocks")},accept:"image/*",allowedTypes:["image"],value:u.image,onSelect:e=>b({image:(0,K.pick)(e,["id","alt","url"])})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Product Features","otter-blocks"),initialOpen:!1},0<u.features.length&&u.features.map(((e,t)=>(0,i.createElement)(ra,{key:t,title:e.title||(0,o.__)("Feature","otter-blocks"),remove:()=>k({action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("Feature title","otter-blocks"),value:e.title,onChange:e=>k({action:"update",index:t,value:{title:e}})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Rating","otter-blocks"),value:e.rating,onChange:e=>k({action:"update",index:t,value:{rating:Number(e)}}),step:.1,min:1,max:10})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"o-review__inspector_add",onClick:()=>k({action:"add"})},(0,o.__)("Add Feature","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Pros","otter-blocks"),initialOpen:!1},0<u.pros.length&&u.pros.map(((e,t)=>(0,i.createElement)(ra,{key:t,title:e||(0,o.__)("Pro","otter-blocks"),remove:()=>_({type:"pros",action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("Why do you like the product?","otter-blocks"),value:e,onChange:e=>_({type:"pros",action:"update",index:t,value:e})})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"o-review__inspector_add",onClick:()=>_({type:"pros",action:"add"})},(0,o.__)("Add Item","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Cons","otter-blocks"),initialOpen:!1},0<u.cons.length&&u.cons.map(((e,t)=>(0,i.createElement)(ra,{key:t,title:e||(0,o.__)("Con","otter-blocks"),remove:()=>_({type:"cons",action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("What can be improved?","otter-blocks"),value:e,onChange:e=>_({type:"cons",action:"update",index:t,value:e})})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"o-review__inspector_add",onClick:()=>_({type:"cons",action:"add"})},(0,o.__)("Add Item","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Buttons","otter-blocks"),initialOpen:!1},u.product&&(0,i.createElement)(c.Notice,{status:"warning",isDismissible:!1,className:"o-html-anchor-control-notice"},(0,o.__)("WooCommerce product synchronization is active. Some options might be disabled.","otter-blocks")),0<(null==p||null===(n=p.links)||void 0===n?void 0:n.length)&&(null==p||null===(r=p.links)||void 0===r?void 0:r.map(((e,t)=>(0,i.createElement)(ra,{key:t,title:e.label||(0,o.__)("Link","otter-blocks"),remove:()=>B({action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),type:"text",placeholder:(0,o.__)("Button label","otter-blocks"),disabled:u.product,value:e.label}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Link","otter-blocks"),type:"url",placeholder:"https://…",value:e.href,disabled:u.product}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Is this Sponsored?","otter-blocks"),checked:e.isSponsored,disabled:u.product}))))),!(0<(null==p||null===(d=p.links)||void 0===d?void 0:d.length))&&(0,i.createElement)(i.Fragment,null,0<u.links.length&&u.links.map(((e,t)=>(0,i.createElement)(ra,{key:t,title:e.label||(0,o.__)("Link","otter-blocks"),remove:()=>B({action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),type:"text",placeholder:(0,o.__)("Button label","otter-blocks"),value:e.label,onChange:e=>B({action:"update",index:t,value:{label:e}})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Link","otter-blocks"),type:"url",placeholder:"https://…",value:e.href,onChange:e=>B({action:"update",index:t,value:{href:e}})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Is this Sponsored?","otter-blocks"),checked:e.isSponsored,onChange:()=>B({action:"update",index:t,value:{isSponsored:!e.isSponsored}})})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"o-review__inspector_add",onClick:()=>B({action:"add"})},(0,o.__)("Add Links","otter-blocks")))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Labels","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Pros","otter-blocks"),value:u.prosLabel,onChange:e=>b({prosLabel:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Cons","otter-blocks"),value:u.consLabel,onChange:e=>b({consLabel:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Buttons","otter-blocks"),value:u.buttonsLabel,onChange:e=>b({buttonsLabel:e})}))),"style"===g&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks")},(0,i.createElement)(E.Z,{options:oa,value:(0,x.tB)(oa,null==u?void 0:u.className),onChange:e=>{const t=(0,x.L4)(null==u?void 0:u.className,oa,e);b({className:t})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Main Heading","otter-blocks"),help:(0,o.__)("Product Title HTML Tag","otter-blocks"),options:aa,value:u.mainHeading||"h2",onChange:e=>b({mainHeading:e})}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Sub Heading","otter-blocks"),help:(0,o.__)("Pros and Cons titles HTML Tag","otter-blocks"),options:aa,value:u.subHeading||"h3",onChange:e=>b({subHeading:e})}),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Content Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:na,withReset:!0,value:u.contentFontSize,onChange:e=>b({contentFontSize:e})}))),(0,i.createElement)(T.Z,{label:(0,o.__)("Color","otter-blocks"),isSynced:u.isSynced,options:[{label:(0,o.__)("Background","otter-blocks"),slug:"backgroundColor",value:m("backgroundColor")},{label:(0,o.__)("Text","otter-blocks"),slug:"textColor",value:m("textColor")},{label:(0,o.__)("Button","otter-blocks"),slug:"primaryColor",value:m("primaryColor")},{label:(0,o.__)("Button Text","otter-blocks"),slug:"buttonTextColor",value:m("buttonTextColor")},{label:(0,o.__)("Border","otter-blocks"),slug:"borderColor",value:m("borderColor")},{label:(0,o.__)("Stars","otter-blocks"),slug:"starsColor",value:m("starsColor")},{label:(0,o.__)("Pros","otter-blocks"),slug:"prosColor",value:m("prosColor")},{label:(0,o.__)("Cons","otter-blocks"),slug:"consColor",value:m("consColor")}],setAttributes:b},(0,i.createElement)(s.ContrastChecker,{textColor:m("textColor"),backgroundColor:m("backgroundColor")}),(0,i.createElement)(s.ContrastChecker,{textColor:m("buttonTextColor"),backgroundColor:m("primaryColor")})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:y([u.padding,u.paddingTablet,u.paddingMobile]),onChange:e=>v(e,["padding","paddingTablet","paddingMobile"]),allowReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Width","otter-blocks"),value:u.borderWidth,onChange:e=>b({borderWidth:e}),min:0,max:50,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Radius","otter-blocks"),value:u.borderRadius,onChange:e=>b({borderRadius:e}),min:0,max:100,allowReset:!0}),(0,i.createElement)(f.Z,{boxShadow:u.boxShadow,onChange:e=>{const t={...u.boxShadow};Object.entries(e).map((function(){let[l,o]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;t[l]=o})),b({boxShadow:t})}}))),!Boolean(window.themeisleGutenberg.hasPro)&&(0,i.createElement)(c.PanelBody,{title:(0,o.__)("More Features","otter-blocks"),initialOpen:!1},(0,i.createElement)(De.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"reviewblock")},(0,o.__)("Get more options with Otter Pro. ","otter-blocks")),variant:"upsell"})),(0,i.createElement)(C.p,null))};const{attributes:sa}=ea,ca=e=>e?`${e}px`:e,da=e=>{let{rating:t}=e;const l=[],o=Boolean(window.themeisleGutenberg.ratingScale)?2:1;for(let e=0;10/o>e;e++)l.push((0,i.createElement)(r.StarFilled,{key:e,className:g()({filled:e<Math.round(t/o)})}));return l};const{name:ua,attributes:ba}=ea;window.themeisleGutenberg.defaultReviewAttributes=ba,(0,a.registerBlockType)(ua,{...ea,title:(0,o.__)("Product Review","otter-blocks"),description:(0,o.__)("Turn your posts into smart reviews with ratings and generate leads with a performing review block. Powered by Otter.","otter-blocks"),icon:r.faIcon,keywords:["product","review","stars"],edit:e=>{var t,l,a,n,d,u,b,m,p,h,v,y,k,f,_,w,C,E;let{name:x,attributes:S,setAttributes:T,clientId:M,isSelected:B,status:z="isInactive",productAttributes:P={}}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(M,sa);return()=>e(S.id)}),[S.id]);const R=e=>(0,L.getDefaultValueByField)({name:x,field:e,defaultAttributes:sa,attributes:S}),F=(S.features.reduce(((e,t)=>e+t.rating),0)/S.features.length).toFixed(1),A=R("boxShadow"),H={"--background-color":R("backgroundColor"),"--primary-color":R("primaryColor"),"--text-color":R("textColor"),"--button-text-color":R("buttonTextColor"),"--border-color":R("borderColor"),"--stars-color":R("starsColor"),"--pros-color":R("prosColor"),"--cons-color":R("consColor"),"--content-font-size":R("contentFontSize"),...(null==S||null===(t=S.padding)||void 0===t?void 0:t.top)&&{"--padding-desktop-top":S.padding.top},...(null==S||null===(l=S.padding)||void 0===l?void 0:l.bottom)&&{"--padding-desktop-bottom":S.padding.bottom},...(null==S||null===(a=S.padding)||void 0===a?void 0:a.right)&&{"--padding-desktop-right":S.padding.right},...(null==S||null===(n=S.padding)||void 0===n?void 0:n.left)&&{"--padding-desktop-left":S.padding.left},...(null==S||null===(d=S.paddingTablet)||void 0===d?void 0:d.top)&&{"--padding-tablet-top":S.paddingTablet.top},...(null==S||null===(u=S.paddingTablet)||void 0===u?void 0:u.bottom)&&{"--padding-tablet-bottom":S.paddingTablet.bottom},...(null==S||null===(b=S.paddingTablet)||void 0===b?void 0:b.right)&&{"--padding-tablet-right":S.paddingTablet.right},...(null==S||null===(m=S.paddingTablet)||void 0===m?void 0:m.left)&&{"--padding-tablet-left":S.paddingTablet.left},...(null==S||null===(p=S.paddingMobile)||void 0===p?void 0:p.top)&&{"--padding-mobile-top":S.paddingMobile.top},...(null==S||null===(h=S.paddingMobile)||void 0===h?void 0:h.bottom)&&{"--padding-mobile-bottom":S.paddingMobile.bottom},...(null==S||null===(v=S.paddingMobile)||void 0===v?void 0:v.right)&&{"--padding-mobile-right":S.paddingMobile.right},...(null==S||null===(y=S.paddingMobile)||void 0===y?void 0:y.left)&&{"--padding-mobile-left":S.paddingMobile.left},"--border-width":ca(R("borderWidth")),"--border-radius":ca(R("borderRadius")),"--box-shadow":A.active&&`${A.horizontal}px ${A.vertical}px ${A.blur}px ${A.spread}px ${Z()(A.color||"#FFFFFF",A.colorOpacity)}`},O="object"==typeof z&&null!==z&&z.isError||"isLoading"===z,N=Boolean(window.themeisleGutenberg.ratingScale)?2:1,V=(0,s.useBlockProps)({id:S.id,className:O?"is-placeholder":g()({"no-pros-cons":!(0<S.pros.length||0<S.cons.length),"no-footer":!(0<(null==P||null===(k=P.links)||void 0===k?void 0:k.length)||0<S.links.length)}),style:H}),I=S.mainHeading||"h2",D=S.subHeading||"h3";return"isLoading"===z?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ia,{attributes:S,setAttributes:T,getValue:R,productAttributes:P}),(0,i.createElement)("div",V,(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null)))):"object"==typeof z&&null!==z&&z.isError?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ia,{attributes:S,setAttributes:T,getValue:R,productAttributes:P}),(0,i.createElement)("div",V,(0,i.createElement)(c.Placeholder,{instructions:z.message}))):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ia,{attributes:S,setAttributes:T,getValue:R,productAttributes:P}),(0,i.createElement)("div",V,(0,i.createElement)("div",{className:"o-review__header"},null!=P&&P.title?(0,i.createElement)(s.RichText.Content,{placeholder:(0,o.__)("Name of your product…","otter-blocks"),allowedFormats:[],value:null==P?void 0:P.title,tagName:I}):(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Name of your product…","otter-blocks"),allowedFormats:[],value:S.title,onChange:e=>T({title:e}),tagName:I}),(0,i.createElement)("div",{className:"o-review__header_meta"},(0,i.createElement)("div",{className:"o-review__header_ratings"},(0,i.createElement)(da,{rating:F}),(0,i.createElement)("span",null,/** translators: %s Rating score. */(0,o.sprintf)((0,o.__)("%f out of %f","otter-blocks"),Math.abs(F/N).toFixed(1)||0,10/N))),(0,i.createElement)("span",{className:"o-review__header_price"},((null==P?void 0:P.price)&&(null==P?void 0:P.discounted)||S.price&&S.discounted)&&(0,i.createElement)("del",null,(null!==(f=la()((null==P?void 0:P.currency)||S.currency))&&void 0!==f?f:"$")+""+((null==P?void 0:P.price)||S.price)||0),(S.price||S.discounted||(null==P?void 0:P.price)||(null==P?void 0:P.discounted))&&(null!==(_=la()((null==P?void 0:P.currency)||S.currency))&&void 0!==_?_:"$")+""+(null!=P&&P.discounted||S.discounted?(null==P?void 0:P.discounted)||S.discounted:(null==P?void 0:P.price)||S.price))),(0,i.createElement)("div",{className:g()("o-review__header_details",{"is-single":!S.image||!B&&!S.description,[{25:"is-quarter",50:"is-half",100:"is-full"}[S.imageWidth]]:S.imageWidth&&33!==S.imageWidth})},null!=P&&P.image?(0,i.createElement)("img",{src:null==P||null===(w=P.image)||void 0===w?void 0:w.url,alt:null==P||null===(C=P.image)||void 0===C?void 0:C.alt}):S.image&&(0,i.createElement)("img",{src:S.image.url,alt:S.image.alt}),!B&&!S.description||null!=P&&P.description?(0,i.createElement)(s.RichText.Content,{placeholder:(0,o.__)("Product description or a small review…","otter-blocks"),value:null==P?void 0:P.description,tagName:"p"}):(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Product description or a small review…","otter-blocks"),value:S.description,onChange:e=>T({description:e}),tagName:"p"}))),(0,i.createElement)("div",{className:"o-review__left"},(0,i.createElement)("div",{className:"o-review__left_features"},0<S.features.length&&S.features.map(((e,t)=>(0,i.createElement)("div",{className:"o-review__left_feature",key:t},(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Feature title","otter-blocks"),value:e.title,className:"o-review__left_feature_title",onChange:e=>((e,t)=>{const l=[...S.features];l[e]={...l[e],...t},T({features:l})})(t,{title:e}),tagName:"span"}),(0,i.createElement)("div",{className:"o-review__left_feature_ratings"},(0,i.createElement)(da,{rating:e.rating}),(0,i.createElement)("span",null,/** translators: %s Rating score. */(0,o.sprintf)((0,o.__)("%f out of %f","otter-blocks"),Math.abs(e.rating/N).toFixed(1)||0,10/N)))))))),(0<S.pros.length||0<S.cons.length)&&(0,i.createElement)("div",{className:"o-review__right"},0<S.pros.length&&(0,i.createElement)("div",{className:"o-review__right_pros"},(0,i.createElement)(D,null,S.prosLabel),S.pros.map(((e,t)=>(0,i.createElement)("div",{className:"o-review__right_pros_item",key:t},r.check,(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Why do you like the product?","otter-blocks"),value:e,onChange:e=>((e,t)=>{const l=[...S.pros];l[e]=t,T({pros:l})})(t,e),tagName:"p"}))))),0<S.cons.length&&(0,i.createElement)("div",{className:"o-review__right_cons"},(0,i.createElement)(D,null,S.consLabel),S.cons.map(((e,t)=>(0,i.createElement)("div",{className:"o-review__right_cons_item",key:t},r.close,(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("What can be improved?","otter-blocks"),value:e,onChange:e=>((e,t)=>{const l=[...S.cons];l[e]=t,T({cons:l})})(t,e),tagName:"p"})))))),(0<(null==P||null===(E=P.links)||void 0===E?void 0:E.length)||0<S.links.length)&&(0,i.createElement)("div",{className:"o-review__footer"},(0,i.createElement)(D,{className:"o-review__footer_label"},S.buttonsLabel),(0,i.createElement)("div",{className:"o-review__footer_buttons"},((null==P?void 0:P.links)||S.links).map(((e,t)=>(0,i.createElement)(s.RichText,{key:t,placeholder:(0,o.__)("Button label","otter-blocks"),value:e.label,disabled:0<(null==P?void 0:P.links),onChange:e=>((e,t)=>{const l=[...S.links];l[e]={...l[e],...t},T({links:l})})(t,{label:e}),tagName:"span"})))))))},save:()=>null,example:{attributes:{}}});var ma=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/advanced-columns","title":"Section","category":"themeisle-blocks","description":"Add a Section block that displays content in multiple columns, then add whatever content blocks you’d like. Powered by Otter.","keywords":["advanced columns","layout","section"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"columns":{"type":"number"},"layout":{"type":"string"},"layoutTablet":{"type":"string","default":"equal"},"layoutMobile":{"type":"string","default":"equal"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"margin":{"type":"object"},"marginTablet":{"type":"object"},"marginMobile":{"type":"object"},"columnsWidth":{"type":["number","string"]},"columnsWidthTablet":{"type":"string"},"columnsWidthMobile":{"type":"string"},"horizontalAlign":{"type":"string","default":"unset"},"columnsHeight":{"type":"string","default":"auto"},"columnsHeightCustom":{"type":["number","string"]},"columnsHeightCustomTablet":{"type":["number","string"]},"columnsHeightCustomMobile":{"type":["number","string"]},"verticalAlign":{"type":"string","default":"unset"},"color":{"type":"string"},"colorHover":{"type":"string"},"linkColor":{"type":"string"},"backgroundType":{"type":"string","default":"color"},"backgroundColor":{"type":"string"},"backgroundImage":{"type":"object"},"backgroundAttachment":{"type":"string","default":"scroll"},"backgroundPosition":{"type":"object"},"backgroundRepeat":{"type":"string","default":"repeat"},"backgroundSize":{"type":"string","default":"auto"},"backgroundGradient":{"type":"string","default":"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},"backgroundOverlayOpacity":{"type":"number","default":50},"backgroundOverlayType":{"type":"string","default":"color"},"backgroundOverlayColor":{"type":"string"},"backgroundOverlayImage":{"type":"object"},"backgroundOverlayAttachment":{"type":"string","default":"scroll"},"backgroundOverlayPosition":{"type":"object"},"backgroundOverlayRepeat":{"type":"string","default":"repeat"},"backgroundOverlaySize":{"type":"string","default":"auto"},"backgroundOverlayGradient":{"type":"string","default":"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},"backgroundOverlayFilterBlur":{"type":"number","default":0},"backgroundOverlayFilterBrightness":{"type":"number","default":10},"backgroundOverlayFilterContrast":{"type":"number","default":10},"backgroundOverlayFilterGrayscale":{"type":"number","default":0},"backgroundOverlayFilterHue":{"type":"number","default":0},"backgroundOverlayFilterSaturate":{"type":"number","default":10},"backgroundOverlayBlend":{"type":"string","default":"normal"},"border":{"type":"object"},"borderColor":{"type":"string"},"borderRadius":{"type":"object"},"boxShadow":{"type":"boolean","default":false},"boxShadowColor":{"type":"string","default":"#000000"},"boxShadowColorOpacity":{"type":"number","default":50},"boxShadowBlur":{"type":"number","default":5},"boxShadowSpread":{"type":"number","default":0},"boxShadowHorizontal":{"type":"number","default":0},"boxShadowVertical":{"type":"number","default":0},"dividerTopType":{"type":"string","default":"none"},"dividerTopColor":{"type":"string","default":"#000000"},"dividerTopWidth":{"type":"number"},"dividerTopWidthTablet":{"type":"number"},"dividerTopWidthMobile":{"type":"number"},"dividerTopHeight":{"type":"number"},"dividerTopHeightTablet":{"type":"number"},"dividerTopHeightMobile":{"type":"number"},"dividerTopInvert":{"type":"boolean","default":false},"dividerBottomType":{"type":"string","default":"none"},"dividerBottomColor":{"type":"string","default":"#000000"},"dividerBottomWidth":{"type":"number"},"dividerBottomWidthTablet":{"type":"number"},"dividerBottomWidthMobile":{"type":"number"},"dividerBottomHeight":{"type":"number"},"dividerBottomHeightTablet":{"type":"number"},"dividerBottomHeightMobile":{"type":"number"},"dividerBottomInvert":{"type":"boolean","default":false},"hide":{"type":"boolean","default":false},"hideTablet":{"type":"boolean","default":false},"hideMobile":{"type":"boolean","default":false},"reverseColumnsTablet":{"type":"boolean","default":false},"reverseColumnsMobile":{"type":"boolean","default":false},"columnsHTMLTag":{"type":"string","default":"div"},"isSynced":{"type":"array"}},"supports":{"align":["wide","full"],"html":false},"editorStyle":"otter-advanced-columns-editor","style":"otter-advanced-columns-style"}');const pa={align:{type:"string"},id:{type:"string"},columns:{type:"number"},layout:{type:"string"},layoutTablet:{type:"string",default:"equal"},layoutMobile:{type:"string",default:"equal"},columnsGap:{type:"string",default:"default"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number",default:20},paddingMobile:{type:"number",default:20},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number",default:20},paddingTopMobile:{type:"number",default:20},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number",default:20},paddingRightMobile:{type:"number",default:20},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number",default:20},paddingBottomMobile:{type:"number",default:20},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number",default:20},paddingLeftMobile:{type:"number",default:20},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number",default:20},marginMobile:{type:"number",default:20},marginTop:{type:"number",default:20},marginTopTablet:{type:"number",default:20},marginTopMobile:{type:"number",default:20},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number",default:20},marginBottomMobile:{type:"number",default:20},columnsWidth:{type:"number"},columnsHeight:{type:"string",default:"auto"},columnsHeightCustom:{type:"number"},columnsHeightCustomTablet:{type:"number"},columnsHeightCustomMobile:{type:"number"},horizontalAlign:{type:"string",default:"unset"},verticalAlign:{type:"string",default:"unset"},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundGradientFirstLocation:{type:"number",default:0},backgroundGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundGradientSecondLocation:{type:"number",default:100},backgroundGradientType:{type:"string",default:"linear"},backgroundGradientAngle:{type:"number",default:90},backgroundGradientPosition:{type:"string",default:"center center"},backgroundOverlayOpacity:{type:"number",default:50},backgroundOverlayType:{type:"string",default:"color"},backgroundOverlayColor:{type:"string"},backgroundOverlayImageID:{type:"number"},backgroundOverlayImageURL:{type:"string"},backgroundOverlayAttachment:{type:"string",default:"scroll"},backgroundOverlayPosition:{type:"string",default:"top left"},backgroundOverlayRepeat:{type:"string",default:"repeat"},backgroundOverlaySize:{type:"string",default:"auto"},backgroundOverlayGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundOverlayGradientFirstLocation:{type:"number",default:0},backgroundOverlayGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundOverlayGradientSecondLocation:{type:"number",default:100},backgroundOverlayGradientType:{type:"string",default:"linear"},backgroundOverlayGradientAngle:{type:"number",default:90},backgroundOverlayGradientPosition:{type:"string",default:"center center"},backgroundOverlayFilterBlur:{type:"number",default:0},backgroundOverlayFilterBrightness:{type:"number",default:10},backgroundOverlayFilterContrast:{type:"number",default:10},backgroundOverlayFilterGrayscale:{type:"number",default:0},backgroundOverlayFilterHue:{type:"number",default:0},backgroundOverlayFilterSaturate:{type:"number",default:10},backgroundOverlayBlend:{type:"string",default:"normal"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},dividerTopType:{type:"string",default:"none"},dividerTopColor:{type:"string",default:"#000000"},dividerTopWidth:{type:"number",default:100},dividerTopWidthTablet:{type:"number",default:100},dividerTopWidthMobile:{type:"number",default:100},dividerTopHeight:{type:"number",default:100},dividerTopHeightTablet:{type:"number",default:100},dividerTopHeightMobile:{type:"number",default:100},dividerTopInvert:{type:"boolean",default:!1},dividerBottomType:{type:"string",default:"none"},dividerBottomColor:{type:"string",default:"#000000"},dividerBottomWidth:{type:"number",default:100},dividerBottomWidthTablet:{type:"number",default:100},dividerBottomWidthMobile:{type:"number",default:100},dividerBottomHeight:{type:"number",default:100},dividerBottomHeightTablet:{type:"number",default:100},dividerBottomHeightMobile:{type:"number",default:100},dividerBottomInvert:{type:"boolean",default:!1},hide:{type:"boolean",default:!1},hideTablet:{type:"boolean",default:!1},hideMobile:{type:"boolean",default:!1},columnsHTMLTag:{type:"string",default:"div"}},ga=e=>{let{type:t,front:l,style:o,fill:a,invert:n,width:r,height:s}=e;return"none"!==o&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-advanced-columns-separators",t),style:!l&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===t?{transform:"bottom"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===o&&(0,i.createElement)(c.SVG,{id:"curve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===t?{transform:"bottom"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 0 L100 100 L100 0 Z"})),"slant"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===t?{transform:"bottom"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===o&&(0,i.createElement)(c.SVG,{id:"cloud",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})))},ha=e=>{let{type:t,front:l,style:o,fill:a,invert:n,width:r,height:s}=e;return"none"!==o&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-advanced-columns-separators",t),style:!l&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)(c.Path,{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===o&&(0,i.createElement)(c.SVG,{id:"curve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)(c.Path,{d:"M0 0 L100 100 L100 0 Z"})),"slant"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)(c.Path,{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===o&&(0,i.createElement)(c.SVG,{id:"cloud",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})))},va=[{attributes:pa,supports:{align:["wide","full"],html:!1},save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;let a,n,r,c,d;if("color"===t.backgroundType&&(a={background:t.backgroundColor}),"image"===t.backgroundType&&(a={backgroundImage:`url( '${t.backgroundImageURL}' )`,backgroundAttachment:t.backgroundAttachment,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}),"gradient"===t.backgroundType){let e;e="linear"===t.backgroundGradientType?`${t.backgroundGradientAngle}deg`:`at ${t.backgroundGradientPosition}`,a={background:`${t.backgroundGradientType}-gradient( ${e}, ${t.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientFirstLocation}%, ${t.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientSecondLocation}% )`}}"linked"===t.borderType&&(r={borderWidth:`${t.border}px`,borderStyle:"solid",borderColor:t.borderColor}),"unlinked"===t.borderType&&(r={borderTopWidth:`${t.borderTop}px`,borderRightWidth:`${t.borderRight}px`,borderBottomWidth:`${t.borderBottom}px`,borderLeftWidth:`${t.borderLeft}px`,borderStyle:"solid",borderColor:t.borderColor}),"linked"===t.borderRadiusType&&(c={borderRadius:`${t.borderRadius}px`}),"unlinked"===t.borderRadiusType&&(c={borderTopLeftRadius:`${t.borderRadiusTop}px`,borderTopRightRadius:`${t.borderRadiusRight}px`,borderBottomRightRadius:`${t.borderRadiusBottom}px`,borderBottomLeftRadius:`${t.borderRadiusLeft}px`}),!0===t.boxShadow&&(d={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`});const u={...a,...r,...c,...d,justifyContent:t.horizontalAlign};if("color"===t.backgroundOverlayType&&(n={background:t.backgroundOverlayColor,opacity:t.backgroundOverlayOpacity/100}),"image"===t.backgroundOverlayType&&(n={backgroundImage:`url( '${t.backgroundOverlayImageURL}' )`,backgroundAttachment:t.backgroundOverlayAttachment,backgroundPosition:t.backgroundOverlayPosition,backgroundRepeat:t.backgroundOverlayRepeat,backgroundSize:t.backgroundOverlaySize,opacity:t.backgroundOverlayOpacity/100}),"gradient"===t.backgroundOverlayType){let e;e="linear"===t.backgroundOverlayGradientType?`${t.backgroundOverlayGradientAngle}deg`:`at ${t.backgroundOverlayGradientPosition}`,n={background:`${t.backgroundOverlayGradientType}-gradient( ${e}, ${t.backgroundOverlayGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundOverlayGradientFirstLocation}%, ${t.backgroundOverlayGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundOverlayGradientSecondLocation}% )`,opacity:t.backgroundOverlayOpacity/100}}const b={...n,mixBlendMode:t.backgroundOverlayBlend,filter:`blur( ${t.backgroundOverlayFilterBlur/10}px ) brightness( ${t.backgroundOverlayFilterBrightness/10} ) contrast( ${t.backgroundOverlayFilterContrast/10} ) grayscale( ${t.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${t.backgroundOverlayFilterHue}deg ) saturate( ${t.backgroundOverlayFilterSaturate/10} )`};let m={};t.columnsWidth&&(m={maxWidth:t.columnsWidth+"px"});const p=t.hide?"":`has-desktop-${t.layout}-layout`,h=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,v=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,y=g()(l,`has-${t.columns}-columns`,p,h,v,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},`has-${t.lcolumnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:y,id:t.id,style:u},(0,i.createElement)("div",{className:"wp-themeisle-block-overlay",style:b}),(0,i.createElement)(ga,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap",style:m},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(ga,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}},{attributes:pa,supports:{align:["wide","full"],html:!1},save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;let a,n,r,c,d;if("color"===t.backgroundType&&(a={background:t.backgroundColor}),"image"===t.backgroundType&&(a={backgroundImage:`url( '${t.backgroundImageURL}' )`,backgroundAttachment:t.backgroundAttachment,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}),"gradient"===t.backgroundType){let e;e="linear"===t.backgroundGradientType?`${t.backgroundGradientAngle}deg`:`at ${t.backgroundGradientPosition}`,a={background:`${t.backgroundGradientType}-gradient( ${e}, ${t.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientFirstLocation}%, ${t.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientSecondLocation}% )`}}"linked"===t.borderType&&(r={borderWidth:`${t.border}px`,borderStyle:"solid",borderColor:t.borderColor}),"unlinked"===t.borderType&&(r={borderTopWidth:`${t.borderTop}px`,borderRightWidth:`${t.borderRight}px`,borderBottomWidth:`${t.borderBottom}px`,borderLeftWidth:`${t.borderLeft}px`,borderStyle:"solid",borderColor:t.borderColor}),"linked"===t.borderRadiusType&&(c={borderRadius:`${t.borderRadius}px`}),"unlinked"===t.borderRadiusType&&(c={borderTopLeftRadius:`${t.borderRadiusTop}px`,borderTopRightRadius:`${t.borderRadiusRight}px`,borderBottomRightRadius:`${t.borderRadiusBottom}px`,borderBottomLeftRadius:`${t.borderRadiusLeft}px`}),!0===t.boxShadow&&(d={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`});const u={...a,...r,...c,...d,justifyContent:t.horizontalAlign};if("color"===t.backgroundOverlayType&&(n={background:t.backgroundOverlayColor,opacity:t.backgroundOverlayOpacity/100}),"image"===t.backgroundOverlayType&&(n={backgroundImage:`url( '${t.backgroundOverlayImageURL}' )`,backgroundAttachment:t.backgroundOverlayAttachment,backgroundPosition:t.backgroundOverlayPosition,backgroundRepeat:t.backgroundOverlayRepeat,backgroundSize:t.backgroundOverlaySize,opacity:t.backgroundOverlayOpacity/100}),"gradient"===t.backgroundOverlayType){let e;e="linear"===t.backgroundOverlayGradientType?`${t.backgroundOverlayGradientAngle}deg`:`at ${t.backgroundOverlayGradientPosition}`,n={background:`${t.backgroundOverlayGradientType}-gradient( ${e}, ${t.backgroundOverlayGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundOverlayGradientFirstLocation}%, ${t.backgroundOverlayGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundOverlayGradientSecondLocation}% )`,opacity:t.backgroundOverlayOpacity/100}}const b={...n,mixBlendMode:t.backgroundOverlayBlend};let m={};t.columnsWidth&&(m={maxWidth:t.columnsWidth+"px"});const p=t.hide?"":`has-desktop-${t.layout}-layout`,h=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,v=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,y=g()(l,`has-${t.columns}-columns`,p,h,v,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},`has-${t.columnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:y,id:t.id,style:u},(0,i.createElement)("div",{className:"wp-themeisle-block-overlay",style:b}),(0,i.createElement)(ga,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap",style:m},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(ga,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}},{attributes:{...pa,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag,a=t.hide?"":`has-desktop-${t.layout}-layout`,n=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,r=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,c=g()(l,`has-${t.columns}-columns`,a,n,r,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},`has-${t.columnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:c,id:t.id},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,i.createElement)(ha,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap"},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(ha,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}},{attributes:{...pa,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},migrate:e=>{let t="",l="";if("gradient"===e.backgroundType){let l="";"linear"===e.backgroundGradientType&&(l=`${e.backgroundGradientAngle}deg, `),t=`${e.backgroundGradientType}-gradient(${l}${Z()(e.backgroundGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${Z()(e.backgroundGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}%)`}if("gradient"===e.backgroundOverlayType){let t="";"linear"===e.backgroundOverlayGradientType&&(t=`${e.backgroundOverlayGradientAngle}deg, `),l=`${e.backgroundOverlayGradientType}-gradient(${t}${Z()(e.backgroundOverlayGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientFirstLocation}%, ${Z()(e.backgroundOverlayGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientSecondLocation}%)`}return{...{...(0,K.omit)(e,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition","backgroundOverlayGradientFirstColor","backgroundOverlayGradientFirstLocation","backgroundOverlayGradientSecondColor","backgroundOverlayGradientSecondLocation","backgroundOverlayGradientType","backgroundOverlayGradientAngle","backgroundOverlayGradientPosition"]),backgroundGradient:t,backgroundOverlayGradient:l}}},isEligible:e=>"gradient"===e.backgroundType&&void 0!==e.backgroundGradientFirstColor||"gradient"===e.backgroundOverlayType&&void 0!==e.backgroundOverlayGradientFirstColor,save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag,a=t.hide?"":`has-desktop-${t.layout}-layout`,n=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,r=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,c=g()(l,`has-${t.columns}-columns`,a,n,r,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},`has-${t.columnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:c,id:t.id},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,i.createElement)(ha,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap"},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(ha,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}},{attributes:{...(0,K.omit)(pa,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition","backgroundOverlayGradientFirstColor","backgroundOverlayGradientFirstLocation","backgroundOverlayGradientSecondColor","backgroundOverlayGradientSecondLocation","backgroundOverlayGradientType","backgroundOverlayGradientAngle","backgroundOverlayGradientPosition"]),paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},backgroundGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},backgroundOverlayGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},migrate:e=>{const t={},l={},o={},a={},n={},r={},i={},s={};let c={},d={},u={},b={};"unlinked"===e.paddingType?(t.top=(0,K.isUndefined)(e.paddingTop)?"20px":e.paddingTop+"px",t.bottom=(0,K.isUndefined)(e.paddingBottom)?"20px":e.paddingBottom+"px",t.left=(0,K.isUndefined)(e.paddingLeft)?"20px":e.paddingLeft+"px",t.right=(0,K.isUndefined)(e.paddingRight)?"20px":e.paddingRight+"px"):(t.top=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.bottom=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.left=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.right=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px"),"unlinked"===e.paddingTypeTablet?(l.top=(0,K.isUndefined)(e.paddingTopTablet)?null:e.paddingTopTablet+"px",l.bottom=(0,K.isUndefined)(e.paddingBottomTablet)?null:e.paddingBottomTablet+"px",l.left=(0,K.isUndefined)(e.paddingLeftTablet)?null:e.paddingLeftTablet+"px",l.right=(0,K.isUndefined)(e.paddingRightTablet)?null:e.paddingRightTablet+"px"):(l.top=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.bottom=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.left=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.right=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px"),"unlinked"===e.paddingTypeMobile?(o.top=(0,K.isUndefined)(e.paddingMobileTop)?null:e.paddingMobileTop+"px",o.bottom=(0,K.isUndefined)(e.paddingMobileBottom)?null:e.paddingMobileBottom+"px",o.left=(0,K.isUndefined)(e.paddingMobileLeft)?null:e.paddingMobileLeft+"px",o.right=(0,K.isUndefined)(e.paddingMobileRight)?null:e.paddingMobileRight+"px"):(o.top=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.bottom=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.left=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.right=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px"),"linked"===e.marginType?(a.top=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px",a.bottom=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px"):(a.top=(0,K.isUndefined)(e.marginTop)?"20px":e.marginTop+"px",a.bottom=(0,K.isUndefined)(e.marginBottom)?"20px":e.marginBottom+"px"),"linked"===e.marginTypeTablet?(n.top=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px",n.bottom=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px"):(n.top=(0,K.isUndefined)(e.marginTopTablet)?null:e.marginTopTablet+"px",n.bottom=(0,K.isUndefined)(e.marginBottomTablet)?null:e.marginBottomTablet+"px"),"linked"===e.marginTypeMobile?(r.top=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px",r.bottom=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px"):(r.top=(0,K.isUndefined)(e.marginTopMobile)?null:e.marginTopMobile+"px",r.bottom=(0,K.isUndefined)(e.marginBottomMobile)?null:e.marginBottomMobile+"px"),"unlinked"===e.borderType?(i.top=(0,K.isUndefined)(e.borderTop)?null:e.borderTop+"px",i.bottom=(0,K.isUndefined)(e.borderBottom)?null:e.borderBottom+"px",i.left=(0,K.isUndefined)(e.borderLeft)?null:e.borderLeft+"px",i.right=(0,K.isUndefined)(e.borderRight)?null:e.borderRight+"px"):(i.top=(0,K.isUndefined)(e.border)?null:e.border+"px",i.bottom=(0,K.isUndefined)(e.border)?null:e.border+"px",i.left=(0,K.isUndefined)(e.border)?null:e.border+"px",i.right=(0,K.isUndefined)(e.border)?null:e.border+"px"),"unlinked"===e.borderRadiusType?(s.top=(0,K.isUndefined)(e.borderRadiusTop)?null:e.borderRadiusTop+"px",s.bottom=(0,K.isUndefined)(e.borderRadiusBottom)?null:e.borderRadiusBottom+"px",s.left=(0,K.isUndefined)(e.borderRadiusLeft)?null:e.borderRadiusLeft+"px",s.right=(0,K.isUndefined)(e.borderRadiusRight)?null:e.borderRadiusRight+"px"):(s.top=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.bottom=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.left=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.right=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px"),void 0!==e.backgroundImageURL&&void 0!==e.backgroundImageID&&(c={id:e.backgroundImageID,url:e.backgroundImageURL}),void 0!==e.backgroundOverlayImageURL&&void 0!==e.backgroundOverlayImageID&&(d={id:e.backgroundOverlayImageID,url:e.backgroundOverlayImageURL});const m={"top left":{x:"0.00",y:"0.00"},"top center":{x:"0.50",y:"0.00"},"top right":{x:"1.00",y:"0.00"},"center left":{x:"0.00",y:"0.50"},"center center":{x:"0.50",y:"0.50"},"center right":{x:"1.00",y:"0.50"},"bottom left":{x:"0.00",y:"1.00"},"bottom center":{x:"0.50",y:"1.00"},"bottom right":{x:"1.00",y:"1.00"}};return void 0!==e.backgroundPosition&&(u=m[e.backgroundPosition]),void 0!==e.backgroundOverlayPosition&&(b=m[e.backgroundOverlayPosition]),{...{...(0,K.omit)(e,["columnsGap","paddingType","paddingTypeTablet","paddingTypeMobile","paddingTop","paddingTopTablet","paddingTopMobile","paddingRight","paddingRightTablet","paddingRightMobile","paddingBottom","paddingBottomTablet","paddingBottomMobile","paddingLeft","paddingLeftTablet","paddingLeftMobile","marginType","marginTypeTablet","marginTypeMobile","marginTop","marginTopTablet","marginTopMobile","marginBottom","marginBottomTablet","marginBottomMobile","borderType","borderTop","borderRight","borderBottom","borderLeft","borderRadiusType","borderRadiusTop","borderRadiusRight","borderRadiusBottom","borderRadiusLeft"]),...!(0,x.FH)(t)&&{padding:t},...!(0,x.FH)(l)&&{paddingTablet:l},...!(0,x.FH)(o)&&{paddingMobile:o},...!(0,x.FH)(a)&&{margin:a},...!(0,x.FH)(n)&&{marginTablet:n},...!(0,x.FH)(r)&&{marginMobile:r},...!(0,x.FH)(i)&&{border:i},...!(0,x.FH)(s)&&{borderRadius:s},...!(0,x.FH)(c)&&{backgroundImage:c},...!(0,x.FH)(u)&&{backgroundPosition:u},...!(0,x.FH)(d)&&{backgroundOverlayImage:d},...!(0,x.FH)(b)&&{backgroundOverlayPosition:b}}}},isEligible:e=>["padding","paddingTablet","paddingMobile","paddingTop","paddingTopTablet","paddingTopMobile","paddingRight","paddingRightTablet","paddingRightMobile","paddingBottom","paddingBottomTablet","paddingBottomMobile","paddingLeft","paddingLeftTablet","paddingLeftMobile","margin","marginTablet","marginMobile","marginTop","marginTopTablet","marginTopMobile","marginBottom","marginBottomTablet","marginBottomMobile","borderType","border","borderTop","borderRight","borderBottom","borderLeft","borderRadiusType","borderRadius","borderRadiusTop","borderRadiusRight","borderRadiusBottom","borderRadiusLeft"].some((t=>!(0,K.isUndefined)(e[t])&&("number"==typeof e[t]||null===typeof e[t])))||void 0!==e.backgroundImageURL&&void 0!==e.backgroundImageID||void 0!==e.backgroundOverlayImageURL&&void 0!==e.backgroundOverlayImageID||void 0!==e.backgroundPosition&&"object"!=typeof e.backgroundPosition||void 0!==e.backgroundOverlayPosition&&"object"!=typeof e.backgroundOverlayPosition||void 0!==e.columnsGap,save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag,a=t.hide?"":`has-desktop-${t.layout}-layout`,n=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,r=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,c=g()(l,`has-${t.columns}-columns`,a,n,r,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},`has-${t.columnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:c,id:t.id},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,i.createElement)(ha,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap"},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(ha,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}}];var ya=va,ka={1:{equal:["100"]},2:{equal:["50","50"],oneTwo:["33.34","66.66"],twoOne:["66.66","33.34"],collapsedRows:["100","100"]},3:{equal:["33.33","33.33","33.33"],oneOneTwo:["25","25","50"],twoOneOne:["50","25","25"],oneTwoOne:["25","50","25"],oneThreeOne:["20","60","20"],collapsedRows:["100","100","100"]},4:{equal:["25","25","25","25"],twoColumnGrid:["100","100","100","100"],collapsedRows:["100","100","100","100"]},5:{equal:["20","20","20","20","20"],collapsedRows:["100","100","100","100","100"]},6:{equal:["16.66","16.66","16.66","16.66","16.66","16.66"],twoColumnGrid:["100","100","100","100","100","100"],threeColumnGrid:["100","100","100","100","100","100"],collapsedRows:["100","100","100","100","100","100"]}},fa=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(s.BlockVerticalAlignmentToolbar,{onChange:e=>t.verticalAlign===e?l({verticalAlign:"unset"}):l({verticalAlign:e}),value:"flex-start"===t.verticalAlign?"top":"flex-end"===t.verticalAlign?"bottom":t.verticalAlign}))},_a=l(3203),wa=e=>{let{label:t,onClick:l,layout:a,layoutTablet:n,layoutMobile:s,columns:d}=e;const u=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]);let b;return"Desktop"===u?b=a:"Tablet"===u?b=n:"Mobile"===u&&(b=s),(0,i.createElement)(_a.n9,{label:t,className:"wp-block-themeisle-blocks-advanced-columns-layout-control"},1===d&&(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Single Row","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.colsFull)()))||2===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols2Equal)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("1:2","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneTwo"===b}),onClick:()=>l("oneTwo")},(0,r.cols12)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("2:1","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoOne"===b}),onClick:()=>l("twoOne")},(0,r.cols21)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)())))||3===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols3Equal)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("1:1:2","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneOneTwo"===b}),onClick:()=>l("oneOneTwo")},(0,r.cols112)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("2:1:1","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoOneOne"===b}),onClick:()=>l("twoOneOne")},(0,r.cols211)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("1:2:1","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneTwoOne"===b}),onClick:()=>l("oneTwoOne")},(0,r.cols121)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("1:3:1","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneThreeOne"===b}),onClick:()=>l("oneThreeOne")},(0,r.cols131)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)())))||4===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols4Equal)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Two Column Grid","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoColumnGrid"===b}),onClick:()=>l("twoColumnGrid")},(0,r.colsCollapsed)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)()))))||5===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols5Equal)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)())))||6===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols6Equal)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Two Column Grid","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoColumnGrid"===b}),onClick:()=>l("twoColumnGrid")},(0,r.cols2Grid)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Three Column Grid","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"threeColumnGrid"===b}),onClick:()=>l("threeColumnGrid")},(0,r.cols3Grid)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)())))))},Ca=e=>{var t,l,a,n,r,d;let{attributes:u,setAttributes:b,getValue:m,updateColumnsWidth:p,dividerViewType:g,setDividerViewType:h,changeColumnsNumbers:y}=e;const k=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]),{responsiveSetAttributes:f}=S(b),[_,w]=(0,i.useState)("settings"),C=()=>{switch(k){case"Desktop":return"padding";case"Tablet":return"paddingTablet";case"Mobile":return"paddingMobile";default:return}},E=()=>{switch(k){case"Desktop":return"margin";case"Tablet":return"marginTablet";case"Mobile":return"marginMobile";default:return}},T=()=>{switch(k){case"Desktop":return"columnsWidth";case"Tablet":return"columnsWidthTablet";case"Mobile":return"columnsWidthMobile";default:return}};let M=()=>{var e,t,l;switch(k){case"Desktop":return m("columnsWidth");case"Tablet":return null!==(e=m("columnsWidthTablet"))&&void 0!==e?e:m("columnsWidth");case"Mobile":return null!==(t=null!==(l=m("columnsWidthMobile"))&&void 0!==l?l:m("columnsWidthTablet"))&&void 0!==t?t:m("columnsWidth");default:return}};M=M();let B=()=>{var e,t,l;switch(k){case"Desktop":return u.columnsHeightCustom;case"Tablet":return null!==(e=u.columnsHeightCustomTablet)&&void 0!==e?e:u.columnsHeightCustom;case"Mobile":return null!==(t=null!==(l=u.columnsHeightCustomMobile)&&void 0!==l?l:u.columnsHeightCustomTablet)&&void 0!==t?t:u.columnsHeightCustom;default:return}};B=B();const z="top"==g?u.dividerTopType:"bottom"==g?u.dividerBottomType:void 0,P=(e,t)=>{switch(t){case"Desktop":b({hide:e});break;case"Tablet":b({hideTablet:e});break;case"Mobile":b({hideMobile:e})}},L=(e,t)=>{"Tablet"===t?b({reverseColumnsTablet:e}):"Mobile"===t&&b({reverseColumnsMobile:e})},R=(e,t,l,o)=>"color"===e&&t?t:"image"===e&&l?`url( ${l} )`:"gradient"===e&&o?o:void 0;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(_a.Hn,{value:_,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:w}),"settings"===_&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Columns & Layout","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Columns","otter-blocks"),value:u.columns,onChange:e=>{6>=e&&b({layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"}),6<e&&b({layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"}),1>=e&&b({layout:"equal",layoutTablet:"equal",layoutMobile:"equal"}),y(e)},min:1,max:6}),(0,i.createElement)(wa,{label:(0,o.__)("Layout","otter-blocks"),columns:u.columns,layout:u.layout,layoutTablet:u.layoutTablet,layoutMobile:u.layoutMobile,onClick:e=>{switch(k){case"Desktop":b({layout:e}),p(u.columns,e);break;case"Tablet":b({layoutTablet:e});break;case"Mobile":b({layoutMobile:e})}}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Section Structure","otter-blocks"),initialOpen:!1},(0,i.createElement)(_a.r4,{isSynced:u.isSynced,options:[{label:(0,o.__)("Maximum Content Width","otter-blocks"),value:T()},{label:(0,o.__)("Horizontal Align","otter-blocks"),value:"horizontalAlign",isHidden:void 0===m("columnsWidth")}],setAttributes:b}),(0,i.createElement)(c.Disabled,{isDisabled:(null===(t=u.isSynced)||void 0===t?void 0:t.includes(T()))||!1,className:"o-disabled"},(0,i.createElement)(_a.n9,{label:(0,o.__)("Maximum Content Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:M,onChange:e=>f(e,["columnsWidth","columnsWidthTablet","columnsWidthMobile"])}),(0,i.createElement)(_a.Cd,{values:["columnsWidth","columnsWidthTablet","columnsWidthMobile"],setAttributes:b}))),void 0!==m("columnsWidth")&&(0,i.createElement)(c.Disabled,{isDisabled:(null===(l=u.isSynced)||void 0===l?void 0:l.includes("horizontalAlign"))||!1,className:"o-disabled"},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Horizontal Align","otter-blocks")},(0,i.createElement)(_a.Ik,{value:m("horizontalAlign"),options:[{icon:"editor-alignleft",label:(0,o.__)("Left","otter-blocks"),value:"flex-start"},{icon:"editor-aligncenter",label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:"editor-alignright",label:(0,o.__)("Right","otter-blocks"),value:"flex-end"}],onChange:e=>(e=>{if(u.horizontalAlign===e)return b({horizontalAlign:"unset"});b({horizontalAlign:e})})(e),hasIcon:!0}))),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Minimum Height","otter-blocks"),value:u.columnsHeight,options:[{label:(0,o.__)("Default","otter-blocks"),value:"auto"},{label:(0,o.__)("Fit to Screen","otter-blocks"),value:"100vh"},{label:(0,o.__)("Custom","otter-blocks"),value:"custom"}],onChange:e=>b({columnsHeight:e})}),"custom"===u.columnsHeight&&(0,i.createElement)(_a.n9,{label:(0,o.__)("Custom Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:B,onChange:e=>{switch(k){case"Desktop":b({columnsHeightCustom:e});break;case"Tablet":b({columnsHeightCustomTablet:e});break;case"Mobile":b({columnsHeightCustomMobile:e})}}}),(0,i.createElement)(_a.Cd,{values:["columnsHeightCustom","columnsHeightCustomTablet","columnsHeightCustomMobile"],setAttributes:b})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:u.columnsHTMLTag,options:[{label:(0,o.__)("Default (div)","otter-blocks"),value:"div"},{label:"section",value:"section"},{label:"header",value:"header"},{label:"footer",value:"footer"},{label:"article",value:"article"},{label:"main",value:"main"}],onChange:e=>b({columnsHTMLTag:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Responsive","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide this section on Desktop devices?","otter-blocks"),checked:u.hide,onChange:e=>P(e,"Desktop")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide this section on Tablet devices?","otter-blocks"),checked:u.hideTablet,onChange:e=>P(e,"Tablet")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide this section on Mobile devices?","otter-blocks"),checked:u.hideMobile,onChange:e=>P(e,"Mobile")}),(0,i.createElement)("hr",null),!u.hideTablet&&"collapsedRows"===u.layoutTablet&&(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Reverse Columns in Tablet devices?","otter-blocks"),checked:u.reverseColumnsTablet,onChange:e=>L(e,"Tablet")}),!u.hideMobile&&"collapsedRows"===u.layoutMobile&&(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Reverse Columns in Mobile devices?","otter-blocks"),checked:u.reverseColumnsMobile,onChange:e=>L(e,"Mobile")})))||"style"===_&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(_a.r4,{isSynced:u.isSynced,options:[{label:(0,o.__)("Padding","otter-blocks"),value:C()},{label:(0,o.__)("Margin","otter-blocks"),value:E()}],setAttributes:b}),(0,i.createElement)(_a.n9,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.Disabled,{isDisabled:(null===(a=u.isSynced)||void 0===a?void 0:a.includes(C()))||!1,className:"o-disabled"},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:(()=>{switch(k){case"Desktop":return m("padding");case"Tablet":return(0,K.merge)({...m("padding")},m("paddingTablet"));case"Mobile":return(0,K.merge)({...m("padding")},m("paddingTablet"),m("paddingMobile"));default:return}})(),inputProps:{min:0,max:500},onChange:e=>{switch((0,x.CJ)(e)&&(e=void 0),k){case"Desktop":return b({padding:e});case"Tablet":return b({paddingTablet:(0,x.cg)(e,u.padding)});case"Mobile":return b({paddingMobile:(0,x.cg)(e,{...u.padding,...u.paddingTablet})});default:return}}})),(0,i.createElement)(c.Disabled,{isDisabled:(null===(n=u.isSynced)||void 0===n?void 0:n.includes(E()))||!1,className:"o-disabled"},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Margin","otter-blocks"),values:(()=>{switch(k){case"Desktop":return m("margin");case"Tablet":return(0,K.merge)({...m("margin")},m("marginTablet"));case"Mobile":return(0,K.merge)({...m("margin")},m("marginTablet"),m("marginMobile"));default:return}})(),inputProps:{min:-500,max:500},sides:["top","bottom"],onChange:e=>{switch((0,x.CJ)(e)&&(e=void 0),"object"==typeof e&&(e=Object.fromEntries(Object.entries(e).filter((e=>{let[t,l]=e;return null!==l})))),k){case"Desktop":return b({margin:e});case"Tablet":return b({marginTablet:(0,x.cg)(e,u.margin)});case"Mobile":return b({marginMobile:(0,x.cg)(e,{...u.margin,...u.marginTablet})});default:return}}})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Background & Content","otter-blocks"),initialOpen:!1},(0,i.createElement)(_a.Ed,{label:(0,o.__)("Text","otter-blocks"),colorValue:u.color,onColorChange:e=>b({color:e}),className:"is-list is-first"}),(0,i.createElement)(_a.Ed,{label:(0,o.__)("Link","otter-blocks"),colorValue:u.linkColor,onColorChange:e=>b({linkColor:e}),className:"is-list"}),(0,i.createElement)(_a.jj,{label:(0,o.__)("Background","otter-blocks"),indicator:R(u.backgroundType,u.backgroundColor,null===(r=u.backgroundImage)||void 0===r?void 0:r.url,u.backgroundGradient)},(0,i.createElement)(_a.Zo,{backgroundType:u.backgroundType,backgroundColor:u.backgroundColor,image:u.backgroundImage,gradient:u.backgroundGradient,focalPoint:u.backgroundPosition,backgroundAttachment:u.backgroundAttachment,backgroundRepeat:u.backgroundRepeat,backgroundSize:u.backgroundSize,changeBackgroundType:e=>b({backgroundType:e}),changeImage:e=>{b({backgroundImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>b({backgroundImage:void 0}),changeColor:e=>b({backgroundColor:e}),changeGradient:e=>b({backgroundGradient:e}),changeBackgroundAttachment:e=>b({backgroundAttachment:e}),changeBackgroundRepeat:e=>b({backgroundRepeat:e}),changeFocalPoint:e=>b({backgroundPosition:e}),changeBackgroundSize:e=>b({backgroundSize:e})})),(0,i.createElement)(_a.jj,{label:(0,o.__)("Background Overlay","otter-blocks"),indicator:R(u.backgroundOverlayType,u.backgroundOverlayColor,null===(d=u.backgroundOverlayImage)||void 0===d?void 0:d.url,u.backgroundOverlayGradient)},(0,i.createElement)(_a.RF,{backgroundType:u.backgroundOverlayType,backgroundColor:u.backgroundOverlayColor,image:u.backgroundOverlayImage,gradient:u.backgroundOverlayGradient,focalPoint:u.backgroundOverlayPosition,backgroundAttachment:u.backgroundOverlayAttachment,backgroundRepeat:u.backgroundOverlayRepeat,backgroundSize:u.backgroundOverlaySize,backgroundOpacity:u.backgroundOverlayOpacity,backgroundFilterBlur:u.backgroundOverlayFilterBlur,backgroundFilterBrightness:u.backgroundOverlayFilterBrightness,backgroundFilterContrast:u.backgroundOverlayFilterContrast,backgroundFilterGrayscale:u.backgroundOverlayFilterGrayscale,backgroundFilterHue:u.backgroundOverlayFilterHue,backgroundFilterSaturate:u.backgroundOverlayFilterSaturate,backgroundBlend:u.backgroundOverlayBlend,changeBackgroundType:e=>b({backgroundOverlayType:e}),changeImage:e=>{b({backgroundOverlayImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>b({backgroundOverlayImage:void 0}),changeColor:e=>b({backgroundOverlayColor:e}),changeGradient:e=>b({backgroundOverlayGradient:e}),changeBackgroundAttachment:e=>b({backgroundOverlayAttachment:e}),changeBackgroundRepeat:e=>b({backgroundOverlayRepeat:e}),changeFocalPoint:e=>b({backgroundOverlayPosition:e}),changeBackgroundSize:e=>b({backgroundOverlaySize:e}),changeOpacity:e=>b({backgroundOverlayOpacity:e}),changeFilterBlur:e=>b({backgroundOverlayFilterBlur:e}),changeFilterBrightness:e=>b({backgroundOverlayFilterBrightness:e}),changeFilterContrast:e=>b({backgroundOverlayFilterContrast:e}),changeFilterGrayscale:e=>b({backgroundOverlayFilterGrayscale:e}),changeFilterHue:e=>b({backgroundOverlayFilterHue:e}),changeFilterSaturate:e=>b({backgroundOverlayFilterSaturate:e}),changeBlend:e=>b({backgroundOverlayBlend:e})})),(0,i.createElement)(_a.Ed,{label:(0,o.__)("Text Hover","otter-blocks"),colorValue:u.colorHover,onColorChange:e=>b({colorHover:e}),className:"is-list"})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),className:"o-section-border-container",initialOpen:!1},(0,i.createElement)(_a.Ed,{label:(0,o.__)("Border Color","otter-blocks"),colorValue:u.borderColor,onColorChange:e=>b({borderColor:e})}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Width","otter-blocks"),values:u.border,inputProps:{min:0,max:500},units:[{value:"px",label:"px"}],onChange:e=>{(0,x.CJ)(e)&&(e=void 0),b({border:e})}}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Radius","otter-blocks"),values:u.borderRadius,inputProps:{min:0,max:500},units:[{value:"px",label:"px"},{value:"%",label:"%"}],id:"o-border-raduis-box",onChange:e=>{(0,x.CJ)(e)&&(e=void 0),b({borderRadius:e})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Box Shadow","otter-blocks"),checked:u.boxShadow,onChange:()=>b({boxShadow:!u.boxShadow})}),u.boxShadow&&(0,i.createElement)(_a.Fi,{label:(0,o.__)("Border Shadow","otter-blocks")},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:u.boxShadowColor,onColorChange:e=>b({boxShadowColor:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:u.boxShadowColorOpacity,onChange:e=>b({boxShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:u.boxShadowBlur,onChange:e=>b({boxShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:u.boxShadowSpread,onChange:e=>b({boxShadowSpread:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:u.boxShadowHorizontal,onChange:e=>b({boxShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:u.boxShadowVertical,onChange:e=>b({boxShadowVertical:e}),min:-100,max:100}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Shape Divider","otter-blocks"),initialOpen:!1,className:"wp-block-themeisle-shape-divider"},(0,i.createElement)(_a.Lp,{label:(0,o.__)("Sides","otter-blocks"),options:[{label:(0,o.__)("Top","otter-blocks"),value:"top"},{label:(0,o.__)("Bottom","otter-blocks"),value:"bottom"}],value:g,onChange:h}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Type","otter-blocks"),value:z,options:[{label:(0,o.__)("None","otter-blocks"),value:"none"},{label:(0,o.__)("Triangle","otter-blocks"),value:"bigTriangle"},{label:(0,o.__)("Right Curve","otter-blocks"),value:"rightCurve"},{label:(0,o.__)("Curve","otter-blocks"),value:"curve"},{label:(0,o.__)("Slant","otter-blocks"),value:"slant"},{label:(0,o.__)("Cloud","otter-blocks"),value:"cloud"}],onChange:e=>{"top"==g?b({dividerTopType:e}):"bottom"==g&&b({dividerBottomType:e})}}),"none"!==z&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(_a.Ed,{label:(0,o.__)("Color","otter-blocks"),colorValue:"top"==g?u.dividerTopColor:"bottom"==g?u.dividerBottomColor:void 0,onColorChange:e=>{"top"==g?b({dividerTopColor:e}):"bottom"==g&&b({dividerBottomColor:e})}}),(0,i.createElement)(_a.n9,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:(()=>{var e,t,l,o,a,n,r,i,s,c,d,b;if("top"==g)switch(k){case"Desktop":return null!==(e=u.dividerTopWidth)&&void 0!==e?e:100;case"Tablet":return null!==(t=null!==(l=u.dividerTopWidthTablet)&&void 0!==l?l:u.dividerTopWidth)&&void 0!==t?t:100;case"Mobile":return null!==(o=null!==(a=null!==(n=u.dividerTopWidthMobile)&&void 0!==n?n:u.dividerTopWidthTablet)&&void 0!==a?a:u.dividerTopWidth)&&void 0!==o?o:100}else if("bottom"==g)switch(k){case"Desktop":return null!==(r=u.dividerBottomWidth)&&void 0!==r?r:100;case"Tablet":return null!==(i=null!==(s=u.dividerBottomWidthTablet)&&void 0!==s?s:u.dividerBottomWidth)&&void 0!==i?i:100;case"Mobile":return null!==(c=null!==(d=null!==(b=u.dividerBottomWidthMobile)&&void 0!==b?b:u.dividerBottomWidthTablet)&&void 0!==d?d:u.dividerBottomWidth)&&void 0!==c?c:100}})(),onChange:e=>{if("top"==g)switch(k){case"Desktop":b({dividerTopWidth:e});break;case"Tablet":b({dividerTopWidthTablet:e});break;case"Mobile":b({dividerTopWidthMobile:e})}else if("bottom"==g)switch(k){case"Desktop":b({dividerBottomWidth:e});break;case"Tablet":b({dividerBottomWidthTablet:e});break;case"Mobile":b({dividerBottomWidthMobile:e})}},step:.1,min:0,max:500})),(0,i.createElement)(_a.n9,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:(()=>{if("top"==g)switch(k){case"Desktop":return u.dividerTopHeight;case"Tablet":return u.dividerTopHeightTablet;case"Mobile":return u.dividerTopHeightMobile}else if("bottom"==g)switch(k){case"Desktop":return u.dividerBottomHeight;case"Tablet":return u.dividerBottomHeightTablet;case"Mobile":return u.dividerBottomHeightMobile}})(),onChange:e=>{if("top"==g)switch(k){case"Desktop":b({dividerTopHeight:e});break;case"Tablet":b({dividerTopHeightTablet:e});break;case"Mobile":b({dividerTopHeightMobile:e})}else if("bottom"==g)switch(k){case"Desktop":b({dividerBottomHeight:e});break;case"Tablet":b({dividerBottomHeightTablet:e});break;case"Mobile":b({dividerBottomHeightMobile:e})}},step:.1,min:0,max:500})),"curve"!==z&&"cloud"!==z&&(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Invert Shape Divider","otter-blocks"),checked:(()=>{switch(g){case"top":return u.dividerTopInvert;case"bottom":return u.dividerBottomInvert;default:return}})(),onChange:()=>{switch(g){case"top":b({dividerTopInvert:!u.dividerTopInvert});break;case"bottom":b({dividerBottomInvert:!u.dividerBottomInvert})}}})))),(0,i.createElement)(_a.p,null)),(0,i.createElement)(_a.pO,{value:u.id,onChange:e=>b({id:e})}))},Ea=e=>{let{type:t,front:l,style:o,fill:a,invert:n,width:r,height:s}=e;return"none"!==o&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-advanced-columns-separators",t),style:!l&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===o&&!1===n&&(0,i.createElement)("svg",{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)("path",{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===o&&!0===n&&(0,i.createElement)("svg",{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===o&&!1===n&&(0,i.createElement)("svg",{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===o&&!0===n&&(0,i.createElement)("svg",{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===o&&(0,i.createElement)("svg",{id:"curve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===o&&!1===n&&(0,i.createElement)("svg",{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)("path",{d:"M0 0 L100 100 L100 0 Z"})),"slant"===o&&!0===n&&(0,i.createElement)("svg",{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)("path",{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===o&&(0,i.createElement)("svg",{id:"cloud",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})))};const{attributes:xa}=ma,Sa=e=>(0,K.isNumber)(e)?(e=>e?`${e}px`:e)(e):e;var Ta=[{name:"themeisle-blocks/section-columns-1",description:(0,o.__)("Single column","otter-blocks"),icon:r.colsFull,title:(0,o.__)("Full","otter-blocks"),attributes:{columns:1,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"100"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal",description:(0,o.__)("2 equal columns","otter-blocks"),icon:r.cols2Equal,title:(0,o.__)("1:1","otter-blocks"),attributes:{columns:2,layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"50"}],["themeisle-blocks/advanced-column",{columnWidth:"50"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-1-2",description:(0,o.__)("1:2 columns","otter-blocks"),icon:r.cols12,title:(0,o.__)("1:2","otter-blocks"),attributes:{columns:2,layout:"oneTwo",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"33.34"}],["themeisle-blocks/advanced-column",{columnWidth:"66.66"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-2-1",description:(0,o.__)("2:1 columns","otter-blocks"),icon:r.cols21,title:(0,o.__)("2:1","otter-blocks"),attributes:{columns:2,layout:"twoOne",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"66.66"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal-3",description:(0,o.__)("3 equal columns","otter-blocks"),icon:r.cols3Equal,title:(0,o.__)("1:1:1","otter-blocks"),attributes:{columns:3,layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"33.33"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-1-1-2",description:(0,o.__)("1:1:2 columns","otter-blocks"),icon:r.cols112,title:(0,o.__)("1:1:2","otter-blocks"),attributes:{columns:3,layout:"oneOneTwo",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"50"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-2-1-1",description:(0,o.__)("2:1:1 columns","otter-blocks"),icon:r.cols211,title:(0,o.__)("2:1:1","otter-blocks"),attributes:{columns:3,layout:"twoOneOne",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"50"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal-4",description:(0,o.__)("4 equal columns","otter-blocks"),icon:r.cols4Equal,title:(0,o.__)("1:1:1:1","otter-blocks"),attributes:{columns:4,layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}]],scope:["block"]}];const{name:Ma}=ma;(0,a.registerBlockType)(Ma,{...ma,title:(0,o.__)("Section","otter-blocks"),description:(0,o.__)("Add a Section block that displays content in multiple columns, then add whatever content blocks you’d like. Powered by Otter.","otter-blocks"),icon:r.columnsIcon,keywords:["advanced columns","layout","section"],deprecated:ya,variations:Ta,edit:e=>{let{attributes:t,setAttributes:l,clientId:n,name:r}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(n,xa);return()=>e(t.id)}),[t.id]);const{updateBlockAttributes:c,replaceInnerBlocks:d}=(0,v.useDispatch)("core/block-editor"),{sectionBlock:u,isViewportAvailable:b,isPreviewDesktop:m,isPreviewTablet:p,isPreviewMobile:h,children:y,variations:k,defaultVariation:f}=(0,v.useSelect)((e=>{var t;const{getBlock:l}=e("core/block-editor"),{getBlockVariations:o,getBlockType:a,getDefaultBlockVariation:i}=e("core/blocks"),{__experimentalGetPreviewDeviceType:s}=!!e("core/edit-post")&&e("core/edit-post");return{sectionBlock:l(n),children:(null===(t=l(n))||void 0===t?void 0:t.innerBlocks)||[],isViewportAvailable:!!s,isPreviewDesktop:!!s&&"Desktop"===s(),isPreviewTablet:!!s&&"Tablet"===s(),isPreviewMobile:!!s&&"Mobile"===s(),blockType:a(r),defaultVariation:i(r,"block"),variations:o(r,"block").filter((e=>{let{isDefault:t}=e;return!t}))}}),[]),{insertBlock:_,removeBlock:w}=(0,v.useDispatch)("core/block-editor"),C=(e,t)=>{u.innerBlocks.map(((l,o)=>{c(l.clientId,{columnWidth:ka[e][t][o]})}))};(0,i.useEffect)((()=>{t.columns!==y.length&&(6>=y.length?C(y.length,"equal"):6<y.length?C(6,"equal"):1>=y.length&&C(1,"equal"),l({columns:y.length}))}),[y]);const E=e=>(0,L.getDefaultValueByField)({name:r,field:e,defaultAttributes:xa,attributes:t}),x=(0,Y.useViewportMatch)("large",">="),S=(0,Y.useViewportMatch)("large","<="),T=(0,Y.useViewportMatch)("small",">="),M=(0,Y.useViewportMatch)("small","<=");let B=x&&!S&&T&&!M,z=!x&&!S&&T&&!M,P=!(x||S||T||M);b&&!P&&(B=m,z=p,P=h);const[R,F]=(0,i.useState)("top"),A=e=>{var t,l;let{mobile:o,tablet:a,desktop:n}=e;return null!==(t=null!==(l=P&&o||z&&a||n)&&void 0!==l?l:n)&&void 0!==t?t:100},H=A({mobile:t.dividerTopWidthMobile,tablet:t.dividerTopWidthTablet,desktop:t.dividerTopWidth}),O=A({mobile:t.dividerBottomWidthMobile,tablet:t.dividerBottomWidthTablet,desktop:t.dividerBottomWidth}),N=A({mobile:t.dividerTopHeightMobile,tablet:t.dividerTopHeightTablet,desktop:t.dividerTopHeight}),V=A({mobile:t.dividerBottomHeightMobile,tablet:t.dividerBottomHeightTablet,desktop:t.dividerBottomHeight}),I=t.columnsHTMLTag;let D,G,$,W,j,U={paddingTop:E("padding")&&E("padding").top,paddingRight:E("padding")&&E("padding").right,paddingBottom:E("padding")&&E("padding").bottom,paddingLeft:E("padding")&&E("padding").left,marginTop:E("margin")&&E("margin").top,marginBottom:E("margin")&&E("margin").bottom,minHeight:"custom"===t.columnsHeight?Sa(t.columnsHeightCustom):t.columnsHeight};if(z||P){var q,J,Q,X,ee,te;const e=(0,K.pickBy)({paddingTop:null===(q=E("paddingTablet"))||void 0===q?void 0:q.top,paddingRight:null===(J=E("paddingTablet"))||void 0===J?void 0:J.right,paddingBottom:null===(Q=E("paddingTablet"))||void 0===Q?void 0:Q.bottom,paddingLeft:null===(X=E("paddingTablet"))||void 0===X?void 0:X.left,marginTop:null===(ee=E("marginTablet"))||void 0===ee?void 0:ee.top,marginBottom:null===(te=E("marginTablet"))||void 0===te?void 0:te.bottom,minHeight:"custom"===t.columnsHeight?Sa(t.columnsHeightCustomTablet):t.columnsHeight},(e=>e));U=(0,K.merge)(U,e)}if(P){var le,oe,ae,ne,re,ie;const e=(0,K.pickBy)({paddingTop:null===(le=E("paddingMobile"))||void 0===le?void 0:le.top,paddingRight:null===(oe=E("paddingMobile"))||void 0===oe?void 0:oe.right,paddingBottom:null===(ae=E("paddingMobile"))||void 0===ae?void 0:ae.bottom,paddingLeft:null===(ne=E("paddingMobile"))||void 0===ne?void 0:ne.left,marginTop:null===(re=E("marginMobile"))||void 0===re?void 0:re.top,marginBottom:null===(ie=E("marginMobile"))||void 0===ie?void 0:ie.bottom,minHeight:"custom"===t.columnsHeight?Sa(t.columnsHeightCustomMobile):t.columnsHeight},(e=>e));U=(0,K.merge)(U,e)}var se,ce,de;"color"===t.backgroundType&&(D={backgroundColor:t.backgroundColor}),"image"===t.backgroundType&&(D={backgroundImage:`url( '${null===(se=t.backgroundImage)||void 0===se?void 0:se.url}' )`,backgroundAttachment:t.backgroundAttachment,backgroundPosition:`${Math.round(100*(null===(ce=t.backgroundPosition)||void 0===ce?void 0:ce.x))}% ${Math.round(100*(null===(de=t.backgroundPosition)||void 0===de?void 0:de.y))}%`,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}),"gradient"===t.backgroundType&&(D={backgroundImage:t.backgroundGradient}),t.border&&!(0,K.isEmpty)(t.border)&&($={borderTopWidth:t.border.top,borderRightWidth:t.border.right,borderBottomWidth:t.border.bottom,borderLeftWidth:t.border.left,borderStyle:"solid",borderColor:t.borderColor}),t.borderRadius&&!(0,K.isEmpty)(t.borderRadius)&&(W={borderTopLeftRadius:t.borderRadius.top,borderTopRightRadius:t.borderRadius.right,borderBottomRightRadius:t.borderRadius.bottom,borderBottomLeftRadius:t.borderRadius.left}),!0===t.boxShadow&&(j={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`});const ue={...U,...D,...$,...W,...j,"--content-color":t.color,"--link-color":t.linkColor,"--content-color-hover":t.colorHover};var be,me,pe;"color"===t.backgroundOverlayType&&(G={background:t.backgroundOverlayColor,opacity:t.backgroundOverlayOpacity/100}),"image"===t.backgroundOverlayType&&(G={backgroundImage:`url( '${null===(be=t.backgroundOverlayImage)||void 0===be?void 0:be.url}' )`,backgroundAttachment:t.backgroundOverlayAttachment,backgroundPosition:`${Math.round(100*(null===(me=t.backgroundOverlayPosition)||void 0===me?void 0:me.x))}% ${Math.round(100*(null===(pe=t.backgroundOverlayPosition)||void 0===pe?void 0:pe.y))}%`,backgroundRepeat:t.backgroundOverlayRepeat,backgroundSize:t.backgroundOverlaySize,opacity:t.backgroundOverlayOpacity/100}),"gradient"===t.backgroundOverlayType&&(G={background:t.backgroundOverlayGradient,opacity:t.backgroundOverlayOpacity/100});const ge={...G,...W,mixBlendMode:t.backgroundOverlayBlend,filter:`blur( ${t.backgroundOverlayFilterBlur/10}px ) brightness( ${t.backgroundOverlayFilterBrightness/10} ) contrast( ${t.backgroundOverlayFilterContrast/10} ) grayscale( ${t.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${t.backgroundOverlayFilterHue}deg ) saturate( ${t.backgroundOverlayFilterSaturate/10} )`};let he={};t.columnsWidth&&(he={maxWidth:Sa(E("columnsWidth"))}),(z||P)&&E("columnsWidthTablet")&&(he.maxWidth=Sa(E("columnsWidthTablet"))),P&&E("columnsWidthMobile")&&(he.maxWidth=Sa(E("columnsWidthMobile")));const ve=g()(`has-${t.columns}-columns`,`has-desktop-${t.layout}-layout`,`has-tablet-${t.layoutTablet}-layout`,`has-mobile-${t.layoutMobile}-layout`,`has-vertical-${t.verticalAlign}`,`has-horizontal-${t.horizontalAlign}`,{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},{"has-viewport-desktop":B},{"has-viewport-tablet":z},{"has-viewport-mobile":P}),ye=t.columns?(0,s.useBlockProps)({id:t.id,className:ve,style:ue}):(0,s.useBlockProps)();return t.columns?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(fa,{attributes:t,setAttributes:l}),(0,i.createElement)(Ca,{attributes:t,setAttributes:l,getValue:E,updateColumnsWidth:C,dividerViewType:R,setDividerViewType:F,changeColumnsNumbers:e=>{t.columns<e?(0,K.times)(e-t.columns,(()=>{const e=(0,a.createBlock)("themeisle-blocks/advanced-column");e&&_(e,(null==y?void 0:y.length)||0,n,!1)})):t.columns>e&&y.slice(e).forEach((e=>w(e.clientId,!1)))}}),(0,i.createElement)(I,ye,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay",style:ge}),(0,i.createElement)(Ea,{type:"top",style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert,width:H,height:N}),(0,i.createElement)("div",{className:"innerblocks-wrap",style:he},(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/advanced-column"],orientation:"horizontal"})),(0,i.createElement)(Ea,{type:"bottom",style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert,width:O,height:V}))):(0,i.createElement)("div",ye,(0,i.createElement)(s.__experimentalBlockVariationPicker,{label:(0,o.__)("Section","otter-blocks"),instructions:(0,o.__)("Select a layout to start with, or make one yourself.","otter-blocks"),variations:k,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;e&&(d(n,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0),l(e.attributes))},allowSkip:!0}))},save:e=>{let{attributes:t}=e;const l=t.columnsHTMLTag,o=t.hide?"":`has-desktop-${t.layout}-layout`,a=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,n=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,r=g()(`has-${t.columns}-columns`,o,a,n,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},`has-vertical-${t.verticalAlign}`),c=s.useBlockProps.save({id:t.id,className:r});return(0,i.createElement)(l,c,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,i.createElement)(Ea,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap"},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(Ea,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))},example:{viewportWidth:1e3,attributes:{},innerBlocks:[{name:"themeisle-blocks/advanced-column",attributes:{margin:{right:"10px"}},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,o.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,o.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"themeisle-blocks/advanced-column",attributes:{margin:{left:"10px"}},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,o.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,o.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]}});var Ba=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/advanced-column","title":"Section Column","category":"themeisle-blocks","description":"A single column within a Section block. Powered by Otter.","parent":["themeisle-blocks/advanced-columns"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"margin":{"type":"object"},"marginTablet":{"type":"object"},"marginMobile":{"type":"object"},"color":{"type":"string"},"colorHover":{"type":"string"},"linkColor":{"type":"string"},"backgroundType":{"type":"string","default":"color"},"backgroundColor":{"type":"string"},"backgroundImage":{"type":"object"},"backgroundAttachment":{"type":"string","default":"scroll"},"backgroundPosition":{"type":"object"},"backgroundRepeat":{"type":"string","default":"repeat"},"backgroundSize":{"type":"string","default":"auto"},"backgroundGradient":{"type":"string","default":"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},"backgroundOverlayOpacity":{"type":"number","default":50},"backgroundOverlayType":{"type":"string","default":"color"},"backgroundOverlayColor":{"type":"string"},"backgroundOverlayImage":{"type":"object"},"backgroundOverlayAttachment":{"type":"string","default":"scroll"},"backgroundOverlayPosition":{"type":"object"},"backgroundOverlayRepeat":{"type":"string","default":"repeat"},"backgroundOverlaySize":{"type":"string","default":"auto"},"backgroundOverlayGradient":{"type":"string","default":"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},"backgroundOverlayFilterBlur":{"type":"number","default":0},"backgroundOverlayFilterBrightness":{"type":"number","default":10},"backgroundOverlayFilterContrast":{"type":"number","default":10},"backgroundOverlayFilterGrayscale":{"type":"number","default":0},"backgroundOverlayFilterHue":{"type":"number","default":0},"backgroundOverlayFilterSaturate":{"type":"number","default":10},"backgroundOverlayBlend":{"type":"string","default":"normal"},"backgroundColorHover":{"type":"string"},"border":{"type":"object"},"borderColor":{"type":"string"},"borderRadius":{"type":"object"},"boxShadow":{"type":"boolean","default":false},"boxShadowColor":{"type":"string","default":"#000000"},"boxShadowColorOpacity":{"type":"number","default":50},"boxShadowBlur":{"type":"number","default":5},"boxShadowSpread":{"type":"number","default":0},"boxShadowHorizontal":{"type":"number","default":0},"boxShadowVertical":{"type":"number","default":0},"columnsHTMLTag":{"type":"string","default":"div"},"columnWidth":{"type":"string"},"verticalAlign":{"type":"string"},"isSynced":{"type":"array"}},"supports":{"inserter":false,"html":false},"editorStyle":"otter-advanced-columns-editor","style":"otter-advanced-columns-style"}');const za={id:{type:"string"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number",default:20},paddingMobile:{type:"number",default:20},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number",default:20},paddingTopMobile:{type:"number",default:20},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number",default:20},paddingRightMobile:{type:"number",default:20},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number",default:20},paddingBottomMobile:{type:"number",default:20},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number",default:20},paddingLeftMobile:{type:"number",default:20},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number",default:20},marginMobile:{type:"number",default:20},marginTop:{type:"number",default:20},marginTopTablet:{type:"number",default:20},marginTopMobile:{type:"number",default:20},marginRight:{type:"number",default:0},marginRightTablet:{type:"number",default:0},marginRightMobile:{type:"number",default:0},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number",default:20},marginBottomMobile:{type:"number",default:20},marginLeft:{type:"number",default:0},marginLeftTablet:{type:"number",default:0},marginLeftMobile:{type:"number",default:0},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundGradientFirstLocation:{type:"number",default:0},backgroundGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundGradientSecondLocation:{type:"number",default:100},backgroundGradientType:{type:"string",default:"linear"},backgroundGradientAngle:{type:"number",default:90},backgroundGradientPosition:{type:"string",default:"center center"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},columnsHTMLTag:{type:"string",default:"div"},columnWidth:{type:"string"}},Pa=[{attributes:za,supports:{inserter:!1,reusable:!1,html:!1},save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;let a,n,r,c;if("color"===t.backgroundType&&(a={background:t.backgroundColor}),"image"===t.backgroundType&&(a={backgroundImage:`url( '${t.backgroundImageURL}' )`,backgroundAttachment:t.backgroundAttachment,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}),"gradient"===t.backgroundType){let e;e="linear"===t.backgroundGradientType?`${t.backgroundGradientAngle}deg`:`at ${t.backgroundGradientPosition}`,a={background:`${t.backgroundGradientType}-gradient( ${e}, ${t.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientFirstLocation}%, ${t.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientSecondLocation}% )`}}"linked"===t.borderType&&(n={borderWidth:`${t.border}px`,borderStyle:"solid",borderColor:t.borderColor}),"unlinked"===t.borderType&&(n={borderTopWidth:`${t.borderTop}px`,borderRightWidth:`${t.borderRight}px`,borderBottomWidth:`${t.borderBottom}px`,borderLeftWidth:`${t.borderLeft}px`,borderStyle:"solid",borderColor:t.borderColor}),"linked"===t.borderRadiusType&&(r={borderRadius:`${t.borderRadius}px`}),"unlinked"===t.borderRadiusType&&(r={borderTopLeftRadius:`${t.borderRadiusTop}px`,borderTopRightRadius:`${t.borderRadiusRight}px`,borderBottomRightRadius:`${t.borderRadiusBottom}px`,borderBottomLeftRadius:`${t.borderRadiusLeft}px`}),!0===t.boxShadow&&(c={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`});const d={...a,...n,...r,...c};return(0,i.createElement)(o,{className:l,id:t.id,style:d},(0,i.createElement)(s.InnerBlocks.Content,null))}},{attributes:{...za,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginRightTablet:{type:"number"},marginRightMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},marginLeftTablet:{type:"number"},marginLeftMobile:{type:"number"}},supports:{inserter:!1,reusable:!1,html:!1},migrate:e=>{let t="";if("gradient"===e.backgroundType){let l="";"linear"===e.backgroundGradientType&&(l=`${e.backgroundGradientAngle}deg, `),t=`${e.backgroundGradientType}-gradient(${l}${Z()(e.backgroundGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${Z()(e.backgroundGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}%)`}return{...{...(0,K.omit)(e,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition"]),backgroundGradient:t}}},isEligible:e=>"gradient"===e.backgroundType&&void 0!==e.backgroundGradientFirstColor,save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;return(0,i.createElement)(o,{className:l,id:t.id},(0,i.createElement)(s.InnerBlocks.Content,null))}},{attributes:{...(0,K.omit)(za,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition"]),paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginRightTablet:{type:"number"},marginRightMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},marginLeftTablet:{type:"number"},marginLeftMobile:{type:"number"},backgroundGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"}},supports:{inserter:!1,reusable:!1,html:!1},migrate:e=>{const t={},l={},o={},a={},n={},r={},i={},s={};let c={},d={};"unlinked"===e.paddingType?(t.top=(0,K.isUndefined)(e.paddingTop)?"20px":e.paddingTop+"px",t.bottom=(0,K.isUndefined)(e.paddingBottom)?"20px":e.paddingBottom+"px",t.left=(0,K.isUndefined)(e.paddingLeft)?"20px":e.paddingLeft+"px",t.right=(0,K.isUndefined)(e.paddingRight)?"20px":e.paddingRight+"px"):(t.top=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.bottom=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.left=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.right=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px"),"unlinked"===e.paddingTypeTablet?(l.top=(0,K.isUndefined)(e.paddingTopTablet)?null:e.paddingTopTablet+"px",l.bottom=(0,K.isUndefined)(e.paddingBottomTablet)?null:e.paddingBottomTablet+"px",l.left=(0,K.isUndefined)(e.paddingLeftTablet)?null:e.paddingLeftTablet+"px",l.right=(0,K.isUndefined)(e.paddingRightTablet)?null:e.paddingRightTablet+"px"):(l.top=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.bottom=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.left=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.right=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px"),"unlinked"===e.paddingTypeMobile?(o.top=(0,K.isUndefined)(e.paddingMobileTop)?null:e.paddingMobileTop+"px",o.bottom=(0,K.isUndefined)(e.paddingMobileBottom)?null:e.paddingMobileBottom+"px",o.left=(0,K.isUndefined)(e.paddingMobileLeft)?null:e.paddingMobileLeft+"px",o.right=(0,K.isUndefined)(e.paddingMobileRight)?null:e.paddingMobileRight+"px"):(o.top=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.bottom=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.left=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.right=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px"),"linked"===e.marginType?(a.top=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px",a.bottom=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px",a.left=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px",a.right=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px"):(a.top=(0,K.isUndefined)(e.marginTop)?"20px":e.marginTop+"px",a.bottom=(0,K.isUndefined)(e.marginBottom)?"20px":e.marginBottom+"px",a.left=(0,K.isUndefined)(e.marginLeft)?"20px":e.marginLeft+"px",a.right=(0,K.isUndefined)(e.marginRight)?"20px":e.marginRight+"px"),"linked"===e.marginTypeTablet?(n.top=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px",n.bottom=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px",n.left=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px",n.right=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px"):(n.top=(0,K.isUndefined)(e.marginTopTablet)?null:e.marginTopTablet+"px",n.bottom=(0,K.isUndefined)(e.marginBottomTablet)?null:e.marginBottomTablet+"px",n.left=(0,K.isUndefined)(e.marginLeftTablet)?null:e.marginLeftTablet+"px",n.right=(0,K.isUndefined)(e.marginRightTablet)?null:e.marginRightTablet+"px"),"linked"===e.marginTypeMobile?(r.top=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px",r.bottom=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px",r.left=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px",r.right=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px"):(r.top=(0,K.isUndefined)(e.marginTopMobile)?null:e.marginTopMobile+"px",r.bottom=(0,K.isUndefined)(e.marginBottomMobile)?null:e.marginBottomMobile+"px",r.left=(0,K.isUndefined)(e.marginLeftMobile)?null:e.marginLeftMobile+"px",r.right=(0,K.isUndefined)(e.marginRightMobile)?null:e.marginRightMobile+"px"),"unlinked"===e.borderType?(i.top=(0,K.isUndefined)(e.borderTop)?null:e.borderTop+"px",i.bottom=(0,K.isUndefined)(e.borderBottom)?null:e.borderBottom+"px",i.left=(0,K.isUndefined)(e.borderLeft)?null:e.borderLeft+"px",i.right=(0,K.isUndefined)(e.borderRight)?null:e.borderRight+"px"):(i.top=(0,K.isUndefined)(e.border)?null:e.border+"px",i.bottom=(0,K.isUndefined)(e.border)?null:e.border+"px",i.left=(0,K.isUndefined)(e.border)?null:e.border+"px",i.right=(0,K.isUndefined)(e.border)?null:e.border+"px"),"unlinked"===e.borderRadiusType?(s.top=(0,K.isUndefined)(e.borderRadiusTop)?null:e.borderRadiusTop+"px",s.bottom=(0,K.isUndefined)(e.borderRadiusBottom)?null:e.borderRadiusBottom+"px",s.left=(0,K.isUndefined)(e.borderRadiusLeft)?null:e.borderRadiusLeft+"px",s.right=(0,K.isUndefined)(e.borderRadiusRight)?null:e.borderRadiusRight+"px"):(s.top=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.bottom=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.left=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.right=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px"),void 0!==e.backgroundImageURL&&void 0!==e.backgroundImageID&&(c={id:e.backgroundImageID,url:e.backgroundImageURL});return void 0!==e.backgroundPosition&&(d={"top left":{x:"0.00",y:"0.00"},"top center":{x:"0.50",y:"0.00"},"top right":{x:"1.00",y:"0.00"},"center left":{x:"0.00",y:"0.50"},"center center":{x:"0.50",y:"0.50"},"center right":{x:"1.00",y:"0.50"},"bottom left":{x:"0.00",y:"1.00"},"bottom center":{x:"0.50",y:"1.00"},"bottom right":{x:"1.00",y:"1.00"}}[e.backgroundPosition]),{...{...(0,K.omit)(e,["paddingType","paddingTypeTablet","paddingTypeMobile","paddingTop","paddingTopTablet","paddingTopMobile","paddingRight","paddingRightTablet","paddingRightMobile","paddingBottom","paddingBottomTablet","paddingBottomMobile","paddingLeft","paddingLeftTablet","paddingLeftMobile","marginType","marginTypeTablet","marginTypeMobile","marginTop","marginTopTablet","marginTopMobile","marginRight","marginRightTablet","marginRightMobile","marginBottom","marginBottomTablet","marginBottomMobile","marginLeft","marginLeftTablet","marginLeftMobile","borderType","borderTop","borderRight","borderBottom","borderLeft","borderRadiusType","borderRadiusTop","borderRadiusRight","borderRadiusBottom","borderRadiusLeft"]),...!(0,x.FH)(t)&&{padding:t},...!(0,x.FH)(l)&&{paddingTablet:l},...!(0,x.FH)(o)&&{paddingMobile:o},...!(0,x.FH)(a)&&{margin:a},...!(0,x.FH)(n)&&{marginTablet:n},...!(0,x.FH)(r)&&{marginMobile:r},...!(0,x.FH)(i)&&{border:i},...!(0,x.FH)(s)&&{borderRadius:s},...!(0,x.FH)(c)&&{backgroundImage:c},...!(0,x.FH)(d)&&{backgroundPosition:d}}}},isEligible:e=>["padding","paddingTablet","paddingMobile","paddingTop","paddingTopTablet","paddingTopMobile","paddingRight","paddingRightTablet","paddingRightMobile","paddingBottom","paddingBottomTablet","paddingBottomMobile","paddingLeft","paddingLeftTablet","paddingLeftMobile","margin","marginTablet","marginMobile","marginTop","marginTopTablet","marginTopMobile","marginRight","marginRightTablet","marginRightMobile","marginBottom","marginBottomTablet","marginBottomMobile","marginLeft","marginLeftTablet","marginLeftMobile","borderType","border","borderTop","borderRight","borderBottom","borderLeft","borderRadiusType","borderRadius","borderRadiusTop","borderRadiusRight","borderRadiusBottom","borderRadiusLeft"].some((t=>!(0,K.isUndefined)(e[t])&&"number"==typeof e[t]))||void 0!==e.backgroundImageURL&&void 0!==e.backgroundImageID||void 0!==e.backgroundPosition&&"object"!=typeof e.backgroundPosition,save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;return(0,i.createElement)(o,{className:l,id:t.id},(0,i.createElement)(s.InnerBlocks.Content,null))}}];var La=Pa,Ra=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(s.BlockVerticalAlignmentToolbar,{onChange:e=>t.verticalAlign===e?l({verticalAlign:void 0}):l({verticalAlign:e}),value:t.verticalAlign}))},Fa=e=>{var t,l,a,n;let{attributes:r,setAttributes:d,getValue:u,parentBlock:b,updateBlockAttributes:m,currentBlockWidth:p,nextBlock:g,nextBlockWidth:h}=e;const y=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]),[k,f]=(0,i.useState)("layout"),_=()=>{switch(y){case"Desktop":return"padding";case"Tablet":return"paddingTablet";case"Mobile":return"paddingMobile";default:return}},w=()=>{switch(y){case"Desktop":return"margin";case"Tablet":return"marginTablet";case"Mobile":return"marginMobile";default:return}},C=(e,t,l,o)=>"color"===e&&t?t:"image"===e&&l?`url( ${l} )`:"gradient"===e&&o?o:void 0;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(_a.Hn,{value:k,options:[{label:(0,o.__)("Layout","otter-blocks"),value:"layout"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:f}),"layout"===k&&(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Column Structure","otter-blocks")},1<b.innerBlocks.length&&(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Column Width","otter-blocks"),value:Number(r.columnWidth),onChange:e=>{const t=e||10,l=Number(p.current)-t+Number(h.current);p.current=t,h.current=l,d({columnWidth:t.toFixed(2)}),m(g.current,{columnWidth:l.toFixed(2)})},step:.1,min:10,max:Number(r.columnWidth)+Number(h.current)-10}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:r.columnsHTMLTag,options:[{label:(0,o.__)("Default (div)","otter-blocks"),value:"div"},{label:"section",value:"section"},{label:"header",value:"header"},{label:"footer",value:"footer"},{label:"article",value:"article"},{label:"main",value:"main"}],onChange:e=>d({columnsHTMLTag:e})}))||"style"===k&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(_a.r4,{isSynced:r.isSynced,options:[{label:(0,o.__)("Padding","otter-blocks"),value:_()},{label:(0,o.__)("Margin","otter-blocks"),value:w()}],setAttributes:d}),(0,i.createElement)(_a.n9,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.Disabled,{isDisabled:(null===(t=r.isSynced)||void 0===t?void 0:t.includes(_()))||!1,className:"o-disabled"},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:(()=>{switch(y){case"Desktop":return u("padding");case"Tablet":return(0,K.merge)({...u("padding")},u("paddingTablet"));case"Mobile":return(0,K.merge)({...u("padding")},u("paddingTablet"),u("paddingMobile"));default:return}})(),inputProps:{min:0,max:500},onChange:e=>{switch((0,x.CJ)(e)&&(e=void 0),y){case"Desktop":return d({padding:e});case"Tablet":return d({paddingTablet:(0,x.cg)(e,r.padding)});case"Mobile":return d({paddingMobile:(0,x.cg)(e,{...r.padding,...r.paddingTablet})});default:return}}})),(0,i.createElement)(c.Disabled,{isDisabled:(null===(l=r.isSynced)||void 0===l?void 0:l.includes(w()))||!1,className:"o-disabled"},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Margin","otter-blocks"),values:(()=>{switch(y){case"Desktop":return u("margin");case"Tablet":return(0,K.merge)({...u("margin")},u("marginTablet"));case"Mobile":return(0,K.merge)({...u("margin")},u("marginTablet"),u("marginMobile"));default:return}})(),inputProps:{min:-500,max:500},onChange:e=>{switch((0,x.CJ)(e)&&(e=void 0),y){case"Desktop":return d({margin:e});case"Tablet":return d({marginTablet:(0,x.cg)(e,r.margin)});case"Mobile":return d({marginMobile:(0,x.cg)(e,{...r.margin,...r.marginTablet})});default:return}}})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Background & Content","otter-blocks"),initialOpen:!1},(0,i.createElement)(_a.Ed,{label:(0,o.__)("Text","otter-blocks"),colorValue:r.color,onColorChange:e=>d({color:e}),className:"is-list is-first"}),(0,i.createElement)(_a.Ed,{label:(0,o.__)("Link","otter-blocks"),colorValue:r.linkColor,onColorChange:e=>d({linkColor:e}),className:"is-list"}),(0,i.createElement)(_a.jj,{label:(0,o.__)("Background","otter-blocks"),indicator:C(r.backgroundType,r.backgroundColor,null===(a=r.backgroundImage)||void 0===a?void 0:a.url,r.backgroundGradient)},(0,i.createElement)(_a.Zo,{backgroundType:r.backgroundType,backgroundColor:r.backgroundColor,image:r.backgroundImage,gradient:r.backgroundGradient,focalPoint:r.backgroundPosition,backgroundAttachment:r.backgroundAttachment,backgroundRepeat:r.backgroundRepeat,backgroundSize:r.backgroundSize,changeBackgroundType:e=>d({backgroundType:e}),changeImage:e=>{d({backgroundImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>d({backgroundImage:void 0}),changeColor:e=>d({backgroundColor:e}),changeGradient:e=>d({backgroundGradient:e}),changeBackgroundAttachment:e=>d({backgroundAttachment:e}),changeBackgroundRepeat:e=>d({backgroundRepeat:e}),changeFocalPoint:e=>d({backgroundPosition:e}),changeBackgroundSize:e=>d({backgroundSize:e})})),(0,i.createElement)(_a.jj,{label:(0,o.__)("Background Overlay","otter-blocks"),indicator:C(r.backgroundOverlayType,r.backgroundOverlayColor,null===(n=r.backgroundOverlayImage)||void 0===n?void 0:n.url,r.backgroundOverlayGradient)},(0,i.createElement)(_a.RF,{backgroundType:r.backgroundOverlayType,backgroundColor:r.backgroundOverlayColor,image:r.backgroundOverlayImage,gradient:r.backgroundOverlayGradient,focalPoint:r.backgroundOverlayPosition,backgroundAttachment:r.backgroundOverlayAttachment,backgroundRepeat:r.backgroundOverlayRepeat,backgroundSize:r.backgroundOverlaySize,backgroundOpacity:r.backgroundOverlayOpacity,backgroundFilterBlur:r.backgroundOverlayFilterBlur,backgroundFilterBrightness:r.backgroundOverlayFilterBrightness,backgroundFilterContrast:r.backgroundOverlayFilterContrast,backgroundFilterGrayscale:r.backgroundOverlayFilterGrayscale,backgroundFilterHue:r.backgroundOverlayFilterHue,backgroundFilterSaturate:r.backgroundOverlayFilterSaturate,backgroundBlend:r.backgroundOverlayBlend,changeBackgroundType:e=>d({backgroundOverlayType:e}),changeImage:e=>{d({backgroundOverlayImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>d({backgroundOverlayImage:void 0}),changeColor:e=>d({backgroundOverlayColor:e}),changeGradient:e=>d({backgroundOverlayGradient:e}),changeBackgroundAttachment:e=>d({backgroundOverlayAttachment:e}),changeBackgroundRepeat:e=>d({backgroundOverlayRepeat:e}),changeFocalPoint:e=>d({backgroundOverlayPosition:e}),changeBackgroundSize:e=>d({backgroundOverlaySize:e}),changeOpacity:e=>d({backgroundOverlayOpacity:e}),changeFilterBlur:e=>d({backgroundOverlayFilterBlur:e}),changeFilterBrightness:e=>d({backgroundOverlayFilterBrightness:e}),changeFilterContrast:e=>d({backgroundOverlayFilterContrast:e}),changeFilterGrayscale:e=>d({backgroundOverlayFilterGrayscale:e}),changeFilterHue:e=>d({backgroundOverlayFilterHue:e}),changeFilterSaturate:e=>d({backgroundOverlayFilterSaturate:e}),changeBlend:e=>d({backgroundOverlayBlend:e})})),(0,i.createElement)(_a.Ed,{label:(0,o.__)("Text Hover","otter-blocks"),colorValue:r.colorHover,onColorChange:e=>d({colorHover:e}),className:"is-list"}),(0,i.createElement)(_a.Ed,{label:(0,o.__)("Background Hover","otter-blocks"),colorValue:r.backgroundColorHover,onColorChange:e=>d({backgroundColorHover:e}),className:"is-list"})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),className:"o-section-border-container",initialOpen:!1},(0,i.createElement)(_a.Ed,{label:(0,o.__)("Border Color","otter-blocks"),colorValue:r.borderColor,onColorChange:e=>d({borderColor:e})}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Width","otter-blocks"),values:r.border,inputProps:{min:0,max:500},units:[{value:"px",label:"px"}],onChange:e=>{(0,x.CJ)(e)&&(e=void 0),d({border:e})}}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Radius","otter-blocks"),values:r.borderRadius,inputProps:{min:0,max:500},units:[{value:"px",label:"px"},{value:"%",label:"%"}],onChange:e=>{(0,x.CJ)(e)&&(e=void 0),d({borderRadius:e})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Box Shadow","otter-blocks"),checked:r.boxShadow,onChange:()=>d({boxShadow:!r.boxShadow})}),r.boxShadow&&(0,i.createElement)(_a.Fi,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:r.boxShadowColor,onColorChange:e=>d({boxShadowColor:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:r.boxShadowColorOpacity,onChange:e=>d({boxShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:r.boxShadowBlur,onChange:e=>d({boxShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:r.boxShadowSpread,onChange:e=>d({boxShadowSpread:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:r.boxShadowHorizontal,onChange:e=>d({boxShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:r.boxShadowVertical,onChange:e=>d({boxShadowVertical:e}),min:-100,max:100})))),(0,i.createElement)(_a.p,null))};const{attributes:Aa}=Ba;const{name:Ha}=Ba;(0,a.registerBlockType)(Ha,{...Ba,title:(0,o.__)("Section Column","otter-blocks"),description:(0,o.__)("A single column within a Section block. Powered by Otter.","otter-blocks"),icon:r.columnIcon,deprecated:La,edit:e=>{var t,l,o,a,n,r,c,d,u;let{name:b,attributes:m,setAttributes:p,isSelected:g,clientId:h}=e;const{updateBlockAttributes:y}=(0,v.useDispatch)("core/block-editor"),{adjacentBlockClientId:k,adjacentBlock:f,parentBlock:_,hasInnerBlocks:w,isViewportAvailable:C,isPreviewDesktop:E,isPreviewTablet:x,isPreviewMobile:S}=(0,v.useSelect)((e=>{const{getAdjacentBlockClientId:t,getBlock:l,getBlockRootClientId:o}=e("core/block-editor"),{__experimentalGetPreviewDeviceType:a}=!!e("core/edit-post")&&e("core/edit-post"),n=l(h),r=t(h);return{adjacentBlockClientId:r,adjacentBlock:l(r),parentBlock:l(o(h)),hasInnerBlocks:!(!n||!n.innerBlocks.length),isViewportAvailable:!!a,isPreviewDesktop:!!a&&"Desktop"===a(),isPreviewTablet:!!a&&"Tablet"===a(),isPreviewMobile:!!a&&"Mobile"===a()}}),[]),T=(0,Y.useViewportMatch)("large",">="),M=(0,Y.useViewportMatch)("large","<="),B=(0,Y.useViewportMatch)("small",">="),z=(0,Y.useViewportMatch)("small","<=");(0,i.useEffect)((()=>{const e=(0,L.blockInit)(h,Aa);return()=>e(m.id)}),[m.id]),(0,i.useEffect)((()=>{if(1<_.innerBlocks.length&&!k){const e=_.innerBlocks.findIndex((e=>e.clientId===h)),t=_.innerBlocks[e-1];R.current=t.clientId,F.current=t.attributes.columnWidth}}),[]),(0,i.useEffect)((()=>{if(1<_.innerBlocks.length)if(k)F.current=f.attributes.columnWidth,R.current=k,P.current=m.columnWidth;else{const e=_.innerBlocks.findIndex((e=>e.clientId===h)),t=_.innerBlocks[e-1];F.current=t.attributes.columnWidth,R.current=t.clientId,P.current=m.columnWidth}}),[g,m.columnWidth,_.innerBlocks.length]);const P=(0,i.useRef)(m.columnWidth),R=(0,i.useRef)(k&&k),F=(0,i.useRef)(f&&f.attributes.columnWidth),A=e=>(0,L.getDefaultValueByField)({name:b,field:e,defaultAttributes:Aa,attributes:m});let H=T&&!M&&B&&!z,O=!T&&!M&&B&&!z,N=!(T||M||B||z);if(C&&!N&&(H=E,O=x,N=S),void 0===m.columnWidth){const e=_.innerBlocks.findIndex((e=>e.clientId===h)),{columns:t}=_.attributes,{layout:l}=_.attributes;y(h,{columnWidth:ka[t][l][e]})}const V=m.columnsHTMLTag;let I,D,G,$,W,j={paddingTop:null===(t=A("padding"))||void 0===t?void 0:t.top,paddingRight:null===(l=A("padding"))||void 0===l?void 0:l.right,paddingBottom:null===(o=A("padding"))||void 0===o?void 0:o.bottom,paddingLeft:null===(a=A("padding"))||void 0===a?void 0:a.left,marginTop:null===(n=A("margin"))||void 0===n?void 0:n.top,marginRight:null===(r=A("margin"))||void 0===r?void 0:r.right,marginBottom:null===(c=A("margin"))||void 0===c?void 0:c.bottom,marginLeft:null===(d=A("margin"))||void 0===d?void 0:d.left};if(O||N){var U,q,J,Q,X,ee,te,le;const e=(0,K.pickBy)({paddingTop:null===(U=A("paddingTablet"))||void 0===U?void 0:U.top,paddingRight:null===(q=A("paddingTablet"))||void 0===q?void 0:q.right,paddingBottom:null===(J=A("paddingTablet"))||void 0===J?void 0:J.bottom,paddingLeft:null===(Q=A("paddingTablet"))||void 0===Q?void 0:Q.left,marginTop:null===(X=A("marginTablet"))||void 0===X?void 0:X.top,marginRight:null===(ee=A("marginTablet"))||void 0===ee?void 0:ee.right,marginBottom:null===(te=A("marginTablet"))||void 0===te?void 0:te.bottom,marginLeft:null===(le=A("marginTablet"))||void 0===le?void 0:le.left},(e=>e));j=(0,K.merge)(j,e)}if(N){var oe,ae,ne,re,ie,se,ce,de;const e=(0,K.pickBy)({paddingTop:null===(oe=A("paddingMobile"))||void 0===oe?void 0:oe.top,paddingRight:null===(ae=A("paddingMobile"))||void 0===ae?void 0:ae.right,paddingBottom:null===(ne=A("paddingMobile"))||void 0===ne?void 0:ne.bottom,paddingLeft:null===(re=A("paddingMobile"))||void 0===re?void 0:re.left,marginTop:null===(ie=A("marginMobile"))||void 0===ie?void 0:ie.top,marginRight:null===(se=A("marginMobile"))||void 0===se?void 0:se.right,marginBottom:null===(ce=A("marginMobile"))||void 0===ce?void 0:ce.bottom,marginLeft:null===(de=A("marginMobile"))||void 0===de?void 0:de.left},(e=>e));j=(0,K.merge)(j,e)}var ue,be,me;"color"===m.backgroundType&&(I={"--background":m.backgroundColor}),"image"===m.backgroundType&&(I={"--background":`url( '${null===(ue=m.backgroundImage)||void 0===ue?void 0:ue.url}' )`,backgroundAttachment:m.backgroundAttachment,backgroundPosition:`${Math.round(100*(null===(be=m.backgroundPosition)||void 0===be?void 0:be.x))}% ${Math.round(100*(null===(me=m.backgroundPosition)||void 0===me?void 0:me.y))}%`,backgroundRepeat:m.backgroundRepeat,backgroundSize:m.backgroundSize}),"gradient"===m.backgroundType&&(I={"--background":m.backgroundGradient}),m.border&&!(0,K.isEmpty)(m.border)&&(G={borderTopWidth:m.border.top,borderRightWidth:m.border.right,borderBottomWidth:m.border.bottom,borderLeftWidth:m.border.left,borderStyle:"solid",borderColor:m.borderColor}),m.borderRadius&&!(0,K.isEmpty)(m.borderRadius)&&($={borderTopLeftRadius:m.borderRadius.top,borderTopRightRadius:m.borderRadius.right,borderBottomRightRadius:m.borderRadius.bottom,borderBottomLeftRadius:m.borderRadius.left}),!0===m.boxShadow&&(W={boxShadow:`${m.boxShadowHorizontal}px ${m.boxShadowVertical}px ${m.boxShadowBlur}px ${m.boxShadowSpread}px ${Z()(m.boxShadowColor?m.boxShadowColor:"#000000",m.boxShadowColorOpacity)}`});const pe={flexBasis:`${m.columnWidth}%`,...j,...I,...G,...$,...W,"--content-color":m.color,"--link-color":m.linkColor,"--content-color-hover":m.colorHover,"--background-color-hover":m.backgroundColorHover};var ge,he,ve;m.verticalAlign&&(pe.alignItems={top:"flex-start",center:"center",bottom:"flex-end"}[m.verticalAlign]),"color"===m.backgroundOverlayType&&(D={background:m.backgroundOverlayColor,opacity:m.backgroundOverlayOpacity/100}),"image"===m.backgroundOverlayType&&(D={backgroundImage:`url( '${null===(ge=m.backgroundOverlayImage)||void 0===ge?void 0:ge.url}' )`,backgroundAttachment:m.backgroundOverlayAttachment,backgroundPosition:`${Math.round(100*(null===(he=m.backgroundOverlayPosition)||void 0===he?void 0:he.x))}% ${Math.round(100*(null===(ve=m.backgroundOverlayPosition)||void 0===ve?void 0:ve.y))}%`,backgroundRepeat:m.backgroundOverlayRepeat,backgroundSize:m.backgroundOverlaySize,opacity:m.backgroundOverlayOpacity/100}),"gradient"===m.backgroundOverlayType&&(D={background:m.backgroundOverlayGradient,opacity:m.backgroundOverlayOpacity/100});const ye="color"===m.backgroundOverlayType&&m.backgroundOverlayColor||"image"===m.backgroundOverlayType&&(null===(u=m.backgroundOverlayImage)||void 0===u?void 0:u.url)||"gradient"===m.backgroundOverlayType&&m.backgroundOverlayGradient,ke={...D,...$,mixBlendMode:m.backgroundOverlayBlend,filter:`blur( ${m.backgroundOverlayFilterBlur/10}px ) brightness( ${m.backgroundOverlayFilterBrightness/10} ) contrast( ${m.backgroundOverlayFilterContrast/10} ) grayscale( ${m.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${m.backgroundOverlayFilterHue}deg ) saturate( ${m.backgroundOverlayFilterSaturate/10} )`},fe=(0,s.useBlockProps)({id:m.id,style:pe});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Ra,{attributes:m,setAttributes:p}),(0,i.createElement)(Fa,{attributes:m,setAttributes:p,getValue:A,parentBlock:_,updateBlockAttributes:y,currentBlockWidth:P,nextBlock:R,nextBlockWidth:F}),(0,i.createElement)(V,fe,ye&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-column-overlay",style:ke}),(0,i.createElement)(s.InnerBlocks,{templateLock:!1,renderAppender:!w&&s.InnerBlocks.ButtonBlockAppender})))},save:e=>{var t;let{attributes:l}=e;const o=l.columnsHTMLTag,a="color"===l.backgroundOverlayType&&l.backgroundOverlayColor||"image"===l.backgroundOverlayType&&(null===(t=l.backgroundOverlayImage)||void 0===t?void 0:t.url)||"gradient"===l.backgroundOverlayType&&l.backgroundOverlayGradient,n=s.useBlockProps.save({id:l.id});return(0,i.createElement)(o,n,a&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-column-overlay"}),(0,i.createElement)(s.InnerBlocks.Content,null))}});var Oa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/sharing-icons","title":"Sharing Icons","category":"themeisle-blocks","description":"Share buttons for your website visitors to share content on any social sharing service. Powered by Otter.","keywords":["social media","sharing","icons"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"facebook":{"type":["object","boolean"],"default":{"active":true}},"twitter":{"type":["object","boolean"],"default":{"active":true}},"linkedin":{"type":["object","boolean"],"default":{"active":true}},"pinterest":{"type":["object","boolean"],"default":{"active":false}},"tumblr":{"type":["object","boolean"],"default":{"active":false}},"reddit":{"type":["object","boolean"],"default":{"active":false}},"gap":{"type":"number"},"borderRadius":{"type":"number"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"}},"styles":[{"name":"default","label":"Regular","isDefault":true},{"name":"icons","label":"Icons Only"}],"supports":{"align":["left","center","right"]},"editorStyle":"otter-sharing-icons-editor","style":"otter-sharing-icons-style"}'),Na=e=>{let{icon:t}=e;return"facebook"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})):"twitter"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})):"linkedin"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"})):"pinterest"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})):"tumblr"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v-68c0-7.2 4.5-13.6 11.3-16 62-21.8 81.5-76 84.3-117.1.8-11 6.5-16.3 16.1-16.3h70.9c5.5 0 10 4.5 10 10v115.2h83c5.5 0 10 4.4 10 9.9v81.7c0 5.5-4.5 10-10 10h-83.4V360c0 34.2 23.7 53.6 68 35.8 4.8-1.9 9-3.2 12.7-2.2 3.5.9 5.8 3.4 7.4 7.9l22 64.3c1.8 5 3.3 10.6-.4 14.5z"})):"reddit"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z"})):(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M208 88.286c0-10 6.286-21.714 17.715-21.714 11.142 0 17.714 11.714 17.714 21.714 0 10.285-6.572 21.714-17.714 21.714C214.286 110 208 98.571 208 88.286zm304 160c0 36.001-11.429 102.286-36.286 129.714-22.858 24.858-87.428 61.143-120.857 70.572l-1.143.286v32.571c0 16.286-12.572 30.571-29.143 30.571-10 0-19.429-5.714-24.572-14.286-5.427 8.572-14.856 14.286-24.856 14.286-10 0-19.429-5.714-24.858-14.286-5.142 8.572-14.571 14.286-24.57 14.286-10.286 0-19.429-5.714-24.858-14.286-5.143 8.572-14.571 14.286-24.571 14.286-18.857 0-29.429-15.714-29.429-32.857-16.286 12.285-35.715 19.428-56.571 19.428-22 0-43.429-8.285-60.286-22.857 10.285-.286 20.571-2.286 30.285-5.714-20.857-5.714-39.428-18.857-52-36.286 21.37 4.645 46.209 1.673 67.143-11.143-22-22-56.571-58.857-68.572-87.428C1.143 321.714 0 303.714 0 289.429c0-49.714 20.286-160 86.286-160 10.571 0 18.857 4.858 23.143 14.857a158.792 158.792 0 0 1 12-15.428c2-2.572 5.714-5.429 7.143-8.286 7.999-12.571 11.714-21.142 21.714-34C182.571 45.428 232 17.143 285.143 17.143c6 0 12 .285 17.714 1.143C313.714 6.571 328.857 0 344.572 0c14.571 0 29.714 6 40 16.286.857.858 1.428 2.286 1.428 3.428 0 3.714-10.285 13.429-12.857 16.286 4.286 1.429 15.714 6.858 15.714 12 0 2.857-2.857 5.143-4.571 7.143 31.429 27.714 49.429 67.143 56.286 108 4.286-5.143 10.285-8.572 17.143-8.572 10.571 0 20.857 7.144 28.571 14.001C507.143 187.143 512 221.714 512 248.286zM188 89.428c0 18.286 12.571 37.143 32.286 37.143 19.714 0 32.285-18.857 32.285-37.143 0-18-12.571-36.857-32.285-36.857-19.715 0-32.286 18.858-32.286 36.857zM237.714 194c0-19.714 3.714-39.143 8.571-58.286-52.039 79.534-13.531 184.571 68.858 184.571 21.428 0 42.571-7.714 60-20 2-7.429 3.714-14.857 3.714-22.572 0-14.286-6.286-21.428-20.572-21.428-4.571 0-9.143.857-13.429 1.714-63.343 12.668-107.142 3.669-107.142-63.999zm-41.142 254.858c0-11.143-8.858-20.857-20.286-20.857-11.429 0-20 9.715-20 20.857v32.571c0 11.143 8.571 21.142 20 21.142 11.428 0 20.286-9.715 20.286-21.142v-32.571zm49.143 0c0-11.143-8.572-20.857-20-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20-10 20-21.142v-32.571zm49.713 0c0-11.143-8.857-20.857-20.285-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20.285-9.715 20.285-21.142v-32.571zm49.715 0c0-11.143-8.857-20.857-20.286-20.857-11.428 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.858 21.142 20.286 21.142 11.429 0 20.286-10 20.286-21.142v-32.571zM421.714 286c-30.857 59.142-90.285 102.572-158.571 102.572-96.571 0-160.571-84.572-160.571-176.572 0-16.857 2-33.429 6-49.714-20 33.715-29.714 72.572-29.714 111.429 0 60.286 24.857 121.715 71.429 160.857 5.143-9.714 14.857-16.286 26-16.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.571-14.286 24.858-14.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.857-14.286 24.858-14.286 10 0 19.428 5.714 24.857 14.286 5.143-8.571 14.571-14.286 24.572-14.286 10.857 0 20.857 6.572 25.714 16 43.427-36.286 68.569-92 71.426-148.286zm10.572-99.714c0-53.714-34.571-105.714-92.572-105.714-30.285 0-58.571 15.143-78.857 36.857C240.862 183.812 233.41 254 302.286 254c28.805 0 97.357-28.538 84.286 36.857 28.857-26 45.714-65.714 45.714-104.571z"}))},Va=e=>{let{attributes:t,setAttributes:l,socialList:a}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.ToolbarGroup,null,Object.keys(a).map((e=>{var n;const r=null!==(n=t[e].active)&&void 0!==n?n:t[e];return(0,i.createElement)(c.Tooltip,{key:e
|
10 |
-
/* translators: %s Social Website */,text:(0,o.sprintf)((0,o.__)("Display %s","otter-blocks"),a[e].label)},(0,i.createElement)(c.Button,{className:g()("components-button","wp-block-themeisle-toolbar",{"is-active":r}),onClick:()=>(e=>{const o={...t[e]};o.active=!o.active,l({[e]:{...o}})})(e)},(0,i.createElement)(
|
11 |
/* translators: %s Social Website */,label:(0,o.sprintf)((0,o.__)(" %s Background Color","otter-blocks"),a[l].label)},{value:t[l].textColor,onChange:e=>n(e,l,"textColor")
|
12 |
-
/* translators: %s Social Website */,label:(0,o.sprintf)((0,o.__)(" %s Text Color","otter-blocks"),a[l].label)}]:e}),[])},Object.keys(a).map((e=>{var l;return(null!==(l=t[e].active)&&void 0!==l?l:t[e])?(0,i.createElement)(s.ContrastChecker,{backgroundColor:t[e].backgroundColor,textColor:t[e].textColor,key:e}):null}))))},Da={facebook:{label:(0,o.__)("Facebook","otter-blocks"),icon:"facebook-f"},twitter:{label:(0,o.__)("Twitter","otter-blocks"),icon:"twitter"},linkedin:{label:(0,o.__)("Linkedin","otter-blocks"),icon:"linkedin-in"},pinterest:{label:(0,o.__)("Pinterest","otter-blocks"),icon:"pinterest-p"},tumblr:{label:(0,o.__)("Tumblr","otter-blocks"),icon:"tumblr"},reddit:{label:(0,o.__)("Reddit","otter-blocks"),icon:"reddit-alien"}};const{attributes:Ga}=Oa;const{name:$a}=Oa;(0,a.registerBlockType)($a,{...Oa,title:(0,o.__)("Sharing Icons","otter-blocks"),description:(0,o.__)("Share buttons for your website visitors to share content on any social sharing service. Powered by Otter.","otter-blocks"),icon:r.sharingIcon,keywords:["social media","sharing","icons"],styles:[{name:"default",label:(0,o.__)("Regular","otter-blocks"),isDefault:!0},{name:"icons",label:(0,o.__)("Icons Only","otter-blocks")}],edit:e=>{let{attributes:t,setAttributes:l,clientId:o}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(o,Ga);return()=>e(t.id)}),[t.id]);const a=(0,s.useBlockProps)();return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Va,{attributes:t,setAttributes:l,socialList:Da}),(0,i.createElement)(Ia,{attributes:t,setAttributes:l,socialList:Da}),(0,i.createElement)("div",a,(0,i.createElement)(c.Disabled,null,(0,i.createElement)(u(),{block:"themeisle-blocks/sharing-icons",attributes:t}))))},save:()=>null,example:{attributes:{}}});var Wa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/slider","title":"Slider","category":"themeisle-blocks","description":"Minimal image slider to showcase beautiful images. Powered by Otter.","keywords":["slider","gallery","carousel"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"images":{"type":"array","default":[],"source":"query","selector":".wp-block-themeisle-blocks-slider-item-wrapper","query":{"id":{"type":"number","source":"attribute","selector":"img","attribute":"data-id"},"url":{"type":"string","source":"attribute","selector":"img","attribute":"src"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"caption":{"type":"string","source":"html","selector":"figcaption","default":""}}},"perView":{"type":"number","default":1},"gap":{"type":"number","default":0},"peek":{"type":"number","default":0},"autoplay":{"type":"boolean","default":true},"delay":{"type":"number","default":2},"hideArrows":{"type":"boolean","default":false},"hideBullets":{"type":"boolean","default":false},"height":{"type":["number","string"],"default":"400px"},"heightTablet":{"type":"string"},"heightMobile":{"type":"string"},"width":{"type":"string"},"transition":{"type":"string"},"arrowsColor":{"type":"string"},"arrowsBackgroundColor":{"type":"string"},"paginationColor":{"type":"string"},"paginationActiveColor":{"type":"string"},"borderColor":{"type":"string"},"borderWidth":{"type":"string"},"borderRadius":{"type":"string"}},"supports":{"align":["wide","full"]},"editorStyle":"otter-slider-editor","style":"otter-slider-style","editorScript":"glidejs","script":"otter-slider"}');const Za=e=>{let{attributes:t}=e;return(0,i.createElement)(i.Fragment,null,!t.hideArrows&&(0,i.createElement)("div",{className:"glide__arrows","data-glide-el":"controls"},(0,i.createElement)("button",{className:"glide__arrow glide__arrow--left","data-glide-dir":"<"},(0,i.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 100 100"},(0,i.createElement)(c.Path,{d:"M 10,50 L 60,100 L 70,90 L 30,50 L 70,10 L 60,0 Z"}))),(0,i.createElement)("button",{className:"glide__arrow glide__arrow--right","data-glide-dir":">"},(0,i.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 100 100"},(0,i.createElement)(c.Path,{d:"M 10,50 L 60,100 L 70,90 L 30,50 L 70,10 L 60,0 Z"})))))},ja=e=>{let{attributes:t}=e;return(0,i.createElement)(i.Fragment,null,!t.hideBullets&&(0,i.createElement)("div",{className:"glide__bullets","data-glide-el":"controls[nav]"},t.images.map(((e,t)=>(0,i.createElement)("button",{key:e.id,className:"glide__bullet","data-glide-dir":`=${t}`})))))};var Ua=e=>{let{attributes:t}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Za,{attributes:t}),(0,i.createElement)(ja,{attributes:t}))};const qa={id:{type:"string"},align:{type:"string"},images:{type:"array",default:[],source:"query",selector:".wp-block-themeisle-blocks-slider-item-wrapper",query:{id:{type:"number",source:"attribute",selector:"img",attribute:"data-id"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption",default:""}}},perView:{type:"number",default:1},gap:{type:"number",default:0},peek:{type:"number",default:0},autoplay:{type:"boolean",default:!0},height:{type:"number",default:400}},Ja=[{attributes:{...(0,K.omit)(qa,["align"])},supports:{align:["wide","full"]},save:e=>{let{attributes:t,className:l}=e;return(0,i.createElement)("div",{id:t.id,className:g()("wp-block-themeisle-blocks-slider","glide",l),"data-per-view":t.perView,"data-gap":t.gap,"data-peek":t.peek,"data-autoplay":t.autoplay},(0,i.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,i.createElement)("div",{className:"glide__slides",style:{height:`${t.height}px`}},t.images.map((e=>(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,i.createElement)("figure",null,(0,i.createElement)("img",{key:e.id,className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!s.RichText.isEmpty(e.caption)&&(0,i.createElement)(s.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,i.createElement)(Ua,{attributes:t})))}},{attributes:{...(0,K.omit)(qa,["align"]),delay:{type:"number",default:2},hideArrows:{type:"boolean",default:!1},hideBullets:{type:"boolean",default:!1}},supports:{align:["wide","full"]},save:e=>{let{attributes:t,className:l}=e;const o=t.autoplay&&2!==t.delay?1e3*t.delay:t.autoplay;return(0,i.createElement)("div",{id:t.id,className:g()("wp-block-themeisle-blocks-slider","glide",l),"data-per-view":t.perView,"data-gap":t.gap,"data-peek":t.peek,"data-autoplay":o,"data-height":`${t.height}px`},(0,i.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,i.createElement)("div",{className:"glide__slides"},t.images.map((e=>(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,i.createElement)("figure",null,(0,i.createElement)("img",{key:e.id,className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!s.RichText.isEmpty(e.caption)&&(0,i.createElement)(s.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,i.createElement)(Ua,{attributes:t})))}}];var Ka=Ja;const Ya={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t}=e[0];t=(0,K.every)(e,["align",t])?t:void 0;const l=(0,K.filter)(e,(e=>{let{url:t}=e;return t}));return(0,a.createBlock)("themeisle-blocks/slider",{images:l.map((e=>{let{id:t,url:l,alt:o,caption:a}=e;return{id:t,url:l,alt:o,caption:a}})),align:t})}},{type:"block",blocks:["core/gallery"],transform:(e,t)=>{var l;let{images:o,align:n}=e;return null!==(l=window.themeisleGutenberg)&&void 0!==l&&l.isLegacyPre59?(0,a.createBlock)("themeisle-blocks/slider",{images:o.map((e=>{let{id:t,url:l,alt:o,caption:a}=e;return{id:t,url:l,alt:o,caption:a}})),align:n}):(0,a.createBlock)("themeisle-blocks/slider",{images:t.map((e=>{let{attributes:t}=e;return{id:t.id,url:t.url,alt:t.alt,caption:t.caption}})),align:n})}}],to:[{type:"block",blocks:["core/image"],transform:e=>{let{images:t,align:l}=e;return 0<t.length?t.map((e=>{let{id:t,url:o,alt:n,caption:r}=e;return(0,a.createBlock)("core/image",{id:t,url:o,alt:n,caption:r,align:l})})):(0,a.createBlock)("core/image",{align:l})}},{type:"block",blocks:["core/gallery"],transform:e=>{var t;let{images:l,align:o}=e;return null!==(t=window.themeisleGutenberg)&&void 0!==t&&t.isLegacyPre59?(0,a.createBlock)("core/gallery",{images:l.map((e=>{let{id:t,url:l,alt:o,caption:a}=e;return{id:t,url:l,alt:o,caption:a}})),align:o}):(0,a.createBlock)("core/gallery",{align:o},l.map((e=>{let{id:t,url:l,alt:n,caption:r}=e;return(0,a.createBlock)("core/image",{id:t,url:l,alt:n,caption:r,align:o})})))}}]};var Qa=Ya,Xa=e=>{let{labels:t,icon:l,isAppender:o=!1,value:a={},onSelectImages:n}=e;const r=(0,K.debounce)(n,250);return(0,i.createElement)(s.MediaPlaceholder,{labels:t,icon:l,accept:"image/*",allowedTypes:["image"],isAppender:o,className:"wp-block-themeisle-blocks-slider-uploader",value:a,onSelect:r,multiple:!0})},en=l(2285),tn=e=>{let{attributes:t,setAttributes:l,slider:a,changePerView:n,onSelectImages:r}=e;const[d,u]=(0,i.useState)("settings"),{responsiveSetAttributes:b,responsiveGetAttributes:m}=S(l);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:d,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:u}),"settings"===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Slides","otter-blocks")},t.images.length&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Slides Per Page","otter-blocks"),help:(0,o.__)("A number of visible slides.","otter-blocks"),value:t.perView,onChange:n,min:1,max:(0,K.max)([Math.round(t.images.length/2),1])}),1<t.perView&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Gap","otter-blocks"),help:(0,o.__)("A size of the space between slides.","otter-blocks"),value:t.gap,onChange:e=>{l({gap:Number(e)}),a.update({gap:Number(e)})},min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Peek","otter-blocks"),help:(0,o.__)("The value of the future slides which have to be visible in the current slide.","otter-blocks"),value:t.peek,onChange:e=>{l({peek:Number(e)}),a.update({peek:Number(e)})},min:0,max:100})),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide Arrows","otter-blocks"),help:(0,o.__)("Hide navigation arrows.","otter-blocks"),checked:t.hideArrows,onChange:()=>l({hideArrows:!t.hideArrows})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide Pagination","otter-blocks"),help:(0,o.__)("Hide navigation bullets.","otter-blocks"),checked:t.hideBullets,onChange:()=>l({hideBullets:!t.hideBullets})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Images","otter-blocks"),initialOpen:!1},(0,i.createElement)(en.Z,{attributes:t,onSelectImages:r})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Autoplay","otter-blocks"),initialOpen:!1},t.images.length&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Autoplay","otter-blocks"),help:(0,o.__)("Autoplay slider in the front.","otter-blocks"),checked:t.autoplay,onChange:()=>l({autoplay:!t.autoplay})}),t.autoplay&&(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Delay","otter-blocks"),help:(0,o.__)("Delay in slide change (in seconds).","otter-blocks"),value:t.delay,onChange:e=>l({delay:e}),min:1,max:10,allowReset:!0})))),"style"===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions and Motion","otter-blocks")},t.images.length&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(M.Z,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:m([(p=t.height,(0,K.isNumber)(p)?(e=>e?`${e}px`:e)(p):p),t.heightTablet,t.heightMobile]),onChange:e=>b(e,["height","heightTablet","heightMobile"])}),(0,i.createElement)(k.Z,{values:["height","heightTablet","heightMobile"],setAttributes:l})),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:t.width,onChange:e=>l({width:e})}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Transition","otter-blocks"),value:t.transition||"ease",options:[{label:(0,o.__)("Linear","otter-blocks"),value:"linear"},{label:(0,o.__)("Ease","otter-blocks"),value:"ease"},{label:(0,o.__)("Ease In","otter-blocks"),value:"ease-in"},{label:(0,o.__)("Ease In Out","otter-blocks"),value:"ease-in-out"},{label:(0,o.__)("Bounce","otter-blocks"),value:"cubic-bezier(0.680, -0.550, 0.265, 1.550)"}],onChange:e=>{l({transition:"ease"!==e?e:void 0}),a.update({animationTimingFunc:e})}}))),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:t.arrowsColor,onChange:e=>l({arrowsColor:e}),label:(0,o.__)("Arrows","otter-blocks")},{value:t.arrowsBackgroundColor,onChange:e=>l({arrowsBackgroundColor:e}),label:(0,o.__)("Arrows Background","otter-blocks")},{value:t.paginationColor,onChange:e=>l({paginationColor:e}),label:(0,o.__)("Pagination","otter-blocks")},{value:t.paginationActiveColor,onChange:e=>l({paginationActiveColor:e}),label:(0,o.__)("Pagination Active","otter-blocks")},{value:t.borderColor,onChange:e=>l({borderColor:e}),label:(0,o.__)("Border","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:t.borderWidth,onChange:e=>l({borderWidth:e})}),(0,i.createElement)(k.Z,{values:["borderWidth"],setAttributes:l}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Radius","otter-blocks"),value:t.borderRadius,onChange:e=>l({borderRadius:e})}),(0,i.createElement)(k.Z,{values:["borderRadius"],setAttributes:l}))),(0,i.createElement)(C.p,null));var p},ln=l(1984),on=l(4310),an=l(5024),nn=e=>{let{images:t,image:l,index:a,isFirstItem:n,isLastItem:r,isSelected:d,setAttributes:u,setSelectedImage:b}=e;const m=(e,l)=>{const o=[...t];o.splice(l,1,t[e]),o.splice(e,1,t[l]),b(l),u({images:o})};return(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-slider-item-wrapper glide__slide",{"is-selected":d}),tabIndex:"0",onClick:()=>b(l.id),onFocus:()=>b(l.id)},(0,i.createElement)("figure",null,(0,i.createElement)("img",{key:l.id,className:"wp-block-themeisle-blocks-slider-item",src:l.url,alt:l.alt,title:l.alt,"data-id":l.id}),d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-move-menu"},(0,i.createElement)(c.Button,{icon:(0,i.createElement)(ln.Z,{icon:on.Z}),label:(0,o.__)("Move image backward","otter-blocks"),showTooltip:!0,onClick:n?void 0:()=>{0!==a&&m(a,a-1)},className:"wp-block-themeisle-blocks-slider-item-move-backward","aria-disabled":n,disabled:!d}),(0,i.createElement)(c.Button,{icon:(0,i.createElement)(ln.Z,{icon:an.Z}),label:(0,o.__)("Move image forward","otter-blocks"),showTooltip:!0,onClick:r?void 0:()=>{a!==t.length-1&&m(a,a+1)},className:"wp-block-themeisle-blocks-slider-item-move-forward","aria-disabled":r,disabled:!d})),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-delete-menu"},(0,i.createElement)(c.Button,{icon:(0,i.createElement)(ln.Z,{icon:so.Z}),label:(0,o.__)("Remove image","otter-blocks"),showTooltip:!0,onClick:()=>{const e=(0,K.filter)(t,((e,t)=>a!==t));b(null),u({images:e})},className:"wp-block-themeisle-blocks-slider-item-delete"}))),(d||!s.RichText.isEmpty(l.caption))&&(0,i.createElement)(s.RichText,{tagName:"figcaption",placeholder:d?(0,o.__)("Write caption…","otter-blocks"):null,value:l.caption,onChange:e=>{const l=[...t];l[a].caption=e,u({images:l})},multiline:!1})))};const{attributes:rn}=Wa,sn={root:null,rootMargin:"0px",threshold:[0]};const{name:cn}=Wa;(0,a.registerBlockType)(cn,{...Wa,title:(0,o.__)("Slider","otter-blocks"),description:(0,o.__)("Minimal image slider to showcase beautiful images. Powered by Otter.","otter-blocks"),icon:"images-alt2",keywords:["slider","gallery","carousel"],deprecated:Ka,transforms:Qa,edit:e=>{let{attributes:t,setAttributes:l,clientId:a,isSelected:n}=e;const r=(0,i.useRef)(null),c=(0,i.useRef)(null);(0,i.useEffect)((()=>{try{var e,o,n;if(void 0===t.width)0<(null!==(e=null===(o=(0,v.select)("core/block-editor"))||void 0===o||null===(n=o.getBlockParentsByBlockName)||void 0===n?void 0:n.call(o,a,"themeisle-blocks/advanced-columns",!0))&&void 0!==e?e:[]).length&&l({width:"650px"})}catch(e){console.error(e)}}),[]),(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,rn);return()=>{e(t.id)}}),[t.id]),(0,i.useEffect)((()=>{var e,l,o;const a=null!==(e=document.querySelector(`#${t.id}`))&&void 0!==e?e:null===(l=document.querySelector('iframe[name^="editor-canvas"]'))||void 0===l||null===(o=l.contentDocument)||void 0===o?void 0:o.querySelector(`#${t.id}`);var n;return a&&(r.current=new IntersectionObserver((e=>{e.forEach((e=>{var l;e.isIntersecting&&0<=e.intersectionRect.height&&t.images.length&&(m(),null===(l=r.current)||void 0===l||l.unobserve(a))}))}),sn),null===(n=r.current)||void 0===n||n.observe(a)),()=>{var e,l;null!=t&&null!==(e=t.images)&&void 0!==e&&e.length&&(null==c||null===(l=c.current)||void 0===l||l.destroy())}}),[t.id]),(0,i.useEffect)((()=>{t.images.length&&(b(null),null!==c.current&&(c.current.destroy(),t.id&&m()))}),[n,t.id,c.current,t.images,t.width]),(0,i.useEffect)((()=>{t.images.length&&t.perView>t.images.length&&g((0,K.max)([Math.round(t.images.length/2),1]))}),[t.images]);const{responsiveGetAttributes:d}=S(),[u,b]=(0,i.useState)(null),m=()=>{var e,l;const o=(0,L.getEditorIframe)(),a=null!==(e=document.querySelector(`#${t.id}`))&&void 0!==e?e:null==o||null===(l=o.contentDocument)||void 0===l?void 0:l.querySelector(`#${t.id}`),n=()=>{var e;null!=o&&null!==(e=o.contentWindow)&&void 0!==e&&e.Glide&&(c.current=new o.contentWindow.Glide(a,{type:"carousel",keyboard:!1,perView:t.perView,gap:t.gap,peek:t.peek,autoplay:!1,animationTimingFunc:t.transition||"ease",breakpoints:{800:{perView:1,peek:0,gap:0}}}).mount())};var r;Boolean(o)?Boolean(null===(r=o.contentDocument)||void 0===r?void 0:r.querySelector("#glidejs-js"))?n():(0,L.copyScriptAssetToIframe)("#glidejs-js",n):c.current=new window.Glide(a,{type:"carousel",keyboard:!1,perView:t.perView,gap:t.gap,peek:t.peek,autoplay:!1,animationTimingFunc:t.transition||"ease",breakpoints:{800:{perView:1,peek:0,gap:0}}}).mount()},p=e=>{l({images:e.map((e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption})))}),null!==c.current&&c.current.destroy(),m()},g=e=>{l({perView:Number(e)}),c.current.update({perView:Number(e)}),1===e&&(l({gap:0,peek:0}),c.current.update({gap:0,peek:0}))},h={"--arrows-color":t.arrowsColor,"--arrows-background-color":t.arrowsBackgroundColor,"--pagination-color":t.paginationColor,"--pagination-active-color":t.paginationActiveColor,"--border-color":t.borderColor,"--border-width":t.borderWidth,"--border-radius":t.borderRadius,"--width":t.width},y=(0,s.useBlockProps)();return Array.isArray(t.images)&&!t.images.length?(0,i.createElement)("div",y,(0,i.createElement)(Xa,{labels:{title:(0,o.__)("Slider","otter-blocks"),instructions:(0,o.__)("Drag images, upload new ones or select files from your library.","otter-blocks")},icon:"images-alt2",onSelectImages:p})):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(tn,{attributes:t,setAttributes:l,slider:c.current,changePerView:g,onSelectImages:p}),(0,i.createElement)("div",y,(0,i.createElement)("div",{id:t.id,className:"glide",style:h},(0,i.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,i.createElement)("div",{className:"glide__slides",style:{height:d([(k=t.height,(0,K.isNumber)(k)?(e=>e?`${e}px`:e)(k):k),t.heightTablet,t.heightMobile])}},t.images.map(((e,o)=>(0,i.createElement)(nn,{key:e.url,images:t.images,image:e,index:o,isFirstItem:0===o,isLastItem:o+1===t.images.length,isSelected:n&&e.id===u,setAttributes:l,setSelectedImage:b})))),(0,i.createElement)(Ua,{attributes:t}))),n&&(0,i.createElement)(Xa,{labels:{title:"",instructions:""},icon:null,onSelectImages:p,isAppender:!0,value:t.images})));var k},save:e=>{let{attributes:t}=e;const l=t.autoplay&&2!==t.delay?1e3*t.delay:t.autoplay,o=s.useBlockProps.save({id:t.id,className:"glide","data-per-view":t.perView,"data-gap":t.gap,"data-peek":t.peek,"data-autoplay":l,"data-height":(a=t.height,(0,K.isNumber)(a)?(e=>e?`${e}px`:e)(a):a),"data-hide-arrows":t.hideArrows,...t.transition&&{"data-transition":t.transition}});var a;return(0,i.createElement)("div",o,(0,i.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,i.createElement)("div",{className:"glide__slides"},t.images.map((e=>(0,i.createElement)("div",{key:e.id,className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,i.createElement)("figure",null,(0,i.createElement)("img",{className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!s.RichText.isEmpty(e.caption)&&(0,i.createElement)(s.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,i.createElement)(ja,{attributes:t})))},example:{attributes:{images:[{id:1,url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"},{id:2,url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}]}}});var dn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/pricing","title":"Pricing","category":"themeisle-blocks","description":"Pricing tables are a critical part in showcasing your services, prices and overall offerings. Powered by Otter.","keywords":["pricing","table","money"],"textdomain":"otter-blocks"}');const un=[["themeisle-blocks/advanced-heading",{content:(0,o.__)("Basic","otter-blocks"),align:"center",tag:"h3",fontSize:24}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("$9.99","otter-blocks"),align:"center",tag:"h4",fontSize:36,fontFamily:"Roboto Slab",fontVariant:"normal"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Per Month","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("First Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Second Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Last Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/button-group",{align:"center",buttons:1,data:[{text:(0,o.__)("Buy Now","otter-blocks"),newTab:!1,color:"#ffffff",background:"#32373c",hoverColor:"#ffffff",hoverBackground:"#444a50",borderSize:0,borderRadius:3,boxShadow:!1,boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",paddingTopBottom:12,paddingLeftRight:24}]}]];const{name:bn}=dn;(0,a.registerBlockType)(bn,{...dn,title:(0,o.__)("Pricing","otter-blocks"),description:(0,o.__)("Pricing tables are a critical part in showcasing your services, prices and overall offerings. Powered by Otter.","otter-blocks"),icon:r.pricingIcon,keywords:["pricing","table","money"],edit:()=>{const e=(0,s.useBlockProps)();return(0,i.createElement)("div",e,(0,i.createElement)(s.InnerBlocks,{template:un}))},save:()=>{const e=s.useBlockProps.save();return(0,i.createElement)("div",e,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{attributes:{}}});var mn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/service","title":"Service","category":"themeisle-blocks","description":"Use this Service block to showcase services your website offers. Powered by Otter.","keywords":["services","icon","features"],"textdomain":"otter-blocks"}');const pn=[["themeisle-blocks/font-awesome-icons",{fontSize:62,prefix:"fab",icon:"angellist"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Basic","otter-blocks"),align:"center",tag:"h4",marginBottom:20}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Lorem ipsum dolor sit amet elit do, consectetur adipiscing, sed eiusmod tempor incididunt ut labore et dolore magna aliqua.","otter-blocks"),align:"center",color:"#999999",tag:"p",fontSize:14,marginBottom:20}],["themeisle-blocks/button-group",{align:"center",buttons:1,data:[{text:(0,o.__)("Know More","otter-blocks"),newTab:!1,color:"#ffffff",background:"#32373c",hoverColor:"#ffffff",hoverBackground:"#444a50",borderSize:0,borderRadius:3,boxShadow:!1,boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",paddingTopBottom:12,paddingLeftRight:24}]}]];const{name:gn}=mn;(0,a.registerBlockType)(gn,{...mn,title:(0,o.__)("Service","otter-blocks"),description:(0,o.__)("Use this Service block to showcase services your website offers. Powered by Otter.","otter-blocks"),icon:r.servicesIcon,keywords:["services","icon","features"],edit:()=>{const e=(0,s.useBlockProps)();return(0,i.createElement)("div",e,(0,i.createElement)(s.InnerBlocks,{template:pn}))},save:()=>{const e=s.useBlockProps.save();return(0,i.createElement)("div",e,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{attributes:{}}});var hn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/testimonials","title":"Testimonials","category":"themeisle-blocks","description":"Display kudos from customers and clients and display them on your website. Powered by Otter.","keywords":["testimonials","quotes","business"],"textdomain":"otter-blocks"}');const vn=[["core/image",{align:"center"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("John Doe","otter-blocks"),align:"center",fontSize:24,tag:"h3",marginTop:25,marginBottom:10,marginTopTablet:25,marginTopMobile:25}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Jedi Master","otter-blocks"),align:"center",fontSize:14,tag:"h4",marginTop:10,marginBottom:10}],["themeisle-blocks/advanced-heading",{content:(0,o.__)('"What is the point of being alive if you don’t at least try to do something remarkable?"',"otter-blocks"),align:"center",color:"#999999",tag:"p",fontSize:14,marginTop:10,marginBottom:20}]];const{name:yn}=hn;(0,a.registerBlockType)(yn,{...hn,title:(0,o.__)("Testimonials","otter-blocks"),description:(0,o.__)("Display kudos from customers and clients and display them on your website. Powered by Otter.","otter-blocks"),icon:r.testimonialsIcon,keywords:["testimonials","quotes","business"],edit:()=>{const e=(0,s.useBlockProps)();return(0,i.createElement)("div",e,(0,i.createElement)(s.InnerBlocks,{template:vn}))},save:()=>{const e=s.useBlockProps.save();return(0,i.createElement)("div",e,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"core/image",attributes:{align:"center",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg"}},{name:"themeisle-blocks/advanced-heading",attributes:{content:(0,o.__)("John Doe","otter-blocks"),align:"center",fontSize:24,tag:"h3",marginTop:25,marginBottom:10,marginTopTablet:25,marginTopMobile:25}},{name:"themeisle-blocks/advanced-heading",attributes:{content:(0,o.__)("Jedi Master","otter-blocks"),align:"center",fontSize:14,tag:"h4",marginTop:10,marginBottom:10}},{name:"themeisle-blocks/advanced-heading",attributes:{content:(0,o.__)('"What is the point of being alive if you don’t at least try to do something remarkable?"',"otter-blocks"),align:"center",color:"#999999",tag:"p",fontSize:14,marginTop:10,marginBottom:20}}]}});var kn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/tabs","title":"Tabs","category":"themeisle-blocks","description":"Organize and allow navigation between groups of content with Tabs block. Powered by Otter.","keywords":["media","tabs","select"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"tabColor":{"type":"string"},"borderColor":{"type":"string"},"borderWidth":{"type":"number"},"activeTitleColor":{"type":"string"}},"supports":{"align":["left","center","right"]},"editorStyle":"otter-tabs-editor","style":"otter-tabs-style","script":"otter-tabs"}'),fn=l(5117);const wn=(0,_o.W6)((()=>(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__drag",tabIndex:"0"},(0,i.createElement)("span",null)))),Cn=(0,_o.W8)((e=>{let{tab:t,deleteTab:l,selectTab:a}=e;return(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option"},(0,i.createElement)(wn,null),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__name"},t.attributes.title||(0,o.__)("Untitled Tab","otter-blocks")),(0,i.createElement)(c.Button,{icon:"edit",label:(0,o.__)("Edit Tab","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__actions",onClick:()=>a(t.clientId)}),(0,i.createElement)(c.Button,{icon:"no-alt",label:(0,o.__)("Remove Tab","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__actions",onClick:()=>l(t.clientId)}))}));var En=e=>{var t;let{attributes:l,setAttributes:a,children:n,deleteTab:r,selectTab:d,addTab:u,moveTab:b}=e;const[m,p]=(0,i.useState)(null===(t=n.find((e=>!0===e.attributes.defaultOpen)))||void 0===t?void 0:t.clientId),{updateBlockAttributes:g}=(0,v.useDispatch)("core/block-editor"),{getBlock:h}=(0,v.useSelect)((e=>e("core/block-editor")));(0,i.useEffect)((()=>{var e;p(null===(e=n.find((e=>!0===e.attributes.defaultOpen)))||void 0===e?void 0:e.clientId)}),[n]);const y=e=>{!0===h(e).attributes.defaultOpen&&g(n[0].clientId,{defaultOpen:!0}),r(e)},k=(0,_o.JN)((e=>{let{items:t}=e;return(0,i.createElement)("div",null,t.map(((e,t)=>(0,i.createElement)(Cn,{key:e.clientId,tab:e,index:t,deleteTab:y,selectTab:d}))))})),f=n.map(((e,t)=>({label:`${t+1}. ${e.attributes.title||(0,o.__)("Untitled Tab","otter-blocks")}`,value:e.clientId})));return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Tabs Management","otter-blocks")},(0,i.createElement)("p",null,(0,o.__)("Press and hold to use drag and drop to sort the tabs","otter-blocks")),0<(null==n?void 0:n.length)&&(0,i.createElement)(k,{items:n,onSortEnd:e=>{let{oldIndex:t,newIndex:l}=e;b(n[t].clientId,l)},useDragHandle:!0,axis:"y",lockAxis:"y"}),(0,i.createElement)(c.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-tabs-inspector-add-tab",onClick:u},(0,o.__)("Add Tab","otter-blocks")),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Initial Tab","otter-blocks"),value:m,options:f,onChange:e=>{n.forEach(((e,t)=>{g(n[t].clientId,{defaultOpen:!1})})),g(e,{defaultOpen:!0}),p(e)}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Width","otter-blocks"),value:l.borderWidth,onChange:e=>{a({borderWidth:Number(e)})},step:.1,min:0,max:5})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:l.activeTitleColor,onChange:e=>{a({activeTitleColor:e})},label:(0,o.__)("Active Title Color","otter-blocks")},{value:l.tabColor,onChange:e=>{a({tabColor:e})},label:(0,o.__)("Background","otter-blocks")},{value:l.borderColor,onChange:e=>{a({borderColor:e})},label:(0,o.__)("Border Color","otter-blocks")}]},(0,i.createElement)(s.ContrastChecker,{textColor:l.activeTitleColor,backgroundColor:l.tabColor})))},xn=l(4688),Sn=e=>{let{children:t,selectedTab:l,moveTab:a,selectTab:n}=e;const r=null==t?void 0:t.findIndex((e=>{let{clientId:t}=e;return t===l})),d=e=>{switch(e){case"left":a(l,r-1);break;case"right":a(l,r+1)}};return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.ToolbarGroup,{label:(0,o.__)("Edit","otter-blocks")},(0,i.createElement)(c.ToolbarButton,{label:(0,o.__)("Edit tab","otter-blocks"),icon:xn.Z,iconSize:24,className:"wp-block-themeisle-blocks-tabs-toolbar-edit",onClick:()=>n(l)})),(0,i.createElement)(c.ToolbarGroup,{label:(0,o.__)("Movement","otter-blocks")},(0,i.createElement)(c.ToolbarButton,{label:(0,o.__)("Move tab left","otter-blocks"),icon:on.Z,iconSize:24,disabled:0===r,className:"wp-block-themeisle-blocks-tabs-toolbar-mover",onClick:()=>d("left")}),(0,i.createElement)(c.ToolbarButton,{label:(0,o.__)("Move tab right","otter-blocks"),icon:an.Z,iconSize:24,disabled:(null==t?void 0:t.length)-1===r,className:"wp-block-themeisle-blocks-tabs-toolbar-mover",onClick:()=>d("right")})))};const{attributes:Tn}=kn;const{name:Mn}=kn;(0,a.registerBlockType)(Mn,{...kn,title:(0,o.__)("Tabs","otter-blocks"),description:(0,o.__)("Organize and allow navigation between groups of content with Tabs block. Powered by Otter.","otter-blocks"),icon:jl.Z,keywords:["media","tabs","select"],edit:e=>{var t;let{attributes:l,setAttributes:n,isSelected:r,clientId:d}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(d,Tn);return()=>e(l.id)}),[l.id]);const u=(0,i.useRef)(null),b=(0,v.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(d).innerBlocks}),[]),[m,p]=(0,i.useState)(null===(t=b.find((e=>!0===e.attributes.defaultOpen)))||void 0===t?void 0:t.clientId),{insertBlock:h,removeBlock:y,selectBlock:k,moveBlockToPosition:f,updateBlockAttributes:_}=(0,v.useDispatch)("core/block-editor"),w=e=>{u.current&&(b.forEach((t=>{const l=u.current.querySelector(`#block-${t.clientId} .wp-block-themeisle-blocks-tabs-item__content`);null==l||l.classList.toggle("active",t.clientId===e)})),p(e))};(0,i.useEffect)((()=>{w(m)}),[]),(0,i.useEffect)((()=>{0<(null==b?void 0:b.length)&&(void 0!==m&&null!=b&&b.some((e=>e.clientId===m))||w(b[0].clientId))}),[m,b]);const C=e=>{if(0<(null==b?void 0:b.length)){const t=b.find((t=>t.clientId===e));k(t.clientId)}},E=(e,t)=>{var l;const o=null===(l=b.find((t=>t.clientId===e)))||void 0===l?void 0:l.clientId;o&&f(o,d,d,t)},x=()=>{const e=(0,a.createBlock)("themeisle-blocks/tabs-item");h(e,(null==b?void 0:b.length)||0,d,!1)},S={"--border-width":void 0!==l.borderWidth?l.borderWidth+"px":"3px","--border-color":l.borderColor,"--active-title-color":l.activeTitleColor,"--tab-color":l.tabColor},T=e=>{let{title:t,onClick:l,active:o}=e;return(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-tabs__header_item",{active:o})},(0,i.createElement)("div",{onClick:l},t))},M=(0,s.useBlockProps)({id:l.id,style:S});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Sn,{children:b,setAttributes:n,selectedTab:m,selectTab:C,moveTab:E}),(0,i.createElement)(En,{attributes:l,setAttributes:n,children:b,deleteTab:e=>{if(0<(null==b?void 0:b.length)){const t=b.find((t=>t.clientId===e));y(t.clientId,!1),m===e&&p("")}},selectTab:C,moveTab:E,addTab:x}),(0,i.createElement)("div",M,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-tabs__header"},(null==b?void 0:b.map((e=>(0,i.createElement)(T,{key:e.clientId,title:e.attributes.title||(0,o.__)("Insert Title","otter-blocks"),active:e.clientId===m,onClick:()=>w(e.clientId)}))))||"",(r||0===b.length)&&(0,i.createElement)((()=>(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-tabs__header_item"},(0,i.createElement)("div",{onClick:x,style:{display:"flex",width:"30px",height:"30px",alignItems:"center"}},(0,i.createElement)(c.Icon,{icon:fn.Z})))),null)),(0,i.createElement)("div",{ref:u,className:"wp-block-themeisle-blocks-tabs__content"},(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/tabs-item"],template:[["themeisle-blocks/tabs-item"]],orientation:"horizontal",renderAppender:!1}))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",l,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-tabs__content"},(0,i.createElement)(s.InnerBlocks.Content,null)))},example:{viewportWidth:1e3,attributes:{},innerBlocks:[]}});var Bn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/tabs-item","title":"Tab Item","category":"themeisle-blocks","description":"Organize and allow navigation between groups of content with Tabs block. Powered by Otter.","keywords":["media","tab","item"],"parent":["themeisle-blocks/tabs"],"textdomain":"otter-blocks","attributes":{"title":{"type":"string"},"defaultOpen":{"type":"boolean","default":false}}}'),zn=e=>{let{setAttributes:t,selectParent:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.Button,{isSecondary:!0,onClick:()=>l()},(0,o.__)("Back to the Tabs","otter-blocks")),(0,i.createElement)(c.TextControl,{type:"text",label:(0,o.__)("Title","otter-blocks"),placeholder:(0,o.__)("Insert a title","otter-blocks"),onChange:e=>{t({title:e})}})))};const{name:Pn}=Bn;(0,a.registerBlockType)(Pn,{...Bn,title:(0,o.__)("Tab Item","otter-blocks"),description:(0,o.__)("Organize and allow navigation between groups of content with Tabs block. Powered by Otter.","otter-blocks"),icon:jl.Z,keywords:["media","tab","item"],edit:e=>{let{attributes:t,setAttributes:l,clientId:a}=e;const n=(0,i.useRef)(null),{parentClientId:r}=(0,v.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor");return{parentClientId:t(l(a)).clientId}}),[]),{selectBlock:c}=(0,v.useDispatch)("core/block-editor"),d=(0,s.useBlockProps)({ref:n});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(zn,{setAttributes:l,selectParent:()=>c(r)}),(0,i.createElement)("div",d,(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Add title…","otter-blocks"),value:t.title,onChange:e=>l({title:e}),className:g()("wp-block-themeisle-blocks-tabs-item__header",{active:!!t.defaultOpen&&t.defaultOpen}),tagName:"div",onClick:()=>{const e=document.querySelectorAll(`#block-${r} .wp-block-themeisle-blocks-tabs__content .wp-block-themeisle-blocks-tabs-item`);var t,l;e&&e.forEach((e=>{var t,l;null===(t=e.querySelector(".wp-block-themeisle-blocks-tabs-item__header"))||void 0===t||t.classList.remove("active"),null===(l=e.querySelector(".wp-block-themeisle-blocks-tabs-item__content"))||void 0===l||l.classList.remove("active")})),n.current&&(null===(t=n.current.querySelector(".wp-block-themeisle-blocks-tabs-item__header"))||void 0===t||t.classList.add("active"),null===(l=n.current.querySelector(".wp-block-themeisle-blocks-tabs-item__content"))||void 0===l||l.classList.add("active"))},withoutInteractiveFormatting:!0}),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-item__content"},(0,i.createElement)(s.InnerBlocks,{template:[["core/paragraph"]]}))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({"data-title":t.title,...t.defaultOpen&&{"data-default-open":t.defaultOpen}});return(0,i.createElement)("div",l,(0,i.createElement)(s.RichText.Content,{tagName:"div",className:"wp-block-themeisle-blocks-tabs-item__header",value:t.title||(0,o.__)("Untitled Tab","otter-blocks"),tabIndex:"0"}),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-item__content"},(0,i.createElement)(s.InnerBlocks.Content,null)))}})},5452:function(e,t,l){var o=l(9307),a=l(5736),n=l(5661),r=l(2175),i=l(5609),s=l(4333),c=l(2136),d=l(8286);const u=e=>{let{backgroundType:t,backgroundColor:l,image:b,gradient:m,backgroundAttachment:p,backgroundRepeat:g,backgroundSize:h,focalPoint:v,changeImage:y,changeColor:k,removeImage:f,changeBackgroundType:_,changeGradient:w,changeBackgroundAttachment:C,changeBackgroundRepeat:E,changeBackgroundSize:x,changeFocalPoint:S}=e;const T=`inspector-background-selector-control-${(0,s.useInstanceId)(u)}`;return(0,o.createElement)("div",{id:T,className:"components-base-control o-background-selector-control"},(0,o.createElement)(d.Z,{value:t,options:[{label:(0,a.__)("Color","otter-blocks"),value:"color"},{label:(0,a.__)("Image","otter-blocks"),value:"image"},{label:(0,a.__)("Gradient","otter-blocks"),value:"gradient"}],onChange:_}),("color"===t||void 0===t)&&(0,o.createElement)(r.__experimentalColorGradientControl,{label:(0,a.__)("Background Color","otter-blocks"),colorValue:l,onColorChange:k}),"image"===t&&(null!=b&&b.url?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(i.FocalPointPicker,{label:(0,a.__)("Focal point picker","otter-blocks"),url:b.url,value:v,onDragStart:S,onDrag:S,onChange:S}),(0,o.createElement)(r.MediaReplaceFlow,{name:(0,a.__)("Manage Image","otter-blocks"),mediaURL:b.url,mediaId:null==b?void 0:b.id,accept:"image/*",allowedTypes:["image"],onSelect:y},(0,o.createElement)(i.MenuItem,{icon:n.Z,onClick:f},(0,a.__)("Clear Image","otter-blocks"))),(0,o.createElement)(c.Z,{label:(0,a.__)("Background Settings","otter-blocks")},(0,o.createElement)(i.SelectControl,{label:(0,a.__)("Background Attachment","otter-blocks"),value:p,options:[{label:(0,a.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,a.__)("Fixed","otter-blocks"),value:"fixed"},{label:(0,a.__)("Local","otter-blocks"),value:"local"}],onChange:C}),(0,o.createElement)(i.SelectControl,{label:(0,a.__)("Background Repeat","otter-blocks"),value:g,options:[{label:(0,a.__)("Repeat","otter-blocks"),value:"repeat"},{label:(0,a.__)("No-repeat","otter-blocks"),value:"no-repeat"}],onChange:E}),(0,o.createElement)(i.SelectControl,{label:(0,a.__)("Background Size","otter-blocks"),value:h,options:[{label:(0,a.__)("Auto","otter-blocks"),value:"auto"},{label:(0,a.__)("Cover","otter-blocks"),value:"cover"},{label:(0,a.__)("Contain","otter-blocks"),value:"contain"}],onChange:x}))):(0,o.createElement)(o.Fragment,null,(0,o.createElement)("br",null),(0,o.createElement)(r.MediaPlaceholder,{icon:"format-image",labels:{title:(0,a.__)("Background Image","otter-blocks"),name:(0,a.__)("an image","otter-blocks")},value:null==b?void 0:b.id,onSelect:y,accept:"image/*",allowedTypes:["image"]}))),"gradient"===t&&(0,o.createElement)(r.__experimentalColorGradientControl,{label:(0,a.__)("Background Gradient","otter-blocks"),gradientValue:m,disableCustomColors:!0,onGradientChange:w,clearable:!1}))};t.Z=u},3075:function(e,t,l){var o=l(9307),a=l(5736),n=l(2175),r=l(5609),i=l(2136);t.Z=e=>{let{boxShadow:t,onChange:l}=e;return(0,o.createElement)(i.Z,{label:(0,a.__)("Shadow Settings","otter-blocks"),attributes:t,setAttributes:l,resetValues:{active:!1,color:void 0,colorOpacity:50,blur:5,spread:1,horizontal:0,vertical:0},onClick:()=>l({active:!0})},(0,o.createElement)(o.Fragment,null,(0,o.createElement)(n.__experimentalColorGradientControl,{label:(0,a.__)("Shadow Color","otter-blocks"),colorValue:t.color,onColorChange:e=>l({color:e})}),(0,o.createElement)(r.RangeControl,{label:(0,a.__)("Opacity","otter-blocks"),value:t.colorOpacity,onChange:e=>l({colorOpacity:e}),min:0,max:100}),(0,o.createElement)(r.RangeControl,{label:(0,a.__)("Blur","otter-blocks"),value:t.blur,onChange:e=>l({blur:e}),min:0,max:100}),(0,o.createElement)(r.RangeControl,{label:(0,a.__)("Spread","otter-blocks"),value:t.spread,onChange:e=>l({spread:e}),min:-100,max:100}),(0,o.createElement)(r.RangeControl,{label:(0,a.__)("Horizontal","otter-blocks"),value:t.horizontal,onChange:e=>l({horizontal:e}),min:-100,max:100}),(0,o.createElement)(r.RangeControl,{label:(0,a.__)("Vertical","otter-blocks"),value:t.vertical,onChange:e=>l({vertical:e}),min:-100,max:100})))}},2645:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=(l(5736),l(5609));t.Z=e=>{let{label:t,help:l,options:a,value:i,onChange:s}=e;return(0,o.createElement)(r.BaseControl,{label:t,help:l},(0,o.createElement)("div",{className:"o-button-toggle"},a.map((e=>(0,o.createElement)(r.Button,{className:n()("o-button-toggle__item",{"is-active":e.value===i}),key:e.value,variant:"secondary",label:e.label,"aria-current":e.value===i,onClick:()=>s(e.value)},e.label)))))}},8675:function(e,t,l){var o=l(9307),a=l(5736),n=l(2819),r=l(5609);t.Z=e=>{let{values:t,setAttributes:l}=e;return(0,o.createElement)("div",{className:"o-clear-button"},(0,o.createElement)(r.Button,{isSmall:!0,isSecondary:!0,onClick:()=>{const e=((0,n.isArray)(t)?t:[t]).map((e=>{if((0,n.isString)(e))return e;if((0,n.isObject)(e)){const t=Object.keys(e);if(1===t.length)return e[t[0]]?t[0]:void 0}})).filter(n.isString).reduce(((e,t)=>(e[t]=void 0,e)),{});l(e)}},(0,a.__)("Clear","otter-blocks")))}},201:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=l(2175),i=l(5609);t.Z=e=>{let{label:t,colorValue:l,gradientValue:a,onColorChange:s,onGradientChange:c,className:d}=e;return(0,o.createElement)(i.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:n()("o-color-dropdown-control",d),contentClassName:"o-color-dropdown-control-content",renderToggle:e=>{let{isOpen:r,onToggle:s}=e;return(0,o.createElement)(i.Button,{className:n()("o-color-dropdown-control-button",{"is-open":r}),onClick:s,"aria-expanded":r},(0,o.createElement)(i.ColorIndicator,{colorValue:null!=l?l:a}),t)},renderContent:()=>(0,o.createElement)(r.__experimentalColorGradientControl,{colorValue:l,onColorChange:s,gradientValue:a,onGradientChange:c})})}},2136:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=l(1984),i=l(7968),s=l(9522),c=l(5736),d=l(5609),u=l(4333);const b=e=>{let{label:t,attributes:l,setAttributes:a,resetValues:m,onClick:p,children:g}=e;(0,o.useEffect)((()=>{for(const e in m){if(m[e]!==l[e])return y(!0);y(!1)}}),[l]);const h=(0,u.useInstanceId)(b),[v,y]=(0,o.useState)(!1),k=`inspector-control-panel-control-${h}`;return(0,o.createElement)("div",{className:"o-control-panel-control"},(0,o.createElement)("div",{className:"components-base-control__field"},(0,o.createElement)("div",{className:"components-base-control__title"},(0,o.createElement)("label",{className:"components-base-control__label",htmlFor:k},t),(0,o.createElement)("div",{className:"floating-controls"},(0,o.createElement)(d.Dropdown,{position:"top left",headerTitle:t,expandOnMobile:!0,renderToggle:e=>{let{isOpen:l,onToggle:u}=e;return(0,o.createElement)(o.Fragment,null,v&&(0,o.createElement)(d.Button,{icon:(0,o.createElement)(r.Z,{icon:i.Z}),label:(0,c.__)("Reset to default","otter-blocks"),showTooltip:!0,isTertiary:!0,onClick:()=>a({...m})}),(0,o.createElement)(d.Button,{id:k,icon:s.Z,label:t,showTooltip:!0,onClick:()=>{u(),p&&p()},"aria-expanded":l,className:n()({"is-active":v})}))},renderContent:()=>(0,o.createElement)("div",{className:"otter-popover-settings"},g)})))))};t.Z=b},9977:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=l(2819),i=l(5736),s=l(4333),c=l(5609),d=l(2154);const u=e=>{let{label:t,value:l,valueVariant:a,valueStyle:b,valueTransform:m,isSelect:p=!1,onChangeFontFamily:g,onChangeFontVariant:h,onChangeFontStyle:v,onChangeTextTransform:y}=e;const k=(0,s.useInstanceId)(u);(0,o.useEffect)((()=>{d.Z.afterLoading().then((e=>{_(e.fonts),l&&C(e.getVariants(l))}))}),[]);const[f,_]=(0,o.useState)(null),[w,C]=(0,o.useState)(null),[E,x]=(0,o.useState)(""),S=`inspector-google-fonts-control-${k}`;return(0,o.createElement)("div",{className:"o-gfont-control"},(0,o.createElement)(c.BaseControl,{label:t,id:S},null!==f?p?(0,o.createElement)(c.SelectControl,{value:l||"",id:S,options:[{label:(0,i.__)("Default","otter-blocks"),value:""},...f.map((e=>({label:e.family,value:e.family})))],onChange:e=>{let t=[];if(loadFontToPage(e,"regular",f),""===e)return t=[{label:(0,i.__)("Regular","otter-blocks"),value:"regular"},{label:(0,i.__)("Italic","otter-blocks"),value:"italic"}],g(void 0),void C(t);g(e),t=f.find((t=>e===t.family)).variants.filter((e=>!1===e.includes("italic"))).map((e=>({label:(0,r.startCase)((0,r.toLower)(e)),value:e}))),C(t)}}):(0,o.createElement)(c.Dropdown,{contentClassName:"o-gfont-popover",position:"bottom center",renderToggle:e=>{let{isOpen:t,onToggle:a}=e;return(0,o.createElement)(c.Button,{className:"o-gfont-button",id:S,onClick:a,"aria-expanded":t},l||(0,i.__)("Select Font Family","otter-blocks"))},renderContent:e=>{let{onToggle:t}=e;return(0,o.createElement)(c.MenuGroup,{label:(0,i.__)("Google Fonts","otter-blocks")},(0,o.createElement)(c.TextControl,{value:E,onChange:e=>x(e)}),(0,o.createElement)("div",{className:"components-popover__items"},(0,o.createElement)(c.MenuItem,{onClick:()=>{t(),g(void 0),C([]),x("")}},(0,i.__)("Default","otter-blocks")),f.map(((e,a)=>{if(!E||e.family.toLowerCase().includes(E.toLowerCase()))return(0,o.createElement)(c.MenuItem,{key:a,className:n()({"is-selected":e.family===l}),onClick:()=>{t(),g(e.family);const l=e.variants.filter((e=>!1===e.includes("italic"))).map((e=>({label:(0,r.startCase)((0,r.toLower)(e)),value:e})));C(l),x("")}},e.family)}))))}}):(0,i.__)("Loading…","otter-blocks")),w&&(0,o.createElement)(c.SelectControl,{label:(0,i.__)("Font Weight","otter-blocks"),value:a||"regular",options:w,onChange:h}),(0,o.createElement)(c.SelectControl,{label:(0,i.__)("Font Style","otter-blocks"),value:b,options:[{label:(0,i.__)("Regular","otter-blocks"),value:"normal"},{label:(0,i.__)("Italic","otter-blocks"),value:"italic"}],onChange:v}),(0,o.createElement)(c.SelectControl,{label:(0,i.__)("Font Transform","otter-blocks"),value:m,options:[{label:(0,i.__)("Default","otter-blocks"),value:"none"},{label:(0,i.__)("Uppercase","otter-blocks"),value:"uppercase"},{label:(0,i.__)("Lowercase","otter-blocks"),value:"lowercase"},{label:(0,i.__)("Capitalize","otter-blocks"),value:"capitalize"}],onChange:y}))};t.Z=u},1661:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=l(5736),i=l(2175),s=l(4333),c=l(5609);const d=e=>{let{value:t,onChange:l}=e;const a=(0,s.useInstanceId)(d);(0,o.useEffect)((()=>p(t)),[t]);const[u,b]=(0,o.useState)(!1),[m,p]=(0,o.useState)(null),g=void 0!==window.themeisleGutenberg.blockIDs&&t!==m&&window.themeisleGutenberg.blockIDs.includes(m);return(0,o.createElement)(i.InspectorAdvancedControls,null,(0,o.createElement)(c.BaseControl,{label:(0,r.__)("HTML Anchor","otter-blocks"),help:(0,r.__)("Anchors lets you link directly to a section on a page.","otter-blocks"),id:`o-html-anchor-control-${a}`},(0,o.createElement)("div",{className:"o-html-anchor-control"},(0,o.createElement)("input",{type:"text",className:"o-html-anchor-control-input",readOnly:!u&&"readonly",value:u?m:t,onChange:e=>p(e.target.value),onClick:e=>e.target.select()}),(0,o.createElement)(c.Button,{icon:u?"yes":"edit",label:u?(0,r.__)("Save","otter-blocks"):(0,r.__)("Edit","otter-blocks"),showTooltip:!0,disabled:!!g,className:n()("o-html-anchor-control-button",{"is-saved":!u}),onClick:()=>{if(u&&t!==m){const e=window.themeisleGutenberg.blockIDs.findIndex((e=>e===t));window.themeisleGutenberg.blockIDs[e]=m,l(m)}b(!u)}}))),g&&(0,o.createElement)(c.Notice,{status:"warning",isDismissible:!1,className:"o-html-anchor-control-notice"},(0,r.__)("This ID has already been used in this page. Please consider using a different ID to avoid conflict.","otter-blocks")))};t.Z=d},1070:function(e,t,l){l.d(t,{l:function(){return g}});var o=l(9307),a=l(4184),n=l.n(a),r=l(5736),i=l(2175),s=l(4333),c=l(5609),d=l(7231),u=l(4824),b=l(48);const m=e=>{let{i:t,icon:l,prefix:a,onToggle:r}=e;return(0,o.createElement)(c.MenuItem,{label:t.label,className:n()({"is-selected":t.name===l&&t.prefix===a}),onClick:r},(0,o.createElement)("i",{className:n()(t.prefix,`fa-${t.name}`,"fa-fw")}),t.name)},p=e=>{let{label:t,library:l,prefix:a,icon:g,changeLibrary:h,onChange:v,allowImage:y=!1,allowThemeisleIcons:k=!0}=e;const f=(0,s.useInstanceId)(p);(0,o.useEffect)((()=>{const e=[];Object.keys(u).forEach((t=>{Object.keys(u[t].styles).forEach((l=>{let o="";switch(u[t].styles[l]){case"brands":o="fab";break;case"solid":default:o="fas";break;case"regular":o="far"}e.push({name:t,unicode:u[t].unicode,prefix:o,label:u[t].label})}))})),S(e)}),[]);const[_,w]=(0,o.useState)(!1);(0,o.useEffect)((()=>{if("image"===l)try{const e=new URL(g);"http:"!==(null==e?void 0:e.protocol)&&"https:"!==(null==e?void 0:e.protocol)||w(!0)}catch(e){w(!1)}}),[l,g]);const[C,E]=(0,o.useState)(""),[x,S]=(0,o.useState)(null),T="fontawesome"===l?x:b.ZP.iconsList,M=`inspector-icon-picker-control-${f}`,B=e=>{let{itemIcon:t=g}=e;const l=b.ZP.icons[t];return l?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l,null),t):(0,o.createElement)(o.Fragment,null,(0,r.__)("Select Icon","otter-blocks"))},z=e=>{let{i:t,onToggle:l}=e;return(0,o.createElement)(c.MenuItem,{label:t,className:n()({"is-selected":t===g}),onClick:()=>{l(),v(t)}},(0,o.createElement)(B,{itemIcon:t}))};return(0,o.createElement)(c.BaseControl,{id:M,className:"o-icon-picker-control"},(0,o.createElement)(c.Dropdown,{contentClassName:"o-icon-picker-popover",position:"bottom left",renderToggle:e=>{let{isOpen:s,onToggle:d}=e;return(0,o.createElement)(o.Fragment,null,(k||y)&&(0,o.createElement)(c.SelectControl,{label:(0,r.__)("Icon Library","otter-blocks"),value:l,options:[{label:(0,r.__)("Font Awesome","otter-blocks"),value:"fontawesome"},...k?[{label:(0,r.__)("ThemeIsle Icons","otter-blocks"),value:"themeisle-icons"}]:[],...y?[{label:(0,r.__)("Custom Image","otter-blocks"),value:"image"}]:[]],onChange:h}),"image"!==l?(0,o.createElement)(c.BaseControl,{label:t},(0,o.createElement)(c.Button,{className:"o-icon-picker-button",onClick:d,"aria-expanded":s},g?(0,o.createElement)(o.Fragment,null,"fontawesome"===l&&(a?(0,o.createElement)(o.Fragment,null,(0,o.createElement)("i",{className:n()(a,`fa-${g}`,"fa-fw")}),g):(0,r.__)("Select Icon","otter-blocks")),"themeisle-icons"===l&&(0,o.createElement)(B,null)):(0,r.__)("Select Icon","otter-blocks"))):(0,o.createElement)(o.Fragment,null,g&&(0,o.createElement)(c.BaseControl,{label:(0,r.__)("Image","otter-blocks"),className:"o-icon-picker-image-control"},(0,o.createElement)("div",{style:{width:"100%",padding:"5px",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"5px"}},_?(0,o.createElement)("img",{src:g,width:"130px"}):(0,o.createElement)("span",null,(0,r.__)("Please select an image.","otter-blocks")))),(0,o.createElement)(i.MediaPlaceholder,{labels:{title:(0,r.__)("Image","otter-blocks")},accept:"image/*",allowedTypes:["image"],value:g,onSelect:v})))},renderContent:e=>{let{onToggle:t}=e;return"image"===l?(0,o.createElement)(o.Fragment,null):(0,o.createElement)(c.MenuGroup,{label:"fontawesome"===l?(0,r.__)("Font Awesome Icons","otter-blocks"):(0,r.__)("ThemeIsle Icons","otter-blocks"),style:{paddingBottom:"0px"}},(0,o.createElement)(c.TextControl,{value:C,onChange:e=>E(e)}),(0,o.createElement)("div",{className:"components-popover__items"},T.map(((e,n)=>"fontawesome"!==l||C&&!e.name.match(C.toLowerCase())&&!e.label.toLowerCase().match(C.toLowerCase())?"themeisle-icons"!==l||C&&!e.toLowerCase().match(C.toLowerCase())?void 0:(0,o.createElement)(z,{i:e,key:n,onToggle:t}):(0,o.createElement)(m,{i:e,key:n,icon:g,prefix:a,onToggle:()=>{t(),v({name:e.name,prefix:e.prefix})}})))),(0,o.createElement)("div",{style:{display:"flex",justifyContent:"flex-end",position:"absolute",top:"11px",right:"5px"}},(0,o.createElement)(c.Button,{onClick:t,icon:d.Z})))}}))},g=e=>{let{label:t,classes:l,setAttributes:a}=e;(0,o.useEffect)((()=>{const e=[];if(Object.keys(u).forEach((t=>{Object.keys(u[t].styles).forEach((l=>{let o="";switch(u[t].styles[l]){case"brands":o="fab";break;case"solid":default:o="fas";break;case"regular":o="far"}e.push({name:t,unicode:u[t].unicode,prefix:o,label:u[t].label})}))})),b(e),l){const e=l.split(" "),t=e.find((e=>e.includes("fab")||e.includes("far")||e.includes("fas")))||"fas",o=e.find((e=>e.includes("fa-")));o&&(g(t),v(o))}}),[]);const[i,s]=(0,o.useState)(""),[d,b]=(0,o.useState)(null),[p,g]=(0,o.useState)(""),[h,v]=(0,o.useState)("");return(0,o.createElement)(c.ToolbarGroup,null,(0,o.createElement)(c.Dropdown,{contentClassName:"o-icon-picker-popover",position:"bottom center",renderToggle:e=>{let{isOpen:t,onToggle:l}=e;return(0,o.createElement)(c.ToolbarButton,{label:(0,r.__)("Menu Icons","otter-blocks"),className:"o-icon-picker-toolbar-button",showTooltip:!0,onClick:l},p&&h?(0,o.createElement)("i",{className:n()(p,h,"fa-fw")}):(0,o.createElement)("i",{className:"fas fa-icons fa-fw"}))},renderContent:e=>{let{onToggle:n}=e;return(0,o.createElement)(c.MenuGroup,{label:t},(0,o.createElement)(c.TextControl,{value:i,onChange:e=>s(e)}),(0,o.createElement)("div",{className:"components-popover__items"},h&&p&&!i&&(0,o.createElement)(c.MenuItem,{label:(0,r.__)("None","otter-blocks"),showTooltip:!0,onClick:()=>(e=>{e();let t=l?l.split(" "):[];t.splice(t.indexOf(p),1),t.splice(t.indexOf(h),1),t=t.join(" "),a({className:t}),g(""),v("")})(n)},(0,o.createElement)("i",{className:"fas fa-times fa-fw remove-icon"}),(0,r.__)("Remove Icon","otter-blocks")),d.map((e=>{if(!i||e.name.match(i.toLowerCase())||e.label.toLowerCase().match(i.toLowerCase()))return(0,o.createElement)(m,{i:e,icon:h,prefix:p,onToggle:()=>((e,t)=>{e();let o=l?l.split(" "):[];o.splice(o.indexOf(p),1),o.splice(o.indexOf(h),1),o.push(t.prefix,`fa-${t.name}`),o=o.join(" "),a({className:o}),g(t.prefix),v(`fa-${t.name}`)})(n,e)})}))))}}))};t.Z=p},2285:function(e,t,l){l.d(t,{Z:function(){return y}});var o=l(9307),a=l(2819),n=l(2175),r=l(454),i=l.n(r),s=l(4184),c=l.n(s),d=l(1286),u=l(1984),b=l(5117),m=l(5736),p=l(5609),g=(0,d.W8)((e=>{let{value:t,selected:l,dragging:a,sorting:n,selectedItemsCount:r,onClick:i}=e;const s=a&&1<r;return(0,o.createElement)(p.Button,{className:c()("o-images-grid-component__image",{"is-selected":l,"is-sorting":l&&n}),onClick:()=>i(t),style:{backgroundImage:`url( ' ${t.url} ' )`}},s&&(0,o.createElement)("div",{className:"o-images-grid-component__image__count"},r))})),h=(0,d.JN)((e=>{let{items:t,className:l,onItemSelect:a,selectedItems:n,isSorting:r,sortingItemKey:i,open:s}=e;return(0,o.createElement)("div",{className:l,tabIndex:"0"},t.map(((e,t)=>{const l=n.includes(e),s=i===e;return(0,o.createElement)(g,{key:`image-${e.id}`,index:t,value:e,selected:l,dragging:s,sorting:r,selectedItemsCount:n.length,onClick:a})})),(0,o.createElement)(p.Button,{label:(0,m.__)("Add Images","otter-blocks"),icon:(0,o.createElement)(u.Z,{icon:b.Z}),isPrimary:!0,onClick:s}))})),v=e=>{let{attributes:t,onSelectImages:l,open:a}=e;const[n,r]=(0,o.useState)([]),[s,d]=(0,o.useState)(!1),[u,b]=(0,o.useState)(null);return(0,o.createElement)(h,{className:c()("o-images-grid-component",{"is-single":1===t.images.length}),open:a,items:t.images,onItemSelect:e=>{let t;t=n.includes(e)?n.filter((t=>t!==e)):[...n,e],r(t)},selectedItems:n,isSorting:s,sortingItemKey:u,shouldCancelStart:e=>{if(!e.target.sortableInfo)return!1;const l=t.images[e.target.sortableInfo.index];return!!n.length&&!n.includes(l)},updateBeforeSortStart:e=>{let{index:l}=e;return new Promise((e=>{d(!0),b(t.images[l]),e()}))},onSortEnd:e=>{let{oldIndex:o,newIndex:a}=e,s=i()(t.images,o,a);n.length&&(s=[...s.slice(0,a).filter((e=>!n.includes(e))),...n,...s.slice(a,s.length).filter((e=>!n.includes(e)))]),d(!1),b(null),r([]),l(s)},distance:3,axis:"xy"})},y=e=>{let{attributes:t,onSelectImages:l}=e;const r=(0,a.debounce)(l,250);return(0,o.createElement)(n.MediaUploadCheck,null,(0,o.createElement)(n.MediaUpload,{onSelect:r,allowedTypes:["image"],multiple:!0,addToGallery:!0,gallery:!0,value:t.images.map((e=>{let{id:t}=e;return t})),render:e=>{let{open:a}=e;return(0,o.createElement)(v,{attributes:t,open:a,onSelectImages:l})}}))}},3203:function(e,t,l){l.d(t,{RF:function(){return p},Zo:function(){return b.Z},jj:function(){return v},Lp:function(){return y.Z},Cd:function(){return k.Z},Ed:function(){return f.Z},Fi:function(){return m.Z},pO:function(){return _.Z},p:function(){return o.p},Hn:function(){return w.Z},n9:function(){return C.Z},r4:function(){return E.Z},Ik:function(){return x.Z}});var o=l(3532),a=l(9084),n=l(5336),r=l(7462),i=l(9307),s=l(5736),c=(l(2819),l(5609)),d=l(9818),u=window.wp.htmlEntities,b=l(5452),m=l(2136),p=e=>{let{backgroundType:t,backgroundColor:l,image:o,gradient:a,backgroundAttachment:n,backgroundRepeat:r,backgroundSize:d,focalPoint:u,backgroundOpacity:p,backgroundFilterBlur:g,backgroundFilterBrightness:h,backgroundFilterContrast:v,backgroundFilterGrayscale:y,backgroundFilterHue:k,backgroundFilterSaturate:f,backgroundBlend:_,changeImage:w,changeColor:C,removeImage:E,changeBackgroundType:x,changeGradient:S,changeBackgroundAttachment:T,changeBackgroundRepeat:M,changeBackgroundSize:B,changeFocalPoint:z,changeOpacity:P,changeFilterBlur:L,changeFilterBrightness:R,changeFilterContrast:F,changeFilterGrayscale:A,changeFilterHue:H,changeFilterSaturate:O,changeBlend:N}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(b.Z,{backgroundType:t,backgroundColor:l,image:o,gradient:a,focalPoint:u,backgroundAttachment:n,backgroundRepeat:r,backgroundSize:d,changeBackgroundType:x,changeImage:w,removeImage:E,changeColor:C,changeGradient:S,changeBackgroundAttachment:T,changeBackgroundRepeat:M,changeFocalPoint:z,changeBackgroundSize:B}),(0,i.createElement)(c.RangeControl,{label:(0,s.__)("Overlay Opacity","otter-blocks"),value:p,onChange:P,min:0,max:100}),(0,i.createElement)(c.SelectControl,{label:(0,s.__)("Blend Mode","otter-blocks"),value:_,options:[{label:(0,s.__)("Normal","otter-blocks"),value:"normal"},{label:(0,s.__)("Multiply","otter-blocks"),value:"multiply"},{label:(0,s.__)("Screen","otter-blocks"),value:"screen"},{label:(0,s.__)("Overlay","otter-blocks"),value:"overlay"},{label:(0,s.__)("Darken","otter-blocks"),value:"darken"},{label:(0,s.__)("Lighten","otter-blocks"),value:"lighten"},{label:(0,s.__)("Color Dodge","otter-blocks"),value:"color-dodge"},{label:(0,s.__)("Color Burn","otter-blocks"),value:"color-burn"},{label:(0,s.__)("Hard Light","otter-blocks"),value:"hard-light"},{label:(0,s.__)("Soft Light","otter-blocks"),value:"soft-light"},{label:(0,s.__)("Difference","otter-blocks"),value:"difference"},{label:(0,s.__)("Exclusion","otter-blocks"),value:"exclusion"},{label:(0,s.__)("Hue","otter-blocks"),value:"hue"},{label:(0,s.__)("Saturation","otter-blocks"),value:"saturation"},{label:(0,s.__)("Color","otter-blocks"),value:"color"},{label:(0,s.__)("Luminosity","otter-blocks"),value:"luminosity"}],onChange:N}),(0,i.createElement)(m.Z,{label:(0,s.__)("Opacity & Filters","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,s.__)("Blur","otter-blocks"),value:g,onChange:L,min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,s.__)("Brightness","otter-blocks"),value:h,onChange:R,min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,s.__)("Contrast","otter-blocks"),value:v,onChange:F,min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,s.__)("Grayscale","otter-blocks"),value:y,onChange:A,min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,s.__)("Hue","otter-blocks"),value:k,onChange:H,min:0,max:360}),(0,i.createElement)(c.RangeControl,{label:(0,s.__)("Saturation","otter-blocks"),value:f,onChange:O,min:0,max:100})))},g=(l(3075),l(4184)),h=l.n(g),v=e=>{let{label:t,indicator:l,children:o}=e;return(0,i.createElement)(c.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"o-button-dropdown-control",contentClassName:"o-button-dropdown-control-content",renderToggle:e=>{let{isOpen:o,onToggle:a}=e;return(0,i.createElement)(c.Button,{className:h()("o-button-dropdown-control-button",{"is-open":o}),onClick:a,"aria-expanded":o},(0,i.createElement)(c.ColorIndicator,{colorValue:l}),t)},renderContent:()=>(0,i.createElement)("div",{className:"block-editor-block-inspector"},o)})},y=l(2645),k=l(8675),f=l(201),_=(l(9977),l(1661)),w=(l(1070),l(2285),l(7638)),C=(l(8504),l(9347),l(6993)),E=(l(2372),l(5241),l(817),l(3159),l(412)),x=l(8286);window.otterComponents={},window.otterComponents.SelectProducts=e=>{let{label:t,value:l,onChange:o,...a}=e;const{results:n,status:b,isLoading:m}=(0,d.useSelect)((e=>{let t=[],l="loading";const{COLLECTIONS_STORE_KEY:o}=window.wc.wcBlocksData;var a,n,r,i;return e(o).getCollectionError("/wc/store","products",{per_page:100})?l="error":(t="error"===l?[]:null===(a=null!==(n=null===(r=(i=e(o)).getCollection)||void 0===r?void 0:r.call(i,"/wc/store","products",{per_page:100}))&&void 0!==n?n:[])||void 0===a?void 0:a.map((e=>({value:e.id,label:(0,u.decodeEntities)(e.name)}))),l="loaded",t=[{value:0,label:(0,s.__)("None","otter-blocks")},...t]),{results:t,status:l,isLoading:e(o).isResolving("getCollection",["/wc/store","products",{per_page:100}])}}),[]);return m?(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null)):"error"===b?(0,i.createElement)("p",null,(0,s.__)("There seems to have been an error","otter-blocks")):(0,i.createElement)(c.SelectControl,(0,r.Z)({label:t,value:Number(l),options:n,onChange:e=>o(Number(e))},a))},window.otterComponents.Notice=a.Z,window.otterComponents.OtterControlTools=n.t,window.otterComponents.useInspectorSlot=o.R},7638:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=(l(5736),l(5609));t.Z=e=>{let{value:t,options:l,onChange:a}=e;return(0,o.createElement)(r.PanelBody,{className:"o-inspector-header"},l.map(((e,l)=>(0,o.createElement)(r.Button,{key:l,className:n()({"is-active":e.value===t}),onClick:()=>a(e.value)},e.label))))}},3532:function(e,t,l){l.d(t,{R:function(){return c},p:function(){return d}});var o=l(9307),a=(l(5736),l(2175)),n=l(5609);const{Fill:r,Slot:i}=(0,n.createSlotFill)("OtterInspectorExtensions"),s=["themeisle-blocks/advanced-columns","themeisle-blocks/advanced-column","themeisle-blocks/advanced-heading","themeisle-blocks/accordion","themeisle-blocks/flip","themeisle-blocks/google-map","themeisle-blocks/posts-grid","themeisle-blocks/review","themeisle-blocks/slider"],c=e=>s.includes(e)?r:a.InspectorControls,d=()=>(0,o.createElement)(i,null,(e=>e.length?e:null))},8504:function(e,t,l){var o=l(9307),a=l(8406),n=l(6421),r=l(5736),i=l(2175),s=l(5609),c=l(9630);t.Z=e=>{let{isSelected:t,url:l,setAttributes:d,opensInNewTab:u}=e;const[b,m]=(0,o.useState)(!1),p=!!l,g=p&&t,h=()=>(m(!0),!1),v=()=>{d({link:void 0,newTab:void 0}),m(!1)},y=b&&(0,o.createElement)(s.Popover,{position:"bottom right",onClose:()=>m(!1)},(0,o.createElement)(i.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:l,opensInNewTab:u},onChange:e=>{let{url:t="",opensInNewTab:l}=e;d({link:t}),u!==l&&d({newTab:l})},onRemove:v}));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.ToolbarGroup,null,!p&&(0,o.createElement)(s.ToolbarButton,{name:"link",icon:a.Z,title:(0,r.__)("Link","otter-blocks"),shortcut:c.displayShortcut.primary("k"),onClick:h,className:"o-toolbar-icon"}),g&&(0,o.createElement)(s.ToolbarButton,{name:"link",icon:n.Z,title:(0,r.__)("Unlink","otter-blocks"),shortcut:c.displayShortcut.primaryShift("k"),onClick:Boolean(window.themeisleGutenberg.isLegacyPre59)?v:h,isActive:!0,className:"o-toolbar-icon"})),t&&(0,o.createElement)(s.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{[c.rawShortcut.primary("k")]:h,[c.rawShortcut.primaryShift("k")]:v}}),y)}},9084:function(e,t,l){var o=l(9307),a=l(5609),n=l(5430);t.Z=e=>{let{notice:t,variant:l="default",instructions:r}=e;return(0,o.createElement)("div",{className:`o-notice is-${l}`},t,r&&(0,o.createElement)(a.Tooltip,{text:r,position:"bottom center"},n.Z))}},5336:function(e,t,l){l.d(t,{t:function(){return p}});var o=l(9307),a=l(4333),n=l(2694),r=l(5609),i=l(2175),s=l(5736),c=l(340),d=l(2819),u=l(2827);const{Fill:b,Slot:m}=(0,r.createSlotFill)("OtterControlTools"),p=e=>{let{children:t,order:l}=e;return(0,o.createElement)(b,null,(0,o.createElement)(o.Fragment,{order:null!=l?l:99},t))},g=(0,a.createHigherOrderComponent)((e=>t=>{const[l,a]=(0,o.useState)(!1),[n,b]=(0,o.useState)("notSubmitted"),p=()=>{a(!1),b("notSubmitted")};return t.isSelected?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(e,t),(0,o.createElement)(m,null,(e=>Boolean(e.length)?(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(r.ToolbarGroup,null,(0,o.createElement)(r.ToolbarDropdownMenu,{label:(0,s.__)("Otter Tools","otter-blocks"),icon:c.otterIcon},(t=>{let{onClose:n}=t;return(0,o.createElement)("div",{onClick:n},(0,d.sortBy)(null!=e?e:[],(e=>{var t;return null===(t=e[0])||void 0===t?void 0:t.props.order})),(0,o.createElement)(r.Button,{id:"o-feedback",variant:"link",onClick:()=>{a(!l),n()},style:{paddingLeft:"8px"}},(0,s.__)("Help us improve Otter Blocks","otter-blocks")))}))),(0,o.createElement)(u.I,{isOpen:l,status:n,closeModal:p,source:"control-tools",setStatus:b})):null))):(0,o.createElement)(e,t)}),"withOtterTools");(0,n.addFilter)("editor.BlockEdit","themeisle-gutenberg/otter-tools",g)},9347:function(e,t,l){var o=l(9307),a=l(5736),n=l(5609);t.Z=e=>{let{label:t,onDelete:l,children:r}=e;const[i,s]=(0,o.useState)(!1);return(0,o.createElement)("div",{className:"o-panel-tab"},(0,o.createElement)("div",{className:"o-panel-tab__header"},(0,o.createElement)("div",{className:"o-panel-tab__header__label"},t),(0,o.createElement)(n.Button,{icon:i?"arrow-up-alt2":"arrow-down-alt2",label:i?(0,a.__)("Close Settings","otter-blocks"):(0,a.__)("Open Settings","otter-blocks"),showTooltip:!0,onClick:()=>s(!i)}),(0,o.createElement)(n.Button,{icon:"no-alt",label:(0,a.__)("Delete","otter-blocks"),showTooltip:!0,onClick:l})),i&&(0,o.createElement)("div",{className:"o-panel-tab__content"},r))}},6993:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=l(1610),i=l(3636),s=l(4188),c=l(5736),d=l(5609),u=l(4333),b=l(9818);const m=e=>{let{label:t,className:l,children:a}=e;const p=(0,u.useInstanceId)(m),g=(0,u.useViewportMatch)("large",">="),h=(0,u.useViewportMatch)("large","<="),v=(0,u.useViewportMatch)("small",">="),y=(0,u.useViewportMatch)("small","<="),k=!(g||h||v||y),f=(0,b.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l&&!k?l():t()}),[]),{updateView:_}=(0,b.useDispatch)("themeisle-gutenberg/data"),{__experimentalSetPreviewDeviceType:w}=!!(0,b.useDispatch)("core/edit-post")&&(0,b.useDispatch)("core/edit-post"),C=w&&!k?w:_,E=`inspector-responsive-control-${p}`;return(0,o.createElement)("div",{id:E,className:n()("o-responsive-control",l)},(0,o.createElement)("div",{className:"components-base-control__field"},(0,o.createElement)("div",{className:"components-base-control__title"},(0,o.createElement)("label",{className:"components-base-control__label"},t),(0,o.createElement)("div",{className:"o-responsive-buttons"},(0,o.createElement)(d.ButtonGroup,null,(0,o.createElement)(d.Button,{icon:r.Z,label:(0,c.__)("Desktop"),onClick:()=>C("Desktop"),className:n()({"is-selected":"Desktop"===f})}),(0,o.createElement)(d.Button,{icon:i.Z,label:(0,c.__)("Tablet"),onClick:()=>C("Tablet"),className:n()({"is-selected":"Tablet"===f})}),(0,o.createElement)(d.Button,{icon:s.Z,label:(0,c.__)("Mobile"),onClick:()=>C("Mobile"),className:n()({"is-selected":"Mobile"===f})})))),a))};t.Z=m},2372:function(e,t,l){l.d(t,{Z:function(){return u}});var o=l(9307),a=l(4184),n=l.n(a),r=l(5736),i=l(5609),s=l(4333),c=e=>{let{id:t,index:l,option:a,min:n,max:r,onChange:i}=e;const s=(0,o.useRef)(null);return(0,o.createElement)("div",{className:"o-sizing-control-item"},l.disabled?(0,o.createElement)("input",{type:"number",disabled:l.disabled,className:"o-sizing-control-item-input",id:`o-sizing-control-item-input-${a}`}):(0,o.createElement)(o.Fragment,null,(0,o.createElement)("input",{type:"number",className:"o-sizing-control-item-input",id:`o-sizing-control-item-input-${a}-${t}`,value:void 0!==l.value?l.value:"",min:n,max:r,ref:s,onChange:e=>i(l.type,parseInt(e.target.value))})),l.label&&(0,o.createElement)("label",{className:"o-sizing-control-item-label",htmlFor:`o-sizing-control-item-input-${a}-${t}`},l.label))};const d=e=>{let{label:t,type:l,min:a,max:u,changeType:b,options:m,onChange:p}=e;const g=(0,s.useInstanceId)(d),h=`inspector-sizing-control-${g}`;return m&&1>m.length?(0,r.__)("Please specify more options.","otter-blocks"):(0,o.createElement)("div",{id:h,className:"o-sizing-control"},(0,o.createElement)("div",{className:"components-base-control__field"},t&&(0,o.createElement)("label",{className:"components-base-control__label",htmlFor:h},t),(0,o.createElement)("div",{className:n()("o-sizing-control-wrapper",{linking:l})},m.map(((e,t)=>(0,o.createElement)(c,{key:t,id:g,index:e,option:t,min:a,max:u,onChange:p}))),l&&(0,o.createElement)("div",{className:n()("o-sizing-control-item","toggle-linking",{"is-linked":"linked"===l})},(0,o.createElement)(i.Button,{icon:"linked"===l?"admin-links":"editor-unlink",label:"linked"===l?(0,r.__)("Unlink Values","otter-blocks"):(0,r.__)("Link Values","otter-blocks"),showTooltip:!0,className:"o-sizing-control-item-input",onClick:()=>b("linked"===l?"unlinked":"linked")})))))};var u=d},5241:function(e,t,l){l.d(t,{V:function(){return d},d:function(){return u}});var o=l(9307),a=l(4184),n=l.n(a),r=l(5609),i=l(4333),s=l(2175);const c=e=>{let{label:t,value:l,options:a,onChange:s}=e;const d=`inspector-style-switcher-control-${(0,i.useInstanceId)(c)}`;return(0,o.createElement)(r.BaseControl,{id:d,label:t},(0,o.createElement)("div",{className:"o-style-switcher"},a.map((e=>(0,o.createElement)(r.Button,{key:e.value,className:n()("o-style-switcher-item",{"is-active":e.value===l}),tabIndex:"0",onClick:()=>(e=>s(e))(e.value)},(0,o.createElement)("div",{className:"o-style-switcher-item-preview"},(0,o.createElement)("img",{src:e.image})),(0,o.createElement)("div",{className:"o-style-switcher-item-label"},e.label))))))},d=c,u=e=>{let{label:t,value:l,options:a,onChange:i}=e;return(0,o.createElement)(s.BlockControls,null,(0,o.createElement)(r.ToolbarGroup,null,(0,o.createElement)(r.Dropdown,{contentClassName:"otter-styles-popover-content",position:"bottom center",renderToggle:e=>{let{isOpen:l,onToggle:a}=e;return(0,o.createElement)(r.Button,{className:"components-dropdown-menu__toggle",icon:"admin-appearance",onClick:a,"aria-haspopup":"true","aria-expanded":l,label:t,showTooltip:!0},(0,o.createElement)("span",{className:"components-dropdown-menu__indicator"}))},renderContent:()=>(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"o-style-switcher"},a.map((e=>(0,o.createElement)(r.Button,{key:e.value,className:n()("o-style-switcher-item",{"is-active":e.value===l}),tabIndex:"0",onClick:()=>(e=>i(e))(e.value)},(0,o.createElement)("div",{className:"o-style-switcher-item-preview"},(0,o.createElement)("img",{src:e.image})),(0,o.createElement)("div",{className:"o-style-switcher-item-label"},e.label))))))})))}},817:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=l(5609),i=l(412),s=l(201);t.Z=e=>{const{label:t,initialOpen:l=!1,isSynced:a,options:c,setAttributes:d,children:u}=e;return(0,o.createElement)(r.PanelBody,{title:t,initialOpen:l,className:"o-sync-color-panel"},(0,o.createElement)(i.Z,{isSynced:a,options:null==c?void 0:c.map((e=>({label:e.label,value:e.slug}))),setAttributes:d}),c.map(((e,t)=>(0,o.createElement)(r.Disabled,{key:t,isDisabled:(null==a?void 0:a.includes(e.slug))||!1,className:"o-disabled"},(0,o.createElement)(s.Z,{label:e.label,colorValue:e.value,onColorChange:t=>d({[e.slug]:t}),className:n()("is-list",{"is-first":0===t})})))),u)}},412:function(e,t,l){var o=l(9307),a=l(3279),n=l(8184),r=l(5736),i=l(5609),s=l(9818);const c=()=>{};t.Z=e=>{let{isSynced:t=[],options:l,setAttributes:d}=e;const{enableComplementaryArea:u}=(0,s.useDispatch)("core/interface");return 0===l.length?null:(0,o.createElement)(i.__experimentalHStack,{className:"o-sync-manage-control"},(0,o.createElement)(i.__experimentalHeading,null,(0,r.__)("Sync with Global Defaults","otter-blocks")),(0,o.createElement)(i.DropdownMenu,{icon:a.Z,label:(0,r.__)("View options","otter-blocks"),toggleProps:{isSmall:!0}},(e=>{let{onClose:a=c}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(i.MenuGroup,null,l.filter((e=>!(null!=e&&e.isHidden))).map((e=>{const l=t.includes(e.value);return(0,o.createElement)(i.MenuItem,{key:e.value,icon:l&&n.Z,isSelected:l,label:e.label,onClick:()=>(e=>{let l=[...t||[]];if(null==t?void 0:t.includes(e)){const t=l.indexOf(e);-1!==t&&l.splice(t,1)}else l.push(e);0===l.length&&(l=void 0),d({isSynced:l})})(e.value),role:"menuitemcheckbox"},e.label)}))),(0,o.createElement)(i.MenuGroup,null,(0,o.createElement)(i.MenuItem,{onClick:()=>u("core/edit-post","themeisle-blocks/otter-options")},(0,r.__)("Manage Global Defaults","otter-blocks")),(0,o.createElement)(i.MenuItem,{variant:"tertiary",onClick:()=>{(()=>{let e=[...t||[]];l.forEach((l=>{null!=t&&t.includes(l.value)||e.push(l.value)})),d({isSynced:e})})(),a()}},(0,r.__)("Apply all","otter-blocks")),(0,o.createElement)(i.MenuItem,{variant:"tertiary",onClick:()=>{(()=>{let e=[...t||[]];l.forEach((l=>{if(null!=t&&t.includes(l.value)){const t=e.indexOf(l.value);-1!==t&&e.splice(t,1)}})),0===e.length&&(e=void 0),d({isSynced:e})})(),a()}},(0,r.__)("Reset all","otter-blocks"))))})))}},3159:function(e,t,l){var o=l(9307),a=l(5736),n=l(5609),r=l(9818);t.Z=e=>{let{field:t,isSynced:l,setAttributes:i,children:s}=e;const{enableComplementaryArea:c}=(0,r.useDispatch)("core/interface"),d=null==l?void 0:l.includes(t);return(0,o.createElement)("fieldset",{className:"o-sync-control"},(0,o.createElement)("legend",null,(0,o.createElement)(n.ToggleControl,{label:(0,o.createElement)(o.Fragment,null,(0,a.__)("Sync with","otter-blocks")),checked:d,onChange:()=>{let e=[...l||[]];if(d){const l=e.indexOf(t);-1!==l&&e.splice(l,1)}else e.push(t);0===e.length&&(e=void 0),i({isSynced:e})}}),(0,o.createElement)("span",{tabIndex:"0",className:"clickable",onClick:()=>c("core/edit-post","themeisle-blocks/otter-options")},(0,a.__)("Globals","otter-blocks"))),d?(0,o.createElement)(n.Disabled,null,s):s)}},8286:function(e,t,l){var o=l(9307),a=l(4184),n=l.n(a),r=l(5609);t.Z=e=>{let{value:t,options:l,onChange:a,hasIcon:i=!1}=e;return(0,o.createElement)(r.ButtonGroup,{className:n()("o-toggle-group-control",{"has-icon":i})},null==l?void 0:l.map((e=>(0,o.createElement)("div",{key:null==e?void 0:e.value,className:"o-toggle-option"},(0,o.createElement)(r.Button,{key:null==e?void 0:e.value,isPrimary:t==(null==e?void 0:e.value),variant:t==(null==e?void 0:e.value)?"primary":"secondary",icon:null==e?void 0:e.icon,label:null==e?void 0:e.label,onClick:()=>a(null==e?void 0:e.value),showTooltip:i},i?"":null==e?void 0:e.label)))))}},5225:function(e,t,l){l.r(t),l.d(t,{addBlockId:function(){return g},addGlobalDefaults:function(){return d},blockInit:function(){return w},copyScriptAssetToIframe:function(){return x},getDefaultValue:function(){return u},getDefaultValueByField:function(){return b},getEditorIframe:function(){return E},useCSSNode:function(){return C}});var o,a,n=l(4586),r=l(2819),i=l(9818),s=l(820),c=l(9307);null!==(a=(o=window.themeisleGutenberg).blockIDs)&&void 0!==a||(o.blockIDs=[]);const d=(e,t,l,o)=>{var a;if(void 0!==(null===(a=window.themeisleGutenberg)||void 0===a?void 0:a.globalDefaults)&&!(0,r.isEqual)(s.Z[l],window.themeisleGutenberg.globalDefaults[l])){const a={...window.themeisleGutenberg.globalDefaults[l]};t({...Object.keys(a).filter((t=>{var l;return(0,r.isEqual)(e[t],null===(l=o[t])||void 0===l?void 0:l.default)})).reduce(((e,t)=>(e[t]=a[t],e)),{})})}},u=(e,t,l)=>{var o,a;const n=null===(o=window.themeisleGutenberg.globalDefaults)||void 0===o?void 0:o[e];return null!=n&&n[t]?null==n?void 0:n[t]:null===(a=l[t])||void 0===a?void 0:a.default},b=e=>{var t;let{name:l,field:o,defaultAttributes:a,attributes:n}=e;return null!==(t=n.isSynced)&&void 0!==t&&t.includes(o)?u(l,o,a):n[o]},m={},p={},g=e=>{var t,l,o;const{attributes:a,setAttributes:r,clientId:i,idPrefix:s,name:c,defaultAttributes:u}=e;p[i]="busy";const b=null!==(t=null===(l=window.themeisleGutenberg)||void 0===l?void 0:l.blockIDs)&&void 0!==t?t:[];if(void 0===a||void 0===r)return e=>{var t;null===(t=m[c])||void 0===t||t.delete(e)};null!==(o=m[c])&&void 0!==o||(m[c]=new Set);const g=Boolean(a.id&&m[c].has(a.id));if(void 0===a.id||g){const e=s||(e=>`wp-block-${e.replace("/","-")}-`)(c),t=((e,t,l)=>{const o=`${e}${t.slice(0,8)}`;if(l.has(o)){let t=`${e}${(0,n.Z)().slice(0,8)}`;for(;l.has(t);)t=`${e}${(0,n.Z)().slice(0,8)}`;return t}return o})(e,i,m[c]);return void 0===a.id?(d(a,r,c,u),m[c].add(t),b.push(t),r({id:t})):g&&(m[c].add(t),r({id:t})),e=>{m[c].delete(t||e)}}return m[c].add(a.id),b.push(a.id),e=>{p[i]="free",m[c].delete((null==a?void 0:a.id)||e)}},{getBlock:h}=(0,i.select)("core/block-editor"),{getBlockParents:v}=(0,i.select)("core/block-editor"),{updateBlockAttributes:y}=(0,i.dispatch)("core/block-editor"),{getSelectedBlockClientId:k}=(0,i.select)("core/block-editor"),f=e=>t=>{y(e,t)},_=e=>{const t=h(e);return{attributes:null==t?void 0:t.attributes,name:null==t?void 0:t.name}},w=(e,t)=>(void 0===p[e]&&(p[e]="free"),"busy"===p[e]||(e=>{var t;return null===(t=v(e))||void 0===t?void 0:t.some((e=>{var t;const{attributes:l,name:o}=null!==(t=h(e))&&void 0!==t?t:{};return"core/query"===o||(null==l?void 0:l.ref)}))})(e)&&k()!==e?()=>{}:g({clientId:e,defaultAttributes:t,setAttributes:f(e),..._(e)})),C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,l]=(0,c.useState)({css:[],media:[]}),[o,a]=(0,c.useState)({node:null,cssNodeName:""}),i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];l({css:e,media:t})};return(0,c.useEffect)((()=>{var t;let l;const o=document.createElement("style");return o.type="text/css",o.setAttribute("data-generator","otter-blocks"),setTimeout((()=>{var e,t;l=(null===(e=parent.document.querySelector('iframe[name="editor-canvas"]'))||void 0===e?void 0:e.contentWindow.document.head)||document.head,null===(t=l)||void 0===t||t.appendChild(o)}),500),a({node:o,cssNodeName:null!==(t=null==e?void 0:e.selector)&&void 0!==t?t:`o-node-${(0,n.Z)()}`}),()=>{var e;null===(e=l)||void 0===e||e.removeChild(o)}}),[]),(0,c.useEffect)((()=>{if(o.node&&o.cssNodeName&&void 0!==t.media){const e=(0,r.zip)(t.css,t.media).map((e=>{const[t,l]=e;return l?`${l} { \n\t .${o.cssNodeName} ${t} }`:`.${o.cssNodeName} ${t}`})).join("\n")||"";o.node.textContent=e}}),[t.css,t.media,o.node,o.cssNodeName]),[o.cssNodeName,i,a]},E=()=>document.querySelector('iframe[name^="editor-canvas"]'),x=(e,t)=>{var l;const o=E();var a;if(null!==(l=t)&&void 0!==l||(t=()=>{}),Boolean(o))if(Boolean(null==o||null===(a=o.contentWindow)||void 0===a?void 0:a.document.querySelector(e))){var n;null===(n=t)||void 0===n||n()}else{var r;const l=document.querySelector(e);if(!Boolean(l))return void console.warn(`Selector: ${e} is invalid.`);const a=o.contentWindow.document.createElement("script");a.onload=t,a.id=l.id,a.type="text/javascript",null===(r=o.contentWindow.document)||void 0===r||r.head.appendChild(a),a.src=l.src}}},2154:function(e,t,l){var o=l(2819);const{getEditorIframe:a}=l(5225),n=new class{constructor(){this.fonts=[],this.status="none",this.controller=new AbortController,this.request=null,this.node=document.createElement("style"),this.node.type="text/css",this.node.setAttribute("data-generator","otter-blocks-fonts-loader"),this.isAttaching=!1,this.usedFonts=[]}async afterLoading(){return await this.requestFonts(),this}getFont(e){return this.fonts.find((t=>t.family===e))}getVariants(e){const t=this.getFont(e);return t?t.variants.filter((e=>!1===e.includes("italic"))).map((e=>({label:(0,o.startCase)((0,o.toLower)(e)),value:e}))):[]}async loadFontToBrowser(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"regular";if(!e)return Error("Empty font name.");"none"!==this.status&&"loading"!==this.status||await this.afterLoading();const l=this.getFont(e);return l?(this.usedFonts.find((l=>l.font.family===e&&l.variant===t))||(this.usedFonts.push({font:l,variant:t}),this.updateCSSNode()),l):Error("Font does not exists.")}async requestFonts(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"done"===this.status?this.fonts:("none"===this.status&&(this.status="loading",this.request=new Promise((async(t,l)=>{"done"!==this.status||e||t(this.fonts),e&&this.controller.abort(),fetch("https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyClGdkPJ1BvgLOol5JAkQY4Mv2lkLYu00k",{signal:this.controller.signal}).then((e=>e.json())).then((e=>{this.fonts=e.items,this.status="done",t(this.fonts)})).catch((e=>{this.status="error",l(e)}))}))),this.request)}updateCSSNode(){this.node.innerHTML=this.renderCSSFont()}attach(){this.isAttaching||(this.isAttaching=!0,setTimeout((()=>{var e,t,l;const o=null!==(e=null===(t=a())||void 0===t||null===(l=t.contentWindow)||void 0===l?void 0:l.document)&&void 0!==e?e:document;var n;null!=o&&o.querySelector('[data-generator*="otter-blocks-fonts-loader"]')||null==o||null===(n=o.head)||void 0===n||n.appendChild(this.node),this.isAttaching=!1}),500))}renderCSSFont(){return Array.from(this.usedFonts).map((e=>{var t,l,o,a;let{font:n,variant:r}=e;const i=null===(t=null!==(l=null===(o=n.files)||void 0===o?void 0:o[r])&&void 0!==l?l:null===(a=n.files)||void 0===a?void 0:a.regular)||void 0===t?void 0:t.replace("http://","https://");return`\n\t\t\t\t@font-face {\n\t\t\t\t\tfont-family: "${n.family}";\n\t\t\t\t\tsrc: url('${i}'); /* IE9 Compat Modes */\n\t\t\t\t\tsrc: url('${i}') format('truetype'), /* Safari, Android, iOS */\n\t\t\t\t}\n\t\t\t`})).join("\n")}};Object.seal(n),t.Z=n},4715:function(e,t,l){l.d(t,{CJ:function(){return m},Dv:function(){return E},EP:function(){return b},FH:function(){return p},GM:function(){return T},Jc:function(){return k},L4:function(){return z},R3:function(){return c},S3:function(){return u},Uo:function(){return i},Vg:function(){return v},Wi:function(){return S},Yj:function(){return g},_Z:function(){return y},__:function(){return d},_c:function(){return M},bv:function(){return w},cg:function(){return C},iC:function(){return P},nG:function(){return f},nT:function(){return L},p6:function(){return s},rW:function(){return _},tB:function(){return B},um:function(){return R},yg:function(){return F}});var o=l(2819),a=l(5736),n=l(9771);const r=["wp_template","wp_template_part","wp_navigation","nav_menu_item","wp_block","attachment","sfwd-certificates","e-landing-page","piotnetforms-book","piotnetforms","piotnetforms-data","jet-menu","jet-popup","adsforwp-groups","pgc_simply_gallery","editor-story","pafe-form-booking","sfwd-assignment","sfwd-essays","pafe-formabandonment","frm_display","sfwd-transactions","jet-engine","jet-theme-core","reply","jet_options_preset","tutor_assignments","brizy_template","jet-smart-filters","pafe-fonts","pafe-form-database","ct_content_block","adsforwp","iamport_payment","tribe_events","mec_esb","elementor_library","testimonial","zion_template","popup","jet-engine-booking","tutor_quiz","piotnetforms-aban","forum","topic","sfwd-quiz","mec-events","jet-woo-builder","neve_custom_layouts","feedzy_imports","neve_cart_notices","visualizer"],i=e=>{const t=document.createElement("div");return t.innerHTML=e,void 0!==t.innerText?t.innerText:t.textContent},s=e=>{const t=(e=new Date(e)).getDate(),l=e.getMonth(),o=e.getFullYear();return t+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][l]+", "+o},c=async()=>{const e=window.themeisleGutenberg.postTypes;if(e){const t=Object.keys(e);return(0,o.without)(t,...r)}},d=e=>{if("string"==typeof e||e instanceof String)return e[0].toUpperCase()+e.slice(1);throw"The parameter must be a string."},u=(e,t)=>{const l=[];return null==e||e.forEach(((o,a)=>{l.push(o),a<e.length-1&&l.push(t)})),l},b=()=>{const e=60*(0,n.__experimentalGetSettings)().timezone.offset,t=0>e?"-":"+",l=Math.abs(e);return(0,a.sprintf)("%s%02d:%02d",t,l/60,l%60)},m=e=>!Object.keys(e).some((t=>null!==e[t])),p=e=>Object.values(e).every((e=>void 0===e)),g=e=>((e,t)=>(0,o.isNumber)(e)?e+t:e)(e,"px"),h={top:"flex-start",left:"flex-start",center:"center",bottom:"flex-end",right:"flex-end"},v=e=>h[e],y=e=>{-1<e.indexOf("?")&&(e=e.split("?")[1]);const t=e.split("&"),l={};return t.forEach((function(e){""!==(e=e.split("="))[0]&&(l[e[0]]=decodeURIComponent(e[1]||""))})),l},k=e=>Object.keys(e).map((t=>t+"="+e[t])).join("&"),f=e=>{var t,l;const o=null==e||null===(t=e.filter((e=>null==e?void 0:e[0])))||void 0===t?void 0:t[0];return null!==(l=null==o?void 0:o[1])&&void 0!==l?l:null==o?void 0:o[0]},_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(e||(e="#000000"),"#"!==e[0])return e;const[l,o,a]=e.match(/\w\w/g).map((e=>parseInt(e,16)));return`rgba(${l},${o},${a},${t/100})`},w=function(){var e,t,l,o,a,n,r,i;let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${null!==(e=null!==(t=null==s?void 0:s.top)&&void 0!==t?t:null==c?void 0:c.top)&&void 0!==e?e:"0px"} ${null!==(l=null!==(o=null==s?void 0:s.right)&&void 0!==o?o:null==c?void 0:c.right)&&void 0!==l?l:"0px"} ${null!==(a=null!==(n=null==s?void 0:s.bottom)&&void 0!==n?n:null==c?void 0:c.bottom)&&void 0!==a?a:"0px"} ${null!==(r=null!==(i=null==s?void 0:s.left)&&void 0!==i?i:null==c?void 0:c.left)&&void 0!==r?r:"0px"}`},C=(e,t)=>{if(void 0===t||(0,o.isEmpty)(t))return e;const l=(0,o.omitBy)(e,((e,l)=>e===(null==t?void 0:t[l])));return(0,o.isEmpty)(l)?void 0:l},E=(e,t)=>(0,o.merge)({left:"0px",right:"0px",bottom:"0px",top:"0px"},t,e),x={Desktop:0,Tablet:1,Mobile:2},S=(e,t)=>{const l=new URL(e);return l.searchParams.set("utm_campaign",t),l.toString()},T=(e,t)=>function(l,a){var n,r,i;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const c=null===(n=a[null!==(r=x[t])&&void 0!==r?r:0])||void 0===n?void 0:n.split(".")[0],d={[c]:{...s}};(0,o.set)(d,a[null!==(i=x[t])&&void 0!==i?i:0],l),e("object"==typeof d[c]&&(0,o.isEmpty)(d[c])?{[c]:void 0}:d)},M=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Desktop",l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return o=>{var a,n;return!l||null!=o&&o[x[e]]||e===t?null!==(a=null==o?void 0:o[x[e]])&&void 0!==a?a:null==o?void 0:o[x[t]]:null!==(n=null==o?void 0:o[x[e]-1])&&void 0!==n?n:null==o?void 0:o[x[e]-2]}},B=(e,t)=>{var l;const o=(null==t?void 0:t.split(" "))||[],a=e.map((e=>e.value)),n=(null===(l=e.find((e=>e.isDefault)))||void 0===l?void 0:l.value)||"";for(const e of o){if(-1===e.indexOf("is-style-"))continue;const t=e.substring(9);if(-1<a.indexOf(t))return t}return n},z=(e,t,l)=>{var o;const a=(null==e?void 0:e.split(" "))||[],n=B(t,e),r=(null===(o=t.find((e=>e.isDefault)))||void 0===o?void 0:o.value)||"";return n&&-1<a.indexOf(`is-style-${n}`)&&a.splice(a.indexOf(`is-style-${n}`),1),l&&l!==r&&a.push(`is-style-${l}`),a.join(" ")},P=e=>{var t,l;return`{\n${null!==(t=null==e||null===(l=e.map((e=>function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null==t||void 0!==l&&!("function"==typeof l?l(t):l)?void 0:`${e}: ${t};`}(null==e?void 0:e[0],null==e?void 0:e[1],null==e?void 0:e[2]))))||void 0===l?void 0:l.join("\n"))&&void 0!==t?t:""} \n}`},L=e=>(0,o.isString)(e)?{top:e,bottom:e,right:e,left:e}:e,R=e=>{if(void 0===e)return;const t=(0,o.isString)(e)?E(L(e)):E(e);return`${t.top} ${t.right} ${t.bottom} ${t.left}`},F=e=>(e=>{if(!(0,o.isObjectLike)(e))return e;for(const t in e)(0,o.isObjectLike)(e[t])&&(e[t]=F(e[t])),(0,o.isNil)(e[t])&&delete e[t];return(0,o.isEmpty)(e)?void 0:e})((0,o.cloneDeep)(e))},340:function(e,t,l){l.r(t),l.d(t,{StarFilled:function(){return T},StarHalf:function(){return M},alignBottom:function(){return U},alignCenter:function(){return q},alignTop:function(){return J},authorIcon:function(){return d},barcodeIcon:function(){return x},buttonsIcon:function(){return u},check:function(){return B},checkIcon:function(){return S},close:function(){return z},cols112:function(){return H},cols12:function(){return R},cols121:function(){return N},cols131:function(){return V},cols21:function(){return F},cols211:function(){return O},cols2Equal:function(){return L},cols2Grid:function(){return Z},cols3Equal:function(){return A},cols3Grid:function(){return j},cols4Equal:function(){return I},cols5Equal:function(){return D},cols6Equal:function(){return W},colsCollapsed:function(){return G},colsFull:function(){return P},columnIcon:function(){return g},columnsIcon:function(){return p},contactIcon:function(){return b},faIcon:function(){return v},headingIcon:function(){return h},inputIcon:function(){return m},mapIcon:function(){return k},otterIcon:function(){return s},otterIconColored:function(){return c},pluginsIcon:function(){return _},postsIcon:function(){return f},pricingIcon:function(){return C},rowsCollapsed:function(){return $},servicesIcon:function(){return w},sharingIcon:function(){return y},testimonialsIcon:function(){return E}});var o=l(7462),a=l(9307),n=l(4184),r=l.n(n),i=l(444);const s=e=>{let{className:t}=e;return(0,a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 32",width:"20",height:"20",className:r()("otter-icon",t)},(0,a.createElement)(i.Path,{d:"M19.831 7.877c0.001-0.003 0.001-0.005 0.001-0.009s-0-0.006-0.001-0.009l0 0c-0.047-0.081-0.092-0.164-0.132-0.247l-0.057-0.115c-0.277-0.498-0.381-0.99-1.033-1.064h-0.045c-0.001 0-0.002 0-0.003 0-0.486 0-0.883 0.382-0.908 0.862l-0 0.002c0.674 0.126 1.252 0.278 1.813 0.468l-0.092-0.027 0.283 0.096 0.147 0.053s0.028 0 0.028-0.011z"}),(0,a.createElement)(i.Path,{d:"M23.982 13.574c-0.008-2.41-0.14-4.778-0.39-7.112l0.026 0.299 0.070-0.019c0.459-0.139 0.787-0.558 0.787-1.053 0-0.479-0.307-0.887-0.735-1.037l-0.008-0.002h-0.026c-0.479-0.164-0.874-0.468-1.149-0.861l-0.005-0.007c-2.7-3.96-8.252-3.781-8.252-3.781s-5.55-0.179-8.25 3.781c-0.28 0.401-0.676 0.704-1.14 0.862l-0.016 0.005c-0.441 0.148-0.754 0.557-0.754 1.040 0 0.009 0 0.017 0 0.026l-0-0.001c-0 0.010-0.001 0.022-0.001 0.034 0 0.493 0.335 0.907 0.789 1.029l0.007 0.002 0.045 0.011c-0.224 2.034-0.356 4.403-0.364 6.801l-0 0.012s-9.493 13.012-1.277 17.515c4.733 2.431 6.881-0.769 6.881-0.769s1.397-1.661-1.784-3.355v-4.609c0.006-0.344 0.282-0.621 0.625-0.628h1.212v-0.59c0-0.275 0.223-0.498 0.498-0.498v0h1.665c0.274 0.001 0.496 0.224 0.496 0.498 0 0 0 0 0 0v0 0.59h2.721v-0.59c0-0.275 0.223-0.498 0.498-0.498v0h1.665c0.271 0.005 0.49 0.226 0.49 0.498 0 0 0 0 0 0v0 0.59h1.209c0 0 0 0 0 0 0.349 0 0.633 0.28 0.639 0.627v4.584c-3.193 1.703-1.784 3.355-1.784 3.355s2.148 3.193 6.879 0.769c8.222-4.503-1.269-17.515-1.269-17.515zM22.586 10.261c-0.097 1.461-0.67 2.772-1.563 3.797l0.007-0.008c-1.703 2.010-4.407 3.249-6.721 4.432v0c-2.325-1.177-5.026-2.416-6.736-4.432-0.883-1.019-1.455-2.329-1.555-3.769l-0.001-0.020c-0.126-2.22 0.583-5.929 3.044-6.74 2.416-0.788 3.947 1.288 4.494 2.227 0.152 0.258 0.429 0.428 0.745 0.428s0.593-0.17 0.743-0.424l0.002-0.004c0.551-0.932 2.080-3.008 4.494-2.22 2.474 0.805 3.174 4.513 3.046 6.734z"}),(0,a.createElement)(i.Path,{d:"M19.463 10.087h-0.028c-0.192 0.026-0.121 0.251-0.047 0.356 0.254 0.349 0.407 0.787 0.407 1.26 0 0.006-0 0.012-0 0.018v-0.001c-0.001 0.469-0.255 0.878-0.633 1.1l-0.006 0.003c-0.739 0.426-1.377-0.145-2.054-0.398-0.72-0.269-1.552-0.434-2.42-0.455l-0.009-0v-1.033c1.020-0.233 1.894-0.76 2.551-1.486l0.004-0.004c0.151-0.163 0.244-0.383 0.244-0.623 0-0.316-0.159-0.595-0.402-0.76l-0.003-0.002c-0.768-0.551-1.728-0.881-2.764-0.881-1.054 0-2.029 0.341-2.819 0.92l0.013-0.009c-0.224 0.166-0.367 0.429-0.367 0.726 0 0.226 0.083 0.433 0.221 0.591l-0.001-0.001c0.665 0.751 1.55 1.295 2.553 1.53l0.033 0.007v1.050c-0.742 0.021-1.448 0.14-2.118 0.343l0.057-0.015c-0.341 0.103-0.631 0.219-0.908 0.358l0.033-0.015c-0.519 0.26-1.037 0.436-1.58 0.121-0.371-0.213-0.617-0.607-0.617-1.058 0-0.002 0-0.004 0-0.007v0c0-0.002 0-0.004 0-0.007 0-0.47 0.153-0.905 0.411-1.257l-0.004 0.006c0.047-0.068 0.089-0.17 0.026-0.241s-0.189 0-0.27 0.030c-0.189 0.099-0.348 0.227-0.479 0.381l-0.002 0.002c-0.245 0.296-0.394 0.679-0.394 1.097 0 0.004 0 0.007 0 0.011v-0.001c0.008 0.706 0.393 1.321 0.964 1.651l0.009 0.005c0.296 0.178 0.654 0.283 1.036 0.283 0.364 0 0.706-0.095 1.001-0.263l-0.010 0.005c0.877-0.461 1.917-0.731 3.019-0.731 0.069 0 0.137 0.001 0.206 0.003l-0.010-0h0.030c1.277 0 2.382 0.266 3.266 0.775 0.27 0.159 0.594 0.253 0.94 0.253 0.001 0 0.002 0 0.003 0h-0c0.355-0.002 0.688-0.098 0.974-0.265l-0.009 0.005c0.606-0.357 1.007-1.007 1.007-1.75 0-0.001 0-0.003 0-0.004v0c0.001-0.026 0.002-0.056 0.002-0.086 0-0.625-0.34-1.171-0.846-1.462l-0.008-0.004c-0.056-0.040-0.125-0.065-0.199-0.070l-0.001-0zM13.101 8.831c-0.238 0.213-0.468 0.581-0.832 0.345-0.061-0.041-0.114-0.086-0.161-0.136l-0-0c-0.063-0.063-0.101-0.15-0.101-0.247 0-0.133 0.074-0.248 0.182-0.308l0.002-0.001c0.594-0.309 1.203-0.543 1.884-0.49-0.324 0.281-0.649 0.56-0.973 0.837z"}),(0,a.createElement)(i.Path,{d:"M15.89 13.578c-0.367 0.483-0.941 0.792-1.588 0.792s-1.221-0.309-1.585-0.787l-0.004-0.005c-0.064-0.103-0.177-0.171-0.306-0.171-0.199 0-0.36 0.161-0.36 0.36 0 0.091 0.034 0.174 0.090 0.238l-0-0c0.499 0.659 1.283 1.080 2.164 1.080s1.665-0.421 2.159-1.073l0.005-0.007c0.043-0.059 0.068-0.132 0.068-0.212 0-0.116-0.055-0.22-0.14-0.286l-0.001-0.001c-0.059-0.045-0.134-0.072-0.215-0.072-0.117 0-0.221 0.056-0.286 0.143l-0.001 0.001z"}),(0,a.createElement)(i.Path,{d:"M18.507 11.707c0 0.194-0.157 0.351-0.351 0.351s-0.351-0.157-0.351-0.351c0-0.194 0.157-0.351 0.351-0.351s0.351 0.157 0.351 0.351z"}),(0,a.createElement)(i.Path,{d:"M17.389 11.049c0 0.194-0.157 0.351-0.351 0.351s-0.351-0.157-0.351-0.351c0-0.194 0.157-0.351 0.351-0.351s0.351 0.157 0.351 0.351z"}),(0,a.createElement)(i.Path,{d:"M10.798 11.707c0 0.194-0.157 0.351-0.351 0.351s-0.351-0.157-0.351-0.351c0-0.194 0.157-0.351 0.351-0.351s0.351 0.157 0.351 0.351z"}),(0,a.createElement)(i.Path,{d:"M11.918 11.049c0 0.194-0.157 0.351-0.351 0.351s-0.351-0.157-0.351-0.351c0-0.194 0.157-0.351 0.351-0.351s0.351 0.157 0.351 0.351z"}),(0,a.createElement)(i.Path,{d:"M8.773 7.877c-0.001-0.003-0.002-0.005-0.002-0.009s0.001-0.006 0.002-0.009l-0 0c0.047-0.081 0.089-0.164 0.132-0.247 0.019-0.038 0.036-0.079 0.057-0.115 0.275-0.498 0.379-0.99 1.033-1.064h0.045c0 0 0.001 0 0.001 0 0.487 0 0.884 0.382 0.91 0.862l0 0.002c-0.678 0.124-1.261 0.277-1.827 0.468l0.092-0.027-0.275 0.096-0.1 0.036-0.045 0.017s-0.023 0-0.023-0.011z"}))},c=e=>{let{className:t}=e;return(0,a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:r()("otter-icon",t)},(0,a.createElement)(i.G,null,(0,a.createElement)(i.Path,{d:"M19.9877 9.42008C19.6369 9.61724 19.3785 10.0999 19.1922 10.38C19.3704 10.3719 19.6396 10.38 19.9061 10.3474C19.5651 12.7604 18.4405 14.9944 16.7053 16.7054C15.6732 17.7477 14.448 18.5791 13.098 19.1529C10.5336 20.2407 7.70811 20.2883 5.31094 19.2576C4.29167 18.8247 3.36554 18.1991 2.58336 17.4152C1.21259 16.0355 0.334714 14.2424 0.0855683 12.3136C0.478525 12.149 0.765424 11.6092 0.961223 11.3101C0.642655 11.3103 0.324535 11.334 0.00942443 11.3808C-0.100712 8.55259 1.00745 5.57482 3.29177 3.29186C6.55508 0.0285557 11.2379 -0.836221 14.8779 0.823987C14.7269 1.02115 14.6059 1.2319 14.4999 1.38827C14.7936 1.37195 15.3157 1.39643 15.6978 1.2523C16.0056 1.43293 16.3009 1.63418 16.5816 1.85465C16.515 1.95935 16.4456 2.05589 16.398 2.13747C16.534 2.13747 16.7135 2.13747 16.9106 2.12115C17.0833 2.26664 17.2533 2.42301 17.4151 2.58481C19.248 4.41906 20.0978 6.89102 19.9877 9.42008Z",fill:"#E8D3C9"}),(0,a.createElement)(i.Path,{d:"M4.32515 5.25665C3.92192 6.11059 3.77512 7.06318 3.90255 7.99889C4.02998 8.93461 4.42617 9.81325 5.04307 10.5283C5.78956 11.3645 6.80118 11.907 7.79105 12.4318C8.1473 12.6208 8.51714 12.8153 8.92097 12.8506C9.44718 12.8969 9.95843 12.6671 10.4167 12.406C11.5996 11.7357 12.6615 10.8016 13.3047 9.60365C13.9478 8.40574 14.1314 6.92774 13.6174 5.66864C13.3523 5.04048 12.9456 4.48207 12.429 4.03699C11.486 3.2291 10.2823 2.79004 9.04063 2.80101C8.43429 2.81396 7.83536 2.93698 7.273 3.16406C6.72912 3.36529 6.19611 3.39385 5.69166 3.70794C5.10339 4.08984 4.63083 4.62542 4.32515 5.25665Z",fill:"#D6AF99"}),(0,a.createElement)(i.Path,{d:"M13.1008 19.1488C12.6689 19.3318 12.2256 19.4867 11.7738 19.6125C11.5236 19.6832 11.2707 19.7485 11.0137 19.7933C10.9838 19.7933 10.9579 19.8042 10.928 19.8124C10.9172 19.811 10.9062 19.811 10.8954 19.8124C10.0118 19.9817 9.10938 20.0306 8.21268 19.9578C7.92865 19.9366 7.64591 19.9008 7.36558 19.8504C7.31397 19.8449 7.26269 19.8368 7.21193 19.826H7.19561L7.07732 19.8015C6.83665 19.7525 6.60006 19.6941 6.36483 19.6261C6.00688 19.5234 5.65582 19.398 5.31377 19.2508C5.24487 18.9778 5.20971 18.6975 5.20907 18.4159C5.15469 17.2072 5.10302 16.0024 5.05271 14.7937C5.01716 14.4481 5.04154 14.0989 5.12477 13.7616C5.18474 13.5696 5.28262 13.3916 5.41263 13.238C5.54264 13.0845 5.70213 12.9587 5.88165 12.8679C6.06118 12.7771 6.2571 12.7233 6.4578 12.7096C6.65851 12.6959 6.85992 12.7226 7.05012 12.7881C8.63555 12.5297 10.2726 12.2809 11.8336 12.6521C12.1926 12.7378 12.5692 12.8751 12.7772 13.181C12.9472 13.434 12.9689 13.7521 12.988 14.0567C13.0605 15.3104 13.133 16.5649 13.2055 17.8204C13.2327 18.2759 13.2545 18.7368 13.1008 19.1488Z",fill:"#F4816B"}),(0,a.createElement)(i.Path,{d:"M12.6452 8.15827C12.7187 7.47841 12.0361 6.85431 11.3535 6.93453C11.1316 6.97029 10.9165 7.04 10.7158 7.14121C10.5294 7.21597 10.3327 7.26182 10.1325 7.27718C9.81839 7.34244 9.5179 7.47841 9.2038 7.49745C8.93186 7.52056 8.57698 7.5532 8.31183 7.46346L7.57351 7.21599L7.40218 7.15344C7.2061 7.06715 6.99944 7.00725 6.7876 6.97532C6.01528 6.89782 5.30551 7.71228 5.5489 8.471C5.79229 9.22972 6.72777 9.36841 7.39403 9.18621C7.67413 9.11007 7.93791 8.99313 8.22345 8.92651C8.711 8.83154 9.21264 8.83523 9.69874 8.93739C10.1869 9.02169 10.6669 9.1495 11.1577 9.20933C11.7981 9.29363 12.4916 8.91563 12.6289 8.24801C12.6344 8.22082 12.6452 8.1909 12.6452 8.15827Z",fill:"#E8D3C9"}),(0,a.createElement)(i.Path,{d:"M8.21258 15.6802V19.966C7.92855 19.9448 7.64581 19.9089 7.36548 19.8586V15.6802C7.3657 15.5064 7.40363 15.3347 7.47663 15.1769C7.54964 15.0192 7.65599 14.8791 7.78835 14.7665C7.9211 14.8789 8.0278 15.0189 8.10106 15.1766C8.17432 15.3344 8.21237 15.5062 8.21258 15.6802Z",fill:"#D87768"}),(0,a.createElement)(i.Path,{d:"M11.7737 17.3839V19.6152C11.5235 19.6859 11.2706 19.7512 11.0136 19.7961C10.9837 19.7961 10.9579 19.8069 10.928 19.8151V17.3839C10.9282 16.9735 11.0787 16.5774 11.3508 16.2703C11.6236 16.5771 11.7741 16.9734 11.7737 17.3839Z",fill:"#F5
|
1 |
+
!function(){"use strict";var e,t={5568:function(e,t,l){var o=l(5736),a=l(4981),n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/about-author","title":"About Author","category":"themeisle-blocks","description":"About Author block is the easiest way to add a author bio below your posts. Powered by Otter.","keywords":["about","author","profile"],"textdomain":"otter-blocks","supports":{"html":false},"editorStyle":"otter-about-author-editor","style":"otter-about-author-style"}'),r=l(340),i=l(9307),s=l(2175),c=l(5609),d=window.wp.serverSideRender,u=l.n(d);const{name:b}=n;(0,a.registerBlockType)(b,{...n,title:(0,o.__)("About Author","otter-blocks"),description:(0,o.__)("About Author block is the easiest way to add a author bio below your posts. Powered by Otter.","otter-blocks"),icon:r.authorIcon,keywords:["about","author","profile"],edit:()=>(0,i.createElement)("div",(0,s.useBlockProps)(),(0,i.createElement)(c.Disabled,null,(0,i.createElement)(u(),{block:"themeisle-blocks/about-author"}))),save:()=>null,supports:{inserter:Boolean(window.themeisleGutenberg.isLegacyPre59),html:!1},example:{}});var m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/accordion","title":"Accordion","category":"themeisle-blocks","description":"Vertically collapsing accordions perfect for displaying your FAQs. Powered by Otter.","keywords":["accordions","collapse","faq"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"FAQSchema":{"type":"boolean"},"gap":{"type":["string","number"]},"titleColor":{"type":"string"},"titleBackground":{"type":"string"},"contentBackground":{"type":"string"},"borderColor":{"type":"string"},"borderWidth":{"type":"string"},"isSynced":{"type":"array"},"fontFamily":{"type":"string"},"fontVariant":{"type":"string"},"fontStyle":{"type":"string"},"textTransform":{"type":"string"},"fontSize":{"type":"number"},"letterSpacing":{"type":"string"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"tag":{"type":"string"},"alwaysOpen":{"type":"boolean"},"boxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"iconFirst":{"type":"boolean","default":false},"activeTitleColor":{"type":"string"},"activeTitleBackground":{"type":"string"},"activeContentBackground":{"type":"string"},"icon":{"type":"object"},"openItemIcon":{"type":"object"}},"supports":{"html":false},"editorStyle":"otter-accordion-editor","style":"otter-accordion-style","script":"otter-accordion"}'),p=l(4184),g=l.n(p),h=l(2154),v=l(9818),y=l(9977),k=l(8675),f=l(3075),_=l(1070),w=l(7638),C=l(3532),E=l(2645),x=l(4715);const S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};return(0,v.useSelect)((t=>{const{getView:l}=t("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:o}=!!t("core/edit-post")&&t("core/edit-post"),a=o?o():l();return{responsiveSetAttributes:(0,x.GM)(e,a),responsiveGetAttributes:(0,x._c)(a)}}),[])};var T=l(817),M=l(6993);const B=[{label:(0,o.__)("Default","otter-blocks"),value:"default",isDefault:!0},{label:(0,o.__)("Boxed","otter-blocks"),value:"boxed"}],z={narrow:5,wide:10,wider:20};var P=e=>{var t,l,a,n;let{clientId:r,attributes:d,setAttributes:u,getValue:b}=e;const[m,p]=(0,i.useState)("settings"),g=[{label:(0,o.__)("Title","otter-blocks"),slug:"titleColor",value:b("titleColor")},{label:(0,o.__)("Active Tab Title","otter-blocks"),slug:"activeTitleColor",value:b("activeTitleColor")},{label:(0,o.__)("Title Background","otter-blocks"),slug:"titleBackground",value:b("titleBackground")},{label:(0,o.__)("Active Tab Title Background","otter-blocks"),slug:"activeTitleBackground",value:b("activeTitleBackground")},{label:(0,o.__)("Content Background","otter-blocks"),slug:"contentBackground",value:b("contentBackground")},{label:(0,o.__)("Border","otter-blocks"),slug:"borderColor",value:b("borderColor")}],{responsiveSetAttributes:h,responsiveGetAttributes:P}=S(u);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:m,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:p}),"settings"===m&&(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Place Icon on Left","otter-blocks"),checked:d.iconFirst,onChange:e=>u({iconFirst:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Keep Multiple Items Expanded","otter-blocks"),help:(0,o.__)("When enabled, multiple accordion items can be expanded at the same time","otter-blocks"),checked:d.alwaysOpen||!1,onChange:e=>{u({alwaysOpen:e}),!0!==e&&(0,v.select)("core/block-editor").getBlocksByClientId(r)[0].innerBlocks.forEach((e=>{(0,v.dispatch)("core/block-editor").updateBlockAttributes(e.clientId,{initialOpen:!1})}))}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Enable FAQ Schema","otter-blocks"),checked:d.FAQSchema||!1,onChange:e=>u({FAQSchema:e})}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Accordion title HTML tag","otter-blocks"),value:d.tag||"div",options:[{label:(0,o.__)("H1","otter-blocks"),value:"h1"},{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"},{label:(0,o.__)("div","otter-blocks"),value:"div"}],onChange:e=>{(0,v.select)("core/block-editor").getBlocksByClientId(r)[0].innerBlocks.forEach((t=>{(0,v.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{tag:e})})),u({tag:e})}})),"style"===m&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks")},(0,i.createElement)(E.Z,{options:B,value:(0,x.tB)(B,null==d?void 0:d.className),onChange:e=>{const t=(0,x.L4)(null==d?void 0:d.className,B,e);u({className:t})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Title Typography","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{value:d.fontSize,fontSizes:[{name:(0,o.__)("Extra Small","otter-blocks"),slug:"extra-small",size:14},{name:(0,o.__)("Small","otter-blocks"),slug:"small",size:16},{name:(0,o.__)("Medium","otter-blocks"),slug:"medium",size:18},{name:(0,o.__)("Large","otter-blocks"),slug:"large",size:24},{name:(0,o.__)("Extra Large","otter-blocks"),slug:"extra-large",size:28}],onChange:e=>u({fontSize:e})}),(0,i.createElement)(y.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:d.fontFamily,onChangeFontFamily:e=>{u(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},valueVariant:d.fontVariant,onChangeFontVariant:e=>u({fontVariant:e}),valueStyle:d.fontStyle,onChangeFontStyle:e=>u({fontStyle:e}),valueTransform:d.textTransform,onChangeTextTransform:e=>u({textTransform:e})}),(0,i.createElement)(k.Z,{values:["fontFamily","fontVariant","fontStyle","textTransform"],setAttributes:u}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:d.letterSpacing,onChange:e=>u({letterSpacing:e}),min:-50,max:100,allowReset:!0})),(0,i.createElement)(T.Z,{label:(0,o.__)("Color","otter-blocks"),isSynced:d.isSynced,options:g,setAttributes:u},(0,i.createElement)(s.ContrastChecker,{textColor:b("titleColor"),backgroundColor:b("titleBackground")}),(0,i.createElement)(s.ContrastChecker,{textColor:b("activeTitleColor"),backgroundColor:b("activeTitleBackground")})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:P([d.padding,d.paddingTablet,d.paddingMobile]),onChange:e=>h(e,["padding","paddingTablet","paddingMobile"])})),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Gap Between Panels","otter-blocks"),value:"string"==typeof d.gap?z[d.gap]:d.gap,onChange:e=>u({gap:e}),allowReset:!0})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Icons","otter-blocks"),initialOpen:!1},(0,i.createElement)(_.Z,{label:(0,o.__)("Closed Item Icon","otter-blocks"),library:"fontawesome",prefix:null===(t=d.icon)||void 0===t?void 0:t.prefix,icon:null===(l=d.icon)||void 0===l?void 0:l.name,allowThemeisleIcons:!1,onChange:e=>u({icon:e})}),(0,i.createElement)(_.Z,{label:(0,o.__)("Open Item Icon","otter-blocks"),library:"fontawesome",prefix:null===(a=d.openItemIcon)||void 0===a?void 0:a.prefix,icon:null===(n=d.openItemIcon)||void 0===n?void 0:n.name,allowThemeisleIcons:!1,onChange:e=>u({openItemIcon:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:d.borderWidth,units:[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"vw",label:"vw"},{value:"vh",label:"vh"}],onChange:e=>u({borderWidth:e})}),(0,i.createElement)(f.Z,{boxShadow:d.boxShadow,onChange:e=>{const t={...d.boxShadow};Object.entries(e).map((function(){let[l,o]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;t[l]=o})),u({boxShadow:t})}}))),(0,i.createElement)(C.p,null))},L=l(5225),R=l(4824);const{attributes:F}=m,O={fas:"Font Awesome 5 Free",far:"Font Awesome 5 Free",fal:"Font Awesome 5 Free",fab:"Font Awesome 5 Brands"};const{name:N}=m;(0,a.registerBlockType)(N,{...m,title:(0,o.__)("Accordion","otter-blocks"),description:(0,o.__)("Vertically collapsing accordions perfect for displaying your FAQs. Powered by Otter.","otter-blocks"),icon:r.buttonsIcon,keywords:["accordions","collapse","faq"],edit:e=>{let{name:t,attributes:l,setAttributes:o,clientId:a,isSelected:n}=e;(0,i.useEffect)((()=>{h.Z.attach();const e=(0,L.blockInit)(a,F);return()=>e(l.id)}),[l.id]);const r=(0,v.useSelect)((e=>e("core/block-editor").getBlocksByClientId(a)[0].innerBlocks));(0,i.useEffect)((()=>{void 0===l.alwaysOpen&&o({alwaysOpen:1<r.filter((e=>!0===e.attributes.initialOpen)).length})}),[]);const c=e=>(0,L.getDefaultValueByField)({name:t,field:e,defaultAttributes:F,attributes:l}),d={"--title-color":c("titleColor"),"--title-background":c("titleBackground"),"--content-background":c("contentBackground"),"--border-color":c("borderColor"),"--border-width":c("borderWidth"),"--box-shadow":l.boxShadow.active&&`${l.boxShadow.horizontal}px ${l.boxShadow.vertical}px ${l.boxShadow.blur}px ${l.boxShadow.spread}px ${(0,x.rW)(l.boxShadow.color,l.boxShadow.colorOpacity)}`,"--padding":(0,x.bv)(l.padding,{top:"18px",right:"24px",bottom:"18px",left:"24px"}),"--padding-tablet":(0,x.bv)(l.paddingTablet,{top:"18px",right:"24px",bottom:"18px",left:"24px"}),"--padding-mobile":(0,x.bv)(l.paddingMobile,{top:"18px",right:"24px",bottom:"18px",left:"24px"}),"--gap":(u=l.gap,u?`${u}px`:u)};var u;const[b,m]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{m([`> * > * > .wp-block-themeisle-blocks-accordion-item .wp-block-themeisle-blocks-accordion-item__title > * {\n\t\t\t\t${l.fontSize?"font-size:"+l.fontSize+"px":""};\n\t\t\t\t${l.fontFamily?"font-family:"+l.fontFamily:""};\n\t\t\t\t${l.fontVariant?"font-variant:"+l.fontVariant:""};\n\t\t\t\t${l.fontStyle?"font-style:"+l.fontStyle:""};\n\t\t\t\t${l.textTransform?"text-transform:"+l.textTransform:""};\n\t\t\t\t${l.letterSpacing?"letter-spacing:"+l.letterSpacing+"px":""};\n\t\t\t}`])}),[l.fontSize,l.fontFamily,l.fontVariant,l.fontStyle,l.textTransform,l.letterSpacing]);const[p,y]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{const e=c("icon"),t=c("openItemIcon");y([...e?[`> * > * > .wp-block-themeisle-blocks-accordion-item:not(.is-open) > .wp-block-themeisle-blocks-accordion-item__title::after {\n\t\t\t\tcontent: "\\${R[e.name].unicode}" !important;\n\t\t\t\tfont-family: "${O[e.prefix]}" !important;\n\t\t\t\tfont-weight: ${"fas"!==e.prefix?"400":"900"}\n\t\t\t}`]:[],...t?[`> * > * > .wp-block-themeisle-blocks-accordion-item.is-open > .wp-block-themeisle-blocks-accordion-item__title::after {\n\t\t\t\tcontent: "\\${R[t.name].unicode}" !important;\n\t\t\t\tfont-family: "${O[t.prefix]}" !important;\n\t\t\t\tfont-weight: ${"fas"!==t.prefix?"400":"900"}\n\t\t\t}`]:[]])}),[l.icon,l.openItemIcon]);const[k,f]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{const e=c("activeTitleColor"),t=c("activeTitleBackground");f([...e?[`> * > * > .wp-block-themeisle-blocks-accordion-item.is-open > .wp-block-themeisle-blocks-accordion-item__title {\n\t\t\t\t--title-color: ${e};\n\t\t\t}`]:[],...t?[`> * > * > .wp-block-themeisle-blocks-accordion-item.is-open > .wp-block-themeisle-blocks-accordion-item__title {\n\t\t\t\t--title-background: ${t};\n\t\t\t}`]:[]])}),[l.activeTitleColor,l.activeTitleBackground]),(0,i.useEffect)((()=>{l.fontFamily&&h.Z.loadFontToBrowser(l.fontFamily,l.fontVariant)}),[l.fontFamily]);const _=(0,s.useBlockProps)({id:l.id,className:g()({[p]:p,[k]:k,[b]:b,[`is-${l.gap}-gap`]:"string"==typeof l.gap,"no-gap":0===l.gap,"has-gap":"string"!=typeof l.gap&&0<l.gap,"icon-first":l.iconFirst,"has-icon":!!l.icon,"has-open-icon":!!l.openItemIcon}),style:d});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(P,{clientId:a,attributes:l,setAttributes:o,getValue:c}),(0,i.createElement)("div",_,(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/accordion-item"],template:[["themeisle-blocks/accordion-item"]],renderAppender:n?s.InnerBlocks.ButtonBlockAppender:""})))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,"data-has-schema":t.FAQSchema,className:g()({exclusive:!1===t.alwaysOpen,[`is-${t.gap}-gap`]:t.gap&&"string"==typeof t.gap,"no-gap":0===t.gap,"has-gap":t.gap&&"string"!=typeof t.gap&&0!==t.gap,"icon-first":t.iconFirst,"has-icon":!!t.icon,"has-open-icon":!!t.openItemIcon})});return(0,i.createElement)("div",l,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"themeisle-blocks/accordion-item",attributes:{initialOpen:!0,title:(0,o.__)("Accordion Item","otter-blocks")},innerBlocks:[{name:"core/paragraph",attributes:{customFontSize:48,content:"Lorem ipsum dolor sit amet, eu liber saperet est. Recusabo volutpat has ne, sed dicit eruditi detraxit ut, modus ancillae mei eu.",align:"left"}}]}]}});var A=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/accordion-item","title":"Accordion Item","category":"themeisle-blocks","description":"Vertically collapsing accordions perfect for displaying your FAQs. Powered by Otter.","keywords":["accordions","collapse","faq"],"parent":["themeisle-blocks/accordion"],"textdomain":"otter-blocks","attributes":{"title":{"type":"string"},"initialOpen":{"type":"boolean","default":false},"tag":{"type":"string"}},"supports":{"reusable":false}}'),H=e=>{let{clientId:t,attributes:l,setAttributes:a}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Initially Open","otter-blocks"),checked:l.initialOpen,onChange:e=>{if(a({initialOpen:e}),!e)return;const l=(0,v.select)("core/block-editor").getBlockParents(t).at(-1),o=(0,v.select)("core/block-editor").getBlock(l);o.attributes.alwaysOpen||o.innerBlocks.forEach((e=>{e.clientId!==t&&(0,v.dispatch)("core/editor").updateBlockAttributes(e.clientId,{initialOpen:!1})}))}})))};const{name:I}=A;(0,a.registerBlockType)(I,{...A,title:(0,o.__)("Accordion Item","otter-blocks"),description:(0,o.__)("Vertically collapsing accordions perfect for displaying your FAQs. Powered by Otter.","otter-blocks"),icon:r.buttonsIcon,keywords:["accordions","collapse","faq"],edit:e=>{let{clientId:t,attributes:l,setAttributes:a}=e;const[n,r]=(0,i.useState)(!0);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(H,{clientId:t,attributes:l,setAttributes:a}),(0,i.createElement)("div",(0,s.useBlockProps)({className:g()({"is-open":n})}),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__title",onClick:e=>{"string"==typeof e.target.className&&e.target.className.includes("block-editor-rich-text__editable")?r(!0):r(!n)}},(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:l.title,onChange:e=>{n||r(!0),a({title:e})},tagName:l.tag||"div"})),n&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__content"},(0,i.createElement)(s.InnerBlocks,{template:[["core/paragraph"]]}))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({open:!!t.initialOpen});return(0,i.createElement)("details",l,(0,i.createElement)("summary",{className:"wp-block-themeisle-blocks-accordion-item__title"},(0,i.createElement)(s.RichText.Content,{tagName:t.tag||"div",value:t.title})),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__content"},(0,i.createElement)(s.InnerBlocks.Content,null)))}});var V=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/advanced-heading","title":"Advanced Heading","category":"themeisle-blocks","description":"Advanced Heading gives a spin to editor\'s Heading block with much needed customization options. Powered by Otter.","keywords":["heading","title","advanced heading"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"content":{"type":"string","source":"html","selector":"h1,h2,h3,h4,h5,h6,div,p,span","default":""},"tag":{"default":"h2","type":"string"},"align":{"type":"string"},"alignTablet":{"type":"string"},"alignMobile":{"type":"string"},"headingColor":{"type":"string"},"highlightColor":{"type":"string"},"highlightBackground":{"type":"string"},"fontSize":{"type":["number","string"]},"fontSizeTablet":{"type":["number","string"]},"fontSizeMobile":{"type":["number","string"]},"fontFamily":{"type":"string"},"fontVariant":{"type":"string"},"fontStyle":{"type":"string"},"textTransform":{"type":"string"},"lineHeight":{"type":["number","string"]},"letterSpacing":{"type":["number","string"]},"textShadow":{"type":"boolean","default":false},"textShadowColor":{"type":"string","default":"#000000"},"textShadowColorOpacity":{"type":"number","default":50},"textShadowBlur":{"type":"number","default":5},"textShadowHorizontal":{"type":"number","default":0},"textShadowVertical":{"type":"number","default":0},"paddingType":{"type":"string"},"paddingTypeTablet":{"type":"string"},"paddingTypeMobile":{"type":"string"},"padding":{"type":["number","object"]},"paddingTablet":{"type":["number","object"]},"paddingMobile":{"type":["number","object"]},"paddingTop":{"type":"number","default":0},"paddingTopTablet":{"type":"number"},"paddingTopMobile":{"type":"number"},"paddingRight":{"type":"number"},"paddingRightTablet":{"type":"number"},"paddingRightMobile":{"type":"number"},"paddingBottom":{"type":"number"},"paddingBottomTablet":{"type":"number"},"paddingBottomMobile":{"type":"number"},"paddingLeft":{"type":"number"},"paddingLeftTablet":{"type":"number"},"paddingLeftMobile":{"type":"number"},"marginType":{"type":"string"},"marginTypeTablet":{"type":"string"},"marginTypeMobile":{"type":"string"},"margin":{"type":["number","object"]},"marginTablet":{"type":["number","object"]},"marginMobile":{"type":["number","object"]},"marginTop":{"type":"number"},"marginTopTablet":{"type":"number"},"marginTopMobile":{"type":"number"},"marginBottom":{"type":"number"},"marginBottomTablet":{"type":"number"},"marginBottomMobile":{"type":"number"},"backgroundColor":{"type":"string"},"linkColor":{"type":"string"},"linkHoverColor":{"type":"string"}},"editorStyle":"otter-advanced-heading-editor","style":"otter-advanced-heading-style"}'),D=l(6713),G=l(2629);const $="themeisle-blocks/highlight";(0,G.registerFormatType)($,{name:$,title:(0,o.__)("Highlight","otter-blocks"),tagName:"span",className:"highlight",edit:e=>{let{isActive:t,value:l,onChange:a}=e;const n=()=>a((0,G.toggleFormat)(l,{type:$}));return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.RichTextShortcut,{type:"primary",character:"h",onUse:n}),(0,i.createElement)(s.RichTextToolbarButton,{icon:D.Z,title:(0,o.__)("Highlight","otter-blocks"),onClick:n,isActive:t,shortcutType:"access",shortcutCharacter:"h"}))}});var W=l(80),Z=l.n(W);const j=[{attributes:{id:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6,div,p,span",default:""},tag:{default:"h2",type:"string"},align:{type:"string"},alignTablet:{type:"string"},alignMobile:{type:"string"},headingColor:{type:"string",default:"#000000"},highlightColor:{type:"string"},highlightBackground:{type:"string"},fontSize:{type:"number"},fontSizeTablet:{type:"number"},fontSizeMobile:{type:"number"},fontFamily:{type:"string"},fontVariant:{type:"string"},fontStyle:{type:"string",default:"normal"},textTransform:{type:"string",default:"none"},lineHeight:{type:"number"},letterSpacing:{type:"number"},textShadow:{type:"boolean",default:!1},textShadowColor:{type:"string",default:"#000000"},textShadowColorOpacity:{type:"number",default:50},textShadowBlur:{type:"number",default:5},textShadowHorizontal:{type:"number",default:0},textShadowVertical:{type:"number",default:0},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:0},paddingTablet:{type:"number",default:0},paddingMobile:{type:"number",default:0},paddingTop:{type:"number",default:0},paddingTopTablet:{type:"number",default:0},paddingTopMobile:{type:"number",default:0},paddingRight:{type:"number",default:0},paddingRightTablet:{type:"number",default:0},paddingRightMobile:{type:"number",default:0},paddingBottom:{type:"number",default:0},paddingBottomTablet:{type:"number",default:0},paddingBottomMobile:{type:"number",default:0},paddingLeft:{type:"number",default:0},paddingLeftTablet:{type:"number",default:0},paddingLeftMobile:{type:"number",default:0},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:0},marginTablet:{type:"number",default:0},marginMobile:{type:"number",default:0},marginTop:{type:"number",default:0},marginTopTablet:{type:"number",default:0},marginTopMobile:{type:"number",default:0},marginBottom:{type:"number",default:25},marginBottomTablet:{type:"number",default:25},marginBottomMobile:{type:"number",default:20}},save:e=>{let t,{attributes:l,className:o}=e;l.textShadow&&(t={textShadow:`${l.textShadowHorizontal}px ${l.textShadowVertical}px ${l.textShadowBlur}px ${Z()(l.textShadowColor?l.textShadowColor:"#000000",l.textShadowColorOpacity)}`});const a={color:l.headingColor,fontFamily:l.fontFamily,fontWeight:"regular"===l.fontVariant?"normal":l.fontVariant,fontStyle:l.fontStyle,textTransform:l.textTransform,lineHeight:l.lineHeight&&`${l.lineHeight}px`,letterSpacing:l.letterSpacing&&`${l.letterSpacing}px`,...t};return(0,i.createElement)(s.RichText.Content,{tagName:l.tag,value:l.content,id:l.id,className:g()(l.id,o),style:a})}}];var U=j,q={from:[{type:"block",blocks:["core/heading"],transform:e=>{let{content:t}=e;return(0,a.createBlock)("themeisle-blocks/advanced-heading",{content:t})}},{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,a.createBlock)("themeisle-blocks/advanced-heading",{content:t})}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,a.createBlock)("core/paragraph",{content:t})}}]},Y=l(7462),K=l(2819),J=e=>{var t;let{attributes:l,setAttributes:a}=e;const{responsiveSetAttributes:n,responsiveGetAttributes:r}=S(a),d=e=>{a(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},u=e=>(0,i.createElement)("span",{className:"o-list-elem-controls"},e),b=e=>{a({tag:e})};return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.DropdownMenu,{icon:u(l.tag),label:(0,o.__)("Select tag","otter-blocks"),className:"components-toolbar",controls:[{title:(0,o.__)("Heading","otter-blocks")+" 1",icon:u("h1"),onClick:()=>b("h1")},{title:(0,o.__)("Heading","otter-blocks")+" 2",icon:u("h2"),onClick:()=>b("h2")},{title:(0,o.__)("Heading","otter-blocks")+" 3",icon:u("h3"),onClick:()=>b("h3")},{title:(0,o.__)("Heading","otter-blocks")+" 4",icon:u("h4"),onClick:()=>b("h4")},{title:(0,o.__)("Heading","otter-blocks")+" 5",icon:u("h5"),onClick:()=>b("h5")},{title:(0,o.__)("Heading","otter-blocks")+" 6",icon:u("h6"),onClick:()=>b("h6")},{title:(0,o.__)("Division","otter-blocks"),icon:u("div"),onClick:()=>b("div")},{title:(0,o.__)("Paragraph","otter-blocks"),icon:u("p"),onClick:()=>b("p")},{title:(0,o.__)("Span Tag","otter-blocks"),icon:u("span"),onClick:()=>b("span")}]}),(0,i.createElement)(c.ToolbarGroup,null,(0,i.createElement)(c.Dropdown,{contentClassName:"wp-themesiel-blocks-advanced-heading-popover-content",position:"bottom center",renderToggle:e=>{let{isOpen:t,onToggle:l}=e;return(0,i.createElement)(c.Button,{className:"components-dropdown-menu__toggle",icon:"editor-textcolor",onClick:l,"aria-haspopup":"true","aria-expanded":t,label:(0,o.__)("Typography Settings","otter-blocks"),showTooltip:!0},(0,i.createElement)("span",{className:"components-dropdown-menu__indicator"}))},renderContent:()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)(y.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:l.fontFamily,onChangeFontFamily:d,valueVariant:l.fontVariant,onChangeFontVariant:e=>a({fontVariant:e}),valueStyle:l.fontStyle,onChangeFontStyle:e=>a({fontStyle:e}),valueTransform:l.textTransform,onChangeTextTransform:e=>a({textTransform:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:l.lineHeight,onChange:e=>a({lineHeight:e}),step:.1,min:0,max:3}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:l.letterSpacing,onChange:e=>a({letterSpacing:e}),step:.1,min:-50,max:100}))})),(0,i.createElement)(c.ToolbarGroup,null,(0,i.createElement)(s.AlignmentToolbar,{value:null!==(t=r([l.align,l.alignTablet,l.alignMobile]))&&void 0!==t?t:"left",onChange:e=>{n(e,["align","alignTablet","alignMobile"])}})))},Q=l(2136),X=l(1661),ee=l(1150),te=l(8065),le=l(199),oe=l(8286),ae=l(5912),ne=e=>{var t,l,a,n,r,d,u,b,m,p,g,h,v,f,_,E,T,B,z,P,L;let{attributes:R,setAttributes:F}=e;const[O,N]=(0,i.useState)("style"),{responsiveSetAttributes:A,responsiveGetAttributes:H}=S(F),I="unlinked"===R.paddingType?{top:null!==(t=(0,x.Yj)(R.paddingTop))&&void 0!==t?t:"0px",bottom:null!==(l=(0,x.Yj)(R.paddingBottom))&&void 0!==l?l:"0px",right:null!==(a=(0,x.Yj)(R.paddingRight))&&void 0!==a?a:"0px",left:null!==(n=(0,x.Yj)(R.paddingLeft))&&void 0!==n?n:"0px"}:isFinite(R.padding)?(0,ae.rO)((0,x.Yj)(R.padding)):{top:"0px",bottom:"0px",right:"0px",left:"0px"},V="unlinked"===R.paddingTypeTablet?{top:null!==(r=(0,x.Yj)(R.paddingTopTablet))&&void 0!==r?r:"0px",bottom:null!==(d=(0,x.Yj)(R.paddingBottomTablet))&&void 0!==d?d:"0px",right:null!==(u=(0,x.Yj)(R.paddingRightTablet))&&void 0!==u?u:"0px",left:null!==(b=(0,x.Yj)(R.paddingLeftTablet))&&void 0!==b?b:"0px"}:isFinite(R.paddingTablet)?(0,ae.rO)((0,x.Yj)(R.paddingTablet)):void 0,D="unlinked"===R.paddingTypeMobile?{top:null!==(m=(0,x.Yj)(R.paddingTopMobile))&&void 0!==m?m:"0px",bottom:null!==(p=(0,x.Yj)(R.paddingBottomMobile))&&void 0!==p?p:"0px",right:null!==(g=(0,x.Yj)(R.paddingRightMobile))&&void 0!==g?g:"0px",left:null!==(h=(0,x.Yj)(R.paddingLeftMobile))&&void 0!==h?h:"0px"}:isFinite(R.paddingMobile)?(0,ae.rO)((0,x.Yj)(R.paddingMobile)):void 0,G=void 0===R.marginType?{top:null!==(v=(0,x.Yj)(R.marginTop))&&void 0!==v?v:"0px",bottom:null!==(f=(0,x.Yj)(R.marginBottom))&&void 0!==f?f:"25px"}:isFinite(R.margin)?(0,ae.rO)((0,x.Yj)(R.margin)):void 0,$=void 0===R.marginTypeTablet?{top:null!==(_=(0,x.Yj)(R.marginTopTablet))&&void 0!==_?_:"0px",bottom:null!==(E=(0,x.Yj)(R.marginBottomTablet))&&void 0!==E?E:"0px"}:isFinite(R.marginTablet)?(0,ae.rO)((0,x.Yj)(R.marginTablet)):void 0,W=void 0===R.marginTypeMobile?{top:null!==(T=(0,x.Yj)(R.marginTopMobile))&&void 0!==T?T:"0px",bottom:null!==(B=(0,x.Yj)(R.marginBottomMobile))&&void 0!==B?B:"0px"}:isFinite(R.marginMobile)?(0,ae.rO)((0,x.Yj)(R.marginMobile)):void 0;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:O,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:N}),(0,i.createElement)("div",null,"settings"===O&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Sizing","otter-blocks")},(0,i.createElement)(M.Z,{label:(0,o.__)("Alignment","otter-blocks")},(0,i.createElement)(oe.Z,{value:null!==(z=H([R.align,R.alignTablet,R.alignMobile]))&&void 0!==z?z:"left",onChange:e=>A(e,["align","alignTablet","alignMobile"]),options:[{icon:ee.Z,label:(0,o.__)("Left","otter-blocks"),value:"left"},{icon:te.Z,label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:le.Z,label:(0,o.__)("Right","otter-blocks"),value:"right"}],hasIcon:!0})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:R.tag,onChange:e=>F({tag:e}),options:[{label:(0,o.__)("H1","otter-blocks"),value:"h1"},{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"},{label:(0,o.__)("div","otter-blocks"),value:"div"},{label:(0,o.__)("span","otter-blocks"),value:"span"},{label:(0,o.__)("p","otter-blocks"),value:"p"}]}))),"style"===O&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography","otter-blocks"),initialOpen:!0},(0,i.createElement)(M.Z,{label:(0,o.__)("Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{value:(0,x.Yj)(H([R.fontSize,R.fontSizeTablet,R.fontSizeMobile])),onChange:e=>A(e,["fontSize","fontSizeTablet","fontSizeMobile"]),fontSizes:[{name:(0,o.__)("13","otter-blocks"),size:"13px",slug:"small"},{name:(0,o.__)("20","otter-blocks"),size:"20px",slug:"medium"},{name:(0,o.__)("36","otter-blocks"),size:"36px",slug:"large"},{name:(0,o.__)("42","otter-blocks"),size:"42px",slug:"xl"}]})),(0,i.createElement)(y.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:R.fontFamily,onChangeFontFamily:e=>{F(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},valueVariant:R.fontVariant,onChangeFontVariant:e=>F({fontVariant:e}),valueStyle:R.fontStyle,onChangeFontStyle:e=>F({fontStyle:e}),valueTransform:R.textTransform,onChangeTextTransform:e=>F({textTransform:e})}),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Line Height","otter-blocks"),value:R.lineHeight,onChange:e=>F({lineHeight:e}),step:.1,min:0,max:3,units:[{a11yLabel:"Unitless (-)",label:"-",step:.1,value:""},{a11yLabel:"Pixels (px)",label:"px",step:.1,value:"px"},{a11yLabel:"Percentage (%)",label:"%",step:1,value:"%"}]}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:R.letterSpacing,onChange:e=>F({letterSpacing:e}),step:.1,min:-50,max:100}),(0,i.createElement)(k.Z,{values:["fontFamily","fontVariant","fontStyle","textTransform","lineHeight","letterSpacing"],setAttributes:F})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:R.headingColor,onChange:e=>F({headingColor:e}),label:(0,o.__)("Text","otter-blocks")},{value:R.backgroundColor,onChange:e=>F({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:R.linkColor,onChange:e=>F({linkColor:e}),label:(0,o.__)("Link","otter-blocks")},{value:R.linkHoverColor,onChange:e=>F({linkHoverColor:e}),label:(0,o.__)("Link Hover","otter-blocks")},{value:R.highlightColor,onChange:e=>F({highlightColor:e}),label:(0,o.__)("Highlight Text","otter-blocks")},{value:R.highlightBackground,onChange:e=>F({highlightBackground:e}),label:(0,o.__)("Highlight Background","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:null!==(P=H([(0,K.isObjectLike)(R.padding)?R.padding:I,(0,K.isObjectLike)(R.paddingTablet)?R.paddingTablet:V,(0,K.isObjectLike)(R.paddingMobile)?R.paddingMobile:D]))&&void 0!==P?P:(0,ae.rO)("0px"),onChange:e=>{A(e,["padding","paddingTablet","paddingMobile"])}}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Margin","otter-blocks"),values:null!==(L=H([(0,K.isObjectLike)(R.margin)?R.margin:G,(0,K.isObjectLike)(R.marginTablet)?R.marginTablet:$,(0,K.isObjectLike)(R.marginMobile)?R.marginMobile:W]))&&void 0!==L?L:(0,ae.rO)("0px"),onChange:e=>{A(e,["margin","marginTablet","marginMobile"])},sides:["top","bottom"]}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Shadow","otter-blocks"),initialOpen:!1,className:"o-adv-h-panel"},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Enable Text Shadow","otter-blocks"),checked:R.textShadow,onChange:e=>F({textShadow:e})}),R.textShadow&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Color","otter-blocks"),colorValue:R.textShadowColor,onColorChange:e=>F({textShadowColor:e})}),(0,i.createElement)(Q.Z,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:R.textShadowColorOpacity,onChange:e=>F({textShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:R.textShadowBlur,onChange:e=>F({textShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:R.textShadowHorizontal,onChange:e=>F({textShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:R.textShadowVertical,onChange:e=>F({textShadowVertical:e}),min:-100,max:100}))))),(0,i.createElement)(C.p,null))),(0,i.createElement)(X.Z,{value:R.id,onChange:e=>F({id:e})}))};const{attributes:re}=V;const{name:ie}=V;(0,a.registerBlockType)(ie,{...V,title:(0,o.__)("Advanced Heading","otter-blocks"),description:(0,o.__)("Advanced Heading gives a spin to editor's Heading block with much needed customization options. Powered by Otter.","otter-blocks"),icon:r.headingIcon,keywords:["heading","title","advanced heading"],deprecated:U,transforms:q,edit:e=>{var t,l,n,r,c,d,u,b,m,p,g,v,y,k,f,_,w,C;let{attributes:E,setAttributes:T,clientId:M,mergeBlocks:B,onReplace:z}=e;(0,i.useEffect)((()=>{h.Z.attach();const e=(0,L.blockInit)(M,re);return()=>e(E.id)}),[E.id]);const{responsiveGetAttributes:P}=S(T),R="unlinked"===E.paddingType?{top:null!==(t=(0,x.Yj)(E.paddingTop))&&void 0!==t?t:"0px",bottom:null!==(l=(0,x.Yj)(E.paddingBottom))&&void 0!==l?l:"0px",right:null!==(n=(0,x.Yj)(E.paddingRight))&&void 0!==n?n:"0px",left:null!==(r=(0,x.Yj)(E.paddingLeft))&&void 0!==r?r:"0px"}:isFinite(E.padding)?(0,ae.rO)((0,x.Yj)(E.padding)):(0,ae.rO)("0px"),F="unlinked"===E.paddingTypeTablet?{top:null!==(c=(0,x.Yj)(E.paddingTopTablet))&&void 0!==c?c:"0px",bottom:null!==(d=(0,x.Yj)(E.paddingBottomTablet))&&void 0!==d?d:"0px",right:null!==(u=(0,x.Yj)(E.paddingRightTablet))&&void 0!==u?u:"0px",left:null!==(b=(0,x.Yj)(E.paddingLeftTablet))&&void 0!==b?b:"0px"}:isFinite(E.paddingTablet)?(0,ae.rO)((0,x.Yj)(E.paddingTablet)):void 0,O="unlinked"===E.paddingTypeMobile?{top:null!==(m=(0,x.Yj)(E.paddingTopMobile))&&void 0!==m?m:"0px",bottom:null!==(p=(0,x.Yj)(E.paddingBottomMobile))&&void 0!==p?p:"0px",right:null!==(g=(0,x.Yj)(E.paddingRightMobile))&&void 0!==g?g:"0px",left:null!==(v=(0,x.Yj)(E.paddingLeftMobile))&&void 0!==v?v:"0px"}:isFinite(E.paddingMobile)?(0,ae.rO)((0,x.Yj)(E.paddingMobile)):void 0,N=void 0===E.marginType?{top:null!==(y=(0,x.Yj)(E.marginTop))&&void 0!==y?y:"0px",bottom:null!==(k=(0,x.Yj)(E.marginBottom))&&void 0!==k?k:"25px"}:isFinite(E.margin)?(0,ae.rO)((0,x.Yj)(E.margin)):void 0,A=void 0===E.marginTypeTablet?{top:null!==(f=(0,x.Yj)(E.marginTopTablet))&&void 0!==f?f:"0px",bottom:null!==(_=(0,x.Yj)(E.marginBottomTablet))&&void 0!==_?_:"0px"}:isFinite(E.marginTablet)?(0,ae.rO)((0,x.Yj)(E.marginTablet)):void 0,H=void 0===E.marginTypeMobile?{top:null!==(w=(0,x.Yj)(E.marginTopMobile))&&void 0!==w?w:"0px",bottom:null!==(C=(0,x.Yj)(E.marginBottomMobile))&&void 0!==C?C:"0px"}:isFinite(E.marginMobile)?(0,ae.rO)((0,x.Yj)(E.marginMobile)):void 0,I=e=>(0,K.isObjectLike)(e)?(0,x.bv)(e):void 0,V={"--padding":(0,K.isObjectLike)(P([E.padding,E.paddingTablet,E.paddingMobile]))?(0,x.bv)(P([E.padding,E.paddingTablet,E.paddingMobile])):I(R),"--padding-tablet":(0,K.isObjectLike)(E.paddingTablet)?(0,x.bv)(E.paddingTablet):I(F),"--padding-mobile":(0,K.isObjectLike)(E.paddingMobile)?(0,x.bv)(E.paddingMobile):I(O),"--margin":(0,K.isObjectLike)(P([E.margin,E.marginTablet,E.marginMobile]))?(0,x.bv)(P([E.margin,E.marginTablet,E.marginMobile])):I(N),"--margin-tablet":(0,K.isObjectLike)(E.marginTablet)?(0,x.bv)(E.marginTablet):I(A),"--margin-mobile":(0,K.isObjectLike)(E.marginMobile)?(0,x.bv)(E.marginMobile):I(H),"--text-align":P([E.align,E.alignTablet,E.alignMobile]),"--text-align-tablet":E.alignTablet,"--text-align-mobile":E.alignMobile};let D;E.textShadow&&(D={textShadow:`${E.textShadowHorizontal}px ${E.textShadowVertical}px ${E.textShadowBlur}px ${Z()(E.textShadowColor?E.textShadowColor:"#000000",0<=E.textShadowColorOpacity?E.textShadowColorOpacity||1e-5:1)}`});const G=(0,K.omitBy)({fontSize:P([E.fontSize,E.fontSizeTablet,E.fontSizeMobile]),color:E.headingColor,fontFamily:E.fontFamily||void 0,fontWeight:"regular"===E.fontVariant?"normal":E.fontVariant,fontStyle:E.fontStyle||void 0,textTransform:E.textTransform||void 0,lineHeight:(3<E.lineHeight?E.lineHeight+"px":E.lineHeight)||void 0,letterSpacing:(0,x.Yj)(E.letterSpacing),background:E.backgroundColor,...D,...V},(e=>{var t;return null==e||null===(t=e.includes)||void 0===t?void 0:t.call(e,"undefined")})),$=(0,s.useBlockProps)({id:E.id,style:G});return(0,i.useEffect)((()=>{E.fontFamily&&h.Z.loadFontToBrowser(E.fontFamily,E.fontVariant)}),[E.fontFamily]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("style",null,`#block-${M} mark, #block-${M} .highlight `+(0,x.iC)([["color",E.highlightColor],["background",E.highlightBackground]]),`#block-${M} a`+(0,x.iC)([["color",E.linkColor]]),`#block-${M} a:hover`+(0,x.iC)([["color",E.linkHoverColor]])),(0,i.createElement)(J,{attributes:E,setAttributes:T}),(0,i.createElement)(ne,{attributes:E,setAttributes:T}),(0,i.createElement)(s.RichText,(0,Y.Z)({identifier:"content",value:E.content,placeholder:(0,o.__)("Write heading…","otter-blocks"),tagName:E.tag,allowedFormats:["core/bold","core/italic","core/link","core/strikethrough","themeisle-blocks/highlight","themeisle-blocks/count-animation","themeisle-blocks/typing-animation","themeisle-blocks/dynamic-value","themeisle-blocks/dynamic-link"],onMerge:B,onSplit:(e,t)=>{let l;var o;return l=t||e?(0,a.createBlock)("themeisle-blocks/advanced-heading",{...E,content:e}):(0,a.createBlock)(null!==(o=(0,a.getDefaultBlockName)())&&void 0!==o?o:"themeisle-blocks/advanced-heading"),t&&(l.clientId=M),l},onReplace:z,onRemove:()=>z([]),onChange:e=>{T({content:e})}},$)))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,className:t.id});return(0,i.createElement)(s.RichText.Content,(0,Y.Z)({tagName:t.tag,value:t.content},l))},example:{attributes:{content:(0,o.__)("A heading with more customization options","otter-blocks")}}});var se=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/button-group","title":"Button Group","category":"themeisle-blocks","description":"Prompt visitors to take action with a button group. Powered by Otter.","keywords":["button","buttons","button group"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"align":{"type":["string","object"]},"spacing":{"type":"number","default":20},"paddingTopBottom":{"type":"number"},"paddingLeftRight":{"type":"number"},"collapse":{"type":"string","default":"collapse-none"},"fontSize":{"type":"number"},"fontFamily":{"type":"string"},"fontVariant":{"type":"string"},"textTransform":{"type":"string"},"fontStyle":{"type":"string"},"lineHeight":{"type":"number"}},"editorStyle":"otter-button-group-editor","style":"otter-button-group-style"}');const ce={id:{type:"string"},buttons:{type:"number",default:2},align:{type:"string"},spacing:{type:"number",default:20},collapse:{type:"string",default:"collapse-none"},fontSize:{type:"number",default:18},fontFamily:{type:"string"},fontVariant:{type:"string"},textTransform:{type:"string"},fontStyle:{type:"string",default:"normal"},lineHeight:{type:"number"},data:{type:"array",default:[{text:"",link:"",newTab:!1,color:"#ffffff",background:"#32373c",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:0,borderRadius:0,boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:12,paddingLeftRight:24},{text:"",link:"",newTab:!1,color:"#ffffff",background:"#32373c",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:0,borderRadius:0,boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:12,paddingLeftRight:24}]}},de=[{attributes:ce,save:e=>{let{attributes:t,className:l}=e;const o="collapse-none"!==t.collapse?t.collapse:"",a={fontSize:`${t.fontSize}px`,fontFamily:t.fontFamily,fontWeight:t.fontVariant,fontStyle:t.fontStyle,textTransform:t.textTransform,lineHeight:t.lineHeight&&`${t.lineHeight}px`};return(0,i.createElement)("div",{id:t.id,className:g()(l,o),style:{justifyContent:t.align,alignItems:t.align?t.align:"flex-start"}},(0,K.times)(t.buttons,(e=>(e=>{const l={...a,borderWidth:`${t.data[e].borderSize}px`,borderRadius:`${t.data[e].borderRadius}px`,padding:`${t.data[e].paddingTopBottom}px ${t.data[e].paddingLeftRight}px`};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("a",{href:t.data[e].link,target:t.data[e].newTab?"_blank":"_self",className:g()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${e}`),style:l},("left"===t.data[e].iconType||"only"===t.data[e].iconType)&&(0,i.createElement)("i",{className:g()(t.data[e].prefix,"fa-fw",`fa-${t.data[e].icon}`,{"margin-right":"left"===t.data[e].iconType})}),"only"!==t.data[e].iconType&&(0,i.createElement)(s.RichText.Content,{tagName:"span",value:t.data[e].text}),"right"===t.data[e].iconType&&(0,i.createElement)("i",{className:`${t.data[e].prefix} fa-fw fa-${t.data[e].icon} margin-left`})))})(e))))}},{attributes:ce,save:e=>{let{attributes:t,className:l}=e;const o="collapse-none"!==t.collapse?t.collapse:"",a={fontSize:`${t.fontSize}px`,fontFamily:t.fontFamily,fontWeight:t.fontVariant,fontStyle:t.fontStyle,textTransform:t.textTransform,lineHeight:t.lineHeight&&`${t.lineHeight}px`};return(0,i.createElement)("div",{id:t.id,className:g()(l,o),style:{justifyContent:t.align,alignItems:t.align?t.align:"flex-start"}},(0,K.times)(t.buttons,(e=>(e=>{const l={...a,borderWidth:`${t.data[e].borderSize}px`,borderRadius:`${t.data[e].borderRadius}px`,padding:`${t.data[e].paddingTopBottom}px ${t.data[e].paddingLeftRight}px`};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("a",{href:t.data[e].link,target:t.data[e].newTab?"_blank":"_self",className:g()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${e}`),style:l,rel:"noopener noreferrer"},("left"===t.data[e].iconType||"only"===t.data[e].iconType)&&(0,i.createElement)("i",{className:g()(t.data[e].prefix,"fa-fw",`fa-${t.data[e].icon}`,{"margin-right":"left"===t.data[e].iconType})}),"only"!==t.data[e].iconType&&(0,i.createElement)(s.RichText.Content,{tagName:"span",value:t.data[e].text}),"right"===t.data[e].iconType&&(0,i.createElement)("i",{className:`${t.data[e].prefix} fa-fw fa-${t.data[e].icon} margin-left`})))})(e))))}},{attributes:{...ce,fontSize:{type:"number"},fontStyle:{type:"string"},data:{type:"array",default:[{text:"",link:"",newTab:!1,color:"",background:"",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:"",borderRadius:"",boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:"",paddingLeftRight:""},{text:"",link:"",newTab:!1,color:"",background:"",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:"",borderRadius:"",boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:"",paddingLeftRight:""}]}},migrate:(e,t)=>{let l,o,n;return"flex-start"===e.align&&(l="left"),"center"===e.align&&(l="center"),"flex-end"===e.align&&(l="right"),e.data&&(o=(0,K.pick)(e.data[0],["paddingLeftRight","paddingTopBottom"]),1<=Object.keys(o).length&&(o=(0,K.pick)(o,Object.keys(o).filter((e=>""!==o[e])))),n=e.data.filter(((t,l)=>l<e.buttons)).map((e=>{const t=(0,K.omit)(e,["paddingLeftRight","paddingTopBottom"]);return(0,a.createBlock)("themeisle-blocks/button",{...t})}))),[{...(0,K.omit)(e,["buttons","data"]),align:l,...o},[...n,...t]]},save:e=>{let{attributes:t,className:l}=e;const o="collapse-none"!==t.collapse?t.collapse:"";return(0,i.createElement)("div",{id:t.id,className:g()(l,o,"wp-block-button")},(0,K.times)(t.buttons,(e=>(e=>(0,i.createElement)("a",{href:t.data[e].link,target:t.data[e].newTab?"_blank":"_self",className:g()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${e}`,"wp-block-button__link"),rel:"noopener noreferrer"},("left"===t.data[e].iconType||"only"===t.data[e].iconType)&&(0,i.createElement)("i",{className:g()(t.data[e].prefix,"fa-fw",`fa-${t.data[e].icon}`,{"margin-right":"left"===t.data[e].iconType})}),"only"!==t.data[e].iconType&&(0,i.createElement)(s.RichText.Content,{tagName:"span",value:t.data[e].text}),"right"===t.data[e].iconType&&(0,i.createElement)("i",{className:`${t.data[e].prefix} fa-fw fa-${t.data[e].icon} margin-left`})))(e))))}}];var ue=de,be=l(4333),me=l(4022),pe=l(1138),ge=l(4934),he=l(2380),ve=l(9700),ye=l(2372),ke=e=>{var t,l;let{attributes:a,setAttributes:n,currentDevice:r}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Spacing","otter-blocks")},(0,i.createElement)(ye.Z,{label:(0,o.__)("Padding","otter-blocks"),min:0,max:100,onChange:(e,t)=>{"top"!==e&&"bottom"!==e||n({paddingTopBottom:t}),"right"!==e&&"left"!==e||n({paddingLeftRight:t})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:a.paddingTopBottom},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:a.paddingLeftRight},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:a.paddingTopBottom},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:a.paddingLeftRight}]}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spacing","otter-blocks"),value:a.spacing,onChange:e=>n({spacing:e}),step:.1,min:0,max:50}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Collapse On","otter-blocks"),value:a.collapse,options:[{label:(0,o.__)("None","otter-blocks"),value:"collapse-none"},{label:(0,o.__)("Desktop","otter-blocks"),value:"collapse-desktop"},{label:(0,o.__)("Tablet","otter-blocks"),value:"collapse-tablet"},{label:(0,o.__)("Mobile","otter-blocks"),value:"collapse-mobile"}],onChange:e=>n({collapse:e})}),(0,i.createElement)(M.Z,{label:(0,o.__)("Alignment","otter-blocks"),className:"buttons-alignment-control"},(0,i.createElement)(oe.Z,{value:null!==(t=null==a||null===(l=a.align)||void 0===l?void 0:l[r])&&void 0!==t?t:"none",options:[{icon:me.Z,label:(0,o.__)("None","otter-blocks"),value:"none"},{icon:pe.Z,label:(0,o.__)("Full","otter-blocks"),value:"full"},{icon:ge.Z,label:(0,o.__)("Left","otter-blocks"),value:"left"},{icon:he.Z,label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:ve.Z,label:(0,o.__)("Right","otter-blocks"),value:"right"}],onChange:e=>{const t=a.align?{desktop:a.align.desktop,tablet:a.align.tablet,mobile:a.align.mobile}:{};t[r]="none"===e?void 0:e,n({align:t})},hasIcon:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Font Size","otter-blocks"),value:a.fontSize,onChange:e=>n({fontSize:e}),step:.1,min:0,max:50}),(0,i.createElement)(y.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:a.fontFamily,onChangeFontFamily:e=>{n(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:void 0,fontVariant:void 0,fontStyle:void 0})},valueVariant:a.fontVariant,onChangeFontVariant:e=>n({fontVariant:e}),valueStyle:a.fontStyle,onChangeFontStyle:e=>n({fontStyle:e}),valueTransform:a.textTransform,onChangeTextTransform:e=>n({textTransform:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:a.lineHeight,onChange:e=>n({lineHeight:e}),step:.1,min:0,max:200})))};const{attributes:fe}=se;const{name:_e}=se;(0,a.registerBlockType)(_e,{...se,title:(0,o.__)("Button Group","otter-blocks"),description:(0,o.__)("Prompt visitors to take action with a button group. Powered by Otter.","otter-blocks"),icon:r.buttonsIcon,keywords:["button","buttons","button group"],deprecated:ue,edit:e=>{let{attributes:t,setAttributes:l,clientId:o}=e;const{isViewportAvailable:a,isPreviewDesktop:n,isPreviewTablet:r,isPreviewMobile:c}=(0,v.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=!!e("core/edit-post")&&e("core/edit-post");return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[]),d=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l().toLowerCase():t().toLowerCase()}),[]),u=(0,be.useViewportMatch)("large",">="),b=(0,be.useViewportMatch)("large","<="),m=(0,be.useViewportMatch)("small",">="),p=(0,be.useViewportMatch)("small","<=");(0,i.useEffect)((()=>{h.Z.attach();const e=(0,L.blockInit)(o,fe);return()=>e(t.id)}),[]);let y=u&&!b&&m&&!p,k=!u&&!b&&m&&!p,f=!(u||b||m||p);a&&!f&&(y=n,k=r,f=c);const _={"--spacing":t.spacing&&t.spacing+"px"},w=["desktop","tablet","mobile"].reduce(((e,l)=>(t.align&&t.align[l]&&e.push(`align-${t.align[l]}-${l}`),e)),[]),C=(0,s.useBlockProps)({id:t.id,className:g()("wp-block-buttons",{[`align-${t.align}`]:"string"==typeof t.align,collapse:"collapse-desktop"===t.collapse&&(y||k||f)||"collapse-tablet"===t.collapse&&(k||f)||"collapse-mobile"===t.collapse&&f},...w),style:_});return(0,i.useEffect)((()=>{t.fontFamily&&h.Z.loadFontToBrowser(t.fontFamily,t.fontVariant)}),[t.fontFamily]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ke,{attributes:t,setAttributes:l,currentDevice:d}),(0,i.createElement)("div",C,(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/button"],__experimentalMoverDirection:"horizontal",orientation:"horizontal",template:[["themeisle-blocks/button"]],renderAppender:s.InnerBlocks.DefaultAppender})))},save:e=>{let{attributes:t}=e;const l="collapse-none"!==t.collapse?t.collapse:"",o=["desktop","tablet","mobile"].reduce(((e,l)=>(t.align&&t.align[l]&&e.push(`align-${t.align[l]}-${l}`),e)),[]),a=s.useBlockProps.save({id:t.id,className:g()(l,"wp-block-buttons",{[`align-${t.align}`]:"string"==typeof t.align},...o)});return(0,i.createElement)("div",a,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{attributes:{spacing:20},innerBlocks:[{name:"themeisle-blocks/button",attributes:{text:(0,o.__)("Button 1","otter-blocks")}},{name:"themeisle-blocks/button",attributes:{text:(0,o.__)("Button 2","otter-blocks")}}]}});var we=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/button","title":"Button","category":"themeisle-blocks","description":"Prompt visitors to take action with a button group. Powered by Otter.","keywords":["button","buttons","button group"],"parent":["themeisle-blocks/button-group"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"text":{"type":"string","source":"html","selector":"span"},"link":{"type":"string","source":"attribute","selector":"a","attribute":"href"},"newTab":{"type":"boolean","default":false},"color":{"type":"string"},"background":{"type":"string"},"backgroundGradient":{"type":"string"},"border":{"type":"string"},"hoverColor":{"type":"string"},"hoverBackground":{"type":"string"},"hoverBackgroundGradient":{"type":"string"},"hoverBorder":{"type":"string"},"borderSize":{"type":"number"},"borderRadius":{"type":"number"},"boxShadow":{"type":"boolean","default":false},"boxShadowColor":{"type":"string"},"boxShadowColorOpacity":{"type":"number","default":50},"boxShadowBlur":{"type":"number","default":5},"boxShadowSpread":{"type":"number","default":1},"boxShadowHorizontal":{"type":"number","default":0},"boxShadowVertical":{"type":"number","default":0},"hoverBoxShadowColor":{"type":"string"},"hoverBoxShadowColorOpacity":{"type":"number","default":50},"hoverBoxShadowBlur":{"type":"number","default":5},"hoverBoxShadowSpread":{"type":"number","default":1},"hoverBoxShadowHorizontal":{"type":"number","default":0},"hoverBoxShadowVertical":{"type":"number","default":0},"iconType":{"type":"string","default":"none"},"library":{"type":"string","default":"fontawesome"},"prefix":{"type":"string"},"icon":{"type":"string"}},"supports":{"reusable":false},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}]}'),Ce=l(8504),Ee=e=>{let{attributes:t,setAttributes:l,isSelected:o}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(Ce.Z,{isSelected:o,setAttributes:l,url:t.link,opensInNewTab:t.newTab}))},xe=e=>{let{attributes:t,setAttributes:l}=e;const[a,n]=(0,i.useState)(!1),r=()=>(0,i.createElement)(c.ButtonGroup,null,(0,i.createElement)(c.Button,{isSmall:!0,isSecondary:a,isPrimary:!a,onClick:()=>n(!1)},(0,o.__)("Normal","otter-blocks")),(0,i.createElement)(c.Button,{isSmall:!0,isSecondary:!a,isPrimary:a,onClick:()=>n(!0)},(0,o.__)("Hover","otter-blocks")));return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Color","otter-blocks")},(0,i.createElement)(r,null),a?(0,i.createElement)(i.Fragment,{key:"with-hover"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Color","otter-blocks"),colorValue:t.hoverColor,onColorChange:e=>l({hoverColor:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Background","otter-blocks"),colorValue:t.hoverBackground,gradientValue:t.hoverBackgroundGradient,onColorChange:e=>l({hoverBackground:e}),onGradientChange:e=>l({hoverBackgroundGradient:e})})):(0,i.createElement)(i.Fragment,{key:"without-hover"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Color","otter-blocks"),colorValue:t.color,onColorChange:e=>l({color:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Background","otter-blocks"),colorValue:t.background,gradientValue:t.backgroundGradient,onColorChange:e=>l({background:e}),onGradientChange:e=>l({backgroundGradient:e})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border & Box Shadow","otter-blocks"),initialOpen:!1},(0,i.createElement)(r,null),a?(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Border","otter-blocks"),colorValue:t.hoverBorder,onColorChange:e=>l({hoverBorder:e})}):(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Border","otter-blocks"),colorValue:t.border,onColorChange:e=>l({border:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Width","otter-blocks"),value:t.borderSize,onChange:e=>l({borderSize:e}),step:.1,min:0,max:10}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),value:t.borderRadius,onChange:e=>l({borderRadius:e}),step:.1,min:0,max:100}),(0,i.createElement)(Q.Z,{label:(0,o.__)("Box Shadow","otter-blocks"),attributes:t,setAttributes:l,resetValues:{boxShadow:!1,boxShadowColor:void 0,boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:void 0,hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0},onClick:()=>l({boxShadow:!0})},(0,i.createElement)(r,null),a?(0,i.createElement)(i.Fragment,{key:"with-hover"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Shadow Color on Hover","otter-blocks"),colorValue:t.hoverBoxShadowColor,onColorChange:e=>l({hoverBoxShadowColor:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:t.hoverBoxShadowColorOpacity,onChange:e=>l({hoverBoxShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:t.hoverBoxShadowBlur,onChange:e=>l({hoverBoxShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:t.hoverBoxShadowSpread,onChange:e=>l({hoverBoxShadowSpread:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:t.hoverBoxShadowHorizontal,onChange:e=>l({hoverBoxShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:t.hoverBoxShadowVertical,onChange:e=>l({hoverBoxShadowVertical:e}),min:-100,max:100})):(0,i.createElement)(i.Fragment,{key:"without-hover"},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:t.boxShadowColor,onColorChange:e=>l({boxShadowColor:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:t.boxShadowColorOpacity,onChange:e=>l({boxShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:t.boxShadowBlur,onChange:e=>l({boxShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:t.boxShadowSpread,onChange:e=>l({boxShadowSpread:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:t.boxShadowHorizontal,onChange:e=>l({boxShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:t.boxShadowVertical,onChange:e=>l({boxShadowVertical:e}),min:-100,max:100})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Icon Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Icon Position","otter-blocks"),value:t.iconType,options:[{label:(0,o.__)("No Icon","otter-blocks"),value:"none"},{label:(0,o.__)("Left","otter-blocks"),value:"left"},{label:(0,o.__)("Right","otter-blocks"),value:"right"},{label:(0,o.__)("Icon Only","otter-blocks"),value:"only"}],onChange:e=>l({iconType:e})}),"none"!==t.iconType&&(0,i.createElement)(_.Z,{label:(0,o.__)("Icon Picker","otter-blocks"),library:t.library,prefix:t.prefix,icon:t.icon,changeLibrary:e=>{l({library:e,icon:void 0,prefix:"fab"})},onChange:e=>{l("object"==typeof e?{icon:e.name,prefix:e.prefix}:{icon:e})}})))},Se=l(48);const{attributes:Te}=we;const{name:Me}=we;(0,a.registerBlockType)(Me,{...we,title:(0,o.__)("Button","otter-blocks"),description:(0,o.__)("Prompt visitors to take action with a button group. Powered by Otter.","otter-blocks"),icon:r.buttonsIcon,keywords:["button","buttons","button group"],styles:[{name:"fill",label:(0,o.__)("Fill","otter-blocks"),isDefault:!0},{name:"outline",label:(0,o.__)("Outline","otter-blocks")},...window.themeisleGutenberg.hasNeve?[{name:"primary",label:(0,o.__)("Primary","otter-blocks")},{name:"secondary",label:(0,o.__)("Secondary","otter-blocks")}]:[]],edit:e=>{let{attributes:t,setAttributes:l,isSelected:a,clientId:n}=e;const{hasParent:r,parentAttributes:c}=(0,v.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor"),o=t(l(n));return{hasParent:!!o,parentAttributes:o?o.attributes:{}}}),[]);(0,i.useEffect)((()=>{const e=(0,L.blockInit)(n,Te);return()=>e(t.id)}),[]);let d={},u={};t.boxShadow&&(d={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`}),r&&(u={paddingTop:`${c.paddingTopBottom}px`,paddingBottom:`${c.paddingTopBottom}px`,paddingLeft:`${c.paddingLeftRight}px`,paddingRight:`${c.paddingLeftRight}px`,fontSize:c.fontSize&&`${c.fontSize}px`,fontFamily:c.fontFamily,fontWeight:c.fontVariant,fontStyle:c.fontStyle,textTransform:c.textTransform,lineHeight:c.lineHeight&&`${c.lineHeight}px`});const b={color:t.color,background:t.background||t.backgroundGradient,border:`${t.borderSize}px solid ${t.border}`,borderRadius:t.borderRadius,...d,...u},m={fill:t.color,width:c.fontSize&&`${c.fontSize}px`},p=Se.ZP.icons[t.icon],[h,y]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{y([`.wp-block-button__link:hover {\n\t\t\t\tcolor: ${t.hoverColor} !important;\n\t\t\t\tbackground: ${t.hoverBackground||t.hoverBackgroundGradient} !important;\n\t\t\t\tborder-color: ${t.hoverBorder} !important;\n\t\t\t\t${t.boxShadow&&`box-shadow: ${t.hoverBoxShadowHorizontal}px ${t.hoverBoxShadowVertical}px ${t.hoverBoxShadowBlur}px ${t.hoverBoxShadowSpread}px ${Z()(t.hoverBoxShadowColor?t.hoverBoxShadowColor:"#000000",t.hoverBoxShadowColorOpacity)} !important;`}\n\t\t\t}`,`.wp-block-button__link:hover svg {\n\t\t\t\tfill: ${t.hoverColor} !important;\n\t\t\t}`])}),[t.hoverColor,t.hoverBackground,t.hoverBackgroundGradient,t.hoverBorder,t.hoverColor,t.boxShadow,t.hoverBoxShadowHorizontal,t.hoverBoxShadowBlur,t.hoverBoxShadowSpread,t.hoverBoxShadowColor,t.hoverBoxShadowColorOpacity]);const k=(0,s.useBlockProps)({id:t.id,className:g()("wp-block-button",h),style:{}});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Ee,{attributes:t,setAttributes:l,isSelected:a}),(0,i.createElement)(xe,{attributes:t,setAttributes:l}),(0,i.createElement)("div",k,"none"!==t.iconType?(0,i.createElement)("div",{className:"wp-block-button__link",style:b},("left"===t.iconType||"only"===t.iconType)&&("themeisle-icons"===t.library&&t.icon?(0,i.createElement)(p,{className:g()({"margin-right":"left"===t.iconType}),style:m}):(0,i.createElement)("i",{className:g()(t.prefix,"fa-fw",`fa-${t.icon}`,{"margin-right":"left"===t.iconType})})),"only"!==t.iconType&&(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:t.text,onChange:e=>l({text:e}),tagName:"div",withoutInteractiveFormatting:!0}),"right"===t.iconType&&("themeisle-icons"===t.library&&t.icon?(0,i.createElement)(p,{className:"margin-left",style:m}):(0,i.createElement)("i",{className:`${t.prefix} fa-fw fa-${t.icon} margin-left`}))):(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:t.text,onChange:e=>l({text:e}),tagName:"div",withoutInteractiveFormatting:!0,className:"wp-block-button__link",style:b})))},save:e=>{let{attributes:t}=e;const l=Se.ZP.icons[t.icon],o=s.useBlockProps.save({id:t.id,className:"wp-block-button"});return(0,i.createElement)("div",o,(0,i.createElement)("a",{href:t.link,target:t.newTab?"_blank":"_self",rel:"noopener noreferrer",className:"wp-block-button__link"},("left"===t.iconType||"only"===t.iconType)&&("themeisle-icons"===t.library&&t.icon?(0,i.createElement)(l,{className:g()({"margin-right":"left"===t.iconType})}):(0,i.createElement)("i",{className:g()(t.prefix,"fa-fw",`fa-${t.icon}`,{"margin-right":"left"===t.iconType})})),"only"!==t.iconType&&(0,i.createElement)(s.RichText.Content,{tagName:"span",value:t.text}),"right"===t.iconType&&("themeisle-icons"===t.library&&t.icon?(0,i.createElement)(l,{className:"margin-left"}):(0,i.createElement)("i",{className:`${t.prefix} fa-fw fa-${t.icon} margin-left`}))))},example:{attributes:{}}});var Be=l(269),ze=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/circle-counter","title":"Circle Counter","category":"themeisle-blocks","description":"Show your progress with a beautiful Circle Counter block. Powered by Otter.","keywords":["progress","circle","counter"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"title":{"type":"string","default":"Skill"},"percentage":{"type":"number","default":50},"duration":{"type":"number","default":2},"titleStyle":{"type":"string","default":"default"},"height":{"type":"number","default":100},"fontSizeTitle":{"type":"number"},"fontSizePercent":{"type":"number"},"strokeWidth":{"type":"number","default":10},"backgroundColor":{"type":"string"},"progressColor":{"type":"string"},"titleColor":{"type":"string"}},"editorStyle":"otter-circle-counter-editor","style":"otter-circle-counter-style","script":"otter-circle-counter"}'),Pe=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Percentage","otter-blocks"),help:(0,o.__)("The value of the counter.","otter-blocks"),value:t.percentage,onChange:e=>{void 0!==e&&(e=(0,K.clamp)(e,0,100),l({percentage:e}))},min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Duration","otter-blocks"),help:(0,o.__)("The duration of the animation.","otter-blocks"),value:t.duration,onChange:e=>{void 0!==e&&(e=(0,K.clamp)(e,0,3),l({duration:e}))},min:0,max:3}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Title Style","otter-blocks"),value:t.titleStyle,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Hide","otter-blocks"),value:"hide"},{label:(0,o.__)("Bottom","otter-blocks"),value:"bottom"}],onChange:e=>l({titleStyle:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Height","otter-blocks"),help:(0,o.__)("The height of the circle counter.","otter-blocks"),value:t.height,onChange:e=>l({height:e}),min:0,max:240}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Circle Thickness","otter-blocks"),help:(0,o.__)("Change the thickness (stroke width) of the circle.","otter-blocks"),value:t.strokeWidth,onChange:e=>l({strokeWidth:e}),initialPosition:10,min:0,max:20}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Font Size Title","otter-blocks"),help:(0,o.__)("Change the font size of the title.","otter-blocks"),value:t.fontSizeTitle,onChange:e=>l({fontSizeTitle:e}),initialPosition:37,min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Font Size Percent","otter-blocks"),help:(0,o.__)("Change the font size of the inner text.","otter-blocks"),value:t.fontSizePercent,onChange:e=>l({fontSizePercent:e}),initialPosition:27,min:0,max:80}),"hide"!==t.titleStyle&&(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Title Color","otter-blocks"),colorValue:t.titleColor,onColorChange:e=>l({titleColor:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Progress Color","otter-blocks"),colorValue:t.progressColor,onColorChange:e=>l({progressColor:e})}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Background Color","otter-blocks"),colorValue:t.backgroundColor,onColorChange:e=>l({backgroundColor:e})})))},Le=e=>{let{attributes:t,progressRef:l,valueRef:o}=e;const a=t.height,n=a/2,r=a/2-t.strokeWidth/2,s=2*Math.PI*r;return 0>r?(0,i.createElement)("div",null):(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter__bar",style:{height:a+"px",width:a+"px"}},(0,i.createElement)("svg",{className:"wp-block-themeisle-blocks-circle-counter-container",width:a,height:a},(0,i.createElement)("circle",{className:"wp-block-themeisle-blocks-circle-counter-bg",cx:n,cy:n,r:r,strokeWidth:t.strokeWidth,style:{stroke:t.backgroundColor}}),(0,i.createElement)("circle",{ref:l,className:"wp-block-themeisle-blocks-circle-counter-progress",cx:n,cy:n,r:r,strokeWidth:t.strokeWidth,strokeDasharray:s,style:{stroke:t.progressColor}}),(0,i.createElement)("text",{ref:o,className:"wp-block-themeisle-blocks-circle-counter-text",x:"50%",y:"50%",style:{fill:t.progressColor,fontSize:t.fontSizePercent+"px"}},t.percentage,"%")))};const{attributes:Re}=ze;const{clamp:Fe,omit:Oe}=lodash,Ne={to:[{type:"block",blocks:["themeisle-blocks/progress-bar"],transform:e=>{const t=Oe(e,["titleStyle","height","fontSize","strokeWidth","progressColor"]);return(0,a.createBlock)("themeisle-blocks/progress-bar",{...t,barBackgroundColor:e.progressColor,height:Fe(e.height/4,0,100),titleStyle:"default"})}}]};var Ae=Ne;const{name:He}=ze;(0,a.registerBlockType)(He,{...ze,title:(0,o.__)("Circle Counter","otter-blocks"),description:(0,o.__)("Show your progress with a beautiful Circle Counter block. Powered by Otter.","otter-blocks"),icon:Be.Z,keywords:["progress","circle","counter"],transforms:Ae,edit:e=>{let{clientId:t,attributes:l,setAttributes:a,isSelected:n,toggleSelection:r}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(t,Re);return()=>e(l.id)}),[l.id]);const d=(0,i.useRef)(null),u=(0,i.useRef)(null),[b,m]=(0,i.useState)({}),p=l.height/2-l.strokeWidth/2,g=2*Math.PI*p;(0,i.useEffect)((()=>{if(!d.current||!d.current||0===l.duration)return;const e=l.percentage/(1e3*l.duration),t=(0,K.range)(0,1e3*l.duration+20,20).map((t=>t*e)).reverse();b&&clearInterval(b),d.current.style.strokeDashoffset=g,u.current.innerText="0%";const o=setInterval((()=>{if(!d.current)return void clearInterval(o);const e=Math.round(t.pop());d.current.style.strokeDashoffset=(100-e)/100*g,u.current.innerHTML=e+"%",0===t.length&&clearInterval(o)}),20);return m(o),()=>{clearInterval(o)}}),[l.duration]),(0,i.useEffect)((()=>{if(d.current&&d.current)return d.current.style.strokeDashoffset=(100-l.percentage)/100*g,u.current.innerHTML=l.percentage+"%",clearInterval(b),()=>{clearInterval(b)}}),[l.percentage,l.height]);const h={"--font-size-title":(v=l.fontSizeTitle,v?`${v}px`:v)};var v;const y=(0,s.useBlockProps)({id:l.id,style:h});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Pe,{attributes:l,setAttributes:a}),(0,i.createElement)("div",y,"default"===l.titleStyle&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,i.createElement)(s.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-circle-counter-title__value",placeholder:n?(0,o.__)("Write caption…","otter-blocks"):null,value:l.title,onChange:e=>a({title:e}),multiline:!1,style:{color:l.titleColor}})),(0,i.createElement)(c.ResizableBox,{size:{height:l.height,width:l.height},minHeight:0,maxHeight:240,enable:{top:!1,right:!1,bottom:!0,left:!1},showHandle:n,onResizeStop:(e,t,o,n)=>{a({height:parseInt(l.height+n.height,10)}),r(!0)},onResizeStart:()=>{r(!1)}},(0,i.createElement)(Le,{attributes:l,progressRef:d,valueRef:u})),"bottom"===l.titleStyle&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,i.createElement)(s.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-circle-counter-title__value",placeholder:n?(0,o.__)("Write caption…","otter-blocks"):null,value:l.title,onChange:e=>a({title:e}),multiline:!1,style:{color:l.titleColor}}))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,"data-percentage":t.percentage,"data-duration":t.duration,"data-height":t.height,"data-stroke-width":t.strokeWidth,"data-font-size-percent":t.fontSizePercent,"data-background-stroke":t.backgroundColor,"data-progress-stroke":t.progressColor});return(0,i.createElement)("div",l,"default"===t.titleStyle&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-circle-counter-title__value"},t.title)),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter__bar"}),"bottom"===t.titleStyle&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-circle-counter-title__value"},t.title)))},example:{attributes:{title:"Lorem ipsum"}}});var Ie=l(2506),Ve=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/countdown","title":"Countdown","category":"themeisle-blocks","description":"Set a countdown for a date. Powered by Otter.","keywords":["countdown","time","counter"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"date":{"type":"string"},"exclude":{"type":"array"},"backgroundColor":{"type":"string"},"valueColor":{"type":"string"},"labelColor":{"type":"string"},"labelDistance":{"type":"number"},"separatorColor":{"type":"string"},"gap":{"type":"number"},"gapTablet":{"type":"number"},"gapMobile":{"type":"number"},"width":{"type":"number"},"widthTablet":{"type":"number"},"widthMobile":{"type":"number"},"containerWidth":{"type":"string"},"containerWidthTablet":{"type":"string"},"containerWidthMobile":{"type":"string"},"height":{"type":"number"},"heightTablet":{"type":"number"},"heightMobile":{"type":"number"},"borderRadius":{"type":["number","object"]},"borderRadiusBox":{"type":"object"},"borderStyle":{"type":"string"},"borderWidth":{"type":"number"},"borderWidthTablet":{"type":"number"},"borderWidthMobile":{"type":"number"},"borderColor":{"type":"string"},"valueFontSize":{"type":["number","string"]},"valueFontSizeTablet":{"type":["number","string"]},"valueFontSizeMobile":{"type":["number","string"]},"labelFontSize":{"type":["number","string"]},"labelFontSizeTablet":{"type":["number","string"]},"labelFontSizeMobile":{"type":["number","string"]},"hasSeparators":{"type":"boolean"},"valueFontWeight":{"type":"string"},"labelFontWeight":{"type":"string"},"alignment":{"type":"string"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"borderRadiusTopRight":{"type":"number"},"borderRadiusTopLeft":{"type":"number"},"borderRadiusBottomRight":{"type":"number"},"borderRadiusBottomLeft":{"type":"number"},"borderRadiusType":{"type":"string","default":"linked"},"separatorAlignment":{"type":"string"},"behaviour":{"type":"string"},"redirectLink":{"type":"string"},"mode":{"type":"string"},"timer":{"type":"object"},"startInterval":{"type":"string"},"endInterval":{"type":"string"},"onEndAction":{"type":"string"}},"supports":{"align":["wide","full"]},"editorStyle":"otter-countdown-editor","style":"otter-countdown-style","script":"otter-countdown"}'),De=l(6292),Ge=l.n(De),$e=l(9771),We=l(2694),Ze=l(9084);const je=[{name:(0,o.__)("Small","otter-blocks"),size:"0.875em",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"1em",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"1.125em",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"1.25em",slug:"xl"}],Ue=["","100","200","300","400","500","600","700","800","900"].map((e=>({label:e||"Default",value:e}))),qe=e=>{var t;let{attributes:l}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Countdown Type","otter-blocks"),value:l.mode,options:[{label:(0,o.__)("Static","otter-blocks"),value:""},{label:(0,o.__)("Evergreen (Pro)","otter-blocks"),value:"timer",disabled:!0},{label:(0,o.__)("Interval (Pro)","otter-blocks"),value:"interval",disabled:!0}],help:(0,o.__)("An universal deadline for all visitors","otter-blocks")}),!Boolean(null===(t=window.themeisleGutenberg)||void 0===t?void 0:t.hasPro)&&(0,i.createElement)(Ze.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"countdownfeature")},(0,o.__)("Get more options with Otter Pro.","otter-blocks")),variant:"upsell"}))},Ye=()=>{var e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("On Expire","otter-blocks"),value:"default",onChange:()=>{},options:[{label:(0,o.__)("No action","otter-blocks"),value:"default"},{label:(0,o.__)("Hide the Countdown","otter-blocks"),value:"hide"},{label:(0,o.__)("Redirect to link","otter-blocks"),value:"redirectLink"}],help:(0,o.__)("The countdown remains visible when it reaches 0","otter-blocks"),disabled:!0}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide/Show Blocks When the Countdown Ends","otter-blocks"),help:(0,o.__)("Enable Hide/Show other blocks when the Countdown ends.","otter-blocks"),checked:!1,onChange:()=>{},disabled:!0}),!Boolean(null===(e=window.themeisleGutenberg)||void 0===e?void 0:e.hasPro)&&(0,i.createElement)(Ze.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"countdownfeature")},(0,o.__)("Get more options with Otter Pro.","otter-blocks")),variant:"upsell"}))};var Ke=e=>{var t,l,a,n,r,d,u,b,m;let{attributes:p,setAttributes:g}=e;const{responsiveSetAttributes:h,responsiveGetAttributes:v}=S(g),y=(e,t)=>{var l;g(e?{exclude:null==p||null===(l=p.exclude)||void 0===l?void 0:l.filter((e=>e!==t))}:{exclude:null!=p&&p.exclude?[...null==p?void 0:p.exclude,t]:[t]})},k=(0,$e.__experimentalGetSettings)();return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Time Settings","otter-blocks")},(0,We.applyFilters)("otter.countdown.controls.settings",(0,i.createElement)(qe,{attributes:p}),{attributes:p,setAttributes:g}),void 0===p.mode&&(0,i.createElement)(c.Dropdown,{position:"bottom left",headerTitle:(0,o.__)("Select the date for the deadline","otter-blocks"),renderToggle:e=>{let{onToggle:t,isOpen:l}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Button,{onClick:t,isSecondary:!0,"aria-expanded":l,className:"o-extend-btn"},p.date?(0,$e.format)(k.formats.datetime,p.date):(0,o.__)("Select Date","otter-blocks")))},renderContent:()=>(0,i.createElement)(c.DateTimePicker,{currentDate:p.date,onChange:e=>g({date:e})}),className:"o-extend"})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Display","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Days","otter-blocks"),checked:!(null!=p&&null!==(t=p.exclude)&&void 0!==t&&t.includes("day")),onChange:e=>y(e,"day")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Hours","otter-blocks"),checked:!(null!=p&&null!==(l=p.exclude)&&void 0!==l&&l.includes("hour")),onChange:e=>y(e,"hour")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Minutes","otter-blocks"),checked:!(null!=p&&null!==(a=p.exclude)&&void 0!==a&&a.includes("minute")),onChange:e=>y(e,"minute")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Seconds","otter-blocks"),checked:!(null!=p&&null!==(n=p.exclude)&&void 0!==n&&n.includes("second")),onChange:e=>y(e,"second")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Separators","otter-blocks"),checked:null==p?void 0:p.hasSeparators,onChange:e=>g({hasSeparators:e})}),(0,i.createElement)(M.Z,{label:(0,o.__)("Space Between boxes","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:null!==(r=v([p.gap,p.gapTablet,p.gapMobile]))&&void 0!==r?r:6,onChange:e=>h(e,["gap","gapTablet","gapMobile"]),min:0,max:100,allowReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("End Action","otter-blocks"),initialOpen:!1},(0,We.applyFilters)("otter.countdown.controls.end",(0,i.createElement)(Ye,null),{attributes:p,setAttributes:g})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:null!==(d=v([p.containerWidth,p.containerWidthTablet,p.containerWidthMobile]))&&void 0!==d?d:"100%",onChange:e=>h(e,["containerWidth","containerWidthTablet","containerWidthMobile"])})),(0,i.createElement)(M.Z,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:null!==(u=v([p.height,p.heightTablet,p.heightMobile]))&&void 0!==u?u:100,onChange:e=>h(e,["height","heightTablet","heightMobile"]),min:50,max:800,allowReset:!0})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Position","otter-blocks"),value:p.alingment,onChange:e=>g({alignment:e||void 0}),options:[{label:(0,o.__)("Default","otter-blocks"),value:""},{label:(0,o.__)("Left","otter-blocks"),value:"flex-start"},{label:(0,o.__)("Center","otter-blocks"),value:"center"},{label:(0,o.__)("Right","otter-blocks"),value:"flex-end"}]}),p.hasSeparators&&(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Separator Alignment","otter-blocks"),value:p.separatorAlignment,onChange:e=>{g(e?{separatorAlignment:e}:{separatorAlignment:void 0})},options:[{label:(0,o.__)("Default","otter-blocks"),value:""},{label:(0,o.__)("Center","otter-blocks"),value:"center"}]})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Time Value Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:je,withReset:!0,value:v([p.valueFontSize,p.valueFontSizeTablet,p.valueFontSizeMobile]),onChange:e=>h(e,["valueFontSize","valueFontSizeTablet","valueFontSizeMobile"])})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Time Value Font Weight","otter-blocks"),value:p.valueFontWeight,onChange:e=>g({valueFontWeight:e||void 0}),options:Ue}),(0,i.createElement)(M.Z,{label:(0,o.__)("Label Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:je,withReset:!0,value:v([p.labelFontSize,p.labelFontSizeTablet,p.labelFontSizeMobile]),onChange:e=>h(e,["labelFontSize","labelFontSizeTablet","labelFontSizeMobile"])})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Label Font Weight","otter-blocks"),value:p.labelFontWeight,onChange:e=>g({labelFontWeight:e||void 0}),options:Ue})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:p.backgroundColor,onChange:e=>g({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:p.valueColor,onChange:e=>g({valueColor:e}),label:(0,o.__)("Time Value","otter-blocks")},{value:p.labelColor,onChange:e=>g({labelColor:e}),label:(0,o.__)("Label","otter-blocks")},{value:p.separatorColor,onChange:e=>g({separatorColor:e}),label:(0,o.__)("Separator","otter-blocks")},{value:p.borderColor,onChange:e=>g({borderColor:e}),label:(0,o.__)("Border","otter-blocks")}]},(0,i.createElement)(s.ContrastChecker,{textColor:p.backgroundColor,backgroundColor:p.valueColor})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Type","otter-blocks"),value:null!==(b=p.borderStyle)&&void 0!==b?b:"solid",onChange:e=>g({borderStyle:"solid"===e?void 0:e}),options:[{label:(0,o.__)("None","otter-blocks"),value:"none"},{label:(0,o.__)("Solid","otter-blocks"),value:"solid"},{label:(0,o.__)("Double","otter-blocks"),value:"double"},{label:(0,o.__)("Dotted","otter-blocks"),value:"dotted"},{label:(0,o.__)("Dashed","otter-blocks"),value:"dashed"}]}),"none"!==p.borderStyle&&(0,i.createElement)(M.Z,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:null!==(m=v([p.borderWidth,p.borderWidthTablet,p.borderWidthMobile]))&&void 0!==m?m:2,onChange:e=>h(e,["borderWidth","borderWidthTablet","borderWidthMobile"]),min:0,max:50,allowReset:!0})),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Radius","otter-blocks"),values:(0,x.Dv)(p.borderRadiusBox,{left:"0px",right:"0px",bottom:"0px",top:"0px"}),onChange:e=>{g({borderRadiusBox:(0,x.cg)(e,{left:"0px",right:"0px",bottom:"0px",top:"0px"})})},id:"o-border-raduis-box"})))};const Je=1e3,Qe=6e4,Xe=36e5,et=864e5,tt=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return null!==(e=parseInt((null==t?void 0:t.days)||"0")*et+parseInt((null==t?void 0:t.hours)||"0")*Xe+parseInt((null==t?void 0:t.minutes)||"0")*Qe+parseInt((null==t?void 0:t.seconds)||"0")*Je)&&void 0!==e?e:0},lt=(e,t)=>{var l;null!==(l=e)&&void 0!==l||(e=0);const a=Math.floor(e/et),n=Math.floor(e/Xe%24),r=Math.floor(e/Qe%60),i=Math.floor(e/Je%60);return[{tag:"day",name:1<a?(0,o.__)("Days","otter-blocks"):(0,o.__)("Day","otter-blocks"),value:a},{tag:"hour",name:1<n?(0,o.__)("Hours","otter-blocks"):(0,o.__)("Hour","otter-blocks"),value:n},{tag:"minute",name:1<r?(0,o.__)("Minutes","otter-blocks"):(0,o.__)("Minute","otter-blocks"),value:r},{tag:"second",name:1<i?(0,o.__)("Seconds","otter-blocks"):(0,o.__)("Second","otter-blocks"),value:i}].filter((e=>{var l;let{tag:o}=e;return!(null!=t&&null!==(l=t.exclude)&&void 0!==l&&l.includes(o))})).map((e=>(null!=t&&t.keepNeg||(e.value=Math.max(0,e.value)),e)))},ot=e=>{let{name:t,value:l,tag:o}=e;return(0,i.createElement)("div",{name:o,className:g()("otter-countdown__display-area",{"is-main-component":"separator"!==o})},(0,i.createElement)("div",{className:"otter-countdown__value"},l),(0,i.createElement)("div",{className:"otter-countdown__label"},t))};var at=e=>{var t;let{time:l,settings:o,hasSeparators:a}=e;const n=4===(null==o||null===(t=o.exclude)||void 0===t?void 0:t.length)?lt(null!=l?l:0,{}):lt(null!=l?l:0,{exclude:null==o?void 0:o.exclude}),r=a?(0,x.S3)(n,{name:"sep",value:":",tag:"separator"}):n,s=null==r?void 0:r.map(((e,t)=>(0,i.createElement)(ot,(0,Y.Z)({},e,{key:t}))));return(0,i.createElement)("div",{className:"otter-countdown__container"},void 0!==l&&(0,i.createElement)("div",{className:"otter-countdown__display"},s))};const{attributes:nt}=Ve,rt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px";return(0,K.isNumber)(e)?`${e}${t}`:e};const it=e=>{let{name:t,value:l,tag:o}=e;return(0,i.createElement)("div",{name:o,className:g()("otter-countdown__display-area",{"is-main-component":"separator"!==o})},(0,i.createElement)("div",{className:"otter-countdown__value"},l),(0,i.createElement)("div",{className:"otter-countdown__label"},t))},st=e=>{let{time:t,hasSeparators:l}=e;const o=l?(0,x.S3)(t,{name:"sep",value:":",tag:"separator"}):t,a=null==o?void 0:o.map(((e,t)=>(0,i.createElement)(it,(0,Y.Z)({},e,{key:t}))));return void 0!==t?(0,i.createElement)("div",{className:"otter-countdown__container"},(0,i.createElement)("div",{className:"otter-countdown__display"},a)):(0,i.createElement)(i.Fragment,null)};const{name:ct}=Ve;(0,a.registerBlockType)(ct,{...Ve,title:(0,o.__)("Countdown","otter-blocks"),description:(0,o.__)("Set a countdown for a date. Powered by Otter.","otter-blocks"),icon:Ie.Z,keywords:["countdown","time","counter"],edit:e=>{var t;let{attributes:l,setAttributes:a,clientId:n}=e;const[r,d]=(0,i.useState)(0);(0,i.useEffect)((()=>{const e=(0,L.blockInit)(n,nt);return()=>e(l.id)}),[l.id]),(0,i.useEffect)((()=>{if(void 0===l.borderRadiusBox&&(l.borderRadius||l.borderRadiusBottomLeft||l.borderRadiusTopRight||l.borderRadiusTopLeft||l.borderRadiusBottomRight)){const e=(0,K.pickBy)("linked"===(null==l?void 0:l.borderRadiusType)?{left:rt(l.borderRadius,"%"),right:rt(l.borderRadius,"%"),bottom:rt(l.borderRadius,"%"),top:rt(l.borderRadius,"%")}:{left:rt(l.borderRadiusBottomLeft,"%"),right:rt(l.borderRadiusTopRight,"%"),bottom:rt(l.borderRadiusBottomRight,"%"),top:rt(l.borderRadiusTopLeft,"%")},(e=>e));(0,K.isEmpty)(e)||a({borderRadiusBox:e,borderRadius:void 0,borderRadiusBottomLeft:void 0,borderRadiusTopRight:void 0,borderRadiusBottomRight:void 0,borderRadiusTopLeft:void 0,borderRadiusType:void 0})}}),[]),(0,i.useEffect)((()=>{let e;return"timer"!==l.mode&&(e=setInterval((()=>{if(l.date){const e=1e3*Ge()(l.date+(0,x.EP)()).unix();d(e-Date.now())}}),500)),()=>{clearInterval(e)}}),[l.date,l.mode]);const u={"--border-radius":(0,x.bv)(l.borderRadiusBox),"--border-style":l.borderStyle,"--background-color":l.backgroundColor,"--border-color":l.borderColor,"--container-width":l.containerWidth,"--container-width-tablet":l.containerWidthTablet,"--container-width-mobile":l.containerWidthMobile,"--height":rt(l.height),"--height-tablet":rt(l.heightTablet),"--height-mobile":rt(l.heightMobile),"--border-width":rt(l.borderWidth),"--border-width-tablet":rt(l.borderWidthTablet),"--border-width-mobile":rt(l.borderWidthMobile),"--gap":rt(l.gap),"--gap-tablet":rt(l.gapTablet),"--gap-mobile":rt(l.gapMobile),"--value-font-size":rt(l.valueFontSize),"--value-font-size-tablet":rt(l.valueFontSizeTablet),"--value-font-size-mobile":rt(l.valueFontSizeMobile),"--label-font-size":rt(l.labelFontSize),"--label-font-size-tablet":rt(l.labelFontSizeTablet),"--label-font-size-mobile":rt(l.labelFontSizeMobile),"--alignment":l.alignment,"--padding":(0,x.bv)(l.padding),"--padding-tablet":(0,x.bv)(l.paddingTablet),"--padding-mobile":(0,x.bv)(l.paddingMobile),"--value-font-weight":l.valueFontWeight,"--label-font-weight":l.labelFontWeight},[b,m]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{m([`.otter-countdown__display-area .otter-countdown__value {\n\t\t\t\tcolor: ${l.valueColor};\n\t\t\t}`,`.otter-countdown__display-area .otter-countdown__label {\n\t\t\t\tcolor: ${l.labelColor};\n\t\t\t}`,`.otter-countdown__display-area[name="separator"] .otter-countdown__value {\n\t\t\t\tcolor: ${l.separatorColor};\n\t\t\t}`,"center"===l.separatorAlignment?'\n\t\t\t.otter-countdown__display-area[name="separator"] .otter-countdown__label {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t':""])}),[l.valueColor,l.labelColor,l.separatorColor,l.separatorAlignment]);const p=(0,s.useBlockProps)({id:l.id,className:g()(b,"ready"),style:u});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Ke,{attributes:l,setAttributes:a}),(0,i.createElement)("div",p,(0,i.createElement)(at,{time:(()=>{switch(l.mode){case"timer":return tt(l.timer);case"interval":return((e,t)=>{if(!e||!t)return 0;const l=new Date(e).getTime();return new Date(t).getTime()-l})(l.startInterval,l.endInterval);default:return r}})(),settings:{exclude:null==l?void 0:l.exclude},hasSeparators:l.hasSeparators}),4===(null==l||null===(t=l.exclude)||void 0===t?void 0:t.length)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("br",null),(0,i.createElement)(c.Notice,{isDismissible:!1,status:"info"},(0,o.__)("The Countdown will be hidden in page","otter-blocks")))))},save:e=>{let{attributes:t}=e;const l=t.startInterval&&t.endInterval?{"data-intv-start":t.startInterval,"data-intv-end":t.endInterval}:{},o=s.useBlockProps.save({id:t.id,"data-date":t.date,"data-bhv":t.behaviour?t.behaviour:void 0,"data-redirect-link":"redirectLink"===t.behaviour&&t.redirectLink?t.redirectLink:void 0,"data-mode":t.mode?t.mode:void 0,"data-timer":(0,K.isEmpty)(t.timer)?void 0:(a=t.timer,tt(a).toString()),"data-on-end-action":t.onEndAction?t.onEndAction:void 0,...l});var a;return(0,i.createElement)("div",o,(0,i.createElement)(st,{time:lt(0,{exclude:null==t?void 0:t.exclude}),hasSeparators:null==t?void 0:t.hasSeparators}))},example:{attributes:{date:"2024-07-15T15:03:00"}}});var dt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/flip","title":"Flip Card","category":"themeisle-blocks","description":"Make a card with a flip effect. Powered by Otter.","keywords":["flip card","container","animation"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"isInverted":{"type":"boolean"},"title":{"type":"string"},"description":{"type":"string"},"animType":{"type":"string","default":"flipY"},"width":{"type":["number","string"]},"widthTablet":{"type":["string"]},"widthMobile":{"type":["string"]},"height":{"type":["number","string"]},"heightTablet":{"type":["string"]},"heightMobile":{"type":["string"]},"padding":{"type":["number","object"]},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"borderWidth":{"type":["number","object"]},"borderColor":{"type":"string"},"borderRadius":{"type":["number","object"]},"backgroundColor":{"type":"string"},"frontVerticalAlign":{"type":"string"},"frontHorizontalAlign":{"type":"string"},"backVerticalAlign":{"type":"string"},"frontMedia":{"type":"object"},"frontMediaWidth":{"type":["number","string"]},"frontMediaHeight":{"type":["number","string"]},"frontBackgroundImage":{"type":"object"},"frontBackgroundType":{"type":"string","default":"color"},"frontBackgroundColor":{"type":"string"},"frontBackgroundGradient":{"type":"string"},"frontBackgroundPosition":{"type":"object"},"frontBackgroundRepeat":{"type":"string"},"frontBackgroundAttachment":{"type":"string"},"frontBackgroundSize":{"type":"string"},"backBackgroundImage":{"type":"object"},"backBackgroundType":{"type":"string","default":"color"},"backBackgroundColor":{"type":"string"},"backBackgroundGradient":{"type":"string"},"backBackgroundPosition":{"type":"object"},"backBackgroundRepeat":{"type":"string"},"backBackgroundSize":{"type":"string"},"backBackgroundAttachment":{"type":"string"},"boxShadow":{"type":"boolean","default":false},"boxShadowColor":{"type":"string","default":"#000000"},"boxShadowColorOpacity":{"type":"number","default":50},"boxShadowBlur":{"type":"number","default":5},"boxShadowHorizontal":{"type":"number","default":0},"boxShadowVertical":{"type":"number","default":0},"titleFontSize":{"type":["number","string"]},"descriptionFontSize":{"type":["number","string"]},"titleColor":{"type":"string"},"descriptionColor":{"type":"string"},"frontContentType":{"type":"string"}},"editorStyle":"otter-flip-editor","style":"otter-flip-style"}');const ut={top:"flex-start",left:"flex-start",bottom:"flex-end",right:"flex-end",center:"center"},bt={"flex-start":"top",center:"center","flex-end":"bottom"},mt={"flex-start":"left",center:"center","flex-end":"right"},pt=(e,t)=>{if(e&&t)return`${bt[e]} ${mt[t]}`};var gt=e=>{let{attributes:t,setAttributes:l,currentSide:a}=e;const n=s.__experimentalBlockAlignmentMatrixControl||s.__experimentalBlockAlignmentMatrixToolbar;return(0,i.createElement)(s.BlockControls,null,("front"===a&&!Boolean(t.isInverted)||"back"===a&&Boolean(t.isInverted))&&(0,i.createElement)(c.Toolbar,null,(0,i.createElement)(n,{label:(0,o.__)("Change front side content position","otter-blocks"),value:pt(t.frontVerticalAlign,t.frontHorizontalAlign),onChange:e=>{const t=null==e?void 0:e.split(" ");l({frontVerticalAlign:null==ut?void 0:ut[null==t?void 0:t[0]],frontHorizontalAlign:null==ut?void 0:ut[null==t?void 0:t[1]]})}})))},ht=l(5452);const vt=e=>(0,K.isNumber)(e)?(0,x.nT)((0,x.Yj)(e)):e,yt=[{name:"14",size:"14px",slug:"14"},{name:"16",size:"16px",slug:"16"},{name:"18",size:"18px",slug:"18"},{name:"24",size:"24px",slug:"24"}];var kt=e=>{var t,l,a,n,d,u,b;let{attributes:m,setAttributes:p,currentSide:g,setSide:h}=e;const[v,y]=(0,i.useState)("settings"),{responsiveSetAttributes:k,responsiveGetAttributes:f}=S(p);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:v,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:y}),(0,i.createElement)("div",null,"settings"===v&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Flip Settings","otter-blocks")},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Flip Direction","otter-blocks"),value:m.animType,options:[{label:(0,o.__)("Bottom to Top","otter-blocks"),value:"flipX"},{label:(0,o.__)("Top to Bottom","otter-blocks"),value:"flipX-rev"},{label:(0,o.__)("Left to Right","otter-blocks"),value:"flipY"},{label:(0,o.__)("Right to Left","otter-blocks"),value:"flipY-rev"}],onChange:e=>p({animType:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Invert the Sides","otter-blocks"),checked:m.isInverted,onChange:e=>p({isInverted:e}),help:(0,o.__)("Use this to display the back side first.","otter-blocks")})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Front Side Content","otter-blocks"),initialOpen:!1},(0,i.createElement)(E.Z,{label:(0,o.__)("Content Type","otter-blocks"),options:[{label:(0,o.__)("None","otter-blocks"),value:"none"},{label:(0,o.__)("Image","otter-blocks"),value:"image"}],value:null!==(t=null==m?void 0:m.frontContentType)&&void 0!==t?t:"none",onChange:e=>{const t={frontContentType:(0,K.isEmpty)(e)||"none"===e?void 0:e};((0,K.isEmpty)(e)||"none"===e)&&(t.frontMedia=void 0),p(t)}}),"image"===m.frontContentType&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Media Image","otter-blocks"),help:(0,o.__)("Set an image as showcase.","otter-blocks")},null!==(l=m.frontMedia)&&void 0!==l&&l.url?(0,i.createElement)(c.BaseControl,null,(0,i.createElement)("img",{src:m.frontMedia.url,alt:m.frontMedia.alt,style:{border:"2px solid var( --wp-admin-theme-color)",maxHeight:"250px"}}),(0,i.createElement)(c.Button,{isSecondary:!0,onClick:()=>p({frontMedia:void 0})},(0,o.__)("Remove image","otter-blocks"))):(0,i.createElement)(s.MediaPlaceholder,{labels:{title:(0,o.__)("Media Image","otter-blocks")},accept:"image/*",allowedTypes:["image"],value:m.frontMedia,onSelect:e=>{var t,l;console.log(e),p({frontMedia:(0,K.pick)(e,["id","alt","url"]),frontMediaHeight:(0,x.Yj)(null==e||null===(t=e.sizes)||void 0===t?void 0:t.medium.height),frontMediaWidth:(0,x.Yj)(null==e||null===(l=e.sizes)||void 0===l?void 0:l.medium.width)})}})),(0,i.createElement)(c.__experimentalUnitControl,{onChange:e=>p({frontMediaWidth:e}),label:(0,o.__)("Media Width","otter-blocks"),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,value:(0,x.Yj)(m.frontMediaWidth)}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{onChange:e=>p({frontMediaHeight:e}),label:(0,o.__)("Media Height","otter-blocks"),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,value:(0,x.Yj)(m.frontMediaHeight)}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Alignment","otter-blocks"),initialOpen:!1},(0,i.createElement)(E.Z,{label:(0,o.__)("Sides","otter-blocks"),options:[{label:(0,o.__)("Front","otter-blocks"),value:"front"},{label:(0,o.__)("Back","otter-blocks"),value:"back"}],value:g,onChange:h}),"front"===g&&!Boolean(m.isInverted)||"back"===g&&Boolean(m.isInverted)?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Vertical Alignment","otter-blocks")},(0,i.createElement)(oe.Z,{options:[{icon:r.alignTop,value:"flex-start"},{icon:r.alignCenter,value:"center"},{icon:r.alignBottom,value:"flex-end"}],value:null!==(a=m.frontVerticalAlign)&&void 0!==a?a:"center",onChange:e=>p({frontVerticalAlign:e})})),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Horizontal Alignment","otter-blocks")},(0,i.createElement)(oe.Z,{options:[{icon:ee.Z,value:"flex-start"},{icon:te.Z,value:"center"},{icon:le.Z,value:"flex-end"}],value:null!==(n=m.frontHorizontalAlign)&&void 0!==n?n:"center",onChange:e=>p({frontHorizontalAlign:e})}))):(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Vertical Alignment","otter-blocks")},(0,i.createElement)(oe.Z,{options:[{icon:r.alignTop,value:"flex-start"},{icon:r.alignCenter,value:"center"},{icon:r.alignBottom,value:"flex-end"}],value:m.backVerticalAlign,onChange:e=>p({backVerticalAlign:e})})))),"style"===v&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(M.Z,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:null!==(d=f([(0,K.isNumber)(m.width)?(0,x.Yj)(m.width):null==m?void 0:m.width,m.widthTablet,null==m?void 0:m.widthMobile]))&&void 0!==d?d:"100%",onChange:e=>k(e,["width","widthTablet","widthMobile"],m.width),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,allowReset:!0}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Height","otter-blocks"),value:null!==(u=f([(0,K.isNumber)(m.height)?(0,x.Yj)(m.height):null==m?void 0:m.height,m.heightTablet,null==m?void 0:m.heightMobile]))&&void 0!==u?u:"300px",onChange:e=>k(e,["height","heightTablet","heightMobile"],m.height),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,allowReset:!0,units:[{default:300,label:"px",value:"px"},{default:20,label:"em",value:"em"},{default:20,label:"rem",value:"rem"},{default:30,label:"vw",value:"vw"},{default:35,label:"vh",value:"vh"}]}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:null!==(b=f([null==m?void 0:m.padding,m.paddingTablet,null==m?void 0:m.paddingMobile]))&&void 0!==b?b:(0,K.isNumber)(m.padding)?(0,x.nT)((0,x.Yj)(m.padding)):(0,x.nT)("20px"),onChange:e=>{let t={};"object"==typeof e&&(t=Object.fromEntries(Object.entries((0,K.pick)(e,["top","bottom","left","right"])).filter((e=>{let[t,l]=e;return null!=l})))),(0,K.isEmpty)(t)&&(t=void 0),k(t,["padding","paddingTablet","paddingMobile"])},allowReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography Front Side","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Title","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{value:(0,x.Yj)(m.titleFontSize),onChange:e=>p({titleFontSize:e}),fontSizes:[...yt,{name:"32",size:"32px",slug:"32"}],allowReset:!0})),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Description","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{value:vt(m.descriptionFontSize),onChange:e=>p({descriptionFontSize:e}),fontSizes:[...yt,{name:"28",size:"28px",slug:"28"}],allowReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Front Side","otter-blocks"),initialOpen:!1},(0,i.createElement)(ht.Z,{backgroundType:m.frontBackgroundType,backgroundColor:m.frontBackgroundColor,image:m.frontBackgroundImage,gradient:m.frontBackgroundGradient,focalPoint:m.frontBackgroundPosition,backgroundAttachment:m.frontBackgroundAttachment,backgroundRepeat:m.frontBackgroundRepeat,backgroundSize:m.frontBackgroundSize,changeBackgroundType:e=>p({frontBackgroundType:e}),changeImage:e=>{p({frontBackgroundImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>p({frontBackgroundImage:void 0}),changeColor:e=>p({frontBackgroundColor:e}),changeGradient:e=>p({frontBackgroundGradient:e}),changeBackgroundAttachment:e=>p({frontBackgroundAttachment:e}),changeBackgroundRepeat:e=>p({frontBackgroundRepeat:e}),changeFocalPoint:e=>p({frontBackgroundPosition:e}),changeBackgroundSize:e=>p({frontBackgroundSize:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Back Side","otter-blocks"),initialOpen:!1},(0,i.createElement)(ht.Z,{backgroundType:m.backBackgroundType,backgroundColor:m.backBackgroundColor,image:m.backBackgroundImage,gradient:m.backBackgroundGradient,focalPoint:m.backBackgroundPosition,backgroundAttachment:m.backBackgroundAttachment,backgroundRepeat:m.backBackgroundRepeat,backgroundSize:m.backBackgroundSize,changeBackgroundType:e=>p({backBackgroundType:e}),changeImage:e=>{p({backBackgroundImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>p({backBackgroundImage:void 0}),changeColor:e=>p({backBackgroundColor:e}),changeGradient:e=>p({backBackgroundGradient:e}),changeBackgroundAttachment:e=>p({backBackgroundAttachment:e}),changeBackgroundRepeat:e=>p({backBackgroundRepeat:e}),changeFocalPoint:e=>p({backBackgroundPosition:e}),changeBackgroundSize:e=>p({backBackgroundSize:e})})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:m.borderColor,onChange:e=>p({borderColor:e}),label:(0,o.__)("Border Color","otter-blocks")},{value:m.titleColor,onChange:e=>p({titleColor:e}),label:(0,o.__)("Title Color","otter-blocks")},{value:m.descriptionColor,onChange:e=>p({descriptionColor:e}),label:(0,o.__)("Description Color","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Width","otter-blocks"),values:(0,x.Dv)(vt(m.borderWidth),(0,x.nT)("3px")),onChange:e=>{p({borderWidth:(0,x.cg)(e,{left:"3px",right:"3px",bottom:"3px",top:"3px"})})},allowReset:!0}),(0,i.createElement)(c.__experimentalBoxControl,{id:"o-border-raduis-box",label:(0,o.__)("Border Radius","otter-blocks"),values:(0,x.Dv)(vt(m.borderRadius),(0,x.nT)("10px")),onChange:e=>{p({borderRadius:(0,x.cg)(e,{left:"10px",right:"10px",bottom:"10px",top:"10px"})})},allowReset:!0}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Shadow Properties","otter-blocks"),checked:m.boxShadow,onChange:e=>p({boxShadow:e})}),m.boxShadow&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Color","otter-blocks"),colorValue:m.boxShadowColor,onColorChange:e=>{var t,l;p({boxShadowColor:100>m.boxShadowColorOpacity&&null!==(t=m.boxShadowColor)&&void 0!==t&&t.includes("var(")?getComputedStyle(document.documentElement,null).getPropertyValue(null==e||null===(l=e.replace("var(",""))||void 0===l?void 0:l.replace(")","")):e})}}),(0,i.createElement)(Q.Z,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:m.boxShadowColorOpacity,onChange:e=>{var t;const l={boxShadowColorOpacity:e};100>e&&null!==(t=m.boxShadowColor)&&void 0!==t&&t.includes("var(")&&(l.boxShadowColor=getComputedStyle(document.documentElement,null).getPropertyValue(m.boxShadowColor.replace("var(","").replace(")",""))),p(l)},min:0,max:100,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:m.boxShadowBlur,onChange:e=>p({boxShadowBlur:e}),min:0,max:100,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:m.boxShadowHorizontal,onChange:e=>p({boxShadowHorizontal:e}),min:-100,max:100,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:m.boxShadowVertical,onChange:e=>p({boxShadowVertical:e}),min:-100,max:100,allowReset:!0})))))),(0,i.createElement)(C.p,null))};const{attributes:ft}=dt;const{name:_t}=dt;(0,a.registerBlockType)(_t,{...dt,title:(0,o.__)("Flip Card","otter-blocks"),description:(0,o.__)("Make a card with a flip effect. Powered by Otter.","otter-blocks"),icon:Be.Z,keywords:["flip card","container","animation"],edit:e=>{var t,l,a,n,r,d,u,b,m,p,h,v,y,k,f,_,w,C,E;let{attributes:T,setAttributes:M,clientId:B,isSelected:z}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(B,ft);return()=>e(T.id)}),[T.id]);const[P,R]=(0,i.useState)("front"),{responsiveGetAttributes:F}=S(M),O={"--width":null!==(t=F([(0,K.isNumber)(T.width)?(0,x.Yj)(T.width):null==T?void 0:T.width,T.widthTablet,null==T?void 0:T.widthMobile]))&&void 0!==t?t:"100%","--width-tablet":T.widthTablet,"--width-mobile":T.widthMobile,"--height":null!==(l=F([(0,K.isNumber)(T.height)?(0,x.Yj)(T.height):null==T?void 0:T.height,T.heightTablet,null==T?void 0:T.heightMobile]))&&void 0!==l?l:"300px","--height-tablet":T.heightTablet,"--height-mobile":T.heightMobile,"--border-width":void 0!==T.borderWidth&&(0,x.um)((0,x.Dv)((0,x.nT)((0,x.Yj)(T.borderWidth)),{left:"3px",right:"3px",bottom:"3px",top:"3px"})),"--border-color":T.borderColor,"--border-radius":void 0!==T.borderRadius&&(0,x.um)((0,x.Dv)((0,x.nT)((0,x.Yj)(T.borderRadius)),{left:"10px",right:"10px",bottom:"10px",top:"10px"})),"--front-background":(0,x.nG)([["gradient"===T.frontBackgroundType&&T.frontBackgroundGradient,T.frontBackgroundGradient],["image"===T.frontBackgroundType&&(null===(a=T.frontBackgroundImage)||void 0===a?void 0:a.url),`url( ${null===(n=T.frontBackgroundImage)||void 0===n?void 0:n.url} ) ${T.frontBackgroundRepeat||"repeat"} ${T.frontBackgroundAttachment||"scroll"} ${Math.round(null!==(r=null===(d=T.frontBackgroundPosition)||void 0===d?void 0:d.x)&&void 0!==r?r:50)}% ${Math.round(null!==(u=null===(b=T.frontBackgroundPosition)||void 0===b?void 0:b.y)&&void 0!==u?u:50)}%/${T.frontBackgroundSize||"auto"}`],[T.frontBackgroundColor]]),"--back-background":(0,x.nG)([["gradient"===T.backBackgroundType&&T.backBackgroundGradient,T.backBackgroundGradient],["image"===T.backBackgroundType&&(null===(m=T.backBackgroundImage)||void 0===m?void 0:m.url),`url( ${null===(p=T.backBackgroundImage)||void 0===p?void 0:p.url} ) ${T.backBackgroundRepeat||"repeat"} ${T.backBackgroundAttachment||"scroll"} ${Math.round(null!==(h=null===(v=T.backBackgroundPosition)||void 0===v?void 0:v.x)&&void 0!==h?h:50)}% ${Math.round(null!==(y=null===(k=T.backBackgroundPosition)||void 0===k?void 0:k.y)&&void 0!==y?y:50)}%/${T.backBackgroundSize||"auto"}`],[T.backBackgroundColor]]),"--box-shadow":T.boxShadow&&`${T.boxShadowHorizontal}px ${T.boxShadowVertical}px ${T.boxShadowBlur}px ${T.boxShadowColor?T.boxShadowColor.includes("#")&&null!=T&&T.boxShadowColorOpacity&&0<=T.boxShadowColorOpacity?Z()(T.boxShadowColor,T.boxShadowColorOpacity||1e-5):T.boxShadowColor:Z()("#000000",void 0!==T.boxShadowColorOpacity?T.boxShadowColorOpacity||1e-5:1)}`,"--front-vertical-align":T.frontVerticalAlign,"--front-horizontal-align":T.frontHorizontalAlign,"--back-vertical-align":T.backVerticalAlign,"--front-media-width":(0,x.Yj)(T.frontMediaWidth),"--front-media-height":(0,x.Yj)(T.frontMediaHeight),"--padding":null!==(f=F([null==T?void 0:T.padding,T.paddingTablet,null==T?void 0:T.paddingMobile]))&&void 0!==f?f:(0,K.isNumber)(T.padding)?(0,x.nT)((0,x.Yj)(T.padding)):(0,x.nT)("20px"),"--padding-tablet":(0,x.um)(null==T?void 0:T.paddingTablet),"--padding-mobile":(0,x.um)(null==T?void 0:T.paddingMobile)},[N,A]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{A([`.o-flip-inner {\n\t\t\t\ttransform: ${"back"===P?"var( --flip-anim )":"unset"};\n\t\t\t}`,`.o-flip-front .o-flip-content h3 {\n\t\t\t\tcolor: ${T.titleColor};\n\t\t\t\t${T.titleFontSize&&`font-size: ${(0,x.Yj)(T.titleFontSize)}`}\n\t\t\t}`,`.o-flip-front .o-flip-content p {\n\t\t\t\tcolor: ${T.descriptionColor};\n\t\t\t\t${T.descriptionFontSize&&`font-size: ${(0,x.Yj)(T.descriptionFontSize)}`}\n\t\t\t}`])}),[P,T.titleFontSize,T.descriptionFontSize,T.titleColor,T.descriptionColor]);const H=(0,s.useBlockProps)({id:T.id,className:g()({flipX:"flipX"===T.animType,flipY:"flipY"===T.animType,"flipY-rev":"flipY-rev"===T.animType,"flipX-rev":"flipX-rev"===T.animType},N),style:O});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(gt,{attributes:T,setAttributes:M,currentSide:P}),(0,i.createElement)(kt,{attributes:T,setAttributes:M,currentSide:P,setSide:R}),(0,i.createElement)("div",H,(0,i.createElement)("div",{className:g()("o-flip-inner",{invert:T.isInverted})},(0,i.createElement)("div",{className:"o-flip-front"},(0,i.createElement)("div",{className:"o-flip-content"},(null===(_=T.frontMedia)||void 0===_?void 0:_.url)&&(0,i.createElement)("img",{className:"o-img",srcSet:null===(w=T.frontMedia)||void 0===w?void 0:w.url}),(0,i.createElement)(s.RichText,{tagName:"h3",value:null!==(C=T.title)&&void 0!==C?C:"",onChange:e=>M({title:e}),placeholder:(0,o.__)("Insert a title","otter-blocks")}),(0,i.createElement)(s.RichText,{tagName:"p",value:null!==(E=T.description)&&void 0!==E?E:"",onChange:e=>M({description:e}),placeholder:(0,o.__)("Insert a description","otter-blocks")}))),(0,i.createElement)("div",{className:"o-flip-back"},(0,i.createElement)(s.InnerBlocks,{renderAppender:z?s.InnerBlocks.ButtonBlockAppender:void 0,template:[["core/heading",{content:"Lorem ipsum",level:3}],["core/paragraph",{content:"Tellus posuere sem fermentum facilisis platea."}],["core/buttons",{layout:{type:"flex",justifyContent:"center"},innerBlocks:[{name:"core/button",attributes:{className:"is-style-outline",text:"Learn more"}}]}]]}))),z&&(0,i.createElement)("div",{className:"o-switcher"},(0,i.createElement)(c.Button,{isPrimary:!0,onClick:()=>R("back"===P?"front":"back")},"back"===P?(0,o.__)("Flip to Front","otter-blocks"):(0,o.__)("Flip to Back","otter-blocks")))))},save:e=>{var t,l,o,a;let{attributes:n}=e;const r=s.useBlockProps.save({id:n.id,className:g()("anim",{flipX:"flipX"===n.animType,flipY:"flipY"===n.animType,"flipY-rev":"flipY-rev"===n.animType,"flipX-rev":"flipX-rev"===n.animType})});return(0,i.createElement)("div",r,(0,i.createElement)("div",{className:g()("o-flip-inner",{invert:n.isInverted})},(0,i.createElement)("div",{className:"o-flip-front"},(0,i.createElement)("div",{className:"o-flip-content"},(null===(t=n.frontMedia)||void 0===t?void 0:t.url)&&(0,i.createElement)("img",{className:"o-img",src:null===(l=n.frontMedia)||void 0===l?void 0:l.url,srcSet:null===(o=n.frontMedia)||void 0===o?void 0:o.url,alt:null===(a=n.frontMedia)||void 0===a?void 0:a.alt}),(0,i.createElement)(s.RichText.Content,{tagName:"h3",value:n.title}),(0,i.createElement)(s.RichText.Content,{tagName:"p",value:n.description}))),(0,i.createElement)("div",{className:"o-flip-back"},(0,i.createElement)(s.InnerBlocks.Content,null))))},example:{attributes:{}}});var wt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/font-awesome-icons","title":"Icon","category":"themeisle-blocks","description":"Add icons from Font Awesome or ThemeIsle Icons library to your website. Powered by Otter.","keywords":["font awesome","dashicons","icons"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"align":{"type":["string","object"]},"library":{"type":"string","default":"fontawesome"},"prefix":{"type":"string","default":"fab"},"icon":{"type":"string","default":"themeisle"},"link":{"type":"string"},"newTab":{"type":"boolean","default":false},"fontSize":{"type":["number","string"],"default":"16px"},"padding":{"type":"number","default":5},"margin":{"type":"number","default":5},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"borderColor":{"type":"string"},"backgroundColorHover":{"type":"string"},"textColorHover":{"type":"string"},"borderColorHover":{"type":"string"},"borderSize":{"type":"number","default":0},"borderRadius":{"type":"number","default":0},"isSynced":{"type":"array"}},"editorStyle":"otter-font-awesome-editor","style":"otter-font-awesome-style"}');const Ct={prefix:{type:"string",default:"fab"},icon:{type:"string",default:"themeisle"},fontSize:{type:"number",default:16},padding:{type:"number",default:5},margin:{type:"number",default:5},backgroundColor:{type:"string"},textColor:{type:"string"},borderColor:{type:"string"},borderSize:{type:"number",default:0},borderRadius:{type:"number",default:0}},Et=[{attributes:{id:{type:"string"},align:{type:"string"},library:{type:"string",default:"fontawesome"},prefix:{type:"string",default:"fab"},icon:{type:"string",default:"themeisle"},link:{type:"string"},newTab:{type:"boolean",default:!1},fontSize:{type:"number",default:16},padding:{type:"number",default:5},margin:{type:"number",default:5},backgroundColor:{type:"string"},textColor:{type:"string"},borderColor:{type:"string"},backgroundColorHover:{type:"string"},textColorHover:{type:"string"},borderColorHover:{type:"string"},borderSize:{type:"number",default:0},borderRadius:{type:"number",default:0},isSynced:{type:"array"}},supports:{align:["left","center","right"]},save:e=>{let{attributes:t}=e;const l=Se.ZP.icons[t.icon],o=s.useBlockProps.save({id:t.id});return(0,i.createElement)("p",o,(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container"},t.link?(0,i.createElement)("a",{href:t.link,target:t.newTab?"_blank":"_self",rel:"noopener noreferrer"},"themeisle-icons"===t.library?(0,i.createElement)(l,null):(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`})):"themeisle-icons"===t.library?(0,i.createElement)(l,null):(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`})))}},{attributes:Ct,supports:{align:["left","center","right"]},migrate:e=>{let t="center";return e.className.includes("alignleft")&&(t="left"),e.className.includes("aligncenter")&&(t="center"),e.className.includes("alignright")&&(t="right"),{...e,align:t,className:""}},save:e=>{let{attributes:t,className:l}=e;const o={borderRadius:t.borderRadius+"%",fontSize:t.fontSize+"px",padding:t.padding+"px"},a={color:t.textColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderRadius:t.borderRadius+"%",borderStyle:"solid",borderWidth:t.borderSize+"px",display:"inline-block",margin:t.margin+"px"};return(0,i.createElement)("p",{className:l,style:{textAlign:t.align}},(0,i.createElement)("span",{className:`${l}-container`,style:a},(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`,style:o})))}},{attributes:{...Ct,align:{type:"string"}},save:e=>{let{attributes:t,className:l}=e;const o={borderRadius:t.borderRadius+"%",fontSize:t.fontSize+"px",padding:t.padding+"px"},a={color:t.textColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderRadius:t.borderRadius+"%",borderStyle:"solid",borderWidth:t.borderSize+"px",display:"inline-block",margin:t.margin+"px"};return(0,i.createElement)("p",{className:l,style:{textAlign:t.align}},(0,i.createElement)("span",{className:"undefined-container",style:a},(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`,style:o})))}},{attributes:{...Ct,id:{type:"string"},align:{type:"string"},link:{type:"string"},newTab:{type:"boolean",default:!1},backgroundColorHover:{type:"string"},textColorHover:{type:"string"},borderColorHover:{type:"string"}},save:e=>{let{attributes:t,className:l}=e;const o={borderRadius:t.borderRadius+"%",borderStyle:"solid",borderWidth:t.borderSize+"px",display:"inline-block",margin:t.margin+"px"},a={borderRadius:t.borderRadius+"%",fontSize:t.fontSize+"px",padding:t.padding+"px"},n=()=>(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`,style:a});return(0,i.createElement)("p",{className:l,id:t.id,style:{textAlign:t.align}},(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container",style:o},t.link?(0,i.createElement)("a",{href:t.link,target:t.newTab?"_blank":"_self",style:{color:t.textColor},rel:"noopener noreferrer"},(0,i.createElement)(n,null)):(0,i.createElement)(n,null)))}}];var xt=Et;const St={left:"flex-start",center:"center",right:"flex-end","flex-start":"left","flex-end":"right"};var Tt=e=>{var t,l,o,a;let{attributes:n,setAttributes:r,isSelected:c}=e;const{responsiveSetAttributes:d,responsiveGetAttributes:u}=S(r);return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(s.AlignmentToolbar,{value:St[null!==(t=u([null===(l=Rt(n.align))||void 0===l?void 0:l.desktop,null===(o=Rt(n.align))||void 0===o?void 0:o.tablet,null===(a=Rt(n.align))||void 0===a?void 0:a.mobile]))&&void 0!==t?t:"center"],onChange:e=>d(""===e?void 0:St[e],["align.desktop","align.tablet","align.mobile"],Rt(n.align))}),(0,i.createElement)(Ce.Z,{isSelected:c,setAttributes:r,url:n.link,opensInNewTab:n.newTab}))},Mt=l(3159);const Bt=[{name:(0,o.__)("Small","otter-blocks"),size:"16px",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"32px",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"48px",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"60px",slug:"xl"}];var zt=e=>{var t,l,a,n,r;let{attributes:d,setAttributes:u,getValue:b}=e;const[m,p]=(0,i.useState)(!1),{responsiveSetAttributes:g,responsiveGetAttributes:h}=S(u);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Icon","otter-blocks")},(0,i.createElement)(_.Z,{label:(0,o.__)("Icon Picker","otter-blocks"),library:d.library,prefix:d.prefix,icon:d.icon,changeLibrary:e=>{u({library:e,icon:"fontawesome"===e?"themeisle":"balance",prefix:"fab"})},onChange:e=>{u("object"==typeof e?{icon:e.name,prefix:e.prefix}:{icon:e})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(Mt.Z,{field:"fontSize",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(c.FontSizePicker,{fontSizes:Bt,withReset:!0,value:null!==(t=d.fontSize)&&void 0!==t?t:"16px",onChange:e=>u({fontSize:e})})),(0,i.createElement)(Mt.Z,{field:"padding",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Padding","otter-blocks"),value:b("padding"),initialPosition:5,onChange:e=>u({padding:e}),step:.1,min:0,max:100})),(0,i.createElement)(Mt.Z,{field:"margin",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Margin","otter-blocks"),value:b("margin"),initialPosition:5,onChange:e=>u({margin:e}),step:.1,min:0,max:100})),(0,i.createElement)(M.Z,{label:(0,o.__)("Alignment","otter-blocks"),className:"buttons-alignment-control"},(0,i.createElement)(oe.Z,{value:null!==(l=h([null===(a=Rt(d.align))||void 0===a?void 0:a.desktop,null===(n=Rt(d.align))||void 0===n?void 0:n.tablet,null===(r=Rt(d.align))||void 0===r?void 0:r.mobile]))&&void 0!==l?l:"center",onChange:e=>g(""===e?void 0:e,["align.desktop","align.tablet","align.mobile"],Rt(d.align)),options:[{icon:ee.Z,label:(0,o.__)("Left","otter-blocks"),value:"flex-start"},{icon:te.Z,label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:le.Z,label:(0,o.__)("Right","otter-blocks"),value:"flex-end"}],hasIcon:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ButtonGroup,null,(0,i.createElement)(c.Button,{isSmall:!0,isSecondary:m,isPrimary:!m,onClick:()=>p(!1)},(0,o.__)("Normal","otter-blocks")),(0,i.createElement)(c.Button,{isSmall:!0,isSecondary:!m,isPrimary:m,onClick:()=>p(!0)},(0,o.__)("Hover","otter-blocks"))),m?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Mt.Z,{field:"backgroundColorHover",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Background","otter-blocks"),colorValue:b("backgroundColorHover"),onColorChange:e=>u({backgroundColorHover:e})})),(0,i.createElement)(Mt.Z,{field:"textColorHover",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Icon","otter-blocks"),colorValue:b("textColorHover"),onColorChange:e=>u({textColorHover:e})})),(0,i.createElement)(s.ContrastChecker,{textColor:b("textColorHover"),backgroundColor:b("backgroundColorHover")}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Hover Border","otter-blocks"),colorValue:d.borderColorHover,onColorChange:e=>u({borderColorHover:e})})):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Mt.Z,{field:"backgroundColor",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Background","otter-blocks"),colorValue:b("backgroundColor"),onColorChange:e=>u({backgroundColor:e})})),(0,i.createElement)(Mt.Z,{field:"textColor",isSynced:d.isSynced,setAttributes:u},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Icon","otter-blocks"),colorValue:b("textColor"),onColorChange:e=>u({textColor:e})})),(0,i.createElement)(s.ContrastChecker,{textColor:b("textColor"),backgroundColor:b("backgroundColor")}),(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Border","otter-blocks"),colorValue:d.borderColor,onColorChange:e=>u({borderColor:e})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Size","otter-blocks"),value:d.borderSize,onChange:e=>u({borderSize:e}),step:.1,min:0,max:120}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),value:d.borderRadius,onChange:e=>u({borderRadius:e}),step:.1,min:0,max:100})))};const{attributes:Pt}=wt,Lt={right:"flex-end",center:"center",left:"flex-start"},Rt=e=>{var t;return(0,K.isString)(e)?{desktop:null!==(t=null==Lt?void 0:Lt[e])&&void 0!==t?t:"center"}:e};const{name:Ft}=wt;(0,a.registerBlockType)(Ft,{...wt,title:(0,o.__)("Icon","otter-blocks"),description:(0,o.__)("Add icons from Font Awesome or ThemeIsle Icons library to your website. Powered by Otter.","otter-blocks"),icon:r.faIcon,keywords:["font awesome","dashicons","icons"],deprecated:xt,edit:e=>{var t,l,o;let{name:a,attributes:n,setAttributes:r,isSelected:c,clientId:d}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(d,Pt);return()=>e(n.id)}),[n.id]);const u=Se.ZP.icons[n.icon],b=e=>(0,L.getDefaultValueByField)({name:a,field:e,defaultAttributes:Pt,attributes:n}),m={"--align":n.align,"--border-color":n.borderColor,"--border-size":void 0!==n.borderSize&&`${n.borderSize}px`,"--border-radius":void 0!==n.borderRadius&&`${n.borderRadius}%`,"--margin":void 0!==n.margin&&`${b("margin")}px`,"--padding":void 0!==n.padding&&`${b("padding")}px`,"--font-size":void 0!==n.fontSize&&((0,K.isNumber)(b("fontSize"))?`${b("fontSize")}px`:b("fontSize")),"--align":null===(t=Rt(n.align))||void 0===t?void 0:t.desktop,"--align-tablet":null===(l=Rt(n.align))||void 0===l?void 0:l.tablet,"--align-mobile":null===(o=Rt(n.align))||void 0===o?void 0:o.mobile},[p,g]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{g([`.wp-block-themeisle-blocks-font-awesome-icons-container {\n\t\t\t\tcolor: ${b("textColor")};\n\t\t\t\tbackground-color: ${b("backgroundColor")};\n\t\t\t}`,`.wp-block-themeisle-blocks-font-awesome-icons-container:hover {\n\t\t\t\tcolor: ${b("textColorHover")};\n\t\t\t\tbackground-color: ${b("backgroundColorHover")};\n\t\t\t\tborder-color: ${n.borderColorHover};\n\t\t\t}`,`.wp-block-themeisle-blocks-font-awesome-icons-container a {\n\t\t\t\tcolor: ${b("textColor")};\n\t\t\t}`,`.wp-block-themeisle-blocks-font-awesome-icons-container svg {\n\t\t\t\tfill: ${b("textColor")};\n\t\t\t}`,`.wp-block-themeisle-blocks-font-awesome-icons-container:hover svg {\n\t\t\t\tfill: ${b("textColorHover")};\n\t\t\t}`])}),[n.textColor,n.backgroundColor,n.textColorHover,n.backgroundColorHover,n.borderColorHover,n.fontSize]);const h=(0,s.useBlockProps)({id:n.id,style:m,className:p});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Tt,{attributes:n,setAttributes:r,isSelected:c}),(0,i.createElement)(zt,{attributes:n,setAttributes:r,getValue:b}),(0,i.createElement)("div",h,(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container"},"themeisle-icons"===n.library?(0,i.createElement)(u,null):(0,i.createElement)("i",{className:`${n.prefix} fa-${n.icon}`}))))},save:e=>{let{attributes:t}=e;const l=Se.ZP.icons[t.icon],o=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",o,(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container"},t.link?(0,i.createElement)("a",{href:t.link,target:t.newTab?"_blank":"_self",rel:"noopener noreferrer"},"themeisle-icons"===t.library?(0,i.createElement)(l,null):(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`})):"themeisle-icons"===t.library?(0,i.createElement)(l,null):(0,i.createElement)("i",{className:`${t.prefix} fa-${t.icon}`})))},example:{attributes:{fontSize:70}}});var Ot=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/form","title":"Form","category":"themeisle-blocks","description":"Display a form for your clients. Powered by Otter.","keywords":["business","form","email"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"subject":{"type":"string"},"emailTo":{"type":"string"},"fromName":{"type":"string"},"optionName":{"type":"string"},"hasCaptcha":{"type":"boolean"},"provider":{"type":"string","default":""},"listId":{"type":"string"},"action":{"type":"string","default":"subscribe"},"submitLabel":{"type":"string"},"sendUserEmail":{"type":"boolean"},"redirectLink":{"type":"string"},"inputPadding":{"type":"object"},"labelColor":{"type":"string"},"helpLabelColor":{"type":"string"},"inputRequiredColor":{"type":"string"},"inputBorderRadius":{"type":"number"},"inputBorderColor":{"type":"string"},"inputBorderWidth":{"type":"number"},"submitMessage":{"type":"string"},"inputWidth":{"type":"number"},"submitMessageColor":{"type":"string"},"submitMessageErrorColor":{"type":"string"},"submitBackgroundColor":{"type":"string"},"submitBackgroundColorHover":{"type":"string"},"submitColor":{"type":"string"},"inputGap":{"type":"number"},"inputColor":{"type":"string"},"inputBackgroundColor":{"type":"string"},"inputsGap":{"type":"number"},"labelFontSize":{"type":"string"},"submitFontSize":{"type":"string"},"messageFontSize":{"type":"string"},"helpFontSize":{"type":"string"},"inputFontSize":{"type":"string"},"submitStyle":{"type":"string"},"isSynced":{"type":"array"}},"supports":{"align":["wide","full"]},"editorStyle":"otter-form-editor","style":"otter-form-style","script":"otter-form"}');const Nt=[{attributes:{id:{type:"string"},subject:{type:"string"},emailTo:{type:"string"},optionName:{type:"string"},hasCaptcha:{type:"boolean"},provider:{type:"string",default:""},apiKey:{type:"string"},listId:{type:"string"},action:{type:"string",default:"subscribe"}},supports:{align:["wide","full"]},save:e=>{let{attributes:t}=e;const l=t.provider&&t.apiKey&&t.listId,a=s.useBlockProps.save({id:t.id,className:g()({"is-subscription":l&&"subscribe"===t.action,"can-submit-and-subscribe":l&&"submit-subscribe"===t.action,"has-captcha":t.hasCaptcha}),"data-email-subject":t.subject,"data-option-name":t.optionName});return(0,i.createElement)("div",a,(0,i.createElement)("div",{className:"otter-form__container"},(0,i.createElement)(s.InnerBlocks.Content,null),(0,i.createElement)("div",{className:"wp-block-button"},(0,i.createElement)("button",{className:"wp-block-button__link"},"subscribe"===t.action?(0,o.__)("Subscribe","otter-blocks"):(0,o.__)("Submit","otter-blocks")))))}}];var At=Nt,Ht=l(8101),It=l.n(Ht),Vt=l(6989),Dt=l.n(Vt);const Gt=e=>(null==e?void 0:e[1])&&e[0]!==e[1],$t=e=>Boolean(0<e.filter(Gt).length),Wt=[{name:(0,o.__)("Small","otter-blocks"),size:"0.875em",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"1em",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"1.125em",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"1.25em",slug:"xl"}];var Zt=e=>{var t,l,a,n,r,d,u,b,m,p,g;let{attributes:h,setAttributes:v}=e;const{listIDOptions:y,setListIDOptions:k,saveFormEmailOptions:f,saveIntegration:_,savedFormOptions:w,sendTestEmail:C,loadingState:E,formOptions:x,setFormOption:S,testService:T,hasEmailField:M}=(0,i.useContext)(qt),B=$t([[x.emailTo,null==w?void 0:w.email],[x.subject,null==w?void 0:w.emailSubject],[x.redirectLink,null==w?void 0:w.redirectLink],[x.fromName,null==w?void 0:w.fromName],[x.submitMessage,null==w?void 0:w.submitMessage],[x.cc,null==w?void 0:w.cc],[x.bcc,null==w?void 0:w.bcc],[x.hasCaptcha,null==w?void 0:w.hasCaptcha]]),z=$t([[x.provider,null==w||null===(t=w.integration)||void 0===t?void 0:t.provider],[x.listId,null==w||null===(l=w.integration)||void 0===l?void 0:l.listId],[x.action,null==w||null===(a=w.integration)||void 0===a?void 0:a.action]]);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Form Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:h.labelColor,onChange:e=>v({labelColor:e}),label:(0,o.__)("Label","otter-blocks")},{value:h.helpLabelColor,onChange:e=>v({helpLabelColor:e}),label:(0,o.__)("Help Label","otter-blocks")},{value:h.inputBorderColor,onChange:e=>v({inputBorderColor:e}),label:(0,o.__)("Border","otter-blocks")},{value:h.inputRequiredColor,onChange:e=>v({inputRequiredColor:e}),label:(0,o.__)("Label Required","otter-blocks")},{value:h.inputColor,onChange:e=>v({inputColor:e}),label:(0,o.__)("Input Text","otter-blocks")},{value:h.inputBackgroundColor,onChange:e=>v({inputBackgroundColor:e}),label:(0,o.__)("Input Background","otter-blocks")}]}),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Button Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:h.submitColor,onChange:e=>v({submitColor:e}),label:(0,o.__)("Submit Text","otter-blocks")},{value:h.submitBackgroundColor,onChange:e=>v({submitBackgroundColor:e}),label:(0,o.__)("Button Background","otter-blocks")},{value:h.submitBackgroundColorHover,onChange:e=>v({submitBackgroundColorHover:e}),label:(0,o.__)("Button Background on Hover","otter-blocks")},{value:h.submitMessageColor,onChange:e=>v({submitMessageColor:e}),label:(0,o.__)("Successful Message","otter-blocks")},{value:h.submitMessageErrorColor,onChange:e=>v({submitMessageErrorColor:e}),label:(0,o.__)("Error Message","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Label Styling","otter-blocks"),initialOpen:!1},(0,i.createElement)(Mt.Z,{field:"inputGap",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spacing","otter-blocks"),value:null!==(n=h.inputGap)&&void 0!==n?n:10,onChange:e=>v({inputGap:e}),allowReset:!0,step:.1,min:0,max:50,initialPositino:10})),(0,i.createElement)(Mt.Z,{field:"labelFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Font Size","otter-blocks"),fontSizes:Wt,withReset:!0,value:h.labelFontSize,onChange:e=>v({labelFontSize:e})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Input Styling","otter-blocks"),initialOpen:!1},(0,i.createElement)(Mt.Z,{field:"inputFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Input Font Size","otter-blocks"),fontSizes:Wt,withReset:!0,value:h.inputFontSize,onChange:e=>v({inputFontSize:e})})),(0,i.createElement)(Mt.Z,{field:"inputsGap",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Fields Spacing","otter-blocks"),value:null!==(r=h.inputsGap)&&void 0!==r?r:16,onChange:e=>v({inputsGap:e}),allowReset:!0,min:0,max:50,initialPosition:16})),(0,i.createElement)(Mt.Z,{field:"inputPadding",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Input Padding","otter-blocks"),values:null!==(d=h.inputPadding)&&void 0!==d?d:{top:"8px",right:"8px",bottom:"8px",left:"8px"},inputProps:{min:0,max:500},onChange:e=>v({inputPadding:e})})),(0,i.createElement)(Mt.Z,{field:"inputsBorderRadius",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),value:null!==(u=h.inputBorderRadius)&&void 0!==u?u:4,onChange:e=>v({inputBorderRadius:e}),allowReset:!0,step:.1,min:0,max:50})),(0,i.createElement)(Mt.Z,{field:"inputsBorderWidth",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Width","otter-blocks"),value:null!==(b=h.inputBorderWidth)&&void 0!==b?b:1,onChange:e=>v({inputBorderWidth:e}),allowReset:!0,step:.1,min:0,max:50})),(0,i.createElement)(Mt.Z,{field:"helpFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Help Text Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Help Font Size","otter-blocks"),fontSizes:Wt,withReset:!0,value:h.helpFontSize,onChange:e=>v({helpFontSize:e})})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Button","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),placeholder:(0,o.__)("Submit","otter-blocks"),value:h.submitLabel,onChange:e=>v({submitLabel:e}),help:(0,o.__)("Set the label for the submit button.","otter-blocks")}),(0,i.createElement)(Mt.Z,{field:"submitFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Font Size","otter-blocks"),fontSizes:Wt,withReset:!0,value:h.submitFontSize,onChange:e=>v({submitFontSize:e})})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Alignment","otter-blocks"),value:h.submitStyle,options:[{label:"Default",value:""},{label:"Right",value:"right"},{label:"Full",value:"full"}],onChange:e=>v({submitStyle:e})}),(0,i.createElement)(Mt.Z,{field:"messageFontSize",isSynced:h.isSynced,setAttributes:v},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Message Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{label:(0,o.__)("Message Font Size","otter-blocks"),fontSizes:Wt,withReset:!0,value:h.messageFontSize,onChange:e=>v({messageFontSize:e})})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Form Options","otter-blocks"),initialOpen:!1},"loading"===(null==E?void 0:E.formOptions)&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,i.createElement)(c.Spinner,null),(0,o.__)("Loading the options. Please wait...","otter-blocks")),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Email Subject","otter-blocks"),placeholder:(0,o.__)("A new submission","otter-blocks"),value:x.subject,onChange:e=>S({subject:e}),help:(0,o.__)("Customize the title of the email that you are gonna receive after a user submits the form.","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("From Name","otter-blocks"),value:x.fromName,onChange:e=>S({fromName:e}),help:(0,o.__)("Set the name of the sender. Some SMTP plugins might override this value.","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Email To","otter-blocks"),placeholder:(0,o.__)("Default is to admin site","otter-blocks"),type:"email",value:x.emailTo,onChange:e=>S({emailTo:e}),help:(0,o.__)("Send the form's data to another email. (Admin's email is default).","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Cc","otter-blocks"),placeholder:(0,o.__)("Send copies to","otter-blocks"),type:"text",value:x.cc,onChange:e=>S({cc:e}),help:(0,o.__)("Add emails separated by commas: example1@otter.com, example2@otter.com.","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Bcc","otter-blocks"),placeholder:(0,o.__)("Send copies to","otter-blocks"),type:"text",value:x.bcc,onChange:e=>S({bcc:e}),help:(0,o.__)("Add emails separated by commas: example1@otter.com, example2@otter.com.","otter-blocks")}),(0,i.createElement)(c.TextareaControl,{label:(0,o.__)("Submit Success Message","otter-blocks"),placeholder:(0,o.__)("Success","otter-blocks"),value:x.submitMessage,onChange:e=>S({submitMessage:e}),help:(0,o.__)("Show this message after the form was successfully submitted.","otter-blocks")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Redirect To","otter-blocks"),type:"url",placeholder:(0,o.__)("https://example.com","otter-blocks"),value:x.redirectLink,onChange:e=>S({redirectLink:e}),help:(0,o.__)("Redirect the user to another page when submit is successful.","otter-blocks")}),x.redirectLink&&(0,i.createElement)(c.ExternalLink,{href:x.redirectLink,style:{marginBottom:"10px",display:"block"}},(0,o.__)("Preview Redirect link.","otter-blocks")),(0,i.createElement)(c.Button,{isPrimary:!0,onClick:f,help:(0,o.__)("[WIP] Do not forget to save the options ","otter-blocks"),isBusy:"saving"===(null==E?void 0:E.formOptions)},"saving"===(null==E?void 0:E.formOptions)?(0,o.__)("Saving...","otter-blocks"):(0,o.__)("Apply Options","otter-blocks")),"done"===(null==E?void 0:E.formOptions)&&B&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,o.__)("You have made some modifications. Do not forget to save the options.","otter-blocks")),"error"===(null==E?void 0:E.formOptions)&&(0,i.createElement)("div",{className:"o-fetch-msg o-error"},(0,o.__)("An error has occurred while saving. Please try again.","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Test SMTP","otter-blocks"),initialOpen:!1},(0,i.createElement)("span",null,(0,o.__)("In order for the Form to work properly, make sure your SMTP server is set up. The test email will be send to the address from the field Email To on Form Options.","otter-blocks")),(0,i.createElement)(c.ExternalLink,{href:"https://www.wpbeginner.com/wp-tutorials/how-to-use-smtp-server-to-send-wordpress-emails/",style:{marginLeft:"3px"}},(0,o.__)("Learn more.","otter-blocks")),(0,i.createElement)("br",null),(0,i.createElement)(c.Button,{variant:"primary",isPrimary:!0,style:{marginTop:"8px"},onClick:C},(0,o.__)("Send Test Email","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Bot Protection","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Add captcha checkbox","otter-blocks"),checked:h.hasCaptcha,onChange:e=>v({hasCaptcha:e}),help:(0,o.__)("Add Google reCaptcha V2 for protection againts bots. You will need an API Key.","otter-blocks")}),x.hasCaptcha&&(0,i.createElement)("div",{style:{display:"flow-root",margin:"10px 0px"}},(0,o.__)("You can change the reCaptcha API Keys in Settings > Otter. ","otter-blocks"),(0,i.createElement)(c.ExternalLink,{href:"https://www.google.com/recaptcha/about/",target:"_blank"},(0,o.__)("Learn more about reCaptcha.","otter-blocks")))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Marketing Integration","otter-blocks"),initialOpen:!1},(0,o.__)("Add your client email to a Digital Marketing provider.","otter-blocks"),(0,i.createElement)("br",null)," ",(0,i.createElement)("br",null),"loading"===(null==E?void 0:E.formIntegration)&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,i.createElement)(c.Spinner,null),(0,o.__)("Fetching data from server. Please wait.","otter-blocks")),(0,i.createElement)("b",null,(0,o.__)("You need to have at least one email field in your form. For multiple email fields, only the first will be used.","otter-blocks")),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Provider","otter-blocks"),value:x.provider,options:[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Mailchimp","otter-blocks"),value:"mailchimp"},{label:(0,o.__)("Sendinblue","otter-blocks"),value:"sendinblue"}],onChange:e=>{S({provider:e,listId:"",apiKey:""})}}),x.provider&&(0,i.createElement)(i.Fragment,null,!x.apiKey&&(0,i.createElement)(i.Fragment,null,"mailchimp"===(null==x?void 0:x.provider)&&(0,i.createElement)(c.ExternalLink,{href:"https://us5.admin.mailchimp.com/account/api/",style:{marginBottom:"10px",display:"block"},target:"_blank"},(0,o.__)("Guide to generate the API Key.","otter-blocks")),"sendinblue"===(null==x?void 0:x.provider)&&(0,i.createElement)(c.ExternalLink,{href:"https://help.sendinblue.com/hc/en-us/articles/209467485-What-s-an-API-key-and-how-can-I-get-mine-",style:{marginBottom:"10px",display:"block"},target:"_blank"},(0,o.__)("Guide to generate the API Key.","otter-blocks"))),(0,i.createElement)(c.TextControl,{label:(0,o.__)("API Key","otter-blocks"),help:(0,o.__)("You can find the key in the provider's website","otter-blocks"),value:x.apiKey?`*************************${x.apiKey.slice(-8)}`:"",onChange:e=>{k([]),S({listId:"",apiKey:e})}}),x.apiKey&&2>y.length&&"loading"===(null==E?void 0:E.listId)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Spinner,null),(0,o.__)("Loading the options.","otter-blocks"),(0,i.createElement)("br",null),(0,i.createElement)("br",null)),x.apiKey&&"error"===(null==E?void 0:E.listId)&&(0,i.createElement)(i.Fragment,null,(0,o.__)("Invalid API Key. Please check your API Key in the provider's Dashboard.","otter-blocks"),(0,i.createElement)(c.ExternalLink,{target:"_blank",style:{marginBottom:"10px",display:"block"},href:"sendinblue"===x.provider?"https://account.sendinblue.com/advanced/api":"https://us5.admin.mailchimp.com/account/api/"},(0,o.__)("Go to Dashboard.","otter-blocks"))),x.apiKey&&"timeout"===(null==E?void 0:E.listId)&&(0,i.createElement)("p",null,(0,o.__)("Could no connect to the server. Please try again.","otter-blocks")),x.apiKey&&"done"===(null==E?void 0:E.listId)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Contact List","otter-blocks"),value:x.listId,options:y,onChange:e=>S({listId:e})}),1>=(null==y?void 0:y.length)&&(0,i.createElement)("p",null,(0,o.__)("No Contact list found. Please create a list in your provider interface or check if the API key is correct.","otter-blocks")),2<=(null==y?void 0:y.length)&&x.listId&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Action","otter-blocks"),value:x.action,options:[{label:(0,o.__)("Default","otter-blocks"),value:""},{label:(0,o.__)("Subscribe","otter-blocks"),value:"subscribe"},{label:(0,o.__)("Submit & Subscribe","otter-blocks"),value:"submit-subscribe"}],onChange:e=>S({action:e})}),"submit-subscribe"===x.action&&(0,i.createElement)("div",{style:{marginBottom:"10px"}},(0,o.__)("This action will add the client to the contact list and send a separate email with the form data to administrator or to the email mentioned in 'Form to' field. A checkbox for data-sharing consent with third-party will be added on form.","otter-blocks"))))),(0,i.createElement)("div",{style:{display:"flex",flexDirection:"row",gap:"10px"}},(0,i.createElement)(c.Button,{isPrimary:!0,variant:"primary",onClick:_,isBusy:"saving"===(null==E?void 0:E.formIntegration)},"saving"===(null==E?void 0:E.formIntegration)?(0,o.__)("Saving","otter-blocks"):(0,o.__)("Save","otter-blocks")),h.optionName&&(null==w||null===(m=w.integration)||void 0===m?void 0:m.provider)&&(null==w||null===(p=w.integration)||void 0===p?void 0:p.apiKey)&&(null==w||null===(g=w.integration)||void 0===g?void 0:g.listId)&&(0,i.createElement)(c.Button,{isSecondary:!0,variant:"secondary",onClick:T,isBusy:"saving"===(null==E?void 0:E.serviceTesting)},(0,i.createElement)(i.Fragment,null,(0,o.__)("Test Service","otter-blocks")))),"done"===(null==E?void 0:E.formIntegration)&&z&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,o.__)("You have made some modifications. Do not forget to save the options.","otter-blocks")),"done"===(null==E?void 0:E.serviceTesting)&&(0,i.createElement)("div",{className:"o-fetch-msg"},(0,o.__)("Remember to delete the test email from your provider's contact list.","otter-blocks")),"done"===(null==E?void 0:E.formIntegration)&&(null==x?void 0:x.apiKey)&&(null==x?void 0:x.listId)&&!M&&(0,i.createElement)("div",{className:"o-fetch-msg o-error"},(0,o.__)("Please add a Text Field with Email as type in your form for email registration.","otter-blocks")),"error"===(null==E?void 0:E.formIntegration)&&(0,i.createElement)("div",{className:"o-fetch-msg o-error"},(0,o.__)("An error has occurred while saving. Please try again.","otter-blocks"))))},jt=e=>{let{className:t,loadingState:l,isSaving:a,saveAPIKey:n,siteKey:r,secretKey:s,setSiteKey:d,setSecretKey:u}=e;if("loading"===(null==l?void 0:l.captcha))return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("br",null),(0,i.createElement)(c.Placeholder,null,(0,i.createElement)("div",null,(0,i.createElement)(c.Spinner,null),(0,o.__)("Checking the API Keys for reCaptcha","otter-blocks"))));const b=s&&0<(null==s?void 0:s.length)-13?Array(s.length-13).fill("*").join("")+s.slice(-13):s;return(0,i.createElement)(c.Placeholder,{icon:"admin-site",label:(0,o.__)("Google reCaptcha","otter-blocks"),instructions:(0,o.__)("A Google reCaptcha V2 API keys are required, please enter one below.","otter-blocks"),className:t},(0,i.createElement)("div",{className:"components-placeholder__actions",style:{width:"100%"}},(0,i.createElement)(c.TextControl,{type:"text",label:(0,o.__)("Site Key","otter-blocks"),value:r,className:"components-placeholder__input",onChange:d}),(0,i.createElement)(c.TextControl,{type:"text",label:(0,o.__)("Secret Key","otter-blocks"),value:b,className:"components-placeholder__input",onChange:u}),(0,i.createElement)(c.Button,{isPrimary:!0,type:"submit",onClick:n,isBusy:a,disabled:""===r||""===s},(0,o.__)("Save","otter-blocks"))),(0,i.createElement)("div",{className:"components-placeholder__learn-more",style:{margin:"10px 0px"}},(0,o.__)("You need to activate reCaptcha API.","otter-blocks")," ",(0,i.createElement)(c.ExternalLink,{href:"http://www.google.com/recaptcha/admin"},(0,o.__)("Need an API key? Get one here.","otter-blocks"))))};const{attributes:Ut}=Ot,qt=(0,i.createContext)({});var Yt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/form-input","title":"Text Field","category":"themeisle-blocks","description":"Display a contact form for your clients.","keywords":["input","text","email"],"ancestor":["themeisle-blocks/form"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"type":{"type":"string","default":"text"},"label":{"type":"string"},"placeholder":{"type":"string"},"isRequired":{"type":"boolean"},"mappedName":{"type":"string"},"labelColor":{"type":"string"},"inputWidth":{"type":"number"},"helpText":{"type":"string"}},"supports":{"align":["wide","full"]}}'),Kt=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Field Type","otter-blocks"),value:t.type,options:[{label:(0,o.__)("Text","otter-blocks"),value:"text"},{label:(0,o.__)("Email","otter-blocks"),value:"email"},{label:(0,o.__)("Date","otter-blocks"),value:"date"},{label:(0,o.__)("Number","otter-blocks"),value:"number"}],onChange:e=>l({type:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),value:t.label,onChange:e=>l({label:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Placeholder","otter-blocks"),value:t.placeholder,onChange:e=>l({placeholder:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Help Text","otter-blocks"),value:t.helpText,onChange:e=>l({helpText:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Required","otter-blocks"),help:(0,o.__)("If enabled, the input field must be filled out before submitting the form.","otter-blocks"),checked:t.isRequired,onChange:e=>l({isRequired:e})})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:t.labelColor,onChange:e=>l({labelColor:e}),label:(0,o.__)("Label Color","otter-blocks")}]}))};const{attributes:Jt}=Yt;const Qt=[{attributes:{id:{type:"string"},type:{type:"string",default:"text"},label:{type:"string"},placeholder:{type:"string"},isRequired:{type:"boolean"},mappedName:{type:"string"}},supports:{align:["wide","full"]},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save();return(0,i.createElement)("div",l,(0,i.createElement)("label",{htmlFor:t.id,className:"otter-form-input-label"},(0,i.createElement)(s.RichText.Content,{value:t.label,className:"otter-form-input-label__label",tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,i.createElement)("input",{type:t.type,name:t.mappedName,id:t.id,required:t.isRequired,placeholder:t.placeholder,className:"otter-form-input"}))}}];var Xt=Qt;const{name:el}=Yt;window.themeisleGutenberg.isAncestorTypeAvailable||(Yt.parent=["themeisle-blocks/form"]),(0,a.registerBlockType)(el,{...Yt,title:(0,o.__)("Text Field","otter-blocks"),description:(0,o.__)("Display a contact form for your clients.","otter-blocks"),icon:r.inputIcon,deprecated:Xt,keywords:["input","text","email"],variations:[{name:"themeisle-blocks/form-input-email",description:(0,o.__)("Insert an email field","otter-blocks"),icon:"email",title:(0,o.__)("Email Field","otter-blocks"),attributes:{type:"email"}},{name:"themeisle-blocks/form-input-number",description:(0,o.__)("Insert a number field","otter-blocks"),icon:"calculator",title:(0,o.__)("Number Field","otter-blocks"),attributes:{type:"number"}},{name:"themeisle-blocks/form-input-date",description:(0,o.__)("Insert a date field","otter-blocks"),icon:"calendar-alt",title:(0,o.__)("Date Field","otter-blocks"),attributes:{type:"date"}}],edit:e=>{let{attributes:t,setAttributes:l,clientId:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,Jt);return()=>e(t.id)}),[t.id]);const n=(0,s.useBlockProps)(),r=(0,i.useRef)(null),c=(0,i.useRef)(null),d=(0,i.useRef)(null);return(0,i.useEffect)((()=>{var e,l,o,a,n,i,s;c.current&&(null===(e=c.current)||void 0===e||null===(l=e.style)||void 0===l||l.setProperty("--input-width",(o=t.inputWidth)?o+"%":null)),r.current&&(null===(a=r.current)||void 0===a||null===(n=a.style)||void 0===n||n.setProperty("--label-color",t.labelColor||null)),d.current&&(null===(i=d.current)||void 0===i||null===(s=i.style)||void 0===s||s.setProperty("--label-color",t.labelColor||null))}),[c.current,r.current,d.current,t.labelColor,t.inputWidth]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Kt,{attributes:t,setAttributes:l}),(0,i.createElement)("div",n,(0,i.createElement)("label",{ref:r,htmlFor:t.id,className:"otter-form-input-label"},(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Type here…","otter-blocks"),className:"otter-form-input-label__label",value:t.label,onChange:e=>l({label:e}),tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},"*")),(0,i.createElement)("input",{ref:c,type:t.type,placeholder:t.placeholder,name:t.id,id:t.id,required:t.isRequired,disabled:!0,className:"otter-form-input components-text-control__input"}),t.helpText&&(0,i.createElement)("span",{className:"o-form-help",ref:d},t.helpText)))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",l,(0,i.createElement)("label",{htmlFor:t.id?t.id+"-input":"",className:"otter-form-input-label"},(0,i.createElement)(s.RichText.Content,{value:t.label,className:"otter-form-input-label__label",tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},"*")),(0,i.createElement)("input",{type:t.type,name:t.mappedName,id:t.id?t.id+"-input":"",required:t.isRequired,placeholder:t.placeholder,className:"otter-form-input"}),t.helpText&&(0,i.createElement)("span",{className:"o-form-help"},t.helpText))}});var tl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/form-nonce","title":"Nonce Field","category":"themeisle-blocks","description":"Protect the form from CSRF.","keywords":["protection","csrf","field"],"textdomain":"otter-blocks","attributes":{"formId":{"type":"string"}},"supports":{"align":["wide","full"],"inserter":false}}');const{name:ll}=tl;(0,a.registerBlockType)(ll,{...tl,title:(0,o.__)("Nonce Field","otter-blocks"),description:(0,o.__)("Protect the form from CSRF.","otter-blocks"),icon:r.inputIcon,keywords:["protection","csrf","field"],edit:e=>{let{setAttributes:t,clientId:l}=e;const{parent:o}=(0,v.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:o}=e("core/block-editor");return{parent:t(o(l))}}),[]);return(0,i.useEffect)((()=>{o&&t({formId:o.attributes.id})}),[o]),null},save:()=>null});var ol=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/form-textarea","title":"Textarea Field","category":"themeisle-blocks","description":"Display a contact form for your clients.","keywords":["textarea","message","input"],"ancestor":["themeisle-blocks/form"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"isRequired":{"type":"boolean"},"mappedName":{"type":"string"},"labelColor":{"type":"string"},"inputWidth":{"type":"number"},"helpText":{"type":"string"}},"supports":{"align":["wide","full"]}}'),al=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),value:t.label,onChange:e=>l({label:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Placeholder","otter-blocks"),value:t.placeholder,onChange:e=>l({placeholder:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Help Text","otter-blocks"),value:t.helpText,onChange:e=>l({helpText:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Required","otter-blocks"),help:(0,o.__)("If enabled, the input field must be filled out before submitting the form.","otter-blocks"),checked:t.isRequired,onChange:e=>l({isRequired:e})})))};const{attributes:nl}=ol;const rl=[{attributes:{id:{type:"string"},type:{type:"string",default:"text"},label:{type:"string"},placeholder:{type:"string"},isRequired:{type:"boolean"},mappedName:{type:"string"}},supports:{align:["wide","full"]},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save();return(0,i.createElement)("div",l,(0,i.createElement)("label",{htmlFor:t.id,className:"otter-form-textarea-label"},(0,i.createElement)(s.RichText.Content,{value:t.label,className:"otter-form-textarea-label__label",tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,i.createElement)("textarea",{name:t.mappedName,id:t.id,required:t.isRequired,placeholder:t.placeholder,rows:10,className:"otter-form-textarea-input"}))}}];var il=rl;const{name:sl}=ol;window.themeisleGutenberg.isAncestorTypeAvailable||(ol.parent=["themeisle-blocks/form"]),(0,a.registerBlockType)(sl,{...ol,title:(0,o.__)("Textarea Field","otter-blocks"),description:(0,o.__)("Display a contact form for your clients.","otter-blocks"),icon:r.inputIcon,deprecated:il,keywords:["textarea","message","input"],edit:e=>{let{attributes:t,setAttributes:l,clientId:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,nl);return()=>e(t.id)}),[t.id]);const n=(0,s.useBlockProps)(),r=(0,i.useRef)(null),c=(0,i.useRef)(null),d=(0,i.useRef)(null);return(0,i.useEffect)((()=>{var e,l,o,a,n,i,s;c.current&&(null===(e=c.current)||void 0===e||null===(l=e.style)||void 0===l||l.setProperty("--input-width",(o=t.inputWidth)?o+"%":o)),r.current&&(null===(a=r.current)||void 0===a||null===(n=a.style)||void 0===n||n.setProperty("--label-color",t.labelColor||null)),d.current&&(null===(i=d.current)||void 0===i||null===(s=i.style)||void 0===s||s.setProperty("--label-color",t.labelColor||null))}),[c.current,r.current,t]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(al,{attributes:t,setAttributes:l}),(0,i.createElement)("div",n,(0,i.createElement)("label",{ref:r,htmlFor:t.id?t.id+"-input":"",className:"otter-form-textarea-label"},(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Type here…","otter-blocks"),className:"otter-form-textarea-label__label",value:t.label,onChange:e=>l({label:e}),tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},"*")),(0,i.createElement)("textarea",{ref:c,placeholder:t.placeholder,name:t.id,id:t.id?t.id+"-input":"",required:t.isRequired,disabled:!0,rows:10,className:"otter-form-textarea-input components-textarea-control__input"}),t.helpText&&(0,i.createElement)("span",{className:"o-form-help",ref:d},t.helpText)))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",l,(0,i.createElement)("label",{htmlFor:t.id?t.id+"-input":"",className:"otter-form-textarea-label"},(0,i.createElement)(s.RichText.Content,{value:t.label,className:"otter-form-textarea-label__label",tagName:"span"}),t.isRequired&&(0,i.createElement)("span",{className:"required"},"*")),(0,i.createElement)("textarea",{name:t.mappedName,id:t.id?t.id+"-input":"",required:t.isRequired,placeholder:t.placeholder,rows:10,className:"otter-form-textarea-input"}),t.helpText&&(0,i.createElement)("span",{className:"o-form-help"},t.helpText))}});const{name:cl}=Ot;(0,a.registerBlockType)(cl,{...Ot,title:(0,o.__)("Form","otter-blocks"),description:(0,o.__)("Display a form for your clients. Powered by Otter.","otter-blocks"),icon:r.contactIcon,keywords:["business","form","email"],edit:e=>{let{attributes:t,setAttributes:l,clientId:n,isSelected:r,name:c}=e;const[d,u]=(0,i.useState)(""),[b,m]=(0,i.useState)(""),[p,h]=(0,i.useState)({formOptions:"done",formIntegration:"done",listId:"init",captcha:"init",serviceTesting:"init"}),y=e=>{h((t=>({...t,...e})))},[k,f]=(0,i.useState)({provider:void 0,redirectLink:void 0,fromName:void 0,emailTo:void 0,subject:void 0,email:void 0,listId:void 0,action:void 0,hasCaptcha:void 0,submitMessage:void 0,apiKey:void 0,cc:void 0,bcc:void 0}),[_,w]=(0,i.useState)(!0),[C,E]=(0,i.useState)([{label:(0,o.__)("None","otter-blocks"),value:""}]),{insertBlock:x,removeBlock:S}=(0,v.useDispatch)("core/block-editor"),{replaceInnerBlocks:T}=(0,v.useDispatch)("core/block-editor"),{createNotice:M}=(0,v.dispatch)("core/notices"),B=(0,v.useSelect)((e=>0<e("core/block-editor").getBlocks(n).length),[n]),{blockType:z,defaultVariation:P,variations:R}=(0,v.useSelect)((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:o}=e("core/blocks");return{blockType:l(c),defaultVariation:o(c,"block"),variations:t(c,"block")}}),[c]),{children:F,hasEmailField:O}=(0,v.useSelect)((e=>{const{getBlock:t}=e("core/block-editor"),l=t(n).innerBlocks;return{children:l,hasEmailField:null==l?void 0:l.some((e=>{var t;return"email"===(null==e||null===(t=e.attributes)||void 0===t?void 0:t.type)}))}}));(0,i.useEffect)((()=>{const e=(0,L.blockInit)(n,Ut);return()=>e(t.id)}),[t.id]),(0,i.useEffect)((()=>{var e;t.id&&(0,v.select)("core/edit-widgets")?l({optionName:`widget_${t.id.slice(-8)}`}):t.id&&Boolean(window.themeisleGutenberg.isBlockEditor)&&null!==(e=(0,v.select)("core/editor"))&&void 0!==e&&e.getCurrentPostId()&&l({optionName:`${(0,v.select)("core/editor").getCurrentPostId()}_${t.id.slice(-8)}`})}),[t.id]),(0,i.useEffect)((()=>{if(F){const e=F.filter((e=>{let{name:t}=e;return"themeisle-blocks/form-nonce"===t}));if(2<=(null==e?void 0:e.length))e.slice(1).forEach((e=>{S(e.clientId,!1)}));else if(0===(null==e?void 0:e.length)&&n){const e=(0,a.createBlock)("themeisle-blocks/form-nonce");e&&(null==x||x(e,(null==F?void 0:F.length)||0,n,!1))}}}),[F]);const N=e=>null==e?void 0:e.filter((e=>{let{form:l}=e;return l===t.optionName})).pop(),A=e=>{var t,l,o,a;f({emailTo:null==e?void 0:e.email,fromName:null==e?void 0:e.fromName,redirectLink:null==e?void 0:e.redirectLink,subject:null==e?void 0:e.emailSubject,cc:null==e?void 0:e.cc,bcc:null==e?void 0:e.bcc,submitMessage:null==e?void 0:e.submitMessage,provider:null==e||null===(t=e.integration)||void 0===t?void 0:t.provider,apiKey:null==e||null===(l=e.integration)||void 0===l?void 0:l.apiKey,listId:null==e||null===(o=e.integration)||void 0===o?void 0:o.listId,action:null==e||null===(a=e.integration)||void 0===a?void 0:a.action,hasCaptcha:null==e?void 0:e.hasCaptcha})};(0,i.useEffect)((()=>{let e=new AbortController;const l=setTimeout((()=>{y({formOptions:"done",formIntegration:"done"})}),3e3);return t.optionName&&It().loadPromise.then((()=>{y({formOptions:"loading",formIntegration:"loading"}),(new(It().models.Settings)).fetch({signal:e.signal}).done((t=>{e=null;const o=N(t.themeisle_blocks_form_emails);o&&(A(o),w(o)),y({formIntegration:"done",formOptions:"done"}),clearTimeout(l)})).catch((()=>{y({formIntegration:"done",formOptions:"done"}),clearTimeout(l)}))})),()=>{var t;null===(t=e)||void 0===t||t.abort(),clearTimeout(l)}}),[t.optionName]),(0,i.useEffect)((()=>{let e,t=new AbortController;return k.apiKey&&k.provider&&(e=setTimeout((()=>y({listId:"timeout"})),6e3),y({listId:"loading"}),Dt()({path:"otter/v1/form/editor",method:"POST",data:{handler:"listId",payload:{provider:k.provider,apiKey:k.apiKey,action:k.action}},signal:t.signal}).then((l=>{if(t=null,clearTimeout(e),null!=l&&l.success){var a;const e=(null==l||null===(a=l.list_id)||void 0===a?void 0:a.map((e=>{var t;return{label:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}})))||[];e.splice(0,0,{label:(0,o.__)("None","otter-blocks"),value:""}),E(e),y({listId:"done"});const t=1===e.map((e=>{let{value:t}=e;return t})).filter((e=>e===k.listId)).length;k.listId&&!t&&M("error",(0,o.__)("The current contact list is invalid. Please choose a new contact list.","otter-blocks"),{isDismissible:!0,type:"snackbar"})}else M("error",null==l?void 0:l.error,{isDismissible:!0,type:"snackbar",id:"themeisle-form-server-error"}),y({listId:"error"})})).catch((e=>{console.error(e),y({listId:"error"})}))),()=>{var l;null===(l=t)||void 0===l||l.abort(),clearTimeout(e)}}),[k.apiKey,k.provider]),(0,i.useEffect)((()=>{let e=new AbortController;if(void 0!==t.hasCaptcha&&t.optionName)try{var l,a;null===(l=new(It().models.Settings))||void 0===l||null===(a=l.current)||void 0===a||a.fetch({signal:e.signal}).done((l=>{e=null;const a=l.themeisle_blocks_form_emails?l.themeisle_blocks_form_emails:[];let n=!0,r=!1;null==a||a.forEach(((e,l)=>{let{form:o}=e;o===t.optionName&&(a[l].hasCaptcha!==t.hasCaptcha&&(r=!0),a[l].hasCaptcha=t.hasCaptcha,n=!1)})),n&&a.push({form:t.optionName,hasCaptcha:t.hasCaptcha}),(n||r)&&(new(It().models.Settings)({themeisle_blocks_form_emails:a}).save(),M("info",(0,o.__)("Form preferences have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"}))}))}catch(e){console.warn(e.message)}return()=>{var t;return null===(t=e)||void 0===t?void 0:t.abort()}}),[t.hasCaptcha,t.optionName]),(0,i.useEffect)((()=>{let e=new AbortController;return t.hasCaptcha&&"init"===(null==p?void 0:p.captcha)&&(()=>{y({captcha:"loading"});try{var t;null===(t=new(It().models.Settings))||void 0===t||t.fetch({signal:e.signal}).then((t=>{e=null,""!==t.themeisle_google_captcha_api_site_key&&""!==t.themeisle_google_captcha_api_secret_key?y({captcha:"done"}):(y({captcha:"missing"}),u(t.themeisle_google_captcha_api_site_key),m(t.themeisle_google_captcha_api_secret_key))})).catch((e=>{console.error(e),y({captcha:"error"})}))}catch(e){console.warn(e.message),y({captcha:"error"})}})(),()=>{var t;return null===(t=e)||void 0===t?void 0:t.abort()}}),[p.captcha,t.hasCaptcha]);const H={"--message-font-size":void 0!==t.messageFontSize&&t.messageFontSize,"--input-font-size":void 0!==t.inputFontSize&&t.inputFontSize,"--help-font-size":void 0!==t.helpFontSize&&t.helpFontSize,"--input-color":t.inputColor,"--padding":(I=t.inputPadding,I?I.top+" "+I.right+" "+I.bottom+" "+I.left:null),"--border-radius":void 0!==t.inputBorderRadius&&t.inputBorderRadius+"px","--border-width":void 0!==t.inputBorderWidth&&t.inputBorderWidth+"px","--border-color":t.inputBorderColor,"--label-color":t.labelColor,"--input-width":void 0!==t.inputWidth&&t.inputWidth+"%","--submit-color":t.submitColor,"--required-color":t.inputRequiredColor,"--input-gap":void 0!==t.inputGap&&t.inputGap+"px","--inputs-gap":void 0!==t.inputsGap&&t.inputsGap+"px","--label-font-size":void 0!==t.labelFontSize&&t.labelFontSize,"--submit-font-size":void 0!==t.submitFontSize&&t.submitFontSize,"--help-label-color":t.helpLabelColor,"--input-bg-color":t.inputBackgroundColor};var I;const[V,D]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{D([`.otter-form__container .wp-block-button__link {\n\t\t\t\tbackground-color: ${t.submitBackgroundColor}\n\t\t\t}`,`.otter-form__container .wp-block-button__link:hover {\n\t\t\t\t${t.submitBackgroundColorHover&&`background-color: ${t.submitBackgroundColorHover}`}\n\t\t\t}`])}),[t.submitBackgroundColor,t.submitBackgroundColorHover]);const G=(0,s.useBlockProps)({id:t.id,style:H,className:V});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(qt.Provider,{value:{savedFormOptions:_,listIDOptions:C,setListIDOptions:E,saveFormEmailOptions:()=>{y({formOptions:"saving"}),(new(It().models.Settings)).fetch().done((e=>{const l=e.themeisle_blocks_form_emails?e.themeisle_blocks_form_emails:[];let a=!0,n=!1;null==l||l.forEach(((e,o)=>{let{form:r}=e;r===t.optionName&&(n=l[o].email!==k.emailTo||l[o].redirectLink!==k.redirectLink||l[o].emailSubject!==k.subject||l[o].submitMessage!==k.submitMessage||l[o].fromName!==k.fromName||l[o].cc!==k.cc||l[o].bcc!==k.bcc,l[o].email=k.emailTo,l[o].redirectLink=k.redirectLink,l[o].emailSubject=k.subject,l[o].submitMessage=k.submitMessage,l[o].fromName=k.fromName,l[o].cc=k.cc,l[o].bcc=k.bcc,a=!1)})),a&&l.push({form:t.optionName,email:k.emailTo,fromName:k.fromName,redirectLink:k.redirectLink,emailSubject:k.subject,submitMessage:k.submitMessage,cc:k.cc,bcc:k.bcc}),a||n?new(It().models.Settings)({themeisle_blocks_form_emails:l}).save().then((e=>{const t=N(e.themeisle_blocks_form_emails);t?(A(t),w(t),y({formOptions:"done"}),M("info",(0,o.__)("Form options have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"})):y({formOptions:"error"})})):y({formOptions:"done"})})).catch((()=>y({formOptions:"error"})))},formOptions:k,setFormOption:e=>{f((t=>({...t,...e})))},saveIntegration:()=>{var e;y({formIntegration:"saving"}),null===(e=new(It().models.Settings))||void 0===e||e.fetch().done((e=>{const a=e.themeisle_blocks_form_emails?e.themeisle_blocks_form_emails:[];let n=!0,r=!1;null==a||a.forEach(((e,l)=>{let{form:o}=e;var i,s,c,d,u;o===t.optionName&&(null!==(i=a[l])&&void 0!==i&&i.integration||(a[l].integration={}),r=(null===(s=a[l].integration)||void 0===s?void 0:s.provider)!==k.provider||(null===(c=a[l].integration)||void 0===c?void 0:c.listId)!==k.listId||(null===(d=a[l].integration)||void 0===d?void 0:d.action)!==k.action||(null===(u=a[l].integration)||void 0===u?void 0:u.apiKey)!==k.apiKey,n=!1,a[l].integration.provider=k.provider,a[l].integration.apiKey=k.apiKey,a[l].integration.listId=k.listId,a[l].integration.action=k.action)})),n&&a.push({form:t.optionName,integration:{provider:k.provider,apiKey:k.apiKey,listId:k.listId,action:k.action}}),n||r?new(It().models.Settings)({themeisle_blocks_form_emails:a}).save().then((e=>{const t=N(e.themeisle_blocks_form_emails);var a;t&&(A(t),w(t),l({action:null==t||null===(a=t.integration)||void 0===a?void 0:a.action})),y({formIntegration:"done"}),r&&M("info",(0,o.__)("Integration details have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"})})).catch((e=>{console.error(e),y({formIntegration:"error"})})):y({formIntegration:"done"})})).catch((()=>{y({formIntegration:"error"})}))},sendTestEmail:()=>{Dt()({path:"otter/v1/form/editor",method:"POST",data:{handler:"testEmail",payload:{provider:"default",to:null==k?void 0:k.emailTo,site:window.location.href}}}).then((e=>{null!=e&&e.success?M("info",(0,o.__)("The test email has been send. Check your emails for confirmation.","otter-blocks"),{isDismissible:!0,type:"snackbar"}):M("error",(0,o.__)("An error has occurred: ","otter-blocks")+((null==e?void 0:e.error)||(0,o.__)("unknown","otter-blocks")),{isDismissible:!0,type:"snackbar"})})).catch((e=>{console.error(e),M("error",null==e?void 0:e.message,{isDismissible:!0,type:"snackbar"})}))},loadingState:p,testService:()=>{y({serviceTesting:"loading"}),Dt()({path:"otter/v1/form/editor",method:"POST",data:{handler:"testEmail",payload:{formOption:t.optionName}}}).then((e=>{null!=e&&e.success?(M("info",(0,o.__)("A test email has been registered to your contact list. Check your provider for confirmation.","otter-blocks"),{isDismissible:!0,type:"snackbar"}),y({serviceTesting:"done"})):(M("error",(0,o.__)("An error has occurred: ","otter-blocks")+((null==e?void 0:e.error)||(0,o.__)("unknown","otter-blocks")+(0,o.__)(". Check your provider for confirmation.","otter-blocks")),{isDismissible:!0,type:"snackbar"}),y({serviceTesting:"error"}))})).catch((e=>{console.error(e),M("error",null==e?void 0:e.message,{isDismissible:!0,type:"snackbar"}),y({testService:"error"})}))},hasEmailField:O}},(0,i.createElement)(Zt,{attributes:t,setAttributes:l}),(0,i.createElement)("div",G,B?(0,i.createElement)("form",{className:"otter-form__container",onSubmit:()=>!1},(0,i.createElement)(s.InnerBlocks,null),t.hasCaptcha&&"done"!==(null==p?void 0:p.captcha)&&(0,i.createElement)(jt,{className:"otter-form-captcha",loadingState:p,saveAPIKey:()=>{y({captcha:"loading"});try{var e,t,l;const a=new(It().models.Settings)({themeisle_google_captcha_api_site_key:d,themeisle_google_captcha_api_secret_key:b});null==a||null===(e=a.save)||void 0===e||null===(t=e.call(a))||void 0===t||null===(l=t.then((e=>{""!==e.themeisle_google_captcha_api_site_key&&""!==e.themeisle_google_captcha_api_secret_key?y({captcha:"done"}):y({captcha:"missing"}),m(""),u(""),M("info",(0,o.__)("Google reCaptcha API Keys have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"}).catch((e=>{console.error(e),y({captcha:"error"})}))})))||void 0===l||l.catch((e=>{console.error(e),y({captcha:"error"})}))}catch(e){console.warn(e.message),y({captcha:"error"})}},siteKey:d,secretKey:b,setSiteKey:u,setSecretKey:m}),"submit-subscribe"===t.action&&(0,i.createElement)("div",{className:"otter-form-consent"},(0,i.createElement)("input",{id:"o-consent",name:"o-consent",type:"checkbox"}),(0,i.createElement)("label",{htmlFor:"o-consent"},(0,o.__)("I have read and agreed the privacy statement.","otter-blocks"))),(0,i.createElement)("div",{className:g()("wp-block-button has-submit-msg",{right:"right"===t.submitStyle},{full:"full"===t.submitStyle})},(0,i.createElement)("button",{className:"wp-block-button__link",type:"submit",disabled:!0},t.submitLabel?t.submitLabel:(0,o.__)("Submit","otter-blocks")),r&&(0,i.createElement)("div",null,(0,i.createElement)("div",{className:"o-form-server-response o-success",style:{color:t.submitMessageColor}},k.submitMessage||(0,o.__)("Success","otter-blocks")),(0,i.createElement)("div",{className:"o-form-server-response o-error",style:{color:t.submitMessageErrorColor,margin:"0px"}},(0,o.__)("Error. Please try again.","otter-blocks"))))):(0,i.createElement)(s.__experimentalBlockVariationPicker,{icon:(0,K.get)(z,["icon","src"]),label:(0,K.get)(z,["title"]),variations:R,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;e&&T(n,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,className:g()({"can-submit-and-subscribe":"submit-subscribe"===t.action,"has-captcha":t.hasCaptcha}),"data-option-name":t.optionName});return(0,i.createElement)("div",l,(0,i.createElement)("form",{className:"otter-form__container"},(0,i.createElement)(s.InnerBlocks.Content,null),(0,i.createElement)("div",{className:g()("wp-block-button",{right:"right"===t.submitStyle},{full:"full"===t.submitStyle})},(0,i.createElement)("button",{className:"wp-block-button__link",type:"submit"},t.submitLabel?t.submitLabel:(0,o.__)("Submit","otter-blocks")))))},deprecated:At,example:{attributes:{},innerBlocks:[{name:"themeisle-blocks/form-input",attributes:{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}},{name:"themeisle-blocks/form-input",attributes:{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}},{name:"themeisle-blocks/form-textarea",attributes:{label:(0,o.__)("Message","otter-blocks")}},{name:"core/paragraph",attributes:{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}}]},variations:[{name:"themeisle-blocks/form-contact",description:(0,o.__)("Contact form for clients","otter-blocks"),icon:r.contactIcon,title:(0,o.__)("Contact Form","otter-blocks"),innerBlocks:[["themeisle-blocks/form-input",{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}],["themeisle-blocks/form-input",{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}],["themeisle-blocks/form-textarea",{label:(0,o.__)("Message","otter-blocks")}],["core/paragraph",{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}]]},{name:"themeisle-blocks/form-subscribe",description:(0,o.__)("Add the clients to your subscription list","otter-blocks"),icon:r.contactIcon,title:(0,o.__)("Subscribe Form","otter-blocks"),innerBlocks:[["themeisle-blocks/form-input",{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}],["themeisle-blocks/form-input",{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}],["core/paragraph",{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}]]}]});var dl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/google-map","title":"Google Maps","category":"themeisle-blocks","description":"Display Google Maps on your website with Google Map block. Powered by Otter.","keywords":["map","google","orbitfox"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"style":{"type":"string","default":"standard"},"location":{"type":"string","default":"La Sagrada Familia, Barcelona, Spain"},"latitude":{"type":"string"},"longitude":{"type":"string"},"type":{"type":"string","default":"roadmap"},"zoom":{"type":"number","default":15},"height":{"type":["number","string"],"default":"400px"},"heightTablet":{"type":"string"},"heightMobile":{"type":"string"},"draggable":{"type":"boolean","default":true},"mapTypeControl":{"type":"boolean","default":true},"zoomControl":{"type":"boolean","default":true},"fullscreenControl":{"type":"boolean","default":true},"streetViewControl":{"type":"boolean","default":true},"markers":{"type":"array","default":[]}},"supports":{"align":["wide","full"],"html":false},"editorStyle":"otter-google-map-editor","style":"otter-google-map-style","script":"google-maps"}'),ul=l(4586),bl=e=>{let{api:t,error:l,isAPILoaded:a,isAPISaved:n,isSaving:r,changeAPI:s,saveAPIKey:d}=e;return a?n?void 0:(0,i.createElement)(c.Placeholder,{icon:"admin-site",label:(0,o.__)("Google Maps","otter-blocks"),instructions:(0,o.__)("A Google Maps API key is required, please enter one below.","otter-blocks")},(0,i.createElement)("div",{className:"components-placeholder__actions"},(0,i.createElement)(c.TextControl,{type:"text",placeholder:(0,o.__)("Google Maps API Key","otter-blocks"),value:t,className:g()("components-placeholder__input",{"is-invalid":l}),onChange:s}),(0,i.createElement)(c.Button,{isPrimary:!0,type:"submit",onClick:d,isBusy:r,disabled:""===t||l},(0,o.__)("Save","otter-blocks"))),(0,i.createElement)("div",{className:"components-placeholder__learn-more"},l&&(0,i.createElement)("p",null,(0,o.__)("The API key could not be validated.","otter-blocks")),(0,i.createElement)("p",null,(0,o.__)("You need to activate Maps and Places API.","otter-blocks")," ",(0,i.createElement)(c.ExternalLink,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},(0,o.__)("Need an API key? Get one here.","otter-blocks"))))):(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null),(0,o.__)("Loading…","otter-blocks"))},ml=l(5241);const pl=e=>{let{value:t,onChange:l}=e;const a=(0,be.useInstanceId)(pl);(0,i.useEffect)((()=>{window.wp.oldEditor.initialize(r.current.id,{tinymce:{classic_block_editor:!0,plugins:"lists,media,paste,tabfocus,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wpdialogs,wptextpattern,wpview",toolbar1:"formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_add_media"}});const e=window.tinymce.get(r.current.id);return e.on("change",(()=>l(e.getContent()))),()=>window.wp.oldEditor.remove(r.current.id)}),[]);const n=`inspector-textarea-control-${a}`,r=(0,i.useRef)(null);return(0,i.createElement)(c.BaseControl,{id:n,label:(0,o.__)("Description","otter-blocks")},(0,i.createElement)("textarea",{id:n,className:"components-textarea-control__input",rows:4,value:t,onChange:e=>l(e.target.value),ref:r}))};var gl=pl,hl=e=>{let{marker:t,isOpen:l,isPlaceAPIAvailable:a,openMarker:n,removeMarker:r,changeMarkerProp:s}=e;const d=(0,i.useRef)(null);return(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker"},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker-title-area"},(0,i.createElement)(c.Button,{className:"wp-block-themeisle-blocks-google-map-marker-title",onClick:()=>n(t.id)},t.title||(0,o.__)("Custom Marker","otter-blocks")),(0,i.createElement)(c.Button,{icon:"no-alt",label:(0,o.__)("Remove Marker","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-google-map-marker-remove",onClick:()=>r(t.id)})),(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-google-map-marker-control-area",{opened:t.id===l})},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Location","otter-blocks"),id:`themeisle-location-search-${t.id}`},(0,i.createElement)("input",{type:"text",id:`themeisle-location-search-${t.id}`,placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:t.location,className:"wp-block-themeisle-blocks-google-map-search",ref:d,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const l=new window.google.maps.places.SearchBox(d.current);l.addListener("places_changed",(()=>{const e=l.getPlaces();e&&0<e.length&&e.forEach((e=>{const l=e.formatted_address||e.name,o=e.geometry.location.lat(),a=e.geometry.location.lng();s(t.id,"location",l),s(t.id,"latitude",o),s(t.id,"longitude",a)}))}))},onChange:e=>s(t.id,"location",e.target.value),disabled:!a}),!a&&(0,i.createElement)("p",null,(0,o.__)("To enable locations earch, please ensure Places API is activated in the Google Developers Console.","otter-blocks")+" ",(0,i.createElement)(c.ExternalLink,{href:"https://developers.google.com/places/web-service/intro"},(0,o.__)("More info.","otter-blocks")))),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:t.latitude,onChange:e=>s(t.id,"latitude",e)}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:t.longitude,onChange:e=>s(t.id,"longitude",e)}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Map Icon","otter-blocks"),value:t.icon||"https://maps.google.com/mapfiles/ms/icons/red-dot.png",options:[{label:(0,o.__)("Red","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/red-dot.png"},{label:(0,o.__)("Blue","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/blue-dot.png"},{label:(0,o.__)("Yellow","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/yellow-dot.png"},{label:(0,o.__)("Green","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/green-dot.png"},{label:(0,o.__)("Orange","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/orange-dot.png"}],onChange:e=>s(t.id,"icon",e)}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:t.title,onChange:e=>s(t.id,"title",e)}),(0,i.createElement)(gl,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:t.description,onChange:e=>s(t.id,"description",e)})))},vl=e=>{let{initialOpen:t,markers:l,isPlaceAPIAvailable:a,addMarker:n,removeMarker:r,changeMarkerProp:s}=e;(0,i.useEffect)((()=>{!1!==t&&u(t)}),[t]);const[d,u]=(0,i.useState)(null),b=e=>{d===e&&(e=null),u(e)};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker-group"},l.map((e=>(0,i.createElement)(hl,{key:e.id,marker:e,isOpen:d,isPlaceAPIAvailable:a,openMarker:b,removeMarker:r,changeMarkerProp:s})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-google-map-marker-add",onClick:n},(0,o.__)("Add Marker","otter-blocks")))},yl=e=>{let{attributes:t,setAttributes:l,map:a,changeStyle:n,isPlaceAPIAvailable:r,isMarkerOpen:d,setMarkerOpen:u,removeMarker:b,changeMarkerProp:m,addMarkerManual:p,api:g,isSaving:h,changeAPI:v,saveAPIKey:y}=e;const[f,_]=(0,i.useState)("settings"),{responsiveSetAttributes:E,responsiveGetAttributes:x}=S(l),T=(0,i.useRef)(null);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:f,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:_}),"settings"===f&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Location","otter-blocks")},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Location"),id:"wp-block-themeisle-blocks-google-map-search"},(0,i.createElement)("input",{type:"text",id:"wp-block-themeisle-blocks-google-map-search",placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:t.location,className:"wp-block-themeisle-blocks-google-map-search",ref:T,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const t=new window.google.maps.places.SearchBox(T.current);t.addListener("places_changed",(()=>{const e=t.getPlaces();e&&0<e.length&&e.forEach((e=>{const t=e.geometry.location.lat(),o=e.geometry.location.lng(),n=new window.google.maps.LatLng(t,o);a.setCenter(n),l({location:e.formatted_address||e.name,latitude:t.toString(),longitude:o.toString()})}))}))},onChange:e=>{l({location:e.target.value})},disabled:!r}),!r&&(0,i.createElement)("p",null,(0,o.__)("To enable locations earch, please ensure Places API is activated in the Google Developers Console.","otter-blocks")+" ",(0,i.createElement)(c.ExternalLink,{href:"https://developers.google.com/places/web-service/intro"},(0,o.__)("More info.","otter-blocks")))),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter latitude…","otter-blocks"),value:t.latitude,onChange:e=>{l({latitude:e.toString()});const o=Number(e),{longitude:n}=t,r=new window.google.maps.LatLng(o,n);a.setCenter(r)}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter longitude","otter-blocks"),value:t.longitude,onChange:e=>{l({longitude:e.toString()});const{latitude:o}=t,n=Number(e),r=new window.google.maps.LatLng(o,n);a.setCenter(r)}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Positioning & Zooming","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Map Zoom Level","otter-blocks"),value:t.zoom,onChange:e=>{l({zoom:e}),a.setZoom(e)},min:0,max:20}),(0,i.createElement)(M.Z,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:x([(B=t.height,(0,K.isNumber)(B)?(e=>e?`${e}px`:e)(B):B),t.heightTablet,t.heightMobile]),onChange:e=>E(e,["height","heightTablet","heightMobile"])}),(0,i.createElement)(k.Z,{values:["height","heightTablet","heightMobile"],setAttributes:l}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Controls","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.BaseControl,null,(0,o.__)("The following changes will not affect block preview during the editing process. You can click outside the block to see the changes take effect.","otter-blocks")),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Draggable Map","otter-blocks"),checked:t.draggable,onChange:()=>{l({draggable:!t.draggable})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Map Type Control","otter-blocks"),checked:t.mapTypeControl,onChange:()=>{l({mapTypeControl:!t.mapTypeControl})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Zoom Control","otter-blocks"),checked:t.zoomControl,onChange:()=>{l({zoomControl:!t.zoomControl})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Full Screen Control","otter-blocks"),checked:t.fullscreenControl,onChange:()=>{l({fullscreenControl:!t.fullscreenControl})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Street View Control","otter-blocks"),checked:t.streetViewControl,onChange:()=>{l({streetViewControl:!t.streetViewControl})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Markers","otter-blocks"),initialOpen:!1,opened:!1!==d||void 0,onToggle:()=>{!1!==d&&u(!0)}},(0,i.createElement)(vl,{markers:t.markers,removeMarker:b,changeMarkerProp:m,addMarker:p,isPlaceAPIAvailable:r,initialOpen:d})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Global Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Google Maps API Key","otter-blocks"),type:"text",placeholder:(0,o.__)("Google Maps API Key","otter-blocks"),value:g,className:"components-placeholder__input",onChange:v,help:(0,o.__)("Changing the API key effects all Google Map Embed blocks. You will have to refresh the page after changing your API keys.","otter-blocks")}),(0,i.createElement)(c.Button,{isSecondary:!0,type:"submit",onClick:y,isBusy:h},(0,o.__)("Save API Key","otter-blocks")))),"style"===f&&(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Styles","otter-blocks")},(0,i.createElement)(ml.V,{value:t.style,options:[{label:(0,o.__)("Standard","otter-blocks"),value:"standard",image:window.themeisleGutenberg.assetsPath+"/icons/map-standard.png"},{label:(0,o.__)("Silver","otter-blocks"),value:"silver",image:window.themeisleGutenberg.assetsPath+"/icons/map-silver.png"},{label:(0,o.__)("Retro","otter-blocks"),value:"retro",image:window.themeisleGutenberg.assetsPath+"/icons/map-retro.png"},{label:(0,o.__)("Dark","otter-blocks"),value:"dark",image:window.themeisleGutenberg.assetsPath+"/icons/map-dark.png"},{label:(0,o.__)("Night","otter-blocks"),value:"night",image:window.themeisleGutenberg.assetsPath+"/icons/map-night.png"},{label:(0,o.__)("Aubergine","otter-blocks"),value:"aubergine",image:window.themeisleGutenberg.assetsPath+"/icons/map-aubergine.png"}],onChange:n}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Map Type","otter-blocks"),value:t.type,options:[{label:(0,o.__)("Road Map","otter-blocks"),value:"roadmap"},{label:(0,o.__)("Satellite View","otter-blocks"),value:"satellite"},{label:(0,o.__)("Hybrid","otter-blocks"),value:"hybrid"},{label:(0,o.__)("Terrain","otter-blocks"),value:"terrain"}],onChange:e=>{l({type:e}),a.setMapTypeId(window.google.maps.MapTypeId[e.toUpperCase()])}})),(0,i.createElement)(C.p,null));var B},kl=e=>{let{marker:t,isAdvanced:l,isPlaceAPIAvailable:a,addMarker:n,close:r}=e;(0,i.useEffect)((()=>{u(t.id),m(t.location),g(t.title),v(t.icon),k(t.description),_(t.latitude),C(t.longitude)}),[t]);const s=(0,i.useRef)(null),[d,u]=(0,i.useState)(t.id),[b,m]=(0,i.useState)(t.location),[p,g]=(0,i.useState)(t.title),[h,v]=(0,i.useState)(t.icon),[y,k]=(0,i.useState)(t.description),[f,_]=(0,i.useState)(t.latitude),[w,C]=(0,i.useState)(t.longitude);return(0,i.createElement)(c.Modal,{title:(0,o.__)("Add Marker","otter-blocks"),onRequestClose:r,shouldCloseOnClickOutside:!1},l&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Location","otter-blocks"),id:`themeisle-location-search-${t.id}`},(0,i.createElement)("input",{type:"text",id:`themeisle-location-search-${d}`,placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:b,className:"wp-block-themeisle-blocks-google-map-search",ref:s,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const t=new window.google.maps.places.SearchBox(s.current);t.addListener("places_changed",(()=>{const e=t.getPlaces();e&&0<e.length&&e.forEach((e=>{const t=e.formatted_address||e.name,l=e.geometry.location.lat(),o=e.geometry.location.lng();m(t),_(l),C(o)}))}))},onChange:e=>m(e.target.value),disabled:!a})),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:f,onChange:_}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:w,onChange:C})),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:p,onChange:g}),(0,i.createElement)(gl,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:y,onChange:k}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Map Icon","otter-blocks"),value:h||"https://maps.google.com/mapfiles/ms/icons/red-dot.png",options:[{label:(0,o.__)("Red","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/red-dot.png"},{label:(0,o.__)("Blue","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/blue-dot.png"},{label:(0,o.__)("Yellow","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/yellow-dot.png"},{label:(0,o.__)("Green","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/green-dot.png"},{label:(0,o.__)("Orange","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/orange-dot.png"}],onChange:v}),(0,i.createElement)(c.ButtonGroup,null,(0,i.createElement)(c.Button,{isPrimary:!0,onClick:()=>n(b,p,h,y,f,w)},(0,o.__)("Add","otter-blocks")),(0,i.createElement)(c.Button,{isSecondary:!0,onClick:r},(0,o.__)("Cancel","otter-blocks"))))},fl=e=>{let{attributes:t,initMap:l,displayMap:a,isMapLoaded:n,selectMarker:r,isSelectingMarker:s}=e;(0,i.useEffect)((()=>{a&&l()}),[a]);const{responsiveGetAttributes:d}=S();return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{id:t.id,className:g()("wp-block-themeisle-blocks-google-map-container",{"is-selecting-marker":s}),style:{height:d([(u=t.height,(0,K.isNumber)(u)?(e=>e?`${e}px`:e)(u):u),t.heightTablet,t.heightMobile])}}),n&&(0,i.createElement)(c.Button,{className:"wp-block-themeisle-blocks-google-map-marker-button",title:(0,o.__)("Add Button","otter-blocks"),onClick:r},(0,i.createElement)("span",{className:"dashicons dashicons-sticky"})));var u},_l={standard:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"administrative.land_parcel",elementType:"geometry.stroke",stylers:[{color:"#dcd2be"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#ae9e90"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#93817c"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#447530"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#fdfcf8"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#e98d58"}]},{featureType:"road.highway.controlled_access",elementType:"geometry.stroke",stylers:[{color:"#db8555"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#806b63"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"transit.line",elementType:"labels.text.fill",stylers:[{color:"#8f7d77"}]},{featureType:"transit.line",elementType:"labels.text.stroke",stylers:[{color:"#ebe3cd"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#92998d"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#64779e"}]},{featureType:"administrative.province",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#023e58"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#6f9ba5"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#3C7680"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#255763"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#b0d5ce"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{color:"#023e58"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"transit",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"transit.line",elementType:"geometry.fill",stylers:[{color:"#283d6a"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#3a4762"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]};const{attributes:wl}=dl;const Cl={to:[{type:"block",blocks:["themeisle-blocks/leaflet-map"],transform:e=>{const t=(0,K.omit)(e,["style","mapTypeControl","fullscreenControl","streetViewControl"]);return(0,a.createBlock)("themeisle-blocks/leaflet-map",{...t})}}]};var El=Cl;const{name:xl}=dl;(0,a.registerBlockType)(xl,{...dl,title:(0,o.__)("Google Maps","otter-blocks"),description:(0,o.__)("Display Google Maps on your website with Google Map block. Powered by Otter.","otter-blocks"),icon:r.mapIcon,keywords:["map","google","orbitfox"],transforms:El,edit:e=>{let{attributes:t,setAttributes:l,clientId:a,isSelected:n}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,wl);return()=>e(t.id)}),[t.id]),(0,i.useEffect)((()=>{let e=!0;return(async()=>{await window.wp.api.loadPromise.then((()=>{c.current=new window.wp.api.models.Settings})),!1===Boolean(window.themeisleGutenberg.mapsAPI)?v||c.current.fetch().then((t=>{e&&(h(t.themeisle_google_map_block_api_key),y(!0),""!==t.themeisle_google_map_block_api_key&&(f(!0),G(t.themeisle_google_map_block_api_key)))})):!v&&e&&(h(window.themeisleGutenberg.mapsAPI),y(!0),f(!0),G(window.themeisleGutenberg.mapsAPI))})(),window.isMapLoaded=window.isMapLoaded||!1,window[`removeMarker_${a.substr(0,8)}`]=j,window.gm_authFailure=function(){f(!1),D(!0)},d.current=document.createElement("script"),d.current.type="text/javascript",d.current.async=!0,d.current.defer=!0,d.current.id="themeisle-google-map-api-loading",()=>{e=!1}}),[]),(0,i.useEffect)((()=>{!1!==k&&void 0!==window.google&&u.current.setOptions({mapTypeControl:!!n||t.mapTypeControl,zoomControl:!!n||t.zoomControl,fullscreenControl:!!n||t.fullscreenControl,streetViewControl:!!n||t.streetViewControl})}),[n]),(0,i.useEffect)((()=>{m.current=[...t.markers]}),[t.markers]);const r=(0,i.useRef)([]),c=(0,i.useRef)(null),d=(0,i.useRef)(null),u=(0,i.useRef)(null),b=(0,i.useRef)(null),m=(0,i.useRef)([...t.markers]),[p,h]=(0,i.useState)(""),[v,y]=(0,i.useState)(!1),[k,f]=(0,i.useState)(!1),[_,w]=(0,i.useState)(!1),[C,E]=(0,i.useState)(!1),[x,S]=(0,i.useState)(!0),[T,M]=(0,i.useState)(!1),[B,z]=(0,i.useState)(!1),[P,R]=(0,i.useState)(!1),[F,O]=(0,i.useState)(!1),[N,A]=(0,i.useState)(!1),[H,I]=(0,i.useState)({}),[V,D]=(0,i.useState)(!1),G=e=>{window.isMapLoaded||(window.isMapLoaded=!0,d.current.onload=()=>{document.getElementById("themeisle-google-map-api-loading").id="themeisle-google-map-api",M(!0)},d.current.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=places&cache=${Math.random()}`,document.head.appendChild(d.current)),document.getElementById("themeisle-google-map-api")&&M(!0)},$=(e,t,l,n)=>{const r=`<div class="wp-block-themeisle-blocks-map-overview"><h6 class="wp-block-themeisle-blocks-map-overview-title">${l}</h6><div class="wp-block-themeisle-blocks-map-overview-content">${n?`<p>${n}</p>`:""}<a class="wp-block-themeisle-blocks-map-overview-delete" onclick="removeMarker_${a.substr(0,8)}( '${t}' )">${(0,o.__)("Delete Marker","otter-blocks")}</a></div></div>`,i=new window.google.maps.InfoWindow({content:r});e.addListener("click",(()=>{b.current=i,i.open(u.current,e)})),window.google.maps.event.addListener(i,"domready",(()=>{z(t)})),window.google.maps.event.addListener(i,"closeclick",(()=>{z(!1)}))},W=e=>{e.forEach((e=>{const{latitude:t}=e,{longitude:l}=e,o=new window.google.maps.LatLng(t,l),a=new window.google.maps.Marker({position:o,map:u.current,title:e.title,draggable:!0,icon:e.icon||"https://maps.google.com/mapfiles/ms/icons/red-dot.png"});window.google.maps.event.addListener(a,"dragend",(t=>{const l=t.latLng.lat(),o=t.latLng.lng();Z(e.id,"latitude",l),Z(e.id,"longitude",o)})),r.current.push(a),window.google.maps.event.addListener(a,"click",(()=>{b.current&&b.current.close()})),$(a,e.id,e.title,e.description)}))},Z=(e,t,o)=>{const a=[...m.current];a.find((t=>t.id===e))[t]=o.toString(),U(),W(a),l({markers:a})},j=e=>{let t=[...m.current];t=t.filter((t=>t.id!==e)),l({markers:t}),U(),z(!1),0<t.length&&W(t)},U=()=>{for(let e=0;e<r.current.length;e++)r.current[e].setMap(null);r.current=[]},q=()=>{!1===Boolean(window.themeisleGutenberg.mapsAPI)&&(E(!0),new window.wp.api.models.Settings({themeisle_google_map_block_api_key:p}).save().then((e=>{let t=!1;""!==e.themeisle_google_map_block_api_key&&(t=!0),E(!1),f(t),""!==e.themeisle_google_map_block_api_key&&(window.isMapLoaded=!1,G(e.themeisle_google_map_block_api_key))})))},Y=e=>{l({style:e}),u.current.setOptions({styles:_l[e]})},K=(0,s.useBlockProps)({className:g()("wp-block-themeisle-blocks-google-map-resizer",{"is-focused":n})});return v&&k?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ml.d,{label:(0,o.__)("Block Styles","otter-blocks"),value:t.style,options:[{label:(0,o.__)("Standard","otter-blocks"),value:"standard",image:window.themeisleGutenberg.assetsPath+"/icons/map-standard.png"},{label:(0,o.__)("Silver","otter-blocks"),value:"silver",image:window.themeisleGutenberg.assetsPath+"/icons/map-silver.png"},{label:(0,o.__)("Retro","otter-blocks"),value:"retro",image:window.themeisleGutenberg.assetsPath+"/icons/map-retro.png"},{label:(0,o.__)("Dark","otter-blocks"),value:"dark",image:window.themeisleGutenberg.assetsPath+"/icons/map-dark.png"},{label:(0,o.__)("Night","otter-blocks"),value:"night",image:window.themeisleGutenberg.assetsPath+"/icons/map-night.png"},{label:(0,o.__)("Aubergine","otter-blocks"),value:"aubergine",image:window.themeisleGutenberg.assetsPath+"/icons/map-aubergine.png"}],onChange:Y}),(0,i.createElement)(yl,{attributes:t,setAttributes:l,map:u.current,changeStyle:Y,isPlaceAPIAvailable:x,isMarkerOpen:B,setMarkerOpen:z,removeMarker:j,changeMarkerProp:Z,addMarkerManual:()=>{const e=(0,ul.Z)(),t=(0,o.__)("Custom Marker","otter-blocks"),l=u.current.getCenter(),a=l.lat(),n=l.lng();O(!0),A(!0),I({id:e,location:"",title:t,icon:"https://maps.google.com/mapfiles/ms/icons/red-dot.png",description:"",latitude:a,longitude:n})},api:p,isSaving:C,changeAPI:h,saveAPIKey:q}),F&&(0,i.createElement)(kl,{marker:H,isAdvanced:N,isPlaceAPIAvailable:x,close:()=>O(!1),addMarker:(e,o,a,n,i,s)=>{const c=new window.google.maps.LatLng(i,s),d=(0,ul.Z)(),m=new window.google.maps.Marker({position:c,map:u.current,title:o,draggable:!0,icon:a});window.google.maps.event.addListener(m,"dragend",(e=>{const t=e.latLng.lat(),l=e.latLng.lng();Z(d,"latitude",t),Z(d,"longitude",l)})),r.current.push(m);const p=[...t.markers],g={id:d,location:e,title:o,icon:a,description:n,latitude:i,longitude:s};p.push(g),l({markers:p}),window.google.maps.event.addListener(m,"click",(()=>{b.current&&b.current.close()})),$(m,g.id,o,n),O(!1),R(!1)}}),(0,i.createElement)("div",K,(0,i.createElement)(fl,{attributes:t,initMap:()=>{var e,o,a;const n=null!==(e=null===(o=(0,L.getEditorIframe)())||void 0===o||null===(a=o.contentWindow)||void 0===a?void 0:a.document)&&void 0!==e?e:document;if(u.current=new window.google.maps.Map(n.getElementById(t.id),{center:{lat:Number(t.latitude)||41.4036299,lng:Number(t.longitude)||2.1743558000000576},gestureHandling:"cooperative",zoom:t.zoom,mapTypeId:t.type,styles:_l[t.style]}),t.location&&void 0===t.latitude&&void 0===t.longitude){const e={query:t.location,fields:["name","geometry"]};new window.google.maps.places.PlacesService(u.current).findPlaceFromQuery(e,((e,t)=>{t===window.google.maps.places.PlacesServiceStatus.OK&&0<e.length&&u.current.setCenter(e[0].geometry.location)}))}window.google.maps.event.addListenerOnce(u.current,"idle",(()=>{w(!0)})),u.current.addListener("zoom_changed",(()=>{const e=u.current.getZoom();l({zoom:e})})),u.current.addListener("maptypeid_changed",(()=>{const e=u.current.getMapTypeId();l({type:e})})),u.current.addListener("bounds_changed",(()=>{const e=u.current.getCenter(),t=e.lat(),o=e.lng();l({latitude:t.toString(),longitude:o.toString()})})),0<t.markers.length&&W(t.markers);const r={query:t.location,fields:["name","geometry"]};new window.google.maps.places.PlacesService(u.current).findPlaceFromQuery(r,((e,t)=>{"REQUEST_DENIED"===t&&S(!1)}))},displayMap:T,isMapLoaded:_,selectMarker:()=>{R(!P),P?window.google.maps.event.clearListeners(u.current,"click"):u.current.addListener("click",(e=>{window.google.maps.event.clearListeners(u.current,"click");const t=(0,ul.Z)(),l=(0,o.__)("Custom Marker","otter-blocks"),a=e.latLng.lat(),n=e.latLng.lng();O(!0),A(!1),I({id:t,location:"",title:l,icon:"https://maps.google.com/mapfiles/ms/icons/red-dot.png",description:"",latitude:a,longitude:n})}))},isSelectingMarker:P}))):(0,i.createElement)("div",K,(0,i.createElement)(bl,{api:p,error:V,isAPILoaded:v,isAPISaved:k,isSaving:C,changeAPI:e=>{h(e),D(!1)},saveAPIKey:q}))},save:()=>null});var Sl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/icon-list","title":"Icon List","category":"themeisle-blocks","description":"Display an icon list in a beautiful layout. Powered by Otter.","keywords":["icon","list","items"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"defaultLibrary":{"type":"string","default":"fontawesome"},"defaultPrefix":{"type":"string","default":"fas"},"defaultIcon":{"type":"string","default":"angle-right"},"defaultContentColor":{"type":"string"},"defaultIconColor":{"type":"string"},"defaultSize":{"type":["number","string"]},"defaultIconSize":{"type":"string"},"gap":{"type":["number","string"]},"gapIconLabel":{"type":["string"]},"horizontalAlign":{"type":"string"},"alignmentTablet":{"type":"string"},"alignmentMobile":{"type":"string"},"hideLabels":{"type":"boolean"},"hasDivider":{"type":"boolean"},"dividerWidth":{"type":"string"},"dividerColor":{"type":"string"},"dividerLength":{"type":"string"}},"editorStyle":"otter-icon-list-editor","style":"otter-icon-list-style"}'),Tl=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(s.AlignmentToolbar,{value:{"flex-start":"left",center:"center","flex-end":"right"}[t.horizontalAlign],onChange:e=>{switch(e){case"left":l({horizontalAlign:"flex-start"});break;case"center":l({horizontalAlign:"center"});break;case"right":l({horizontalAlign:"flex-end"});break;default:l({horizontalAlign:void 0})}}}))},Ml=e=>{var t,l,a,n,r,d,u,b,m;let{attributes:p,setAttributes:g}=e;const[h,v]=(0,i.useState)("settings"),{responsiveSetAttributes:y,responsiveGetAttributes:k}=S(g);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)("div",null,(0,i.createElement)(w.Z,{value:h,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:v}),"settings"===h&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Layout","otter-blocks")},(0,i.createElement)(E.Z,{label:(0,o.__)("List Orientation","otter-blocks"),options:[{label:(0,o.__)("Vertical","otter-blocks"),value:"default"},{label:(0,o.__)("Horizontal","otter-blocks"),value:"is-style-horizontal"}],value:null!=p&&null!==(t=p.className)&&void 0!==t&&t.includes("is-style-horizontal")?"is-style-horizontal":"default",onChange:e=>{var t;const l=(null==p||null===(t=p.className)||void 0===t?void 0:t.split(" "))||[];"default"===e&&l.includes("is-style-horizontal")?l.splice(l.indexOf("is-style-horizontal"),1):"is-style-horizontal"!==e||l.includes("is-style-horizontal")||l.push("is-style-horizontal"),g({className:l.join(" ")})}}),(0,i.createElement)(M.Z,{label:(0,o.__)("Alignment","otter-blocks")},(0,i.createElement)(oe.Z,{value:null!==(l=k([p.horizontalAlign,p.alignmentTablet,p.alignmentMobile]))&&void 0!==l?l:"flex-start",onChange:e=>{y(e,["horizontalAlign","alignmentTablet","alignmentMobile"])},options:[{icon:ee.Z,label:(0,o.__)("Left","otter-blocks"),value:"flex-start"},{icon:te.Z,label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:le.Z,label:(0,o.__)("Right","otter-blocks"),value:"flex-end"}],hasIcon:!0})),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide Labels","otter-blocks"),checked:Boolean(p.hideLabels),onChange:()=>g({hideLabels:!p.hideLabels})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Icons","otter-blocks")},(0,i.createElement)(i.Suspense,{fallback:(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null))},(0,i.createElement)(_.Z,{label:(0,o.__)("Icon Picker","otter-blocks"),library:p.defaultLibrary,prefix:p.defaultPrefix,icon:p.defaultIcon,changeLibrary:e=>{g({defaultLibrary:e,defaultIcon:void 0,defaultPrefix:"fas"})},onChange:e=>{if("image"===p.defaultLibrary&&null!=e&&e.url)return g({defaultIcon:e.url});g("object"==typeof e?{defaultIcon:e.name,defaultPrefix:e.prefix}:{defaultIcon:e})},allowImage:!0})))),"style"===h&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!0,colorSettings:[{value:p.defaultIconColor,onChange:e=>g({defaultIconColor:e}),label:(0,o.__)("Icon","otter-blocks")},{value:p.defaultContentColor,onChange:e=>g({defaultContentColor:e}),label:(0,o.__)("Text","otter-blocks")},...p.hasDivider?[{value:p.dividerColor,onChange:e=>g({dividerColor:e}),label:(0,o.__)("Divider","otter-blocks")}]:[]]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Size","otter-blocks")},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Font Size","otter-blocks"),__nextHasNoMarginBottom:!0},(0,i.createElement)(c.FontSizePicker,{value:null!==(a=(0,x.Yj)(p.defaultSize))&&void 0!==a?a:"16px",onChange:e=>g({defaultSize:e}),fontSizes:[{name:"Small",size:"12px",slug:"small"},{name:"Normal",size:"16px",slug:"Normal"},{name:"Medium",size:"20px",slug:"medium"},{name:"Large",size:"36px",slug:"large"}],withReset:!0})),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Icon Size","otter-blocks"),__nextHasNoMarginBottom:!0},(0,i.createElement)(c.FontSizePicker,{value:null!==(n=null!==(r=p.defaultIconSize)&&void 0!==r?r:(0,x.Yj)(p.defaultSize))&&void 0!==n?n:"16px",onChange:e=>g({defaultIconSize:e}),fontSizes:[{name:"Small",size:"12px",slug:"small"},{name:"Normal",size:"16px",slug:"Normal"},{name:"Medium",size:"20px",slug:"medium"},{name:"Large",size:"36px",slug:"large"}],withReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Space between List items","otter-blocks"),value:null!==(d=p.gap)&&void 0!==d?d:"5px",onChange:e=>g({gap:e}),units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"}]}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Space between Icon and Label","otter-blocks"),value:null!==(u=p.gapIconLabel)&&void 0!==u?u:"16px",onChange:e=>g({gapIconLabel:e}),units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"}]})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Divider","otter-blocks")},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Enable Divider","otter-blocks"),checked:Boolean(p.hasDivider),onChange:()=>g({hasDivider:!p.hasDivider})}),p.hasDivider&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:null!==(b=p.dividerWidth)&&void 0!==b?b:"2px",onChange:e=>g({dividerWidth:e}),units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"}],max:5}),(0,i.createElement)("br",null),(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Length","otter-blocks"),value:null!==(m=p.dividerLength)&&void 0!==m?m:"100%",onChange:e=>g({dividerLength:e}),isResetValueOnUnitChange:!0}))))))};const{attributes:Bl}=Sl;var zl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/icon-list-item","title":"Icon List Item","category":"themeisle-blocks","description":"Display an item for the icon list. Powered by Otter.","keywords":["icon","list","items"],"parent":["themeisle-blocks/icon-list"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"content":{"type":"string"},"contentColor":{"type":"string"},"iconColor":{"type":"string"},"library":{"type":"string"},"iconPrefix":{"type":"string"},"icon":{"type":"string"}}}'),Pl=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(_.Z,{label:(0,o.__)("Icon Picker","otter-blocks"),library:t.library,prefix:t.iconPrefix,icon:t.icon,changeLibrary:e=>{l({library:e,icon:void 0,iconPrefix:"fab"})},onChange:e=>{if("image"===t.library&&null!=e&&e.url)return l({icon:e.url});l("object"==typeof e?{icon:e.name,iconPrefix:e.prefix}:{icon:e})},allowImage:!0})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!0,colorSettings:[{value:t.contentColor,onChange:e=>l({contentColor:e}),label:(0,o.__)("Content Color","otter-blocks")},..."image"!==t.library?[{value:t.iconColor,onChange:e=>l({iconColor:e}),label:(0,o.__)("Icon Color","otter-blocks")}]:[]]}))};const{attributes:Ll}=zl;const{name:Rl}=zl;(0,a.registerBlockType)(Rl,{...zl,title:(0,o.__)("Icon List Item","otter-blocks"),description:(0,o.__)("Display an item for the icon list. Powered by Otter.","otter-blocks"),icon:r.faIcon,keywords:["item","icon","list"],merge(e,t){return{content:(e.content||"")+(t.content||"")}},edit:e=>{var t,l;let{attributes:n,setAttributes:r,name:c,clientId:d,onReplace:u,onRemove:b,mergeBlocks:m}=e;const[p,h]=(0,i.useState)(!1),{hasParent:y,parentAttributes:k}=(0,v.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor"),o=t(l(d));return{hasParent:!!o,parentAttributes:o?o.attributes:{}}}),[]);(0,i.useEffect)((()=>{const e=(0,L.blockInit)(d,Ll);return()=>e(n.id)}),[n.id]),(0,i.useEffect)((()=>{r({library:n.library||k.defaultLibrary,icon:n.icon||k.defaultIcon,iconPrefix:n.iconPrefix||k.defaultPrefix})}),[y,k,n]),(0,i.useEffect)((()=>{if("image"===n.library)try{const e=new URL(n.icon);"http:"!==(null==e?void 0:e.protocol)&&"https:"!==(null==e?void 0:e.protocol)||h(!0)}catch(e){h(!1)}}),[n.library,n.icon]);const f=Se.ZP.icons[n.icon],_=`${n.iconPrefix||k.defaultPrefix} fa-${n.icon||k.defaultIcon}`,w={"--content-color":null!==(t=n.contentColor)&&void 0!==t?t:k.defaultContentColor,"--icon-color":null!==(l=n.iconColor)&&void 0!==l?l:k.defaultIconColor},C=(0,s.useBlockProps)({style:w});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Pl,{attributes:n,setAttributes:r}),(0,i.createElement)("div",C,"image"===n.library&&p?(0,i.createElement)("img",{src:n.icon}):"themeisle-icons"===n.library&&n.icon&&void 0!==f?(0,i.createElement)(f,{className:g()({"wp-block-themeisle-blocks-icon-list-item-icon":!n.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":n.iconColor})}):(0,i.createElement)("i",{className:g()(_,{"wp-block-themeisle-blocks-icon-list-item-icon":!n.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":n.iconColor})}),(0,i.createElement)(s.RichText,{identifier:"content",tagName:"p",placeholder:(0,o.__)("Write your content…","otter-blocks"),className:g()({"wp-block-themeisle-blocks-icon-list-item-content":!n.contentColor},{"wp-block-themeisle-blocks-icon-list-item-content-custom":n.contentColor}),value:n.content,onChange:e=>{r({content:e})},onSplit:e=>e?(0,a.createBlock)(c,{...n,content:e}):(0,a.createBlock)(c),onMerge:m,onReplace:u,onRemove:b})))},save:e=>{let{attributes:t}=e;const l=`${t.iconPrefix} fa-${t.icon}`,o=Se.ZP.icons[t.icon],a=s.useBlockProps.save({id:t.id});return(0,i.createElement)("div",a,"image"===t.library&&t.icon?(0,i.createElement)("img",{src:t.icon}):"themeisle-icons"===t.library&&t.icon?(0,i.createElement)(o,{className:g()({"wp-block-themeisle-blocks-icon-list-item-icon":!t.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":t.iconColor})}):(0,i.createElement)("i",{className:g()(l,{"wp-block-themeisle-blocks-icon-list-item-icon":!t.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":t.iconColor})}),(0,i.createElement)(s.RichText.Content,{tagName:"p",className:g()({"wp-block-themeisle-blocks-icon-list-item-content":!t.contentColor},{"wp-block-themeisle-blocks-icon-list-item-content-custom":t.contentColor}),value:t.content}))}});const{name:Fl}=Sl;(0,a.registerBlockType)(Fl,{...Sl,title:(0,o.__)("Icon List","otter-blocks"),description:(0,o.__)("Display an icon list in a beautiful layout. Powered by Otter.","otter-blocks"),icon:r.faIcon,keywords:["icon","list","items"],edit:e=>{let{attributes:t,setAttributes:l,clientId:o,className:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(o,Bl);return()=>e(t.id)}),[t.id]);const{responsiveGetAttributes:n}=S(l),r={"--icon-align":n([t.horizontalAlign,t.alignmentTablet,t.alignmentMobile]),"--icon-align-tablet":t.alignmentTablet,"--icon-align-mobile":t.alignmentMobile,"--gap":(0,x.Yj)(t.gap),"--gap-icon-label":t.gapIconLabel,"--font-size":(0,x.Yj)(t.defaultSize),"--icon-size":t.defaultIconSize,"--label-visibility":t.hideLabels?"none":void 0,"--divider-color":t.dividerColor,"--divider-width":t.dividerWidth,"--divider-length":t.dividerLength,"--divider-margin-left":t.horizontalAlign?"auto":void 0,"--divider-margin-right":"flex-end"===t.horizontalAlign?"0":void 0,"--divider-margin-left-tablet":t.alignmentTablet?"auto":void 0,"--divider-margin-right-tablet":"flex-end"===t.alignmentTablet?"0":void 0,"--divider-margin-left-mobile":t.alignmentMobile?"auto":void 0,"--divider-margin-right-mobile":"flex-end"===t.alignmentMobile?"0":void 0},c=(0,s.useBlockProps)({id:t.id,style:r,className:g()(a,{"has-divider":Boolean(t.hasDivider)})});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Tl,{attributes:t,setAttributes:l}),(0,i.createElement)(Ml,{attributes:t,setAttributes:l}),(0,i.createElement)("div",c,(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/icon-list-item"],__experimentalMoverDirection:"vertical",orientation:"vertical",template:[["themeisle-blocks/icon-list-item"]],renderAppender:s.InnerBlocks.DefaultAppender})))},save:e=>{let{attributes:t,className:l}=e;const o=s.useBlockProps.save({id:t.id,className:g()(l,{"has-divider":Boolean(t.hasDivider)})});return(0,i.createElement)("div",o,(0,i.createElement)(s.InnerBlocks.Content,null))},example:{innerBlocks:[{name:"themeisle-blocks/icon-list-item",attributes:{content:(0,o.__)("List Item 1","otter-blocks")}},{name:"themeisle-blocks/icon-list-item",attributes:{content:(0,o.__)("List Item 2","otter-blocks")}},{name:"themeisle-blocks/icon-list-item",attributes:{content:(0,o.__)("List Item 3","otter-blocks")}}]}});var Ol=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/leaflet-map","title":"Maps","category":"themeisle-blocks","description":"Display Open Street Maps on your website with Maps block. Powered by Otter.","keywords":["map","opeenstreetmap","location"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"location":{"type":"string","default":"La Sagrada Familia, Barcelona, Spain"},"latitude":{"type":"string","default":"41.4034789"},"longitude":{"type":"string","default":"2.174410333009705"},"bbox":{"type":"string","default":"2.1207046508789067%2C41.34807736149302%2C2.2288513183593754%2C41.45816618938139"},"zoom":{"type":"number"},"height":{"type":["number","string"],"default":"400px"},"heightTablet":{"type":"string"},"heightMobile":{"type":"string"},"markers":{"type":"array","default":[]},"zoomControl":{"type":"boolean","default":true},"draggable":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false},"editorStyle":"otter-leaflet-map-editor","style":"otter-leaflet-map-style","editorScript":"leaflet-gesture-handling","script":"otter-leaflet"}');async function Nl(e){const t=await async function(e){if("string"!=typeof e)throw(0,o.__)("Location must be a string","otter-blocks");const t="https://nominatim.openstreetmap.org/search?q="+e.split(" ").map((e=>encodeURIComponent(e))).join("+")+"&format=geojson",l=await fetch(t);return l.ok&&200===l.status?l.json():console.warn((0,o.__)("An error has occured: ","otter-blocks")+l.status)}(e);if(null!=t&&t.features.length){var l;const e=t.features[0];if(null!=e&&null!==(l=e.geometry)&&void 0!==l&&l.coordinates.length)return{longitude:e.geometry.coordinates[0],latitude:e.geometry.coordinates[1]}}return null}const Al=e=>{let{value:t,onChange:l}=e;const a=(0,be.useInstanceId)(Al);(0,i.useEffect)((()=>{wp.oldEditor.initialize(r.current.id,{tinymce:{classic_block_editor:!0,plugins:"lists,media,paste,tabfocus,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wpdialogs,wptextpattern,wpview",toolbar1:"formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_add_media"}});const e=window.tinymce.get(r.current.id);return e.on("change",(()=>l(e.getContent()))),()=>wp.oldEditor.remove(r.current.id)}),[]);const n=`inspector-textarea-control-${a}`,r=(0,i.useRef)(null);return(0,i.createElement)(c.BaseControl,{id:n,label:(0,o.__)("Description","otter-blocks")},(0,i.createElement)("textarea",{id:n,className:"components-textarea-control__input",rows:4,value:t,onChange:e=>l(e.target.value),ref:r}))};var Hl=Al,Il=e=>{let{marker:t,isOpen:l,openMarker:a,dispatch:n}=e;const[r,s]=(0,i.useState)(t.location),[d,u]=(0,i.useState)(t.longitude),[b,m]=(0,i.useState)(t.latitude),[p,h]=(0,i.useState)(t.title),[v,y]=(0,i.useState)(t.description),[k,f]=(0,i.useState)({target:"",reason:""});return(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker"},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-title-area"},(0,i.createElement)(c.Button,{className:"wp-block-themeisle-blocks-leaflet-map-marker-title",onClick:()=>a()},t.title||(0,o.__)("Custom Marker","otter-blocks")),(0,i.createElement)(c.Button,{icon:"no-alt",label:(0,o.__)("Remove Marker","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-leaflet-map-marker-remove",onClick:()=>n({type:$l.REMOVE,ids:[t.id]})})),l&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-control-area"},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Location","otter-blocks"),type:"text",className:g()({"wp-block-themeisle-blocks-leaflet-map-input-error":"LOCATION"===k.target}),value:r,onChange:e=>{s(e)},help:(0,o.__)("Press Enter to search the location","otter-blocks"),onKeyDown:e=>((e,l)=>{e.key===l&&(async()=>{const e=await Nl(r);e?(n({type:$l.UPDATE,ids:[t.id],updatedProps:{location:r,latitude:e.latitude,longitude:e.longitude}}),m(e.latitude),u(e.longitude),"LOCATION"===k.target&&f({})):f({target:"LOCATION",reason:(0,o.__)("Location couldn't been found!","otter-blocks")})})()})(e,"Enter")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:b,onChange:e=>{m(e),n({type:$l.UPDATE,ids:[t.id],updatedProps:{latitude:e}})}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:d,onChange:e=>{u(e),n({type:$l.UPDATE,ids:[t.id],updatedProps:{longitude:e}})}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:p,onChange:e=>{h(e),n({type:$l.UPDATE,ids:[t.id],updatedProps:{title:e}})}}),(0,i.createElement)(Hl,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:t.description,onChange:e=>{y(v),n({type:$l.UPDATE,ids:[t.id],updatedProps:{description:e}})}})))},Vl=e=>{let{markers:t,dispatch:l,markersInteraction:a}=e;const{openMarker:n,setOpenMarker:r}=a;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-group"},t.map((e=>(0,i.createElement)(Il,{key:e.id,marker:e,isOpen:n===e.id,openMarker:()=>r(a.openMarker!==e.id?e.id:null),dispatch:l})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-leaflet-map-marker-add",onClick:()=>{l({type:$l.ADD,marker:{id:(0,ul.Z)()},dispatch:l})}},(0,o.__)("Add Marker","otter-blocks")))},Dl=e=>{let{attributes:t,setAttributes:l,dispatch:a,markersInteraction:n}=e;const[r,d]=(0,i.useState)(t.location),[u,b]=(0,i.useState)({target:"",reason:""}),{responsiveSetAttributes:m,responsiveGetAttributes:p}=S(l);return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Location","otter-blocks")},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Location","otter-blocks"),type:"text",className:g()({"wp-block-themeisle-blocks-leaflet-map-input-error":"LOCATION"===u.target}),placeholder:(0,o.__)("Enter location. E.g: La Sagrada Familia, Barcelona, Spain","otter-blocks"),help:(0,o.__)("Press Enter to search the location","otter-blocks"),value:r,onChange:d,onKeyDown:e=>((e,t)=>{e.key===t&&(async()=>{l({location:r});const e=await Nl(r);e?(l({latitude:e.latitude.toString(),longitude:e.longitude.toString()}),"LOCATION"===u.target&&b({})):b({target:"LOCATION",reason:(0,o.__)("Location couldn't been found!","otter-blocks")})})()})(e,"Enter")}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter latitude…","otter-blocks"),value:t.latitude,onChange:e=>{l({latitude:e.toString()})}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter longitude","otter-blocks"),value:t.longitude,onChange:e=>{l({longitude:e.toString()})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Positioning & Zooming","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Map Zoom Level","otter-blocks"),value:t.zoom,onChange:e=>{l({zoom:e})},min:0,max:20}),(0,i.createElement)(M.Z,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:p([(h=t.height,(0,K.isNumber)(h)?(e=>e?`${e}px`:e)(h):h),t.heightTablet,t.heightMobile]),onChange:e=>m(e,["height","heightTablet","heightMobile"])}),(0,i.createElement)(k.Z,{values:["height","heightTablet","heightMobile"],setAttributes:l}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Controls","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.BaseControl,null,(0,o.__)("The following changes will not affect block preview during the editing process. You can click outside the block to see the changes take effect.","otter-blocks")),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Draggable Map","otter-blocks"),checked:t.draggable,onChange:()=>{l({draggable:!t.draggable})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Zoom Control","otter-blocks"),checked:t.zoomControl,onChange:()=>{l({zoomControl:!t.zoomControl})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Markers","otter-blocks"),initialOpen:!1},(0,i.createElement)(Vl,{markers:t.markers,dispatch:a,markersInteraction:n})));var h};const{attributes:Gl}=Ol,$l={ADD:"ADD",ADD_MANUAL:"ADD_MANUAL",REMOVE:"REMOVE",UPDATE:"UPDATE",INIT:"INIT"};const Wl={to:[{type:"block",blocks:["themeisle-blocks/google-map"],transform:e=>{const t=e;return(0,a.createBlock)("themeisle-blocks/google-map",{...t})}}]};var Zl=Wl;const{name:jl}=Ol;(0,a.registerBlockType)(jl,{...Ol,title:(0,o.__)("Maps","otter-blocks"),description:(0,o.__)("Display Open Street Maps on your website with Maps block. Powered by Otter.","otter-blocks"),icon:r.mapIcon,keywords:["map","opeenstreetmap","location"],transforms:Zl,edit:e=>{let{clientId:t,attributes:l,setAttributes:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(t,Gl);return()=>e(l.id)}),[l.id]);const{responsiveGetAttributes:n}=S(),r=(0,i.useRef)(null),[c,d]=(0,i.useState)(null),[u,b]=(0,i.useState)(!1),[m,p]=(0,i.useState)(null),g=(e,t)=>{if(window.L&&c&&t&&e){var l,a,n,r,i;null!==(l=e.id)&&void 0!==l||(e.id=(0,ul.Z)()),null!==(a=e.latitude)&&void 0!==a||(e.latitude=c.getCenter().lat),null!==(n=e.longitude)&&void 0!==n||(e.longitude=c.getCenter().lng),null!==(r=e.title)&&void 0!==r||(e.title=(0,o.__)("Add a title","otter-blocks")),null!==(i=e.description)&&void 0!==i||(e.description="");const s=window.L.marker([e.latitude,e.longitude]||0,{draggable:!0});return s.on("movestart",(()=>{s.closeTooltip(),s.closePopup()})),s.on("moveend",(()=>{const l=s.getLatLng();t({type:$l.UPDATE,ids:[e.id],updatedProps:{latitude:l.lat,longitude:l.lng}})})),s.on("click",(()=>{p(e.id)})),s.markerProps=e,s}return null},[h,v]=(0,i.useReducer)(((e,t)=>{switch(t.type){case $l.ADD:const l=g(t.marker,t.dispatch);return[...e,l];case $l.ADD_MANUAL:if(u){const l=g(t.marker,t.dispatch);return[...e,l]}return e;case $l.REMOVE:return e.filter((e=>{let{markerProps:l}=e;return t.ids.includes(l.id)})).forEach((e=>{c.hasLayer(e)&&c.removeLayer(e)})),e.filter((e=>{let{markerProps:l}=e;return!t.ids.includes(l.id)}));case $l.INIT:const a=t.markers.map((e=>g(e,t.dispatch)));return[...e,...a];case $l.UPDATE:return e.map((e=>{const l=e.markerProps;return t.ids.includes(l.id)&&(e.markerProps=(0,K.merge)(e.markerProps,t.updatedProps)),e}));default:console.warn((0,o.__)("The action for the leaflet block do not have a defined action in marker's reducer: ","otter-blocks")+t.type)}return e}),[],(()=>[])),y=()=>{if(!r.current&&!window.L)return;let{L:e}=window;const t=(0,L.getEditorIframe)();var n;if(Boolean(t)&&(e=null===(n=t.contentWindow)||void 0===n?void 0:n.L),!e)return;r.current.innerHTML="";const i=e.map(r.current,{gestureHandling:!0,gestureHandlingOptions:{text:{touch:(0,o.__)("Use two fingers to move the map","otter-blocks"),scroll:(0,o.__)("Use ctrl + scroll to zoom the map","otter-blocks"),scrollMac:(0,o.__)("Use ⌘ + scroll to zoom the map","otter-blocks")}}});e.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:["a","b","c"]}).addTo(i),i.on("zoom",(()=>{a({zoom:i.getZoom()})})),i.on("moveend",(()=>{const e=i.getCenter();a({latitude:e.lat.toString(),longitude:e.lng.toString()})})),i.on("click",(e=>{v({type:$l.ADD_MANUAL,marker:{latitude:e.latlng.lat,longitude:e.latlng.lng},dispatch:v}),b(!1)})),e.Control.AddMarker=e.Control.extend({onAdd:()=>{const t=e.DomUtil.create("button","wp-block-themeisle-blocks-leaflet-map-marker-button"),l=e.DomUtil.create("span","dashicons dashicons-sticky",t);return e.DomEvent.on(t,"click",(t=>{e.DomEvent.stopPropagation(t),b(!u)})),t.title=(0,o.__)("Add marker on the map with a click","otter-blocks"),t.appendChild(l),t},onRemove:()=>{}}),e.control.addmarker=t=>new e.Control.AddMarker(t),e.control.addmarker({position:"bottomleft"}).addTo(i),d(i),v({type:$l.INIT,markers:l.markers,dispatch:v})};(0,i.useEffect)((()=>{(0,L.getEditorIframe)()?((0,L.copyScriptAssetToIframe)("#leaflet-js",(()=>{y()})),(0,L.copyScriptAssetToIframe)("#leaflet-gesture-handling-js",(()=>{}))):y()}),[]),(0,i.useEffect)((()=>{l.height&&c&&c.invalidateSize(!0)}),[l.height,c]),(0,i.useEffect)((()=>{l.latitude&&l.longitude&&c&&c.setView([l.latitude,l.longitude],l.zoom||15)}),[l.latitude,l.longitude,l.zoom,c]),(0,i.useEffect)((()=>{var e;null===(e=r.current)||void 0===e||e.classList.toggle("is-selecting-location",u)}),[u]),(0,i.useEffect)((()=>{l.latitude&&l.longitude&&c&&a({bbox:c.getBounds().toBBoxString()})}),[l.latitude,l.longitude,c]),(0,i.useEffect)((()=>{h&&(h.forEach((e=>{c.hasLayer(e)||c.addLayer(e);const{markerProps:t}=e;e.setLatLng([t.latitude,t.longitude]),e.closeTooltip(),e.unbindTooltip(),e.bindTooltip(t.title,{direction:"auto"}),e.closePopup(),e.unbindPopup(),e.bindPopup(((e,t)=>{const l=document.createElement("div"),a=document.createElement("h6"),n=document.createElement("div"),r=document.createElement("p"),i=document.createElement("button");return a.innerHTML=e.title,r.innerHTML=e.description,i.onclick=()=>t({type:$l.REMOVE,ids:[e.id]}),i.innerHTML=(0,o.__)("Delete Marker","otter-blocks"),l.classList.add("wp-block-themeisle-blocks-map-overview"),n.classList.add("wp-block-themeisle-blocks-map-overview-content"),a.classList.add("wp-block-themeisle-blocks-map-overview-title"),i.classList.add("wp-block-themeisle-blocks-map-overview-delete"),l.appendChild(a),l.appendChild(n),l.appendChild(i),n.appendChild(r),l})(t,v))})),l.markers.length!==h.length&&c&&a({markers:h.map((e=>{let{markerProps:t}=e;return t}))}))}),[h,c,l.markers]);const k=(0,s.useBlockProps)();return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Dl,{attributes:l,setAttributes:a,dispatch:v,markersInteraction:{openMarker:m,setOpenMarker:p}}),(0,i.createElement)("div",k,(0,i.createElement)("div",{id:l.id,ref:r,style:{width:"100%",height:n([(f=l.height||400,(0,K.isNumber)(f)?(e=>e?`${e}px`:e)(f):f),l.heightTablet,l.heightMobile])}})));var f},save:()=>null,example:{attributes:{}}});var Ul=l(2553),ql=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/lottie","title":"Lottie Animation","category":"themeisle-blocks","description":"Add Lottie animations to your WordPress. Powered by Otter.","keywords":["media","lottie","animation"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"file":{"type":"object"},"trigger":{"type":"string","default":"none"},"loop":{"type":"boolean","default":false},"count":{"type":"number","default":0},"speed":{"type":"number","default":1},"direction":{"type":"boolean","default":false},"width":{"type":["string","number"]},"ariaLabel":{"type":"string","default":""},"backgroundColor":{"type":"string"},"backgroundGradient":{"type":"string"}},"supports":{"align":["left","center","right"]},"editorStyle":"otter-lottie-editor","script":"otter-lottie"}'),Yl=e=>{var t;let{className:l,file:a,onChange:n,attributes:r}=e;const[d,u]=(0,i.useState)((null===(t=r.file)||void 0===t?void 0:t.url)||null);return Boolean(window.themeisleGutenberg.isWPVIP)?(0,i.createElement)(c.Placeholder,{label:(0,o.__)("Lottie","otter-blocks"),instructions:(0,o.__)("Add Lottie animations and files to your website. You need to use a .json file.","otter-blocks"),icon:(0,i.createElement)(s.BlockIcon,{icon:Ul.Z}),className:l},(0,i.createElement)("form",{onSubmit:e=>(e&&e.preventDefault(),n(d))},(0,i.createElement)("input",{type:"url",value:d||"",className:"components-placeholder__input","aria-label":(0,o.__)("Lottie","otter-blocks"),placeholder:(0,o.__)("Enter URL to embed here…","otter-blocks"),onChange:e=>u(e.target.value)}),(0,i.createElement)(c.Button,{isPrimary:!0,disabled:!d,type:"submit"},(0,o.__)("Embed","otter-blocks")))):(0,i.createElement)(s.MediaPlaceholder,{labels:{title:(0,o.__)("Lottie","otter-blocks"),instructions:(0,o.__)("Add Lottie animations and files to your website.","otter-blocks")},icon:(0,i.createElement)(s.BlockIcon,{icon:Ul.Z}),accept:["application/json",".lottie"],allowedTypes:["application/json"],value:{...a},onSelectURL:n,onSelect:n})},Kl=e=>{let{attributes:t,setAttributes:l,playerRef:a}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks"),initialOpen:!0},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Trigger","otter-blocks"),help:(0,o.__)("Animation trigger. This will only work on the front-end.","otter-blocks"),value:t.trigger,options:[{label:(0,o.__)("Autoplay","otter-blocks"),value:"none"},{label:(0,o.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,o.__)("Hover","otter-blocks"),value:"hover"},{label:(0,o.__)("Click","otter-blocks"),value:"click"}],onChange:e=>{l({trigger:e})}}),"scroll"!==t.trigger&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Loop","otter-blocks"),help:(0,o.__)("Whether to loop animation.","otter-blocks"),checked:t.loop,onChange:e=>{l({loop:e}),a.current.setLooping(e),t.direction&&a.current.seek("100%"),a.current.play()}}),t.loop&&(0,i.createElement)(c.TextControl,{label:(0,o.__)("Numbers of loops","otter-blocks"),help:(0,o.__)("Number of times to loop animation.","otter-blocks"),type:"number",value:t.count,onChange:e=>{l({count:Number(e)}),a.current.load(t.file.url)}}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Speed","otter-blocks"),help:(0,o.__)("Animation speed.","otter-blocks"),value:t.speed,onChange:e=>{l({speed:Number(e)}),a.current.setSpeed(e)},step:.1,min:.1,max:5}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Reverse","otter-blocks"),help:(0,o.__)("Direction of animation.","otter-blocks"),checked:t.direction,onChange:e=>{l({direction:e}),a.current.setDirection(e?-1:1),a.current.seek(e?"100%":0)}})),(0,i.createElement)(s.__experimentalUnitControl,{onChange:e=>{const t=parseInt(e.slice(0,-1)),o=e.slice(-1);100<t&&"%"===o&&(e="100%"),l({width:e})},label:(0,o.__)("Width","otter-blocks"),isUnitSelectTabbable:!0,isResetValueOnUnitChange:!0,__unstableInputWidth:"50%",value:Number.isInteger(t.width)?`${t.width}px`:t.width,units:[{value:"%",label:"%",default:100},{value:"px",label:"px",default:300}]})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Background","otter-blocks"),initialOpen:!1},(0,i.createElement)(s.__experimentalColorGradientControl,{colorValue:t.backgroundColor,gradientValue:t.backgroundGradient,onColorChange:e=>l({backgroundColor:e}),onGradientChange:e=>l({backgroundGradient:e}),showTitle:!1,className:"otter-lottie-background-control"}))),(0,i.createElement)(s.InspectorAdvancedControls,null,(0,i.createElement)(c.TextControl,{label:(0,o.__)("Aria Label","otter-blocks"),help:(0,o.__)("Describe the purpose of this animation on the page.","otter-blocks"),value:t.ariaLabel,onChange:e=>l({ariaLabel:e})})))},Jl=e=>{let{isEditing:t,setEditing:l}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.ToolbarGroup,null,(0,i.createElement)(c.Tooltip,{text:t?(0,o.__)("Save","otter-blocks"):(0,o.__)("Edit","otter-blocks")},(0,i.createElement)(c.Button,{onClick:()=>l(!t)},(0,i.createElement)(c.Dashicon,{icon:t?"yes":"edit"})))))},Ql=e=>{let{attributes:t,playerRef:l}=e;(0,i.useEffect)((()=>{const e=(0,L.getEditorIframe)();Boolean(e)?((0,L.copyScriptAssetToIframe)("#lottie-player-js",(()=>{!(0,K.isEmpty)(t.file)&&t.loop&&null!==l.current&&l.current.addEventListener("complete",o)})),(0,L.copyScriptAssetToIframe)("#dotlottie-player-js",(()=>{!(0,K.isEmpty)(t.file)&&t.loop&&null!==l.current&&l.current.addEventListener("complete",o)}))):!(0,K.isEmpty)(t.file)&&t.loop&&null!==l.current&&l.current.addEventListener("complete",o)}),[]);const o=()=>{l.current&&(l.current.setLooping(t.loop),l.current.play(),l.current.removeEventListener("complete",o))};let a=(0,i.createElement)("lottie-player");return t.file.url.endsWith(".lottie")&&(a=(0,i.createElement)("dotlottie-player")),(0,i.cloneElement)(a,{id:t.id,ref:l,src:t.file.url,autoplay:!t.trigger||"none"===t.trigger,loop:t.loop,count:t.direction?-1*t.count:t.count,speed:t.speed,background:t.backgroundColor||t.backgroundGradient,direction:t.direction?-1:1,trigger:t.trigger,"data-loop":t.loop,mode:"normal",style:{width:!(!t.width||"%"===t.width.toString().slice(-1))&&`${t.width}px`,maxWidth:!(!t.width||"%"!==t.width.toString().slice(-1))&&`${t.width}`,height:"auto"},..."hover"===t.trigger&&{hover:"hover"},...t.ariaLabel&&{"aria-label":t.ariaLabel}})};const{attributes:Xl}=ql;const{name:eo}=ql;(0,a.registerBlockType)(eo,{...ql,title:(0,o.__)("Lottie Animation","otter-blocks"),description:(0,o.__)("Add Lottie animations to your WordPress. Powered by Otter.","otter-blocks"),icon:Ul.Z,keywords:["media","lottie","animation"],edit:e=>{let{attributes:t,setAttributes:l,isSelected:o,clientId:a}=e;const n=(0,i.useRef)(null),[r,c]=(0,i.useState)(!Boolean(t.file));(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,Xl);return()=>e(t.id)}),[t.id]),(0,i.useEffect)((()=>{var e,l,a,r,i,s;o?(null===(e=n.current)||void 0===e||null===(l=e.play)||void 0===l||l.call(e),t.direction&&(null===(a=n.current)||void 0===a||null===(r=a.seek)||void 0===r||r.call(a,"100%"))):null===(i=n.current)||void 0===i||null===(s=i.stop)||void 0===s||s.call(i)}),[o]);const d=(0,s.useBlockProps)();return(0,i.createElement)(i.Fragment,null,(!(0,K.isEmpty)(t.file)&&r||!r)&&(0,i.createElement)(Jl,{isEditing:r,setEditing:c}),!((0,K.isEmpty)(t.file)||r)&&(0,i.createElement)(Kl,{attributes:t,setAttributes:l,playerRef:n}),(0,i.createElement)("div",d,((0,K.isEmpty)(t.file)||r)&&(0,i.createElement)(Yl,{value:t.file,onChange:e=>{if(""===e||null===e)return;const t=(0,K.pick)(e,["id","url"]);(0,K.isEmpty)(t)&&(t.url=e),l({file:{...t}}),c(!1)},attributes:t}),!((0,K.isEmpty)(t.file)||r)&&(0,i.createElement)(Ql,{attributes:t,isSelected:o,playerRef:n})))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,...t.file.url.endsWith(".lottie")?{"data-src":t.file?t.file.url:""}:{src:t.file?t.file.url:""},width:t.width});let o=(0,i.createElement)("lottie-player");return t.file.url.endsWith(".lottie")&&(o=(0,i.createElement)("dotlottie-player")),o=(0,i.cloneElement)(o,{trigger:t.trigger,background:t.backgroundColor||t.backgroundGradient,...t.ariaLabel&&{"aria-label":t.ariaLabel},...l}),"scroll"===t.trigger?o:(0,i.cloneElement)(o,{autoplay:!0,loop:!0,count:t.direction?-1*t.count:t.count,speed:t.speed,direction:t.direction?-1:1,trigger:t.trigger,"data-loop":t.loop,mode:"normal",..."hover"===t.trigger&&{hover:"hover"}})},example:{viewportWidth:1200,attributes:{id:"wp-block-themeisle-blocks-lottie-2",file:{url:"https://assets8.lottiefiles.com/packages/lf20_kd5rzej5.json"}}}});var to=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/plugin-cards","title":"Plugin Card","category":"themeisle-blocks","description":"Plugin Card block lets you display plugins data in your blog posts. Powered by Otter.","keywords":["plugin","card","orbitfox"],"textdomain":"otter-blocks","attributes":{"slug":{"type":"string"}},"supports":{"html":false},"editorStyle":"otter-plugin-card-editor","style":"otter-plugin-card-style"}'),lo=l(9630),oo=e=>{let{setAttributes:t,hasError:l,setError:a,className:n}=e;const[r,s]=(0,i.useState)(!1),[d,u]=(0,i.useState)(""),[b,m]=(0,i.useState)({}),[p,g]=(0,i.useState)(null),h=e=>{if(Object.keys(b).length){e.stopPropagation(),e.preventDefault();const t=p?p-1:Object.keys(b).length-1;g(t)}},v=e=>{if(Object.keys(b).length){e.stopPropagation(),e.preventDefault();const t=null===p||p===Object.keys(b).length-1?0:p+1;g(t)}},y=e=>{t({slug:e.slug}),m({})};return(0,i.createElement)(c.Placeholder,{icon:"admin-plugins",label:(0,o.__)("Plugin Card","otter-blocks"),instructions:(0,o.__)("Search for the plugin you want to display.","otter-blocks"),className:n},(0,i.createElement)("div",{className:"o-plugin-cards-search-field"},(0,i.createElement)(c.Dashicon,{icon:"search"}),r&&(0,i.createElement)(c.Spinner,null),(0,i.createElement)(c.TextControl,{type:"text",placeholder:(0,o.__)("Search for plugin…","otter-blocks"),value:d,onChange:u,onKeyDown:e=>{switch(e.keyCode){case lo.UP:h(e);break;case lo.DOWN:v(e);break;case lo.TAB:Object.keys(b).length&&!e.shiftKey&&g(0);break;case lo.ENTER:(async e=>{t({slug:""}),s(!0),a(!1);const l=await Dt()({path:`otter/v1/plugins?search=${encodeURIComponent(e)}`});if(l.data.errors)return a(!0),s(!1),g(null),void m({});s(!1),g(null),m(l.data.plugins)})(e.target.value)}},onFocus:()=>g(null)}),b&&(0,i.createElement)("div",{tabIndex:"-1",className:"o-plugin-cards-search-results"},Object.keys(b).map((e=>{const t=b[e];let l;return t.icons.svg&&(l=t.icons.svg),t.icons["2x"]&&(l=t.icons["2x"]),t.icons["1x"]&&(l=t.icons["1x"]),t.icons.default&&(l=t.icons.default),(0,i.createElement)("button",{className:"o-plugin-cards-list-item",key:e,onClick:e=>{e.preventDefault(),y(t)},onKeyDown:e=>((e,t)=>{switch(e.keyCode){case lo.UP:h(e);break;case lo.DOWN:v(e);break;case lo.TAB:if(e.shiftKey){0!==p&&h(e);break}if(p===Object.keys(b).length-1)break;v(e);break;case lo.ENTER:y(t)}})(e,t)},(0,i.createElement)("img",{src:l}),(0,i.createElement)("span",{dangerouslySetInnerHTML:{__html:(0,K.unescape)(t.name)}}))})))),l&&(0,i.createElement)("div",{className:"o-plugin-cards-error"},(0,i.createElement)("span",null,(0,o.__)("There seems to be an error. Make sure your internet is working properly.","otter-blocks"))))},ao=e=>{let{setAttributes:t}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.ToolbarGroup,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Edit","otter-blocks")},(0,i.createElement)(c.Button,{className:"components-icon-button components-toolbar__control o-plugin-cards-edit-plugin-card",onClick:()=>t({slug:void 0})},(0,i.createElement)(c.Dashicon,{icon:"edit"})))))};const{name:no}=to;(0,a.registerBlockType)(no,{...to,title:(0,o.__)("Plugin Card","otter-blocks"),description:(0,o.__)("Plugin Card block lets you display plugins data in your blog posts. Powered by Otter.","otter-blocks"),icon:r.pluginsIcon,keywords:["plugin","card","orbitfox"],edit:e=>{let{attributes:t,setAttributes:l}=e;const[o,a]=(0,i.useState)(!1),n=(0,s.useBlockProps)();return t.slug?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ao,{setAttributes:l}),(0,i.createElement)("div",n,(0,i.createElement)(c.Disabled,null,(0,i.createElement)(u(),{block:"themeisle-blocks/plugin-cards",attributes:{...t}})))):(0,i.createElement)("div",n,(0,i.createElement)(oo,{attributes:t,setAttributes:l,hasError:o,setError:a}))},save:()=>null,example:{attributes:{slug:"otter-blocks"}}});var ro=l(7682),io=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/popup","title":"Popup","category":"themeisle-blocks","description":"Display your content in beautiful popup with many customization options. Powered by Otter.","keywords":["popup","modal","lightbox"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"minWidth":{"type":["number","string"]},"maxWidth":{"type":["number","string"]},"trigger":{"type":"string"},"wait":{"type":"number"},"anchor":{"type":"string"},"scroll":{"type":"number"},"showClose":{"type":"boolean","default":true},"outsideClose":{"type":"boolean","default":true},"anchorClose":{"type":"boolean","default":false},"closeAnchor":{"type":"string"},"recurringClose":{"type":"boolean","default":false},"recurringTime":{"type":"number"},"backgroundColor":{"type":"string"},"closeColor":{"type":"string"},"overlayColor":{"type":"string"},"overlayOpacity":{"type":"number"},"lockScrolling":{"type":"boolean"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"borderWidth":{"type":"object"},"borderRadius":{"type":"object"},"borderColor":{"type":"string"},"borderStyle":{"type":"string"},"width":{"type":"string"},"widthTablet":{"type":"string"},"widthMobile":{"type":"string"},"heightMode":{"type":"string"},"height":{"type":"string"},"heightTablet":{"type":"string"},"heightMobile":{"type":"string"},"verticalPosition":{"type":"string"},"horizontalPosition":{"type":"string"},"verticalPositionTablet":{"type":"string"},"horizontalPositionTablet":{"type":"string"},"verticalPositionMobile":{"type":"string"},"horizontalPositionMobile":{"type":"string"},"closeButtonType":{"type":"string"},"boxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"disableOn":{"type":"string"}},"editorStyle":"otter-popup-editor","style":"otter-popup-style","script":"otter-popup"}'),so=l(6755),co=l(7231);const uo=()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Disabled,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Close On Anchor Click","otter-blocks"),checked:!1,onChange:()=>{},className:"o-disabled"}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Dismiss for Recurring Visitors","otter-blocks"),checked:!1,onChange:()=>{},className:"o-disabled"})),(0,i.createElement)(Ze.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"popupblock")},(0,o.__)("Get more options with Otter Pro. ","otter-blocks")),variant:"upsell"}));var bo=e=>{var t,l,a,n,r,d,u,b,m,p,g,h;let{attributes:v,setAttributes:y}=e;const[k,_]=(0,i.useState)("settings"),{responsiveSetAttributes:C,responsiveGetAttributes:E}=S(y);let T=[{label:(0,o.__)("On Load","otter-blocks"),value:"onLoad"},{label:(0,o.__)("On Anchor Click (Pro)","otter-blocks"),value:"onClick",disabled:!0},{label:(0,o.__)("On Scroll (Pro)","otter-blocks"),value:"onScroll",disabled:!0},{label:(0,o.__)("On Exit (Pro)","otter-blocks"),value:"onExit",disabled:!0}];return T=(0,We.applyFilters)("otter.popupBlock.triggers",T),(0,i.createElement)(s.InspectorControls,null,(0,We.applyFilters)("otter.feedback","","popup-block",(0,o.__)("Help us improve this block","otter-blocks")),(0,i.createElement)(w.Z,{value:k,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:_}),(0,i.createElement)("div",null,"settings"===k&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Popup settings","otter-blocks")},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Open Trigger","otter-blocks"),help:!Boolean(window.themeisleGutenberg.hasPro)&&(0,o.__)("You need to have Otter Pro to activate Pro features.","otter-blocks"),options:T,value:v.trigger,onChange:e=>y({trigger:e})}),(void 0===v.trigger||"onLoad"===v.trigger)&&(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Trigger Delay","otter-blocks"),help:(0,o.__)("How much time in seconds to wait before showing the popup.","otter-blocks"),min:0,max:100,value:null!==(t=v.wait)&&void 0!==t?t:0,onChange:e=>y({wait:Number(e)}),allowReset:!0}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Disable Page Scrolling","otter-blocks"),checked:v.lockScrolling,onChange:()=>y({lockScrolling:!v.lockScrolling})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Show on mobile","otter-blocks"),checked:!Boolean(v.disableOn),onChange:e=>y({disableOn:e?void 0:"mobile"})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Popup Position","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)("div",{className:"o-position-picker"},(0,i.createElement)(c.__experimentalAlignmentMatrixControl,{value:E([`${null!==(l=v.verticalPosition)&&void 0!==l?l:"center"} ${null!==(a=v.horizontalPosition)&&void 0!==a?a:"center"}`,`${null!==(n=v.verticalPositionTablet)&&void 0!==n?n:"center"} ${null!==(r=v.horizontalPositionTablet)&&void 0!==r?r:"center"}`,`${null!==(d=v.verticalPositionMobile)&&void 0!==d?d:"center"} ${null!==(u=v.horizontalPositionMobile)&&void 0!==u?u:"center"}`]),onChange:e=>{const[t,l]=e.split(" ");switch(view){case"Desktop":y({verticalPosition:Boolean(t)&&"center"!==t?t:void 0,horizontalPosition:Boolean(l)&&"center"!==l?l:void 0});break;case"Tablet":y({verticalPositionTabelt:Boolean(t)&&"center"!==t?t:void 0,horizontalPositionTablet:Boolean(l)&&"center"!==l?l:void 0});break;case"Mobile":y({verticalPositionMobile:Boolean(t)&&"center"!==t?t:void 0,horizontalPositionMobile:Boolean(l)&&"center"!==l?l:void 0})}}})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Frequency & Close Settings","otter-blocks"),initialOpen:!1},(0,We.applyFilters)("otter.popupBlock.controls",(0,i.createElement)((()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Show Close Button","otter-blocks"),checked:v.showClose,onChange:()=>y({showClose:!v.showClose})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Close on Click Outside","otter-blocks"),checked:v.outsideClose,onChange:()=>y({outsideClose:!v.outsideClose})}),!Boolean(window.themeisleGutenberg.hasPro)&&(0,i.createElement)(uo,null))),null),v,y))),"style"===k&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(M.Z,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:null!==(b=E([v.width,v.widthTablet,v.widthMobile]))&&void 0!==b?b:"500px",onChange:e=>{C(e,["width","widthTablet","widthMobile"])}})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Height","otter-blocks"),options:[{label:(0,o.__)("Fit Content","otter-blocks"),value:"none"},{label:(0,o.__)("Custom","otter-blocks"),value:"custom"}],value:v.heightMode,onChange:e=>y({heightMode:"none"!==e?e:void 0})}),"custom"===v.heightMode&&(0,i.createElement)(M.Z,{label:(0,o.__)("Custom Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:null!==(m=E([v.height,v.heightTablet,v.heightMobile]))&&void 0!==m?m:"400px",onChange:e=>{C(e,["height","heightTablet","heightMobile"])}})),(0,i.createElement)(M.Z,null,(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:null!==(p=E([v.padding,v.paddingTablet,v.paddingMobile]))&&void 0!==p?p:{top:"20px",bottom:"20px",left:"20px",right:"20px"},onChange:e=>{C((0,x.cg)(e,{top:"20px",bottom:"20px",left:"20px",right:"20px"}),["padding","paddingTablet","paddingMobile"])}}))),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:v.backgroundColor,onChange:e=>y({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:v.closeColor,onChange:e=>y({closeColor:e}),label:(0,o.__)("Close Button","otter-blocks")},{value:v.overlayColor,onChange:e=>y({overlayColor:e}),label:(0,o.__)("Overlay","otter-blocks")},{value:v.borderColor,onChange:e=>y({borderColor:e}),label:(0,o.__)("Border","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Overlay","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Overlay Opacity","otter-blocks"),value:v.overlayOpacity,initialPosition:100,onChange:e=>y({overlayOpacity:void 0!==e?Number(e):void 0}),allowReset:!0})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Close Button","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Show Close Button","otter-blocks"),checked:v.showClose,onChange:()=>y({showClose:!v.showClose})}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Position","otter-blocks"),options:[{label:(0,o.__)("Inside","otter-blocks"),value:"none"},{label:(0,o.__)("Outside","otter-blocks"),value:"outside"}],value:v.closeButtonType,onChange:e=>y({closeButtonType:"none"!==e?e:void 0})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Width","otter-blocks"),values:null!==(g=v.borderWidth)&&void 0!==g?g:{top:"0px",bottom:"0px",left:"0px",right:"0px"},onChange:e=>{y({borderWidth:(0,x.cg)(e,{top:"0px",bottom:"0px",left:"0px",right:"0px"})})}}),(0,i.createElement)(c.__experimentalBoxControl,{id:"o-border-raduis-box",label:(0,o.__)("Border Radius","otter-blocks"),values:null!==(h=v.borderRadius)&&void 0!==h?h:{top:"0px",bottom:"0px",left:"0px",right:"0px"},onChange:e=>{y({borderRadius:(0,x.cg)(e,{top:"0px",bottom:"0px",left:"0px",right:"0px"})})}}),(0,i.createElement)(f.Z,{boxShadow:v.boxShadow,onChange:e=>{const t={...v.boxShadow};Object.entries(e).map((function(){let[l,o]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;t[l]=o})),y({boxShadow:t})}})))))};const{attributes:mo}=io,po=e=>({top:e,bottom:e,left:e,right:e});const{name:go}=io;(0,a.registerBlockType)(go,{...io,title:(0,o.__)("Popup","otter-blocks"),description:(0,o.__)("Display your content in beautiful popup with many customization options. Powered by Otter.","otter-blocks"),icon:ro.Z,keywords:["popup","modal","lightbox"],edit:e=>{var t,l,a;let{attributes:n,setAttributes:r,clientId:d,className:u}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(d,mo);return()=>e(n.id)}),[]);const[b,m]=(0,i.useState)(!1),p="custom"===n.heightMode?{"--height":n.height,"--height-tablet":n.heightMobile,"--height-mobile":n.heightMobile}:{"--height":"fit-content"},h={"--min-width":n.minWidth?n.minWidth+"px":"400px","--max-width":n.maxWidth?n.maxWidth+"px":void 0,"--background-color":n.backgroundColor,"--close-color":n.closeColor,"--overlay-color":n.overlayColor,"--overlay-opacity":void 0!==n.overlayOpacity?n.overlayOpacity/100:1,"--brd-width":(0,x.bv)(n.borderWidth),"--brd-radius":(0,x.bv)(n.borderRadius),"--brd-color":n.borderColor,"--brd-style":n.borderStyle,"--width":!Boolean(n.width)&&n.maxWidth?n.maxWidth+"px":n.width,"--width-tablet":n.widthTablet,"--width-mobile":n.widthMobile,"--padding":n.padding?(0,x.bv)((0,K.merge)(po("20px"),n.padding)):void 0,"--padding-tablet":n.paddingTablet?(0,x.bv)((0,K.merge)(po("20px"),null!==(t=n.padding)&&void 0!==t?t:{},n.paddingTablet)):void 0,"--padding-mobile":n.paddingMobile?(0,x.bv)((0,K.merge)(po("20px"),null!==(l=n.padding)&&void 0!==l?l:{},null!==(a=n.paddingTablet)&&void 0!==a?a:{},n.paddingMobile)):void 0,"--box-shadow":n.boxShadow.active&&`${n.boxShadow.horizontal}px ${n.boxShadow.vertical}px ${n.boxShadow.blur}px ${n.boxShadow.spread}px ${hexToRgba(n.boxShadow.color||"#FFFFFF",n.boxShadow.colorOpacity)}`,...p},[v,y]=(0,L.useCSSNode)();(0,i.useEffect)((()=>{y([" .otter-popup__modal_content "+(0,x.iC)([["top","30px","top"===n.verticalPosition],["bottom","30px","bottom"===n.verticalPosition],["left","30px","left"===n.horizontalPosition],["right","30px","right"===n.horizontalPosition]])," .otter-popup__modal_content "+(0,x.iC)([["top","15px","top"===n.verticalPositionTablet],["bottom","15px","bottom"===n.verticalPositionTablet],["left","15px","left"===n.horizontalPositionTablet],["right","15px","right"===n.horizontalPositionTablet]])," .otter-popup__modal_content "+(0,x.iC)([["top","10px","top"===n.verticalPositionMobile],["bottom","10px","bottom"===n.verticalPositionMobile],["left","10px","left"===n.horizontalPositionMobile],["right","10px","right"===n.horizontalPositionMobile]])],["@media ( min-width: 960px )","@media ( min-width: 600px ) and ( max-width: 960px )","@media ( max-width: 600px )"])}),[n.horizontalPosition,n.verticalPosition,n.horizontalPositionTablet,n.verticalPositionTablet,n.horizontalPositionMobile,n.verticalPositionMobile]);const k=(0,s.useBlockProps)({id:n.id,style:h,className:g()(u,v,{"with-outside-button":"outside"===n.closeButtonType})});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(bo,{attributes:n,setAttributes:r}),(0,i.createElement)("div",k,(0,i.createElement)(c.Button,{variant:"primary",isPrimary:!0,icon:so.Z,onClick:()=>m(!0)},(0,o.__)("Edit Popup","otter-blocks")),b&&(0,i.createElement)("div",{className:"otter-popup__modal_wrap"},(0,i.createElement)("div",{role:"presentation",className:"otter-popup__modal_wrap_overlay",onClick:()=>m(!1)}),(0,i.createElement)("div",{className:"otter-popup__modal_content"},n.showClose&&(0,i.createElement)("div",{className:"otter-popup__modal_header"},(0,i.createElement)(c.Button,{icon:co.Z,onClick:()=>m(!1)})),(0,i.createElement)("div",{className:"otter-popup__modal_body"},(0,i.createElement)(s.InnerBlocks,null))))))},save:e=>{let{attributes:t,className:l}=e;const o=s.useBlockProps.save({id:t.id,className:g()(l,"is-front",{"with-outside-button":"outside"===t.closeButtonType}),"data-open":t.trigger,"data-dismiss":t.recurringClose?t.recurringTime:"","data-time":void 0===t.trigger||"onLoad"===t.trigger?t.wait||0:"","data-anchor":"onClick"===t.trigger?t.anchor:"","data-offset":"onScroll"===t.trigger?t.scroll:"","data-outside":t.outsideClose?t.outsideClose:"","data-anchorclose":t.anchorClose?t.closeAnchor:"","data-lock-scrolling":t.lockScrolling?"1":void 0,"data-disable-on":t.disableOn?t.disableOn:void 0});return(0,i.createElement)("div",o,(0,i.createElement)("div",{className:"otter-popup__modal_wrap"},(0,i.createElement)("div",{role:"presentation",className:"otter-popup__modal_wrap_overlay"}),(0,i.createElement)("div",{className:"otter-popup__modal_content"},t.showClose&&(0,i.createElement)("div",{className:"otter-popup__modal_header"},(0,i.createElement)("button",{type:"button",class:"components-button has-icon"},(0,i.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},(0,i.createElement)("path",{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})))),(0,i.createElement)("div",{className:"otter-popup__modal_body"},(0,i.createElement)(s.InnerBlocks.Content,null)))))},example:{attributes:{}}});var ho=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/posts-grid","title":"Posts","category":"themeisle-blocks","description":"Display a list of your most recent posts in a beautiful layout. Powered by Otter.","keywords":["posts","grid","news"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"style":{"type":"string","default":"grid"},"postTypes":{"type":"array","default":[]},"columns":{"type":"number","default":3},"template":{"type":"array","default":["category","title","meta","description"]},"categories":{"type":"array","items":{"type":"object"}},"postsToShow":{"type":"number","default":5},"order":{"type":"string","default":"desc"},"orderBy":{"type":"string","default":"date"},"offset":{"type":"number","default":0},"imageSize":{"type":"string","default":"full"},"displayFeaturedImage":{"type":"boolean","default":true},"displayCategory":{"type":"boolean","default":true},"displayTitle":{"type":"boolean","default":true},"titleTag":{"type":"string","default":"h5"},"displayMeta":{"type":"boolean","default":true},"displayDescription":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":100},"displayDate":{"type":"boolean","default":true},"displayAuthor":{"type":"boolean","default":true},"displayComments":{"type":"boolean","default":true},"displayPostCategory":{"type":"boolean","default":false},"displayReadMoreLink":{"type":"boolean","default":false},"cropImage":{"type":"boolean","default":false},"customTitleFontSize":{"type":["string","number"]},"customTitleFontSizeTablet":{"type":["string","number"]},"customTitleFontSizeMobile":{"type":["string","number"]},"customDescriptionFontSize":{"type":["string","number"]},"customDescriptionFontSizeTablet":{"type":["string","number"]},"customDescriptionFontSizeMobile":{"type":["string","number"]},"customMetaFontSize":{"type":"string"},"customMetaFontSizeTablet":{"type":"string"},"customMetaFontSizeMobile":{"type":"string"},"textColor":{"type":"string"},"backgroundColor":{"type":"string"},"borderColor":{"type":"string"},"borderRadius":{"type":["number","object"]},"borderWidth":{"type":"string"},"cardBorderRadius":{"type":"object"},"boxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"imageBoxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"textAlign":{"type":"string"},"verticalAlign":{"type":"string"},"enableFeaturedPost":{"type":"boolean"},"imageWidth":{"type":["string","number"]},"imageWidthTablet":{"type":"string"},"imageWidthMobile":{"type":"string"},"columnGap":{"type":"string"},"columnGapTablet":{"type":"string"},"columnGapMobile":{"type":"string"},"rowGap":{"type":"string"},"rowGapTablet":{"type":"string"},"rowGapMobile":{"type":"string"},"padding":{"type":"string"},"paddingTablet":{"type":"string"},"paddingMobile":{"type":"string"},"contentGap":{"type":"string"}},"supports":{"align":["wide","full"],"html":false},"editorStyle":"otter-posts-grid-editor","style":"otter-posts-grid-style"}');const{attributes:vo}=ho;var yo=[{attributes:{...vo,categories:{type:"string"}},supports:{align:["wide","full"],html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:e=>{let{categories:t}=e;return t&&"string"==typeof t},save:()=>null}],ko=e=>{let{attributes:t,setAttributes:l}=e;const a=s.BlockVerticalAlignmentToolbar;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(a,{label:(0,o.__)("Change Vertical Alignment","otter-blocks"),value:t.verticalAlign,onChange:e=>l({verticalAlign:e})}))},fo=l(454),_o=l.n(fo),wo=l(1286);const Co=(0,wo.W6)((()=>(0,i.createElement)("div",{className:"o-sortable-handle",tabIndex:"0"},(0,i.createElement)("span",null)))),Eo={image:"displayFeaturedImage",category:"displayCategory",title:"displayTitle",meta:"displayMeta",description:"displayDescription"},xo=e=>{var t,l;let{attributes:a,setAttributes:n,template:r,disabled:s}=e;const[d,u]=(0,i.useState)(!1),b=null==r?void 0:r.startsWith("custom_"),m=null==a||null===(t=a.customMetas)||void 0===t||null===(l=t.filter((e=>{let{id:t}=e;return t===r})))||void 0===l?void 0:l.pop(),p={image:a.displayFeaturedImage,category:a.displayCategory,title:a.displayTitle,meta:a.displayMeta,description:a.displayDescription},h=e=>{const t={...m,...e};n({customMetas:a.customMetas.map((e=>e.id===m.id?t:e))})},v=b?(0,We.applyFilters)("otter.postsBlock.panelLabel","",m):(0,K.startCase)((0,K.toLower)(r)),y=p[r]||(null==m?void 0:m.display),k=y?"visibility":"hidden";
|
2 |
/* translators: %s Label */
|
3 |
let f=(0,o.sprintf)((0,o.__)("Display %s","otter-blocks"),v);return y&&(
|
4 |
/* translators: %s Label */
|
5 |
+
f=(0,o.sprintf)((0,o.__)("Hide %s","otter-blocks"),v)),(0,i.createElement)("div",{className:g()("o-sortable-item-area",`o-sortable-item-area-${r}`)},(0,i.createElement)("div",{className:g()("o-sortable-item",{disabled:s,hidden:!y,editable:y})},!s&&(0,i.createElement)(Co,null),(0,i.createElement)("div",{className:"o-sortable-label"},v),y&&!["category","title"].includes(r)&&(0,i.createElement)(c.Button,{icon:d?"arrow-up-alt2":"arrow-down-alt2",label:d?(0,o.__)("Close Settings","otter-blocks"):(0,o.__)("Open Settings","otter-blocks"),showTooltip:!0,className:"o-sortable-button",onClick:()=>u(!d)}),(0,i.createElement)(c.Button,{icon:k,label:f,showTooltip:!0,className:"o-sortable-button",onClick:()=>{b?h({display:!m.display}):(e=>{const t=Eo[e]||e;n({[t]:!a[t]})})(r),u(!1)}})),y&&!["category","title"].includes(r)&&(0,i.createElement)("div",{className:g()("o-sortable-control-area",{opened:d&&y})},"image"===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Image Size","otter-blocks"),value:a.imageSize,options:window.themeisleGutenberg.imageSizes.map((e=>({label:(0,K.startCase)((0,K.toLower)(e)),value:e}))),onChange:e=>n({imageSize:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Crop Image to Fit","otter-blocks"),checked:a.cropImage,onChange:e=>n({cropImage:e})})),"meta"===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Post Date","otter-blocks"),checked:a.displayDate,onChange:e=>n({displayDate:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Author","otter-blocks"),checked:a.displayAuthor,onChange:e=>n({displayAuthor:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Comments","otter-blocks"),checked:a.displayComments,onChange:e=>n({displayComments:e})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Category","otter-blocks"),checked:a.displayPostCategory,onChange:e=>n({displayPostCategory:e})})),"description"===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.TextControl,{label:(0,o.__)("Excerpt Limit","otter-blocks"),type:"number",value:a.excerptLength,onChange:e=>n({excerptLength:Number(e)})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Display Read More Link","otter-blocks"),checked:a.displayReadMoreLink,onChange:e=>n({displayReadMoreLink:e})})),(0,We.applyFilters)("otter.postsBlock.controls","",a,n,b,m,h)))},So=(0,wo.W8)((e=>{let{attributes:t,setAttributes:l,template:o,disabled:a}=e;return(0,i.createElement)(xo,{attributes:t,setAttributes:l,template:o,disabled:a})})),To=(0,wo.JN)((e=>{var t;let{attributes:l,setAttributes:o}=e;return(0,i.createElement)("div",null,null==l||null===(t=l.template)||void 0===t?void 0:t.filter((e=>{var t,l;return!(null!=e&&e.startsWith("custom_")&&(void 0===(null===(t=window)||void 0===t?void 0:t.acf)||null===(l=window.themeisleGutenberg)||void 0===l||!l.hasPro))})).map(((e,t)=>(0,i.createElement)(So,{key:`item-${e}`,index:t,attributes:l,setAttributes:o,template:e}))))})),Mo=()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,(0,o.__)("Add custom fields for the posts, using the ACF plugin & Otter Pro.","otter-blocks")),(0,i.createElement)(c.Button,{variant:"secondary",isSecondary:!0,className:"o-conditions__add",disabled:!0,onClick:()=>{}},(0,o.__)("Add Custom Field","otter-blocks")),(0,i.createElement)("br",null),(0,i.createElement)(Ze.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"customfield")},(0,o.__)("Get more options with Otter Pro. ","otter-blocks")),variant:"upsell"}));var Bo=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:g()("o-sortable",t.style)},(0,i.createElement)(xo,{attributes:t,setAttributes:l,template:"image",disabled:!0}),(0,i.createElement)(To,{attributes:t,setAttributes:l,onSortEnd:e=>{let{oldIndex:o,newIndex:a}=e;const n=_o()(t.template,o,a);l({template:n})},useDragHandle:!0,axis:"y",lockAxis:"y"}),(0,We.applyFilters)("otter.postsBlock.sortableContainer",(0,i.createElement)(Mo,null),t,l)))};const zo=[{label:(0,o.__)("Default","otter-blocks"),value:"default",isDefault:!0},{label:(0,o.__)("Boxed","otter-blocks"),value:"boxed"}],Po=[{name:(0,o.__)("XS","otter-blocks"),size:"14px",slug:"xs"},{name:(0,o.__)("Small","otter-blocks"),size:"16px",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"18px",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"24px",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"28px",slug:"xl"}],Lo=e=>e?`${e}px`:e;var Ro=e=>{let{attributes:t,setAttributes:l,categoriesList:a}=e;const[n,r]=(0,i.useState)("settings"),{slugs:d}=(0,v.useSelect)((e=>({slugs:e("otter-store").getPostsSlugs()})),[t.postTypes]),{responsiveSetAttributes:u,responsiveGetAttributes:b}=S(l),m=a.reduce(((e,t)=>({...e,[t.name]:t})),{}),p=t.categories?t.categories.map((e=>{const t=a.find((t=>t.id===Number(e.id)));return{id:e.id,name:(null==t?void 0:t.name)||(null==t?void 0:t.slug)||""}})):[],g="object"==typeof t.categories?1<=t.categories.length?t.categories[0].id:void 0:t.categories,h=(e,o)=>{const a={...t[e]};Object.entries(o).map((function(){let[e,t]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;a[e]=t})),l({[e]:a})};return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:n,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:r}),"settings"===n&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Layout","otter-blocks")},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Post Type","otter-blocks"),help:(0,o.__)('WordPress contains different types of content and they are divided into collections called "Post types". By default there are a few different ones such as blog posts and pages, but plugins could add more.',"otter-blocks"),value:t.postTypes[0]||null,onChange:e=>e&&l({postTypes:[e]}),options:d.map((e=>({label:(0,x.__)(e),value:e})))}),(0,i.createElement)(E.Z,{label:(0,o.__)("Layout","otter-blocks"),options:[{label:(0,o.__)("Grid","otter-blocks"),value:"grid"},{label:(0,o.__)("List","otter-blocks"),value:"list"}],value:t.style,onChange:e=>l({style:e})}),"grid"===t.style&&(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Columns","otter-blocks"),value:t.columns,onChange:e=>{l({columns:e})},min:1,max:5}),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Content Alignment","otter-blocks")},(0,i.createElement)(oe.Z,{value:t.textAlign,options:[{icon:"editor-alignleft",label:(0,o.__)("Left","otter-blocks"),value:"left"},{icon:"editor-aligncenter",label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:"editor-alignright",label:(0,o.__)("Right","otter-blocks"),value:"right"}],onChange:e=>l({textAlign:e}),hasIcon:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.QueryControls,{order:t.order,orderBy:t.orderBy,onOrderChange:e=>l({order:e}),onOrderByChange:e=>l({orderBy:e}),numberOfItems:t.postsToShow,onNumberOfItemsChange:e=>l({postsToShow:e}),categorySuggestions:m,selectedCategoryId:g,selectedCategories:p,onCategoryChange:e=>{let t;"object"==typeof e?0<e.length&&(t=e.map((e=>{if("object"==typeof e)return e;const t=a.find((t=>t.name===e));return t?{id:t.id,name:e}:void 0})).filter((e=>void 0!==e))):""!==e&&(t=[{id:e,name:a.find((t=>t.id===Number(e))).name}]),l({categories:t})}}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Offset","otter-blocks"),help:(0,o.__)("Number of post to displace or pass over.","otter-blocks"),type:"number",value:t.offset,min:0,onChange:e=>l({offset:Number(e)})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Enable Featured Post","otter-blocks"),checked:t.enableFeaturedPost,onChange:e=>l({enableFeaturedPost:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Elements","otter-blocks"),initialOpen:!1},(0,i.createElement)(Bo,{attributes:t,setAttributes:l}))),"style"===n&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks")},(0,i.createElement)(E.Z,{options:zo,value:(0,x.tB)(zo,null==t?void 0:t.className),onChange:e=>{const o=(0,x.L4)(null==t?void 0:t.className,zo,e);l({className:o})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Title Tag","otter-blocks"),value:t.titleTag||"h5",options:[{label:(0,o.__)("H1","otter-blocks"),value:"h1"},{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"}],onChange:e=>l({titleTag:e})}),(0,i.createElement)(M.Z,{label:(0,o.__)("Title Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:Po,withReset:!0,value:b([t.customTitleFontSize,t.customTitleFontSizeTablet,t.customTitleFontSizeMobile]),onChange:e=>u(e,["customTitleFontSize","customTitleFontSizeTablet","customTitleFontSizeMobile"])})),(0,i.createElement)(M.Z,{label:(0,o.__)("Description Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:Po,withReset:!0,value:b([t.customDescriptionFontSize,t.customDescriptionFontSizeTablet,t.customDescriptionFontSizeMobile]),onChange:e=>u(e,["customDescriptionFontSize","customDescriptionFontSizeTablet","customDescriptionFontSizeMobile"])})),(0,i.createElement)(M.Z,{label:(0,o.__)("Meta Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:Po,withReset:!0,value:b([t.customMetaFontSize,t.customMetaFontSizeTablet,t.customMetaFontSizeMobile]),onChange:e=>u(e,["customMetaFontSize","customMetaFontSizeTablet","customMetaFontSizeMobile"])}))),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:t.textColor,onChange:e=>l({textColor:e}),label:(0,o.__)("Text","otter-blocks")},{value:t.backgroundColor,onChange:e=>l({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:t.borderColor,onChange:e=>l({borderColor:e}),label:(0,o.__)("Border","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Image","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Radius","otter-blocks"),values:(y=t.borderRadius,(0,K.isNumber)(y)?{top:Lo(y),right:Lo(y),bottom:Lo(y),left:Lo(y)}:y),onChange:e=>l({borderRadius:e}),id:"o-border-raduis-box"}),"list"===t.style&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(M.Z,{label:(0,o.__)("Image Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:b([t.imageWidth,t.imageWidthTablet,t.imageWidthMobile]),onChange:e=>u(e,["imageWidth","imageWidthTablet","imageWidthMobile"])}),(0,i.createElement)(k.Z,{values:["imageWidth","imageWidthTablet","imageWidthMobile"],setAttributes:l}))),(0,i.createElement)(f.Z,{boxShadow:t.imageBoxShadow,onChange:e=>h("imageBoxShadow",e)})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Spacing","otter-blocks"),initialOpen:!1},"list"!==t.style&&(0,i.createElement)(M.Z,{label:(0,o.__)("Column Gap","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:b([t.columnGap,t.columnGapTablet,t.columnGapMobile]),onChange:e=>u(e,["columnGap","columnGapTablet","columnGapMobile"])}),(0,i.createElement)(k.Z,{values:["columnGap","columnGapTablet","columnGapMobile"],setAttributes:l})),(0,i.createElement)(M.Z,{label:(0,o.__)("Row Gap","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:b([t.rowGap,t.rowGapTablet,t.rowGapMobile]),onChange:e=>u(e,["rowGap","rowGapTablet","rowGapMobile"])}),(0,i.createElement)(k.Z,{values:["rowGap","rowGapTablet","rowGapMobile"],setAttributes:l})),(0,i.createElement)(M.Z,{label:(0,o.__)("Content Padding","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:b([t.padding,t.paddingTablet,t.paddingMobile]),onChange:e=>u(e,["padding","paddingTablet","paddingMobile"])}),(0,i.createElement)(k.Z,{values:["padding","paddingTablet","paddingMobile"],setAttributes:l})),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Space Between","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:Po,withReset:!0,value:t.contentGap,onChange:e=>l({contentGap:e})}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.__experimentalUnitControl,{label:(0,o.__)("Width","otter-blocks"),value:t.borderWidth,onChange:e=>l({borderWidth:e})}),(0,i.createElement)(k.Z,{values:["borderWidth"],setAttributes:l}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Radius","otter-blocks"),value:t.cardBorderRadius,onChange:e=>l({cardBorderRadius:e}),id:"o-border-raduis-box"}),(0,i.createElement)(f.Z,{boxShadow:t.boxShadow,onChange:e=>h("boxShadow",e)}))),(0,i.createElement)(C.p,null));var y},Fo=e=>{let{id:t,link:l,alt:o,size:a,imgStyle:n}=e;const{featuredImage:r,altText:s}=(0,v.useSelect)((e=>{const l=e("core").getMedia(t,{context:"view"});return{featuredImage:l?0<Object.keys(l.media_details.sizes).length&&l.media_details.sizes[a]?l.media_details.sizes[a].source_url:l.source_url:null,altText:l&&l.alt_text?l.alt_text:o}}),[a,t]);return null===r?(0,i.createElement)(i.Fragment,null):(0,i.createElement)("div",{className:"o-posts-grid-post-image"},(0,i.createElement)("a",{href:l},r?(0,i.createElement)("img",{src:r,size:a,alt:s,"data-id":t,style:n}):(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null))))};const Oo=e=>{let{attributes:t,element:l,category:o,categoriesList:a}=e;return void 0!==o&&t.displayCategory&&a?(0,i.createElement)("span",{key:l,className:"o-posts-grid-post-category"},o.name):""},No=e=>{let{attributes:t,element:l,post:o}=e;const a=t.titleTag||"h5";var n;return t.displayTitle?(0,i.createElement)(a,{key:l,className:"o-posts-grid-post-title"},(0,i.createElement)("a",{href:o.link},(0,x.Uo)(null===(n=o.title)||void 0===n?void 0:n.rendered))):""},Ao=e=>{let{attributes:t,element:l,post:a,author:n,categories:r}=e;if(t.displayMeta&&(t.displayDate||t.displayAuthor||t.displayComments||t.displayPostCategory)){const e=[];let s="";return t.displayDate&&(
|
6 |
/* translators: %s Date posted */
|
7 |
s+=(0,o.sprintf)((0,o.__)("Posted on %s","otter-blocks"),(0,x.p6)(a.date))),t.displayAuthor&&void 0!==n&&(
|
8 |
/* translators: %s Author of the post */
|
9 |
+
s+=(0,o.sprintf)((0,o.__)(" by %s","otter-blocks"),n.name)),e.push(s),t.displayComments&&e.push((0,o.sprintf)("%1$s %2$s","0",(0,o.__)("comments","otter-blocks"))),t.displayPostCategory&&Boolean(r.length)&&e.push(r.map((e=>{let{name:t}=e;return t})).join(", ")),(0,i.createElement)("p",{key:l,className:"o-posts-grid-post-meta"},e.join(" / "))}return""},Ho=e=>{let{attributes:t,element:l,post:a}=e;var n;return 0<t.excerptLength&&t.displayDescription?(0,i.createElement)("div",{key:l,className:"o-posts-grid-post-description"},(0,i.createElement)("p",null,(null===(n=a.excerpt)||void 0===n?void 0:n.rendered)&&(0,x.Uo)(a.excerpt.rendered).substring(0,t.excerptLength)+"…"),t.displayReadMoreLink&&(0,i.createElement)("a",{href:a.link,className:"o-posts-read-more"},(0,o.__)("Read more","otter-blocks"))):""};var Io=e=>{let{attributes:t,posts:l,categoriesList:o,authors:a}=e;return(0,i.createElement)("div",{className:"grid"===t.style?g()("is-grid",`o-posts-grid-columns-${t.columns}`,{"o-crop-img":t.cropImage}):g()("is-list",{"o-crop-img":t.cropImage})},l.filter((e=>e)).slice(t.enableFeaturedPost?1:0).map((e=>{var l,n,r;const s=o&&0<(null==e||null===(l=e.categories)||void 0===l?void 0:l.length)?o.find((t=>t.id===e.categories[0])):void 0,c=o&&0<(null==e||null===(n=e.categories)||void 0===n?void 0:n.length)?o.filter((t=>e.categories.includes(t.id))):[],d=a&&e.author?a.find((t=>t.id===e.author)):void 0;return(0,i.createElement)("div",{key:e.link,className:"o-posts-grid-post-blog o-posts-grid-post-plain"},(0,i.createElement)("div",{className:g()("o-posts-grid-post")},0!==e.featured_media&&t.displayFeaturedImage&&(0,i.createElement)(Fo,{id:e.featured_media,link:e.link,alt:null===(r=e.title)||void 0===r?void 0:r.rendered,size:t.imageSize,imgStyle:{borderRadius:void 0!==t.borderRadius?t.borderRadius+"px":void 0}}),(0,i.createElement)("div",{className:g()("o-posts-grid-post-body",{"is-full":!t.displayFeaturedImage})},t.template.map((l=>{switch(l){case"category":return(0,i.createElement)(Oo,{key:l,attributes:t,element:l,category:s,categoriesList:o});case"title":return(0,i.createElement)(No,{key:l,attributes:t,element:l,post:e});case"meta":return(0,i.createElement)(Ao,{key:l,attributes:t,element:l,post:e,author:d,categories:c});case"description":return(0,i.createElement)(Ho,{key:l,attributes:t,element:l,post:e});default:return(0,We.applyFilters)("otter.postsBlock.templateLoop","",l,t)}})))))})))};const Vo={posts:{slugs:[],usedSlugs:[]}};(0,v.registerGenericStore)("otter-store",(()=>{let e=()=>{};const t=Vo,l={getPostsSlugs(){return t.posts.slugs},getPostsUsedSlugs(){return t.posts.usedSlugs}},o={setPostsSlugs(l){t.posts.slugs=l,e()},setPostsUsedSlugs(l){t.posts.usedSlugs.push(...l),e()},setOnlyOneSlug(l){t.posts.usedSlugs=[l],e()},removePostsUsedSlugs(l){t.posts.usedSlugs=t.posts.usedSlugs.filter((e=>!l.includes(e))),e()}};return{getSelectors(){return l},getActions(){return o},subscribe(t){e=t}}})());var Do=e=>{var t;let{post:l,attributes:o,author:a,category:n,categoriesList:r}=e;return l?(0,i.createElement)("div",{className:"o-featured-container"},(0,i.createElement)("div",{className:"o-featured-post"},o.displayFeaturedImage&&(0,i.createElement)(Fo,{id:l.featured_media,link:l.link,alt:null===(t=l.title)||void 0===t?void 0:t.rendered,imgStyle:{borderRadius:void 0!==o.borderRadius?o.borderRadius+"px":void 0}}),(0,i.createElement)("div",{className:"o-posts-grid-post-body"},o.template.map((e=>{var t;const s=r&&0<(null==l||null===(t=l.categories)||void 0===t?void 0:t.length)?r.filter((e=>l.categories.includes(e.id))):[];switch(e){case"category":return(0,i.createElement)(Oo,{attributes:o,element:e,category:n,categoriesList:r});case"title":return(0,i.createElement)(No,{attributes:o,element:e,post:l});case"meta":return(0,i.createElement)(Ao,{attributes:o,element:e,post:l,author:a,categories:s});case"description":return(0,i.createElement)(Ho,{attributes:o,element:e,post:l});default:return(0,We.applyFilters)("otter.postsBlock.templateLoop","",e,o)}}))))):""};const{attributes:Go}=ho,$o=e=>(0,K.isNumber)(e)?(e=>e?`${e}px`:e)(e):e;const{name:Wo}=ho;(0,a.registerBlockType)(Wo,{...ho,title:(0,o.__)("Posts","otter-blocks"),description:(0,o.__)("Display a list of your most recent posts in a beautiful layout. Powered by Otter.","otter-blocks"),icon:r.postsIcon,keywords:["posts","grid","news"],deprecated:yo,edit:e=>{let{attributes:t,setAttributes:l,clientId:a}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,Go);return()=>e(t.id)}),[t.id]);const[n,r]=(0,i.useState)([]),{posts:d,categoriesList:u,authors:b}=(0,v.useSelect)((e=>{const l=t.categories&&0<t.categories.length?t.categories.map((e=>e.id)):[],o=(0,K.pickBy)({categories:l,order:t.order,orderby:t.orderBy,per_page:t.postsToShow,offset:t.offset,context:"view"},(e=>!(0,K.isUndefined)(e))),a=t.postTypes;return{posts:0<a.length?a.map((t=>e("core").getEntityRecords("postType",t,o))).flat():e("core").getEntityRecords("postType","post",o),categoriesList:e("core").getEntityRecords("taxonomy","category",{per_page:100,context:"view"}),authors:e("core").getUsers({who:"authors",context:"view"})}}),[t.categories,t.order,t.orderBy,t.postsToShow,t.offset,t.postTypes]),{responsiveGetAttributes:m}=S();(0,i.useEffect)((()=>{(async()=>{r(await(0,x.R3)())})()}),[]),(0,i.useEffect)((()=>{(0,v.dispatch)("otter-store").setPostsSlugs(n)}),[n]);const p=e=>(0,L.getDefaultValueByField)({name:name,field:e,defaultAttributes:Go,attributes:t}),g=p("imageBoxShadow"),h=p("boxShadow"),y={"--img-border-radius":(k=t.borderRadius,(0,K.isObject)(k)?(0,x.bv)(k):$o(k)),"--img-box-shadow":g.active&&`${g.horizontal}px ${g.vertical}px ${g.blur}px ${g.spread}px ${(0,x.rW)(g.color,g.colorOpacity)}`,"--border-width":$o(t.borderWidth),"--border-radius":(0,x.bv)(t.cardBorderRadius),"--box-shadow":h.active&&`${h.horizontal}px ${h.vertical}px ${h.blur}px ${h.spread}px ${(0,x.rW)(h.color,h.colorOpacity)}`,"--vert-align":(0,x.Vg)(t.verticalAlign),"--text-align":t.textAlign,"--text-color":t.textColor,"--background-color":t.backgroundColor,"--border-color":t.borderColor,"--content-gap":t.contentGap,"--img-width":m([$o(t.imageWidth),t.imageWidthTablet,t.imageWidthMobile]),"--img-width-tablet":t.imageWidthTablet,"--img-width-mobile":t.imageWidthMobile,"--title-text-size":m([$o(t.customTitleFontSize),$o(t.customTitleFontSizeTablet),$o(t.customTitleFontSizeTablet)]),"--title-text-size-tablet":$o(t.customTitleFontSizeTablet),"--title-text-size-mobile":$o(t.customTitleFontSizeMobile),"--description-text-size":m([$o(t.customDescriptionFontSize),$o(t.customDescriptionFontSizeTablet),$o(t.customDescriptionFontSizeMobile)]),"--description-text-size-tablet":$o(t.customDescriptionFontSizeTablet),"--description-text-size-mobile":$o(t.customDescriptionFontSizeMobile),"--meta-text-size":m([t.customMetaFontSize,t.customMetaFontSizeTablet,t.customMetaFontSizeMobile]),"--meta-text-size-tablet":t.customMetaFontSizeTablet,"--meta-text-size-mobile":t.customMetaFontSizeMobile,"--column-gap":m([t.columnGap,t.columnGapTablet,t.columnGapMobile]),"--column-gap-tablet":t.columnGapTablet,"--column-gap-mobile":t.columnGapMobile,"--row-gap":m([t.rowGap,t.rowGapTablet,t.rowGapMobile]),"--row-gap-tablet":t.rowGapTablet,"--row-gap-mobile":t.rowGapMobile,"--content-padding":m([t.padding,t.paddingTablet,t.paddingMobile]),"--content-padding-tablet":t.paddingTablet,"--content-padding-mobile":t.paddingMobile};var k;const f=(0,s.useBlockProps)();return(0,i.createElement)(i.Fragment,null,u&&(0,i.createElement)(Ro,{attributes:t,setAttributes:l,categoriesList:u}),(0,i.createElement)(ko,{attributes:t,setAttributes:l}),(0,i.createElement)((e=>{let{posts:t,categoriesList:l,authors:a,blockProps:n,inlineStyles:r,attributes:s}=e;return t&&l&&a?0===t.length?(0,i.createElement)("div",n,(0,i.createElement)(c.Placeholder,null,(0,o.__)("No Posts","otter-blocks"))):(0,i.createElement)("div",(0,Y.Z)({},n,{style:r}),(0,i.createElement)(c.Disabled,null,s.enableFeaturedPost&&(0,i.createElement)(Do,{attributes:s,post:null==t?void 0:t[0],category:l[0],categoriesList:l,author:a[0]}),(0,i.createElement)(Io,{attributes:s,posts:t,categoriesList:l,authors:a}))):(0,i.createElement)("div",n,(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null),(0,o.__)("Loading Posts","otter-blocks")))}),{posts:d,categoriesList:u,authors:b,blockProps:f,inlineStyles:y,attributes:t}))},save:()=>null,example:{attributes:{}}});var Zo=JSON.parse('{"kQ":"\x3c!-- wp:themeisle-blocks/advanced-columns {\\"id\\":\\"wp-block-themeisle-blocks-advanced-columns-e0e1ab2e\\",\\"columns\\":3,\\"layout\\":\\"equal\\",\\"layoutMobile\\":\\"collapsedRows\\",\\"padding\\":{\\"top\\":\\"80px\\",\\"bottom\\":\\"80px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"paddingTablet\\":{\\"top\\":\\"40px\\",\\"bottom\\":\\"40px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"margin\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\"},\\"columnsWidth\\":1170,\\"horizontalAlign\\":\\"center\\",\\"verticalAlign\\":\\"flex-start\\",\\"backgroundPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"backgroundOverlayPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"columnsHTMLTag\\":\\"section\\",\\"align\\":\\"full\\"} --\x3e\\n<section id=\\"wp-block-themeisle-blocks-advanced-columns-e0e1ab2e\\" class=\\"wp-block-themeisle-blocks-advanced-columns alignfull has-3-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-collapsedRows-layout has-vertical-flex-start\\"><div class=\\"wp-block-themeisle-blocks-advanced-columns-overlay\\"></div><div class=\\"innerblocks-wrap\\">\x3c!-- wp:themeisle-blocks/advanced-column {\\"id\\":\\"wp-block-themeisle-blocks-advanced-column-43e17023\\",\\"padding\\":{\\"top\\":\\"32px\\",\\"bottom\\":\\"32px\\",\\"left\\":\\"32px\\",\\"right\\":\\"32px\\"},\\"paddingTablet\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"paddingMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"margin\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"marginMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"backgroundPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"borderRadius\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"boxShadow\\":true,\\"boxShadowColorOpacity\\":10,\\"boxShadowBlur\\":80,\\"boxShadowVertical\\":2,\\"columnWidth\\":\\"33.33\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-advanced-column-43e17023\\" class=\\"wp-block-themeisle-blocks-advanced-column\\">\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-cd4d5bb0\\",\\"tag\\":\\"h3\\",\\"align\\":\\"center\\",\\"marginBottom\\":8} --\x3e\\n<h3 id=\\"wp-block-themeisle-blocks-advanced-heading-cd4d5bb0\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-cd4d5bb0\\">Essential</h3>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-7d521980\\",\\"tag\\":\\"span\\",\\"align\\":\\"center\\",\\"fontSize\\":48} --\x3e\\n<span id=\\"wp-block-themeisle-blocks-advanced-heading-7d521980\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-7d521980\\"><strong>$59</strong></span>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-ee4f525b\\",\\"tag\\":\\"p\\",\\"align\\":\\"center\\",\\"headingColor\\":\\"#9b9b9b\\",\\"fontSize\\":15} --\x3e\\n<p id=\\"wp-block-themeisle-blocks-advanced-heading-ee4f525b\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-ee4f525b\\">Party snackwave four dollar toast tumeric cold-pressed.</p>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:buttons {\\"layout\\":{\\"type\\":\\"flex\\",\\"justifyContent\\":\\"center\\",\\"orientation\\":\\"horizontal\\"}} --\x3e\\n<div class=\\"wp-block-buttons\\">\x3c!-- wp:button {\\"width\\":100,\\"className\\":\\"is-style-primary\\"} --\x3e\\n<div class=\\"wp-block-button has-custom-width wp-block-button__width-100 is-style-primary\\"><a class=\\"wp-block-button__link\\">Get Started</a></div>\\n\x3c!-- /wp:button --\x3e</div>\\n\x3c!-- /wp:buttons --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":10} --\x3e\\n<div style=\\"height:10px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e\\n\\n\x3c!-- wp:separator {\\"color\\":\\"nv-light-bg\\",\\"className\\":\\"is-style-default\\"} --\x3e\\n<hr class=\\"wp-block-separator has-text-color has-background has-nv-light-bg-background-color has-nv-light-bg-color is-style-default\\"/>\\n\x3c!-- /wp:separator --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-1806e8e7\\",\\"defaultIcon\\":\\"check\\",\\"defaultIconColor\\":\\"var(\\\\u002d\\\\u002dnv-primary-accent)\\",\\"defaultSize\\":16,\\"gap\\":10} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-1806e8e7\\" class=\\"wp-block-themeisle-blocks-icon-list\\">\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-26b966e4\\",\\"content\\":\\"Custom Layouts \\\\u0026amp; Hooks\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-26b966e4\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Custom Layouts & Hooks</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-4aebde54\\",\\"content\\":\\"Unlimited Website Usage\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-4aebde54\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Unlimited Website Usage</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-64264549\\",\\"content\\":\\"Risk-Free Guarantee\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-64264549\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Risk-Free Guarantee</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/icon-list --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":20} --\x3e\\n<div style=\\"height:20px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/advanced-column --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-column {\\"id\\":\\"wp-block-themeisle-blocks-advanced-column-2489d76c\\",\\"padding\\":{\\"top\\":\\"32px\\",\\"bottom\\":\\"32px\\",\\"left\\":\\"32px\\",\\"right\\":\\"32px\\"},\\"paddingTablet\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"paddingMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"margin\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"marginMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"backgroundPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"borderRadius\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"boxShadow\\":true,\\"boxShadowColorOpacity\\":10,\\"boxShadowBlur\\":80,\\"boxShadowVertical\\":2,\\"columnWidth\\":\\"33.33\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-advanced-column-2489d76c\\" class=\\"wp-block-themeisle-blocks-advanced-column\\">\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-e30ccf77\\",\\"tag\\":\\"h3\\",\\"align\\":\\"center\\",\\"marginBottom\\":8} --\x3e\\n<h3 id=\\"wp-block-themeisle-blocks-advanced-heading-e30ccf77\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-e30ccf77\\">Business</h3>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-01f7ed6b\\",\\"tag\\":\\"span\\",\\"align\\":\\"center\\",\\"fontSize\\":48} --\x3e\\n<span id=\\"wp-block-themeisle-blocks-advanced-heading-01f7ed6b\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-01f7ed6b\\"><strong>$129</strong></span>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-fe18de7e\\",\\"tag\\":\\"p\\",\\"align\\":\\"center\\",\\"headingColor\\":\\"#9b9b9b\\",\\"fontSize\\":15} --\x3e\\n<p id=\\"wp-block-themeisle-blocks-advanced-heading-fe18de7e\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-fe18de7e\\">Party snackwave four dollar toast tumeric cold-pressed.</p>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:buttons {\\"layout\\":{\\"type\\":\\"flex\\",\\"justifyContent\\":\\"center\\",\\"orientation\\":\\"horizontal\\"}} --\x3e\\n<div class=\\"wp-block-buttons\\">\x3c!-- wp:button {\\"width\\":100,\\"className\\":\\"is-style-primary\\"} --\x3e\\n<div class=\\"wp-block-button has-custom-width wp-block-button__width-100 is-style-primary\\"><a class=\\"wp-block-button__link\\">Get Started</a></div>\\n\x3c!-- /wp:button --\x3e</div>\\n\x3c!-- /wp:buttons --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":10} --\x3e\\n<div style=\\"height:10px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e\\n\\n\x3c!-- wp:separator {\\"color\\":\\"nv-light-bg\\",\\"className\\":\\"is-style-default\\"} --\x3e\\n<hr class=\\"wp-block-separator has-text-color has-background has-nv-light-bg-background-color has-nv-light-bg-color is-style-default\\"/>\\n\x3c!-- /wp:separator --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-fb8b7e9c\\",\\"defaultIcon\\":\\"check\\",\\"defaultIconColor\\":\\"var(\\\\u002d\\\\u002dnv-primary-accent)\\",\\"defaultSize\\":16,\\"gap\\":10} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-fb8b7e9c\\" class=\\"wp-block-themeisle-blocks-icon-list\\">\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-78a49dfc\\",\\"content\\":\\"Custom Layouts \\\\u0026amp; Hooks\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-78a49dfc\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Custom Layouts & Hooks</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-f341b063\\",\\"content\\":\\"Unlimited Website Usage\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-f341b063\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Unlimited Website Usage</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-8216d9b3\\",\\"content\\":\\"Risk-Free Guarantee\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-8216d9b3\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Risk-Free Guarantee</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/icon-list --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":20} --\x3e\\n<div style=\\"height:20px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/advanced-column --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-column {\\"id\\":\\"wp-block-themeisle-blocks-advanced-column-09158d16\\",\\"padding\\":{\\"top\\":\\"32px\\",\\"bottom\\":\\"32px\\",\\"left\\":\\"32px\\",\\"right\\":\\"32px\\"},\\"paddingTablet\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"paddingMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"margin\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"marginMobile\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"backgroundPosition\\":{\\"x\\":\\"0.00\\",\\"y\\":\\"0.00\\"},\\"borderRadius\\":{\\"top\\":\\"20px\\",\\"bottom\\":\\"20px\\",\\"left\\":\\"20px\\",\\"right\\":\\"20px\\"},\\"boxShadow\\":true,\\"boxShadowColorOpacity\\":10,\\"boxShadowBlur\\":80,\\"boxShadowVertical\\":2,\\"columnWidth\\":\\"33.33\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-advanced-column-09158d16\\" class=\\"wp-block-themeisle-blocks-advanced-column\\">\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-b3766bd8\\",\\"tag\\":\\"h3\\",\\"align\\":\\"center\\",\\"marginBottom\\":8} --\x3e\\n<h3 id=\\"wp-block-themeisle-blocks-advanced-heading-b3766bd8\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-b3766bd8\\">VIP</h3>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-e601353c\\",\\"tag\\":\\"span\\",\\"align\\":\\"center\\",\\"fontSize\\":48} --\x3e\\n<span id=\\"wp-block-themeisle-blocks-advanced-heading-e601353c\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-e601353c\\"><strong>$199</strong></span>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/advanced-heading {\\"id\\":\\"wp-block-themeisle-blocks-advanced-heading-39d2e261\\",\\"tag\\":\\"p\\",\\"align\\":\\"center\\",\\"headingColor\\":\\"#9b9b9b\\",\\"fontSize\\":15} --\x3e\\n<p id=\\"wp-block-themeisle-blocks-advanced-heading-39d2e261\\" class=\\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-39d2e261\\">Party snackwave four dollar toast tumeric cold-pressed.</p>\\n\x3c!-- /wp:themeisle-blocks/advanced-heading --\x3e\\n\\n\x3c!-- wp:buttons {\\"layout\\":{\\"type\\":\\"flex\\",\\"justifyContent\\":\\"center\\",\\"orientation\\":\\"horizontal\\"}} --\x3e\\n<div class=\\"wp-block-buttons\\">\x3c!-- wp:button {\\"width\\":100,\\"className\\":\\"is-style-primary\\"} --\x3e\\n<div class=\\"wp-block-button has-custom-width wp-block-button__width-100 is-style-primary\\"><a class=\\"wp-block-button__link\\">Get Started</a></div>\\n\x3c!-- /wp:button --\x3e</div>\\n\x3c!-- /wp:buttons --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":10} --\x3e\\n<div style=\\"height:10px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e\\n\\n\x3c!-- wp:separator {\\"color\\":\\"nv-light-bg\\",\\"className\\":\\"is-style-default\\"} --\x3e\\n<hr class=\\"wp-block-separator has-text-color has-background has-nv-light-bg-background-color has-nv-light-bg-color is-style-default\\"/>\\n\x3c!-- /wp:separator --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-2c744428\\",\\"defaultIcon\\":\\"check\\",\\"defaultIconColor\\":\\"var(\\\\u002d\\\\u002dnv-primary-accent)\\",\\"defaultSize\\":16,\\"gap\\":10} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-2c744428\\" class=\\"wp-block-themeisle-blocks-icon-list\\">\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-b78d20f0\\",\\"content\\":\\"Custom Layouts \\\\u0026amp; Hooks\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-b78d20f0\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Custom Layouts & Hooks</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-14fe631b\\",\\"content\\":\\"Unlimited Website Usage\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-14fe631b\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Unlimited Website Usage</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e\\n\\n\x3c!-- wp:themeisle-blocks/icon-list-item {\\"id\\":\\"wp-block-themeisle-blocks-icon-list-item-0ce7030d\\",\\"content\\":\\"Risk-Free Guarantee\\",\\"library\\":\\"fontawesome\\",\\"iconPrefix\\":\\"fas\\",\\"icon\\":\\"check\\"} --\x3e\\n<div id=\\"wp-block-themeisle-blocks-icon-list-item-0ce7030d\\" class=\\"wp-block-themeisle-blocks-icon-list-item\\"><i class=\\"fas fa-check wp-block-themeisle-blocks-icon-list-item-icon\\"></i><p class=\\"wp-block-themeisle-blocks-icon-list-item-content\\">Risk-Free Guarantee</p></div>\\n\x3c!-- /wp:themeisle-blocks/icon-list-item --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/icon-list --\x3e\\n\\n\x3c!-- wp:spacer {\\"height\\":20} --\x3e\\n<div style=\\"height:20px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>\\n\x3c!-- /wp:spacer --\x3e</div>\\n\x3c!-- /wp:themeisle-blocks/advanced-column --\x3e</div></section>\\n\x3c!-- /wp:themeisle-blocks/advanced-columns --\x3e"}');const{getBlockType:jo}=(0,v.select)("core/blocks"),Uo=()=>{const e=setInterval((()=>{if(void 0===jo("themeisle-blocks/advanced-columns"))return Uo();const t=(0,a.parse)(Zo.kQ);(0,a.registerBlockVariation)("themeisle-blocks/advanced-columns",{name:"themeisle-blocks/section-pricing",title:(0,o.__)("Pricing Section","otter-blocks"),icon:r.pricingIcon,scope:"inserter",attributes:t[0].attributes,innerBlocks:t[0].innerBlocks,example:{attributes:t[0].attributes,innerBlocks:t[0].innerBlocks}}),clearInterval(e)}),2e3)};Uo();var qo=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/progress-bar","title":"Progress Bar","category":"themeisle-blocks","description":"Show your progress with a beautiful Progress Bar block. Powered by Otter.","keywords":["progress","bar","skills"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"title":{"type":"string","default":"Skill"},"percentage":{"type":"number","default":50},"duration":{"type":"number","default":2},"titleStyle":{"type":"string","default":"default"},"percentagePosition":{"type":"string","default":"default"},"height":{"type":"number","default":30},"borderRadius":{"type":"number"},"backgroundColor":{"type":"string"},"barBackgroundColor":{"type":"string"},"titleColor":{"type":"string"},"percentageColor":{"type":"string"},"titleFontSize":{"type":"string"}},"editorStyle":"otter-progress-bar-editor","style":"otter-progress-bar-style","script":"otter-progress-bar"}');const Yo=[{name:(0,o.__)("Small","otter-blocks"),size:"0.875em",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"1em",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"1.125em",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"1.25em",slug:"xl"}];var Ko=e=>{let{attributes:t,setAttributes:l,onHeightChange:a,heightMode:n,setHeightMode:r}=e;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),value:t.title,onChange:e=>{l({title:e})}}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Percentage","otter-blocks"),help:(0,o.__)("The value of the progress bar.","otter-blocks"),value:t.percentage,onChange:e=>{void 0!==e&&(e=(0,K.clamp)(e,0,100),l({percentage:e}))},min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Duration","otter-blocks"),help:(0,o.__)("The duration of the animation.","otter-blocks"),value:t.duration,onChange:e=>{void 0!==e&&(e=(0,K.clamp)(e,0,3),l({duration:e}))},min:0,max:3,step:.1})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:t.titleColor,onChange:e=>l({titleColor:e}),label:(0,o.__)("Title","otter-blocks")},{value:t.barBackgroundColor,onChange:e=>l({barBackgroundColor:e}),label:(0,o.__)("Progress","otter-blocks")},{value:t.percentageColor,onChange:e=>l({percentageColor:e}),label:(0,o.__)("Percentage","otter-blocks")},{value:t.backgroundColor,onChange:e=>l({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")}]}),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks"),initialOpen:!1},30<=t.height&&(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Title Style","otter-blocks"),value:t.titleStyle,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Highlight","otter-blocks"),value:"highlight"},{label:(0,o.__)("Outer","otter-blocks"),value:"outer"}],onChange:e=>{l({titleStyle:e})}}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Show Percentage","otter-blocks"),value:t.percentagePosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Append","otter-blocks"),value:"append"},{label:(0,o.__)("Tooltip","otter-blocks"),value:"tooltip"},{label:(0,o.__)("Outer","otter-blocks"),value:"outer"},{label:(0,o.__)("Hide","otter-blocks"),value:"hide"}],onChange:e=>{n.isAutomatic&&(n.percentagePosition=e,r({...n})),l({percentagePosition:e})}}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Height","otter-blocks"),help:(0,o.__)("The height of the progress bar.","otter-blocks"),value:t.height,onChange:a,step:.1,min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),help:(0,o.__)("Round the corners of the progress bar.","otter-blocks"),value:t.borderRadius,onChange:e=>{l({borderRadius:e})},step:.1,initialPosition:5,min:0,max:35}),("outer"===t.titleStyle||"tooltip"===t.percentagePosition&&"outer"===t.percentagePosition)&&(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Outer Text Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:Yo,withReset:!0,value:t.titleFontSize,onChange:e=>l({titleFontSize:e})}))))};const{attributes:Jo}=qo;const Qo={to:[{type:"block",blocks:["themeisle-blocks/circle-counter"],transform:e=>{const t=(0,K.omit)(e,["titleStyle","percentagePosition","height","borderRadius","barBackgroundColor","percentageColor"]);return(0,a.createBlock)("themeisle-blocks/circle-counter",{...t,progressColor:e.barBackgroundColor,height:(0,K.clamp)(4*e.height,0,240),titleStyle:"default"})}}]};var Xo=Qo;const{name:ea}=qo;(0,a.registerBlockType)(ea,{...qo,title:(0,o.__)("Progress Bar","otter-blocks"),description:(0,o.__)("Show your progress with a beautiful Progress Bar block. Powered by Otter.","otter-blocks"),icon:"minus",keywords:["progress","bar","skills"],transforms:Xo,edit:e=>{let{attributes:t,setAttributes:l,isSelected:o,clientId:a,toggleSelection:n}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(a,Jo);return()=>e(t.id)}),[t.id]);const r=(0,i.useRef)(null),[d,u]=(0,i.useState)(!1),[b,m]=(0,i.useState)({isAutomatic:!1,titleStyle:t.titleStyle,percentagePosition:t.percentagePosition}),p=(0,i.useRef)(null);(0,i.useEffect)((()=>{let e=null;if(p.current)return u(!1),e=setTimeout((()=>u(!0)),1e3*t.duration),p.current.animate({width:`${t.percentage}%`},{duration:1e3*t.duration,easing:"linear",fill:"forwards"}),()=>{clearTimeout(e)}}),[t.percentage,t.duration]);const h={"--title-color":t.titleColor,"--percentage-color":t.percentageColor,"--percentage-color-outer":t.percentageColor,"--percentage-color-tooltip":t.percentageColor,"--percentage-color-append":t.percentageColor,"--background-color":t.backgroundColor,"--border-radius":void 0!==t.borderRadius&&t.borderRadius+"px","--height":void 0!==t.height&&t.height+"px","--bar-background":t.barBackgroundColor,"--title-font-size":t.titleFontSize},v=e=>{30>e?(b.isAutomatic||m({isAutomatic:!0,titleStyle:t.titleStyle,percentagePosition:t.percentagePosition}),l({height:e,titleStyle:"outer",percentagePosition:"append"===t.percentagePosition||"default"===t.percentagePosition?"outer":t.percentagePosition})):(b.isAutomatic&&m({isAutomatic:!1}),l({titleStyle:b.isAutomatic?b.titleStyle:t.titleStyle,percentagePosition:b.isAutomatic?b.percentagePosition:t.percentagePosition,height:e}))},y=(0,s.useBlockProps)({id:t.id,className:g()({"has-tooltip":"tooltip"===t.percentagePosition}),style:h});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Ko,{attributes:t,setAttributes:l,onHeightChange:v,heightMode:b,setHeightMode:m}),(0,i.createElement)("div",y,("outer"===t.titleStyle||"outer"===t.percentagePosition)&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer"},"outer"===t.titleStyle&&(0,i.createElement)(s.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-progress-bar__outer__title",value:t.title,onChange:e=>l({title:e})}),"outer"===t.percentagePosition&&d&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer__value wp-block-themeisle-blocks-progress-bar__number"},`${t.percentage}%`)),(0,i.createElement)(c.ResizableBox,{size:{height:t.height},minHeight:5,maxHeight:100,enable:{top:!1,right:!1,bottom:!0,left:!1},showHandle:o,onResizeStop:(e,l,o,a)=>{v(parseInt(t.height+a.height,10)),n(!0)},onResizeStart:()=>{n(!1)}},(0,i.createElement)("div",{ref:r,className:"wp-block-themeisle-blocks-progress-bar__area"},("default"===t.titleStyle||"highlight"===t.titleStyle)&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-progress-bar__area__title",{highlight:"highlight"===t.titleStyle})},(0,i.createElement)(s.RichText,{tagName:"span",allowedFormats:[],value:t.title,onChange:e=>l({title:e})})),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area__bar show",ref:p},"tooltip"===t.percentagePosition&&d&&(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__tooltip show"},`${t.percentage}%`,(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__arrow"})),"append"===t.percentagePosition&&d&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress__append show"},`${t.percentage}%`)),"default"===t.percentagePosition&&d&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress"},`${t.percentage}%`)))))},save:e=>{let{attributes:t}=e;const l=s.useBlockProps.save({id:t.id,className:g()({"has-tooltip":"tooltip"===t.percentagePosition}),"data-percent":t.percentage,"data-duration":t.duration});return(0,i.createElement)("div",l,("outer"===t.titleStyle||"outer"===t.percentagePosition)&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer"},"outer"===t.titleStyle&&(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__outer__title"},t.title),"outer"===t.percentagePosition&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer__value wp-block-themeisle-blocks-progress-bar__number"},t.percentage)),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area"},("default"===t.titleStyle||"highlight"===t.titleStyle)&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-progress-bar__area__title",{highlight:"highlight"===t.titleStyle})},(0,i.createElement)("span",null,t.title)),(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area__bar"},"tooltip"===t.percentagePosition&&(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__tooltip"},(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__number"},t.percentage),(0,i.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__arrow"})),"append"===t.percentagePosition&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress__append wp-block-themeisle-blocks-progress-bar__number"},t.percentage)),"default"===t.percentagePosition&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress wp-block-themeisle-blocks-progress-bar__number"},`${t.percentage}%`)))},example:{}});var ta=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/review","title":"Product Review","category":"themeisle-blocks","description":"Turn your posts into smart reviews with ratings and generate leads with a performing review block. Powered by Otter.","keywords":["product","review","stars"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"title":{"type":"string"},"currency":{"type":"string","default":"USD"},"price":{"type":"number"},"discounted":{"type":"number"},"image":{"type":"object"},"description":{"type":"string"},"features":{"type":"array","default":[{"title":"Stability","rating":9},{"title":"Ease of Use","rating":4},{"title":"Look & Feel","rating":9},{"title":"Price","rating":7}]},"pros":{"type":"array","default":["Easy to use","Good price","Sturdy build and ergonomics"]},"cons":{"type":"array","default":["Incompatible with old versions","Hard to assemble","Bad color combination"]},"links":{"type":"array","default":[{"label":"Buy on Amazon","href":"","isSponsored":false},{"label":"Buy on eBay","href":"","isSponsored":false}]},"prosLabel":{"type":"string","default":"Pros"},"consLabel":{"type":"string","default":"Cons"},"buttonsLabel":{"type":"string","default":"Buy this Product"},"imageWidth":{"type":"number"},"mainHeading":{"type":"string"},"subHeading":{"type":"string"},"contentFontSize":{"type":"string"},"primaryColor":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"buttonTextColor":{"type":"string"},"borderColor":{"type":"string"},"starsColor":{"type":"string"},"prosColor":{"type":"string"},"consColor":{"type":"string"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"borderWidth":{"type":"number"},"borderRadius":{"type":"number"},"boxShadow":{"type":"object","default":{"active":false,"colorOpacity":50,"blur":5,"spread":1,"horizontal":0,"vertical":0}},"isSynced":{"type":"array"}},"supports":{"align":["full","wide"],"html":false},"editorStyle":"otter-review-editor","style":"otter-review-style"}'),la=l(1463),oa=l.n(la);const aa=[{label:(0,o.__)("Default","otter-blocks"),value:"default",isDefault:!0},{label:(0,o.__)("Boxed","otter-blocks"),value:"boxed"}],na=[{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"}],ra=[{name:(0,o.__)("XS","otter-blocks"),size:"14px",slug:"xs"},{name:(0,o.__)("Small","otter-blocks"),size:"16px",slug:"small"},{name:(0,o.__)("Medium","otter-blocks"),size:"18px",slug:"medium"},{name:(0,o.__)("Large","otter-blocks"),size:"24px",slug:"large"},{name:(0,o.__)("XL","otter-blocks"),size:"28px",slug:"xl"}],ia=e=>{let{title:t,remove:l,children:a}=e;const[n,r]=(0,i.useState)(!1);return(0,i.createElement)("div",{className:"o-review__inspector_panel_item"},(0,i.createElement)("div",{className:"o-review__inspector_panel_item__header"},(0,i.createElement)(c.Button,{className:"o-review__inspector_panel_item__title",onClick:()=>r(!n)},t),(0,i.createElement)(c.Button,{icon:"no-alt",label:(0,o.__)("Remove","otter-blocks"),showTooltip:!0,className:"o-review__inspector_panel_item__arrow",onClick:l})),n&&(0,i.createElement)("div",{className:"o-review__inspector_panel_item__content"},a))};var sa=e=>{var t,l,a,n,r,d;let{attributes:u,setAttributes:b,getValue:m,productAttributes:p}=e;const[g,h]=(0,i.useState)("settings"),{responsiveSetAttributes:v,responsiveGetAttributes:y}=S(b),k=e=>{const t=[...u.features];switch(e.action){case"add":t.push({title:(0,o.__)("Feature","otter-blocks"),rating:9});break;case"remove":t.splice(e.index,1);break;case"update":t[e.index]={...t[e.index],...e.value}}b({features:t})},_=e=>{const t=[...u[e.type]];switch(e.action){case"add":t.push("");break;case"remove":t.splice(e.index,1);break;case"update":t[e.index]=e.value}b({[e.type]:t})},B=e=>{const t=[...u.links];switch(e.action){case"add":t.push({label:(0,o.__)("Buy Now","otter-blocks"),href:""});break;case"remove":t.splice(e.index,1);break;case"update":t[e.index]={...t[e.index],...e.value}}b({links:t})};return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(w.Z,{value:g,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:h}),"settings"===g&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(E.Z,{label:(0,o.__)("Column Structure","otter-blocks"),options:[{label:(0,o.__)("One Column","otter-blocks"),value:"is-style-single-column"},{label:(0,o.__)("Two Columns","otter-blocks"),value:"default"}],value:null!=u&&null!==(t=u.className)&&void 0!==t&&t.includes("is-style-single-column")?"is-style-single-column":"default",onChange:e=>{var t;const l=(null==u||null===(t=u.className)||void 0===t?void 0:t.split(" "))||[];"default"===e&&l.includes("is-style-single-column")?l.splice(l.indexOf("is-style-single-column"),1):"is-style-single-column"!==e||l.includes("is-style-single-column")||l.push("is-style-single-column"),b({className:l.join(" ")})}}),(u.image||(null==p?void 0:p.image))&&(0,i.createElement)(E.Z,{label:(0,o.__)("Image Width","otter-blocks"),options:[{label:(0,o.__)("25%","otter-blocks"),value:25},{label:(0,o.__)("33%","otter-blocks"),value:33},{label:(0,o.__)("50%","otter-blocks"),value:50},{label:(0,o.__)("100%","otter-blocks"),value:100}],value:u.imageWidth||33,onChange:e=>b({imageWidth:Number(e)})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Product Details","otter-blocks"),initialOpen:!1},u.product&&(0,i.createElement)(c.Notice,{status:"warning",isDismissible:!1,className:"o-html-anchor-control-notice"},(0,o.__)("WooCommerce product synchronization is active. Some options might be disabled.","otter-blocks")),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Product Name","otter-blocks"),type:"text",placeholder:(0,o.__)("Name of your product…","otter-blocks"),value:(null==p?void 0:p.title)||u.title,disabled:u.product,onChange:e=>b({title:e})}),(0,i.createElement)(c.BaseControl,null,(0,i.createElement)(c.TextControl,{label:(0,o.__)("Currency","otter-blocks"),type:"text",placeholder:(0,o.__)("Currency code, like USD or EUR.","otter-blocks"),value:(null==p?void 0:p.currency)||u.currency,disabled:u.product,onChange:e=>b({currency:e})}),(0,o.__)("Currency code in three digit ISO 4217 code.","otter-blocks")+" ",(0,i.createElement)(c.ExternalLink,{href:"https://en.wikipedia.org/wiki/ISO_4217#Active_codes"},(0,o.__)("List of ISO 4217 codes.","otter-blocks"))),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Price","otter-blocks"),type:"number",value:(null==p?void 0:p.price)||u.price,disabled:u.product,onChange:e=>b({price:""!==e?Number(e):void 0})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Discounted Price","otter-blocks"),type:"number",value:(null==p?void 0:p.discounted)||u.discounted,disabled:u.product,onChange:e=>b({discounted:""!==e?Number(e):void 0})}),u.image||null!=p&&p.image?(0,i.createElement)(c.BaseControl,{className:"o-review__inspector_image"},(0,i.createElement)("img",{src:(null==p||null===(l=p.image)||void 0===l?void 0:l.url)||u.image.url,alt:(null==p||null===(a=p.image)||void 0===a?void 0:a.url)||u.image.alt}),(0,i.createElement)(c.Button,{isSecondary:!0,onClick:()=>b({image:void 0}),disabled:u.product},(0,o.__)("Remove image","otter-blocks"))):(0,i.createElement)(s.MediaPlaceholder,{labels:{title:(0,o.__)("Product Image","otter-blocks")},accept:"image/*",allowedTypes:["image"],value:u.image,onSelect:e=>b({image:(0,K.pick)(e,["id","alt","url"])})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Product Features","otter-blocks"),initialOpen:!1},0<u.features.length&&u.features.map(((e,t)=>(0,i.createElement)(ia,{key:t,title:e.title||(0,o.__)("Feature","otter-blocks"),remove:()=>k({action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("Feature title","otter-blocks"),value:e.title,onChange:e=>k({action:"update",index:t,value:{title:e}})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Rating","otter-blocks"),value:e.rating,onChange:e=>k({action:"update",index:t,value:{rating:Number(e)}}),step:.1,min:1,max:10})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"o-review__inspector_add",onClick:()=>k({action:"add"})},(0,o.__)("Add Feature","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Pros","otter-blocks"),initialOpen:!1},0<u.pros.length&&u.pros.map(((e,t)=>(0,i.createElement)(ia,{key:t,title:e||(0,o.__)("Pro","otter-blocks"),remove:()=>_({type:"pros",action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("Why do you like the product?","otter-blocks"),value:e,onChange:e=>_({type:"pros",action:"update",index:t,value:e})})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"o-review__inspector_add",onClick:()=>_({type:"pros",action:"add"})},(0,o.__)("Add Item","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Cons","otter-blocks"),initialOpen:!1},0<u.cons.length&&u.cons.map(((e,t)=>(0,i.createElement)(ia,{key:t,title:e||(0,o.__)("Con","otter-blocks"),remove:()=>_({type:"cons",action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("What can be improved?","otter-blocks"),value:e,onChange:e=>_({type:"cons",action:"update",index:t,value:e})})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"o-review__inspector_add",onClick:()=>_({type:"cons",action:"add"})},(0,o.__)("Add Item","otter-blocks"))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Buttons","otter-blocks"),initialOpen:!1},u.product&&(0,i.createElement)(c.Notice,{status:"warning",isDismissible:!1,className:"o-html-anchor-control-notice"},(0,o.__)("WooCommerce product synchronization is active. Some options might be disabled.","otter-blocks")),0<(null==p||null===(n=p.links)||void 0===n?void 0:n.length)&&(null==p||null===(r=p.links)||void 0===r?void 0:r.map(((e,t)=>(0,i.createElement)(ia,{key:t,title:e.label||(0,o.__)("Link","otter-blocks"),remove:()=>B({action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),type:"text",placeholder:(0,o.__)("Button label","otter-blocks"),disabled:u.product,value:e.label}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Link","otter-blocks"),type:"url",placeholder:"https://…",value:e.href,disabled:u.product}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Is this Sponsored?","otter-blocks"),checked:e.isSponsored,disabled:u.product}))))),!(0<(null==p||null===(d=p.links)||void 0===d?void 0:d.length))&&(0,i.createElement)(i.Fragment,null,0<u.links.length&&u.links.map(((e,t)=>(0,i.createElement)(ia,{key:t,title:e.label||(0,o.__)("Link","otter-blocks"),remove:()=>B({action:"remove",index:t})},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Label","otter-blocks"),type:"text",placeholder:(0,o.__)("Button label","otter-blocks"),value:e.label,onChange:e=>B({action:"update",index:t,value:{label:e}})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Link","otter-blocks"),type:"url",placeholder:"https://…",value:e.href,onChange:e=>B({action:"update",index:t,value:{href:e}})}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Is this Sponsored?","otter-blocks"),checked:e.isSponsored,onChange:()=>B({action:"update",index:t,value:{isSponsored:!e.isSponsored}})})))),(0,i.createElement)(c.Button,{isSecondary:!0,className:"o-review__inspector_add",onClick:()=>B({action:"add"})},(0,o.__)("Add Links","otter-blocks")))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Labels","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.TextControl,{label:(0,o.__)("Pros","otter-blocks"),value:u.prosLabel,onChange:e=>b({prosLabel:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Cons","otter-blocks"),value:u.consLabel,onChange:e=>b({consLabel:e})}),(0,i.createElement)(c.TextControl,{label:(0,o.__)("Buttons","otter-blocks"),value:u.buttonsLabel,onChange:e=>b({buttonsLabel:e})}))),"style"===g&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Style","otter-blocks")},(0,i.createElement)(E.Z,{options:aa,value:(0,x.tB)(aa,null==u?void 0:u.className),onChange:e=>{const t=(0,x.L4)(null==u?void 0:u.className,aa,e);b({className:t})}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Typography","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Main Heading","otter-blocks"),help:(0,o.__)("Product Title HTML Tag","otter-blocks"),options:na,value:u.mainHeading||"h2",onChange:e=>b({mainHeading:e})}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Sub Heading","otter-blocks"),help:(0,o.__)("Pros and Cons titles HTML Tag","otter-blocks"),options:na,value:u.subHeading||"h3",onChange:e=>b({subHeading:e})}),(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Content Font Size","otter-blocks")},(0,i.createElement)(c.FontSizePicker,{fontSizes:ra,withReset:!0,value:u.contentFontSize,onChange:e=>b({contentFontSize:e})}))),(0,i.createElement)(T.Z,{label:(0,o.__)("Color","otter-blocks"),isSynced:u.isSynced,options:[{label:(0,o.__)("Background","otter-blocks"),slug:"backgroundColor",value:m("backgroundColor")},{label:(0,o.__)("Text","otter-blocks"),slug:"textColor",value:m("textColor")},{label:(0,o.__)("Button","otter-blocks"),slug:"primaryColor",value:m("primaryColor")},{label:(0,o.__)("Button Text","otter-blocks"),slug:"buttonTextColor",value:m("buttonTextColor")},{label:(0,o.__)("Border","otter-blocks"),slug:"borderColor",value:m("borderColor")},{label:(0,o.__)("Stars","otter-blocks"),slug:"starsColor",value:m("starsColor")},{label:(0,o.__)("Pros","otter-blocks"),slug:"prosColor",value:m("prosColor")},{label:(0,o.__)("Cons","otter-blocks"),slug:"consColor",value:m("consColor")}],setAttributes:b},(0,i.createElement)(s.ContrastChecker,{textColor:m("textColor"),backgroundColor:m("backgroundColor")}),(0,i.createElement)(s.ContrastChecker,{textColor:m("buttonTextColor"),backgroundColor:m("primaryColor")})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks"),initialOpen:!1},(0,i.createElement)(M.Z,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:y([u.padding,u.paddingTablet,u.paddingMobile]),onChange:e=>v(e,["padding","paddingTablet","paddingMobile"]),allowReset:!0}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Width","otter-blocks"),value:u.borderWidth,onChange:e=>b({borderWidth:e}),min:0,max:50,allowReset:!0}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Radius","otter-blocks"),value:u.borderRadius,onChange:e=>b({borderRadius:e}),min:0,max:100,allowReset:!0}),(0,i.createElement)(f.Z,{boxShadow:u.boxShadow,onChange:e=>{const t={...u.boxShadow};Object.entries(e).map((function(){let[l,o]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;t[l]=o})),b({boxShadow:t})}}))),!Boolean(window.themeisleGutenberg.hasPro)&&(0,i.createElement)(c.PanelBody,{title:(0,o.__)("More Features","otter-blocks"),initialOpen:!1},(0,i.createElement)(Ze.Z,{notice:(0,i.createElement)(c.ExternalLink,{href:(0,x.Wi)(window.themeisleGutenberg.upgradeLink,"reviewblock")},(0,o.__)("Get more options with Otter Pro. ","otter-blocks")),variant:"upsell"})),(0,i.createElement)(C.p,null))};const{attributes:ca}=ta,da=e=>e?`${e}px`:e,ua=e=>{let{rating:t}=e;const l=[],o=Boolean(window.themeisleGutenberg.ratingScale)?2:1;for(let e=0;10/o>e;e++)l.push((0,i.createElement)(r.StarFilled,{key:e,className:g()({filled:e<Math.round(t/o)})}));return l};const{name:ba,attributes:ma}=ta;window.themeisleGutenberg.defaultReviewAttributes=ma,(0,a.registerBlockType)(ba,{...ta,title:(0,o.__)("Product Review","otter-blocks"),description:(0,o.__)("Turn your posts into smart reviews with ratings and generate leads with a performing review block. Powered by Otter.","otter-blocks"),icon:r.faIcon,keywords:["product","review","stars"],edit:e=>{var t,l,a,n,d,u,b,m,p,h,v,y,k,f,_,w,C,E;let{name:x,attributes:S,setAttributes:T,clientId:M,isSelected:B,status:z="isInactive",productAttributes:P={}}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(M,ca);return()=>e(S.id)}),[S.id]);const R=e=>(0,L.getDefaultValueByField)({name:x,field:e,defaultAttributes:ca,attributes:S}),F=(S.features.reduce(((e,t)=>e+t.rating),0)/S.features.length).toFixed(1),O=R("boxShadow"),N={"--background-color":R("backgroundColor"),"--primary-color":R("primaryColor"),"--text-color":R("textColor"),"--button-text-color":R("buttonTextColor"),"--border-color":R("borderColor"),"--stars-color":R("starsColor"),"--pros-color":R("prosColor"),"--cons-color":R("consColor"),"--content-font-size":R("contentFontSize"),...(null==S||null===(t=S.padding)||void 0===t?void 0:t.top)&&{"--padding-desktop-top":S.padding.top},...(null==S||null===(l=S.padding)||void 0===l?void 0:l.bottom)&&{"--padding-desktop-bottom":S.padding.bottom},...(null==S||null===(a=S.padding)||void 0===a?void 0:a.right)&&{"--padding-desktop-right":S.padding.right},...(null==S||null===(n=S.padding)||void 0===n?void 0:n.left)&&{"--padding-desktop-left":S.padding.left},...(null==S||null===(d=S.paddingTablet)||void 0===d?void 0:d.top)&&{"--padding-tablet-top":S.paddingTablet.top},...(null==S||null===(u=S.paddingTablet)||void 0===u?void 0:u.bottom)&&{"--padding-tablet-bottom":S.paddingTablet.bottom},...(null==S||null===(b=S.paddingTablet)||void 0===b?void 0:b.right)&&{"--padding-tablet-right":S.paddingTablet.right},...(null==S||null===(m=S.paddingTablet)||void 0===m?void 0:m.left)&&{"--padding-tablet-left":S.paddingTablet.left},...(null==S||null===(p=S.paddingMobile)||void 0===p?void 0:p.top)&&{"--padding-mobile-top":S.paddingMobile.top},...(null==S||null===(h=S.paddingMobile)||void 0===h?void 0:h.bottom)&&{"--padding-mobile-bottom":S.paddingMobile.bottom},...(null==S||null===(v=S.paddingMobile)||void 0===v?void 0:v.right)&&{"--padding-mobile-right":S.paddingMobile.right},...(null==S||null===(y=S.paddingMobile)||void 0===y?void 0:y.left)&&{"--padding-mobile-left":S.paddingMobile.left},"--border-width":da(R("borderWidth")),"--border-radius":da(R("borderRadius")),"--box-shadow":O.active&&`${O.horizontal}px ${O.vertical}px ${O.blur}px ${O.spread}px ${Z()(O.color||"#FFFFFF",O.colorOpacity)}`},A="object"==typeof z&&null!==z&&z.isError||"isLoading"===z,H=Boolean(window.themeisleGutenberg.ratingScale)?2:1,I=(0,s.useBlockProps)({id:S.id,className:A?"is-placeholder":g()({"no-pros-cons":!(0<S.pros.length||0<S.cons.length),"no-footer":!(0<(null==P||null===(k=P.links)||void 0===k?void 0:k.length)||0<S.links.length)}),style:N}),V=S.mainHeading||"h2",D=S.subHeading||"h3";return"isLoading"===z?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(sa,{attributes:S,setAttributes:T,getValue:R,productAttributes:P}),(0,i.createElement)("div",I,(0,i.createElement)(c.Placeholder,null,(0,i.createElement)(c.Spinner,null)))):"object"==typeof z&&null!==z&&z.isError?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(sa,{attributes:S,setAttributes:T,getValue:R,productAttributes:P}),(0,i.createElement)("div",I,(0,i.createElement)(c.Placeholder,{instructions:z.message}))):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(sa,{attributes:S,setAttributes:T,getValue:R,productAttributes:P}),(0,i.createElement)("div",I,(0,i.createElement)("div",{className:"o-review__header"},null!=P&&P.title?(0,i.createElement)(s.RichText.Content,{placeholder:(0,o.__)("Name of your product…","otter-blocks"),allowedFormats:[],value:null==P?void 0:P.title,tagName:V}):(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Name of your product…","otter-blocks"),allowedFormats:[],value:S.title,onChange:e=>T({title:e}),tagName:V}),(0,i.createElement)("div",{className:"o-review__header_meta"},(0,i.createElement)("div",{className:"o-review__header_ratings"},(0,i.createElement)(ua,{rating:F}),(0,i.createElement)("span",null,/** translators: %s Rating score. */(0,o.sprintf)((0,o.__)("%f out of %f","otter-blocks"),Math.abs(F/H).toFixed(1)||0,10/H))),(0,i.createElement)("span",{className:"o-review__header_price"},((null==P?void 0:P.price)&&(null==P?void 0:P.discounted)||S.price&&S.discounted)&&(0,i.createElement)("del",null,(null!==(f=oa()((null==P?void 0:P.currency)||S.currency))&&void 0!==f?f:"$")+""+((null==P?void 0:P.price)||S.price)||0),(S.price||S.discounted||(null==P?void 0:P.price)||(null==P?void 0:P.discounted))&&(null!==(_=oa()((null==P?void 0:P.currency)||S.currency))&&void 0!==_?_:"$")+""+(null!=P&&P.discounted||S.discounted?(null==P?void 0:P.discounted)||S.discounted:(null==P?void 0:P.price)||S.price))),(0,i.createElement)("div",{className:g()("o-review__header_details",{"is-single":!S.image||!B&&!S.description,[{25:"is-quarter",50:"is-half",100:"is-full"}[S.imageWidth]]:S.imageWidth&&33!==S.imageWidth})},null!=P&&P.image?(0,i.createElement)("img",{src:null==P||null===(w=P.image)||void 0===w?void 0:w.url,alt:null==P||null===(C=P.image)||void 0===C?void 0:C.alt}):S.image&&(0,i.createElement)("img",{src:S.image.url,alt:S.image.alt}),!B&&!S.description||null!=P&&P.description?(0,i.createElement)(s.RichText.Content,{placeholder:(0,o.__)("Product description or a small review…","otter-blocks"),value:null==P?void 0:P.description,tagName:"p"}):(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Product description or a small review…","otter-blocks"),value:S.description,onChange:e=>T({description:e}),tagName:"p"}))),(0,i.createElement)("div",{className:"o-review__left"},(0,i.createElement)("div",{className:"o-review__left_features"},0<S.features.length&&S.features.map(((e,t)=>(0,i.createElement)("div",{className:"o-review__left_feature",key:t},(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Feature title","otter-blocks"),value:e.title,className:"o-review__left_feature_title",onChange:e=>((e,t)=>{const l=[...S.features];l[e]={...l[e],...t},T({features:l})})(t,{title:e}),tagName:"span"}),(0,i.createElement)("div",{className:"o-review__left_feature_ratings"},(0,i.createElement)(ua,{rating:e.rating}),(0,i.createElement)("span",null,/** translators: %s Rating score. */(0,o.sprintf)((0,o.__)("%f out of %f","otter-blocks"),Math.abs(e.rating/H).toFixed(1)||0,10/H)))))))),(0<S.pros.length||0<S.cons.length)&&(0,i.createElement)("div",{className:"o-review__right"},0<S.pros.length&&(0,i.createElement)("div",{className:"o-review__right_pros"},(0,i.createElement)(D,null,S.prosLabel),S.pros.map(((e,t)=>(0,i.createElement)("div",{className:"o-review__right_pros_item",key:t},r.check,(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("Why do you like the product?","otter-blocks"),value:e,onChange:e=>((e,t)=>{const l=[...S.pros];l[e]=t,T({pros:l})})(t,e),tagName:"p"}))))),0<S.cons.length&&(0,i.createElement)("div",{className:"o-review__right_cons"},(0,i.createElement)(D,null,S.consLabel),S.cons.map(((e,t)=>(0,i.createElement)("div",{className:"o-review__right_cons_item",key:t},r.close,(0,i.createElement)(s.RichText,{placeholder:(0,o.__)("What can be improved?","otter-blocks"),value:e,onChange:e=>((e,t)=>{const l=[...S.cons];l[e]=t,T({cons:l})})(t,e),tagName:"p"})))))),(0<(null==P||null===(E=P.links)||void 0===E?void 0:E.length)||0<S.links.length)&&(0,i.createElement)("div",{className:"o-review__footer"},(0,i.createElement)(D,{className:"o-review__footer_label"},S.buttonsLabel),(0,i.createElement)("div",{className:"o-review__footer_buttons"},((null==P?void 0:P.links)||S.links).map(((e,t)=>(0,i.createElement)(s.RichText,{key:t,placeholder:(0,o.__)("Button label","otter-blocks"),value:e.label,disabled:0<(null==P?void 0:P.links),onChange:e=>((e,t)=>{const l=[...S.links];l[e]={...l[e],...t},T({links:l})})(t,{label:e}),tagName:"span"})))))))},save:()=>null,example:{attributes:{}}});var pa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/advanced-columns","title":"Section","category":"themeisle-blocks","description":"Add a Section block that displays content in multiple columns, then add whatever content blocks you’d like. Powered by Otter.","keywords":["advanced columns","layout","section"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"columns":{"type":"number"},"layout":{"type":"string"},"layoutTablet":{"type":"string","default":"equal"},"layoutMobile":{"type":"string","default":"equal"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"margin":{"type":"object"},"marginTablet":{"type":"object"},"marginMobile":{"type":"object"},"columnsWidth":{"type":["number","string"]},"columnsWidthTablet":{"type":"string"},"columnsWidthMobile":{"type":"string"},"horizontalAlign":{"type":"string","default":"unset"},"columnsHeight":{"type":"string","default":"auto"},"columnsHeightCustom":{"type":["number","string"]},"columnsHeightCustomTablet":{"type":["number","string"]},"columnsHeightCustomMobile":{"type":["number","string"]},"verticalAlign":{"type":"string","default":"unset"},"color":{"type":"string"},"colorHover":{"type":"string"},"linkColor":{"type":"string"},"backgroundType":{"type":"string","default":"color"},"backgroundColor":{"type":"string"},"backgroundImage":{"type":"object"},"backgroundAttachment":{"type":"string","default":"scroll"},"backgroundPosition":{"type":"object"},"backgroundRepeat":{"type":"string","default":"repeat"},"backgroundSize":{"type":"string","default":"auto"},"backgroundGradient":{"type":"string","default":"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},"backgroundOverlayOpacity":{"type":"number","default":50},"backgroundOverlayType":{"type":"string","default":"color"},"backgroundOverlayColor":{"type":"string"},"backgroundOverlayImage":{"type":"object"},"backgroundOverlayAttachment":{"type":"string","default":"scroll"},"backgroundOverlayPosition":{"type":"object"},"backgroundOverlayRepeat":{"type":"string","default":"repeat"},"backgroundOverlaySize":{"type":"string","default":"auto"},"backgroundOverlayGradient":{"type":"string","default":"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},"backgroundOverlayFilterBlur":{"type":"number","default":0},"backgroundOverlayFilterBrightness":{"type":"number","default":10},"backgroundOverlayFilterContrast":{"type":"number","default":10},"backgroundOverlayFilterGrayscale":{"type":"number","default":0},"backgroundOverlayFilterHue":{"type":"number","default":0},"backgroundOverlayFilterSaturate":{"type":"number","default":10},"backgroundOverlayBlend":{"type":"string","default":"normal"},"border":{"type":"object"},"borderColor":{"type":"string"},"borderRadius":{"type":"object"},"boxShadow":{"type":"boolean","default":false},"boxShadowColor":{"type":"string","default":"#000000"},"boxShadowColorOpacity":{"type":"number","default":50},"boxShadowBlur":{"type":"number","default":5},"boxShadowSpread":{"type":"number","default":0},"boxShadowHorizontal":{"type":"number","default":0},"boxShadowVertical":{"type":"number","default":0},"dividerTopType":{"type":"string","default":"none"},"dividerTopColor":{"type":"string","default":"#000000"},"dividerTopWidth":{"type":"number"},"dividerTopWidthTablet":{"type":"number"},"dividerTopWidthMobile":{"type":"number"},"dividerTopHeight":{"type":"number"},"dividerTopHeightTablet":{"type":"number"},"dividerTopHeightMobile":{"type":"number"},"dividerTopInvert":{"type":"boolean","default":false},"dividerBottomType":{"type":"string","default":"none"},"dividerBottomColor":{"type":"string","default":"#000000"},"dividerBottomWidth":{"type":"number"},"dividerBottomWidthTablet":{"type":"number"},"dividerBottomWidthMobile":{"type":"number"},"dividerBottomHeight":{"type":"number"},"dividerBottomHeightTablet":{"type":"number"},"dividerBottomHeightMobile":{"type":"number"},"dividerBottomInvert":{"type":"boolean","default":false},"hide":{"type":"boolean","default":false},"hideTablet":{"type":"boolean","default":false},"hideMobile":{"type":"boolean","default":false},"reverseColumnsTablet":{"type":"boolean","default":false},"reverseColumnsMobile":{"type":"boolean","default":false},"columnsHTMLTag":{"type":"string","default":"div"},"isSynced":{"type":"array"}},"supports":{"align":["wide","full"],"html":false},"editorStyle":"otter-advanced-columns-editor","style":"otter-advanced-columns-style"}');const ga={align:{type:"string"},id:{type:"string"},columns:{type:"number"},layout:{type:"string"},layoutTablet:{type:"string",default:"equal"},layoutMobile:{type:"string",default:"equal"},columnsGap:{type:"string",default:"default"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number",default:20},paddingMobile:{type:"number",default:20},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number",default:20},paddingTopMobile:{type:"number",default:20},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number",default:20},paddingRightMobile:{type:"number",default:20},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number",default:20},paddingBottomMobile:{type:"number",default:20},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number",default:20},paddingLeftMobile:{type:"number",default:20},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number",default:20},marginMobile:{type:"number",default:20},marginTop:{type:"number",default:20},marginTopTablet:{type:"number",default:20},marginTopMobile:{type:"number",default:20},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number",default:20},marginBottomMobile:{type:"number",default:20},columnsWidth:{type:"number"},columnsHeight:{type:"string",default:"auto"},columnsHeightCustom:{type:"number"},columnsHeightCustomTablet:{type:"number"},columnsHeightCustomMobile:{type:"number"},horizontalAlign:{type:"string",default:"unset"},verticalAlign:{type:"string",default:"unset"},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundGradientFirstLocation:{type:"number",default:0},backgroundGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundGradientSecondLocation:{type:"number",default:100},backgroundGradientType:{type:"string",default:"linear"},backgroundGradientAngle:{type:"number",default:90},backgroundGradientPosition:{type:"string",default:"center center"},backgroundOverlayOpacity:{type:"number",default:50},backgroundOverlayType:{type:"string",default:"color"},backgroundOverlayColor:{type:"string"},backgroundOverlayImageID:{type:"number"},backgroundOverlayImageURL:{type:"string"},backgroundOverlayAttachment:{type:"string",default:"scroll"},backgroundOverlayPosition:{type:"string",default:"top left"},backgroundOverlayRepeat:{type:"string",default:"repeat"},backgroundOverlaySize:{type:"string",default:"auto"},backgroundOverlayGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundOverlayGradientFirstLocation:{type:"number",default:0},backgroundOverlayGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundOverlayGradientSecondLocation:{type:"number",default:100},backgroundOverlayGradientType:{type:"string",default:"linear"},backgroundOverlayGradientAngle:{type:"number",default:90},backgroundOverlayGradientPosition:{type:"string",default:"center center"},backgroundOverlayFilterBlur:{type:"number",default:0},backgroundOverlayFilterBrightness:{type:"number",default:10},backgroundOverlayFilterContrast:{type:"number",default:10},backgroundOverlayFilterGrayscale:{type:"number",default:0},backgroundOverlayFilterHue:{type:"number",default:0},backgroundOverlayFilterSaturate:{type:"number",default:10},backgroundOverlayBlend:{type:"string",default:"normal"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},dividerTopType:{type:"string",default:"none"},dividerTopColor:{type:"string",default:"#000000"},dividerTopWidth:{type:"number",default:100},dividerTopWidthTablet:{type:"number",default:100},dividerTopWidthMobile:{type:"number",default:100},dividerTopHeight:{type:"number",default:100},dividerTopHeightTablet:{type:"number",default:100},dividerTopHeightMobile:{type:"number",default:100},dividerTopInvert:{type:"boolean",default:!1},dividerBottomType:{type:"string",default:"none"},dividerBottomColor:{type:"string",default:"#000000"},dividerBottomWidth:{type:"number",default:100},dividerBottomWidthTablet:{type:"number",default:100},dividerBottomWidthMobile:{type:"number",default:100},dividerBottomHeight:{type:"number",default:100},dividerBottomHeightTablet:{type:"number",default:100},dividerBottomHeightMobile:{type:"number",default:100},dividerBottomInvert:{type:"boolean",default:!1},hide:{type:"boolean",default:!1},hideTablet:{type:"boolean",default:!1},hideMobile:{type:"boolean",default:!1},columnsHTMLTag:{type:"string",default:"div"}},ha=e=>{let{type:t,front:l,style:o,fill:a,invert:n,width:r,height:s}=e;return"none"!==o&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-advanced-columns-separators",t),style:!l&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===t?{transform:"bottom"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===o&&(0,i.createElement)(c.SVG,{id:"curve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===t?{transform:"bottom"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 0 L100 100 L100 0 Z"})),"slant"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===t?{transform:"bottom"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===o&&(0,i.createElement)(c.SVG,{id:"cloud",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===t?{transform:"top"===t?"rotate(180deg)":""}:{}},(0,i.createElement)(c.Path,{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})))},va=e=>{let{type:t,front:l,style:o,fill:a,invert:n,width:r,height:s}=e;return"none"!==o&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-advanced-columns-separators",t),style:!l&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)(c.Path,{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===o&&(0,i.createElement)(c.SVG,{id:"curve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===o&&!1===n&&(0,i.createElement)(c.SVG,{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)(c.Path,{d:"M0 0 L100 100 L100 0 Z"})),"slant"===o&&!0===n&&(0,i.createElement)(c.SVG,{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)(c.Path,{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===o&&(0,i.createElement)(c.SVG,{id:"cloud",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)(c.Path,{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})))},ya=[{attributes:ga,supports:{align:["wide","full"],html:!1},save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;let a,n,r,c,d;if("color"===t.backgroundType&&(a={background:t.backgroundColor}),"image"===t.backgroundType&&(a={backgroundImage:`url( '${t.backgroundImageURL}' )`,backgroundAttachment:t.backgroundAttachment,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}),"gradient"===t.backgroundType){let e;e="linear"===t.backgroundGradientType?`${t.backgroundGradientAngle}deg`:`at ${t.backgroundGradientPosition}`,a={background:`${t.backgroundGradientType}-gradient( ${e}, ${t.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientFirstLocation}%, ${t.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientSecondLocation}% )`}}"linked"===t.borderType&&(r={borderWidth:`${t.border}px`,borderStyle:"solid",borderColor:t.borderColor}),"unlinked"===t.borderType&&(r={borderTopWidth:`${t.borderTop}px`,borderRightWidth:`${t.borderRight}px`,borderBottomWidth:`${t.borderBottom}px`,borderLeftWidth:`${t.borderLeft}px`,borderStyle:"solid",borderColor:t.borderColor}),"linked"===t.borderRadiusType&&(c={borderRadius:`${t.borderRadius}px`}),"unlinked"===t.borderRadiusType&&(c={borderTopLeftRadius:`${t.borderRadiusTop}px`,borderTopRightRadius:`${t.borderRadiusRight}px`,borderBottomRightRadius:`${t.borderRadiusBottom}px`,borderBottomLeftRadius:`${t.borderRadiusLeft}px`}),!0===t.boxShadow&&(d={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`});const u={...a,...r,...c,...d,justifyContent:t.horizontalAlign};if("color"===t.backgroundOverlayType&&(n={background:t.backgroundOverlayColor,opacity:t.backgroundOverlayOpacity/100}),"image"===t.backgroundOverlayType&&(n={backgroundImage:`url( '${t.backgroundOverlayImageURL}' )`,backgroundAttachment:t.backgroundOverlayAttachment,backgroundPosition:t.backgroundOverlayPosition,backgroundRepeat:t.backgroundOverlayRepeat,backgroundSize:t.backgroundOverlaySize,opacity:t.backgroundOverlayOpacity/100}),"gradient"===t.backgroundOverlayType){let e;e="linear"===t.backgroundOverlayGradientType?`${t.backgroundOverlayGradientAngle}deg`:`at ${t.backgroundOverlayGradientPosition}`,n={background:`${t.backgroundOverlayGradientType}-gradient( ${e}, ${t.backgroundOverlayGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundOverlayGradientFirstLocation}%, ${t.backgroundOverlayGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundOverlayGradientSecondLocation}% )`,opacity:t.backgroundOverlayOpacity/100}}const b={...n,mixBlendMode:t.backgroundOverlayBlend,filter:`blur( ${t.backgroundOverlayFilterBlur/10}px ) brightness( ${t.backgroundOverlayFilterBrightness/10} ) contrast( ${t.backgroundOverlayFilterContrast/10} ) grayscale( ${t.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${t.backgroundOverlayFilterHue}deg ) saturate( ${t.backgroundOverlayFilterSaturate/10} )`};let m={};t.columnsWidth&&(m={maxWidth:t.columnsWidth+"px"});const p=t.hide?"":`has-desktop-${t.layout}-layout`,h=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,v=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,y=g()(l,`has-${t.columns}-columns`,p,h,v,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},`has-${t.lcolumnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:y,id:t.id,style:u},(0,i.createElement)("div",{className:"wp-themeisle-block-overlay",style:b}),(0,i.createElement)(ha,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap",style:m},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(ha,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}},{attributes:ga,supports:{align:["wide","full"],html:!1},save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;let a,n,r,c,d;if("color"===t.backgroundType&&(a={background:t.backgroundColor}),"image"===t.backgroundType&&(a={backgroundImage:`url( '${t.backgroundImageURL}' )`,backgroundAttachment:t.backgroundAttachment,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}),"gradient"===t.backgroundType){let e;e="linear"===t.backgroundGradientType?`${t.backgroundGradientAngle}deg`:`at ${t.backgroundGradientPosition}`,a={background:`${t.backgroundGradientType}-gradient( ${e}, ${t.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientFirstLocation}%, ${t.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientSecondLocation}% )`}}"linked"===t.borderType&&(r={borderWidth:`${t.border}px`,borderStyle:"solid",borderColor:t.borderColor}),"unlinked"===t.borderType&&(r={borderTopWidth:`${t.borderTop}px`,borderRightWidth:`${t.borderRight}px`,borderBottomWidth:`${t.borderBottom}px`,borderLeftWidth:`${t.borderLeft}px`,borderStyle:"solid",borderColor:t.borderColor}),"linked"===t.borderRadiusType&&(c={borderRadius:`${t.borderRadius}px`}),"unlinked"===t.borderRadiusType&&(c={borderTopLeftRadius:`${t.borderRadiusTop}px`,borderTopRightRadius:`${t.borderRadiusRight}px`,borderBottomRightRadius:`${t.borderRadiusBottom}px`,borderBottomLeftRadius:`${t.borderRadiusLeft}px`}),!0===t.boxShadow&&(d={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`});const u={...a,...r,...c,...d,justifyContent:t.horizontalAlign};if("color"===t.backgroundOverlayType&&(n={background:t.backgroundOverlayColor,opacity:t.backgroundOverlayOpacity/100}),"image"===t.backgroundOverlayType&&(n={backgroundImage:`url( '${t.backgroundOverlayImageURL}' )`,backgroundAttachment:t.backgroundOverlayAttachment,backgroundPosition:t.backgroundOverlayPosition,backgroundRepeat:t.backgroundOverlayRepeat,backgroundSize:t.backgroundOverlaySize,opacity:t.backgroundOverlayOpacity/100}),"gradient"===t.backgroundOverlayType){let e;e="linear"===t.backgroundOverlayGradientType?`${t.backgroundOverlayGradientAngle}deg`:`at ${t.backgroundOverlayGradientPosition}`,n={background:`${t.backgroundOverlayGradientType}-gradient( ${e}, ${t.backgroundOverlayGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundOverlayGradientFirstLocation}%, ${t.backgroundOverlayGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundOverlayGradientSecondLocation}% )`,opacity:t.backgroundOverlayOpacity/100}}const b={...n,mixBlendMode:t.backgroundOverlayBlend};let m={};t.columnsWidth&&(m={maxWidth:t.columnsWidth+"px"});const p=t.hide?"":`has-desktop-${t.layout}-layout`,h=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,v=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,y=g()(l,`has-${t.columns}-columns`,p,h,v,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},`has-${t.columnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:y,id:t.id,style:u},(0,i.createElement)("div",{className:"wp-themeisle-block-overlay",style:b}),(0,i.createElement)(ha,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap",style:m},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(ha,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}},{attributes:{...ga,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag,a=t.hide?"":`has-desktop-${t.layout}-layout`,n=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,r=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,c=g()(l,`has-${t.columns}-columns`,a,n,r,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},`has-${t.columnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:c,id:t.id},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,i.createElement)(va,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap"},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(va,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}},{attributes:{...ga,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},migrate:e=>{let t="",l="";if("gradient"===e.backgroundType){let l="";"linear"===e.backgroundGradientType&&(l=`${e.backgroundGradientAngle}deg, `),t=`${e.backgroundGradientType}-gradient(${l}${Z()(e.backgroundGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${Z()(e.backgroundGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}%)`}if("gradient"===e.backgroundOverlayType){let t="";"linear"===e.backgroundOverlayGradientType&&(t=`${e.backgroundOverlayGradientAngle}deg, `),l=`${e.backgroundOverlayGradientType}-gradient(${t}${Z()(e.backgroundOverlayGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientFirstLocation}%, ${Z()(e.backgroundOverlayGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientSecondLocation}%)`}return{...{...(0,K.omit)(e,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition","backgroundOverlayGradientFirstColor","backgroundOverlayGradientFirstLocation","backgroundOverlayGradientSecondColor","backgroundOverlayGradientSecondLocation","backgroundOverlayGradientType","backgroundOverlayGradientAngle","backgroundOverlayGradientPosition"]),backgroundGradient:t,backgroundOverlayGradient:l}}},isEligible:e=>"gradient"===e.backgroundType&&void 0!==e.backgroundGradientFirstColor||"gradient"===e.backgroundOverlayType&&void 0!==e.backgroundOverlayGradientFirstColor,save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag,a=t.hide?"":`has-desktop-${t.layout}-layout`,n=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,r=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,c=g()(l,`has-${t.columns}-columns`,a,n,r,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},`has-${t.columnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:c,id:t.id},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,i.createElement)(va,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap"},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(va,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}},{attributes:{...(0,K.omit)(ga,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition","backgroundOverlayGradientFirstColor","backgroundOverlayGradientFirstLocation","backgroundOverlayGradientSecondColor","backgroundOverlayGradientSecondLocation","backgroundOverlayGradientType","backgroundOverlayGradientAngle","backgroundOverlayGradientPosition"]),paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},backgroundGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},backgroundOverlayGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},migrate:e=>{const t={},l={},o={},a={},n={},r={},i={},s={};let c={},d={},u={},b={};"unlinked"===e.paddingType?(t.top=(0,K.isUndefined)(e.paddingTop)?"20px":e.paddingTop+"px",t.bottom=(0,K.isUndefined)(e.paddingBottom)?"20px":e.paddingBottom+"px",t.left=(0,K.isUndefined)(e.paddingLeft)?"20px":e.paddingLeft+"px",t.right=(0,K.isUndefined)(e.paddingRight)?"20px":e.paddingRight+"px"):(t.top=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.bottom=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.left=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.right=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px"),"unlinked"===e.paddingTypeTablet?(l.top=(0,K.isUndefined)(e.paddingTopTablet)?null:e.paddingTopTablet+"px",l.bottom=(0,K.isUndefined)(e.paddingBottomTablet)?null:e.paddingBottomTablet+"px",l.left=(0,K.isUndefined)(e.paddingLeftTablet)?null:e.paddingLeftTablet+"px",l.right=(0,K.isUndefined)(e.paddingRightTablet)?null:e.paddingRightTablet+"px"):(l.top=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.bottom=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.left=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.right=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px"),"unlinked"===e.paddingTypeMobile?(o.top=(0,K.isUndefined)(e.paddingMobileTop)?null:e.paddingMobileTop+"px",o.bottom=(0,K.isUndefined)(e.paddingMobileBottom)?null:e.paddingMobileBottom+"px",o.left=(0,K.isUndefined)(e.paddingMobileLeft)?null:e.paddingMobileLeft+"px",o.right=(0,K.isUndefined)(e.paddingMobileRight)?null:e.paddingMobileRight+"px"):(o.top=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.bottom=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.left=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.right=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px"),"linked"===e.marginType?(a.top=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px",a.bottom=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px"):(a.top=(0,K.isUndefined)(e.marginTop)?"20px":e.marginTop+"px",a.bottom=(0,K.isUndefined)(e.marginBottom)?"20px":e.marginBottom+"px"),"linked"===e.marginTypeTablet?(n.top=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px",n.bottom=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px"):(n.top=(0,K.isUndefined)(e.marginTopTablet)?null:e.marginTopTablet+"px",n.bottom=(0,K.isUndefined)(e.marginBottomTablet)?null:e.marginBottomTablet+"px"),"linked"===e.marginTypeMobile?(r.top=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px",r.bottom=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px"):(r.top=(0,K.isUndefined)(e.marginTopMobile)?null:e.marginTopMobile+"px",r.bottom=(0,K.isUndefined)(e.marginBottomMobile)?null:e.marginBottomMobile+"px"),"unlinked"===e.borderType?(i.top=(0,K.isUndefined)(e.borderTop)?null:e.borderTop+"px",i.bottom=(0,K.isUndefined)(e.borderBottom)?null:e.borderBottom+"px",i.left=(0,K.isUndefined)(e.borderLeft)?null:e.borderLeft+"px",i.right=(0,K.isUndefined)(e.borderRight)?null:e.borderRight+"px"):(i.top=(0,K.isUndefined)(e.border)?null:e.border+"px",i.bottom=(0,K.isUndefined)(e.border)?null:e.border+"px",i.left=(0,K.isUndefined)(e.border)?null:e.border+"px",i.right=(0,K.isUndefined)(e.border)?null:e.border+"px"),"unlinked"===e.borderRadiusType?(s.top=(0,K.isUndefined)(e.borderRadiusTop)?null:e.borderRadiusTop+"px",s.bottom=(0,K.isUndefined)(e.borderRadiusBottom)?null:e.borderRadiusBottom+"px",s.left=(0,K.isUndefined)(e.borderRadiusLeft)?null:e.borderRadiusLeft+"px",s.right=(0,K.isUndefined)(e.borderRadiusRight)?null:e.borderRadiusRight+"px"):(s.top=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.bottom=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.left=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.right=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px"),void 0!==e.backgroundImageURL&&void 0!==e.backgroundImageID&&(c={id:e.backgroundImageID,url:e.backgroundImageURL}),void 0!==e.backgroundOverlayImageURL&&void 0!==e.backgroundOverlayImageID&&(d={id:e.backgroundOverlayImageID,url:e.backgroundOverlayImageURL});const m={"top left":{x:"0.00",y:"0.00"},"top center":{x:"0.50",y:"0.00"},"top right":{x:"1.00",y:"0.00"},"center left":{x:"0.00",y:"0.50"},"center center":{x:"0.50",y:"0.50"},"center right":{x:"1.00",y:"0.50"},"bottom left":{x:"0.00",y:"1.00"},"bottom center":{x:"0.50",y:"1.00"},"bottom right":{x:"1.00",y:"1.00"}};return void 0!==e.backgroundPosition&&(u=m[e.backgroundPosition]),void 0!==e.backgroundOverlayPosition&&(b=m[e.backgroundOverlayPosition]),{...{...(0,K.omit)(e,["columnsGap","paddingType","paddingTypeTablet","paddingTypeMobile","paddingTop","paddingTopTablet","paddingTopMobile","paddingRight","paddingRightTablet","paddingRightMobile","paddingBottom","paddingBottomTablet","paddingBottomMobile","paddingLeft","paddingLeftTablet","paddingLeftMobile","marginType","marginTypeTablet","marginTypeMobile","marginTop","marginTopTablet","marginTopMobile","marginBottom","marginBottomTablet","marginBottomMobile","borderType","borderTop","borderRight","borderBottom","borderLeft","borderRadiusType","borderRadiusTop","borderRadiusRight","borderRadiusBottom","borderRadiusLeft"]),...!(0,x.FH)(t)&&{padding:t},...!(0,x.FH)(l)&&{paddingTablet:l},...!(0,x.FH)(o)&&{paddingMobile:o},...!(0,x.FH)(a)&&{margin:a},...!(0,x.FH)(n)&&{marginTablet:n},...!(0,x.FH)(r)&&{marginMobile:r},...!(0,x.FH)(i)&&{border:i},...!(0,x.FH)(s)&&{borderRadius:s},...!(0,x.FH)(c)&&{backgroundImage:c},...!(0,x.FH)(u)&&{backgroundPosition:u},...!(0,x.FH)(d)&&{backgroundOverlayImage:d},...!(0,x.FH)(b)&&{backgroundOverlayPosition:b}}}},isEligible:e=>["padding","paddingTablet","paddingMobile","paddingTop","paddingTopTablet","paddingTopMobile","paddingRight","paddingRightTablet","paddingRightMobile","paddingBottom","paddingBottomTablet","paddingBottomMobile","paddingLeft","paddingLeftTablet","paddingLeftMobile","margin","marginTablet","marginMobile","marginTop","marginTopTablet","marginTopMobile","marginBottom","marginBottomTablet","marginBottomMobile","borderType","border","borderTop","borderRight","borderBottom","borderLeft","borderRadiusType","borderRadius","borderRadiusTop","borderRadiusRight","borderRadiusBottom","borderRadiusLeft"].some((t=>!(0,K.isUndefined)(e[t])&&("number"==typeof e[t]||null===typeof e[t])))||void 0!==e.backgroundImageURL&&void 0!==e.backgroundImageID||void 0!==e.backgroundOverlayImageURL&&void 0!==e.backgroundOverlayImageID||void 0!==e.backgroundPosition&&"object"!=typeof e.backgroundPosition||void 0!==e.backgroundOverlayPosition&&"object"!=typeof e.backgroundOverlayPosition||void 0!==e.columnsGap,save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag,a=t.hide?"":`has-desktop-${t.layout}-layout`,n=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,r=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,c=g()(l,`has-${t.columns}-columns`,a,n,r,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},`has-${t.columnsGap}-gap`,`has-vertical-${t.verticalAlign}`);return(0,i.createElement)(o,{className:c,id:t.id},(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,i.createElement)(va,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap"},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(va,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))}}];var ka=ya,fa={1:{equal:["100"]},2:{equal:["50","50"],oneTwo:["33.34","66.66"],twoOne:["66.66","33.34"],collapsedRows:["100","100"]},3:{equal:["33.33","33.33","33.33"],oneOneTwo:["25","25","50"],twoOneOne:["50","25","25"],oneTwoOne:["25","50","25"],oneThreeOne:["20","60","20"],collapsedRows:["100","100","100"]},4:{equal:["25","25","25","25"],twoColumnGrid:["100","100","100","100"],collapsedRows:["100","100","100","100"]},5:{equal:["20","20","20","20","20"],collapsedRows:["100","100","100","100","100"]},6:{equal:["16.66","16.66","16.66","16.66","16.66","16.66"],twoColumnGrid:["100","100","100","100","100","100"],threeColumnGrid:["100","100","100","100","100","100"],collapsedRows:["100","100","100","100","100","100"]}},_a=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(s.BlockVerticalAlignmentToolbar,{onChange:e=>t.verticalAlign===e?l({verticalAlign:"unset"}):l({verticalAlign:e}),value:"flex-start"===t.verticalAlign?"top":"flex-end"===t.verticalAlign?"bottom":t.verticalAlign}))},wa=l(3203),Ca=e=>{let{label:t,onClick:l,layout:a,layoutTablet:n,layoutMobile:s,columns:d}=e;const u=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]);let b;return"Desktop"===u?b=a:"Tablet"===u?b=n:"Mobile"===u&&(b=s),(0,i.createElement)(wa.n9,{label:t,className:"wp-block-themeisle-blocks-advanced-columns-layout-control"},1===d&&(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Single Row","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.colsFull)()))||2===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols2Equal)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("1:2","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneTwo"===b}),onClick:()=>l("oneTwo")},(0,r.cols12)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("2:1","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoOne"===b}),onClick:()=>l("twoOne")},(0,r.cols21)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)())))||3===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols3Equal)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("1:1:2","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneOneTwo"===b}),onClick:()=>l("oneOneTwo")},(0,r.cols112)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("2:1:1","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoOneOne"===b}),onClick:()=>l("twoOneOne")},(0,r.cols211)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("1:2:1","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneTwoOne"===b}),onClick:()=>l("oneTwoOne")},(0,r.cols121)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("1:3:1","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneThreeOne"===b}),onClick:()=>l("oneThreeOne")},(0,r.cols131)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)())))||4===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols4Equal)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Two Column Grid","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoColumnGrid"===b}),onClick:()=>l("twoColumnGrid")},(0,r.colsCollapsed)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)()))))||5===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols5Equal)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)())))||6===d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Equal","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===b}),onClick:()=>l("equal")},(0,r.cols6Equal)())),("Mobile"==u||"Tablet"==u)&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Two Column Grid","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoColumnGrid"===b}),onClick:()=>l("twoColumnGrid")},(0,r.cols2Grid)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Three Column Grid","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"threeColumnGrid"===b}),onClick:()=>l("threeColumnGrid")},(0,r.cols3Grid)())),(0,i.createElement)(c.Tooltip,{text:(0,o.__)("Collapsed Rows","otter-blocks")},(0,i.createElement)(c.Button,{className:g()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===b}),onClick:()=>l("collapsedRows")},(0,r.rowsCollapsed)())))))},Ea=e=>{var t,l,a,n,r,d;let{attributes:u,setAttributes:b,getValue:m,updateColumnsWidth:p,dividerViewType:g,setDividerViewType:h,changeColumnsNumbers:y}=e;const k=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]),{responsiveSetAttributes:f}=S(b),[_,w]=(0,i.useState)("settings"),C=()=>{switch(k){case"Desktop":return"padding";case"Tablet":return"paddingTablet";case"Mobile":return"paddingMobile";default:return}},E=()=>{switch(k){case"Desktop":return"margin";case"Tablet":return"marginTablet";case"Mobile":return"marginMobile";default:return}},T=()=>{switch(k){case"Desktop":return"columnsWidth";case"Tablet":return"columnsWidthTablet";case"Mobile":return"columnsWidthMobile";default:return}};let M=()=>{var e,t,l;switch(k){case"Desktop":return m("columnsWidth");case"Tablet":return null!==(e=m("columnsWidthTablet"))&&void 0!==e?e:m("columnsWidth");case"Mobile":return null!==(t=null!==(l=m("columnsWidthMobile"))&&void 0!==l?l:m("columnsWidthTablet"))&&void 0!==t?t:m("columnsWidth");default:return}};M=M();let B=()=>{var e,t,l;switch(k){case"Desktop":return u.columnsHeightCustom;case"Tablet":return null!==(e=u.columnsHeightCustomTablet)&&void 0!==e?e:u.columnsHeightCustom;case"Mobile":return null!==(t=null!==(l=u.columnsHeightCustomMobile)&&void 0!==l?l:u.columnsHeightCustomTablet)&&void 0!==t?t:u.columnsHeightCustom;default:return}};B=B();const z="top"==g?u.dividerTopType:"bottom"==g?u.dividerBottomType:void 0,P=(e,t)=>{switch(t){case"Desktop":b({hide:e});break;case"Tablet":b({hideTablet:e});break;case"Mobile":b({hideMobile:e})}},L=(e,t)=>{"Tablet"===t?b({reverseColumnsTablet:e}):"Mobile"===t&&b({reverseColumnsMobile:e})},R=(e,t,l,o)=>"color"===e&&t?t:"image"===e&&l?`url( ${l} )`:"gradient"===e&&o?o:void 0;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(wa.Hn,{value:_,options:[{label:(0,o.__)("Settings","otter-blocks"),value:"settings"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:w}),"settings"===_&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Columns & Layout","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Columns","otter-blocks"),value:u.columns,onChange:e=>{6>=e&&b({layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"}),6<e&&b({layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"}),1>=e&&b({layout:"equal",layoutTablet:"equal",layoutMobile:"equal"}),y(e)},min:1,max:6}),(0,i.createElement)(Ca,{label:(0,o.__)("Layout","otter-blocks"),columns:u.columns,layout:u.layout,layoutTablet:u.layoutTablet,layoutMobile:u.layoutMobile,onClick:e=>{switch(k){case"Desktop":b({layout:e}),p(u.columns,e);break;case"Tablet":b({layoutTablet:e});break;case"Mobile":b({layoutMobile:e})}}})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Section Structure","otter-blocks"),initialOpen:!1},(0,i.createElement)(wa.r4,{isSynced:u.isSynced,options:[{label:(0,o.__)("Maximum Content Width","otter-blocks"),value:T()},{label:(0,o.__)("Horizontal Align","otter-blocks"),value:"horizontalAlign",isHidden:void 0===m("columnsWidth")}],setAttributes:b}),(0,i.createElement)(c.Disabled,{isDisabled:(null===(t=u.isSynced)||void 0===t?void 0:t.includes(T()))||!1,className:"o-disabled"},(0,i.createElement)(wa.n9,{label:(0,o.__)("Maximum Content Width","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:M,onChange:e=>f(e,["columnsWidth","columnsWidthTablet","columnsWidthMobile"])}),(0,i.createElement)(wa.Cd,{values:["columnsWidth","columnsWidthTablet","columnsWidthMobile"],setAttributes:b}))),void 0!==m("columnsWidth")&&(0,i.createElement)(c.Disabled,{isDisabled:(null===(l=u.isSynced)||void 0===l?void 0:l.includes("horizontalAlign"))||!1,className:"o-disabled"},(0,i.createElement)(c.BaseControl,{label:(0,o.__)("Horizontal Align","otter-blocks")},(0,i.createElement)(wa.Ik,{value:m("horizontalAlign"),options:[{icon:"editor-alignleft",label:(0,o.__)("Left","otter-blocks"),value:"flex-start"},{icon:"editor-aligncenter",label:(0,o.__)("Center","otter-blocks"),value:"center"},{icon:"editor-alignright",label:(0,o.__)("Right","otter-blocks"),value:"flex-end"}],onChange:e=>(e=>{if(u.horizontalAlign===e)return b({horizontalAlign:"unset"});b({horizontalAlign:e})})(e),hasIcon:!0}))),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Minimum Height","otter-blocks"),value:u.columnsHeight,options:[{label:(0,o.__)("Default","otter-blocks"),value:"auto"},{label:(0,o.__)("Fit to Screen","otter-blocks"),value:"100vh"},{label:(0,o.__)("Custom","otter-blocks"),value:"custom"}],onChange:e=>b({columnsHeight:e})}),"custom"===u.columnsHeight&&(0,i.createElement)(wa.n9,{label:(0,o.__)("Custom Height","otter-blocks")},(0,i.createElement)(c.__experimentalUnitControl,{value:B,onChange:e=>{switch(k){case"Desktop":b({columnsHeightCustom:e});break;case"Tablet":b({columnsHeightCustomTablet:e});break;case"Mobile":b({columnsHeightCustomMobile:e})}}}),(0,i.createElement)(wa.Cd,{values:["columnsHeightCustom","columnsHeightCustomTablet","columnsHeightCustomMobile"],setAttributes:b})),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:u.columnsHTMLTag,options:[{label:(0,o.__)("Default (div)","otter-blocks"),value:"div"},{label:"section",value:"section"},{label:"header",value:"header"},{label:"footer",value:"footer"},{label:"article",value:"article"},{label:"main",value:"main"}],onChange:e=>b({columnsHTMLTag:e})})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Responsive","otter-blocks"),initialOpen:!1},(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide this section on Desktop devices?","otter-blocks"),checked:u.hide,onChange:e=>P(e,"Desktop")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide this section on Tablet devices?","otter-blocks"),checked:u.hideTablet,onChange:e=>P(e,"Tablet")}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Hide this section on Mobile devices?","otter-blocks"),checked:u.hideMobile,onChange:e=>P(e,"Mobile")}),(0,i.createElement)("hr",null),!u.hideTablet&&"collapsedRows"===u.layoutTablet&&(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Reverse Columns in Tablet devices?","otter-blocks"),checked:u.reverseColumnsTablet,onChange:e=>L(e,"Tablet")}),!u.hideMobile&&"collapsedRows"===u.layoutMobile&&(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Reverse Columns in Mobile devices?","otter-blocks"),checked:u.reverseColumnsMobile,onChange:e=>L(e,"Mobile")})))||"style"===_&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(wa.r4,{isSynced:u.isSynced,options:[{label:(0,o.__)("Padding","otter-blocks"),value:C()},{label:(0,o.__)("Margin","otter-blocks"),value:E()}],setAttributes:b}),(0,i.createElement)(wa.n9,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.Disabled,{isDisabled:(null===(a=u.isSynced)||void 0===a?void 0:a.includes(C()))||!1,className:"o-disabled"},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:(()=>{switch(k){case"Desktop":return m("padding");case"Tablet":return(0,K.merge)({...m("padding")},m("paddingTablet"));case"Mobile":return(0,K.merge)({...m("padding")},m("paddingTablet"),m("paddingMobile"));default:return}})(),inputProps:{min:0,max:500},onChange:e=>{switch((0,x.CJ)(e)&&(e=void 0),k){case"Desktop":return b({padding:e});case"Tablet":return b({paddingTablet:(0,x.cg)(e,u.padding)});case"Mobile":return b({paddingMobile:(0,x.cg)(e,{...u.padding,...u.paddingTablet})});default:return}}})),(0,i.createElement)(c.Disabled,{isDisabled:(null===(n=u.isSynced)||void 0===n?void 0:n.includes(E()))||!1,className:"o-disabled"},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Margin","otter-blocks"),values:(()=>{switch(k){case"Desktop":return m("margin");case"Tablet":return(0,K.merge)({...m("margin")},m("marginTablet"));case"Mobile":return(0,K.merge)({...m("margin")},m("marginTablet"),m("marginMobile"));default:return}})(),inputProps:{min:-500,max:500},sides:["top","bottom"],onChange:e=>{switch((0,x.CJ)(e)&&(e=void 0),"object"==typeof e&&(e=Object.fromEntries(Object.entries(e).filter((e=>{let[t,l]=e;return null!==l})))),k){case"Desktop":return b({margin:e});case"Tablet":return b({marginTablet:(0,x.cg)(e,u.margin)});case"Mobile":return b({marginMobile:(0,x.cg)(e,{...u.margin,...u.marginTablet})});default:return}}})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Background & Content","otter-blocks"),initialOpen:!1},(0,i.createElement)(wa.Ed,{label:(0,o.__)("Text","otter-blocks"),colorValue:u.color,onColorChange:e=>b({color:e}),className:"is-list is-first"}),(0,i.createElement)(wa.Ed,{label:(0,o.__)("Link","otter-blocks"),colorValue:u.linkColor,onColorChange:e=>b({linkColor:e}),className:"is-list"}),(0,i.createElement)(wa.jj,{label:(0,o.__)("Background","otter-blocks"),indicator:R(u.backgroundType,u.backgroundColor,null===(r=u.backgroundImage)||void 0===r?void 0:r.url,u.backgroundGradient)},(0,i.createElement)(wa.Zo,{backgroundType:u.backgroundType,backgroundColor:u.backgroundColor,image:u.backgroundImage,gradient:u.backgroundGradient,focalPoint:u.backgroundPosition,backgroundAttachment:u.backgroundAttachment,backgroundRepeat:u.backgroundRepeat,backgroundSize:u.backgroundSize,changeBackgroundType:e=>b({backgroundType:e}),changeImage:e=>{b({backgroundImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>b({backgroundImage:void 0}),changeColor:e=>b({backgroundColor:e}),changeGradient:e=>b({backgroundGradient:e}),changeBackgroundAttachment:e=>b({backgroundAttachment:e}),changeBackgroundRepeat:e=>b({backgroundRepeat:e}),changeFocalPoint:e=>b({backgroundPosition:e}),changeBackgroundSize:e=>b({backgroundSize:e})})),(0,i.createElement)(wa.jj,{label:(0,o.__)("Background Overlay","otter-blocks"),indicator:R(u.backgroundOverlayType,u.backgroundOverlayColor,null===(d=u.backgroundOverlayImage)||void 0===d?void 0:d.url,u.backgroundOverlayGradient)},(0,i.createElement)(wa.RF,{backgroundType:u.backgroundOverlayType,backgroundColor:u.backgroundOverlayColor,image:u.backgroundOverlayImage,gradient:u.backgroundOverlayGradient,focalPoint:u.backgroundOverlayPosition,backgroundAttachment:u.backgroundOverlayAttachment,backgroundRepeat:u.backgroundOverlayRepeat,backgroundSize:u.backgroundOverlaySize,backgroundOpacity:u.backgroundOverlayOpacity,backgroundFilterBlur:u.backgroundOverlayFilterBlur,backgroundFilterBrightness:u.backgroundOverlayFilterBrightness,backgroundFilterContrast:u.backgroundOverlayFilterContrast,backgroundFilterGrayscale:u.backgroundOverlayFilterGrayscale,backgroundFilterHue:u.backgroundOverlayFilterHue,backgroundFilterSaturate:u.backgroundOverlayFilterSaturate,backgroundBlend:u.backgroundOverlayBlend,changeBackgroundType:e=>b({backgroundOverlayType:e}),changeImage:e=>{b({backgroundOverlayImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>b({backgroundOverlayImage:void 0}),changeColor:e=>b({backgroundOverlayColor:e}),changeGradient:e=>b({backgroundOverlayGradient:e}),changeBackgroundAttachment:e=>b({backgroundOverlayAttachment:e}),changeBackgroundRepeat:e=>b({backgroundOverlayRepeat:e}),changeFocalPoint:e=>b({backgroundOverlayPosition:e}),changeBackgroundSize:e=>b({backgroundOverlaySize:e}),changeOpacity:e=>b({backgroundOverlayOpacity:e}),changeFilterBlur:e=>b({backgroundOverlayFilterBlur:e}),changeFilterBrightness:e=>b({backgroundOverlayFilterBrightness:e}),changeFilterContrast:e=>b({backgroundOverlayFilterContrast:e}),changeFilterGrayscale:e=>b({backgroundOverlayFilterGrayscale:e}),changeFilterHue:e=>b({backgroundOverlayFilterHue:e}),changeFilterSaturate:e=>b({backgroundOverlayFilterSaturate:e}),changeBlend:e=>b({backgroundOverlayBlend:e})})),(0,i.createElement)(wa.Ed,{label:(0,o.__)("Text Hover","otter-blocks"),colorValue:u.colorHover,onColorChange:e=>b({colorHover:e}),className:"is-list"})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),className:"o-section-border-container",initialOpen:!1},(0,i.createElement)(wa.Ed,{label:(0,o.__)("Border Color","otter-blocks"),colorValue:u.borderColor,onColorChange:e=>b({borderColor:e})}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Width","otter-blocks"),values:u.border,inputProps:{min:0,max:500},units:[{value:"px",label:"px"}],onChange:e=>{(0,x.CJ)(e)&&(e=void 0),b({border:e})}}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Radius","otter-blocks"),values:u.borderRadius,inputProps:{min:0,max:500},units:[{value:"px",label:"px"},{value:"%",label:"%"}],id:"o-border-raduis-box",onChange:e=>{(0,x.CJ)(e)&&(e=void 0),b({borderRadius:e})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Box Shadow","otter-blocks"),checked:u.boxShadow,onChange:()=>b({boxShadow:!u.boxShadow})}),u.boxShadow&&(0,i.createElement)(wa.Fi,{label:(0,o.__)("Border Shadow","otter-blocks")},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:u.boxShadowColor,onColorChange:e=>b({boxShadowColor:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:u.boxShadowColorOpacity,onChange:e=>b({boxShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:u.boxShadowBlur,onChange:e=>b({boxShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:u.boxShadowSpread,onChange:e=>b({boxShadowSpread:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:u.boxShadowHorizontal,onChange:e=>b({boxShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:u.boxShadowVertical,onChange:e=>b({boxShadowVertical:e}),min:-100,max:100}))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Shape Divider","otter-blocks"),initialOpen:!1,className:"wp-block-themeisle-shape-divider"},(0,i.createElement)(wa.Lp,{label:(0,o.__)("Sides","otter-blocks"),options:[{label:(0,o.__)("Top","otter-blocks"),value:"top"},{label:(0,o.__)("Bottom","otter-blocks"),value:"bottom"}],value:g,onChange:h}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("Type","otter-blocks"),value:z,options:[{label:(0,o.__)("None","otter-blocks"),value:"none"},{label:(0,o.__)("Triangle","otter-blocks"),value:"bigTriangle"},{label:(0,o.__)("Right Curve","otter-blocks"),value:"rightCurve"},{label:(0,o.__)("Curve","otter-blocks"),value:"curve"},{label:(0,o.__)("Slant","otter-blocks"),value:"slant"},{label:(0,o.__)("Cloud","otter-blocks"),value:"cloud"}],onChange:e=>{"top"==g?b({dividerTopType:e}):"bottom"==g&&b({dividerBottomType:e})}}),"none"!==z&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(wa.Ed,{label:(0,o.__)("Color","otter-blocks"),colorValue:"top"==g?u.dividerTopColor:"bottom"==g?u.dividerBottomColor:void 0,onColorChange:e=>{"top"==g?b({dividerTopColor:e}):"bottom"==g&&b({dividerBottomColor:e})}}),(0,i.createElement)(wa.n9,{label:(0,o.__)("Width","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:(()=>{var e,t,l,o,a,n,r,i,s,c,d,b;if("top"==g)switch(k){case"Desktop":return null!==(e=u.dividerTopWidth)&&void 0!==e?e:100;case"Tablet":return null!==(t=null!==(l=u.dividerTopWidthTablet)&&void 0!==l?l:u.dividerTopWidth)&&void 0!==t?t:100;case"Mobile":return null!==(o=null!==(a=null!==(n=u.dividerTopWidthMobile)&&void 0!==n?n:u.dividerTopWidthTablet)&&void 0!==a?a:u.dividerTopWidth)&&void 0!==o?o:100}else if("bottom"==g)switch(k){case"Desktop":return null!==(r=u.dividerBottomWidth)&&void 0!==r?r:100;case"Tablet":return null!==(i=null!==(s=u.dividerBottomWidthTablet)&&void 0!==s?s:u.dividerBottomWidth)&&void 0!==i?i:100;case"Mobile":return null!==(c=null!==(d=null!==(b=u.dividerBottomWidthMobile)&&void 0!==b?b:u.dividerBottomWidthTablet)&&void 0!==d?d:u.dividerBottomWidth)&&void 0!==c?c:100}})(),onChange:e=>{if("top"==g)switch(k){case"Desktop":b({dividerTopWidth:e});break;case"Tablet":b({dividerTopWidthTablet:e});break;case"Mobile":b({dividerTopWidthMobile:e})}else if("bottom"==g)switch(k){case"Desktop":b({dividerBottomWidth:e});break;case"Tablet":b({dividerBottomWidthTablet:e});break;case"Mobile":b({dividerBottomWidthMobile:e})}},step:.1,min:0,max:500})),(0,i.createElement)(wa.n9,{label:(0,o.__)("Height","otter-blocks")},(0,i.createElement)(c.RangeControl,{value:(()=>{if("top"==g)switch(k){case"Desktop":return u.dividerTopHeight;case"Tablet":return u.dividerTopHeightTablet;case"Mobile":return u.dividerTopHeightMobile}else if("bottom"==g)switch(k){case"Desktop":return u.dividerBottomHeight;case"Tablet":return u.dividerBottomHeightTablet;case"Mobile":return u.dividerBottomHeightMobile}})(),onChange:e=>{if("top"==g)switch(k){case"Desktop":b({dividerTopHeight:e});break;case"Tablet":b({dividerTopHeightTablet:e});break;case"Mobile":b({dividerTopHeightMobile:e})}else if("bottom"==g)switch(k){case"Desktop":b({dividerBottomHeight:e});break;case"Tablet":b({dividerBottomHeightTablet:e});break;case"Mobile":b({dividerBottomHeightMobile:e})}},step:.1,min:0,max:500})),"curve"!==z&&"cloud"!==z&&(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Invert Shape Divider","otter-blocks"),checked:(()=>{switch(g){case"top":return u.dividerTopInvert;case"bottom":return u.dividerBottomInvert;default:return}})(),onChange:()=>{switch(g){case"top":b({dividerTopInvert:!u.dividerTopInvert});break;case"bottom":b({dividerBottomInvert:!u.dividerBottomInvert})}}})))),(0,i.createElement)(wa.p,null)),(0,i.createElement)(wa.pO,{value:u.id,onChange:e=>b({id:e})}))},xa=e=>{let{type:t,front:l,style:o,fill:a,invert:n,width:r,height:s}=e;return"none"!==o&&(0,i.createElement)("div",{className:g()("wp-block-themeisle-blocks-advanced-columns-separators",t),style:!l&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===o&&!1===n&&(0,i.createElement)("svg",{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)("path",{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===o&&!0===n&&(0,i.createElement)("svg",{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===o&&!1===n&&(0,i.createElement)("svg",{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===o&&!0===n&&(0,i.createElement)("svg",{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===o&&(0,i.createElement)("svg",{id:"curve",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===o&&!1===n&&(0,i.createElement)("svg",{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)("path",{d:"M0 0 L100 100 L100 0 Z"})),"slant"===o&&!0===n&&(0,i.createElement)("svg",{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"bottom"===t})},(0,i.createElement)("path",{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===o&&(0,i.createElement)("svg",{id:"cloud",fill:a,viewBox:"0 0 100 100",width:"100%",height:s?`${s}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:g()({rotate:"top"===t})},(0,i.createElement)("path",{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})))};const{attributes:Sa}=pa,Ta=e=>(0,K.isNumber)(e)?(e=>e?`${e}px`:e)(e):e;var Ma=[{name:"themeisle-blocks/section-columns-1",description:(0,o.__)("Single column","otter-blocks"),icon:r.colsFull,title:(0,o.__)("Full","otter-blocks"),attributes:{columns:1,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"100"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal",description:(0,o.__)("2 equal columns","otter-blocks"),icon:r.cols2Equal,title:(0,o.__)("1:1","otter-blocks"),attributes:{columns:2,layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"50"}],["themeisle-blocks/advanced-column",{columnWidth:"50"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-1-2",description:(0,o.__)("1:2 columns","otter-blocks"),icon:r.cols12,title:(0,o.__)("1:2","otter-blocks"),attributes:{columns:2,layout:"oneTwo",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"33.34"}],["themeisle-blocks/advanced-column",{columnWidth:"66.66"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-2-1",description:(0,o.__)("2:1 columns","otter-blocks"),icon:r.cols21,title:(0,o.__)("2:1","otter-blocks"),attributes:{columns:2,layout:"twoOne",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"66.66"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal-3",description:(0,o.__)("3 equal columns","otter-blocks"),icon:r.cols3Equal,title:(0,o.__)("1:1:1","otter-blocks"),attributes:{columns:3,layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"33.33"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-1-1-2",description:(0,o.__)("1:1:2 columns","otter-blocks"),icon:r.cols112,title:(0,o.__)("1:1:2","otter-blocks"),attributes:{columns:3,layout:"oneOneTwo",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"50"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-2-1-1",description:(0,o.__)("2:1:1 columns","otter-blocks"),icon:r.cols211,title:(0,o.__)("2:1:1","otter-blocks"),attributes:{columns:3,layout:"twoOneOne",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"50"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal-4",description:(0,o.__)("4 equal columns","otter-blocks"),icon:r.cols4Equal,title:(0,o.__)("1:1:1:1","otter-blocks"),attributes:{columns:4,layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}]],scope:["block"]}];const{name:Ba}=pa;(0,a.registerBlockType)(Ba,{...pa,title:(0,o.__)("Section","otter-blocks"),description:(0,o.__)("Add a Section block that displays content in multiple columns, then add whatever content blocks you’d like. Powered by Otter.","otter-blocks"),icon:r.columnsIcon,keywords:["advanced columns","layout","section"],deprecated:ka,variations:Ma,edit:e=>{let{attributes:t,setAttributes:l,clientId:n,name:r}=e;(0,i.useEffect)((()=>{const e=(0,L.blockInit)(n,Sa);return()=>e(t.id)}),[t.id]);const{updateBlockAttributes:c,replaceInnerBlocks:d}=(0,v.useDispatch)("core/block-editor"),{sectionBlock:u,isViewportAvailable:b,isPreviewDesktop:m,isPreviewTablet:p,isPreviewMobile:h,children:y,variations:k,defaultVariation:f}=(0,v.useSelect)((e=>{var t;const{getBlock:l}=e("core/block-editor"),{getBlockVariations:o,getBlockType:a,getDefaultBlockVariation:i}=e("core/blocks"),{__experimentalGetPreviewDeviceType:s}=!!e("core/edit-post")&&e("core/edit-post");return{sectionBlock:l(n),children:(null===(t=l(n))||void 0===t?void 0:t.innerBlocks)||[],isViewportAvailable:!!s,isPreviewDesktop:!!s&&"Desktop"===s(),isPreviewTablet:!!s&&"Tablet"===s(),isPreviewMobile:!!s&&"Mobile"===s(),blockType:a(r),defaultVariation:i(r,"block"),variations:o(r,"block").filter((e=>{let{isDefault:t}=e;return!t}))}}),[]),{insertBlock:_,removeBlock:w}=(0,v.useDispatch)("core/block-editor"),C=(e,t)=>{u.innerBlocks.map(((l,o)=>{c(l.clientId,{columnWidth:fa[e][t][o]})}))};(0,i.useEffect)((()=>{t.columns!==y.length&&(6>=y.length?C(y.length,"equal"):6<y.length?C(6,"equal"):1>=y.length&&C(1,"equal"),l({columns:y.length}))}),[y]);const E=e=>(0,L.getDefaultValueByField)({name:r,field:e,defaultAttributes:Sa,attributes:t}),S=(0,be.useViewportMatch)("large",">="),T=(0,be.useViewportMatch)("large","<="),M=(0,be.useViewportMatch)("small",">="),B=(0,be.useViewportMatch)("small","<=");let z=S&&!T&&M&&!B,P=!S&&!T&&M&&!B,R=!(S||T||M||B);b&&!R&&(z=m,P=p,R=h);const[F,O]=(0,i.useState)("top"),N=e=>{var t,l;let{mobile:o,tablet:a,desktop:n}=e;return null!==(t=null!==(l=R&&o||P&&a||n)&&void 0!==l?l:n)&&void 0!==t?t:100},A=N({mobile:t.dividerTopWidthMobile,tablet:t.dividerTopWidthTablet,desktop:t.dividerTopWidth}),H=N({mobile:t.dividerBottomWidthMobile,tablet:t.dividerBottomWidthTablet,desktop:t.dividerBottomWidth}),I=N({mobile:t.dividerTopHeightMobile,tablet:t.dividerTopHeightTablet,desktop:t.dividerTopHeight}),V=N({mobile:t.dividerBottomHeightMobile,tablet:t.dividerBottomHeightTablet,desktop:t.dividerBottomHeight}),D=t.columnsHTMLTag;let G,$,W,j,U,q={paddingTop:E("padding")&&E("padding").top,paddingRight:E("padding")&&E("padding").right,paddingBottom:E("padding")&&E("padding").bottom,paddingLeft:E("padding")&&E("padding").left,marginTop:E("margin")&&E("margin").top,marginBottom:E("margin")&&E("margin").bottom,minHeight:"custom"===t.columnsHeight?Ta(t.columnsHeightCustom):t.columnsHeight};if(P||R){var Y,J,Q,X,ee,te;const e=(0,K.pickBy)({paddingTop:null===(Y=E("paddingTablet"))||void 0===Y?void 0:Y.top,paddingRight:null===(J=E("paddingTablet"))||void 0===J?void 0:J.right,paddingBottom:null===(Q=E("paddingTablet"))||void 0===Q?void 0:Q.bottom,paddingLeft:null===(X=E("paddingTablet"))||void 0===X?void 0:X.left,marginTop:null===(ee=E("marginTablet"))||void 0===ee?void 0:ee.top,marginBottom:null===(te=E("marginTablet"))||void 0===te?void 0:te.bottom,minHeight:"custom"===t.columnsHeight?Ta(t.columnsHeightCustomTablet):t.columnsHeight},(e=>e));q=(0,K.merge)(q,e)}if(R){var le,oe,ae,ne,re,ie;const e=(0,K.pickBy)({paddingTop:null===(le=E("paddingMobile"))||void 0===le?void 0:le.top,paddingRight:null===(oe=E("paddingMobile"))||void 0===oe?void 0:oe.right,paddingBottom:null===(ae=E("paddingMobile"))||void 0===ae?void 0:ae.bottom,paddingLeft:null===(ne=E("paddingMobile"))||void 0===ne?void 0:ne.left,marginTop:null===(re=E("marginMobile"))||void 0===re?void 0:re.top,marginBottom:null===(ie=E("marginMobile"))||void 0===ie?void 0:ie.bottom,minHeight:"custom"===t.columnsHeight?Ta(t.columnsHeightCustomMobile):t.columnsHeight},(e=>e));q=(0,K.merge)(q,e)}var se,ce,de;"color"===t.backgroundType&&(G={backgroundColor:t.backgroundColor}),"image"===t.backgroundType&&(G={backgroundImage:`url( '${null===(se=t.backgroundImage)||void 0===se?void 0:se.url}' )`,backgroundAttachment:t.backgroundAttachment,backgroundPosition:`${Math.round(100*(null===(ce=t.backgroundPosition)||void 0===ce?void 0:ce.x))}% ${Math.round(100*(null===(de=t.backgroundPosition)||void 0===de?void 0:de.y))}%`,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}),"gradient"===t.backgroundType&&(G={backgroundImage:t.backgroundGradient}),t.border&&!(0,K.isEmpty)(t.border)&&(W={borderTopWidth:t.border.top,borderRightWidth:t.border.right,borderBottomWidth:t.border.bottom,borderLeftWidth:t.border.left,borderStyle:"solid",borderColor:t.borderColor}),t.borderRadius&&!(0,K.isEmpty)(t.borderRadius)&&(j={borderTopLeftRadius:t.borderRadius.top,borderTopRightRadius:t.borderRadius.right,borderBottomRightRadius:t.borderRadius.bottom,borderBottomLeftRadius:t.borderRadius.left}),!0===t.boxShadow&&(U={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`});const ue={...q,...G,...W,...j,...U,"--link-color":t.linkColor};var me,pe,ge;"color"===t.backgroundOverlayType&&($={background:t.backgroundOverlayColor,opacity:t.backgroundOverlayOpacity/100}),"image"===t.backgroundOverlayType&&($={backgroundImage:`url( '${null===(me=t.backgroundOverlayImage)||void 0===me?void 0:me.url}' )`,backgroundAttachment:t.backgroundOverlayAttachment,backgroundPosition:`${Math.round(100*(null===(pe=t.backgroundOverlayPosition)||void 0===pe?void 0:pe.x))}% ${Math.round(100*(null===(ge=t.backgroundOverlayPosition)||void 0===ge?void 0:ge.y))}%`,backgroundRepeat:t.backgroundOverlayRepeat,backgroundSize:t.backgroundOverlaySize,opacity:t.backgroundOverlayOpacity/100}),"gradient"===t.backgroundOverlayType&&($={background:t.backgroundOverlayGradient,opacity:t.backgroundOverlayOpacity/100});const he={...$,...j,mixBlendMode:t.backgroundOverlayBlend,filter:`blur( ${t.backgroundOverlayFilterBlur/10}px ) brightness( ${t.backgroundOverlayFilterBrightness/10} ) contrast( ${t.backgroundOverlayFilterContrast/10} ) grayscale( ${t.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${t.backgroundOverlayFilterHue}deg ) saturate( ${t.backgroundOverlayFilterSaturate/10} )`};let ve={};t.columnsWidth&&(ve={maxWidth:Ta(E("columnsWidth"))}),(P||R)&&E("columnsWidthTablet")&&(ve.maxWidth=Ta(E("columnsWidthTablet"))),R&&E("columnsWidthMobile")&&(ve.maxWidth=Ta(E("columnsWidthMobile")));const ye=g()(`has-${t.columns}-columns`,`has-desktop-${t.layout}-layout`,`has-tablet-${t.layoutTablet}-layout`,`has-mobile-${t.layoutMobile}-layout`,`has-vertical-${t.verticalAlign}`,`has-horizontal-${t.horizontalAlign}`,{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},{"has-viewport-desktop":z},{"has-viewport-tablet":P},{"has-viewport-mobile":R}),ke=t.columns?(0,s.useBlockProps)({id:t.id,className:ye,style:ue}):(0,s.useBlockProps)();return t.columns?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("style",null,`#block-${n} `+(0,x.iC)([["color",t.color]]),`#block-${n}:hover `+(0,x.iC)([["color",t.colorHover]])),(0,i.createElement)(_a,{attributes:t,setAttributes:l}),(0,i.createElement)(Ea,{attributes:t,setAttributes:l,getValue:E,updateColumnsWidth:C,dividerViewType:F,setDividerViewType:O,changeColumnsNumbers:e=>{t.columns<e?(0,K.times)(e-t.columns,(()=>{const e=(0,a.createBlock)("themeisle-blocks/advanced-column");e&&_(e,(null==y?void 0:y.length)||0,n,!1)})):t.columns>e&&y.slice(e).forEach((e=>w(e.clientId,!1)))}}),(0,i.createElement)(D,ke,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay",style:he}),(0,i.createElement)(xa,{type:"top",style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert,width:A,height:I}),(0,i.createElement)("div",{className:"innerblocks-wrap",style:ve},(0,i.createElement)(s.InnerBlocks,{allowedBlocks:["themeisle-blocks/advanced-column"],orientation:"horizontal"})),(0,i.createElement)(xa,{type:"bottom",style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert,width:H,height:V}))):(0,i.createElement)("div",ke,(0,i.createElement)(s.__experimentalBlockVariationPicker,{label:(0,o.__)("Section","otter-blocks"),instructions:(0,o.__)("Select a layout to start with, or make one yourself.","otter-blocks"),variations:k,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;e&&(d(n,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0),l(e.attributes))},allowSkip:!0}))},save:e=>{let{attributes:t}=e;const l=t.columnsHTMLTag,o=t.hide?"":`has-desktop-${t.layout}-layout`,a=t.hideTablet?"":`has-tablet-${t.layoutTablet}-layout`,n=t.hideMobile?"":`has-mobile-${t.layoutMobile}-layout`,r=g()(`has-${t.columns}-columns`,o,a,n,{"hide-in-desktop":t.hide},{"hide-in-tablet":t.hideTablet},{"hide-in-mobile":t.hideMobile},{"has-reverse-columns-tablet":t.reverseColumnsTablet&&!t.hideTablet&&"collapsedRows"===t.layoutTablet},{"has-reverse-columns-mobile":t.reverseColumnsMobile&&!t.hideMobile&&"collapsedRows"===t.layoutMobile},`has-vertical-${t.verticalAlign}`),c=s.useBlockProps.save({id:t.id,className:r});return(0,i.createElement)(l,c,(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,i.createElement)(xa,{type:"top",front:!0,style:t.dividerTopType,fill:t.dividerTopColor,invert:t.dividerTopInvert}),(0,i.createElement)("div",{className:"innerblocks-wrap"},(0,i.createElement)(s.InnerBlocks.Content,null)),(0,i.createElement)(xa,{type:"bottom",front:!0,style:t.dividerBottomType,fill:t.dividerBottomColor,invert:t.dividerBottomInvert}))},example:{viewportWidth:1e3,attributes:{},innerBlocks:[{name:"themeisle-blocks/advanced-column",attributes:{margin:{right:"10px"}},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,o.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,o.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"themeisle-blocks/advanced-column",attributes:{margin:{left:"10px"}},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,o.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,o.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]}});var za=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/advanced-column","title":"Section Column","category":"themeisle-blocks","description":"A single column within a Section block. Powered by Otter.","parent":["themeisle-blocks/advanced-columns"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"padding":{"type":"object"},"paddingTablet":{"type":"object"},"paddingMobile":{"type":"object"},"margin":{"type":"object"},"marginTablet":{"type":"object"},"marginMobile":{"type":"object"},"color":{"type":"string"},"colorHover":{"type":"string"},"linkColor":{"type":"string"},"backgroundType":{"type":"string","default":"color"},"backgroundColor":{"type":"string"},"backgroundImage":{"type":"object"},"backgroundAttachment":{"type":"string","default":"scroll"},"backgroundPosition":{"type":"object"},"backgroundRepeat":{"type":"string","default":"repeat"},"backgroundSize":{"type":"string","default":"auto"},"backgroundGradient":{"type":"string","default":"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},"backgroundOverlayOpacity":{"type":"number","default":50},"backgroundOverlayType":{"type":"string","default":"color"},"backgroundOverlayColor":{"type":"string"},"backgroundOverlayImage":{"type":"object"},"backgroundOverlayAttachment":{"type":"string","default":"scroll"},"backgroundOverlayPosition":{"type":"object"},"backgroundOverlayRepeat":{"type":"string","default":"repeat"},"backgroundOverlaySize":{"type":"string","default":"auto"},"backgroundOverlayGradient":{"type":"string","default":"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},"backgroundOverlayFilterBlur":{"type":"number","default":0},"backgroundOverlayFilterBrightness":{"type":"number","default":10},"backgroundOverlayFilterContrast":{"type":"number","default":10},"backgroundOverlayFilterGrayscale":{"type":"number","default":0},"backgroundOverlayFilterHue":{"type":"number","default":0},"backgroundOverlayFilterSaturate":{"type":"number","default":10},"backgroundOverlayBlend":{"type":"string","default":"normal"},"backgroundColorHover":{"type":"string"},"border":{"type":"object"},"borderColor":{"type":"string"},"borderRadius":{"type":"object"},"boxShadow":{"type":"boolean","default":false},"boxShadowColor":{"type":"string","default":"#000000"},"boxShadowColorOpacity":{"type":"number","default":50},"boxShadowBlur":{"type":"number","default":5},"boxShadowSpread":{"type":"number","default":0},"boxShadowHorizontal":{"type":"number","default":0},"boxShadowVertical":{"type":"number","default":0},"columnsHTMLTag":{"type":"string","default":"div"},"columnWidth":{"type":"string"},"verticalAlign":{"type":"string"},"isSynced":{"type":"array"}},"supports":{"inserter":false,"html":false},"editorStyle":"otter-advanced-columns-editor","style":"otter-advanced-columns-style"}');const Pa={id:{type:"string"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number",default:20},paddingMobile:{type:"number",default:20},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number",default:20},paddingTopMobile:{type:"number",default:20},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number",default:20},paddingRightMobile:{type:"number",default:20},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number",default:20},paddingBottomMobile:{type:"number",default:20},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number",default:20},paddingLeftMobile:{type:"number",default:20},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number",default:20},marginMobile:{type:"number",default:20},marginTop:{type:"number",default:20},marginTopTablet:{type:"number",default:20},marginTopMobile:{type:"number",default:20},marginRight:{type:"number",default:0},marginRightTablet:{type:"number",default:0},marginRightMobile:{type:"number",default:0},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number",default:20},marginBottomMobile:{type:"number",default:20},marginLeft:{type:"number",default:0},marginLeftTablet:{type:"number",default:0},marginLeftMobile:{type:"number",default:0},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundGradientFirstLocation:{type:"number",default:0},backgroundGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundGradientSecondLocation:{type:"number",default:100},backgroundGradientType:{type:"string",default:"linear"},backgroundGradientAngle:{type:"number",default:90},backgroundGradientPosition:{type:"string",default:"center center"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},columnsHTMLTag:{type:"string",default:"div"},columnWidth:{type:"string"}},La=[{attributes:Pa,supports:{inserter:!1,reusable:!1,html:!1},save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;let a,n,r,c;if("color"===t.backgroundType&&(a={background:t.backgroundColor}),"image"===t.backgroundType&&(a={backgroundImage:`url( '${t.backgroundImageURL}' )`,backgroundAttachment:t.backgroundAttachment,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}),"gradient"===t.backgroundType){let e;e="linear"===t.backgroundGradientType?`${t.backgroundGradientAngle}deg`:`at ${t.backgroundGradientPosition}`,a={background:`${t.backgroundGradientType}-gradient( ${e}, ${t.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientFirstLocation}%, ${t.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${t.backgroundGradientSecondLocation}% )`}}"linked"===t.borderType&&(n={borderWidth:`${t.border}px`,borderStyle:"solid",borderColor:t.borderColor}),"unlinked"===t.borderType&&(n={borderTopWidth:`${t.borderTop}px`,borderRightWidth:`${t.borderRight}px`,borderBottomWidth:`${t.borderBottom}px`,borderLeftWidth:`${t.borderLeft}px`,borderStyle:"solid",borderColor:t.borderColor}),"linked"===t.borderRadiusType&&(r={borderRadius:`${t.borderRadius}px`}),"unlinked"===t.borderRadiusType&&(r={borderTopLeftRadius:`${t.borderRadiusTop}px`,borderTopRightRadius:`${t.borderRadiusRight}px`,borderBottomRightRadius:`${t.borderRadiusBottom}px`,borderBottomLeftRadius:`${t.borderRadiusLeft}px`}),!0===t.boxShadow&&(c={boxShadow:`${t.boxShadowHorizontal}px ${t.boxShadowVertical}px ${t.boxShadowBlur}px ${t.boxShadowSpread}px ${Z()(t.boxShadowColor?t.boxShadowColor:"#000000",t.boxShadowColorOpacity)}`});const d={...a,...n,...r,...c};return(0,i.createElement)(o,{className:l,id:t.id,style:d},(0,i.createElement)(s.InnerBlocks.Content,null))}},{attributes:{...Pa,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginRightTablet:{type:"number"},marginRightMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},marginLeftTablet:{type:"number"},marginLeftMobile:{type:"number"}},supports:{inserter:!1,reusable:!1,html:!1},migrate:e=>{let t="";if("gradient"===e.backgroundType){let l="";"linear"===e.backgroundGradientType&&(l=`${e.backgroundGradientAngle}deg, `),t=`${e.backgroundGradientType}-gradient(${l}${Z()(e.backgroundGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${Z()(e.backgroundGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}%)`}return{...{...(0,K.omit)(e,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition"]),backgroundGradient:t}}},isEligible:e=>"gradient"===e.backgroundType&&void 0!==e.backgroundGradientFirstColor,save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;return(0,i.createElement)(o,{className:l,id:t.id},(0,i.createElement)(s.InnerBlocks.Content,null))}},{attributes:{...(0,K.omit)(Pa,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition"]),paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginRightTablet:{type:"number"},marginRightMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},marginLeftTablet:{type:"number"},marginLeftMobile:{type:"number"},backgroundGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"}},supports:{inserter:!1,reusable:!1,html:!1},migrate:e=>{const t={},l={},o={},a={},n={},r={},i={},s={};let c={},d={};"unlinked"===e.paddingType?(t.top=(0,K.isUndefined)(e.paddingTop)?"20px":e.paddingTop+"px",t.bottom=(0,K.isUndefined)(e.paddingBottom)?"20px":e.paddingBottom+"px",t.left=(0,K.isUndefined)(e.paddingLeft)?"20px":e.paddingLeft+"px",t.right=(0,K.isUndefined)(e.paddingRight)?"20px":e.paddingRight+"px"):(t.top=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.bottom=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.left=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px",t.right=(0,K.isUndefined)(e.padding)?"20px":e.padding+"px"),"unlinked"===e.paddingTypeTablet?(l.top=(0,K.isUndefined)(e.paddingTopTablet)?null:e.paddingTopTablet+"px",l.bottom=(0,K.isUndefined)(e.paddingBottomTablet)?null:e.paddingBottomTablet+"px",l.left=(0,K.isUndefined)(e.paddingLeftTablet)?null:e.paddingLeftTablet+"px",l.right=(0,K.isUndefined)(e.paddingRightTablet)?null:e.paddingRightTablet+"px"):(l.top=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.bottom=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.left=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px",l.right=(0,K.isUndefined)(e.paddingTablet)?null:e.paddingTablet+"px"),"unlinked"===e.paddingTypeMobile?(o.top=(0,K.isUndefined)(e.paddingMobileTop)?null:e.paddingMobileTop+"px",o.bottom=(0,K.isUndefined)(e.paddingMobileBottom)?null:e.paddingMobileBottom+"px",o.left=(0,K.isUndefined)(e.paddingMobileLeft)?null:e.paddingMobileLeft+"px",o.right=(0,K.isUndefined)(e.paddingMobileRight)?null:e.paddingMobileRight+"px"):(o.top=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.bottom=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.left=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px",o.right=(0,K.isUndefined)(e.paddingMobile)?null:e.paddingMobile+"px"),"linked"===e.marginType?(a.top=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px",a.bottom=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px",a.left=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px",a.right=(0,K.isUndefined)(e.margin)?"20px":e.margin+"px"):(a.top=(0,K.isUndefined)(e.marginTop)?"20px":e.marginTop+"px",a.bottom=(0,K.isUndefined)(e.marginBottom)?"20px":e.marginBottom+"px",a.left=(0,K.isUndefined)(e.marginLeft)?"20px":e.marginLeft+"px",a.right=(0,K.isUndefined)(e.marginRight)?"20px":e.marginRight+"px"),"linked"===e.marginTypeTablet?(n.top=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px",n.bottom=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px",n.left=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px",n.right=(0,K.isUndefined)(e.marginTablet)?null:e.marginTablet+"px"):(n.top=(0,K.isUndefined)(e.marginTopTablet)?null:e.marginTopTablet+"px",n.bottom=(0,K.isUndefined)(e.marginBottomTablet)?null:e.marginBottomTablet+"px",n.left=(0,K.isUndefined)(e.marginLeftTablet)?null:e.marginLeftTablet+"px",n.right=(0,K.isUndefined)(e.marginRightTablet)?null:e.marginRightTablet+"px"),"linked"===e.marginTypeMobile?(r.top=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px",r.bottom=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px",r.left=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px",r.right=(0,K.isUndefined)(e.marginMobile)?null:e.marginMobile+"px"):(r.top=(0,K.isUndefined)(e.marginTopMobile)?null:e.marginTopMobile+"px",r.bottom=(0,K.isUndefined)(e.marginBottomMobile)?null:e.marginBottomMobile+"px",r.left=(0,K.isUndefined)(e.marginLeftMobile)?null:e.marginLeftMobile+"px",r.right=(0,K.isUndefined)(e.marginRightMobile)?null:e.marginRightMobile+"px"),"unlinked"===e.borderType?(i.top=(0,K.isUndefined)(e.borderTop)?null:e.borderTop+"px",i.bottom=(0,K.isUndefined)(e.borderBottom)?null:e.borderBottom+"px",i.left=(0,K.isUndefined)(e.borderLeft)?null:e.borderLeft+"px",i.right=(0,K.isUndefined)(e.borderRight)?null:e.borderRight+"px"):(i.top=(0,K.isUndefined)(e.border)?null:e.border+"px",i.bottom=(0,K.isUndefined)(e.border)?null:e.border+"px",i.left=(0,K.isUndefined)(e.border)?null:e.border+"px",i.right=(0,K.isUndefined)(e.border)?null:e.border+"px"),"unlinked"===e.borderRadiusType?(s.top=(0,K.isUndefined)(e.borderRadiusTop)?null:e.borderRadiusTop+"px",s.bottom=(0,K.isUndefined)(e.borderRadiusBottom)?null:e.borderRadiusBottom+"px",s.left=(0,K.isUndefined)(e.borderRadiusLeft)?null:e.borderRadiusLeft+"px",s.right=(0,K.isUndefined)(e.borderRadiusRight)?null:e.borderRadiusRight+"px"):(s.top=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.bottom=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.left=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px",s.right=(0,K.isUndefined)(e.borderRadius)?null:e.borderRadius+"px"),void 0!==e.backgroundImageURL&&void 0!==e.backgroundImageID&&(c={id:e.backgroundImageID,url:e.backgroundImageURL});return void 0!==e.backgroundPosition&&(d={"top left":{x:"0.00",y:"0.00"},"top center":{x:"0.50",y:"0.00"},"top right":{x:"1.00",y:"0.00"},"center left":{x:"0.00",y:"0.50"},"center center":{x:"0.50",y:"0.50"},"center right":{x:"1.00",y:"0.50"},"bottom left":{x:"0.00",y:"1.00"},"bottom center":{x:"0.50",y:"1.00"},"bottom right":{x:"1.00",y:"1.00"}}[e.backgroundPosition]),{...{...(0,K.omit)(e,["paddingType","paddingTypeTablet","paddingTypeMobile","paddingTop","paddingTopTablet","paddingTopMobile","paddingRight","paddingRightTablet","paddingRightMobile","paddingBottom","paddingBottomTablet","paddingBottomMobile","paddingLeft","paddingLeftTablet","paddingLeftMobile","marginType","marginTypeTablet","marginTypeMobile","marginTop","marginTopTablet","marginTopMobile","marginRight","marginRightTablet","marginRightMobile","marginBottom","marginBottomTablet","marginBottomMobile","marginLeft","marginLeftTablet","marginLeftMobile","borderType","borderTop","borderRight","borderBottom","borderLeft","borderRadiusType","borderRadiusTop","borderRadiusRight","borderRadiusBottom","borderRadiusLeft"]),...!(0,x.FH)(t)&&{padding:t},...!(0,x.FH)(l)&&{paddingTablet:l},...!(0,x.FH)(o)&&{paddingMobile:o},...!(0,x.FH)(a)&&{margin:a},...!(0,x.FH)(n)&&{marginTablet:n},...!(0,x.FH)(r)&&{marginMobile:r},...!(0,x.FH)(i)&&{border:i},...!(0,x.FH)(s)&&{borderRadius:s},...!(0,x.FH)(c)&&{backgroundImage:c},...!(0,x.FH)(d)&&{backgroundPosition:d}}}},isEligible:e=>["padding","paddingTablet","paddingMobile","paddingTop","paddingTopTablet","paddingTopMobile","paddingRight","paddingRightTablet","paddingRightMobile","paddingBottom","paddingBottomTablet","paddingBottomMobile","paddingLeft","paddingLeftTablet","paddingLeftMobile","margin","marginTablet","marginMobile","marginTop","marginTopTablet","marginTopMobile","marginRight","marginRightTablet","marginRightMobile","marginBottom","marginBottomTablet","marginBottomMobile","marginLeft","marginLeftTablet","marginLeftMobile","borderType","border","borderTop","borderRight","borderBottom","borderLeft","borderRadiusType","borderRadius","borderRadiusTop","borderRadiusRight","borderRadiusBottom","borderRadiusLeft"].some((t=>!(0,K.isUndefined)(e[t])&&"number"==typeof e[t]))||void 0!==e.backgroundImageURL&&void 0!==e.backgroundImageID||void 0!==e.backgroundPosition&&"object"!=typeof e.backgroundPosition,save:e=>{let{attributes:t,className:l}=e;const o=t.columnsHTMLTag;return(0,i.createElement)(o,{className:l,id:t.id},(0,i.createElement)(s.InnerBlocks.Content,null))}}];var Ra=La,Fa=e=>{let{attributes:t,setAttributes:l}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(s.BlockVerticalAlignmentToolbar,{onChange:e=>t.verticalAlign===e?l({verticalAlign:void 0}):l({verticalAlign:e}),value:t.verticalAlign}))},Oa=e=>{var t,l,a,n;let{attributes:r,setAttributes:d,getValue:u,parentBlock:b,updateBlockAttributes:m,currentBlockWidth:p,nextBlock:g,nextBlockWidth:h}=e;const y=(0,v.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]),[k,f]=(0,i.useState)("layout"),_=()=>{switch(y){case"Desktop":return"padding";case"Tablet":return"paddingTablet";case"Mobile":return"paddingMobile";default:return}},w=()=>{switch(y){case"Desktop":return"margin";case"Tablet":return"marginTablet";case"Mobile":return"marginMobile";default:return}},C=(e,t,l,o)=>"color"===e&&t?t:"image"===e&&l?`url( ${l} )`:"gradient"===e&&o?o:void 0;return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(wa.Hn,{value:k,options:[{label:(0,o.__)("Layout","otter-blocks"),value:"layout"},{label:(0,o.__)("Style","otter-blocks"),value:"style"}],onChange:f}),"layout"===k&&(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Column Structure","otter-blocks")},1<b.innerBlocks.length&&(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Column Width","otter-blocks"),value:Number(r.columnWidth),onChange:e=>{const t=e||10,l=Number(p.current)-t+Number(h.current);p.current=t,h.current=l,d({columnWidth:t.toFixed(2)}),m(g.current,{columnWidth:l.toFixed(2)})},step:.1,min:10,max:Number(r.columnWidth)+Number(h.current)-10}),(0,i.createElement)(c.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:r.columnsHTMLTag,options:[{label:(0,o.__)("Default (div)","otter-blocks"),value:"div"},{label:"section",value:"section"},{label:"header",value:"header"},{label:"footer",value:"footer"},{label:"article",value:"article"},{label:"main",value:"main"}],onChange:e=>d({columnsHTMLTag:e})}))||"style"===k&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Dimensions","otter-blocks")},(0,i.createElement)(wa.r4,{isSynced:r.isSynced,options:[{label:(0,o.__)("Padding","otter-blocks"),value:_()},{label:(0,o.__)("Margin","otter-blocks"),value:w()}],setAttributes:d}),(0,i.createElement)(wa.n9,{label:(0,o.__)("Screen Type","otter-blocks")},(0,i.createElement)(c.Disabled,{isDisabled:(null===(t=r.isSynced)||void 0===t?void 0:t.includes(_()))||!1,className:"o-disabled"},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Padding","otter-blocks"),values:(()=>{switch(y){case"Desktop":return u("padding");case"Tablet":return(0,K.merge)({...u("padding")},u("paddingTablet"));case"Mobile":return(0,K.merge)({...u("padding")},u("paddingTablet"),u("paddingMobile"));default:return}})(),inputProps:{min:0,max:500},onChange:e=>{switch((0,x.CJ)(e)&&(e=void 0),y){case"Desktop":return d({padding:e});case"Tablet":return d({paddingTablet:(0,x.cg)(e,r.padding)});case"Mobile":return d({paddingMobile:(0,x.cg)(e,{...r.padding,...r.paddingTablet})});default:return}}})),(0,i.createElement)(c.Disabled,{isDisabled:(null===(l=r.isSynced)||void 0===l?void 0:l.includes(w()))||!1,className:"o-disabled"},(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Margin","otter-blocks"),values:(()=>{switch(y){case"Desktop":return u("margin");case"Tablet":return(0,K.merge)({...u("margin")},u("marginTablet"));case"Mobile":return(0,K.merge)({...u("margin")},u("marginTablet"),u("marginMobile"));default:return}})(),inputProps:{min:-500,max:500},onChange:e=>{switch((0,x.CJ)(e)&&(e=void 0),y){case"Desktop":return d({margin:e});case"Tablet":return d({marginTablet:(0,x.cg)(e,r.margin)});case"Mobile":return d({marginMobile:(0,x.cg)(e,{...r.margin,...r.marginTablet})});default:return}}})))),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Background & Content","otter-blocks"),initialOpen:!1},(0,i.createElement)(wa.Ed,{label:(0,o.__)("Text","otter-blocks"),colorValue:r.color,onColorChange:e=>d({color:e}),className:"is-list is-first"}),(0,i.createElement)(wa.Ed,{label:(0,o.__)("Link","otter-blocks"),colorValue:r.linkColor,onColorChange:e=>d({linkColor:e}),className:"is-list"}),(0,i.createElement)(wa.jj,{label:(0,o.__)("Background","otter-blocks"),indicator:C(r.backgroundType,r.backgroundColor,null===(a=r.backgroundImage)||void 0===a?void 0:a.url,r.backgroundGradient)},(0,i.createElement)(wa.Zo,{backgroundType:r.backgroundType,backgroundColor:r.backgroundColor,image:r.backgroundImage,gradient:r.backgroundGradient,focalPoint:r.backgroundPosition,backgroundAttachment:r.backgroundAttachment,backgroundRepeat:r.backgroundRepeat,backgroundSize:r.backgroundSize,changeBackgroundType:e=>d({backgroundType:e}),changeImage:e=>{d({backgroundImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>d({backgroundImage:void 0}),changeColor:e=>d({backgroundColor:e}),changeGradient:e=>d({backgroundGradient:e}),changeBackgroundAttachment:e=>d({backgroundAttachment:e}),changeBackgroundRepeat:e=>d({backgroundRepeat:e}),changeFocalPoint:e=>d({backgroundPosition:e}),changeBackgroundSize:e=>d({backgroundSize:e})})),(0,i.createElement)(wa.jj,{label:(0,o.__)("Background Overlay","otter-blocks"),indicator:C(r.backgroundOverlayType,r.backgroundOverlayColor,null===(n=r.backgroundOverlayImage)||void 0===n?void 0:n.url,r.backgroundOverlayGradient)},(0,i.createElement)(wa.RF,{backgroundType:r.backgroundOverlayType,backgroundColor:r.backgroundOverlayColor,image:r.backgroundOverlayImage,gradient:r.backgroundOverlayGradient,focalPoint:r.backgroundOverlayPosition,backgroundAttachment:r.backgroundOverlayAttachment,backgroundRepeat:r.backgroundOverlayRepeat,backgroundSize:r.backgroundOverlaySize,backgroundOpacity:r.backgroundOverlayOpacity,backgroundFilterBlur:r.backgroundOverlayFilterBlur,backgroundFilterBrightness:r.backgroundOverlayFilterBrightness,backgroundFilterContrast:r.backgroundOverlayFilterContrast,backgroundFilterGrayscale:r.backgroundOverlayFilterGrayscale,backgroundFilterHue:r.backgroundOverlayFilterHue,backgroundFilterSaturate:r.backgroundOverlayFilterSaturate,backgroundBlend:r.backgroundOverlayBlend,changeBackgroundType:e=>d({backgroundOverlayType:e}),changeImage:e=>{d({backgroundOverlayImage:(0,K.pick)(e,["id","url"])})},removeImage:()=>d({backgroundOverlayImage:void 0}),changeColor:e=>d({backgroundOverlayColor:e}),changeGradient:e=>d({backgroundOverlayGradient:e}),changeBackgroundAttachment:e=>d({backgroundOverlayAttachment:e}),changeBackgroundRepeat:e=>d({backgroundOverlayRepeat:e}),changeFocalPoint:e=>d({backgroundOverlayPosition:e}),changeBackgroundSize:e=>d({backgroundOverlaySize:e}),changeOpacity:e=>d({backgroundOverlayOpacity:e}),changeFilterBlur:e=>d({backgroundOverlayFilterBlur:e}),changeFilterBrightness:e=>d({backgroundOverlayFilterBrightness:e}),changeFilterContrast:e=>d({backgroundOverlayFilterContrast:e}),changeFilterGrayscale:e=>d({backgroundOverlayFilterGrayscale:e}),changeFilterHue:e=>d({backgroundOverlayFilterHue:e}),changeFilterSaturate:e=>d({backgroundOverlayFilterSaturate:e}),changeBlend:e=>d({backgroundOverlayBlend:e})})),(0,i.createElement)(wa.Ed,{label:(0,o.__)("Text Hover","otter-blocks"),colorValue:r.colorHover,onColorChange:e=>d({colorHover:e}),className:"is-list"}),(0,i.createElement)(wa.Ed,{label:(0,o.__)("Background Hover","otter-blocks"),colorValue:r.backgroundColorHover,onColorChange:e=>d({backgroundColorHover:e}),className:"is-list"})),(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Border","otter-blocks"),className:"o-section-border-container",initialOpen:!1},(0,i.createElement)(wa.Ed,{label:(0,o.__)("Border Color","otter-blocks"),colorValue:r.borderColor,onColorChange:e=>d({borderColor:e})}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Width","otter-blocks"),values:r.border,inputProps:{min:0,max:500},units:[{value:"px",label:"px"}],onChange:e=>{(0,x.CJ)(e)&&(e=void 0),d({border:e})}}),(0,i.createElement)(c.__experimentalBoxControl,{label:(0,o.__)("Border Radius","otter-blocks"),values:r.borderRadius,inputProps:{min:0,max:500},units:[{value:"px",label:"px"},{value:"%",label:"%"}],onChange:e=>{(0,x.CJ)(e)&&(e=void 0),d({borderRadius:e})}}),(0,i.createElement)(c.ToggleControl,{label:(0,o.__)("Box Shadow","otter-blocks"),checked:r.boxShadow,onChange:()=>d({boxShadow:!r.boxShadow})}),r.boxShadow&&(0,i.createElement)(wa.Fi,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,i.createElement)(s.__experimentalColorGradientControl,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:r.boxShadowColor,onColorChange:e=>d({boxShadowColor:e})}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:r.boxShadowColorOpacity,onChange:e=>d({boxShadowColorOpacity:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:r.boxShadowBlur,onChange:e=>d({boxShadowBlur:e}),min:0,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:r.boxShadowSpread,onChange:e=>d({boxShadowSpread:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:r.boxShadowHorizontal,onChange:e=>d({boxShadowHorizontal:e}),min:-100,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:r.boxShadowVertical,onChange:e=>d({boxShadowVertical:e}),min:-100,max:100})))),(0,i.createElement)(wa.p,null))};const{attributes:Na}=za;const{name:Aa}=za;(0,a.registerBlockType)(Aa,{...za,title:(0,o.__)("Section Column","otter-blocks"),description:(0,o.__)("A single column within a Section block. Powered by Otter.","otter-blocks"),icon:r.columnIcon,deprecated:Ra,edit:e=>{var t,l,o,a,n,r,c,d,u;let{name:b,attributes:m,setAttributes:p,isSelected:g,clientId:h}=e;const{updateBlockAttributes:y}=(0,v.useDispatch)("core/block-editor"),{adjacentBlockClientId:k,adjacentBlock:f,parentBlock:_,hasInnerBlocks:w,isViewportAvailable:C,isPreviewDesktop:E,isPreviewTablet:S,isPreviewMobile:T}=(0,v.useSelect)((e=>{const{getAdjacentBlockClientId:t,getBlock:l,getBlockRootClientId:o}=e("core/block-editor"),{__experimentalGetPreviewDeviceType:a}=!!e("core/edit-post")&&e("core/edit-post"),n=l(h),r=t(h);return{adjacentBlockClientId:r,adjacentBlock:l(r),parentBlock:l(o(h)),hasInnerBlocks:!(!n||!n.innerBlocks.length),isViewportAvailable:!!a,isPreviewDesktop:!!a&&"Desktop"===a(),isPreviewTablet:!!a&&"Tablet"===a(),isPreviewMobile:!!a&&"Mobile"===a()}}),[]),M=(0,be.useViewportMatch)("large",">="),B=(0,be.useViewportMatch)("large","<="),z=(0,be.useViewportMatch)("small",">="),P=(0,be.useViewportMatch)("small","<=");(0,i.useEffect)((()=>{const e=(0,L.blockInit)(h,Na);return()=>e(m.id)}),[m.id]),(0,i.useEffect)((()=>{if(1<_.innerBlocks.length&&!k){const e=_.innerBlocks.findIndex((e=>e.clientId===h)),t=_.innerBlocks[e-1];F.current=t.clientId,O.current=t.attributes.columnWidth}}),[]),(0,i.useEffect)((()=>{if(1<_.innerBlocks.length)if(k)O.current=f.attributes.columnWidth,F.current=k,R.current=m.columnWidth;else{const e=_.innerBlocks.findIndex((e=>e.clientId===h)),t=_.innerBlocks[e-1];O.current=t.attributes.columnWidth,F.current=t.clientId,R.current=m.columnWidth}}),[g,m.columnWidth,_.innerBlocks.length]);const R=(0,i.useRef)(m.columnWidth),F=(0,i.useRef)(k&&k),O=(0,i.useRef)(f&&f.attributes.columnWidth),N=e=>(0,L.getDefaultValueByField)({name:b,field:e,defaultAttributes:Na,attributes:m});let A=M&&!B&&z&&!P,H=!M&&!B&&z&&!P,I=!(M||B||z||P);if(C&&!I&&(A=E,H=S,I=T),void 0===m.columnWidth){const e=_.innerBlocks.findIndex((e=>e.clientId===h)),{columns:t}=_.attributes,{layout:l}=_.attributes;y(h,{columnWidth:fa[t][l][e]})}const V=m.columnsHTMLTag;let D,G,$,W,j,U={paddingTop:null===(t=N("padding"))||void 0===t?void 0:t.top,paddingRight:null===(l=N("padding"))||void 0===l?void 0:l.right,paddingBottom:null===(o=N("padding"))||void 0===o?void 0:o.bottom,paddingLeft:null===(a=N("padding"))||void 0===a?void 0:a.left,marginTop:null===(n=N("margin"))||void 0===n?void 0:n.top,marginRight:null===(r=N("margin"))||void 0===r?void 0:r.right,marginBottom:null===(c=N("margin"))||void 0===c?void 0:c.bottom,marginLeft:null===(d=N("margin"))||void 0===d?void 0:d.left};if(H||I){var q,Y,J,Q,X,ee,te,le;const e=(0,K.pickBy)({paddingTop:null===(q=N("paddingTablet"))||void 0===q?void 0:q.top,paddingRight:null===(Y=N("paddingTablet"))||void 0===Y?void 0:Y.right,paddingBottom:null===(J=N("paddingTablet"))||void 0===J?void 0:J.bottom,paddingLeft:null===(Q=N("paddingTablet"))||void 0===Q?void 0:Q.left,marginTop:null===(X=N("marginTablet"))||void 0===X?void 0:X.top,marginRight:null===(ee=N("marginTablet"))||void 0===ee?void 0:ee.right,marginBottom:null===(te=N("marginTablet"))||void 0===te?void 0:te.bottom,marginLeft:null===(le=N("marginTablet"))||void 0===le?void 0:le.left},(e=>e));U=(0,K.merge)(U,e)}if(I){var oe,ae,ne,re,ie,se,ce,de;const e=(0,K.pickBy)({paddingTop:null===(oe=N("paddingMobile"))||void 0===oe?void 0:oe.top,paddingRight:null===(ae=N("paddingMobile"))||void 0===ae?void 0:ae.right,paddingBottom:null===(ne=N("paddingMobile"))||void 0===ne?void 0:ne.bottom,paddingLeft:null===(re=N("paddingMobile"))||void 0===re?void 0:re.left,marginTop:null===(ie=N("marginMobile"))||void 0===ie?void 0:ie.top,marginRight:null===(se=N("marginMobile"))||void 0===se?void 0:se.right,marginBottom:null===(ce=N("marginMobile"))||void 0===ce?void 0:ce.bottom,marginLeft:null===(de=N("marginMobile"))||void 0===de?void 0:de.left},(e=>e));U=(0,K.merge)(U,e)}var ue,me,pe;"color"===m.backgroundType&&(D={"--background":m.backgroundColor}),"image"===m.backgroundType&&(D={"--background":`url( '${null===(ue=m.backgroundImage)||void 0===ue?void 0:ue.url}' )`,backgroundAttachment:m.backgroundAttachment,backgroundPosition:`${Math.round(100*(null===(me=m.backgroundPosition)||void 0===me?void 0:me.x))}% ${Math.round(100*(null===(pe=m.backgroundPosition)||void 0===pe?void 0:pe.y))}%`,backgroundRepeat:m.backgroundRepeat,backgroundSize:m.backgroundSize}),"gradient"===m.backgroundType&&(D={"--background":m.backgroundGradient}),m.border&&!(0,K.isEmpty)(m.border)&&($={borderTopWidth:m.border.top,borderRightWidth:m.border.right,borderBottomWidth:m.border.bottom,borderLeftWidth:m.border.left,borderStyle:"solid",borderColor:m.borderColor}),m.borderRadius&&!(0,K.isEmpty)(m.borderRadius)&&(W={borderTopLeftRadius:m.borderRadius.top,borderTopRightRadius:m.borderRadius.right,borderBottomRightRadius:m.borderRadius.bottom,borderBottomLeftRadius:m.borderRadius.left}),!0===m.boxShadow&&(j={boxShadow:`${m.boxShadowHorizontal}px ${m.boxShadowVertical}px ${m.boxShadowBlur}px ${m.boxShadowSpread}px ${Z()(m.boxShadowColor?m.boxShadowColor:"#000000",m.boxShadowColorOpacity)}`});const ge={flexBasis:`${m.columnWidth}%`,...U,...D,...$,...W,...j,"--link-color":m.linkColor,"--background-color-hover":m.backgroundColorHover};var he,ve,ye;m.verticalAlign&&(ge.alignItems={top:"flex-start",center:"center",bottom:"flex-end"}[m.verticalAlign]),"color"===m.backgroundOverlayType&&(G={background:m.backgroundOverlayColor,opacity:m.backgroundOverlayOpacity/100}),"image"===m.backgroundOverlayType&&(G={backgroundImage:`url( '${null===(he=m.backgroundOverlayImage)||void 0===he?void 0:he.url}' )`,backgroundAttachment:m.backgroundOverlayAttachment,backgroundPosition:`${Math.round(100*(null===(ve=m.backgroundOverlayPosition)||void 0===ve?void 0:ve.x))}% ${Math.round(100*(null===(ye=m.backgroundOverlayPosition)||void 0===ye?void 0:ye.y))}%`,backgroundRepeat:m.backgroundOverlayRepeat,backgroundSize:m.backgroundOverlaySize,opacity:m.backgroundOverlayOpacity/100}),"gradient"===m.backgroundOverlayType&&(G={background:m.backgroundOverlayGradient,opacity:m.backgroundOverlayOpacity/100});const ke="color"===m.backgroundOverlayType&&m.backgroundOverlayColor||"image"===m.backgroundOverlayType&&(null===(u=m.backgroundOverlayImage)||void 0===u?void 0:u.url)||"gradient"===m.backgroundOverlayType&&m.backgroundOverlayGradient,fe={...G,...W,mixBlendMode:m.backgroundOverlayBlend,filter:`blur( ${m.backgroundOverlayFilterBlur/10}px ) brightness( ${m.backgroundOverlayFilterBrightness/10} ) contrast( ${m.backgroundOverlayFilterContrast/10} ) grayscale( ${m.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${m.backgroundOverlayFilterHue}deg ) saturate( ${m.backgroundOverlayFilterSaturate/10} )`},_e=(0,s.useBlockProps)({id:m.id,style:ge});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("style",null,`#block-${h} `+(0,x.iC)([["color",m.color]]),`#block-${h}:hover `+(0,x.iC)([["color",m.colorHover]])),(0,i.createElement)(Fa,{attributes:m,setAttributes:p}),(0,i.createElement)(Oa,{attributes:m,setAttributes:p,getValue:N,parentBlock:_,updateBlockAttributes:y,currentBlockWidth:R,nextBlock:F,nextBlockWidth:O}),(0,i.createElement)(V,_e,ke&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-column-overlay",style:fe}),(0,i.createElement)(s.InnerBlocks,{templateLock:!1,renderAppender:!w&&s.InnerBlocks.ButtonBlockAppender})))},save:e=>{var t;let{attributes:l}=e;const o=l.columnsHTMLTag,a="color"===l.backgroundOverlayType&&l.backgroundOverlayColor||"image"===l.backgroundOverlayType&&(null===(t=l.backgroundOverlayImage)||void 0===t?void 0:t.url)||"gradient"===l.backgroundOverlayType&&l.backgroundOverlayGradient,n=s.useBlockProps.save({id:l.id});return(0,i.createElement)(o,n,a&&(0,i.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-column-overlay"}),(0,i.createElement)(s.InnerBlocks.Content,null))}});var Ha=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"themeisle-blocks/sharing-icons","title":"Sharing Icons","category":"themeisle-blocks","description":"Share buttons for your website visitors to share content on any social sharing service. Powered by Otter.","keywords":["social media","sharing","icons"],"textdomain":"otter-blocks","attributes":{"id":{"type":"string"},"facebook":{"type":["object","boolean"],"default":{"active":true}},"twitter":{"type":["object","boolean"],"default":{"active":true}},"linkedin":{"type":["object","boolean"],"default":{"active":true}},"pinterest":{"type":["object","boolean"],"default":{"active":false}},"tumblr":{"type":["object","boolean"],"default":{"active":false}},"reddit":{"type":["object","boolean"],"default":{"active":false}},"gap":{"type":"number"},"borderRadius":{"type":"number"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"}},"styles":[{"name":"default","label":"Regular","isDefault":true},{"name":"icons","label":"Icons Only"}],"supports":{"align":["left","center","right"]},"editorStyle":"otter-sharing-icons-editor","style":"otter-sharing-icons-style"}'),Ia=e=>{let{icon:t}=e;return"facebook"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})):"twitter"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})):"linkedin"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"})):"pinterest"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})):"tumblr"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v-68c0-7.2 4.5-13.6 11.3-16 62-21.8 81.5-76 84.3-117.1.8-11 6.5-16.3 16.1-16.3h70.9c5.5 0 10 4.5 10 10v115.2h83c5.5 0 10 4.4 10 9.9v81.7c0 5.5-4.5 10-10 10h-83.4V360c0 34.2 23.7 53.6 68 35.8 4.8-1.9 9-3.2 12.7-2.2 3.5.9 5.8 3.4 7.4 7.9l22 64.3c1.8 5 3.3 10.6-.4 14.5z"})):"reddit"===t?(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z"})):(0,i.createElement)(c.SVG,{className:"o-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,i.createElement)(c.Path,{fill:"currentColor",d:"M208 88.286c0-10 6.286-21.714 17.715-21.714 11.142 0 17.714 11.714 17.714 21.714 0 10.285-6.572 21.714-17.714 21.714C214.286 110 208 98.571 208 88.286zm304 160c0 36.001-11.429 102.286-36.286 129.714-22.858 24.858-87.428 61.143-120.857 70.572l-1.143.286v32.571c0 16.286-12.572 30.571-29.143 30.571-10 0-19.429-5.714-24.572-14.286-5.427 8.572-14.856 14.286-24.856 14.286-10 0-19.429-5.714-24.858-14.286-5.142 8.572-14.571 14.286-24.57 14.286-10.286 0-19.429-5.714-24.858-14.286-5.143 8.572-14.571 14.286-24.571 14.286-18.857 0-29.429-15.714-29.429-32.857-16.286 12.285-35.715 19.428-56.571 19.428-22 0-43.429-8.285-60.286-22.857 10.285-.286 20.571-2.286 30.285-5.714-20.857-5.714-39.428-18.857-52-36.286 21.37 4.645 46.209 1.673 67.143-11.143-22-22-56.571-58.857-68.572-87.428C1.143 321.714 0 303.714 0 289.429c0-49.714 20.286-160 86.286-160 10.571 0 18.857 4.858 23.143 14.857a158.792 158.792 0 0 1 12-15.428c2-2.572 5.714-5.429 7.143-8.286 7.999-12.571 11.714-21.142 21.714-34C182.571 45.428 232 17.143 285.143 17.143c6 0 12 .285 17.714 1.143C313.714 6.571 328.857 0 344.572 0c14.571 0 29.714 6 40 16.286.857.858 1.428 2.286 1.428 3.428 0 3.714-10.285 13.429-12.857 16.286 4.286 1.429 15.714 6.858 15.714 12 0 2.857-2.857 5.143-4.571 7.143 31.429 27.714 49.429 67.143 56.286 108 4.286-5.143 10.285-8.572 17.143-8.572 10.571 0 20.857 7.144 28.571 14.001C507.143 187.143 512 221.714 512 248.286zM188 89.428c0 18.286 12.571 37.143 32.286 37.143 19.714 0 32.285-18.857 32.285-37.143 0-18-12.571-36.857-32.285-36.857-19.715 0-32.286 18.858-32.286 36.857zM237.714 194c0-19.714 3.714-39.143 8.571-58.286-52.039 79.534-13.531 184.571 68.858 184.571 21.428 0 42.571-7.714 60-20 2-7.429 3.714-14.857 3.714-22.572 0-14.286-6.286-21.428-20.572-21.428-4.571 0-9.143.857-13.429 1.714-63.343 12.668-107.142 3.669-107.142-63.999zm-41.142 254.858c0-11.143-8.858-20.857-20.286-20.857-11.429 0-20 9.715-20 20.857v32.571c0 11.143 8.571 21.142 20 21.142 11.428 0 20.286-9.715 20.286-21.142v-32.571zm49.143 0c0-11.143-8.572-20.857-20-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20-10 20-21.142v-32.571zm49.713 0c0-11.143-8.857-20.857-20.285-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20.285-9.715 20.285-21.142v-32.571zm49.715 0c0-11.143-8.857-20.857-20.286-20.857-11.428 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.858 21.142 20.286 21.142 11.429 0 20.286-10 20.286-21.142v-32.571zM421.714 286c-30.857 59.142-90.285 102.572-158.571 102.572-96.571 0-160.571-84.572-160.571-176.572 0-16.857 2-33.429 6-49.714-20 33.715-29.714 72.572-29.714 111.429 0 60.286 24.857 121.715 71.429 160.857 5.143-9.714 14.857-16.286 26-16.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.571-14.286 24.858-14.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.857-14.286 24.858-14.286 10 0 19.428 5.714 24.857 14.286 5.143-8.571 14.571-14.286 24.572-14.286 10.857 0 20.857 6.572 25.714 16 43.427-36.286 68.569-92 71.426-148.286zm10.572-99.714c0-53.714-34.571-105.714-92.572-105.714-30.285 0-58.571 15.143-78.857 36.857C240.862 183.812 233.41 254 302.286 254c28.805 0 97.357-28.538 84.286 36.857 28.857-26 45.714-65.714 45.714-104.571z"}))},Va=e=>{let{attributes:t,setAttributes:l,socialList:a}=e;return(0,i.createElement)(s.BlockControls,null,(0,i.createElement)(c.ToolbarGroup,null,Object.keys(a).map((e=>{var n;const r=null!==(n=t[e].active)&&void 0!==n?n:t[e];return(0,i.createElement)(c.Tooltip,{key:e
|
10 |
+
/* translators: %s Social Website */,text:(0,o.sprintf)((0,o.__)("Display %s","otter-blocks"),a[e].label)},(0,i.createElement)(c.Button,{className:g()("components-button","wp-block-themeisle-toolbar",{"is-active":r}),onClick:()=>(e=>{const o={...t[e]};o.active=!o.active,l({[e]:{...o}})})(e)},(0,i.createElement)(Ia,{icon:e})))}))))},Da=e=>{let{attributes:t,setAttributes:l,socialList:a}=e;const n=(e,o,a)=>{const n={...t[o]};n[a]=e,l({[o]:{...n}})};return(0,i.createElement)(s.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Items Gap","otter-blocks"),value:t.gap,onChange:e=>l({gap:e}),allowReset:!0,step:.1,max:100}),(0,i.createElement)(c.RangeControl,{label:(0,o.__)("Icons Border Radius","otter-blocks"),value:t.borderRadius,onChange:e=>l({borderRadius:e}),allowReset:!0,step:.1,max:50})),(0,i.createElement)(s.PanelColorSettings,{title:(0,o.__)("Color Settings"),className:"ott-color-controls",initialOpen:!1,colorSettings:Object.keys(a).reduce(((e,l)=>{var r;return(null!==(r=t[l].active)&&void 0!==r?r:t[l])?[...e,{value:t[l].backgroundColor,onChange:e=>n(e,l,"backgroundColor"),onGradientChange:e=>n(e,l,"backgroundColor")
|
11 |
/* translators: %s Social Website */,label:(0,o.sprintf)((0,o.__)(" %s Background Color","otter-blocks"),a[l].label)},{value:t[l].textColor,onChange:e=>n(e,l,"textColor")
|
|