File: /home/zeusxp5/chuair.org/wp-content/plugins/wd-framework/build/accordion-block.js
!function(){"use strict";var e,t={2651:function(){var e=window.wp.element,t=window.wp.blocks,o=window.wp.i18n,n=window.wp.blockEditor,i=window.wp.components,a=t=>{let{tag:o}=t;return(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:{h1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",h2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",h3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.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.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z",button:"M17.5,4.5H2.5A1.5,1.5,0,0,0,1,6v8a1.5,1.5,0,0,0,1.5,1.5h15A1.5,1.5,0,0,0,19,14V6A1.5,1.5,0,0,0,17.5,4.5Zm0,8.75a.76.76,0,0,1-.75.75H3.25a.76.76,0,0,1-.75-.75V6.75A.76.76,0,0,1,3.25,6h13.5a.76.76,0,0,1,.75.75ZM5.5,11h9V9h-9Z"}[o]}))},l=window.wp.data,c=function(t){let{icon:o,size:n=24,...i}=t;return(0,e.cloneElement)(o,{width:n,height:n,...i})},r=window.wp.primitives,s=(0,e.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(r.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),d=window.wp.compose;const{useState:w,useEffect:m}=wp.element;var h=JSON.parse('{"apiVersion":2,"name":"webdevia/accordion-block","version":"0.1.0","title":"Accordion Item","category":"webdevia","description":"The accordion block is a powerful tool for organizing content into collapsible sections. With the ability to add Gutenberg inner blocks, you can create custom layouts and designs within each accordion item.","attributes":{"uuid":{"type":"number"},"transitionDuration":{"type":"number","default":500},"title":{"type":"string"},"titleTag":{"type":"string","default":"h3"},"initiallyOpen":{"type":"boolean","default":false},"clickToClose":{"type":"boolean","default":true},"autoClose":{"type":"boolean","default":true}},"supports":{"html":false},"example":{"attributes":{"preview":true,"blockOnly":true,"initiallyOpen":true,"title":"Accordion title"}},"keywords":["webdevia","devia","block","accordion"],"textdomain":"webdevia-blocks","editorScript":"file:./index.js","viewScript":"file:./view.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');const{name:u,...v}=h;(0,t.registerBlockType)(u,{...v,icon:()=>(0,e.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",class:"wd-blocks-icon"},(0,e.createElement)("path",{d:"M16.93,8.93a1,1,0,0,1-.7-.29L12,4.41,7.9,8.51A1,1,0,0,1,6.49,7.1L12,1.59l5.64,5.64a1,1,0,0,1,0,1.41A1,1,0,0,1,16.93,8.93Z"}),(0,e.createElement)("path",{d:"M12.07,22.35,6.42,16.71a1,1,0,0,1,1.42-1.42l4.23,4.23,4.09-4.1a1,1,0,0,1,1.42,1.42Z"}),(0,e.createElement)("path",{d:"M17.93,13H5.82a1,1,0,0,1,0-2H17.93a1,1,0,0,1,0,2Z"})),edit:function t(r){let{clientId:w,attributes:h,setAttributes:u}=r;const{title:v,titleTag:p,initiallyOpen:b,clickToClose:g,autoClose:k,transitionDuration:_,uuid:f}=h,y=(0,d.useInstanceId)(t),E=(0,l.useSelect)((e=>null!==e("core/editor")?e("core/editor").getCurrentPostId():0));m((()=>{const e=Number(`${E}${y}`);e!==f&&u({uuid:e})}),[y]);const C=(0,n.useBlockProps)({className:"wd-blocks-accordion"}),H=(0,n.useInnerBlocksProps)({className:"wd-blocks-accordion__content__wrapper"}),x=(0,l.useSelect)((e=>!!e("core/block-editor").getBlockParentsByBlockName(w,"pb/webdevia-block").length));return[(0,e.createElement)(n.InspectorControls,null,x&&(0,e.createElement)("div",{className:"components-notice is-warning",style:{margin:"0",borderTop:"1px solid #f0f0f0"}},(0,o.__)("This accordion item is nested inside another accordion item. While this will work, it may not be what you intended.","wd-framework")),(0,e.createElement)(i.PanelBody,{title:(0,o.__)("Accordion Item Settings","wd-framework")},(0,e.createElement)(i.ToggleControl,{label:(0,o.__)("Open By Default","wd-framework"),help:b?(0,o.__)("This accordion item will be open when the page loads.","wd-framework"):(0,o.__)("This accordion item will be closed when the page loads.","wd-framework"),checked:b,onChange:e=>u({initiallyOpen:e})}),(0,e.createElement)(i.ToggleControl,{label:(0,o.__)("Click to Close","wd-framework"),help:g?(0,o.__)("When open, this accordion item title can be clicked again to close it.","wd-framework"):(0,o.__)("Once opened, this accordion item cannot be closed by clicking the title.","wd-framework"),checked:g,onChange:e=>u({clickToClose:e})}),(0,e.createElement)(i.ToggleControl,{label:(0,o.__)("Auto Close","wd-framework"),help:k?(0,o.__)("This accordion item will close when opening another item.","wd-framework"):(0,o.__)("This accordion item will remain open when opening another item.","wd-framework"),checked:k,onChange:e=>u({autoClose:e})}),(0,e.createElement)(i.RangeControl,{label:(0,o.__)("Annimation Speed","wd-framework"),value:_,onChange:e=>u({transitionDuration:e}),min:0,max:1e3,step:100,help:(0,o.__)("Speed to toggle the accordion content in milliseconds.","webdevia-blocks")}))),(0,e.createElement)(n.BlockControls,{group:"block"},(0,e.createElement)(i.ToolbarGroup,{icon:(0,e.createElement)(a,{tag:p}),label:(0,o.__)("Change accordion title tag","wd-framework"),controls:[{tag:"h1",label:(0,o.__)("Heading 1","wd-framework")},{tag:"h2",label:(0,o.__)("Heading 2","wd-framework")},{tag:"h3",label:(0,o.__)("Heading 3","wd-framework")},{tag:"h4",label:(0,o.__)("Heading 4","wd-framework")},{tag:"h5",label:(0,o.__)("Heading 5","wd-framework")},{tag:"h6",label:(0,o.__)("Heading 6","wd-framework")},{tag:"button",label:(0,o.__)("Button","wd-framework")}].map((t=>({name:t.tag,icon:(0,e.createElement)(a,{tag:t.tag}),title:t.label,isActive:p===t.tag,onClick:()=>u({titleTag:t.tag})}))),isCollapsed:!0})),(0,e.createElement)("div",C,(0,e.createElement)("div",{className:"wd-blocks-accordion__title",onClick:e=>{const t=e.target.closest(".wd-blocks-accordion");t.querySelector(".wd-blocks-accordion__content")?.classList.toggle("accordion-hide")}},(0,e.createElement)(n.RichText,{className:"wd-blocks-accordion__title__text",tagName:"button"===p?"div":p,allowedFormats:["core/bold","core/italic"],placeholder:(0,o.__)("Accordion item titleā¦","wd-framework"),value:v,onChange:e=>u({title:e})}),(0,e.createElement)(c,{icon:s,size:32})),(0,e.createElement)("div",{className:"wd-blocks-accordion__content "+(b?"":"accordion-hide"),style:{transitionDuration:`${_}ms`}},(0,e.createElement)("div",H)))]},save:function(t){let{attributes:o}=t;const{title:i,initiallyOpen:a,clickToClose:l,autoClose:c,titleTag:r,transitionDuration:s,uuid:d}=o,w=n.useBlockProps.save({className:["wd-blocks-accordion"].join(" "),"data-options":JSON.stringify({initiallyOpen:a,clickToClose:l,autoClose:c})}),m=n.useInnerBlocksProps.save({id:"wd-ac-"+d,className:"wd-blocks-accordion__content__wrapper"});return(0,e.createElement)("div",w,(0,e.createElement)("div",{className:["wd-blocks-accordion__title"].join(" ")},(0,e.createElement)(n.RichText.Content,{id:"wd-at-"+d,className:"wd-blocks-accordion__title__text",tagName:r,role:"button",value:i}),(0,e.createElement)("span",{class:"wd-blocks-accordion__title__icon"},(0,e.createElement)("svg",{version:"1.0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1280 1280"},(0,e.createElement)("path",{d:"M407.2 583.3 175 815.5l38.2 38.3 38.3 38.2 194.2-194.2L640 503.5l194.3 194.3L1028.5 892l38.3-38.3 38.2-38.2-232.3-232.3C745 455.5 640.3 351 640 351c-.3 0-105 104.5-232.8 232.3z"})))),(0,e.createElement)("div",{className:"wd-blocks-accordion__content "+(a?"":"accordion-hide"),style:{transitionDuration:`${s}ms`}},(0,e.createElement)("div",m)))}})}},o={};function n(e){var i=o[e];if(void 0!==i)return i.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=function(t,o,i,a){if(!o){var l=1/0;for(d=0;d<e.length;d++){o=e[d][0],i=e[d][1],a=e[d][2];for(var c=!0,r=0;r<o.length;r++)(!1&a||l>=a)&&Object.keys(n.O).every((function(e){return n.O[e](o[r])}))?o.splice(r--,1):(c=!1,a<l&&(l=a));if(c){e.splice(d--,1);var s=i();void 0!==s&&(t=s)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[o,i,a]},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={297:0,5299:0,4887:0};n.O.j=function(t){return 0===e[t]};var t=function(t,o){var i,a,l=o[0],c=o[1],r=o[2],s=0;if(l.some((function(t){return 0!==e[t]}))){for(i in c)n.o(c,i)&&(n.m[i]=c[i]);if(r)var d=r(n)}for(t&&t(o);s<l.length;s++)a=l[s],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(d)},o=self.webpackChunkwebdevia_blocks=self.webpackChunkwebdevia_blocks||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))}();var i=n.O(void 0,[4887],(function(){return n(2651)}));i=n.O(i)}();