AlkantarClanX12

Your IP : 216.73.217.24


Current Path : /www/capitalgmcbuickregina_830/public/wp-content/plugins/popup-maker/dist/packages/
Upload File :
Current File : /www/capitalgmcbuickregina_830/public/wp-content/plugins/popup-maker/dist/packages/block-library.js

(()=>{"use strict";var t,e={232(t,e,a){var o={};a.r(o),a.d(o,{init:()=>W,metadata:()=>L,name:()=>H,settings:()=>$});var r={};a.r(r),a.d(r,{init:()=>tt,metadata:()=>X,name:()=>Q,settings:()=>Y});var n={};a.r(n),a.d(n,{ctaButton:()=>o,ctaButtons:()=>r});const l=window.wp.domReady;var i=a.n(l);const s=window.popupMaker.i18n,h=window.wp.element,p=((0,h.forwardRef)(({icon:t,size:e=24,...a},o)=>(0,h.cloneElement)(t,{width:e,height:e,...a,ref:o})),window.wp.primitives),c=window.ReactJSXRuntime,u=(p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Circle,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,(0,c.jsx)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(p.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})})),S=(p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,(0,c.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(p.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})),d=(0,c.jsx)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(p.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),P=(p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,(0,c.jsx)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(p.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})})),V=(p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Path,p.Circle,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.G,p.Path,p.Path,p.SVG,p.G,p.Path,p.Path,p.SVG,p.G,p.Path,p.Path,p.SVG,p.G,p.Path,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,(0,c.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(p.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})),G=(p.SVG,p.Path,(0,c.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(p.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})})),m=(p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,(0,c.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(p.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})})),x=(p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,(0,c.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(p.Path,{fillRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z",clipRule:"evenodd"})})),w=(p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.Path,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,(0,c.jsxs)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,c.jsx)(p.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,c.jsx)(p.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]})),g=(p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.Path,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.Path,p.SVG,p.Path,p.Path,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,p.SVG,p.Path,window.wp.blocks);function k(t){if(!t)return;const{metadata:e,settings:a,name:o}=t;return(0,g.registerBlockType)({name:o,...e},a)}function b(t){var e,a,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(a=b(t[e]))&&(o&&(o+=" "),o+=a)}else for(a in t)t[a]&&(o&&(o+=" "),o+=a);return o}const f=function(){for(var t,e,a=0,o="",r=arguments.length;a<r;a++)(t=arguments[a])&&(e=b(t))&&(o&&(o+=" "),o+=e);return o},_=window.React,y=window.wp.blockEditor,v=window.wp.htmlEntities,C=window.wp.components,j=window.wp.data,B=window.wp.editor,T=window.wp.compose,A=window.wp.keycodes,M=window.popupMaker.components,z=window.popupMaker.coreData,N=window.popupMaker.ctaEditor;function I(t,e,a){if(!t)return;const o=[];if(["popup-maker/cta-button"].includes(e)&&a&&o.push("id","bindings"),!o.length)return;const r=Object.entries(t).reduce((t,[e,r])=>o.includes(e)?(t[e]="bindings"===e&&a?a(r):r,t):t,{});return Object.keys(r).length?r:void 0}function D(t){return t.toString().replace(/<\/?a[^>]*>/g,"")}window.wp.blob,window.wp.coreData;const O="_blank",E="nofollow",R=(0,N.withModal)(N.Editor);function F({selectedWidth:t,setAttributes:e}){const a=(0,T.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return(0,c.jsx)(C.__experimentalToolsPanel,{label:(0,s.__)("Settings","default"),resetAll:()=>e({width:void 0}),dropdownMenuProps:a,children:(0,c.jsx)(C.__experimentalToolsPanelItem,{label:(0,s.__)("Button width","default"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>e({width:void 0}),as:"div",__nextHasNoMarginBottom:!0,children:(0,c.jsx)(C.__experimentalToggleGroupControl,{label:(0,s.__)("Button width","default"),value:t,onChange:t=>e({width:Number(t)}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[25,50,75,100].map(t=>(0,c.jsx)(C.__experimentalToggleGroupControlOption,{value:t,label:`${t}%`},t))})})})}const L=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"popup-maker/cta-button","title":"Call to Action Button","category":"popup-maker","parent":["popup-maker/cta-buttons","core/buttons"],"description":"Prompt visitors to take action with a button-style link.","keywords":["link","button","call to action","cta","conversion"],"textdomain":"popup-maker","attributes":{"tagName":{"type":"string","enum":["a","button"],"default":"a"},"type":{"type":"string","default":"button"},"textAlign":{"type":"string"},"url":{"type":"string","source":"attribute","selector":"a","attribute":"href","role":"content"},"title":{"type":"string","source":"attribute","selector":"a,button","attribute":"title","role":"content"},"text":{"type":"rich-text","source":"rich-text","selector":"a,button","role":"content"},"linkTarget":{"type":"string","source":"attribute","selector":"a","attribute":"target","role":"content"},"rel":{"type":"string","source":"attribute","selector":"a","attribute":"rel","role":"content"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"width":{"type":"number"},"ctaId":{"type":"number"}},"supports":{"anchor":true,"splitting":true,"align":false,"alignWide":false,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"__experimentalSkipSerialization":["fontSize","lineHeight","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"reusable":false,"shadow":{"__experimentalSkipSerialization":true},"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalSelector":".wp-block-popup-maker-cta-button .wp-block-popup-maker-cta-button__link","interactivity":{"clientNavigation":true}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"popup-maker-block-library","style":"popup-maker-block-library-style","selectors":{"root":".wp-block-popup-maker-cta-button .wp-block-popup-maker-cta-button__link","typography":{"writingMode":".wp-block-popup-maker-cta-button"}}}'),{name:H}=L,$={icon:u,example:{attributes:{className:"is-style-fill",text:(0,s.__)("Call to Action","popup-maker")}},edit:function(t){const{attributes:e,setAttributes:a,className:o,isSelected:r,onReplace:n,mergeBlocks:l,clientId:i,context:p}=t,{tagName:u,textAlign:k,linkTarget:b,placeholder:N,rel:I,style:L,text:H,url:$,width:W,metadata:Z,ctaId:J}=e,U=u||"a",[K,q]=(0,h.useState)(!1),[X,Q]=(0,h.useState)(!1),Y=r&&(K||!!J),[tt,et]=(0,h.useState)(null),at=(0,h.useRef)(null),ot=(0,h.useRef)(null),rt=(0,y.useBlockProps)({ref:(0,T.useMergeRefs)([et,at]),onKeyDown:function(t){A.isKeyboardEvent.primary(t,"k")?(t.preventDefault(),wt()):A.isKeyboardEvent.primaryShift(t,"k")&&(gt(),ot.current?.focus())}}),nt=(0,y.__experimentalUseBorderProps)(e),lt=(0,y.__experimentalUseColorProps)(e),it=(0,y.__experimentalGetSpacingClassesAndStyles)(e),st=(0,y.__experimentalGetShadowClassesAndStyles)(e),ht=(0,y.useBlockEditingMode)(),pt=b===O,ct=!!I?.includes(E),ut="a"===U,St=(0,j.useSelect)(t=>J?t(z.callToActionStore).getCallToAction(J):void 0,[J]),{currentPostId:dt,currentPostType:Pt}=(0,j.useSelect)(t=>({currentPostId:t(B.store).getCurrentPostId(),currentPostType:t(B.store).getCurrentPostType()}),[]),Vt=window.popupMakerBlockLibrary?.homeUrl||"/",Gt=(0,_.useCallback)((t,e=!1)=>{const a=new URLSearchParams;return a.set("cta",t),"popup"===Pt&&dt&&a.set("pid",dt.toString()),e&&a.set("notrack","1"),`${Vt.replace(/\/$/,"")}/?${a.toString()}`},[dt,Pt,Vt]),{createCallToAction:mt,changeEditorId:xt}=(0,j.useDispatch)(z.callToActionStore);function wt(){q(!0)}function gt(){a({ctaId:void 0,url:void 0,linkTarget:void 0,rel:void 0}),q(!1)}(0,h.useEffect)(()=>{r||q(!1)},[r]),(0,h.useEffect)(()=>{if(J)if(St){const t=Gt(St.uuid);a({url:t,linkTarget:St.settings.opensInNewTab?O:void 0,rel:St.settings.nofollow?E:void 0})}else a({url:void 0,linkTarget:void 0,rel:void 0})},[J,St,Pt,dt,Vt,a,Gt]);const kt=function(t){const{replaceBlocks:e,selectionChange:a}=(0,j.useDispatch)(y.store),o=(0,j.useSelect)(t=>t(y.store).getBlock,[]),r=(0,j.useSelect)(t=>t(y.store).getBlockRootClientId,[]),n=(0,j.useSelect)(t=>t(y.store).getBlockIndex,[]),l=(0,h.useRef)(t);return l.current=t,(0,T.useRefEffect)(t=>{function i(t){if(t.defaultPrevented||t.keyCode!==A.ENTER)return;const{content:i,clientId:s}=l.current;if(i.length)return;t.preventDefault();const h=o(r(s)),p=n(s),c=(0,g.cloneBlock)({...h,innerBlocks:h.innerBlocks.slice(0,p)}),u=(0,g.createBlock)((0,g.getDefaultBlockName)()||""),S=h.innerBlocks.slice(p+1),d=S.length?[(0,g.cloneBlock)({...h,innerBlocks:S})]:[];e(h.clientId,[c,u,...d],1),a(u.clientId)}return t.addEventListener("keydown",i),()=>{t.removeEventListener("keydown",i)}},[])}({content:H,clientId:i}),bt=(0,T.useMergeRefs)([kt,ot]),[ft,_t]=(0,h.useState)(!1),yt=ut&&r&&(!!J||K)&&!!tt,[vt,Ct]=(0,h.useState)(0);(0,h.useEffect)(()=>{!async function(){if(!1!==X){if(!0===X){const t=await mt({title:(0,s.__)("New call to action","popup-maker"),status:"publish"});t?(xt(t.id),Q(t.id),q(!0)):Q(!1)}else"number"==typeof X&&X>0&&q(!0);Ct(t=>t+1)}}()},[X,mt,xt]);const[jt,Bt]=(0,y.useSettings)("typography.fluid","layout"),Tt=(0,y.getTypographyClassesAndStyles)(e,{typography:{fluid:jt},layout:{wideSize:Bt?.wideSize}}),At=(0,j.useSelect)(t=>{const e=t(z.callToActionStore),a=J?e.getFetchError(J)||null:e.getFetchError()||null;return null===a?null:a.replace("Invalid post ID.",(0,s.__)("Call to action not found.","popup-maker"))},[J]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{...rt,className:f(rt.className,{[`has-custom-width wp-block-popup-maker-cta-button__width-${W}`]:W,"has-custom-font-size":rt.style.fontSize}),style:{...rt.style,border:At?"2px solid red":void 0},children:(0,c.jsx)(y.RichText,{ref:bt,"aria-label":(0,s.__)("Button text","default"),placeholder:N||(0,s.__)("Add text…","default"),value:H,onChange:t=>a({text:D(t)}),withoutInteractiveFormatting:!0,className:f(o,"wp-block-popup-maker-cta-button__link",lt.className,nt.className,Tt.className,{[`has-text-align-${k}`]:k,"no-border-radius":0===L?.border?.radius,"has-custom-font-size":rt.style.fontSize}),style:{...nt.style,...lt.style,...it.style,...st.style,...Tt.style,writingMode:void 0},onReplace:n,onMerge:l,identifier:"text"})}),(0,c.jsxs)(y.BlockControls,{group:"block",children:["default"===ht&&(0,c.jsx)(y.AlignmentControl,{value:k,onChange:t=>{a({textAlign:t})}}),!St&&ut&&(0,c.jsx)(C.ToolbarButton,{icon:x,title:(0,s.__)("Add Call to Action","popup-maker"),shortcut:A.displayShortcut.primary("k"),onClick:t=>{t.preventDefault(),wt()}}),St&&ut&&(0,c.jsx)(C.ToolbarButton,{icon:m,title:(0,s.__)("Remove Call to Action","popup-maker"),shortcut:A.displayShortcut.primaryShift("k"),onClick:gt,isActive:!0})]}),yt&&(0,c.jsx)(C.Popover,{placement:"bottom",onClose:()=>{q(!1),ot.current?.focus?.()},anchor:tt,focusOnMount:!!Y&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0,className:"block-editor-link-control",children:(0,c.jsxs)("div",{style:{width:"300px",padding:"10px"},children:[At&&(0,c.jsx)("div",{className:"pum-cta-error-notice",children:(0,c.jsx)(C.Notice,{status:"error",isDismissible:!1,children:At})}),K||At?(0,c.jsx)(C.Flex,{direction:"column",children:(0,c.jsxs)(C.Flex,{align:"center",justify:"space-between",children:[(0,c.jsx)(C.FlexItem,{style:{flexGrow:1},children:(0,c.jsx)(M.CallToActionSelectControl,{value:J&&!At?J:0,onChange:async t=>{"create_new"!==t?(a({ctaId:Number(t)}),q(!1)):Q(!0)},hideLabelFromVision:!0,placeholder:(0,s.__)("Search or create CTA…","popup-maker"),multiple:!1,extraOptions:[{value:"create_new",label:(0,s.__)("+ Create new CTA","popup-maker")}]})}),(0,c.jsx)(C.FlexItem,{children:(0,c.jsx)(C.Button,{icon:S,label:(0,s.__)("Save","popup-maker"),onClick:()=>q(!1)})})]})}):St&&(0,c.jsxs)(C.Flex,{direction:"column",gap:3,children:[(0,c.jsxs)(C.Flex,{justify:"space-between",align:"center",children:[(0,c.jsx)("div",{style:{fontSize:"16px",fontWeight:"500",color:"#1e1e1e",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:(0,v.decodeEntities)(St?.title?.rendered),children:(0,v.decodeEntities)(St?.title?.rendered)}),(0,c.jsx)(C.Button,{icon:m,variant:"link",size:"small",style:{textDecoration:"none"},isDestructive:!0,onClick:gt,label:(0,s.__)("Remove","popup-maker")})]}),(0,c.jsxs)(C.Flex,{justify:"space-between",align:"center",style:{color:"#1e1e1e"},children:[(0,c.jsxs)("div",{style:{fontSize:"12px",color:"#666",backgroundColor:"#f0f0f0",padding:"2px 8px",borderRadius:"12px",fontWeight:"500",flexGrow:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["ID: ",St?.id]}),(0,c.jsx)(C.Button,{icon:G,variant:"tertiary",style:{borderRadius:"6px",textDecoration:"none",color:"#1e1e1e",padding:".25rem 0.75rem",flexGrow:1},href:Gt(St.uuid,!0),target:"_blank",rel:"noopener noreferrer",showTooltip:!0,label:(0,s.__)("Preview Call To Action","popup-maker"),children:(0,s.__)("Preview","popup-maker")}),(0,c.jsx)(C.Button,{icon:V,variant:"tertiary",style:{borderRadius:"6px",textDecoration:"none",color:"#1e1e1e",padding:".25rem 0.75rem",flexGrow:1},href:`edit.php?post_type=popup&page=popup-maker-call-to-actions&edit=${St.id}`,target:"_blank",label:(0,s.__)("Edit Call to Action","popup-maker"),showTooltip:!0,children:(0,s.__)("Edit","popup-maker")})]}),(0,c.jsxs)(C.Button,{icon:w,variant:"secondary",onClick:()=>_t(!ft),style:{width:"100%",justifyContent:"space-between",border:"1px solid #ddd",borderRadius:"6px",padding:"8px 12px"},showTooltip:!0,label:(0,s.__)("Advanced Options","popup-maker"),children:[(0,s.__)("Advanced Options","popup-maker"),(0,c.jsx)(C.Icon,{icon:ft?P:d})]}),ft&&(0,c.jsxs)(C.Flex,{direction:"column",gap:3,children:[(0,c.jsx)(C.ToggleControl,{label:(0,s.__)("Open in new window","popup-maker"),checked:pt,onChange:t=>{a({linkTarget:t?O:void 0})},__nextHasNoMarginBottom:!0}),(0,c.jsx)(C.ToggleControl,{label:(0,s.__)('Add rel="nofollow"',"popup-maker"),checked:ct,onChange:t=>{a({rel:t?E:void 0})},__nextHasNoMarginBottom:!0})]})]})]})}),(0,c.jsx)(y.InspectorControls,{group:"settings",children:(0,c.jsx)(C.Panel,{header:(0,s.__)("CTA Settings","popup-maker"),children:(0,c.jsx)(C.PanelBody,{children:(0,c.jsx)(M.CallToActionSelectControl,{label:(0,s.__)("Choose a Call to Action","popup-maker"),value:J,placeholder:(0,s.__)("Search or create CTA…","popup-maker"),onChange:async t=>{"create_new"!==t?(a({ctaId:Number(t)}),q(!1)):Q(!0)},extraOptions:[{value:"create_new",label:(0,s.__)("+ Create new CTA","popup-maker")}]})})})}),(0,c.jsx)(y.InspectorControls,{children:(0,c.jsx)(F,{selectedWidth:W,setAttributes:a})}),(0,c.jsx)(y.InspectorControls,{group:"advanced",children:ut&&(0,c.jsx)(C.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,s.__)("Link rel","default"),value:I||"",onChange:t=>a({rel:t})})}),"number"==typeof X&&X>0&&(0,c.jsx)(R,{id:X,defaultValues:{status:"publish"},onSave:t=>{a({ctaId:t.id})},closeOnSave:!0,onClose:()=>{Q(!1)}},X)]})},save:function({attributes:t,className:e}){const{tagName:a,type:o,textAlign:r,fontSize:n,linkTarget:l,rel:i,style:s,text:h,title:p,url:u,width:S}=t,d=a||"a",P="button"===d,V=o||"button",G=(0,y.__experimentalGetBorderClassesAndStyles)(t),m=(0,y.__experimentalGetColorClassesAndStyles)(t),x=(0,y.__experimentalGetSpacingClassesAndStyles)(t),w=(0,y.__experimentalGetShadowClassesAndStyles)(t),g=(0,y.getTypographyClassesAndStyles)(t),k=f("pum-cta","wp-block-popup-maker-cta-button__link","wp-element-button",m.className,G.className,g.className,{[`has-text-align-${r}`]:r,"no-border-radius":0===s?.border?.radius,"has-custom-font-size":n||s?.typography?.fontSize}),b={...G.style,...m.style,...x.style,...w.style,...g.style,writingMode:void 0},_=f(e,{[`has-custom-width wp-block-popup-maker-cta-button__width-${S}`]:Boolean(S)});return(0,c.jsx)("div",{...y.useBlockProps.save({className:_}),children:(0,c.jsx)(y.RichText.Content,{tagName:d,type:P?V:null,className:k,href:P?null:u,title:p,style:b,value:h,target:P?null:l,rel:P?null:i})})},deprecated:[],merge:(t,{text:e=""})=>({...t,text:(t.text||"")+e})},W=()=>k({name:H,metadata:L,settings:$}),Z=window.popupMaker.icons,J=window.wp.hooks,U=(t,e)=>(U.body||(U.body=t.implementation.createHTMLDocument("").body),U.body.innerHTML=e,U.body),K={from:[{type:"block",isMultiBlock:!0,blocks:["popup-maker/cta-button","core/button"],transform:t=>(0,g.createBlock)("popup-maker/cta-buttons",{},t.map((t,e)=>"core/button"===e?(0,g.createBlock)("core/button",t):(0,g.createBlock)("popup-maker/cta-button",t)))},{type:"block",isMultiBlock:!0,blocks:["core/buttons"],transform:t=>(0,g.createBlock)("popup-maker/cta-buttons",{},t.map(t=>(0,g.createBlock)("core/button",t)))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:t=>(0,g.createBlock)("popup-maker/cta-buttons",{},t.map(t=>{const{content:e,metadata:a}=t,o=U(document,e),r=o.innerText||"",n=o.querySelector("a"),l=n?.getAttribute("href");return(0,g.createBlock)("popup-maker/cta-button",{text:r,url:l,metadata:I(a,"popup-maker/cta-button",({content:t})=>({text:t}))})})),isMatch:t=>t.every(t=>{const e=U(document,t.content),a=e.innerText||"",o=e.querySelectorAll("a");return a.length<=30&&o.length<=1})}]},q={name:"popup-maker/cta-button",attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]},X=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"popup-maker/cta-buttons","title":"Call to Action Buttons","category":"popup-maker","allowedBlocks":["popup-maker/cta-button","core/button"],"description":"Prompt visitors to take action with a group of button-style links.","keywords":["link","button","call to action","cta","conversion"],"textdomain":"popup-maker","attributes":{},"supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalExposeControlsToChildren":true,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"blockGap":["horizontal","vertical"],"padding":true,"margin":["top","bottom"],"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true}},"editorStyle":"popup-maker-block-library","style":"popup-maker-block-library-style"}'),{name:Q}=X,Y={icon:Z.Mark,example:{attributes:{layout:{type:"flex",justifyContent:"center"}},innerBlocks:[{name:"popup-maker/cta-button",attributes:{text:(0,s.__)("Buy now","popup-maker")}},{name:"popup-maker/cta-button",attributes:{text:(0,s.__)("Contact us","popup-maker")}}]},deprecated:[],transforms:K,edit:function({attributes:t,className:e}){const{fontSize:a,layout:o,style:r}=t,n=(0,y.useBlockProps)({className:f(e,{"has-custom-font-size":a||r?.typography?.fontSize})}),{hasButtonVariations:l}=(0,j.useSelect)(t=>({hasButtonVariations:t(g.store).getBlockVariations("popup-maker/cta-button","inserter").length>0}),[]),i=(0,y.useInnerBlocksProps)(n,{defaultBlock:q,directInsert:!l,template:[["popup-maker/cta-button"]],templateInsertUpdatesSelection:!0,orientation:o?.orientation??"horizontal"});return(0,c.jsx)("div",{...i})},save:function({attributes:t,className:e}){const{fontSize:a,style:o}=t,r=y.useBlockProps.save({className:f(e,{"has-custom-font-size":a||o?.typography?.fontSize})}),n=y.useInnerBlocksProps.save(r);return(0,c.jsx)("div",{...n})}},tt=()=>k({name:Q,metadata:X,settings:Y});(0,J.addFilter)("blocks.registerBlockType","popup-maker/cta-buttons",t=>{const{name:e}=t;switch(e){case"core/button":return{...t,parent:[...t.parent,"popup-maker/cta-buttons"]};case"core/buttons":return{...t,allowedBlocks:[...t.allowedBlocks,"popup-maker/cta-button"]};default:return t}}),i()(()=>{Object.values(n).forEach(({init:t})=>{t()})})}},a={};function o(t){var r=a[t];if(void 0!==r)return r.exports;var n=a[t]={exports:{}};return e[t](n,n.exports,o),n.exports}o.m=e,t=[],o.O=(e,a,r,n)=>{if(!a){var l=1/0;for(p=0;p<t.length;p++){for(var[a,r,n]=t[p],i=!0,s=0;s<a.length;s++)(!1&n||l>=n)&&Object.keys(o.O).every(t=>o.O[t](a[s]))?a.splice(s--,1):(i=!1,n<l&&(l=n));if(i){t.splice(p--,1);var h=r();void 0!==h&&(e=h)}}return e}n=n||0;for(var p=t.length;p>0&&t[p-1][2]>n;p--)t[p]=t[p-1];t[p]=[a,r,n]},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var a in e)o.o(e,a)&&!o.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={544:0,718:0};o.O.j=e=>0===t[e];var e=(e,a)=>{var r,n,[l,i,s]=a,h=0;if(l.some(e=>0!==t[e])){for(r in i)o.o(i,r)&&(o.m[r]=i[r]);if(s)var p=s(o)}for(e&&e(a);h<l.length;h++)n=l[h],o.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return o.O(p)},a=globalThis.webpackChunk_popupMakerAdmin_webpackJsonp=globalThis.webpackChunk_popupMakerAdmin_webpackJsonp||[];a.forEach(e.bind(null,0)),a.push=e.bind(null,a.push.bind(a))})();var r=o.O(void 0,[718],()=>o(232));r=o.O(r),(window.popupMaker=window.popupMaker||{}).blockLibrary=r})();