File: /home/pclast/public_html/wp-content/themes/irankala/blocks/build/faq.js
(()=>{"use strict";var e={598:(e,t,n)=>{n.d(t,{T:()=>l});let l=[{name:"Black",color:"#000000"},{name:"Cyan bluish gray",color:"#abb8c3"},{name:"White",color:"#ffffff"},{name:"Pale pink",color:"#f78da7"},{name:"Vivid red",color:"#cf2e2e"},{name:"Luminous vivid orange",color:"#ff6900"},{name:"Luminous vivid amber",color:"#fcb900"},{name:"Light green cyan",color:"#7bdcb5"},{name:"Vivid green cyan",color:"#00d084"},{name:"Pale cyan blue",color:"#8ed1fc"},{name:"Vivid cyan blue",color:"#0693e3"},{name:"Vivid purple",color:"#9b51e0"}]},728:(e,t,n)=>{n.d(t,{G:()=>l});let l=[{name:IRK_BLOCK.extra_small,slug:"x-small",size:10},{name:IRK_BLOCK.small,slug:"small",size:12},{name:IRK_BLOCK.medium,slug:"medium",size:14},{name:IRK_BLOCK.large,slug:"large",size:18},{name:IRK_BLOCK.extra_large,slug:"x-large",size:24}]},943:(e,t,n)=>{n.d(t,{A:()=>l});const l={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}},407:(e,t,n)=>{let l;n.d(t,{A:()=>o});const r=new Uint8Array(16);function o(){if(!l&&(l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!l))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(r)}},823:(e,t,n)=>{n.d(t,{k:()=>r});const l=[];for(let e=0;e<256;++e)l.push((e+256).toString(16).slice(1));function r(e,t=0){return l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]}},562:(e,t,n)=>{n.d(t,{A:()=>a});var l=n(943),r=n(407),o=n(823);const a=function(e,t,n){if(l.A.randomUUID&&!t&&!e)return l.A.randomUUID();const a=(e=e||{}).random||(e.rng||r.A)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=a[e];return t}return(0,o.k)(a)}},87:e=>{e.exports=window.wp.element}},t={};function n(l){var r=t[l];if(void 0!==r)return r.exports;var o=t[l]={exports:{}};return e[l](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var l in t)n.o(t,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l=n(87),r=n(562),o=n(598),a=n(728);const{registerBlockType:i}=wp.blocks,{Fragment:c}=wp.element,{InspectorControls:m,InnerBlocks:s}=wp.blockEditor,{TextControl:u,TextareaControl:d,PanelBody:p,Button:g,Card:C,CardHeader:f,CardBody:E,__experimentalSpacer:x,FontSizePicker:y,ColorPalette:_,__experimentalItemGroup:b,__experimentalItem:K,ColorIndicator:v,Dropdown:I,Flex:B,FlexItem:h}=wp.components;i("irankala/faq",{title:IRK_BLOCK.faq,description:IRK_BLOCK.faq_desc,icon:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"irk-block-icon",width:"24",height:"24",viewBox:"0 96 960 960"},(0,l.createElement)("path",{d:"M474.97 810q17.465 0 30.16-12.724 12.696-12.724 12.696-30.188 0-17.465-12.678-29.798-12.679-12.334-30.517-12.334-17.182 0-29.515 12.317-12.334 12.316-12.334 30.154 0 17.182 12.362 29.877Q457.506 810 474.97 810Zm-37.188-148h65.479q0-28.174 9.435-48.927 9.434-20.753 35.852-45.794 28.756-29.322 42.039-54.979 13.283-25.656 13.283-55.961 0-55.469-35.131-86.469-35.13-31-90.958-31-54.221 0-91.327 27.608-37.106 27.609-54.672 71.174l62.044 25.392q14-25.739 33.883-41.37 19.882-15.63 49.03-15.63 28.609 0 44.565 14.773 15.956 14.772 15.956 39.123 0 18.756-11 36.125-11 17.37-31.347 37.283-38.696 37.261-47.913 61.695-9.218 24.435-9.218 66.957ZM185.087 950.131q-32.507 0-55.862-23.356-23.356-23.355-23.356-55.862V281.087q0-32.74 23.356-56.262 23.355-23.521 55.862-23.521h589.826q32.74 0 56.262 23.521 23.521 23.522 23.521 56.262v589.826q0 32.507-23.521 55.862-23.522 23.356-56.262 23.356H185.087Zm0-79.218h589.826V281.087H185.087v589.826Zm0-589.826v589.826-589.826Z"})),category:"irankala",className:"irk-block irk-block-faq",attributes:{irkUUID:{type:"string"},title:{type:"string"},faqList:{type:"array",default:[]},titleFontSize:{type:"number"},titleColor:{type:"string"},itemTitleFontSize:{type:"number"},itemTitleColor:{type:"string"},itemTextFontSize:{type:"number"},itemTextColor:{type:"string"}},edit:e=>{const{attributes:t,setAttributes:n}=e;let i,s=e.attributes.faqList;e.attributes.hasOwnProperty("irkUUID")||n({irkUUID:(0,r.A)()});const L=(t,n,l)=>{const r=[...e.attributes.faqList];r[t][n]=l,e.setAttributes({faqList:r})};return s.length&&(i=s.map(((t,n)=>{const r=t.title,o=t.text;return(0,l.createElement)(c,{key:n},(0,l.createElement)(C,{size:"xSmall",className:"components-base-control"},(0,l.createElement)(f,null,(0,l.createElement)(g,{onClick:()=>(t=>{const n=[...e.attributes.faqList];n.splice(t,1),e.setAttributes({faqList:n})})(n),isSmall:!0,icon:"no-alt",label:IRK_BLOCK.remove_item})),(0,l.createElement)(E,null,(0,l.createElement)(u,{placeholder:IRK_BLOCK.title,value:r,onChange:e=>L(n,"title",e)}),(0,l.createElement)(d,{placeholder:IRK_BLOCK.text,value:o,onChange:e=>L(n,"text",e)}))))}))),[(0,l.createElement)(m,{key:"1"},(0,l.createElement)(p,{initialOpen:!0},(0,l.createElement)(u,{label:IRK_BLOCK.title,value:t.title,onChange:e=>n({title:e})}),i,(0,l.createElement)(g,{variant:"secondary",onClick:(()=>{const t=[...e.attributes.faqList];t.push({title:"",text:""}),e.setAttributes({faqList:t})}).bind(void 0)},IRK_BLOCK.add_new)),(0,l.createElement)(p,{title:IRK_BLOCK.title,initialOpen:!1},(0,l.createElement)(y,{fontSizes:a.G,value:t.titleFontSize,onChange:e=>n({titleFontSize:e}),__nextHasNoMarginBottom:!0}),(0,l.createElement)(b,{isBordered:!0,isSeparated:!0},(0,l.createElement)(K,null,(0,l.createElement)(I,{position:"top left",renderToggle:({isOpen:e,onToggle:n})=>(0,l.createElement)(B,{onClick:n,"aria-expanded":e},(0,l.createElement)(h,null,(0,l.createElement)(v,{colorValue:t.titleColor})),(0,l.createElement)(h,null,IRK_BLOCK.text)),renderContent:()=>(0,l.createElement)(_,{colors:o.T,value:t.titleColor,onChange:e=>n({titleColor:e})})})))),(0,l.createElement)(p,{title:IRK_BLOCK.faq_title,initialOpen:!1},(0,l.createElement)(b,{isBordered:!0,isSeparated:!0},(0,l.createElement)(K,null,(0,l.createElement)(I,{position:"top left",renderToggle:({isOpen:e,onToggle:n})=>(0,l.createElement)(B,{onClick:n,"aria-expanded":e},(0,l.createElement)(h,null,(0,l.createElement)(v,{colorValue:t.itemTitleColor})),(0,l.createElement)(h,null,IRK_BLOCK.text)),renderContent:()=>(0,l.createElement)(_,{colors:o.T,value:t.itemTitleColor,onChange:e=>n({itemTitleColor:e})})}))),(0,l.createElement)(x,null),(0,l.createElement)(y,{fontSizes:a.G,value:t.itemTitleFontSize,onChange:e=>n({itemTitleFontSize:e}),__nextHasNoMarginBottom:!0})),(0,l.createElement)(p,{title:IRK_BLOCK.faq_text,initialOpen:!1},(0,l.createElement)(b,{isBordered:!0,isSeparated:!0},(0,l.createElement)(K,null,(0,l.createElement)(I,{position:"top left",renderToggle:({isOpen:e,onToggle:n})=>(0,l.createElement)(B,{onClick:n,"aria-expanded":e},(0,l.createElement)(h,null,(0,l.createElement)(v,{colorValue:t.itemTextColor})),(0,l.createElement)(h,null,IRK_BLOCK.text)),renderContent:()=>(0,l.createElement)(_,{colors:o.T,value:t.itemTextColor,onChange:e=>n({itemTextColor:e})})}))),(0,l.createElement)(x,null),(0,l.createElement)(y,{fontSizes:a.G,value:t.itemTextFontSize,onChange:e=>n({itemTextFontSize:e}),__nextHasNoMarginBottom:!0}))),(0,l.createElement)("div",{key:"2",className:e.className},IRK_BLOCK.faq)]},save:()=>(0,l.createElement)(s.Content,null)})})();
//# sourceMappingURL=faq.js.map