(()=>{var e,t={744(e,t,o){"use strict";o(917);const a=window.wp.hooks;(0,a.addFilter)("blocks.registerBlockType","awp/cover-custom-attribute",function(e,t){return void 0!==e.attributes&&(e.attributes=Object.assign(e.attributes,{hideOnMobile:{type:"boolean"},hideOnTablet:{type:"boolean"},hideOnDesktop:{type:"boolean"}})),e});const l=window.wp.compose,r=window.wp.blockEditor,n=window.wp.components,i=window.wp.i18n,s=window.ReactJSXRuntime,d=()=>(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{fill:"#5271FF",cx:"128",cy:"128",r:"128"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M127.8,175l-5.4-7.9l-19.9-28.8c-0.8-1.2-2.7-1.2-3.5,0l-39.3,56.7c-1,1.4,0,3.4,1.8,3.4H140c1.7,0,2.7-1.9,1.8-3.4L127.8,175L127.8,175z"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M195,198.5h-37.7c-1.5,0-2.9-0.7-3.7-1.9L59.7,60.9c-1-1.4,0-3.4,1.8-3.4h37.2c1.4,0,2.6,0.7,3.4,1.8c10.2,14.9,81.7,118.6,94.4,136.5C197.2,196.9,196.4,198.5,195,198.5L195,198.5z"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M196,60.9l-39.3,56.7c-0.9,1.2-2.7,1.2-3.5,0l-39.3-56.7c-1-1.4,0-3.4,1.8-3.4h78.5C195.9,57.5,197,59.5,196,60.9L196,60.9z"})]}),c=(0,l.createHigherOrderComponent)(e=>t=>{const{attributes:o,setAttributes:a,isSelected:l}=t,{hideOnMobile:c,hideOnTablet:x,hideOnDesktop:p}=o;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e,{...t}),l&&(0,s.jsx)(r.InspectorControls,{children:(0,s.jsxs)(n.PanelBody,{title:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,s.jsx)(d,{}),(0,s.jsx)("span",{children:"Responsive Settings"})]}),initialOpen:!1,className:"axvart-responsive-panel",children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Hide on mobile","awp"),checked:!!c,onChange:()=>a({hideOnMobile:!c})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Hide on tablet","awp"),checked:!!x,onChange:()=>a({hideOnTablet:!x})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Hide on desktop","awp"),checked:!!p,onChange:()=>a({hideOnDesktop:!p})})]})})]})},"withResponsiveControls");(0,a.addFilter)("editor.BlockEdit","awp/cover-custom-controls",c),(0,a.addFilter)("blocks.getSaveContent.extraProps","awp/cover-apply-class",function(e,t,o){const{hideOnMobile:a,hideOnTablet:l,hideOnDesktop:r}=o;return e.className||(e.className=""),void 0!==a&&a&&(e.className=e.className+" hide-on-mobile"),void 0!==l&&l&&(e.className=e.className+" hide-on-tablet"),void 0!==r&&r&&(e.className=e.className+" hide-on-desktop"),e});const x=window.wp.plugins,p=window.wp.editor,g=window.wp.data,u=window.wp.element,h=window.wp.apiFetch;var v=o.n(h);const m=()=>(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{fill:"#5271FF",cx:"128",cy:"128",r:"128"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M127.8,175l-5.4-7.9l-19.9-28.8c-0.8-1.2-2.7-1.2-3.5,0l-39.3,56.7c-1,1.4,0,3.4,1.8,3.4H140c1.7,0,2.7-1.9,1.8-3.4L127.8,175L127.8,175z"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M195,198.5h-37.7c-1.5,0-2.9-0.7-3.7-1.9L59.7,60.9c-1-1.4,0-3.4,1.8-3.4h37.2c1.4,0,2.6,0.7,3.4,1.8c10.2,14.9,81.7,118.6,94.4,136.5C197.2,196.9,196.4,198.5,195,198.5L195,198.5z"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M196,60.9l-39.3,56.7c-0.9,1.2-2.7,1.2-3.5,0L113.9,60.9c-1-1.4,0-3.4,1.8-3.4h78.5C195.9,57.5,197,59.5,196,60.9L196,60.9z"})]});(0,x.registerPlugin)("axvart-theme-settings",{icon:(0,s.jsx)(m,{}),render:()=>{const e=(0,g.useSelect)(e=>e("core").getEntityRecord("root","site"),[]),[t,o]=(0,u.useState)(!1),[a,l]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{e&&(o(e.axvart_scroll_top||!1),l(!1!==e.axvart_hover_effects))},[e]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.PluginSidebarMoreMenuItem,{target:"axvart-theme-settings",icon:(0,s.jsx)(m,{}),children:(0,i.__)("Axvart Settings","axvart")}),(0,s.jsx)(p.PluginSidebar,{name:"axvart-theme-settings",title:(0,i.__)("Axvart Settings","axvart"),icon:(0,s.jsx)(m,{}),children:(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Feature Options","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Scroll to Top Button","axvart"),help:(0,i.__)("Show a button to scroll back to the top of the page","axvart"),checked:t,onChange:async e=>{o(e);try{await v()({path:"/wp/v2/settings",method:"POST",data:{axvart_scroll_top:e}})}catch(t){console.error("Failed to update scroll top setting:",t),o(!e)}}}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Hover Effects","axvart"),help:(0,i.__)("Enable smooth hover animations and effects for interactive elements like cards and buttons","axvart"),checked:a,onChange:async e=>{l(e),document.documentElement.style.setProperty("--axvart-hover-effects-enabled",e?"1":"0");try{await v()({path:"/wp/v2/settings",method:"POST",data:{axvart_hover_effects:e}})}catch(t){console.error("Failed to update hover effects setting:",t),l(!e)}}})]})})]})}}),(0,a.addFilter)("blocks.registerBlockType","axvart/hover-effect-attributes",(e,t)=>("core/cover"!==t&&"core/image"!==t||(e.attributes={...e.attributes,axvartHoverEffect:{type:"string",default:"none"},axvartHoverIntensity:{type:"number",default:.5},axvartHoverScale:{type:"number",default:1.05},axvartHoverDuration:{type:"number",default:.3}}),e),20);const b=()=>(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{fill:"#5271FF",cx:"128",cy:"128",r:"128"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M127.8,175l-5.4-7.9l-19.9-28.8c-0.8-1.2-2.7-1.2-3.5,0l-39.3,56.7c-1,1.4,0,3.4,1.8,3.4H140c1.7,0,2.7-1.9,1.8-3.4L127.8,175L127.8,175z"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M195,198.5h-37.7c-1.5,0-2.9-0.7-3.7-1.9L59.7,60.9c-1-1.4,0-3.4,1.8-3.4h37.2c1.4,0,2.6,0.7,3.4,1.8c10.2,14.9,81.7,118.6,94.4,136.5C197.2,196.9,196.4,198.5,195,198.5L195,198.5z"}),(0,s.jsx)("path",{fill:"#FFFFFF",d:"M196,60.9l-39.3,56.7c-0.9,1.2-2.7,1.2-3.5,0l-39.3-56.7c-1-1.4,0-3.4,1.8-3.4h78.5C195.9,57.5,197,59.5,196,60.9L196,60.9z"})]}),f=(0,l.createHigherOrderComponent)(e=>t=>{const{attributes:o,setAttributes:a,isSelected:l}=t,{axvartHoverEffect:i="none",axvartHoverIntensity:d=.5,axvartHoverScale:c=1.05,axvartHoverDuration:x=.3}=o;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e,{...t}),l&&("core/cover"===t.name||"core/image"===t.name)&&(0,s.jsx)(r.InspectorControls,{children:(0,s.jsxs)(n.PanelBody,{title:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,s.jsx)(b,{}),(0,s.jsx)("span",{children:"Hover Effects"})]}),initialOpen:!0,className:"axvart-hover-panel",children:[(0,s.jsx)(n.SelectControl,{label:"Effect Type",value:i,options:[{label:"None",value:"none"},{label:"Zoom",value:"zoom"},{label:"Fade",value:"fade"},{label:"Grayscale",value:"grayscale"},{label:"Blur",value:"blur"},{label:"Glow",value:"glow"}],onChange:e=>a({axvartHoverEffect:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),"none"!==i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:"Effect Strength",value:d,onChange:e=>a({axvartHoverIntensity:e}),min:.1,max:1,step:.1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,s.jsx)(n.RangeControl,{label:"Duration (seconds)",value:x,onChange:e=>a({axvartHoverDuration:e}),min:.1,max:1,step:.1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),"core/cover"===t.name&&(0,s.jsx)(n.RangeControl,{label:"Zoom Scale",value:c,onChange:e=>a({axvartHoverScale:e}),min:1,max:1.5,step:.05,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})})]})},"withHoverControls");(0,a.addFilter)("editor.BlockEdit","axvart/hover-effect-controls",f);var y=o(942),_=o.n(y);const C=(0,l.createHigherOrderComponent)(e=>t=>{const{attributes:o}=t,{axvartHoverEffect:a,axvartHoverIntensity:l=.5,axvartHoverScale:r=1.05,axvartHoverDuration:n=.3}=o,i={...t.wrapperProps,className:_()(t?.wrapperProps?.className,{[`axvart-hover-${a}`]:a&&"none"!==a,"axvart-hover-enabled":!0}),style:{...t.wrapperProps?.style||{},"--axvart-intensity":l,"--axvart-duration":`${n}s`,"--axvart-scale":r}};return(0,s.jsx)(e,{...t,wrapperProps:i})},"applyHoverClasses");(0,a.addFilter)("editor.BlockListBlock","axvart/hover-effect-classes",C);const j=window.wp.blocks,S=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/accordion-block","version":"0.1.0","title":"Accordion Block","category":"widgets","icon":"list-view","description":"A customizable accordion block with FAQ-style design and interactive functionality.","example":{},"supports":{"html":false,"align":["wide","full"],"spacing":{"padding":true,"margin":true},"color":{"background":true,"text":true,"link":true},"typography":{"fontSize":true,"lineHeight":true}},"attributes":{"items":{"type":"array","default":[{"id":1,"question":"What services do you offer?","answer":"We provide grooming, hair styling, vet checkups, paw and nail care, training, and more for all types of pets.","isOpen":true},{"id":2,"question":"Are your veterinarians certified?","answer":"Our services cover everything from professional grooming and pet styling to routine vet visits, nail trimming, and behavioral training for pets of all sizes.","isOpen":false}]},"headerTitle":{"type":"string","default":"FAQ"},"headerSubtitle":{"type":"string","default":"Frequently Asked Questions"},"headerDescription":{"type":"string","default":"At PetCove, we\'re here to answer all your pet care questions covering grooming, health checkups, training, emergencies, and booking guidance for your furry friends."},"showHeader":{"type":"boolean","default":true},"allowMultipleOpen":{"type":"boolean","default":false},"iconStyle":{"type":"string","default":"plus-minus"},"iconSize":{"type":"number","default":24},"colorSettings":{"type":"object","default":{}},"fontSizes":{"type":"object","default":{"headerTitle":"xx-large","headerSubtitle":"large","headerDescription":"medium","questionText":"large","answerText":"medium"}},"fontSizePixels":{"type":"object","default":{"headerTitle":32,"headerSubtitle":24,"headerDescription":16,"questionText":20,"answerText":16}},"fontSizeMode":{"type":"object","default":{"headerTitle":"preset","headerSubtitle":"preset","headerDescription":"preset","questionText":"preset","answerText":"preset"}},"headerGap":{"type":"number","default":50},"itemsGap":{"type":"number","default":30},"itemsWidth":{"type":"number","default":60},"headerWidth":{"type":"number","default":40},"typographyStyles":{"type":"object","default":{"questionText":{},"answerText":{},"headerTitle":{},"headerSubtitle":{},"headerDescription":{}}},"questionPadding":{"type":"object","default":{"top":"20px","bottom":"20px","left":"20px","right":"20px"}},"answerPadding":{"type":"object","default":{"top":"20px","bottom":"20px","left":"20px","right":"20px"}}},"textdomain":"axvart","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","script":"file:./frontend.js"}'),w=({attributes:e,setAttributes:t})=>{const{colorSettings:o={}}=e,[a=[]]=(0,r.useSettings)("color.palette"),l=e=>{if(!e||e.startsWith("var("))return e;const t=a.find(t=>t.color===e);return t?`var(--wp--preset--color--${t.slug})`:e},d=e=>{if(!e||!e.startsWith("var(--wp--preset--color--"))return e;const t=e.match(/var\(--wp--preset--color--([^)]+)\)/)?.[1];if(t){const o=a.find(e=>e.slug===t);return o?o.color:e}return e},c=(e,a)=>({value:d(o[e]),onChange:a=>((e,a)=>{const r={...o,[e]:l(a)};t({colorSettings:r})})(e,a),label:a,clearable:!0});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.PanelColorSettings,{title:(0,i.__)("Color Settings","axvart"),initialOpen:!1,colorSettings:[c("headerTitle",(0,i.__)("Header Title","axvart")),c("headerSubtitle",(0,i.__)("Header Subtitle","axvart")),c("headerDescription",(0,i.__)("Header Description","axvart")),c("questionClosed",(0,i.__)("Question Text (Closed)","axvart")),c("questionOpen",(0,i.__)("Question Text (Open)","axvart")),c("questionHover",(0,i.__)("Question Text (Hover)","axvart")),c("answerText",(0,i.__)("Answer Text","axvart")),c("answerLink",(0,i.__)("Answer Link","axvart")),c("iconClosed",(0,i.__)("Icon (Closed)","axvart")),c("iconOpen",(0,i.__)("Icon (Open)","axvart")),c("iconHover",(0,i.__)("Icon (Hover)","axvart")),c("questionBgColor",(0,i.__)("Question Background Color (Closed)","axvart")),c("questionBgOpen",(0,i.__)("Question Background Color (Open)","axvart")),c("answerBgColor",(0,i.__)("Answer Background Color","axvart")),c("itemBorderColor",(0,i.__)("Item Border Color","axvart"))]}),(0,s.jsx)("div",{style:{padding:"0 16px 16px",marginTop:"-8px"},children:(0,s.jsx)(n.Button,{variant:"secondary",onClick:()=>{t({colorSettings:{}})},style:{width:"100%"},children:(0,i.__)("Reset All Colors","axvart")})})]})},k=({element:e,typographyStyles:t,setAttributes:o})=>{const a=t?.[e]||{},l=(l,r)=>{const n={...t,[e]:{...a,[l]:r}};o({typographyStyles:n})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Appearance","axvart"),value:a.fontWeight||"normal",onChange:e=>l("fontWeight",e),options:[{label:(0,i.__)("Default","axvart"),value:"normal"},{label:(0,i.__)("Thin","axvart"),value:"100"},{label:(0,i.__)("Extra Light","axvart"),value:"200"},{label:(0,i.__)("Light","axvart"),value:"300"},{label:(0,i.__)("Regular","axvart"),value:"400"},{label:(0,i.__)("Medium","axvart"),value:"500"},{label:(0,i.__)("Semi Bold","axvart"),value:"600"},{label:(0,i.__)("Bold","axvart"),value:"700"},{label:(0,i.__)("Extra Bold","axvart"),value:"800"},{label:(0,i.__)("Black","axvart"),value:"900"}]}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Line Height","axvart"),value:parseFloat(a.lineHeight)||1.5,onChange:e=>l("lineHeight",e),min:.5,max:3,step:.1,allowReset:!0,resetFallbackValue:1.5}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Letter Spacing (px)","axvart"),value:parseFloat(a.letterSpacing)||0,onChange:e=>l("letterSpacing",e+"px"),min:-2,max:10,step:.1,allowReset:!0,resetFallbackValue:0}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Text Decoration","axvart"),value:a.textDecoration||"none",onChange:e=>l("textDecoration",e),options:[{label:(0,i.__)("None","axvart"),value:"none"},{label:(0,i.__)("Underline","axvart"),value:"underline"},{label:(0,i.__)("Overline","axvart"),value:"overline"},{label:(0,i.__)("Line Through","axvart"),value:"line-through"}]}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Letter Case","axvart"),value:a.textTransform||"none",onChange:e=>l("textTransform",e),options:[{label:(0,i.__)("None","axvart"),value:"none"},{label:(0,i.__)("Uppercase","axvart"),value:"uppercase"},{label:(0,i.__)("Lowercase","axvart"),value:"lowercase"},{label:(0,i.__)("Capitalize","axvart"),value:"capitalize"}]})]})},B=({attributes:e,setAttributes:t})=>{const{items:o,headerTitle:a,headerSubtitle:l,headerDescription:d,showHeader:c,allowMultipleOpen:x,iconStyle:p,iconSize:g,colorSettings:u,fontSizes:h,fontSizePixels:v,fontSizeMode:m,headerGap:b,itemsGap:f,itemsWidth:y,headerWidth:_,typographyStyles:C,questionPadding:j,answerPadding:S}=e,B=[{label:(0,i.__)("Small","axvart"),value:"small"},{label:(0,i.__)("Medium","axvart"),value:"medium"},{label:(0,i.__)("Large","axvart"),value:"large"},{label:(0,i.__)("Extra Large","axvart"),value:"x-large"},{label:(0,i.__)("Extra Extra Large","axvart"),value:"xx-large"}],T={headerTitle:{min:16,max:48},headerSubtitle:{min:14,max:36},headerDescription:{min:12,max:24},questionText:{min:14,max:32},answerText:{min:12,max:24}},$=({element:e,label:o,helpText:a})=>{const l=(e=>m?.[e]||"preset")(e),r=T[e],d=(e=>v?.[e]||T[e]?.min||16)(e),c=h?.[e]||"medium",x=`font-size-control-${e}`,p=`font-size-live-${e}`;return(0,s.jsxs)("div",{style:{marginBottom:"20px",padding:"12px",border:"1px solid #ddd",borderRadius:"4px"},role:"group","aria-labelledby":`${x}-label`,"aria-describedby":`${x}-description`,children:[(0,s.jsx)("div",{id:`${x}-label`,style:{marginBottom:"12px",fontWeight:"600"},children:o}),(0,s.jsx)("div",{id:`${x}-description`,style:{fontSize:"12px",color:"#666",marginBottom:"8px"},children:a}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Size Type","axvart"),value:l,onChange:o=>{((e,o)=>{const a={...m||{},[e]:o};t({fontSizeMode:a})})(e,o);const a="preset"===o?(0,i.__)("Switched to theme preset font sizes","axvart"):(0,i.__)("Switched to custom pixel font sizes","axvart");document.getElementById(p).textContent=a},options:[{label:(0,i.__)("Theme Preset","axvart"),value:"preset"},{label:(0,i.__)("Custom Size","axvart"),value:"custom"}],style:{marginBottom:"12px"},"aria-describedby":`${x}-type-help`}),(0,s.jsx)("div",{id:`${x}-type-help`,style:{fontSize:"11px",color:"#888",marginBottom:"8px"},children:"preset"===l?(0,i.__)("Use predefined theme font sizes for consistency","axvart"):(0,i.__)("Set exact pixel values for precise control","axvart")}),"preset"===l?(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Preset Size","axvart"),value:c,onChange:o=>{((e,o)=>{const a={...h||{},[e]:o};t({fontSizes:a})})(e,o);const a=B.find(e=>e.value===o)?.label||o;document.getElementById(p).textContent=(0,i.__)("Font size changed to: ","axvart")+a},options:B,"aria-describedby":`${x}-preset-help`}):(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Custom Size (px)","axvart"),value:d,onChange:o=>{((e,o)=>{const a={...v||{},[e]:o};t({fontSizePixels:a})})(e,o),clearTimeout(window[`fontSizeTimeout_${e}`]),window[`fontSizeTimeout_${e}`]=setTimeout(()=>{document.getElementById(p).textContent=(0,i.__)("Font size: ","axvart")+o+(0,i.__)(" pixels","axvart")},500)},min:r.min,max:r.max,step:1,allowReset:!0,resetFallbackValue:r.min,"aria-label":`${o} ${(0,i.__)("font size in pixels","axvart")}`,"aria-describedby":`${x}-range-help`,renderTooltipContent:e=>`${e}px`,trackColor:"#0073aa",color:"#0073aa"}),(0,s.jsx)("div",{id:`${x}-range-help`,style:{fontSize:"11px",color:"#888",marginTop:"4px"},children:"custom"===l&&(0,s.jsxs)(s.Fragment,{children:[(0,i.__)("Range: ","axvart"),r.min,"px - ",r.max,"px.",(0,i.__)("Use arrow keys for fine adjustment, Page Up/Down for larger steps.","axvart")]})}),(0,s.jsx)("div",{id:p,"aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"}})]})},N=(e,a,l)=>{const r=o.map(t=>t.id===e?{...t,[a]:l}:t);t({items:r})};return(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Header Settings","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Header","axvart"),checked:c,onChange:e=>t({showHeader:e})}),c&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Header Title","axvart"),value:a,onChange:e=>t({headerTitle:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Header Subtitle","axvart"),value:l,onChange:e=>t({headerSubtitle:e})}),(0,s.jsx)(n.TextareaControl,{label:(0,i.__)("Header Description","axvart"),value:d,onChange:e=>t({headerDescription:e}),rows:3})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Accordion Settings","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Allow Multiple Open","axvart"),checked:x,onChange:e=>t({allowMultipleOpen:e}),help:(0,i.__)("Allow multiple accordion items to be open at the same time","axvart")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Icon Style","axvart"),value:p,onChange:e=>t({iconStyle:e}),options:[{label:(0,i.__)("Plus/Minus","axvart"),value:"plus-minus"},{label:(0,i.__)("Arrow Down","axvart"),value:"arrow-down"},{label:(0,i.__)("Chevron Down","axvart"),value:"chevron-down"},{label:(0,i.__)("Triangle","axvart"),value:"triangle"}],help:(0,i.__)("Choose the icon style for accordion toggles","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Size","axvart"),value:g,onChange:e=>t({iconSize:e}),min:16,max:32,step:2,help:(0,i.__)("Adjust the size of accordion icons","axvart")})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Spacing","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Gap Between Header & Items","axvart"),value:b,onChange:e=>t({headerGap:e}),min:0,max:100,step:5,help:(0,i.__)("Space between accordion header and first item (in pixels)","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Gap Between Items","axvart"),value:f,onChange:e=>t({itemsGap:e}),min:0,max:100,step:5,help:(0,i.__)("Space between accordion items (in pixels)","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Header Container Width","axvart"),value:_,onChange:e=>t({headerWidth:e}),min:20,max:70,step:5,help:(0,i.__)("Width of header container (percentage, desktop only)","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Items Container Width","axvart"),value:y,onChange:e=>t({itemsWidth:e}),min:30,max:100,step:5,help:(0,i.__)("Width of accordion items container (percentage, desktop only)","axvart")}),(0,s.jsx)(n.__experimentalBoxControl,{label:(0,i.__)("Question Padding","axvart"),values:j,onChange:e=>t({questionPadding:e}),units:[],allowReset:!0,resetValues:{top:"20px",bottom:"20px",left:"20px",right:"20px"}}),(0,s.jsx)(n.__experimentalBoxControl,{label:(0,i.__)("Answer Padding","axvart"),values:S,onChange:e=>t({answerPadding:e}),units:[],allowReset:!0,resetValues:{top:"20px",bottom:"20px",left:"20px",right:"20px"}})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Accordion Items","axvart"),initialOpen:!1,children:[o.map((e,a)=>(0,s.jsxs)("div",{style:{marginBottom:"20px",padding:"15px",border:"1px solid #ddd",borderRadius:"4px"},children:[(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"},children:[(0,s.jsxs)("strong",{children:[(0,i.__)("Item","axvart")," ",a+1]}),(0,s.jsx)(n.Button,{isDestructive:!0,isSmall:!0,onClick:()=>{return a=e.id,void t({items:o.filter(e=>e.id!==a)});var a},children:(0,i.__)("Remove","axvart")})]}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Question","axvart"),value:e.question,onChange:t=>N(e.id,"question",t)}),(0,s.jsx)(n.TextareaControl,{label:(0,i.__)("Answer","axvart"),value:e.answer,onChange:t=>N(e.id,"answer",t),rows:3}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Open by Default","axvart"),checked:e.isOpen,onChange:t=>N(e.id,"isOpen",t)})]},e.id)),(0,s.jsx)(n.Button,{isPrimary:!0,onClick:()=>{const e={id:Date.now(),question:"New Question",answer:"New Answer",isOpen:!1};t({items:[...o,e]})},style:{marginTop:"10px"},children:(0,i.__)("Add Item","axvart")})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography","axvart"),initialOpen:!1,children:[c&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{style:{marginTop:"20px",marginBottom:"12px"},children:(0,i.__)("Header Title","axvart")}),(0,s.jsx)($,{element:"headerTitle",label:(0,i.__)("Font Size","axvart"),helpText:(0,i.__)("Set the font size for the header title","axvart")}),(0,s.jsx)(k,{element:"headerTitle",typographyStyles:C,setAttributes:t}),(0,s.jsx)("hr",{style:{margin:"20px 0",borderColor:"#ddd"}}),(0,s.jsx)("h3",{style:{marginTop:"20px",marginBottom:"12px"},children:(0,i.__)("Header Subtitle","axvart")}),(0,s.jsx)($,{element:"headerSubtitle",label:(0,i.__)("Font Size","axvart"),helpText:(0,i.__)("Set the font size for the header subtitle","axvart")}),(0,s.jsx)(k,{element:"headerSubtitle",typographyStyles:C,setAttributes:t}),(0,s.jsx)("hr",{style:{margin:"20px 0",borderColor:"#ddd"}}),(0,s.jsx)("h3",{style:{marginTop:"20px",marginBottom:"12px"},children:(0,i.__)("Header Description","axvart")}),(0,s.jsx)($,{element:"headerDescription",label:(0,i.__)("Font Size","axvart"),helpText:(0,i.__)("Set the font size for the header description","axvart")}),(0,s.jsx)(k,{element:"headerDescription",typographyStyles:C,setAttributes:t}),(0,s.jsx)("hr",{style:{margin:"20px 0",borderColor:"#ddd"}})]}),(0,s.jsx)("h3",{style:{marginTop:"20px",marginBottom:"12px"},children:(0,i.__)("Question Text","axvart")}),(0,s.jsx)($,{element:"questionText",label:(0,i.__)("Font Size","axvart"),helpText:(0,i.__)("Set the font size for accordion questions","axvart")}),(0,s.jsx)(k,{element:"questionText",typographyStyles:C,setAttributes:t}),(0,s.jsx)("hr",{style:{margin:"20px 0",borderColor:"#ddd"}}),(0,s.jsx)("h3",{style:{marginTop:"20px",marginBottom:"12px"},children:(0,i.__)("Answer Text","axvart")}),(0,s.jsx)($,{element:"answerText",label:(0,i.__)("Font Size","axvart"),helpText:(0,i.__)("Set the font size for accordion answers","axvart")}),(0,s.jsx)(k,{element:"answerText",typographyStyles:C,setAttributes:t})]}),(0,s.jsx)(w,{attributes:e,setAttributes:t})]})},T=({item:e,index:t,isOpen:o,toggleItem:a,updateItemContent:l,getFontSizeClass:n,getTypographyStyles:d,getIcon:c,questionPadding:x,answerPadding:p,colorSettings:g,iconSize:h,iconStyle:v})=>{const m=(0,u.useRef)(null),b=(0,u.useRef)(!1);(0,u.useLayoutEffect)(()=>{const e=m.current;if(e){if(!b.current)return b.current=!0,void(o?(e.style.maxHeight="none",e.style.overflow="visible"):(e.style.maxHeight="0",e.style.overflow="hidden"));if(o){e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden";const t=()=>{o&&(e.style.maxHeight="none",e.style.overflow="visible"),e.removeEventListener("transitionend",t)};return e.addEventListener("transitionend",t),()=>e.removeEventListener("transitionend",t)}e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden",e.offsetHeight,e.style.maxHeight="0"}},[o]),(0,u.useEffect)(()=>{const e=m.current;o&&e&&"none"!==e.style.maxHeight&&e.style.maxHeight},[e.answer,o]);const f=_()("accordion-item",{"is-open":o});return(0,s.jsxs)("div",{className:f,"data-icon-size":h,"data-index":t,children:[(0,s.jsxs)("div",{className:"accordion-question",onClick:()=>a(e.id),role:"button",tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a(e.id))},"aria-expanded":o,"aria-controls":`accordion-answer-${e.id}`,style:{paddingTop:x?.top||"20px",paddingBottom:x?.bottom||"20px",paddingLeft:x?.left||"20px",paddingRight:x?.right||"20px"},children:[(0,s.jsx)(r.RichText,{tagName:"h2",className:`question-text ${n("questionText")}`,value:`${t+1}. ${e.question}`,onChange:t=>{const o=t.replace(/^\d+\.\s*/,"");l(e.id,"question",o)},placeholder:(0,i.__)("Enter question...","axvart"),allowedFormats:["core/bold","core/italic"],style:d("questionText")}),(0,s.jsx)("div",{className:"accordion-icon",children:c(o)})]}),(0,s.jsx)("div",{id:`accordion-answer-${e.id}`,ref:m,className:"accordion-answer","aria-hidden":!o,style:{backgroundColor:g?.answerBgColor,"--answer-padding-top":p?.top||"20px","--answer-padding-bottom":p?.bottom||"20px","--answer-padding-left":p?.left||"20px","--answer-padding-right":p?.right||"20px"},children:(0,s.jsx)(r.RichText,{tagName:"p",className:`answer-text ${n("answerText")}`,value:e.answer,onChange:t=>l(e.id,"answer",t),placeholder:(0,i.__)("Enter answer...","axvart"),allowedFormats:["core/bold","core/italic","core/link"],style:{color:g&&g.answerText||"inherit",...d("answerText")}})})]})};(0,j.registerBlockType)(S.name,{...S,attributes:{items:{type:"array",default:[{id:1,question:"What services do you offer?",answer:"We provide grooming, hair styling, vet checkups, paw and nail care, training, and more for all types of pets.",isOpen:!0},{id:2,question:"Are your veterinarians certified?",answer:"Our services cover everything from professional grooming and pet styling to routine vet visits, nail trimming, and behavioral training for pets of all sizes.",isOpen:!1},{id:3,question:"Can you handle anxious or aggressive pets?",answer:"From paw care to hair styling, grooming to training, we provide a full range of services designed to keep pets healthy, happy, and well cared for.",isOpen:!1}]},headerTitle:{type:"string",default:"FAQ"},headerSubtitle:{type:"string",default:"Frequently Asked Questions"},headerDescription:{type:"string",default:"At PetCove, we're here to answer all your pet care questions covering grooming, health checkups, training, emergencies, and booking guidance for your furry friends."},showHeader:{type:"boolean",default:!0},allowMultipleOpen:{type:"boolean",default:!1},iconStyle:{type:"string",default:"plus-minus"},iconSize:{type:"number",default:24},colorSettings:{type:"object",default:{}},fontSizes:{type:"object",default:{headerTitle:"xx-large",headerSubtitle:"large",headerDescription:"medium",questionText:"large",answerText:"medium"}},fontSizePixels:{type:"object",default:{headerTitle:32,headerSubtitle:24,headerDescription:16,questionText:20,answerText:16}},fontSizeMode:{type:"object",default:{headerTitle:"preset",headerSubtitle:"preset",headerDescription:"preset",questionText:"preset",answerText:"preset"}},headerGap:{type:"number",default:50},itemsGap:{type:"number",default:30},itemsWidth:{type:"number",default:60},headerWidth:{type:"number",default:40},typographyStyles:{type:"object",default:{questionText:{},answerText:{},headerTitle:{},headerSubtitle:{},headerDescription:{}}},questionPadding:{type:"object",default:{top:"20px",bottom:"20px",left:"20px",right:"20px"}},answerPadding:{type:"object",default:{top:"20px",bottom:"20px",left:"20px",right:"20px"}}},edit:function({attributes:e,setAttributes:t}){const{items:o,headerTitle:a,headerSubtitle:l,headerDescription:n,showHeader:d,allowMultipleOpen:c,iconStyle:x,iconSize:p,colorSettings:g,fontSizes:h,fontSizePixels:v,fontSizeMode:m,headerGap:b,itemsGap:f,itemsWidth:y,headerWidth:_,typographyStyles:C,questionPadding:j,answerPadding:S}=e,w=e=>{const t=m?.[e]||"preset",o=h?.[e];return"preset"===t&&o?`has-${o}-font-size`:""},k=e=>{if("custom"===(m?.[e]||"preset")){const t=v?.[e];return t?{fontSize:`${t}px`}:{}}return{}},$=e=>{const t=C?.[e]||{};return{...k(e),...t.fontWeight&&{fontWeight:t.fontWeight},...t.lineHeight&&{lineHeight:t.lineHeight},...t.letterSpacing&&{letterSpacing:t.letterSpacing},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform}}},N=(0,r.useBlockProps)({className:"wp-block-axvart-accordion-block"}),[P,I]=(0,u.useState)(o.reduce((e,t)=>(t.isOpen&&(e[t.id]=!0),e),{})),z=e=>{I(c?t=>({...t,[e]:!t[e]}):{[e]:!P[e]})},R=(e,a,l)=>{const r=o.map(t=>t.id===e?{...t,[a]:l}:t);t({items:r})},H=e=>{const t=p||24,o={width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};switch(x){case"plus-minus":default:return e?(0,s.jsx)("svg",{...o,children:(0,s.jsx)("path",{d:"M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,s.jsx)("svg",{...o,children:(0,s.jsx)("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"arrow-down":return(0,s.jsx)("svg",{...o,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,s.jsx)("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"chevron-down":return(0,s.jsx)("svg",{...o,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,s.jsx)("path",{d:"M8 10L12 14L16 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"triangle":return(0,s.jsx)("svg",{...o,style:{transform:e?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,s.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}};return(0,s.jsxs)("div",{...N,children:[(0,s.jsx)(B,{attributes:e,setAttributes:t}),(0,s.jsxs)("div",{className:"accordion-layout",style:{"--header-gap":`${b}px`,"--items-gap":`${f}px`,"--items-width":`${y}%`,"--header-width":`${_}%`},children:[d&&(0,s.jsxs)("div",{className:"accordion-header",children:[(0,s.jsx)(r.RichText,{tagName:"h2",className:`header-title ${w("headerTitle")}`,value:a,onChange:e=>t({headerTitle:e}),placeholder:(0,i.__)("Enter header title...","axvart"),allowedFormats:["core/bold","core/italic"],style:{color:g&&g.headerTitle||"var(--wp--preset--color--contrast)",...$("headerTitle")}}),(0,s.jsx)(r.RichText,{tagName:"h3",className:`header-subtitle ${w("headerSubtitle")}`,value:l,onChange:e=>t({headerSubtitle:e}),placeholder:(0,i.__)("Enter header subtitle...","axvart"),allowedFormats:["core/bold","core/italic"],style:{color:g&&g.headerSubtitle||"var(--wp--preset--color--accent-5)",...$("headerSubtitle")}}),(0,s.jsx)(r.RichText,{tagName:"p",className:`header-description ${w("headerDescription")}`,value:n,onChange:e=>t({headerDescription:e}),placeholder:(0,i.__)("Enter header description...","axvart"),allowedFormats:["core/bold","core/italic","core/link"],style:{color:g&&g.headerDescription||"var(--wp--preset--color--accent-4)",...$("headerDescription")}})]}),(0,s.jsx)("div",{className:"accordion-items",style:{"--item-border-color":g?.itemBorderColor,"--question-bg-closed":g?.questionBgColor,"--question-bg-open":g?.questionBgOpen||g?.questionBgColor,"--answer-bg-color":g?.answerBgColor,"--question-text-closed":g?.questionClosed,"--question-text-open":g?.questionOpen,"--question-text-hover":g?.questionHover,"--icon-closed":g?.iconClosed,"--icon-open":g?.iconOpen,"--icon-hover":g?.iconHover},children:o.map((e,t)=>(0,s.jsx)(T,{item:e,index:t,isOpen:P[e.id],toggleItem:z,updateItemContent:R,getFontSizeClass:w,getTypographyStyles:$,getIcon:H,questionPadding:j,answerPadding:S,colorSettings:g,iconSize:p,iconStyle:x},e.id))})]})]})},save:function({attributes:e}){const{items:t,headerTitle:o,headerSubtitle:a,headerDescription:l,showHeader:n,iconStyle:i,iconSize:d,colorSettings:c,fontSizes:x,fontSizePixels:p,fontSizeMode:g,headerGap:u,itemsGap:h,itemsWidth:v,headerWidth:m,typographyStyles:b,questionPadding:f,answerPadding:y}=e,C=e=>{const t=g?.[e]||"preset",o=x?.[e];return"preset"===t&&o?`has-${o}-font-size`:""},j=e=>{if("custom"===(g?.[e]||"preset")){const t=p?.[e];return t?{fontSize:`${t}px`}:{}}return{}},S=e=>{const t=b?.[e]||{};return{...j(e),...t.fontWeight&&{fontWeight:t.fontWeight},...t.lineHeight&&{lineHeight:t.lineHeight},...t.letterSpacing&&{letterSpacing:t.letterSpacing},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform}}},w=r.useBlockProps.save({className:"wp-block-axvart-accordion-block"}),k=e=>{const t=d||24,o={width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};switch(i){case"plus-minus":default:return e?(0,s.jsx)("svg",{...o,children:(0,s.jsx)("path",{d:"M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,s.jsx)("svg",{...o,children:(0,s.jsx)("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"arrow-down":return(0,s.jsx)("svg",{...o,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,s.jsx)("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"chevron-down":return(0,s.jsx)("svg",{...o,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,s.jsx)("path",{d:"M8 10L12 14L16 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"triangle":return(0,s.jsx)("svg",{...o,style:{transform:e?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,s.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}};return(0,s.jsx)("div",{...w,children:(0,s.jsxs)("div",{className:"accordion-layout",style:{"--header-gap":`${u}px`,"--items-gap":`${h}px`,"--items-width":`${v}%`,"--header-width":`${m}%`},children:[n&&(0,s.jsxs)("div",{className:"accordion-header",children:[(0,s.jsx)(r.RichText.Content,{tagName:"h2",className:`header-title ${C("headerTitle")}`,value:o,style:{color:c&&c.headerTitle||"var(--wp--preset--color--contrast)",...S("headerTitle")}}),(0,s.jsx)(r.RichText.Content,{tagName:"h3",className:`header-subtitle ${C("headerSubtitle")}`,value:a,style:{color:c&&c.headerSubtitle||"var(--wp--preset--color--accent-5)",...S("headerSubtitle")}}),(0,s.jsx)(r.RichText.Content,{tagName:"p",className:`header-description ${C("headerDescription")}`,value:l,style:{color:c&&c.headerDescription||"var(--wp--preset--color--accent-4)",...S("headerDescription")}})]}),(0,s.jsx)("div",{className:"accordion-items",style:{"--item-border-color":c?.itemBorderColor,"--question-bg-closed":c?.questionBgColor,"--question-bg-open":c?.questionBgOpen||c?.questionBgColor,"--answer-bg-color":c?.answerBgColor,"--question-text-closed":c?.questionClosed,"--question-text-open":c?.questionOpen,"--question-text-hover":c?.questionHover,"--icon-closed":c?.iconClosed,"--icon-open":c?.iconOpen,"--icon-hover":c?.iconHover},children:t.map((e,t)=>{const o=_()("accordion-item",{"is-open":e.isOpen});return(0,s.jsxs)("div",{className:o,"data-icon-size":d,"data-index":t,children:[(0,s.jsxs)("div",{className:"accordion-question",role:"button",tabIndex:0,"aria-expanded":e.isOpen,"aria-controls":`accordion-answer-${e.id}`,"data-accordion-toggle":!0,"data-item-id":e.id,style:{paddingTop:f?.top||"20px",paddingBottom:f?.bottom||"20px",paddingLeft:f?.left||"20px",paddingRight:f?.right||"20px"},children:[(0,s.jsx)(r.RichText.Content,{tagName:"h2",className:`question-text ${C("questionText")}`,value:`${t+1}. ${e.question}`,style:S("questionText")}),(0,s.jsx)("div",{className:"accordion-icon","data-icon-style":i,"data-icon-size":d,children:k(e.isOpen)})]}),(0,s.jsx)("div",{id:`accordion-answer-${e.id}`,className:"accordion-answer","aria-hidden":!e.isOpen,"data-padding-top":y?.top||"20px","data-padding-bottom":y?.bottom||"20px","data-padding-left":y?.left||"20px","data-padding-right":y?.right||"20px",style:{backgroundColor:c?.answerBgColor,"--answer-padding-top":e.isOpen?y?.top||"20px":"0","--answer-padding-bottom":e.isOpen?y?.bottom||"20px":"0","--answer-padding-left":y?.left||"20px","--answer-padding-right":y?.right||"20px"},children:(0,s.jsx)(r.RichText.Content,{tagName:"p",className:`answer-text ${C("answerText")}`,value:e.answer,style:{color:c&&c.answerText||"inherit",...S("answerText")}})})]},e.id)})})]})})}});const $=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/animated-counter-block","version":"1.0.0","title":"Animated Counter / Milestones","category":"widgets","icon":"chart-line","description":"Display animated numbers that count up when visible in the viewport with extensive customization options.","example":{},"supports":{"html":false,"align":["wide","full"],"spacing":{"padding":true,"margin":true},"color":{"background":true,"text":true,"gradient":true},"typography":{"fontSize":true,"lineHeight":true}},"attributes":{"counters":{"type":"array","default":[{"id":1,"title":"Projects Completed","description":"Successfully delivered projects","startNumber":0,"endNumber":150,"prefix":"","suffix":"+","decimals":0,"icon":"","showIcon":true,"showTitle":true,"showDescription":true},{"id":2,"title":"Happy Clients","description":"Satisfied customers worldwide","startNumber":0,"endNumber":500,"prefix":"","suffix":"+","decimals":0,"icon":"","showIcon":true,"showTitle":true,"showDescription":true},{"id":3,"title":"Years Experience","description":"In the industry","startNumber":0,"endNumber":10,"prefix":"","suffix":"+","decimals":0,"icon":"","showIcon":true,"showTitle":true,"showDescription":true}]},"layout":{"type":"string","default":"grid"},"columns":{"type":"number","default":3},"columnGap":{"type":"number","default":20},"rowGap":{"type":"number","default":20},"alignment":{"type":"string","default":"center"},"animationDuration":{"type":"number","default":2000},"animationTrigger":{"type":"string","default":"scroll"},"enableSeparator":{"type":"boolean","default":true},"numberTypography":{"type":"object","default":{"fontSize":"48px","fontWeight":"700","fontFamily":"","lineHeight":"1.2"}},"titleTypography":{"type":"object","default":{"fontSize":"20px","fontWeight":"600","fontFamily":"","lineHeight":"1.4"}},"descriptionTypography":{"type":"object","default":{"fontSize":"14px","fontWeight":"400","fontFamily":"","lineHeight":"1.6"}},"numberColor":{"type":"string","default":"#000000"},"titleColor":{"type":"string","default":"#333333"},"descriptionColor":{"type":"string","default":"#666666"},"iconColor":{"type":"string","default":"#0066cc"},"itemBackgroundColor":{"type":"string","default":""},"itemBackgroundGradient":{"type":"string","default":""},"itemBackgroundImage":{"type":"string","default":""},"backgroundType":{"type":"string","default":"none"},"itemPadding":{"type":"object","default":{"top":"30px","right":"20px","bottom":"30px","left":"20px"}},"itemMargin":{"type":"object","default":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}},"borderWidth":{"type":"number","default":0},"borderColor":{"type":"string","default":"#dddddd"},"borderRadius":{"type":"number","default":8},"borderStyle":{"type":"string","default":"solid"},"glassEffect":{"type":"boolean","default":false},"glassBlur":{"type":"number","default":10},"glassOpacity":{"type":"number","default":0.8},"neumorphism":{"type":"boolean","default":false},"neumorphismIntensity":{"type":"string","default":"medium"},"entranceAnimation":{"type":"string","default":"fade-in"},"animationDelay":{"type":"number","default":0},"animationStagger":{"type":"number","default":100},"hoverEffect":{"type":"string","default":"none"},"hoverScale":{"type":"number","default":1.05},"customCSS":{"type":"string","default":""},"hideOnMobile":{"type":"boolean","default":false},"hideOnTablet":{"type":"boolean","default":false},"hideOnDesktop":{"type":"boolean","default":false},"iconSize":{"type":"number","default":40}},"textdomain":"axvart","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./frontend.js"}');(0,j.registerBlockType)($.name,{...$,edit:function({attributes:e,setAttributes:t,clientId:o}){const{counters:a,layout:l,columns:d,columnGap:c,rowGap:x,alignment:p,animationDuration:g,animationTrigger:h,enableSeparator:v,numberTypography:m,titleTypography:b,descriptionTypography:f,numberColor:y,titleColor:C,descriptionColor:j,iconColor:S,itemBackgroundColor:w,itemBackgroundGradient:k,itemBackgroundImage:B,backgroundType:T,itemPadding:$,itemMargin:N,borderWidth:P,borderColor:I,borderRadius:z,borderStyle:R,glassEffect:H,glassBlur:F,glassOpacity:L,neumorphism:M,neumorphismIntensity:E,entranceAnimation:W,animationDelay:O,animationStagger:A,hoverEffect:D,hoverScale:G,customCSS:U,hideOnMobile:q,hideOnTablet:V,hideOnDesktop:Y,iconSize:X}=e,[J,K]=(0,u.useState)(0),Q=(0,r.useBlockProps)({className:_()("animated-counter-block",{[`layout-${l}`]:l,[`align-${p}`]:p,"hide-mobile":q,"hide-tablet":V,"hide-desktop":Y})}),Z=(e,o,l)=>{const r=[...a];r[e]={...r[e],[o]:l},t({counters:r})},ee=(e,t,o)=>{const a=(parseFloat(e)||0).toFixed(t);return o?a.replace(/\B(?=(\d{3})+(?!\d))/g,","):a},te=()=>{let e={padding:`${$.top} ${$.right} ${$.bottom} ${$.left}`,margin:`${N.top} ${N.right} ${N.bottom} ${N.left}`,borderWidth:`${P}px`,borderColor:I,borderStyle:R,borderRadius:`${z}px`};if("solid"===T&&w?e.backgroundColor=w:"gradient"===T&&k?e.background=k:"image"===T&&B&&(e.backgroundImage=`url(${B})`,e.backgroundSize="cover",e.backgroundPosition="center"),H&&(e.backdropFilter=`blur(${F}px)`,e.WebkitBackdropFilter=`blur(${F}px)`,e.backgroundColor=`rgba(255, 255, 255, ${L})`,e.border="1px solid rgba(255, 255, 255, 0.3)"),M){const t="light"===E?"5px":"medium"===E?"10px":"15px";e.boxShadow=`${t} ${t} ${2*parseInt(t)}px rgba(0, 0, 0, 0.1), -${t} -${t} ${2*parseInt(t)}px rgba(255, 255, 255, 0.7)`,e.backgroundColor=w||"#e0e5ec"}return e};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Layout Settings","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Layout Type","axvart"),value:l,options:[{label:"Grid",value:"grid"},{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:e=>t({layout:e})}),"grid"===l&&(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Columns","axvart"),value:d,onChange:e=>t({columns:e}),min:1,max:6}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Column Gap (px)","axvart"),value:c,onChange:e=>t({columnGap:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Row Gap (px)","axvart"),value:x,onChange:e=>t({rowGap:e}),min:0,max:100}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Alignment","axvart"),value:p,options:[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],onChange:e=>t({alignment:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Animation Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Animation Trigger","axvart"),value:h,options:[{label:"On Scroll Into View",value:"scroll"},{label:"On Page Load",value:"load"}],onChange:e=>t({animationTrigger:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Animation Duration (ms)","axvart"),value:g,onChange:e=>t({animationDuration:e}),min:500,max:5e3,step:100}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Entrance Animation","axvart"),value:W,options:[{label:"None",value:"none"},{label:"Fade In",value:"fade-in"},{label:"Slide Up",value:"slide-up"},{label:"Slide Down",value:"slide-down"},{label:"Slide Left",value:"slide-left"},{label:"Slide Right",value:"slide-right"},{label:"Zoom In",value:"zoom-in"}],onChange:e=>t({entranceAnimation:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Animation Delay (ms)","axvart"),value:O,onChange:e=>t({animationDelay:e}),min:0,max:2e3,step:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Stagger Delay (ms)","axvart"),value:A,onChange:e=>t({animationStagger:e}),min:0,max:500,step:50})]}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Number Formatting","axvart"),initialOpen:!1,children:(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Thousand Separators","axvart"),checked:v,onChange:e=>t({enableSeparator:e})})}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Counter Items","axvart"),initialOpen:!0,children:[(0,s.jsxs)("div",{className:"counter-tabs",children:[(0,s.jsx)(n.ButtonGroup,{children:a.map((e,t)=>(0,s.jsx)(n.Button,{isPressed:J===t,onClick:()=>K(t),children:t+1},e.id))}),(0,s.jsx)(n.Button,{isSecondary:!0,onClick:()=>{const e={id:Date.now(),title:"New Milestone",description:"Description here",startNumber:0,endNumber:100,prefix:"",suffix:"+",decimals:0,icon:"",showIcon:!0,showTitle:!0,showDescription:!0};t({counters:[...a,e]}),K(a.length)},style:{marginTop:"10px",width:"100%"},children:(0,i.__)("+ Add Counter","axvart")})]}),a.length>0&&a[J]&&(0,s.jsxs)("div",{className:"counter-settings",style:{marginTop:"20px"},children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Title","axvart"),value:a[J].title,onChange:e=>Z(J,"title",e)}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Description","axvart"),value:a[J].description,onChange:e=>Z(J,"description",e)}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Start Number","axvart"),value:a[J].startNumber,onChange:e=>Z(J,"startNumber",e),min:0,max:1e4}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("End Number","axvart"),value:a[J].endNumber,onChange:e=>Z(J,"endNumber",e),min:0,max:1e4}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Prefix","axvart"),value:a[J].prefix,onChange:e=>Z(J,"prefix",e),placeholder:"$, #, etc."}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Suffix","axvart"),value:a[J].suffix,onChange:e=>Z(J,"suffix",e),placeholder:"+, %, k, M, etc."}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Decimal Places","axvart"),value:a[J].decimals,onChange:e=>Z(J,"decimals",e),min:0,max:3}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Icon SVG Code","axvart"),value:a[J].icon,onChange:e=>Z(J,"icon",e),help:(0,i.__)("Paste SVG code or leave empty","axvart")}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Icon","axvart"),checked:a[J].showIcon,onChange:e=>Z(J,"showIcon",e)}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Title","axvart"),checked:a[J].showTitle,onChange:e=>Z(J,"showTitle",e)}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Description","axvart"),checked:a[J].showDescription,onChange:e=>Z(J,"showDescription",e)}),(0,s.jsxs)("div",{style:{display:"flex",gap:"10px",marginTop:"15px"},children:[(0,s.jsx)(n.Button,{isDestructive:!0,onClick:()=>(e=>{const o=a.filter((t,o)=>o!==e);t({counters:o}),J>=o.length&&K(Math.max(0,o.length-1))})(J),children:(0,i.__)("Remove","axvart")}),(0,s.jsx)(n.Button,{isSecondary:!0,onClick:()=>(e=>{const o={...a[e],id:Date.now()},l=[...a];l.splice(e+1,0,o),t({counters:l})})(J),children:(0,i.__)("Duplicate","axvart")})]})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography","axvart"),initialOpen:!1,children:[(0,s.jsx)("h3",{children:(0,i.__)("Number Typography","axvart")}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Font Size","axvart"),value:m.fontSize,onChange:e=>t({numberTypography:{...m,fontSize:e}})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Weight","axvart"),value:m.fontWeight,options:[{label:"300 - Light",value:"300"},{label:"400 - Normal",value:"400"},{label:"500 - Medium",value:"500"},{label:"600 - Semi Bold",value:"600"},{label:"700 - Bold",value:"700"},{label:"800 - Extra Bold",value:"800"}],onChange:e=>t({numberTypography:{...m,fontWeight:e}})}),(0,s.jsx)("hr",{}),(0,s.jsx)("h3",{children:(0,i.__)("Title Typography","axvart")}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Font Size","axvart"),value:b.fontSize,onChange:e=>t({titleTypography:{...b,fontSize:e}})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Weight","axvart"),value:b.fontWeight,options:[{label:"300 - Light",value:"300"},{label:"400 - Normal",value:"400"},{label:"500 - Medium",value:"500"},{label:"600 - Semi Bold",value:"600"},{label:"700 - Bold",value:"700"}],onChange:e=>t({titleTypography:{...b,fontWeight:e}})}),(0,s.jsx)("hr",{}),(0,s.jsx)("h3",{children:(0,i.__)("Description Typography","axvart")}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Font Size","axvart"),value:f.fontSize,onChange:e=>t({descriptionTypography:{...f,fontSize:e}})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Weight","axvart"),value:f.fontWeight,options:[{label:"300 - Light",value:"300"},{label:"400 - Normal",value:"400"},{label:"500 - Medium",value:"500"}],onChange:e=>t({descriptionTypography:{...f,fontWeight:e}})}),(0,s.jsx)("hr",{}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Size (px)","axvart"),value:X,onChange:e=>t({iconSize:e}),min:20,max:100})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Colors","axvart"),initialOpen:!1,children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Number Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:y,onChange:e=>t({numberColor:e})}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Title Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:C,onChange:e=>t({titleColor:e})}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Description Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:j,onChange:e=>t({descriptionColor:e})}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Icon Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:S,onChange:e=>t({iconColor:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Item Background","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Background Type","axvart"),value:T,options:[{label:"None",value:"none"},{label:"Solid Color",value:"solid"},{label:"Gradient",value:"gradient"},{label:"Image",value:"image"}],onChange:e=>t({backgroundType:e})}),"solid"===T&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Background Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:w,onChange:e=>t({itemBackgroundColor:e})})]}),"gradient"===T&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Gradient","axvart")})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("CSS Gradient","axvart"),value:k||"",onChange:e=>t({itemBackgroundGradient:e}),placeholder:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",help:(0,i.__)("Enter a CSS gradient value","axvart")}),(0,s.jsxs)("div",{style:{marginTop:"10px"},children:[(0,s.jsx)("p",{style:{marginBottom:"5px",fontSize:"12px",fontWeight:"500"},children:(0,i.__)("Preset Gradients:","axvart")}),(0,s.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"8px"},children:[(0,s.jsx)(n.Button,{style:{background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",height:"40px",border:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"===k?"2px solid #000":"none"},onClick:()=>t({itemBackgroundGradient:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"})}),(0,s.jsx)(n.Button,{style:{background:"linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",height:"40px",border:"linear-gradient(135deg, #f093fb 0%, #f5576c 100%)"===k?"2px solid #000":"none"},onClick:()=>t({itemBackgroundGradient:"linear-gradient(135deg, #f093fb 0%, #f5576c 100%)"})}),(0,s.jsx)(n.Button,{style:{background:"linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",height:"40px",border:"linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)"===k?"2px solid #000":"none"},onClick:()=>t({itemBackgroundGradient:"linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)"})}),(0,s.jsx)(n.Button,{style:{background:"linear-gradient(135deg, #fa709a 0%, #fee140 100%)",height:"40px",border:"linear-gradient(135deg, #fa709a 0%, #fee140 100%)"===k?"2px solid #000":"none"},onClick:()=>t({itemBackgroundGradient:"linear-gradient(135deg, #fa709a 0%, #fee140 100%)"})}),(0,s.jsx)(n.Button,{style:{background:"linear-gradient(135deg, #30cfd0 0%, #330867 100%)",height:"40px",border:"linear-gradient(135deg, #30cfd0 0%, #330867 100%)"===k?"2px solid #000":"none"},onClick:()=>t({itemBackgroundGradient:"linear-gradient(135deg, #30cfd0 0%, #330867 100%)"})}),(0,s.jsx)(n.Button,{style:{background:"linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)",height:"40px",border:"linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)"===k?"2px solid #000":"none"},onClick:()=>t({itemBackgroundGradient:"linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)"})})]})]})]}),"image"===T&&(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({itemBackgroundImage:e.url}),type:"image",value:B,render:({open:e})=>(0,s.jsx)(n.Button,{onClick:e,isSecondary:!0,children:B?(0,i.__)("Change Image","axvart"):(0,i.__)("Select Image","axvart")})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Spacing","axvart"),initialOpen:!1,children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Padding","axvart")})}),(0,s.jsx)(n.__experimentalBoxControl,{values:$,onChange:e=>t({itemPadding:e})}),(0,s.jsx)("p",{style:{marginTop:"20px"},children:(0,s.jsx)("strong",{children:(0,i.__)("Margin","axvart")})}),(0,s.jsx)(n.__experimentalBoxControl,{values:N,onChange:e=>t({itemMargin:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Border & Radius","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Width (px)","axvart"),value:P,onChange:e=>t({borderWidth:e}),min:0,max:10}),P>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Border Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:I,onChange:e=>t({borderColor:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Border Style","axvart"),value:R,options:[{label:"Solid",value:"solid"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"},{label:"Double",value:"double"}],onChange:e=>t({borderStyle:e})})]}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius (px)","axvart"),value:z,onChange:e=>t({borderRadius:e}),min:0,max:50})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Visual Effects","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Glass Effect","axvart"),checked:H,onChange:e=>t({glassEffect:e}),help:(0,i.__)("Glass effect works best when there's a background image or color on the page section.","axvart")}),H&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Blur Intensity (px)","axvart"),value:F,onChange:e=>t({glassBlur:e}),min:0,max:30}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Opacity","axvart"),value:L,onChange:e=>t({glassOpacity:e}),min:0,max:1,step:.1})]}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Neumorphism","axvart"),checked:M,onChange:e=>t({neumorphism:e})}),M&&(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Shadow Intensity","axvart"),value:E,options:[{label:"Light",value:"light"},{label:"Medium",value:"medium"},{label:"Strong",value:"strong"}],onChange:e=>t({neumorphismIntensity:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Hover Effects","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Hover Effect","axvart"),value:D,options:[{label:"None",value:"none"},{label:"Scale",value:"scale"},{label:"Lift (Shadow)",value:"lift"},{label:"Tint",value:"tint"},{label:"Glow",value:"glow"}],onChange:e=>t({hoverEffect:e})}),"scale"===D&&(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Scale Amount","axvart"),value:G,onChange:e=>t({hoverScale:e}),min:1,max:1.2,step:.05})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Responsive Visibility","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Hide on Mobile","axvart"),checked:q,onChange:e=>t({hideOnMobile:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Hide on Tablet","axvart"),checked:V,onChange:e=>t({hideOnTablet:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Hide on Desktop","axvart"),checked:Y,onChange:e=>t({hideOnDesktop:e})})]}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Advanced","axvart"),initialOpen:!1,children:(0,s.jsx)(n.TextControl,{label:(0,i.__)("Custom CSS","axvart"),value:U,onChange:e=>t({customCSS:e}),help:(0,i.__)("Add custom CSS for this block","axvart")})})]}),(0,s.jsxs)("div",{...Q,children:[U&&(0,s.jsx)("style",{children:U}),(0,s.jsx)("div",{className:"animated-counter-container",style:(()=>{let e={};return"grid"===l?(e.display="grid",e.gridTemplateColumns=`repeat(${d}, 1fr)`,e.gap=`${x}px ${c}px`):"horizontal"===l?(e.display="flex",e.flexDirection="row",e.gap=`${c}px`,e.flexWrap="wrap"):"vertical"===l&&(e.display="flex",e.flexDirection="column",e.gap=`${x}px`),e.textAlign=p,e})(),children:a.map((e,t)=>(0,s.jsxs)("div",{className:_()("counter-item",{[`hover-${D}`]:"none"!==D,"glass-effect":H,neumorphism:M}),style:te(),children:[e.showIcon&&e.icon&&(0,s.jsx)("div",{className:"counter-icon",style:{color:S,fontSize:`${X}px`,width:`${X}px`,height:`${X}px`},dangerouslySetInnerHTML:{__html:e.icon}}),(0,s.jsxs)("div",{className:"counter-number",style:{fontSize:m.fontSize,fontWeight:m.fontWeight,lineHeight:m.lineHeight,color:y},children:[e.prefix,ee(e.endNumber,e.decimals,v),e.suffix]}),e.showTitle&&(0,s.jsx)("div",{className:"counter-title",style:{fontSize:b.fontSize,fontWeight:b.fontWeight,lineHeight:b.lineHeight,color:C},children:e.title}),e.showDescription&&e.description&&(0,s.jsx)("div",{className:"counter-description",style:{fontSize:f.fontSize,fontWeight:f.fontWeight,lineHeight:f.lineHeight,color:j},children:e.description})]},e.id))})]})]})},save:function({attributes:e}){const{counters:t,layout:o,columns:a,columnGap:l,rowGap:r,alignment:n,animationDuration:i,animationTrigger:d,enableSeparator:c,numberTypography:x,titleTypography:p,descriptionTypography:g,numberColor:u,titleColor:h,descriptionColor:v,iconColor:m,itemBackgroundColor:b,itemBackgroundGradient:f,itemBackgroundImage:y,backgroundType:C,itemPadding:j,itemMargin:S,borderWidth:w,borderColor:k,borderRadius:B,borderStyle:T,glassEffect:$,glassBlur:N,glassOpacity:P,neumorphism:I,neumorphismIntensity:z,entranceAnimation:R,animationDelay:H,animationStagger:F,hoverEffect:L,hoverScale:M,customCSS:E,hideOnMobile:W,hideOnTablet:O,hideOnDesktop:A,iconSize:D}=e,G=_()("animated-counter-block",{[`layout-${o}`]:o,[`align-${n}`]:n,"hide-mobile":W,"hide-tablet":O,"hide-desktop":A}),U=()=>{let e={padding:`${j.top} ${j.right} ${j.bottom} ${j.left}`,margin:`${S.top} ${S.right} ${S.bottom} ${S.left}`,borderWidth:`${w}px`,borderColor:k,borderStyle:T,borderRadius:`${B}px`};if("solid"===C&&b?e.backgroundColor=b:"gradient"===C&&f?e.background=f:"image"===C&&y&&(e.backgroundImage=`url(${y})`,e.backgroundSize="cover",e.backgroundPosition="center"),$&&(e.backdropFilter=`blur(${N}px)`,e.WebkitBackdropFilter=`blur(${N}px)`,e.backgroundColor=`rgba(255, 255, 255, ${P})`,e.border="1px solid rgba(255, 255, 255, 0.3)"),I){const t="light"===z?"5px":"medium"===z?"10px":"15px";e.boxShadow=`${t} ${t} ${2*parseInt(t)}px rgba(0, 0, 0, 0.1), -${t} -${t} ${2*parseInt(t)}px rgba(255, 255, 255, 0.7)`,e.backgroundColor=b||"#e0e5ec"}return e};return(0,s.jsxs)("div",{className:G,children:[E&&(0,s.jsx)("style",{children:E}),(0,s.jsx)("div",{className:"animated-counter-container",style:(()=>{let e={};return"grid"===o?(e.display="grid",e.gridTemplateColumns=`repeat(${a}, 1fr)`,e.gap=`${r}px ${l}px`):"horizontal"===o?(e.display="flex",e.flexDirection="row",e.gap=`${l}px`,e.flexWrap="wrap"):"vertical"===o&&(e.display="flex",e.flexDirection="column",e.gap=`${r}px`),e.textAlign=n,e})(),"data-trigger":d,"data-duration":i,"data-separator":c?"1":"0","data-entrance":R,"data-delay":H,"data-stagger":F,children:t.map((e,t)=>(0,s.jsxs)("div",{className:_()("counter-item",{[`hover-${L}`]:"none"!==L,[`entrance-${R}`]:"none"!==R,"glass-effect":$,neumorphism:I}),style:U(),"data-hover-scale":M,children:[e.showIcon&&e.icon&&(0,s.jsx)("div",{className:"counter-icon",style:{color:m,fontSize:`${D}px`,width:`${D}px`,height:`${D}px`},dangerouslySetInnerHTML:{__html:e.icon}}),(0,s.jsxs)("div",{className:"counter-number",style:{fontSize:x.fontSize,fontWeight:x.fontWeight,lineHeight:x.lineHeight,color:u},"data-start":e.startNumber,"data-end":e.endNumber,"data-prefix":e.prefix,"data-suffix":e.suffix,"data-decimals":e.decimals,children:[e.prefix,"0",e.suffix]}),e.showTitle&&(0,s.jsx)("div",{className:"counter-title",style:{fontSize:p.fontSize,fontWeight:p.fontWeight,lineHeight:p.lineHeight,color:h},children:e.title}),e.showDescription&&e.description&&(0,s.jsx)("div",{className:"counter-description",style:{fontSize:g.fontSize,fontWeight:g.fontWeight,lineHeight:g.lineHeight,color:v},children:e.description})]},e.id))})]})}});const N=window.wp.primitives;var P=(0,s.jsx)(N.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(N.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),I=(0,s.jsx)(N.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(N.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const{registerBlockType:z}=wp.blocks;z("axvart/button-widget",{apiVersion:3,title:(0,i.__)("Button Widget","axvart"),description:(0,i.__)("A fully customizable button widget with text and icon-only variations, supporting circular icon-only display.","axvart"),category:"widgets",icon:"button",keywords:["button","widget","cta","icon","customizable"],supports:{html:!0,align:["wide","full"],spacing:{margin:!0,padding:!0},color:{text:!0,background:!0}},attributes:{buttonText:{type:"string",default:"Add text..."},buttonUrl:{type:"string",default:""},openInNewTab:{type:"boolean",default:!1},buttonType:{type:"string",default:"text-with-icon"},iconType:{type:"string",default:"arrow"},customIcon:{type:"string",default:"↗"},customIconImageId:{type:"number",default:0},customIconImageUrl:{type:"string",default:""},customIconImageAlt:{type:"string",default:""},backgroundColor:{type:"string",default:"var:preset|color|axvart-light-green"},textColor:{type:"string",default:"var:preset|color|axvart-black"},iconBackgroundColor:{type:"string",default:"var:preset|color|axvart-black"},iconColor:{type:"string",default:"var:preset|color|axvart-white"},hoverBackgroundColor:{type:"string",default:""},hoverTextColor:{type:"string",default:""},hoverIconColor:{type:"string",default:""},hoverIconBackgroundColor:{type:"string",default:""},borderRadius:{type:"number",default:25},borderWidth:{type:"number",default:0},borderColor:{type:"string",default:""},fontSize:{type:"number",default:16},fontWeight:{type:"string",default:"600"},iconSize:{type:"number",default:16},iconCircleSize:{type:"number",default:38},gap:{type:"number",default:12},padding:{type:"object",default:{top:"5px",right:"5px",bottom:"5px",left:"20px"}},margin:{type:"object",default:{top:"0px",right:"0px",bottom:"0px",left:"0px"}},width:{type:"string",default:"fit-content"},height:{type:"string",default:"auto"},alignment:{type:"string",default:"left"},hoverEffect:{type:"boolean",default:!0},shadowEnabled:{type:"boolean",default:!0},shadowColor:{type:"string",default:"rgba(0,0,0,0.1)"},shadowBlur:{type:"number",default:4},shadowOffsetX:{type:"number",default:0},shadowOffsetY:{type:"number",default:2},showBgColorPicker:{type:"boolean",default:!1},showTextColorPicker:{type:"boolean",default:!1},showIconBgColorPicker:{type:"boolean",default:!1},showIconColorPicker:{type:"boolean",default:!1},emailPlaceholder:{type:"string",default:"Enter Your Email Address"},emailInputStyle:{type:"string",default:"white-input-dark-button"},formAction:{type:"string",default:""},formMethod:{type:"string",default:"post"}},edit:({attributes:e,setAttributes:t,isSelected:o})=>{const[a=[]]=(0,r.useSettings)("color.palette"),l=e=>`var:preset|color|${e}`,d=e=>e&&(e=>"string"==typeof e&&e.startsWith("var:preset|color|"))(e)?`var(--wp--preset--color--${e.split("|").pop()})`:e,[c,x]=(0,u.useState)({bgColor:!1,textColor:!1,iconBgColor:!1,iconColor:!1,borderColor:!1,hoverBgColor:!1,hoverTextColor:!1,hoverIconBgColor:!1,hoverIconColor:!1}),p=e=>{x(t=>({...t,[e]:!t[e]}))},{buttonText:g,buttonUrl:h,openInNewTab:v,buttonType:m,iconType:b,customIcon:f,customIconImageId:y,customIconImageUrl:_,customIconImageAlt:C,backgroundColor:j,textColor:S,iconBackgroundColor:w,iconColor:k,hoverBackgroundColor:B,hoverTextColor:T,hoverIconColor:$,hoverIconBackgroundColor:N,borderRadius:z,borderWidth:R,borderColor:H,fontSize:F,fontWeight:L,iconSize:M,iconCircleSize:E,gap:W,padding:O,margin:A,width:D,height:G,alignment:U,hoverEffect:q,shadowEnabled:V,shadowColor:Y,shadowBlur:X,shadowOffsetX:J,shadowOffsetY:K,emailPlaceholder:Q,emailInputStyle:Z,formAction:ee,formMethod:te}=e,oe={backgroundColor:"var:preset|color|axvart-light-green",textColor:"var:preset|color|axvart-black",iconBackgroundColor:"var:preset|color|axvart-black",iconColor:"var:preset|color|axvart-white",hoverBackgroundColor:"var:preset|color|axvart-light-blue",hoverTextColor:"var:preset|color|axvart-white",hoverIconBackgroundColor:"var:preset|color|axvart-light-green",hoverIconColor:"var:preset|color|axvart-black",borderColor:"",shadowColor:"rgba(0,0,0,0.1)"},ae=(e,o)=>{null==o?t({[e]:oe[e]}):((e,o)=>{if(null==o)return;const r=(e=>{if(!e||!Array.isArray(a))return null;const t=String(e).toLowerCase(),o=a.find(e=>String(e.color).toLowerCase()===t);return o?o.slug:null})(o);t(r?{[e]:l(r)}:{[e]:o})})(e,o)},[le,re]=(0,u.useState)(!1),ne=()=>{switch(b){case"arrow":default:return(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"chevron":return(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"plus":return(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"image":return _?(0,s.jsx)("img",{src:_,alt:C||"",style:{display:"block",width:"1em",height:"1em",objectFit:"contain"}}):(0,s.jsx)("span",{style:{fontSize:"0.8em",lineHeight:1},children:"[+]"});case"custom":return f}},ie={color:d(S),fontSize:`${F}px`,fontWeight:L},se={position:"relative",display:"inline-flex",alignItems:"center",gap:"icon-only"===m?"0px":`${W}px`,backgroundColor:d("icon-only"===m?w:j),color:d("icon-only"===m?k:S),borderRadius:"icon-only"===m?"50%":`${z}px`,border:R>0?`${R}px solid ${d(H)}`:"none",fontSize:`${F}px`,fontWeight:L,padding:"icon-only"===m?"0":`${O.top} ${O.right} ${O.bottom} ${O.left}`,margin:`${A.top} ${A.right} ${A.bottom} ${A.left}`,width:"icon-only"===m?`${E}px`:D,height:"icon-only"===m?`${E}px`:G,textAlign:U,textDecoration:"none",cursor:"pointer",boxShadow:V?`${J}px ${K}px ${X}px ${Y}`:"none",justifyContent:"icon-only"===m?"center":"flex-start","--button-icon-color":d(k),...B?{"--button-hover-bg-color":d(B)}:{},...T?{"--button-hover-text-color":d(T)}:{},...$?{"--button-icon-hover-color":d($)}:{},...N?{"--button-hover-icon-bg-color":d(N)}:{}},de={display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${E}px`,height:`${E}px`,backgroundColor:d(w),color:d(k),borderRadius:"50%",fontSize:`${M}px`,fontWeight:"bold",boxShadow:V?"0 2px 4px rgba(0,0,0,0.1)":"none"},ce=(0,r.useBlockProps)({className:"button-widget-container",style:{textAlign:U}});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.BlockControls,{children:[(0,s.jsx)(r.AlignmentToolbar,{value:U,onChange:e=>t({alignment:e})}),(0,s.jsx)(n.Button,{icon:h?P:I,label:h?(0,i.__)("Edit link","axvart"):(0,i.__)("Add link","axvart"),onClick:()=>re(!le),isPressed:le})]}),(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Button Settings","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Button Type","axvart"),value:m,options:[{label:(0,i.__)("Text with Icon","axvart"),value:"text-with-icon"},{label:(0,i.__)("Text Only","axvart"),value:"text-only"},{label:(0,i.__)("Icon Only","axvart"),value:"icon-only"},{label:(0,i.__)("Email Input","axvart"),value:"email-input"}],onChange:e=>t({buttonType:e})}),"text-only"!==m&&"email-input"!==m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Icon Type","axvart"),value:b,options:[{label:(0,i.__)("Arrow","axvart"),value:"arrow"},{label:(0,i.__)("Chevron","axvart"),value:"chevron"},{label:(0,i.__)("Plus","axvart"),value:"plus"},{label:(0,i.__)("Custom Character","axvart"),value:"custom"},{label:(0,i.__)("Upload Image","axvart"),value:"image"}],onChange:e=>t({iconType:e})}),"custom"===b&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Custom Icon","axvart"),value:f,onChange:e=>t({customIcon:e}),help:(0,i.__)("Enter any character or symbol","axvart")}),"image"===b&&(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,s.jsx)(r.MediaUpload,{onSelect:e=>{t({customIconImageId:e.id||0,customIconImageUrl:(e.sizes&&e.sizes.thumbnail?e.sizes.thumbnail.url:e.url)||"",customIconImageAlt:e.alt||e.title||""})},allowedTypes:["image"],value:y,render:({open:e})=>(0,s.jsx)(n.Button,{variant:"secondary",onClick:e,children:_?(0,i.__)("Change Icon Image","axvart"):(0,i.__)("Select Icon Image","axvart")})}),_&&(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,s.jsx)("img",{src:_,alt:"",style:{width:"32px",height:"32px",objectFit:"contain",background:"#fff",border:"1px solid #ddd"}}),(0,s.jsx)(n.Button,{variant:"link",isDestructive:!0,onClick:()=>t({customIconImageId:0,customIconImageUrl:"",customIconImageAlt:""}),children:(0,i.__)("Remove","axvart")})]})]})]}),"email-input"===m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Email Placeholder","axvart"),value:Q,onChange:e=>t({emailPlaceholder:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Email Input Style","axvart"),value:Z,options:[{label:(0,i.__)("White Input, Dark Button","axvart"),value:"white-input-dark-button"},{label:(0,i.__)("Dark Input, White Button","axvart"),value:"dark-input-white-button"}],onChange:e=>t({emailInputStyle:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Form Action URL","axvart"),value:ee,onChange:e=>t({formAction:e}),help:(0,i.__)("URL where the form will be submitted (optional)","axvart")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Form Method","axvart"),value:te,options:[{label:(0,i.__)("POST","axvart"),value:"post"},{label:(0,i.__)("GET","axvart"),value:"get"}],onChange:e=>t({formMethod:e})})]}),"email-input"!==m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Button URL","axvart"),value:h,onChange:e=>t({buttonUrl:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Open in new tab","axvart"),checked:v,onChange:e=>t({openInNewTab:e})})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Colors","axvart"),initialOpen:!0,children:[(0,s.jsxs)("div",{style:{marginBottom:"16px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)("span",{style:{fontWeight:"600"},children:(0,i.__)("Color Settings","axvart")}),(0,s.jsx)(n.Button,{variant:"secondary",size:"small",onClick:()=>{t({backgroundColor:oe.backgroundColor,textColor:oe.textColor,iconBackgroundColor:oe.iconBackgroundColor,iconColor:oe.iconColor,hoverBackgroundColor:oe.hoverBackgroundColor,hoverTextColor:oe.hoverTextColor,hoverIconBackgroundColor:oe.hoverIconBackgroundColor,hoverIconColor:oe.hoverIconColor,borderColor:oe.borderColor,shadowColor:oe.shadowColor})},style:{fontSize:"12px",padding:"4px 8px"},children:(0,i.__)("Reset All","axvart")})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("bgColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Background Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.bgColor?"▲":"▼"})]}),c.bgColor&&(0,s.jsxs)("div",{style:{padding:"12px 0"},children:[(0,s.jsx)(r.ColorPalette,{value:d(j),onChange:e=>ae("backgroundColor",e),clearable:!0,colors:a}),j===oe.backgroundColor&&(0,s.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,i.__)("Using theme default color","axvart")})]})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("textColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Text Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.textColor?"▲":"▼"})]}),c.textColor&&(0,s.jsxs)("div",{style:{padding:"12px 0"},children:[(0,s.jsx)(r.ColorPalette,{value:d(S),onChange:e=>ae("textColor",e),clearable:!0,colors:a}),S===oe.textColor&&(0,s.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,i.__)("Using theme default color","axvart")})]})]}),"text-only"!==m&&"email-input"!==m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("iconBgColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Icon Background Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.iconBgColor?"▲":"▼"})]}),c.iconBgColor&&(0,s.jsxs)("div",{style:{padding:"12px 0"},children:[(0,s.jsx)(r.ColorPalette,{value:d(w),onChange:e=>ae("iconBackgroundColor",e),clearable:!0,colors:a}),w===oe.iconBackgroundColor&&(0,s.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,i.__)("Using theme default color","axvart")})]})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("iconColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Icon Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.iconColor?"▲":"▼"})]}),c.iconColor&&(0,s.jsxs)("div",{style:{padding:"12px 0"},children:[(0,s.jsx)(r.ColorPalette,{value:d(k),onChange:e=>ae("iconColor",e),clearable:!0,colors:a}),k===oe.iconColor&&(0,s.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,i.__)("Using theme default color","axvart")})]})]})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("borderColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Border Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.borderColor?"▲":"▼"})]}),c.borderColor&&(0,s.jsxs)("div",{style:{padding:"12px 0"},children:[(0,s.jsx)(r.ColorPalette,{value:d(H),onChange:e=>ae("borderColor",e),clearable:!0,colors:[{name:"Transparent",color:"transparent"},...a]}),H!==oe.borderColor&&""!==H&&H?(0,s.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:R>0?(0,i.__)("Border color applied","axvart"):(0,i.__)("Border color set (increase border width to show)","axvart")}):(0,s.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,i.__)("No border color (default)","axvart")})]})]}),(0,s.jsxs)("div",{style:{marginTop:"16px",paddingTop:"8px",borderTop:"1px solid #e0e0e0"},children:[(0,s.jsx)("div",{style:{marginBottom:"8px",fontWeight:600},children:(0,i.__)("Hover Colors","axvart")}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("hoverBgColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Hover Background","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.hoverBgColor?"▲":"▼"})]}),c.hoverBgColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{value:d(B),onChange:e=>ae("hoverBackgroundColor",e),clearable:!0,colors:a})})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("hoverTextColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Hover Text","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.hoverTextColor?"▲":"▼"})]}),c.hoverTextColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{value:d(T),onChange:e=>ae("hoverTextColor",e),clearable:!0,colors:a})})]}),"text-only"!==m&&"email-input"!==m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("hoverIconBgColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Hover Icon Background","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.hoverIconBgColor?"▲":"▼"})]}),c.hoverIconBgColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{value:d(N),onChange:e=>ae("hoverIconBackgroundColor",e),clearable:!0,colors:a})})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("div",{className:"axvart-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>p("hoverIconColor"),children:[(0,s.jsx)("span",{children:(0,i.__)("Hover Icon Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:c.hoverIconColor?"▲":"▼"})]}),c.hoverIconColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{value:d($),onChange:e=>ae("hoverIconColor",e),clearable:!0,colors:a})})]})]})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Font Size","axvart"),value:F,onChange:e=>t({fontSize:e}),min:10,max:48}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Weight","axvart"),value:L,options:[{label:(0,i.__)("Normal","axvart"),value:"400"},{label:(0,i.__)("Medium","axvart"),value:"500"},{label:(0,i.__)("Semi Bold","axvart"),value:"600"},{label:(0,i.__)("Bold","axvart"),value:"700"},{label:(0,i.__)("Extra Bold","axvart"),value:"800"}],onChange:e=>t({fontWeight:e})}),"text-only"!==m&&"email-input"!==m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Size","axvart"),value:M,onChange:e=>t({iconSize:e}),min:10,max:32}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Circle Size","axvart"),value:E,onChange:e=>t({iconCircleSize:e}),min:20,max:60})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Spacing & Layout","axvart"),initialOpen:!1,children:["icon-only"!==m&&"email-input"!==m&&(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Gap between text and icon","axvart"),value:W,onChange:e=>t({gap:e}),min:0,max:30}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:z,onChange:e=>t({borderRadius:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Width","axvart"),value:R,onChange:e=>t({borderWidth:e}),min:0,max:10}),"icon-only"!==m&&"email-input"!==m&&(0,s.jsx)(n.__experimentalBoxControl,{label:(0,i.__)("Padding","axvart"),values:O,onChange:e=>t({padding:e})}),(0,s.jsx)(n.__experimentalBoxControl,{label:(0,i.__)("Margin","axvart"),values:A,onChange:e=>t({margin:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Effects","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Hover Effect","axvart"),checked:q,onChange:e=>t({hoverEffect:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Shadow","axvart"),checked:V,onChange:e=>t({shadowEnabled:e})}),V&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{children:(0,i.__)("Shadow Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:d(Y),onChange:e=>ae("shadowColor",e),clearable:!0,colors:a}),Y===oe.shadowColor&&(0,s.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"4px",display:"block"},children:(0,i.__)("Using default shadow color","axvart")})]}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Shadow Blur","axvart"),value:X,onChange:e=>t({shadowBlur:e}),min:0,max:20}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Shadow Offset X","axvart"),value:J,onChange:e=>t({shadowOffsetX:e}),min:-10,max:10}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Shadow Offset Y","axvart"),value:K,onChange:e=>t({shadowOffsetY:e}),min:-10,max:10})]})]})]}),(0,s.jsxs)("div",{...ce,children:[le&&"email-input"!==m&&(0,s.jsx)("div",{style:{marginBottom:"16px"},children:(0,s.jsx)(r.URLInput,{value:h,onChange:e=>t({buttonUrl:e}),placeholder:(0,i.__)("Enter URL...","axvart")})}),"email-input"===m?(0,s.jsxs)("div",{className:`email-input-container ${Z}`,children:[(0,s.jsx)("input",{type:"email",className:"email-input",placeholder:Q,value:g,onChange:e=>t({buttonText:e}),style:{pointerEvents:"none"},readOnly:!0}),(0,s.jsx)("div",{className:"email-submit-button",children:ne()})]}):(0,s.jsx)("div",{style:se,className:`button-widget ${q?"has-hover-effect":""} ${B||T||$||N?"has-custom-hover-colors":""} ${"icon-only"===m?"icon-only":""} ${"text-only"===m?"text-only":""}`,children:"icon-only"===m?(0,s.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:0,margin:0},children:(0,s.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"1em",height:"1em",fontSize:`${M}px`,lineHeight:"1",flexShrink:0},children:ne()})}):(0,s.jsxs)(s.Fragment,{children:["text-only"!==m&&(0,s.jsx)(r.RichText,{tagName:"span",value:g,onChange:e=>t({buttonText:e}),placeholder:(0,i.__)("Add text...","axvart"),allowedFormats:[],style:{...ie,flex:1}}),"text-only"===m&&(0,s.jsx)(r.RichText,{tagName:"span",value:g,onChange:e=>t({buttonText:e}),placeholder:(0,i.__)("Add text...","axvart"),allowedFormats:[],style:ie}),"text-with-icon"===m&&(0,s.jsx)("span",{style:de,children:ne()})]})})]})]})},save:({attributes:e})=>{const{buttonText:t,buttonUrl:o,openInNewTab:a,buttonType:l,iconType:n,customIcon:i,customIconImageId:d,customIconImageUrl:c,customIconImageAlt:x,backgroundColor:p,textColor:g,iconBackgroundColor:u,iconColor:h,hoverBackgroundColor:v,hoverTextColor:m,hoverIconColor:b,hoverIconBackgroundColor:f,borderRadius:y,borderWidth:_,borderColor:C,fontSize:j,fontWeight:S,iconSize:w,iconCircleSize:k,gap:B,padding:T,margin:$,width:N,height:P,alignment:I,hoverEffect:z,shadowEnabled:R,shadowColor:H,shadowBlur:F,shadowOffsetX:L,shadowOffsetY:M,emailPlaceholder:E,emailInputStyle:W,formAction:O,formMethod:A}=e,D=()=>{switch(n){case"arrow":default:return(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"chevron":return(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"plus":return(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"image":return c?(0,s.jsx)("img",{src:c,alt:x||"",style:{display:"block",width:"1em",height:"1em",objectFit:"contain"}}):null;case"custom":return i}},G=e=>e&&"string"==typeof e&&e.startsWith("var:preset|color|")?`var(--wp--preset--color--${e.split("|").pop()})`:e,U={color:G(g),fontSize:`${j}px`,fontWeight:S},q={position:"relative",display:"inline-flex",alignItems:"center",gap:"icon-only"===l?"0px":`${B}px`,backgroundColor:G("icon-only"===l?u:p),color:G("icon-only"===l?h:g),borderRadius:"icon-only"===l?"50%":`${y}px`,border:_>0?`${_}px solid ${G(C)}`:"none",fontSize:`${j}px`,fontWeight:S,padding:"icon-only"===l?"0":`${T.top} ${T.right} ${T.bottom} ${T.left}`,margin:`${$.top} ${$.right} ${$.bottom} ${$.left}`,width:"icon-only"===l?`${k}px`:N,height:"icon-only"===l?`${k}px`:P,textAlign:I,textDecoration:"none",cursor:"pointer",boxShadow:R?`${L}px ${M}px ${F}px ${H}`:"none",justifyContent:"icon-only"===l?"center":"flex-start","--button-icon-color":G(h),"--button-hover-bg-color":G(v),"--button-hover-text-color":G(m),"--button-icon-hover-color":G(b),"--button-hover-icon-bg-color":G(f)},V={display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${k}px`,height:`${k}px`,backgroundColor:G(u),color:G(h),borderRadius:"50%",fontSize:`${w}px`,fontWeight:"bold",boxShadow:R?"0 2px 4px rgba(0,0,0,0.1)":"none"},Y=r.useBlockProps.save({className:"button-widget-container",style:{textAlign:I}}),X=()=>(0,s.jsx)("div",{style:q,className:`button-widget ${z?"has-hover-effect":""} ${v||m||b||f?"has-custom-hover-colors":""} ${"icon-only"===l?"icon-only":""} ${"text-only"===l?"text-only":""}`,children:"icon-only"===l?(0,s.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:0,margin:0},children:(0,s.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"1em",height:"1em",fontSize:`${w}px`,lineHeight:"1",flexShrink:0},children:D()})}):(0,s.jsxs)(s.Fragment,{children:["text-only"!==l&&(0,s.jsx)("span",{style:{...U,flex:1},children:t}),"text-only"===l&&(0,s.jsx)("span",{style:U,children:t}),"text-with-icon"===l&&(0,s.jsx)("div",{style:V,children:(0,s.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"1em",height:"1em",fontSize:`${w}px`,lineHeight:"1",flexShrink:0},children:D()})})]})}),J=()=>(0,s.jsxs)("form",{className:`email-input-container ${W}`,action:O||"#",method:A,onSubmit:e=>{e.preventDefault(),alert("Form submitted! (Note: Actual submission requires additional setup)")},children:[(0,s.jsx)("input",{type:"email",className:"email-input",placeholder:E,name:"email",required:!0}),(0,s.jsx)("button",{type:"submit",className:"email-submit-button",children:D()})]});return(0,s.jsx)("div",{...Y,children:"email-input"===l?(0,s.jsx)(J,{}):o?(0,s.jsx)("a",{href:o,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:(0,s.jsx)(X,{})}):(0,s.jsx)(X,{})})}});const{registerBlockType:R}=wp.blocks,H=["image"];R("axvart/card-widget",{apiVersion:3,title:(0,i.__)("Card Widget","axvart"),icon:"id-alt",category:"widgets",edit:({attributes:e,setAttributes:t,clientId:o})=>{const{cardStyle:a,cardImage:l,cardBackgroundColor:d,iconBackgroundColor:c,titleColor:x,descriptionColor:p,actionButtonColor:h,actionButtonIconColor:v,iconUrl:m,iconSize:b,iconBackgroundSize:f,titleFontSize:y,titleFontWeight:_,descriptionFontSize:C,descriptionFontWeight:j,title:S,description:w,actionButtonUrl:k,borderRadius:B,cardPadding:T,customPadding:$,useCustomPadding:N,hoverEffect:P,hoverIntensity:I,enableHoverEffects:z,cardHoverBackgroundColor:R,titleHoverColor:F,descriptionHoverColor:L,actionButtonHoverColor:M,actionButtonIconHoverColor:E,iconHoverBackgroundColor:W,actionButtonVisibility:O,buttonAlignment:A,enableHoverColorTransitions:D,hoverTransitionDuration:G,buttonPositionTop:U,buttonPositionRight:q,buttonPositionBottom:V,buttonPositionLeft:Y,buttonPositionUnit:X,shapeType:J,shapeColor:K,shapeHoverColor:Q,shapeSize:Z,shapePositionTop:ee,shapePositionRight:te,shapePositionBottom:oe,shapePositionLeft:ae,shapePositionUnit:le,shapeRotation:re,shapeOpacity:ne,cardWidth:ie,cardHeight:se,imageWidth:de,imageHeight:ce,titleGap:xe,descriptionGap:pe,buttonGap:ge,imageGap:ue,dogTrainingLayout:he,vetProfileTitle:ve,vetProfileDesignation:me,vetProfileImage:be,vetProfileBackgroundColor:fe,vetProfileTitleColor:ye,vetProfileDesignationColor:_e,vetProfileInfoPadding:Ce,vetProfileInfoPositionTop:je,vetProfileInfoPositionLeft:Se,vetProfileInfoPositionRight:we,vetProfileInfoPositionBottom:ke,vetProfileInfoBorderRadius:Be,cardAlignment:Te}=e,$e=R||W||F||L||M||E,Ne="hover"===O,Pe=N&&$?`${$.top||"0"} ${$.right||"0"} ${$.bottom||"0"} ${$.left||"0"}`:`${T}px`,Ie=(0,r.useBlockProps)({className:["axvart-card-widget",`card-style-${a}`,`align-${Te}`,P&&`hover-effect-${P}`,O&&`action-button-${O}`,z?"hover-enabled":"hover-disabled",D&&$e?"hover-colors-enabled":"hover-colors-disabled",$e?"has-hover-colors":"no-hover-colors",Q&&"has-shape-hover-color","dog-training"===a&&`layout-${he}`].filter(Boolean).join(" "),"data-hover-effects":Ne?"enabled":"disabled",style:{"--card-bg-color":d,"--icon-bg-color":c,"--title-color":x,"--description-color":p,"--action-button-color":h,"--action-button-icon-color":v,"--border-radius":`${B}px`,"--card-padding":`${T}px`,"--custom-padding":Pe,"--icon-size":`${b}px`,"--icon-bg-size":`${f}px`,"--title-font-size":`${y}px`,"--title-font-weight":_,"--description-font-size":`${C}px`,"--description-font-weight":j,"--hover-intensity":I,"--hover-enabled":z?1:0,...R&&{"--card-hover-bg-color":R},...F&&{"--title-hover-color":F},...L&&{"--description-hover-color":L},...M&&{"--action-button-hover-color":M},...E&&{"--action-button-icon-hover-color":E},...W&&{"--icon-hover-bg-color":W},"--hover-transition-duration":`${G}ms`,"--button-position-top":U?`${U}${X}`:"auto","--button-position-right":q?`${q}${X}`:"auto","--button-position-bottom":V?`${V}${X}`:"auto","--button-position-left":Y?`${Y}${X}`:"auto","--button-position-type":0!==U||0!==q||0!==V||0!==Y?"absolute":"static","--shape-color":K,"--shape-hover-color":Q,"--shape-size":`${Z}px`,"--shape-position-top":ee?`${ee}${le}`:"auto","--shape-position-right":te?`${te}${le}`:"auto","--shape-position-bottom":oe?`${oe}${le}`:"auto","--shape-position-left":ae?`${ae}${le}`:"auto","--shape-rotation":re,"--shape-opacity":ne,"--card-width":`${ie}px`,"--card-height":`${se}px`,"--image-width":`${de}px`,"--image-height":`${ce}px`,"--title-gap":`${xe}px`,"--description-gap":`${pe}px`,"--button-gap":`${ge}px`,"--image-gap":`${ue}px`,"--vet-profile-bg-color":fe,"--vet-profile-title-color":ye,"--vet-profile-designation-color":_e,...be&&{"--vet-profile-bg-image":`url(${be})`},"--vet-profile-info-padding":`${Ce}px`,"--vet-profile-info-position-top":`${je}px`,"--vet-profile-info-position-left":`${Se}px`,"--vet-profile-info-position-right":`${we}px`,"--vet-profile-info-position-bottom":`${ke}px`,"--vet-profile-info-border-radius":`${Be}px`}}),ze=(0,g.useSelect)(e=>{const{getSettings:t}=e("core/block-editor");return t().colors},[]),Re=e=>{if(!e||!ze)return e;if(e.startsWith("var(--wp--preset--color--")){const t=e.match(/var\(--wp--preset--color--([^,)]+)/)?.[1];if(t){const o=ze.find(e=>e.slug===t);return o?o.color:e}}return e},He=(e,o)=>{const a=(e=>{if(!e||!ze)return e;if(e.startsWith("var("))return e;const t=ze.find(t=>t.color===e);return t&&t.slug?`var(--wp--preset--color--${t.slug})`:e})(o);t({[e]:a})},[Fe,Le]=(0,u.useState)({cardBackgroundColor:!1,titleColor:!1,descriptionColor:!1,actionButtonColor:!1,actionButtonIconColor:!1,iconBackgroundColor:!1,cardHoverBackgroundColor:!1,iconHoverBackgroundColor:!1,titleHoverColor:!1,descriptionHoverColor:!1,actionButtonHoverColor:!1,actionButtonIconHoverColor:!1,shapeColor:!1,shapeHoverColor:!1,vetProfileBackgroundColor:!1}),[Me,Ee]=(0,u.useState)(0!==U||0!==q||0!==V||0!==Y),We=e=>{Le(t=>({...t,[e]:!t[e]}))},Oe=[{id:"default",name:(0,i.__)("Default","axvart")},{id:"cat-grooming",name:(0,i.__)("Cat Grooming","axvart")},{id:"dog-training",name:(0,i.__)("Dog Training","axvart")},{id:"vet-profile",name:(0,i.__)("Vet Profile","axvart")}],Ae={default:{width:400,height:358},"cat-grooming":{width:399,height:532},"dog-training":{width:830,height:257},"vet-profile":{width:400,height:480}};return(0,s.jsxs)("div",{...Ie,children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Card Style","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Select Card Style","axvart"),value:a,options:Oe.map(e=>({label:e.name,value:e.id})),onChange:e=>{const o=Ae[e];o&&t({cardStyle:e,cardWidth:o.width,cardHeight:o.height})}}),("cat-grooming"===a||"dog-training"===a)&&(0,s.jsxs)("div",{className:"card-image-control",children:[(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({cardImage:e.url}),allowedTypes:H,value:l,render:({open:e})=>(0,s.jsx)(n.Button,{className:l?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,children:l?(0,s.jsx)("img",{src:l,alt:(0,i.__)("Card Image","axvart"),style:{width:"100px",height:"auto"}}):(0,i.__)("Select Image","axvart")})})}),l&&(0,s.jsx)(n.Button,{onClick:()=>t({cardImage:""}),isDestructive:!0,children:(0,i.__)("Remove Image","axvart")})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Card Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Card Alignment","axvart"),value:Te,options:[{label:(0,i.__)("Left","axvart"),value:"left"},{label:(0,i.__)("Center","axvart"),value:"center"},{label:(0,i.__)("Right","axvart"),value:"right"}],onChange:e=>t({cardAlignment:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:B,onChange:e=>t({borderRadius:e}),min:0,max:50}),"vet-profile"!==a&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Use Custom Padding","axvart"),checked:N,onChange:e=>t({useCustomPadding:e}),help:(0,i.__)("Enable to set different padding values for each side of the card","axvart")}),N?(0,s.jsx)(n.__experimentalBoxControl,{label:(0,i.__)("Custom Padding","axvart"),values:$,onChange:e=>t({customPadding:e}),units:["px","em","rem","%","vw","vh"]}):(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Card Padding","axvart"),value:T,onChange:e=>t({cardPadding:e}),min:0,max:100})]}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Card Width","axvart"),value:ie,onChange:e=>t({cardWidth:e}),min:200,max:1200}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Card Height","axvart"),value:se,onChange:e=>t({cardHeight:e}),min:300,max:1e3}),("cat-grooming"===a||"dog-training"===a)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Image Width","axvart"),value:de,onChange:e=>t({imageWidth:e}),min:100,max:1200}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Image Height","axvart"),value:ce,onChange:e=>t({imageHeight:e}),min:100,max:600})]})]}),"vet-profile"===a&&(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Vet Profile Settings","axvart"),initialOpen:!0,children:[(0,s.jsxs)("div",{className:"card-image-control",children:[(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({vetProfileImage:e.url}),allowedTypes:H,value:be,render:({open:e})=>(0,s.jsx)(n.Button,{className:be?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,children:be?(0,s.jsx)("img",{src:be,alt:(0,i.__)("Vet Profile Image","axvart"),style:{width:"100px",height:"auto"}}):(0,i.__)("Select Vet Image","axvart")})})}),be&&(0,s.jsx)(n.Button,{onClick:()=>t({vetProfileImage:""}),isDestructive:!0,children:(0,i.__)("Remove Image","axvart")})]}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("vetProfileBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("vetProfileBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":Fe.vetProfileBackgroundColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Background Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.vetProfileBackgroundColor?"▲":"▼"})]}),Fe.vetProfileBackgroundColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(fe),onChange:e=>He("vetProfileBackgroundColor",e)})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Info Panel Padding","axvart"),value:Ce,onChange:e=>t({vetProfileInfoPadding:e}),min:5,max:30}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Info Panel Position Top","axvart"),value:je,onChange:e=>t({vetProfileInfoPositionTop:e}),min:200,max:450}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Info Panel Position Left","axvart"),value:Se,onChange:e=>t({vetProfileInfoPositionLeft:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Info Panel Position Right","axvart"),value:we,onChange:e=>t({vetProfileInfoPositionRight:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Info Panel Position Bottom","axvart"),value:ke,onChange:e=>t({vetProfileInfoPositionBottom:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Info Panel Border Radius","axvart"),value:Be,onChange:e=>t({vetProfileInfoBorderRadius:e}),min:0,max:30})]}),"dog-training"===a&&(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Dog Training Layout","axvart"),initialOpen:!0,children:(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Content Position","axvart"),value:he,options:[{label:(0,i.__)("Content Left, Image Right","axvart"),value:"content-left"},{label:(0,i.__)("Image Left, Content Right","axvart"),value:"content-right"}],onChange:e=>t({dogTrainingLayout:e})})}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Spacing Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Title Gap","axvart"),value:xe,onChange:e=>t({titleGap:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Description Gap","axvart"),value:pe,onChange:e=>t({descriptionGap:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Button Gap","axvart"),value:ge,onChange:e=>t({buttonGap:e}),min:0,max:50}),("cat-grooming"===a||"dog-training"===a)&&(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Image Gap","axvart"),value:ue,onChange:e=>t({imageGap:e}),min:0,max:50})]}),"vet-profile"!==a&&(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Shape Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Shape Type","axvart"),value:J,options:[{label:(0,i.__)("None","axvart"),value:"none"},{label:(0,i.__)("Circle","axvart"),value:"circle"},{label:(0,i.__)("Square","axvart"),value:"square"},{label:(0,i.__)("Triangle","axvart"),value:"triangle"},{label:(0,i.__)("Diamond","axvart"),value:"diamond"}],onChange:e=>t({shapeType:e})}),"none"!==J&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("shapeColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("shapeColor"))},tabIndex:0,role:"button","aria-expanded":Fe.shapeColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Shape Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.shapeColor?"▲":"▼"})]}),Fe.shapeColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(K),onChange:e=>He("shapeColor",e)})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("shapeHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("shapeHoverColor"))},tabIndex:0,role:"button","aria-expanded":Fe.shapeHoverColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Shape Hover Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.shapeHoverColor?"▲":"▼"})]}),Fe.shapeHoverColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(Q),onChange:e=>He("shapeHoverColor",e),clearable:!0})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Shape Size","axvart"),value:Z,onChange:e=>t({shapeSize:e}),min:20,max:300}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Shape Rotation","axvart"),value:re,onChange:e=>t({shapeRotation:e}),min:0,max:360}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Shape Opacity","axvart"),value:ne,onChange:e=>t({shapeOpacity:e}),min:0,max:100}),(0,s.jsx)("div",{style:{marginBottom:"16px",marginTop:"24px",fontWeight:"600",color:"#1e1e1e"},children:(0,i.__)("Shape Position","axvart")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Position Unit","axvart"),value:le,options:[{label:(0,i.__)("Pixels (px)","axvart"),value:"px"},{label:(0,i.__)("Percentage (%)","axvart"),value:"%"},{label:(0,i.__)("Em","axvart"),value:"em"}],onChange:e=>t({shapePositionUnit:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Position from Top","axvart"),value:ee,onChange:e=>t({shapePositionTop:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Position from Right","axvart"),value:te,onChange:e=>t({shapePositionRight:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Position from Bottom","axvart"),value:oe,onChange:e=>t({shapePositionBottom:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Position from Left","axvart"),value:ae,onChange:e=>t({shapePositionLeft:e}),min:0,max:100})]})]}),"vet-profile"!==a&&(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Icon Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({iconUrl:e.url}),allowedTypes:H,value:m,render:({open:e})=>(0,s.jsx)(n.Button,{className:m?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,children:m?(0,s.jsx)("img",{src:m,alt:(0,i.__)("Icon","axvart"),style:{width:"100px",height:"auto"}}):(0,i.__)("Select Icon","axvart")})})}),m&&(0,s.jsx)(n.Button,{onClick:()=>t({iconUrl:""}),isDestructive:!0,children:(0,i.__)("Remove Icon","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Size","axvart"),value:b,onChange:e=>t({iconSize:e}),min:20,max:80}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Background Size","axvart"),value:f,onChange:e=>t({iconBackgroundSize:e}),min:30,max:100})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)("div",{style:{marginBottom:"16px",fontWeight:"600",color:"#1e1e1e"},children:(0,i.__)("Title Typography","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Title Font Size","axvart"),value:y,onChange:e=>t({titleFontSize:e}),min:14,max:48}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Title Font Weight","axvart"),value:_,options:[{label:(0,i.__)("Normal","axvart"),value:"400"},{label:(0,i.__)("Medium","axvart"),value:"500"},{label:(0,i.__)("Semi Bold","axvart"),value:"600"},{label:(0,i.__)("Bold","axvart"),value:"700"},{label:(0,i.__)("Extra Bold","axvart"),value:"800"},{label:(0,i.__)("Black","axvart"),value:"900"}],onChange:e=>t({titleFontWeight:e})}),(0,s.jsx)("div",{style:{marginBottom:"16px",marginTop:"24px",fontWeight:"600",color:"#1e1e1e"},children:(0,i.__)("Description Typography","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Description Font Size","axvart"),value:C,onChange:e=>t({descriptionFontSize:e}),min:12,max:24}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Description Font Weight","axvart"),value:j,options:[{label:(0,i.__)("Light","axvart"),value:"300"},{label:(0,i.__)("Normal","axvart"),value:"400"},{label:(0,i.__)("Medium","axvart"),value:"500"},{label:(0,i.__)("Semi Bold","axvart"),value:"600"}],onChange:e=>t({descriptionFontWeight:e})})]}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Content Settings","axvart"),initialOpen:!1,children:(0,s.jsx)(n.TextControl,{label:(0,i.__)("Action Button URL","axvart"),value:k,onChange:e=>t({actionButtonUrl:e})})}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Hover Effects","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Hover Effects","axvart"),checked:z,onChange:e=>t({enableHoverEffects:e}),help:(0,i.__)("Enable or disable hover animations for the card","axvart")}),z&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Hover Effect Type","axvart"),value:P,options:[{label:(0,i.__)("Lift Up","axvart"),value:"lift"},{label:(0,i.__)("Scale","axvart"),value:"scale"},{label:(0,i.__)("Tilt","axvart"),value:"tilt"},{label:(0,i.__)("Glow","axvart"),value:"glow"},{label:(0,i.__)("Slide","axvart"),value:"slide"}],onChange:e=>t({hoverEffect:e}),help:(0,i.__)("Choose the type of hover animation","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Effect Intensity","axvart"),value:I,onChange:e=>t({hoverIntensity:e}),min:1,max:10,help:(0,i.__)("Control the intensity of the hover effect","axvart")})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Color Settings","axvart"),initialOpen:!1,children:[(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("cardBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("cardBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":Fe.cardBackgroundColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Card Background Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.cardBackgroundColor?"▲":"▼"})]}),Fe.cardBackgroundColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(d),onChange:e=>He("cardBackgroundColor",e)})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("iconBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("iconBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":Fe.iconBackgroundColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Icon Background Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.iconBackgroundColor?"▲":"▼"})]}),Fe.iconBackgroundColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(c),onChange:e=>He("iconBackgroundColor",e)})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("titleColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("titleColor"))},tabIndex:0,role:"button","aria-expanded":Fe.titleColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Title Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.titleColor?"▲":"▼"})]}),Fe.titleColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(x),onChange:e=>He("titleColor",e)})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("descriptionColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("descriptionColor"))},tabIndex:0,role:"button","aria-expanded":Fe.descriptionColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Description Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.descriptionColor?"▲":"▼"})]}),Fe.descriptionColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(p),onChange:e=>He("descriptionColor",e)})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("actionButtonColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("actionButtonColor"))},tabIndex:0,role:"button","aria-expanded":Fe.actionButtonColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Action Button Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.actionButtonColor?"▲":"▼"})]}),Fe.actionButtonColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(h),onChange:e=>He("actionButtonColor",e)})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("actionButtonIconColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("actionButtonIconColor"))},tabIndex:0,role:"button","aria-expanded":Fe.actionButtonIconColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Action Button Icon Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.actionButtonIconColor?"▲":"▼"})]}),Fe.actionButtonIconColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(v),onChange:e=>He("actionButtonIconColor",e)})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Hover Color Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Hover Color Transitions","axvart"),checked:D,onChange:e=>t({enableHoverColorTransitions:e})}),D&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Transition Duration (ms)","axvart"),value:G,onChange:e=>t({hoverTransitionDuration:e}),min:100,max:1e3,step:50}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("cardHoverBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("cardHoverBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":Fe.cardHoverBackgroundColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Card Hover Background Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.cardHoverBackgroundColor?"▲":"▼"})]}),Fe.cardHoverBackgroundColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(R),onChange:e=>He("cardHoverBackgroundColor",e),clearable:!0})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("iconHoverBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("iconHoverBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":Fe.iconHoverBackgroundColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Icon Hover Background Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.iconHoverBackgroundColor?"▲":"▼"})]}),Fe.iconHoverBackgroundColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(W),onChange:e=>He("iconHoverBackgroundColor",e),clearable:!0})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("titleHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("titleHoverColor"))},tabIndex:0,role:"button","aria-expanded":Fe.titleHoverColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Title Hover Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.titleHoverColor?"▲":"▼"})]}),Fe.titleHoverColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(F),onChange:e=>He("titleHoverColor",e),clearable:!0})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("descriptionHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("descriptionHoverColor"))},tabIndex:0,role:"button","aria-expanded":Fe.descriptionHoverColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Description Hover Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.descriptionHoverColor?"▲":"▼"})]}),Fe.descriptionHoverColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(L),onChange:e=>He("descriptionHoverColor",e),clearable:!0})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("actionButtonHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("actionButtonHoverColor"))},tabIndex:0,role:"button","aria-expanded":Fe.actionButtonHoverColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Action Button Hover Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.actionButtonHoverColor?"▲":"▼"})]}),Fe.actionButtonHoverColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(M),onChange:e=>He("actionButtonHoverColor",e),clearable:!0})}),(0,s.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("actionButtonIconHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("actionButtonIconHoverColor"))},tabIndex:0,role:"button","aria-expanded":Fe.actionButtonIconHoverColor,children:[(0,s.jsx)("span",{children:(0,i.__)("Action Button Icon Hover Color","axvart")}),(0,s.jsx)("span",{style:{fontSize:"10px"},children:Fe.actionButtonIconHoverColor?"▲":"▼"})]}),Fe.actionButtonIconHoverColor&&(0,s.jsx)("div",{style:{padding:"12px 0"},children:(0,s.jsx)(r.ColorPalette,{colors:ze,value:Re(E),onChange:e=>He("actionButtonIconHoverColor",e),clearable:!0})})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Action Button Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Action Button Visibility","axvart"),value:O,options:[{label:(0,i.__)("Always Visible","axvart"),value:"always"},{label:(0,i.__)("Visible on Hover","axvart"),value:"hover"},{label:(0,i.__)("Hidden","axvart"),value:"hidden"}],onChange:e=>t({actionButtonVisibility:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Button Alignment","axvart"),value:A,options:[{label:(0,i.__)("Left","axvart"),value:"left"},{label:(0,i.__)("Center","axvart"),value:"center"},{label:(0,i.__)("Right","axvart"),value:"right"}],onChange:e=>t({buttonAlignment:e}),help:(0,i.__)("Only applies when custom positioning is not used","axvart")}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Use Custom Positioning","axvart"),checked:Me,onChange:e=>{Ee(e),t(e?{buttonPositionTop:U||10,buttonPositionRight:q||10,buttonPositionBottom:V||"auto",buttonPositionLeft:Y||"auto",buttonPositionUnit:X||"px"}:{buttonPositionTop:0,buttonPositionRight:0,buttonPositionBottom:0,buttonPositionLeft:0})},help:(0,i.__)("Enable to precisely position the button within the card","axvart")}),Me&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{style:{marginBottom:"16px",marginTop:"24px",fontWeight:"600",color:"#1e1e1e"},children:(0,i.__)("Button Position","axvart")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Position Unit","axvart"),value:X,options:[{label:(0,i.__)("Pixels (px)","axvart"),value:"px"},{label:(0,i.__)("Percentage (%)","axvart"),value:"%"},{label:(0,i.__)("Em","axvart"),value:"em"}],onChange:e=>t({buttonPositionUnit:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Position from Top","axvart"),value:U,onChange:e=>t({buttonPositionTop:e}),min:0,max:600}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Position from Right","axvart"),value:q,onChange:e=>t({buttonPositionRight:e}),min:0,max:600}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Position from Bottom","axvart"),value:V,onChange:e=>t({buttonPositionBottom:e}),min:0,max:600}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Position from Left","axvart"),value:Y,onChange:e=>t({buttonPositionLeft:e}),min:0,max:600})]})]})]}),(0,s.jsxs)("div",{className:"card-widget-container",children:["cat-grooming"===a&&(0,s.jsxs)("div",{className:"cat-grooming-layout",children:[(0,s.jsxs)("div",{className:"cat-grooming-content",children:[(0,s.jsx)(r.RichText,{tagName:"h3",className:"card-widget-title",value:S,onChange:e=>t({title:e}),placeholder:(0,i.__)("Enter card title...","axvart")}),(0,s.jsx)(r.RichText,{tagName:"p",className:"card-widget-description",value:w,onChange:e=>t({description:e}),placeholder:(0,i.__)("Enter card description...","axvart")}),(0,s.jsx)("div",{className:`card-widget-action align-${A}`,children:(0,s.jsx)("div",{className:"action-button",children:(0,s.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,s.jsx)("div",{className:"cat-grooming-image",children:l?(0,s.jsx)("img",{src:l,alt:S||(0,i.__)("Card Image","axvart")}):(0,s.jsx)("div",{className:"image-placeholder",children:(0,i.__)("Select Image","axvart")})})]}),"dog-training"===a&&(0,s.jsxs)("div",{className:`dog-training-layout layout-${he}`,children:[(0,s.jsxs)("div",{className:"dog-training-content",children:[(0,s.jsx)(r.RichText,{tagName:"h3",className:"card-widget-title",value:S,onChange:e=>t({title:e}),placeholder:(0,i.__)("Enter card title...","axvart")}),(0,s.jsx)(r.RichText,{tagName:"p",className:"card-widget-description",value:w,onChange:e=>t({description:e}),placeholder:(0,i.__)("Enter card description...","axvart")}),(0,s.jsx)("div",{className:`card-widget-action align-${A}`,children:(0,s.jsx)("div",{className:"action-button",children:(0,s.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,s.jsx)("div",{className:"dog-training-image",children:l?(0,s.jsx)("img",{src:l,alt:S||(0,i.__)("Card Image","axvart")}):(0,s.jsx)("div",{className:"image-placeholder",children:(0,i.__)("Select Image","axvart")})})]}),"vet-profile"===a&&(0,s.jsxs)(s.Fragment,{children:[!be&&(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({vetProfileImage:e.url}),allowedTypes:H,value:be,render:({open:e})=>(0,s.jsx)(n.Button,{className:"vet-profile-upload-button",onClick:e,children:(0,i.__)("Upload Vet Image","axvart")})})}),(0,s.jsxs)("div",{className:"vet-profile-info",children:[(0,s.jsx)(r.RichText,{tagName:"h3",className:"card-widget-title",value:ve,onChange:e=>t({vetProfileTitle:e}),placeholder:(0,i.__)("Enter vet name...","axvart")}),(0,s.jsx)(r.RichText,{tagName:"p",className:"card-widget-description",value:me,onChange:e=>t({vetProfileDesignation:e}),placeholder:(0,i.__)("Enter designation...","axvart")})]})]}),"default"===a&&(0,s.jsxs)(s.Fragment,{children:["none"!==J&&(0,s.jsx)("div",{className:`card-widget-shape shape-${J}`}),(0,s.jsx)("div",{className:"card-widget-icon",children:m?(0,s.jsx)("img",{src:m,alt:(0,i.__)("Card Icon","axvart")}):(0,s.jsx)("div",{className:"icon-placeholder",children:(0,i.__)("Select Icon","axvart")})}),(0,s.jsx)(r.RichText,{tagName:"h3",className:"card-widget-title",value:S,onChange:e=>t({title:e}),placeholder:(0,i.__)("Enter card title...","axvart")}),(0,s.jsx)(r.RichText,{tagName:"p",className:"card-widget-description",value:w,onChange:e=>t({description:e}),placeholder:(0,i.__)("Enter card description...","axvart")}),(0,s.jsx)("div",{className:`card-widget-action align-${A}`,children:(0,s.jsx)("div",{className:"action-button",children:(0,s.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})]})},save:({attributes:e})=>{const{cardStyle:t,cardImage:o,cardBackgroundColor:a,iconBackgroundColor:l,titleColor:n,descriptionColor:d,actionButtonColor:c,actionButtonIconColor:x,cardHoverBackgroundColor:p,iconHoverBackgroundColor:g,titleHoverColor:u,descriptionHoverColor:h,actionButtonHoverColor:v,actionButtonIconHoverColor:m,actionButtonVisibility:b,enableHoverColorTransitions:f,hoverTransitionDuration:y,iconUrl:_,iconSize:C,iconBackgroundSize:j,titleFontSize:S,titleFontWeight:w,descriptionFontSize:k,descriptionFontWeight:B,title:T,description:$,actionButtonUrl:N,borderRadius:P,cardPadding:I,customPadding:z,useCustomPadding:R,hoverEffect:H,hoverIntensity:F,enableHoverEffects:L,buttonAlignment:M,buttonPositionTop:E,buttonPositionRight:W,buttonPositionBottom:O,buttonPositionLeft:A,buttonPositionUnit:D,shapeType:G,shapeColor:U,shapeHoverColor:q,shapeSize:V,shapePositionTop:Y,shapePositionRight:X,shapePositionBottom:J,shapePositionLeft:K,shapePositionUnit:Q,shapeRotation:Z,shapeOpacity:ee,cardWidth:te,cardHeight:oe,imageWidth:ae,imageHeight:le,titleGap:re,descriptionGap:ne,buttonGap:ie,imageGap:se,dogTrainingLayout:de,vetProfileTitle:ce,vetProfileDesignation:xe,vetProfileImage:pe,vetProfileBackgroundColor:ge,vetProfileTitleColor:ue,vetProfileDesignationColor:he,vetProfileInfoPadding:ve,vetProfileInfoPositionTop:me,vetProfileInfoPositionLeft:be,vetProfileInfoPositionRight:fe,vetProfileInfoPositionBottom:ye,vetProfileInfoBorderRadius:_e,cardAlignment:Ce}=e,je=p||g||u||h||v||m,Se="hover"===b,we=R&&z?`${z.top||"0"} ${z.right||"0"} ${z.bottom||"0"} ${z.left||"0"}`:`${I}px`,ke=r.useBlockProps.save({className:["axvart-card-widget",`card-style-${t}`,`align-${Ce}`,H&&`hover-effect-${H}`,b&&`action-button-${b}`,L?"hover-enabled":"hover-disabled",f&&je?"hover-colors-enabled":"hover-colors-disabled",je?"has-hover-colors":"no-hover-colors",q&&"has-shape-hover-color","dog-training"===t&&`layout-${de}`,_&&"has-icon"].filter(Boolean).join(" "),"data-hover-effects":Se?"enabled":"disabled",style:{"--card-bg-color":a,"--icon-bg-color":l,"--title-color":n,"--description-color":d,"--action-button-color":c,"--action-button-icon-color":x,...p&&{"--card-hover-bg-color":p},...g&&{"--icon-hover-bg-color":g},...u&&{"--title-hover-color":u},...h&&{"--description-hover-color":h},...v&&{"--action-button-hover-color":v},...m&&{"--action-button-icon-hover-color":m},"--hover-transition-duration":`${y}ms`,"--border-radius":`${P}px`,"--card-padding":`${I}px`,"--custom-padding":we,"--icon-size":`${C}px`,"--icon-bg-size":`${j}px`,"--title-font-size":`${S}px`,"--title-font-weight":w,"--description-font-size":`${k}px`,"--description-font-weight":B,"--hover-intensity":F,"--hover-enabled":L?1:0,"--button-position-top":E?`${E}${D}`:"auto","--button-position-right":W?`${W}${D}`:"auto","--button-position-bottom":O?`${O}${D}`:"auto","--button-position-left":A?`${A}${D}`:"auto","--button-position-type":0!==E||0!==W||0!==O||0!==A?"absolute":"static","--shape-color":U,"--shape-hover-color":q,"--shape-size":`${V}px`,"--shape-position-top":Y?`${Y}${Q}`:"auto","--shape-position-right":X?`${X}${Q}`:"auto","--shape-position-bottom":J?`${J}${Q}`:"auto","--shape-position-left":K?`${K}${Q}`:"auto","--shape-rotation":Z,"--shape-opacity":ee,"--card-width":`${te}px`,"--card-height":`${oe}px`,"--image-width":`${ae}px`,"--image-height":`${le}px`,"--title-gap":`${re}px`,"--description-gap":`${ne}px`,"--button-gap":`${ie}px`,"--image-gap":`${se}px`,"--vet-profile-bg-color":ge,"--vet-profile-title-color":ue,"--vet-profile-designation-color":he,...pe&&{"--vet-profile-bg-image":`url(${pe})`},"--vet-profile-info-padding":`${ve}px`,"--vet-profile-info-position-top":`${me}px`,"--vet-profile-info-position-left":`${be}px`,"--vet-profile-info-position-right":`${fe}px`,"--vet-profile-info-position-bottom":`${ye}px`,"--vet-profile-info-border-radius":`${_e}px`}});return(0,s.jsx)("div",{...ke,children:(0,s.jsxs)("div",{className:"card-widget-container",children:["cat-grooming"===t&&(0,s.jsxs)("div",{className:"cat-grooming-layout",children:[(0,s.jsxs)("div",{className:"cat-grooming-content",children:[(0,s.jsx)(r.RichText.Content,{tagName:"h3",className:"card-widget-title",value:T}),(0,s.jsx)(r.RichText.Content,{tagName:"p",className:"card-widget-description",value:$}),(0,s.jsx)("div",{className:`card-widget-action align-${M}`,children:(0,s.jsx)("a",{href:N,className:"action-button",children:(0,s.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,s.jsx)("div",{className:"cat-grooming-image",children:o&&(0,s.jsx)("img",{src:o,alt:(0,i.__)("Card Image","axvart")})})]}),"dog-training"===t&&(0,s.jsxs)("div",{className:`dog-training-layout layout-${de}`,children:[(0,s.jsxs)("div",{className:"dog-training-content",children:[(0,s.jsx)(r.RichText.Content,{tagName:"h3",className:"card-widget-title",value:T}),(0,s.jsx)(r.RichText.Content,{tagName:"p",className:"card-widget-description",value:$}),(0,s.jsx)("div",{className:`card-widget-action align-${M}`,children:(0,s.jsx)("a",{href:N,className:"action-button",children:(0,s.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,s.jsx)("div",{className:"dog-training-image",children:o&&(0,s.jsx)("img",{src:o,alt:(0,i.__)("Card Image","axvart")})})]}),"vet-profile"===t&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"vet-profile-info",children:[(0,s.jsx)(r.RichText.Content,{tagName:"h3",className:"card-widget-title",value:ce}),(0,s.jsx)(r.RichText.Content,{tagName:"p",className:"card-widget-description",value:xe})]})}),"default"===t&&(0,s.jsxs)(s.Fragment,{children:["none"!==G&&(0,s.jsx)("div",{className:`card-widget-shape shape-${G}`}),(0,s.jsx)("div",{className:"card-widget-icon",children:_&&(0,s.jsx)("img",{src:_,alt:(0,i.__)("Card Icon","axvart")})}),(0,s.jsx)(r.RichText.Content,{tagName:"h3",className:"card-widget-title",value:T}),(0,s.jsx)(r.RichText.Content,{tagName:"p",className:"card-widget-description",value:$}),(0,s.jsx)("div",{className:`card-widget-action align-${M}`,children:(0,s.jsx)("a",{href:N,className:"action-button",children:(0,s.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})})}});const{registerBlockType:F}=wp.blocks;F("axvart/contact-form-widget",{apiVersion:3,title:(0,i.__)("Contact Form Widget","axvart"),description:(0,i.__)("A customizable contact form widget with fields for name, email, subject, and message.","axvart"),category:"widgets",icon:"email",keywords:["contact","form","email","message","widget"],supports:{html:!1,align:["wide","full"],spacing:{margin:!0,padding:!0}},attributes:{formTitle:{type:"string",default:(0,i.__)("Get In Touch","axvart")},formSubtitle:{type:"string",default:(0,i.__)("Feel free to reach out to us","axvart")},hasBoxShadow:{type:"boolean",default:!1},showTitle:{type:"boolean",default:!0},showSubtitle:{type:"boolean",default:!0},showNameField:{type:"boolean",default:!0},showEmailField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!1},showSubjectField:{type:"boolean",default:!0},showMessageField:{type:"boolean",default:!0},nameLabel:{type:"string",default:(0,i.__)("Your Name","axvart")},emailLabel:{type:"string",default:(0,i.__)("Your Email","axvart")},phoneLabel:{type:"string",default:(0,i.__)("Your Phone","axvart")},subjectLabel:{type:"string",default:(0,i.__)("Subject","axvart")},messageLabel:{type:"string",default:(0,i.__)("Your Message","axvart")},namePlaceholder:{type:"string",default:(0,i.__)("John Doe","axvart")},emailPlaceholder:{type:"string",default:(0,i.__)("john@example.com","axvart")},phonePlaceholder:{type:"string",default:(0,i.__)("+1 234 567 890","axvart")},subjectPlaceholder:{type:"string",default:(0,i.__)("How can we help?","axvart")},messagePlaceholder:{type:"string",default:(0,i.__)("Write your message here...","axvart")},buttonText:{type:"string",default:(0,i.__)("Send Message","axvart")},buttonAlignment:{type:"string",default:"left"},fieldLayout:{type:"string",default:"stacked"},fieldSpacing:{type:"number",default:20},formContainerPadding:{type:"object",default:{top:"48px",right:"48px",bottom:"48px",left:"48px"}},fieldPadding:{type:"object",default:{top:"12px",right:"16px",bottom:"12px",left:"16px"}},buttonPadding:{type:"object",default:{top:"14px",right:"32px",bottom:"14px",left:"32px"}},fieldBorderRadius:{type:"number",default:8},fieldBorderWidth:{type:"number",default:1},buttonBorderRadius:{type:"number",default:8},titleColor:{type:"string",default:""},subtitleColor:{type:"string",default:""},labelColor:{type:"string",default:""},formBackgroundColor:{type:"string",default:""},formBorderColor:{type:"string",default:""},fieldBackgroundColor:{type:"string",default:""},fieldTextColor:{type:"string",default:""},fieldPlaceholderColor:{type:"string",default:""},fieldBorderColor:{type:"string",default:""},fieldFocusBorderColor:{type:"string",default:""},fieldFocusColor:{type:"string",default:""},buttonBackgroundColor:{type:"string",default:""},buttonTextColor:{type:"string",default:""},buttonHoverBackgroundColor:{type:"string",default:""},buttonHoverTextColor:{type:"string",default:""},titleFontSize:{type:"number",default:32},subtitleFontSize:{type:"number",default:16},labelFontSize:{type:"number",default:14},fieldFontSize:{type:"number",default:16},buttonFontSize:{type:"number",default:16},showRequiredIndicator:{type:"boolean",default:!0}},edit:({attributes:e,setAttributes:t})=>{const{formTitle:o,formSubtitle:a,hasBoxShadow:l,showTitle:d,showSubtitle:c,showNameField:x,showEmailField:p,showPhoneField:g,showSubjectField:u,showMessageField:h,nameLabel:v,emailLabel:m,phoneLabel:b,subjectLabel:f,messageLabel:y,namePlaceholder:_,emailPlaceholder:C,phonePlaceholder:j,subjectPlaceholder:S,messagePlaceholder:w,buttonText:k,buttonAlignment:B,fieldLayout:T,fieldSpacing:$,formContainerPadding:N,fieldPadding:P,buttonPadding:I,fieldBorderRadius:z,fieldBorderWidth:R,buttonBorderRadius:H,titleColor:F,subtitleColor:L,labelColor:M,formBackgroundColor:E,formBorderColor:W,fieldBackgroundColor:O,fieldTextColor:A,fieldPlaceholderColor:D,fieldBorderColor:G,fieldFocusBorderColor:U,fieldFocusColor:q,buttonBackgroundColor:V,buttonTextColor:Y,buttonHoverBackgroundColor:X,buttonHoverTextColor:J,titleFontSize:K,subtitleFontSize:Q,labelFontSize:Z,fieldFontSize:ee,buttonFontSize:te,showRequiredIndicator:oe}=e,[ae=[]]=(0,r.useSettings)("color.palette"),le=e=>{if(!e)return e;if(e.startsWith("var(--wp--preset--color--")){const t=e.replace("var(--wp--preset--color--","").replace(")",""),o=ae.find(e=>e.slug===t);return o?o.color:e}return e},re=e=>o=>{if(!o)return void t({[e]:""});const a=ae.find(e=>e.color===o);t(a?{[e]:`var(--wp--preset--color--${a.slug})`}:{[e]:o})},ne=P||{top:"12px",right:"16px",bottom:"12px",left:"16px"},ie=I||{top:"14px",right:"32px",bottom:"14px",left:"32px"},se=N||{top:"48px",right:"48px",bottom:"48px",left:"48px"},de={"--form-field-spacing":`${$}px`,"--form-field-border-radius":`${z}px`,"--form-field-border-width":`${R}px`,"--form-button-border-radius":`${H}px`,"--form-title-font-size":`${K}px`,"--form-subtitle-font-size":`${Q}px`,"--form-label-font-size":`${Z}px`,"--form-field-font-size":`${ee}px`,"--form-button-font-size":`${te}px`,...F&&{"--form-title-color":F},...L&&{"--form-subtitle-color":L},...M&&{"--form-label-color":M},...E&&{"--form-background-color":E},...W&&{"--form-border-color":W},...O&&{"--form-field-background-color":O},...A&&{"--form-field-text-color":A},...D&&{"--form-field-placeholder-color":D},...G&&{"--form-field-border-color":G},...U&&{"--form-field-focus-border-color":U},...q&&{"--form-field-focus-color":q},...V&&{"--form-button-background-color":V},...Y&&{"--form-button-text-color":Y},...X&&{"--form-button-hover-background-color":X},...J&&{"--form-button-hover-text-color":J},"--form-container-padding-top":se.top||"48px","--form-container-padding-right":se.right||"48px","--form-container-padding-bottom":se.bottom||"48px","--form-container-padding-left":se.left||"48px","--form-field-padding-top":ne.top||"12px","--form-field-padding-right":ne.right||"16px","--form-field-padding-bottom":ne.bottom||"12px","--form-field-padding-left":ne.left||"16px","--form-button-padding-top":ie.top||"14px","--form-button-padding-right":ie.right||"32px","--form-button-padding-bottom":ie.bottom||"14px","--form-button-padding-left":ie.left||"32px"},ce=(0,r.useBlockProps)({className:`contact-form-widget style-modern layout-${T}`,style:de});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Content Settings","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Title","axvart"),checked:d,onChange:e=>t({showTitle:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Subtitle","axvart"),checked:c,onChange:e=>t({showSubtitle:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Required Indicator (*)","axvart"),checked:oe,onChange:e=>t({showRequiredIndicator:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Field Visibility","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Name Field","axvart"),checked:x,onChange:e=>t({showNameField:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Email Field","axvart"),checked:p,onChange:e=>t({showEmailField:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Phone Field","axvart"),checked:g,onChange:e=>t({showPhoneField:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Subject Field","axvart"),checked:u,onChange:e=>t({showSubjectField:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Message Field","axvart"),checked:h,onChange:e=>t({showMessageField:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Field Labels","axvart"),initialOpen:!1,children:[x&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Name Label","axvart"),value:v,onChange:e=>t({nameLabel:e})}),p&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Email Label","axvart"),value:m,onChange:e=>t({emailLabel:e})}),g&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Phone Label","axvart"),value:b,onChange:e=>t({phoneLabel:e})}),u&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Subject Label","axvart"),value:f,onChange:e=>t({subjectLabel:e})}),h&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Message Label","axvart"),value:y,onChange:e=>t({messageLabel:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Field Placeholders","axvart"),initialOpen:!1,children:[x&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Name Placeholder","axvart"),value:_,onChange:e=>t({namePlaceholder:e})}),p&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Email Placeholder","axvart"),value:C,onChange:e=>t({emailPlaceholder:e})}),g&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Phone Placeholder","axvart"),value:j,onChange:e=>t({phonePlaceholder:e})}),u&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Subject Placeholder","axvart"),value:S,onChange:e=>t({subjectPlaceholder:e})}),h&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Message Placeholder","axvart"),value:w,onChange:e=>t({messagePlaceholder:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Style Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Box Shadow","axvart"),checked:l,onChange:e=>t({hasBoxShadow:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Field Layout","axvart"),value:T,options:[{label:(0,i.__)("Stacked","axvart"),value:"stacked"},{label:(0,i.__)("Inline (Name & Email)","axvart"),value:"inline"}],onChange:e=>t({fieldLayout:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Field Spacing","axvart"),value:$,onChange:e=>t({fieldSpacing:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Field Border Radius","axvart"),value:z,onChange:e=>t({fieldBorderRadius:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Field Border Width","axvart"),value:R,onChange:e=>t({fieldBorderWidth:e}),min:0,max:10}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Button Border Radius","axvart"),value:H,onChange:e=>t({buttonBorderRadius:e}),min:0,max:50})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Spacing","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.__experimentalBoxControl,{label:(0,i.__)("Form Container Padding","axvart"),values:N,onChange:e=>t({formContainerPadding:e})}),(0,s.jsx)(n.__experimentalBoxControl,{label:(0,i.__)("Field Padding","axvart"),values:P,onChange:e=>t({fieldPadding:e})}),(0,s.jsx)(n.__experimentalBoxControl,{label:(0,i.__)("Button Padding","axvart"),values:I,onChange:e=>t({buttonPadding:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Button Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Button Text","axvart"),value:k,onChange:e=>t({buttonText:e})}),(0,s.jsx)("p",{children:(0,i.__)("Button Alignment","axvart")}),(0,s.jsxs)(n.ButtonGroup,{children:[(0,s.jsx)(n.Button,{isPressed:"left"===B,onClick:()=>t({buttonAlignment:"left"}),children:(0,i.__)("Left","axvart")}),(0,s.jsx)(n.Button,{isPressed:"center"===B,onClick:()=>t({buttonAlignment:"center"}),children:(0,i.__)("Center","axvart")}),(0,s.jsx)(n.Button,{isPressed:"right"===B,onClick:()=>t({buttonAlignment:"right"}),children:(0,i.__)("Right","axvart")})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Title Font Size","axvart"),value:K,onChange:e=>t({titleFontSize:e}),min:16,max:72}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Subtitle Font Size","axvart"),value:Q,onChange:e=>t({subtitleFontSize:e}),min:12,max:32}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Label Font Size","axvart"),value:Z,onChange:e=>t({labelFontSize:e}),min:10,max:24}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Field Font Size","axvart"),value:ee,onChange:e=>t({fieldFontSize:e}),min:12,max:24}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Button Font Size","axvart"),value:te,onChange:e=>t({buttonFontSize:e}),min:12,max:24})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Colors","axvart"),initialOpen:!1,children:[(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Title Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(F),onChange:re("titleColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Subtitle Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(L),onChange:re("subtitleColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Label Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(M),onChange:re("labelColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Form Background Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(E),onChange:re("formBackgroundColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Form Border Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(W),onChange:re("formBorderColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Field Background Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(O),onChange:re("fieldBackgroundColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Field Text Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(A),onChange:re("fieldTextColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Field Placeholder Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(D),onChange:re("fieldPlaceholderColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Field Border Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(G),onChange:re("fieldBorderColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Field Focus Border Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(U),onChange:re("fieldFocusBorderColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Field Focus Color (Outline)","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(q),onChange:re("fieldFocusColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Button Background Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(V),onChange:re("buttonBackgroundColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Button Text Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(Y),onChange:re("buttonTextColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Button Hover Background Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(X),onChange:re("buttonHoverBackgroundColor"),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Button Hover Text Color","axvart")}),(0,s.jsx)(r.ColorPalette,{value:le(J),onChange:re("buttonHoverTextColor"),colors:ae,disableCustomColors:!1})]})]})]}),(0,s.jsx)("div",{...ce,children:(0,s.jsx)("div",{className:"contact-form-container",children:(0,s.jsxs)("form",{className:"axvart-contact-form",children:[d&&(0,s.jsx)(r.RichText,{tagName:"h2",className:"form-title",value:o,onChange:e=>t({formTitle:e}),placeholder:(0,i.__)("Enter form title...","axvart")}),c&&(0,s.jsx)(r.RichText,{tagName:"p",className:"form-subtitle",value:a,onChange:e=>t({formSubtitle:e}),placeholder:(0,i.__)("Enter form subtitle...","axvart")}),(0,s.jsxs)("div",{className:"form-fields",children:["inline"===T&&(x||p)&&(0,s.jsxs)("div",{className:"form-row inline",children:[x&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[v,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:_,disabled:!0})]}),p&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[m,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:C,disabled:!0})]})]}),"stacked"===T&&x&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[v,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:_,disabled:!0})]}),"stacked"===T&&p&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[m,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:C,disabled:!0})]}),g&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"field-label",htmlFor:"contact-phone",children:b}),(0,s.jsx)("input",{type:"tel",id:"contact-phone",name:"contact_phone",className:"field-input",placeholder:j,disabled:!0})]}),u&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-subject",children:[f,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-subject",name:"contact_subject",className:"field-input",placeholder:S,disabled:!0})]}),h&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-message",children:[y,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("textarea",{id:"contact-message",name:"contact_message",className:"field-input field-textarea",placeholder:w,rows:"5",disabled:!0})]})]}),(0,s.jsx)("div",{className:`form-submit align-${B}`,children:(0,s.jsx)("button",{type:"submit",className:"submit-button",disabled:!0,children:k})})]})})})]})},save:({attributes:e})=>{const{formTitle:t,formSubtitle:o,showTitle:a,showSubtitle:l,showNameField:n,showEmailField:i,showPhoneField:d,showSubjectField:c,showMessageField:x,nameLabel:p,emailLabel:g,phoneLabel:u,subjectLabel:h,messageLabel:v,namePlaceholder:m,emailPlaceholder:b,phonePlaceholder:f,subjectPlaceholder:y,messagePlaceholder:_,buttonText:C,buttonAlignment:j,fieldLayout:S,fieldSpacing:w,formContainerPadding:k,fieldPadding:B,buttonPadding:T,fieldBorderRadius:$,fieldBorderWidth:N,buttonBorderRadius:P,titleColor:I,subtitleColor:z,labelColor:R,formBackgroundColor:H,formBorderColor:F,fieldBackgroundColor:L,fieldTextColor:M,fieldPlaceholderColor:E,fieldBorderColor:W,fieldFocusBorderColor:O,fieldFocusColor:A,buttonBackgroundColor:D,buttonTextColor:G,buttonHoverBackgroundColor:U,buttonHoverTextColor:q,titleFontSize:V,subtitleFontSize:Y,labelFontSize:X,fieldFontSize:J,buttonFontSize:K,showRequiredIndicator:Q,hasBoxShadow:Z}=e,ee=B||{top:"12px",right:"16px",bottom:"12px",left:"16px"},te=T||{top:"14px",right:"32px",bottom:"14px",left:"32px"},oe=k||{top:"48px",right:"48px",bottom:"48px",left:"48px"},ae={"--form-field-spacing":`${w}px`,"--form-field-border-radius":`${$}px`,"--form-field-border-width":`${N}px`,"--form-button-border-radius":`${P}px`,"--form-title-font-size":`${V}px`,"--form-subtitle-font-size":`${Y}px`,"--form-label-font-size":`${X}px`,"--form-field-font-size":`${J}px`,"--form-button-font-size":`${K}px`,...I&&{"--form-title-color":I},...z&&{"--form-subtitle-color":z},...R&&{"--form-label-color":R},...H&&{"--form-background-color":H},...F&&{"--form-border-color":F},...L&&{"--form-field-background-color":L},...M&&{"--form-field-text-color":M},...E&&{"--form-field-placeholder-color":E},...W&&{"--form-field-border-color":W},...O&&{"--form-field-focus-border-color":O},...A&&{"--form-field-focus-color":A},...D&&{"--form-button-background-color":D},...G&&{"--form-button-text-color":G},...U&&{"--form-button-hover-background-color":U},...q&&{"--form-button-hover-text-color":q},"--form-container-padding-top":oe.top||"48px","--form-container-padding-right":oe.right||"48px","--form-container-padding-bottom":oe.bottom||"48px","--form-container-padding-left":oe.left||"48px","--form-field-padding-top":ee.top||"12px","--form-field-padding-right":ee.right||"16px","--form-field-padding-bottom":ee.bottom||"12px","--form-field-padding-left":ee.left||"16px","--form-button-padding-top":te.top||"14px","--form-button-padding-right":te.right||"32px","--form-button-padding-bottom":te.bottom||"14px","--form-button-padding-left":te.left||"32px"},le=r.useBlockProps.save({className:`contact-form-widget style-modern layout-${S}`,style:ae});return(0,s.jsx)("div",{...le,children:(0,s.jsx)("div",{className:"contact-form-container "+(Z?"has-box-shadow":""),children:(0,s.jsxs)("form",{className:"axvart-contact-form",children:[a&&(0,s.jsx)(r.RichText.Content,{tagName:"h2",className:"form-title",value:t}),l&&(0,s.jsx)(r.RichText.Content,{tagName:"p",className:"form-subtitle",value:o}),(0,s.jsxs)("div",{className:"form-fields",children:["inline"===S&&(n||i)&&(0,s.jsxs)("div",{className:"form-row inline",children:[n&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[p,Q&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:m,required:!0})]}),i&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[g,Q&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:b,required:!0})]})]}),"stacked"===S&&n&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[p,Q&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:m,required:!0})]}),"stacked"===S&&i&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[g,Q&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:b,required:!0})]}),d&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"field-label",htmlFor:"contact-phone",children:u}),(0,s.jsx)("input",{type:"tel",id:"contact-phone",name:"contact_phone",className:"field-input",placeholder:f})]}),c&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-subject",children:[h,Q&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-subject",name:"contact_subject",className:"field-input",placeholder:y,required:!0})]}),x&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-message",children:[v,Q&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("textarea",{id:"contact-message",name:"contact_message",className:"field-input field-textarea",placeholder:_,rows:"5",required:!0})]})]}),(0,s.jsx)("div",{className:`form-submit align-${j}`,children:(0,s.jsx)("button",{type:"submit",className:"submit-button","data-text":C,children:(0,s.jsx)("span",{children:C})})})]})})})}});var L=(0,s.jsx)(N.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(N.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),M=(0,s.jsx)(N.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(N.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});const{registerBlockType:E}=wp.blocks,{useState:W,useEffect:O}=wp.element,A=[{attributes:{iconSvg:{type:"string",default:""},iconUrl:{type:"string",default:""},size:{type:"number",default:48},align:{type:"string",default:"center"},style:{type:"object",default:{}}},save:({attributes:e})=>{const{iconSvg:t,iconUrl:o,size:a=48,align:l="center",style:r={}}=e,n={className:`has-text-align-${l} axvart-svg-icon-block`,style:{display:"inline-block",textAlign:l,width:"fit-content",margin:"0 auto","--icon-color":r?.color?.text||"currentColor","--icon-bg-color":r?.color?.background||"transparent"}},i={display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${a}px`,height:`${a}px`,lineHeight:0,color:"var(--icon-color)",backgroundColor:"var(--icon-bg-color)"};return t||o?o?(0,s.jsx)("div",{...n,children:(0,s.jsx)("div",{className:"svg-icon-container",style:i,children:(0,s.jsx)("div",{className:"svg-icon-mask","data-icon-url":o,style:{width:"100%",height:"100%",backgroundColor:"currentColor",WebkitMask:`url("${o}") center / contain no-repeat`,mask:`url("${o}") center / contain no-repeat`}})})}):(0,s.jsx)("div",{...n,children:(0,s.jsx)("div",{className:"svg-icon-container",style:i,dangerouslySetInnerHTML:{__html:t.replace(/]*)>/,'{const{attributes:t,setAttributes:o}=e,{iconSvg:a,iconUrl:l,size:d=48,borderRadius:c=0,align:x="center",enableColorModification:p=!1,url:g,linkTarget:u,rel:h}=t,[v]=(0,r.useSettings)("spacing.iconSizes.medium"),[m,b]=W(""),{style:f={}}=t,y=f?.color?.text||"currentColor",_=f?.color?.background||"transparent",C=(0,r.useBlockProps)({className:`has-text-align-${x} axvart-svg-icon-block`,style:{display:"inline-block",textAlign:x,"--icon-color":y,"--icon-bg-color":_,borderRadius:c?`${c}px`:void 0}});return O(()=>{const e=e=>{const t=document.createElement("div");t.innerHTML=e;const o=t.querySelector("svg");return o?(p&&(o.setAttribute("fill","currentColor"),o.style.color="currentColor",o.querySelectorAll("*").forEach(e=>{e.removeAttribute("fill"),e.removeAttribute("stroke"),e.style.fill="currentColor",e.style.stroke="currentColor",e.style.color="currentColor"})),t.innerHTML.replace(/<\/?div[^>]*>/g,"").replace(/style=""/g,"")):""};l?fetch(l).then(e=>e.text()).then(t=>b(e(t))).catch(e=>{console.error("Error loading SVG:",e),b("")}):a?a.startsWith("e.text()).then(t=>b(e(t))).catch(e=>{console.error("Error loading SVG:",e),b("")}):b("")},[a,l,p]),(0,s.jsxs)("div",{...C,children:[(0,s.jsxs)(r.BlockControls,{group:"block",children:[(0,s.jsx)(r.AlignmentToolbar,{value:x,onChange:e=>o({align:e})}),(0,s.jsx)(n.Button,{variant:"secondary",onClick:()=>{const e=wp.media({title:(0,i.__)("Replace SVG Icon","axvart"),button:{text:(0,i.__)("Select","axvart")},multiple:!1,library:{type:"image/svg+xml"}});e.on("select",()=>{const t=e.state().get("selection").first().toJSON();t&&t.url&&o({iconUrl:t.url,iconSvg:""})}),e.open()},children:(0,i.__)("Replace","axvart")}),(0,s.jsx)(n.ToolbarGroup,{children:(0,s.jsx)(n.DropdownMenu,{icon:"ellipsis",label:(0,i.__)("More options","axvart"),toggleProps:{isSmall:!0,variant:"tertiary"},children:()=>(0,s.jsxs)("div",{style:{minWidth:"240px"},children:[(l||a)&&(0,s.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid #e0e0e0",marginBottom:"4px"},children:[(0,s.jsx)("div",{style:{fontSize:"11px",color:"#757575",marginBottom:"4px",textTransform:"uppercase",fontWeight:500},children:(0,i.__)("URL","axvart")}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"13px"},children:[(0,s.jsx)("span",{className:"dashicons dashicons-admin-site",style:{color:"#757575",flexShrink:0}}),(0,s.jsx)("span",{style:{flex:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l?l.split("/").pop():a.includes("http")?a.split("/").pop():"inline-svg.svg"}),(0,s.jsx)(n.Button,{icon:L,label:(0,i.__)("Edit","axvart"),onClick:e=>{e.stopPropagation(),wp.media({title:(0,i.__)("Edit Media","axvart"),button:{text:(0,i.__)("Update","axvart")},multiple:!1,library:{type:"image/svg+xml"}}).open()},isSmall:!0,variant:"tertiary"}),(0,s.jsx)(n.Button,{icon:M,label:(0,i.__)("Copy URL","axvart"),onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(l||a)},isSmall:!0,variant:"tertiary"})]})]}),(0,s.jsxs)(n.MenuGroup,{children:[(0,s.jsx)(n.MenuItem,{icon:"admin-media",onClick:()=>{const e=wp.media({title:(0,i.__)("Open Media Library","axvart"),button:{text:(0,i.__)("Select","axvart")},multiple:!1,library:{type:"image/svg+xml"}});e.on("select",()=>{const t=e.state().get("selection").first().toJSON();t&&t.url&&o({iconUrl:t.url,iconSvg:""})}),e.open()},children:(0,i.__)("Open Media Library","axvart")}),(0,s.jsx)(n.MenuItem,{icon:"image-rotate",onClick:()=>{o({iconUrl:"",iconSvg:""})},children:(0,i.__)("Reset","axvart")})]})]})})})]}),(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Icon Settings","axvart"),children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Size","axvart"),value:d||v,onChange:e=>o({size:e}),min:16,max:200,step:1}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:c,onChange:e=>o({borderRadius:e}),min:0,max:100,step:1}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Color Modification","axvart"),help:p?(0,i.__)("SVG colors will be modified to match theme colors.","axvart"):(0,i.__)("SVG will display in its original colors.","axvart"),checked:p,onChange:e=>o({enableColorModification:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Link Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Link URL","axvart"),value:g,onChange:e=>o({url:e}),help:(0,i.__)("Enter a URL to link this icon to.","axvart")}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Open in new tab","axvart"),checked:"_blank"===u,onChange:e=>o({linkTarget:e?"_blank":"_self",rel:e?"noopener noreferrer":""})})]})]}),(l||a)&&m?(0,s.jsx)("div",{className:"svg-icon-container",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${d}px`,height:`${d}px`,lineHeight:0,color:y},children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:m},style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:p?"var(--icon-color)":"inherit"}})}):!l&&!a||m?(0,s.jsx)(n.Placeholder,{icon:"format-image",label:(0,i.__)("SVG Icon","axvart"),instructions:(0,i.__)("Upload an SVG file or enter an SVG URL","axvart"),className:"svg-icon-placeholder",children:(0,s.jsxs)("div",{className:"components-placeholder__fieldset",children:[(0,s.jsx)(n.TextControl,{placeholder:(0,i.__)("Paste SVG URL here","axvart"),value:a,onChange:e=>o({iconSvg:e}),className:"svg-icon-url-input"}),(0,s.jsx)(n.Button,{isSecondary:!0,isLarge:!0,onClick:()=>{const e=wp.media({title:(0,i.__)("Select SVG","axvart"),button:{text:(0,i.__)("Select","axvart")},multiple:!1,library:{type:"image/svg+xml"}});e.on("select",()=>(e=>(e&&e.url&&o({iconUrl:e.url,iconSvg:""}),!1))(e.state().get("selection").first().toJSON())),e.open()},className:"svg-icon-upload-button",children:(0,i.__)("Upload SVG","axvart")})]})}):(0,s.jsx)("div",{className:"svg-icon-container",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${d}px`,height:`${d}px`,lineHeight:0,color:y},children:p?(0,s.jsx)("div",{className:"svg-icon-mask",style:{width:"100%",height:"100%",backgroundColor:"currentColor",WebkitMask:`url(${l||a}) center / contain no-repeat`,mask:`url(${l||a}) center / contain no-repeat`,display:"block"}}):(0,s.jsx)("img",{src:l||a,alt:"SVG Icon",style:{width:"100%",height:"100%",objectFit:"contain"}})})]})},deprecated:A,save:({attributes:e})=>{const{iconSvg:t,iconUrl:o,size:a=48,borderRadius:l=0,align:n="center",style:i={},enableColorModification:d=!1,url:c,linkTarget:x,rel:p}=e,g=i?.color?.text||"currentColor",u=i?.color?.background||"transparent",h=r.useBlockProps.save({className:`has-text-align-${n} axvart-svg-icon-block`,style:{"--icon-color":g,"--icon-bg-color":u,borderRadius:l?`${l}px`:void 0}}),v={display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${a}px`,height:`${a}px`,lineHeight:0,color:"var(--icon-color, currentColor)",backgroundColor:"var(--icon-bg-color, transparent)"};if(!t&&!o)return(0,s.jsx)("div",{...h,children:(0,s.jsx)("div",{className:"svg-icon-container",style:v,children:(0,s.jsx)("span",{className:"dashicons dashicons-format-image"})})});if(o){const e=(0,s.jsx)("div",{className:"svg-icon-container",style:v,children:d?(0,s.jsx)("div",{className:"svg-icon-mask","data-icon-url":o,style:{width:"100%",height:"100%",backgroundColor:"currentColor",WebkitMask:`url("${o}") center / contain no-repeat`,mask:`url("${o}") center / contain no-repeat`}}):(0,s.jsx)("img",{src:o,alt:"SVG Icon",style:{width:"100%",height:"100%",objectFit:"contain"}})});return(0,s.jsx)("div",{...h,children:c?(0,s.jsx)("a",{href:c,target:x,rel:p,style:{display:"inline-block",textDecoration:"none",color:"inherit"},children:e}):e})}if(t){const e=(0,s.jsx)("div",{className:"svg-icon-container",style:v,dangerouslySetInnerHTML:{__html:d?t.replace(/]*)>/,'null}],edit:({attributes:e,setAttributes:t})=>{const{menuTitle:o,menuItems:a,titleColor:l,linkColor:d,backgroundColor:c,menuDirection:x,menuDirectionTablet:p,menuDirectionMobile:g,menuWidth:u,menuWidthTablet:h,menuWidthMobile:v,menuHeight:m,menuHeightTablet:b,menuHeightMobile:f,itemSpacing:y,itemSpacingTablet:_,itemSpacingMobile:C,enableAccordion:j,showToggleIcon:S,toggleIconPosition:w,containerBackgroundColor:k,containerBorderColor:B,containerBorderWidth:T,containerBorderRadius:$,titleFontFamily:N,titleFontSize:P,titleFontWeight:I,titleLineHeight:z,titleLetterSpacing:R,menuItemFontFamily:H,menuItemFontSize:F,menuItemFontWeight:L,menuItemLineHeight:M,menuItemLetterSpacing:E}=e,[W]=(0,r.useSettings)("color.palette");if(!a||0===a.length||4===a.length&&a.some(e=>["products","company","pricing","contact"].includes(e.id))){const e=Date.now(),o=()=>Math.random().toString(36).substr(2,9),a=[{label:"Products",url:"#",id:`products-${e}-${o()}`},{label:"Company",url:"#",id:`company-${e}-${o()}`},{label:"Pricing",url:"#",id:`pricing-${e}-${o()}`},{label:"Contact",url:"#",id:`contact-${e}-${o()}`}];t({menuItems:a})}const O={"--menu-width":u,"--menu-width-tablet":h,"--menu-width-mobile":v,"--menu-height":m,"--menu-height-tablet":b,"--menu-height-mobile":f,"--item-spacing":y,"--item-spacing-tablet":_,"--item-spacing-mobile":C,"--title-font-family":N,"--title-font-size":P,"--title-font-weight":I,"--title-line-height":z,"--title-letter-spacing":R,"--menu-item-font-family":H,"--menu-item-font-size":F,"--menu-item-font-weight":L,"--menu-item-line-height":M,"--menu-item-letter-spacing":E,"--menu-title-bg-color":"transparent","--menu-title-hover-bg-color":"rgba(0, 0, 0, 0.05)"},A=(0,r.useBlockProps)({className:"axvart-responsive-nav-menu",style:O}),U=()=>{const e={label:(0,i.__)("New Item","axvart"),url:"#",id:`item-${Date.now()}-${Math.random().toString(36).substr(2,9)}`};t({menuItems:[...a,e]})},q=(e,o,l)=>{const r=[...a];r[e][o]=l,t({menuItems:r})};return(0,s.jsxs)("div",{...A,children:[(0,s.jsx)(r.BlockControls,{children:(0,s.jsx)(n.ToolbarGroup,{children:(0,s.jsx)(n.ToolbarButton,{icon:D,label:(0,i.__)("Add Menu Item","axvart"),onClick:U})})}),(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Menu Settings","axvart"),children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Menu Title","axvart"),value:o,onChange:e=>t({menuTitle:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Accordion","axvart"),checked:j,onChange:e=>t({enableAccordion:e}),help:(0,i.__)("Enable accordion behavior on smaller screens","axvart")}),j&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Toggle Icon","axvart"),checked:S,onChange:e=>t({showToggleIcon:e})}),S&&(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Toggle Icon Position","axvart"),value:w,options:[{label:(0,i.__)("Right","axvart"),value:"right"},{label:(0,i.__)("Left","axvart"),value:"left"}],onChange:e=>t({toggleIconPosition:e})})]})]}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Responsive Layout","axvart"),initialOpen:!1,children:(0,s.jsx)(n.TabPanel,{className:"responsive-tabs",activeClass:"active-tab",tabs:[{name:"desktop",title:(0,i.__)("Desktop","axvart"),className:"tab-desktop"},{name:"tablet",title:(0,i.__)("Tablet","axvart"),className:"tab-tablet"},{name:"mobile",title:(0,i.__)("Mobile","axvart"),className:"tab-mobile"}],children:e=>(0,s.jsxs)("div",{className:`responsive-controls responsive-controls-${e.name}`,children:["desktop"===e.name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Menu Direction","axvart"),value:x,options:[{label:(0,i.__)("Vertical","axvart"),value:"vertical"},{label:(0,i.__)("Horizontal","axvart"),value:"horizontal"}],onChange:e=>t({menuDirection:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Width","axvart"),value:u,onChange:e=>t({menuWidth:e}),units:[{value:"px",label:"px"},{value:"%",label:"%"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Height","axvart"),value:m,onChange:e=>t({menuHeight:e}),units:[{value:"px",label:"px"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Item Spacing","axvart"),value:y,onChange:e=>t({itemSpacing:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]})]}),"tablet"===e.name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Menu Direction","axvart"),value:p,options:[{label:(0,i.__)("Vertical","axvart"),value:"vertical"},{label:(0,i.__)("Horizontal","axvart"),value:"horizontal"}],onChange:e=>t({menuDirectionTablet:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Width","axvart"),value:h,onChange:e=>t({menuWidthTablet:e}),units:[{value:"px",label:"px"},{value:"%",label:"%"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Height","axvart"),value:b,onChange:e=>t({menuHeightTablet:e}),units:[{value:"px",label:"px"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Item Spacing","axvart"),value:_,onChange:e=>t({itemSpacingTablet:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]})]}),"mobile"===e.name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Menu Direction","axvart"),value:g,options:[{label:(0,i.__)("Vertical","axvart"),value:"vertical"},{label:(0,i.__)("Horizontal","axvart"),value:"horizontal"}],onChange:e=>t({menuDirectionMobile:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Width","axvart"),value:v,onChange:e=>t({menuWidthMobile:e}),units:[{value:"px",label:"px"},{value:"%",label:"%"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Height","axvart"),value:f,onChange:e=>t({menuHeightMobile:e}),units:[{value:"px",label:"px"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Item Spacing","axvart"),value:C,onChange:e=>t({itemSpacingMobile:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]})]})]})})}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Colors","axvart"),initialOpen:!1,children:[(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Title Color","axvart")}),(0,s.jsx)(r.ColorPalette,{colors:W,value:l,onChange:e=>t({titleColor:e||"var(--wp--preset--color--primary)"}),enableAlpha:!0,clearable:!0})]}),(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Link Color","axvart")}),(0,s.jsx)(r.ColorPalette,{colors:W,value:d,onChange:e=>t({linkColor:e||"var(--wp--preset--color--primary)"}),enableAlpha:!0,clearable:!0})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Container Styling","axvart"),initialOpen:!1,children:[(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Background Color","axvart")}),(0,s.jsx)(r.ColorPalette,{colors:W,value:k,onChange:e=>t({containerBackgroundColor:e||""}),enableAlpha:!0,clearable:!0})]}),(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Border Color","axvart")}),(0,s.jsx)(r.ColorPalette,{colors:W,value:B,onChange:e=>t({containerBorderColor:e||"var(--wp--preset--color--contrast)"}),enableAlpha:!0,clearable:!0})]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Border Width","axvart"),value:T,onChange:e=>t({containerBorderWidth:e}),units:[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Border Radius","axvart"),value:$,onChange:e=>t({containerBorderRadius:e}),units:[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography","axvart"),initialOpen:!1,children:[(0,s.jsx)("h4",{children:(0,i.__)("Title Typography","axvart")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Family","axvart"),value:e.titleFontFamily,options:[{label:(0,i.__)("Default","axvart"),value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Helvetica",value:"Helvetica, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times New Roman",value:"Times New Roman, serif"},{label:"Courier New",value:"Courier New, monospace"},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Trebuchet MS",value:"Trebuchet MS, sans-serif"},{label:"Impact",value:"Impact, sans-serif"}],onChange:e=>t({titleFontFamily:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Font Size","axvart"),value:e.titleFontSize,onChange:e=>t({titleFontSize:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"},{value:"%",label:"%"}]}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Weight","axvart"),value:e.titleFontWeight,options:[{label:"100 - Thin",value:"100"},{label:"200 - Extra Light",value:"200"},{label:"300 - Light",value:"300"},{label:"400 - Normal",value:"400"},{label:"500 - Medium",value:"500"},{label:"600 - Semi Bold",value:"600"},{label:"700 - Bold",value:"700"},{label:"800 - Extra Bold",value:"800"},{label:"900 - Black",value:"900"}],onChange:e=>t({titleFontWeight:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Line Height","axvart"),value:e.titleLineHeight,onChange:e=>t({titleLineHeight:e}),units:[{value:"",label:"unitless"},{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"},{value:"%",label:"%"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Letter Spacing","axvart"),value:e.titleLetterSpacing,onChange:e=>t({titleLetterSpacing:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]}),(0,s.jsx)("hr",{style:{margin:"20px 0"}}),(0,s.jsx)("h4",{children:(0,i.__)("Menu Items Typography","axvart")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Family","axvart"),value:e.menuItemFontFamily,options:[{label:(0,i.__)("Default","axvart"),value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Helvetica",value:"Helvetica, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times New Roman",value:"Times New Roman, serif"},{label:"Courier New",value:"Courier New, monospace"},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Trebuchet MS",value:"Trebuchet MS, sans-serif"},{label:"Impact",value:"Impact, sans-serif"}],onChange:e=>t({menuItemFontFamily:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Font Size","axvart"),value:e.menuItemFontSize,onChange:e=>t({menuItemFontSize:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"},{value:"%",label:"%"}]}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Weight","axvart"),value:e.menuItemFontWeight,options:[{label:"100 - Thin",value:"100"},{label:"200 - Extra Light",value:"200"},{label:"300 - Light",value:"300"},{label:"400 - Normal",value:"400"},{label:"500 - Medium",value:"500"},{label:"600 - Semi Bold",value:"600"},{label:"700 - Bold",value:"700"},{label:"800 - Extra Bold",value:"800"},{label:"900 - Black",value:"900"}],onChange:e=>t({menuItemFontWeight:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Line Height","axvart"),value:e.menuItemLineHeight,onChange:e=>t({menuItemLineHeight:e}),units:[{value:"",label:"unitless"},{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"},{value:"%",label:"%"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Letter Spacing","axvart"),value:e.menuItemLetterSpacing,onChange:e=>t({menuItemLetterSpacing:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Menu Items","axvart"),initialOpen:!1,children:[a.map((e,o)=>(0,s.jsxs)("div",{style:{marginBottom:"16px",padding:"12px",border:"1px solid #ddd",borderRadius:"4px"},children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Label","axvart"),value:e.label,onChange:e=>q(o,"label",e)}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("URL","axvart"),value:e.url,onChange:e=>q(o,"url",e)}),(0,s.jsx)(n.Button,{icon:G,label:(0,i.__)("Remove Item","axvart"),onClick:()=>(e=>{const o=a.filter((t,o)=>o!==e);t({menuItems:o})})(o),isDestructive:!0,variant:"secondary",size:"small"})]},e.id)),(0,s.jsx)(n.Button,{icon:D,onClick:U,variant:"primary",children:(0,i.__)("Add Menu Item","axvart")})]})]}),(0,s.jsx)("div",{className:"responsive-nav-menu-preview","data-menu-direction":x,"data-enable-accordion":j,"data-toggle-position":w,children:(0,s.jsxs)("div",{className:"responsive-nav-menu",style:{backgroundColor:k||void 0,borderColor:B||void 0,borderWidth:T||"0px",borderRadius:$||"0px",borderStyle:B&&"0px"!==T?"solid":"none"},children:[(0,s.jsxs)("h3",{className:"menu-title",style:{color:l},children:[o,S&&j&&(0,s.jsx)("span",{className:`menu-toggle toggle-${w}`,"aria-hidden":"true",children:"+"})]}),(0,s.jsx)("nav",{className:`menu-items direction-${x}`,style:{flexDirection:"horizontal"===x?"row":"column"},children:a.map((e,t)=>(0,s.jsx)("a",{href:e.url,className:"menu-item",style:{color:d},onClick:e=>e.preventDefault(),children:e.label},e.id))})]})})]})},save:({attributes:e,clientId:t})=>{const{menuTitle:o,menuItems:a,titleColor:l,linkColor:n,menuDirection:i,menuDirectionTablet:d,menuDirectionMobile:c,menuWidth:x,menuWidthTablet:p,menuWidthMobile:g,menuHeight:u,menuHeightTablet:h,menuHeightMobile:v,itemSpacing:m,itemSpacingTablet:b,itemSpacingMobile:f,enableAccordion:y,showToggleIcon:_,toggleIconPosition:C,containerBackgroundColor:j,containerBorderColor:S,containerBorderWidth:w,containerBorderRadius:k,titleFontFamily:B,titleFontSize:T,titleFontWeight:$,titleLineHeight:N,titleLetterSpacing:P,menuItemFontFamily:I,menuItemFontSize:z,menuItemFontWeight:R,menuItemLineHeight:H,menuItemLetterSpacing:F}=e,L={"--menu-width":x,"--menu-width-tablet":p,"--menu-width-mobile":g,"--menu-height":u,"--menu-height-tablet":h,"--menu-height-mobile":v,"--item-spacing":m,"--item-spacing-tablet":b,"--item-spacing-mobile":f,"--title-font-family":B,"--title-font-size":T,"--title-font-weight":$,"--title-line-height":N,"--title-letter-spacing":P,"--menu-item-font-family":I,"--menu-item-font-size":z,"--menu-item-font-weight":R,"--menu-item-line-height":H,"--menu-item-letter-spacing":F,backgroundColor:j||void 0,borderColor:S||void 0,borderWidth:w||"0px",borderRadius:k||"0px",borderStyle:S&&"0px"!==w?"solid":"none"},M=r.useBlockProps.save({className:"axvart-responsive-nav-menu","data-desktop-direction":i,"data-tablet-direction":d,"data-mobile-direction":c,"data-enable-accordion":y,"data-toggle-position":C,style:L});return(0,s.jsx)("div",{...M,children:(0,s.jsxs)("div",{className:"responsive-nav-menu",children:[(0,s.jsxs)("h3",{className:"menu-title",style:{color:l},role:"button",tabIndex:"0","aria-expanded":"false","aria-controls":`menu-items-${t}`,children:[o,_&&y&&(0,s.jsx)("span",{className:`menu-toggle toggle-${C}`,"aria-hidden":"true",children:"+"})]}),(0,s.jsx)("nav",{className:`menu-items direction-${i}`,id:`menu-items-${t}`,role:"region","aria-labelledby":"menu-title",style:{flexDirection:"horizontal"===i?"row":"column"},children:a.map(e=>(0,s.jsx)("a",{href:e.url,className:"menu-item",style:{color:n},children:e.label},e.id))})]})})}});const U=[{attributes:{text:{type:"string",default:"Stay Updated!"},url:{type:"string",default:""},linkTarget:{type:"string",default:"_self"},relNofollow:{type:"boolean",default:!1},relSponsored:{type:"boolean",default:!1},icon:{type:"string",default:"arrow-right-alt"},iconType:{type:"string",default:"dashicon"},iconPosition:{type:"string",default:"right"},iconSize:{type:"number",default:18},iconColor:{type:"string",default:"var(--wp--preset--color--base)"},iconHoverColor:{type:"string",default:""},iconGap:{type:"number",default:8},bgColor:{type:"string",default:""},bgGradient:{type:"string",default:""},hoverBgColor:{type:"string",default:""},hoverBgGradient:{type:"string",default:""},textColor:{type:"string",default:"var(--wp--preset--color--base)"},hoverTextColor:{type:"string",default:"var(--wp--preset--color--base)"},typography:{type:"object",default:{fontSize:16,fontWeight:"600",lineHeight:1,letterSpacing:0}},borderRadius:{type:"number",default:50},paddingX:{type:"number",default:12},paddingY:{type:"number",default:6},alignment:{type:"string",default:"center"},widthType:{type:"string",default:"auto"},border:{type:"object",default:{width:0,style:"solid",color:"transparent"}},hoverBorderColor:{type:"string",default:""},shadow:{type:"string",default:""},hoverShadow:{type:"string",default:""},enableHoverEffect:{type:"boolean",default:!0},hoverEffect:{type:"string",default:"lift"},iconAnimation:{type:"string",default:"slide"},transitionDuration:{type:"number",default:.3},customCss:{type:"string",default:""}},save({attributes:e}){const{text:t,url:o,linkTarget:a,relNofollow:l,relSponsored:n,icon:i,iconType:d,iconPosition:c,iconSize:x,iconColor:p,iconHoverColor:g,iconGap:u,bgColor:h,bgGradient:v,hoverBgColor:m,hoverBgGradient:b,textColor:f,hoverTextColor:y,typography:_,borderRadius:C,paddingX:j,paddingY:S,alignment:w,widthType:k,border:B,hoverBorderColor:T,shadow:$,hoverShadow:N,enableHoverEffect:P,hoverEffect:I,iconAnimation:z,transitionDuration:R,customCss:H}=e,F=[];l&&F.push("nofollow"),n&&F.push("sponsored");const L=F.length>0?F.join(" "):void 0,M={"--bg-color":h,"--hover-bg-color":m||h,"--hover-text-color":y||f,"--font-size":`${_.fontSize}px`,"--font-weight":_.fontWeight,"--line-height":_.lineHeight,"--letter-spacing":`${_.letterSpacing}px`,"--border-radius":`${C}px`,"--padding-x":`${j}px`,"--padding-y":`${S}px`,"--border-width":`${B.width}px`,"--border-style":B.style,"--border-color":B.color,"--hover-border-color":T||B.color,"--shadow":$,"--hover-shadow":N,"--icon-size":`${x}px`,"--icon-color":p,"--icon-hover-color":g||p,"--icon-gap":`${u}px`,"--transition-duration":`${R}s`,background:v||h,fontSize:`${_.fontSize}px`,fontWeight:_.fontWeight,lineHeight:_.lineHeight,letterSpacing:`${_.letterSpacing}px`,borderRadius:`${C}px`,padding:`${S}px ${j}px`,border:`${B.width}px ${B.style} ${B.color}`,boxShadow:$},E=r.useBlockProps.save({className:`axvart-advanced-icon-button align-${w} width-${k} ${P?`hover-effect-${I}`:""} ${P?`icon-anim-${z}`:""}`,style:{...M,display:"inline-flex",width:"full"===k?"100%":"auto"}}),W=()=>i?(0,s.jsx)("span",{className:`button-icon position-${c}`,style:{fontSize:`${x}px`,color:p,marginRight:"left"===c?`${u}px`:0,marginLeft:"right"===c?`${u}px`:0},children:"dashicon"===d?(0,s.jsx)("span",{className:`dashicons dashicons-${i}`}):(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:i}})}):null;return(0,s.jsxs)("div",{...E,children:[(0,s.jsxs)("a",{href:o,target:a,rel:L,className:"button-content",style:{textDecoration:"none",color:"inherit",display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:["left"===c&&W(),(0,s.jsx)(r.RichText.Content,{tagName:"span",value:t}),"right"===c&&W()]}),P&&(0,s.jsx)("style",{children:"\n .axvart-advanced-icon-button:hover {\n background: var(--hover-bg-gradient, var(--hover-bg-color)) !important;\n color: var(--hover-text-color) !important;\n border-color: var(--hover-border-color) !important;\n box-shadow: var(--hover-shadow) !important;\n }\n .axvart-advanced-icon-button:hover .button-icon {\n color: var(--icon-hover-color) !important;\n }\n "})]})}},{attributes:{text:{type:"string",default:"Stay Updated!"},url:{type:"string",default:""},linkTarget:{type:"string",default:"_self"},relNofollow:{type:"boolean",default:!1},relSponsored:{type:"boolean",default:!1},icon:{type:"string",default:"arrow-right-alt"},iconType:{type:"string",default:"dashicon"},iconPosition:{type:"string",default:"right"},iconSize:{type:"number",default:18},iconColor:{type:"string",default:"var(--wp--preset--color--base)"},iconHoverColor:{type:"string",default:""},iconGap:{type:"number",default:8},bgColor:{type:"string",default:""},bgGradient:{type:"string",default:"var(--wp--preset--gradient--accent-gradient)"},hoverBgColor:{type:"string",default:""},hoverBgGradient:{type:"string",default:""},textColor:{type:"string",default:"var(--wp--preset--color--base)"},hoverTextColor:{type:"string",default:"var(--wp--preset--color--base)"},typography:{type:"object",default:{fontSize:16,fontWeight:"600",lineHeight:1,letterSpacing:0}},borderRadius:{type:"number",default:50},paddingX:{type:"number",default:12},paddingY:{type:"number",default:6},alignment:{type:"string",default:"center"},widthType:{type:"string",default:"auto"},border:{type:"object",default:{width:0,style:"solid",color:"transparent"}},hoverBorderColor:{type:"string",default:""},shadow:{type:"string",default:""},hoverShadow:{type:"string",default:""},enableHoverEffect:{type:"boolean",default:!0},hoverEffect:{type:"string",default:"lift"},iconAnimation:{type:"string",default:"slide"},transitionDuration:{type:"number",default:.3},customCss:{type:"string",default:""}},save({attributes:e}){const{text:t,url:o,linkTarget:a,relNofollow:l,relSponsored:n,icon:i,iconType:d,iconPosition:c,iconSize:x,iconColor:p,iconHoverColor:g,iconGap:u,bgColor:h,bgGradient:v,hoverBgColor:m,hoverBgGradient:b,textColor:f,hoverTextColor:y,typography:_,borderRadius:C,paddingX:j,paddingY:S,alignment:w,widthType:k,border:B,hoverBorderColor:T,shadow:$,hoverShadow:N,enableHoverEffect:P,hoverEffect:I,iconAnimation:z,transitionDuration:R,customCss:H}=e,F=[];l&&F.push("nofollow"),n&&F.push("sponsored");const L=F.length>0?F.join(" "):void 0,M={"--bg-color":h,"--bg-gradient":v,"--hover-bg-color":m||h,"--hover-bg-gradient":b||v,"--text-color":f,"--hover-text-color":y||f,"--font-size":`${_.fontSize}px`,"--font-weight":_.fontWeight,"--line-height":_.lineHeight,"--letter-spacing":`${_.letterSpacing}px`,"--border-radius":`${C}px`,"--padding-x":`${j}px`,"--padding-y":`${S}px`,"--border-width":`${B.width}px`,"--border-style":B.style,"--border-color":B.color,"--hover-border-color":T||B.color,"--shadow":$,"--hover-shadow":N,"--icon-size":`${x}px`,"--icon-color":p,"--icon-hover-color":g||p,"--icon-gap":`${u}px`,"--transition-duration":`${R}s`,fontSize:`${_.fontSize}px`,fontWeight:_.fontWeight,lineHeight:_.lineHeight,letterSpacing:`${_.letterSpacing}px`,borderRadius:`${C}px`,padding:`${S}px ${j}px`,border:`${B.width}px ${B.style} ${B.color}`,boxShadow:$},E=r.useBlockProps.save({className:`axvart-advanced-icon-button align-${w} width-${k} ${P?`hover-effect-${I}`:""} ${P?`icon-anim-${z}`:""}`,style:{...M,display:"inline-flex",width:"full"===k?"100%":"auto"}}),W=()=>i?(0,s.jsx)("span",{className:`button-icon position-${c}`,style:{fontSize:`${x}px`,color:p,marginRight:"left"===c?`${u}px`:0,marginLeft:"right"===c?`${u}px`:0},children:"dashicon"===d?(0,s.jsx)("span",{className:`dashicons dashicons-${i}`}):(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:i}})}):null;return(0,s.jsxs)("div",{...E,children:[(0,s.jsxs)("a",{href:o,target:a,rel:L,className:"button-content",style:{textDecoration:"none",color:"inherit",display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:["left"===c&&W(),(0,s.jsx)(r.RichText.Content,{tagName:"span",value:t}),"right"===c&&W()]}),P&&(0,s.jsx)("style",{children:"\n .axvart-advanced-icon-button:hover {\n background: var(--hover-bg-gradient, var(--hover-bg-color)) !important;\n color: var(--hover-text-color) !important;\n border-color: var(--hover-border-color) !important;\n box-shadow: var(--hover-shadow) !important;\n }\n .axvart-advanced-icon-button:hover .button-icon {\n color: var(--icon-hover-color) !important;\n }\n "})]})}},{attributes:{text:{type:"string",default:"Stay Updated!"},url:{type:"string",default:""},linkTarget:{type:"string",default:"_self"},relNofollow:{type:"boolean",default:!1},relSponsored:{type:"boolean",default:!1},icon:{type:"string",default:"arrow-right-alt"},iconType:{type:"string",default:"dashicon"},iconPosition:{type:"string",default:"right"},iconSize:{type:"number",default:18},iconColor:{type:"string",default:"#ffffff"},iconHoverColor:{type:"string",default:""},iconGap:{type:"number",default:8},bgColor:{type:"string",default:"#4f80ff"},bgGradient:{type:"string",default:"linear-gradient(90deg, #6f42f5, #00c6ff)"},hoverBgColor:{type:"string",default:""},hoverBgGradient:{type:"string",default:""},textColor:{type:"string",default:"#ffffff"},hoverTextColor:{type:"string",default:"#ffffff"},typography:{type:"object",default:{fontSize:16,fontWeight:"600",lineHeight:1,letterSpacing:0}},borderRadius:{type:"number",default:50},paddingX:{type:"number",default:12},paddingY:{type:"number",default:6},alignment:{type:"string",default:"center"},widthType:{type:"string",default:"auto"},border:{type:"object",default:{width:0,style:"solid",color:"transparent"}},hoverBorderColor:{type:"string",default:""},shadow:{type:"string",default:"0 4px 6px rgba(0, 0, 0, 0.1)"},hoverShadow:{type:"string",default:"0 10px 15px rgba(0, 0, 0, 0.2)"},enableHoverEffect:{type:"boolean",default:!0},hoverEffect:{type:"string",default:"lift"},iconAnimation:{type:"string",default:"slide"},transitionDuration:{type:"number",default:.3},customCss:{type:"string",default:""}},save({attributes:e}){const{text:t,url:o,linkTarget:a,relNofollow:l,relSponsored:n,icon:i,iconType:d,iconPosition:c,iconSize:x,iconColor:p,iconHoverColor:g,iconGap:u,bgColor:h,bgGradient:v,hoverBgColor:m,hoverBgGradient:b,textColor:f,hoverTextColor:y,typography:_,borderRadius:C,paddingX:j,paddingY:S,alignment:w,widthType:k,border:B,hoverBorderColor:T,shadow:$,hoverShadow:N,enableHoverEffect:P,hoverEffect:I,iconAnimation:z,transitionDuration:R,customCss:H}=e,F=[];l&&F.push("nofollow"),n&&F.push("sponsored");const L=F.length>0?F.join(" "):void 0,M={"--bg-color":h,"--bg-gradient":v,"--hover-bg-color":m||h,"--hover-bg-gradient":b||v,"--text-color":f,"--hover-text-color":y||f,"--font-size":`${_.fontSize}px`,"--font-weight":_.fontWeight,"--line-height":_.lineHeight,"--letter-spacing":`${_.letterSpacing}px`,"--border-radius":`${C}px`,"--padding-x":`${j}px`,"--padding-y":`${S}px`,"--border-width":`${B.width}px`,"--border-style":B.style,"--border-color":B.color,"--hover-border-color":T||B.color,"--shadow":$,"--hover-shadow":N,"--icon-size":`${x}px`,"--icon-color":p,"--icon-hover-color":g||p,"--icon-gap":`${u}px`,"--transition-duration":`${R}s`,background:v||h,color:f,fontSize:`${_.fontSize}px`,fontWeight:_.fontWeight,lineHeight:_.lineHeight,letterSpacing:`${_.letterSpacing}px`,borderRadius:`${C}px`,padding:`${S}px ${j}px`,border:`${B.width}px ${B.style} ${B.color}`,boxShadow:$},E=r.useBlockProps.save({className:`axvart-advanced-icon-button align-${w} width-${k} ${P?`hover-effect-${I}`:""} ${P?`icon-anim-${z}`:""}`,style:{...M,display:"inline-flex",width:"full"===k?"100%":"auto",...JSON.parse(H||"{}")}}),W=()=>i?(0,s.jsx)("span",{className:`button-icon position-${c}`,style:{fontSize:`${x}px`,color:p,marginRight:"left"===c?`${u}px`:0,marginLeft:"right"===c?`${u}px`:0},children:"dashicon"===d?(0,s.jsx)("span",{className:`dashicons dashicons-${i}`}):(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:i}})}):null;return(0,s.jsxs)("div",{...E,children:[(0,s.jsxs)("a",{href:o,target:a,rel:L,className:"button-content",style:{textDecoration:"none",color:"inherit",display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:["left"===c&&W(),(0,s.jsx)(r.RichText.Content,{tagName:"span",value:t}),"right"===c&&W()]}),P&&(0,s.jsx)("style",{children:"\n .axvart-advanced-icon-button:hover {\n background: var(--hover-bg-gradient, var(--hover-bg-color)) !important;\n color: var(--hover-text-color) !important;\n border-color: var(--hover-border-color) !important;\n box-shadow: var(--hover-shadow) !important;\n }\n .axvart-advanced-icon-button:hover .button-icon {\n color: var(--icon-hover-color) !important;\n }\n "})]})}}],q=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/advanced-icon-button","version":"0.1.0","title":"Advanced Icon Button","category":"design","icon":"button","description":"A modern, stylish button block with gradient background, rounded pill shape, and optional icons.","textdomain":"axvart","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","supports":{"html":false,"anchor":true,"customClassName":true},"attributes":{"text":{"type":"string","default":"Stay Updated!"},"url":{"type":"string","default":""},"linkTarget":{"type":"string","default":"_self"},"relNofollow":{"type":"boolean","default":false},"relSponsored":{"type":"boolean","default":false},"icon":{"type":"string","default":"arrow-right-alt"},"iconType":{"type":"string","default":"dashicon"},"iconPosition":{"type":"string","default":"right"},"iconSize":{"type":"number","default":18},"iconColor":{"type":"string","default":"var(--wp--preset--color--base)"},"iconHoverColor":{"type":"string","default":""},"iconGap":{"type":"number","default":8},"bgColor":{"type":"string","default":""},"bgGradient":{"type":"string","default":"var(--wp--preset--gradient--accent-gradient)"},"hoverBgColor":{"type":"string","default":""},"hoverBgGradient":{"type":"string","default":""},"textColor":{"type":"string","default":"var(--wp--preset--color--base)"},"hoverTextColor":{"type":"string","default":"var(--wp--preset--color--base)"},"typography":{"type":"object","default":{"fontSize":16,"fontWeight":"600","lineHeight":1,"letterSpacing":0}},"borderRadius":{"type":"number","default":50},"paddingX":{"type":"number","default":12},"paddingY":{"type":"number","default":6},"alignment":{"type":"string","default":"center"},"widthType":{"type":"string","default":"auto"},"border":{"type":"object","default":{"width":0,"style":"solid","color":"transparent"}},"hoverBorderColor":{"type":"string","default":""},"shadow":{"type":"string","default":""},"hoverShadow":{"type":"string","default":""},"enableHoverEffect":{"type":"boolean","default":true},"hoverEffect":{"type":"string","default":"lift"},"iconAnimation":{"type":"string","default":"slide"},"transitionDuration":{"type":"number","default":0.3},"customCss":{"type":"string","default":""}}}');(0,j.registerBlockType)(q.name,{...q,edit:function({attributes:e,setAttributes:t}){const{text:o,url:a,linkTarget:l,relNofollow:d,relSponsored:c,icon:x,iconType:p,iconPosition:g,iconSize:h,iconColor:v,iconHoverColor:m,iconGap:b,bgColor:f,bgGradient:y,hoverBgColor:_,hoverBgGradient:C,textColor:j,hoverTextColor:S,typography:w,borderRadius:k,paddingX:B,paddingY:T,alignment:$,widthType:N,border:P,hoverBorderColor:I,shadow:z,hoverShadow:R,enableHoverEffect:H,hoverEffect:F,iconAnimation:L,transitionDuration:M,customCss:E}=e,[W,O]=(0,u.useState)("normal"),[A=[],D=[]]=(0,r.useSettings)("color.palette","color.gradients"),G=e=>{if(!e||e.startsWith("var("))return e;const t=A.find(t=>t.color===e);return t?`var(--wp--preset--color--${t.slug})`:e},U=e=>{if(!e||e.startsWith("var("))return e;const t=D.find(t=>t.gradient===e);return t?`var(--wp--preset--gradient--${t.slug})`:e},q=e=>{if(!e||!e.startsWith("var(--wp--preset--color--"))return e;const t=e.match(/var\(--wp--preset--color--([^)]+)\)/)?.[1];if(t){const o=A.find(e=>e.slug===t);return o?o.color:e}return e},V=(0,r.useBlockProps)({className:`axvart-advanced-icon-button align-${$} width-${N} ${H?`hover-effect-${F}`:""} icon-anim-${L}`,style:{"--bg-color":f,"--bg-gradient":y,"--hover-bg-color":_||f,"--hover-bg-gradient":C||y,"--text-color":j,"--hover-text-color":S||j,"--border-color":P.color,"--hover-border-color":I||P.color,"--icon-color":v,"--icon-hover-color":m||v,"--shadow":z,"--hover-shadow":R||z,"--transition-duration":`${M}s`,background:y||f,color:j,fontSize:`${w.fontSize}px`,fontWeight:w.fontWeight,lineHeight:w.lineHeight,letterSpacing:`${w.letterSpacing}px`,borderRadius:`${k}px`,padding:`${T}px ${B}px`,border:`${P.width}px ${P.style} ${P.color}`,boxShadow:z,display:"inline-flex",width:"full"===N?"100%":"auto"}}),Y=()=>x?(0,s.jsx)("span",{className:`button-icon position-${g}`,style:{fontSize:`${h}px`,color:v,marginRight:"left"===g?`${b}px`:0,marginLeft:"right"===g?`${b}px`:0},children:"dashicon"===p?(0,s.jsx)(n.Dashicon,{icon:x,style:{fontSize:`${h}px`,width:`${h}px`,height:`${h}px`}}):(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:x}})}):null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.BlockControls,{children:(0,s.jsxs)(n.ToolbarGroup,{children:[(0,s.jsx)(n.ToolbarButton,{icon:"align-left",label:(0,i.__)("Align Left","axvart"),isPressed:"left"===$,onClick:()=>t({alignment:"left"})}),(0,s.jsx)(n.ToolbarButton,{icon:"align-center",label:(0,i.__)("Align Center","axvart"),isPressed:"center"===$,onClick:()=>t({alignment:"center"})}),(0,s.jsx)(n.ToolbarButton,{icon:"align-right",label:(0,i.__)("Align Right","axvart"),isPressed:"right"===$,onClick:()=>t({alignment:"right"})}),(0,s.jsx)(n.ToolbarButton,{icon:"align-wide",label:(0,i.__)("Full Width","axvart"),isPressed:"full"===N,onClick:()=>t({widthType:"full"===N?"auto":"full"})})]})}),(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Content Settings","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Link URL","axvart"),value:a,onChange:e=>t({url:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Link Target","axvart"),value:l,options:[{label:(0,i.__)("Same Tab","axvart"),value:"_self"},{label:(0,i.__)("New Tab","axvart"),value:"_blank"}],onChange:e=>t({linkTarget:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("No Follow","axvart"),checked:d,onChange:e=>t({relNofollow:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Sponsored","axvart"),checked:c,onChange:e=>t({relSponsored:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Icon Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Icon Type","axvart"),value:p,options:[{label:(0,i.__)("Dashicon","axvart"),value:"dashicon"},{label:(0,i.__)("SVG Code","axvart"),value:"svg"}],onChange:e=>t({iconType:e})}),"dashicon"===p?(0,s.jsx)(n.TextControl,{label:(0,i.__)("Dashicon Name (e.g. arrow-right-alt)","axvart"),value:x,onChange:e=>t({icon:e}),help:(0,i.__)('Enter dashicon class name without "dashicons-" prefix',"axvart")}):(0,s.jsx)(n.TextareaControl,{label:(0,i.__)("SVG Code","axvart"),value:x,onChange:e=>t({icon:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Icon Position","axvart"),value:g,options:[{label:(0,i.__)("Left","axvart"),value:"left"},{label:(0,i.__)("Right","axvart"),value:"right"}],onChange:e=>t({iconPosition:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Size","axvart"),value:h,onChange:e=>t({iconSize:e}),min:10,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Gap","axvart"),value:b,onChange:e=>t({iconGap:e}),min:0,max:50}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Icon Color","axvart"),children:(0,s.jsx)(n.ColorPalette,{colors:A,value:q(v),onChange:e=>t({iconColor:G(e)})})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Style Settings","axvart"),initialOpen:!1,children:[(0,s.jsxs)(n.BaseControl,{label:(0,i.__)("Background","axvart"),children:[(0,s.jsx)(n.GradientPicker,{gradients:D,value:(e=>{if(!e||!e.startsWith("var(--wp--preset--gradient--"))return e;const t=e.match(/var\(--wp--preset--gradient--([^)]+)\)/)?.[1];if(t){const o=D.find(e=>e.slug===t);return o?o.gradient:e}return e})(y),onChange:e=>t({bgGradient:U(e)}),clearable:!0}),!y&&(0,s.jsx)(n.ColorPalette,{colors:A,value:q(f),onChange:e=>t({bgColor:G(e)})})]}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Text Color","axvart"),children:(0,s.jsx)(n.ColorPalette,{colors:A,value:q(j),onChange:e=>t({textColor:G(e)})})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:k,onChange:e=>t({borderRadius:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Font Size","axvart"),value:w.fontSize,onChange:e=>t({typography:{...w,fontSize:e}}),min:10,max:100})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Hover Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Hover Effects","axvart"),checked:H,onChange:e=>t({enableHoverEffect:e}),help:(0,i.__)("Enable or disable all hover effects","axvart")}),H&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Hover Effect Type","axvart"),value:F,options:[{label:(0,i.__)("Lift","axvart"),value:"lift"},{label:(0,i.__)("Scale","axvart"),value:"scale"},{label:(0,i.__)("None","axvart"),value:"none"}],onChange:e=>t({hoverEffect:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Icon Animation","axvart"),value:L,options:[{label:(0,i.__)("Slide","axvart"),value:"slide"},{label:(0,i.__)("Wiggle","axvart"),value:"wiggle"},{label:(0,i.__)("Rotate","axvart"),value:"rotate"},{label:(0,i.__)("Pulse","axvart"),value:"pulse"},{label:(0,i.__)("None","axvart"),value:"none"}],onChange:e=>t({iconAnimation:e})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hover Background","axvart"),children:!C&&(0,s.jsx)(n.ColorPalette,{colors:A,value:q(_),onChange:e=>t({hoverBgColor:G(e)})})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hover Text Color","axvart"),children:(0,s.jsx)(n.ColorPalette,{colors:A,value:q(S),onChange:e=>t({hoverTextColor:G(e)})})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hover Icon Color","axvart"),children:(0,s.jsx)(n.ColorPalette,{colors:A,value:q(m),onChange:e=>t({iconHoverColor:G(e)})})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hover Border Color","axvart"),children:(0,s.jsx)(n.ColorPalette,{colors:A,value:q(I),onChange:e=>t({hoverBorderColor:G(e)})})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Hover Shadow","axvart"),value:R,onChange:e=>t({hoverShadow:e}),help:(0,i.__)("E.g., 0 10px 15px rgba(0, 0, 0, 0.2)","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Transition Duration (seconds)","axvart"),value:M,onChange:e=>t({transitionDuration:e}),min:.1,max:2,step:.1})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Layout Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Button Width","axvart"),value:N,options:[{label:(0,i.__)("Inline (Auto)","axvart"),value:"auto"},{label:(0,i.__)("Full Width","axvart"),value:"full"}],onChange:e=>t({widthType:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Padding X (Horizontal)","axvart"),value:B,onChange:e=>t({paddingX:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Padding Y (Vertical)","axvart"),value:T,onChange:e=>t({paddingY:e}),min:0,max:100})]})]}),(0,s.jsx)("div",{...V,children:(0,s.jsxs)("div",{className:"button-content",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:["left"===g&&Y(),(0,s.jsx)(r.RichText,{tagName:"span",value:o,onChange:e=>t({text:e}),placeholder:(0,i.__)("Button Text...","axvart"),allowedFormats:["core/bold","core/italic"]}),"right"===g&&Y()]})})]})},save:function({attributes:e}){const{text:t,url:o,linkTarget:a,relNofollow:l,relSponsored:n,icon:i,iconType:d,iconPosition:c,iconSize:x,iconColor:p,iconHoverColor:g,iconGap:u,bgColor:h,bgGradient:v,hoverBgColor:m,hoverBgGradient:b,textColor:f,hoverTextColor:y,typography:_,borderRadius:C,paddingX:j,paddingY:S,alignment:w,widthType:k,border:B,hoverBorderColor:T,shadow:$,hoverShadow:N,enableHoverEffect:P,hoverEffect:I,iconAnimation:z,transitionDuration:R,customCss:H}=e,F=[];l&&F.push("nofollow"),n&&F.push("sponsored");const L=F.length>0?F.join(" "):void 0,M={"--bg-color":h,"--bg-gradient":v,"--hover-bg-color":m||h,"--hover-bg-gradient":b||v,"--text-color":f,"--hover-text-color":y||f,"--font-size":`${_.fontSize}px`,"--font-weight":_.fontWeight,"--line-height":_.lineHeight,"--letter-spacing":`${_.letterSpacing}px`,"--border-radius":`${C}px`,"--padding-x":`${j}px`,"--padding-y":`${S}px`,"--border-width":`${B.width}px`,"--border-style":B.style,"--border-color":B.color,"--hover-border-color":T||B.color,"--shadow":$,"--hover-shadow":N,"--icon-size":`${x}px`,"--icon-color":p,"--icon-hover-color":g||p,"--icon-gap":`${u}px`,"--transition-duration":`${R}s`,background:v||h,color:f,fontSize:`${_.fontSize}px`,fontWeight:_.fontWeight,lineHeight:_.lineHeight,letterSpacing:`${_.letterSpacing}px`,borderRadius:`${C}px`,padding:`${S}px ${j}px`,border:`${B.width}px ${B.style} ${B.color}`,boxShadow:$},E=r.useBlockProps.save({className:`axvart-advanced-icon-button align-${w} width-${k} ${P?`hover-effect-${I}`:""} ${P?`icon-anim-${z}`:""}`,style:{...M,display:"inline-flex",width:"full"===k?"100%":"auto",...JSON.parse(H||"{}")}}),W=()=>i?(0,s.jsx)("span",{className:`button-icon position-${c}`,style:{fontSize:`${x}px`,color:p,marginRight:"left"===c?`${u}px`:0,marginLeft:"right"===c?`${u}px`:0},children:"dashicon"===d?(0,s.jsx)("span",{className:`dashicons dashicons-${i}`}):(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:i}})}):null;return(0,s.jsx)("div",{...E,children:(0,s.jsxs)("a",{href:o,target:a,rel:L,className:"button-content",style:{textDecoration:"none",color:"inherit",display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:["left"===c&&W(),(0,s.jsx)(r.RichText.Content,{tagName:"span",value:t}),"right"===c&&W()]})})},deprecated:U});const V=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/advanced-button","version":"1.0.0","title":"Advanced Button","category":"design","icon":"button","description":"A modern, stylish button block with gradient background, rounded pill shape, and optional icons.","textdomain":"axvart","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","supports":{"html":false,"anchor":true,"customClassName":true},"attributes":{"text":{"type":"string","default":"Click Me"},"url":{"type":"string","default":""},"linkTarget":{"type":"string","default":"_self"},"relNofollow":{"type":"boolean","default":false},"relSponsored":{"type":"boolean","default":false},"icon":{"type":"string","default":"arrow-right-alt"},"iconType":{"type":"string","default":"dashicon"},"iconPosition":{"type":"string","default":"right"},"iconSize":{"type":"number","default":18},"iconColor":{"type":"string"},"iconHoverColor":{"type":"string"},"iconGap":{"type":"number","default":8},"bgColor":{"type":"string","default":""},"bgGradient":{"type":"string","default":"var(--wp--preset--gradient--accent-gradient)"},"hoverBgColor":{"type":"string","default":""},"hoverBgGradient":{"type":"string","default":""},"textColor":{"type":"string","default":"var(--wp--preset--color--base)"},"hoverTextColor":{"type":"string","default":"var(--wp--preset--color--base)"},"typography":{"type":"object","default":{"fontSize":16,"fontWeight":"600","lineHeight":1,"letterSpacing":0}},"borderRadius":{"type":"number","default":50},"paddingX":{"type":"number","default":24},"paddingY":{"type":"number","default":12},"alignment":{"type":"string","default":"center"},"widthType":{"type":"string","default":"auto"},"border":{"type":"object","default":{"width":0,"style":"solid","color":"transparent"}},"hoverBorderColor":{"type":"string","default":""},"shadow":{"type":"string","default":""},"hoverShadow":{"type":"string","default":""},"enableHoverEffect":{"type":"boolean","default":true},"hoverEffect":{"type":"string","default":"lift"},"iconAnimation":{"type":"string","default":"slide"},"transitionDuration":{"type":"number","default":0.3},"customCss":{"type":"string","default":""}}}');function Y({icon:e,size:t}){const o=t||14,a={width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"info":return(0,s.jsxs)("svg",{...a,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,s.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]});case"question":return(0,s.jsxs)("svg",{...a,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),(0,s.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});case"marker":return(0,s.jsxs)("svg",{...a,children:[(0,s.jsx)("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),(0,s.jsx)("circle",{cx:"12",cy:"10",r:"3"})]});default:return(0,s.jsxs)("svg",{...a,children:[(0,s.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,s.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}}function X(e,t){switch(e){case"top":return{bottom:"100%",left:"50%",transform:"translate(-50%, -10px)"};case"bottom":return{top:"100%",left:"50%",transform:"translate(-50%, 10px)"};case"left":return{right:"100%",top:"50%",transform:"translate(-10px, -50%)"};case"right":return{left:"100%",top:"50%",transform:"translate(10px, -50%)"};default:return{}}}function J({icon:e,size:t}){const o=t||14,a={width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"info":return(0,s.jsxs)("svg",{...a,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,s.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]});case"question":return(0,s.jsxs)("svg",{...a,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),(0,s.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});case"marker":return(0,s.jsxs)("svg",{...a,children:[(0,s.jsx)("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),(0,s.jsx)("circle",{cx:"12",cy:"10",r:"3"})]});default:return(0,s.jsxs)("svg",{...a,children:[(0,s.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,s.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}}(0,j.registerBlockType)(V.name,{...V,edit:function({attributes:e,setAttributes:t}){const{text:o,url:a,linkTarget:l,relNofollow:d,relSponsored:c,icon:x,iconType:p,iconPosition:g,iconSize:h,iconColor:v,iconHoverColor:m,iconGap:b,bgColor:f,bgGradient:y,hoverBgColor:_,hoverBgGradient:C,textColor:j,hoverTextColor:S,typography:w,borderRadius:k,paddingX:B,paddingY:T,alignment:$,widthType:N,border:P,hoverBorderColor:I,shadow:z,hoverShadow:R,enableHoverEffect:H,hoverEffect:F,iconAnimation:L,transitionDuration:M,customCss:E}=e,[W,O]=(0,u.useState)("normal"),[A,D]=(0,r.useSettings)("color.palette","color.gradients"),G=Array.isArray(A)?A:[],U=Array.isArray(D)?D:[],q=e=>{if(!e||"string"!=typeof e||e.startsWith("var("))return e;const t=G.find(t=>t&&t.color===e);return t&&t.slug?`var(--wp--preset--color--${t.slug})`:e},V=e=>{if(!e||"string"!=typeof e||e.startsWith("var("))return e;const t=U.find(t=>t&&t.gradient===e);return t&&t.slug?`var(--wp--preset--gradient--${t.slug})`:e},Y=(0,r.useBlockProps)({className:`axvart-advanced-button align-${$} width-${N} ${H?`hover-effect-${F}`:""} ${H?`icon-anim-${L}`:""}`,style:{...f?{"--bg-color":f}:{},...y?{"--bg-gradient":y}:{},..._||f?{"--hover-bg-color":_||f}:{},...C||y?{"--hover-bg-gradient":C||y}:{},...j?{"--text-color":j}:{},...S||j?{"--hover-text-color":S||j}:{},"--font-size":`${w.fontSize}px`,"--font-weight":w.fontWeight,"--line-height":w.lineHeight,"--letter-spacing":`${w.letterSpacing}px`,"--border-radius":`${k}px`,"--padding-x":`${B}px`,"--padding-y":`${T}px`,"--border-width":`${P.width}px`,"--border-style":P.style,...P.color?{"--border-color":P.color}:{},...I||P.color?{"--hover-border-color":I||P.color}:{},"--icon-size":`${h}px`,...v?{"--icon-color":v}:{},...m||v?{"--icon-hover-color":m||v}:{},"--icon-gap":`${b}px`,...z?{"--shadow":z}:{},...R||z?{"--hover-shadow":R||z}:{},"--transition-duration":`${M}s`,...y||f?{background:y||f}:{},...j?{color:j}:{},fontSize:`${w.fontSize}px`,fontWeight:w.fontWeight,lineHeight:w.lineHeight,letterSpacing:`${w.letterSpacing}px`,borderRadius:`${k}px`,padding:`${T}px ${B}px`,border:`${P.width}px ${P.style} ${P.color}`,...z?{boxShadow:z}:{},display:"inline-flex",width:"full"===N?"100%":"auto",...(()=>{try{return JSON.parse(E||"{}")}catch(e){return{}}})()}}),X=()=>x?(0,s.jsx)("span",{className:`button-icon position-${g}`,style:{fontSize:`${h}px`,color:v,marginRight:"left"===g?`${b}px`:0,marginLeft:"right"===g?`${b}px`:0},children:"dashicon"===p?(0,s.jsx)(n.Dashicon,{icon:x,style:{fontSize:`${h}px`,width:`${h}px`,height:`${h}px`}}):(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:x}})}):null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.BlockControls,{children:(0,s.jsxs)(n.ToolbarGroup,{children:[(0,s.jsx)(n.ToolbarButton,{icon:"align-left",label:(0,i.__)("Align Left","axvart"),isPressed:"left"===$,onClick:()=>t({alignment:"left"})}),(0,s.jsx)(n.ToolbarButton,{icon:"align-center",label:(0,i.__)("Align Center","axvart"),isPressed:"center"===$,onClick:()=>t({alignment:"center"})}),(0,s.jsx)(n.ToolbarButton,{icon:"align-right",label:(0,i.__)("Align Right","axvart"),isPressed:"right"===$,onClick:()=>t({alignment:"right"})}),(0,s.jsx)(n.ToolbarButton,{icon:"align-wide",label:(0,i.__)("Full Width","axvart"),isPressed:"full"===N,onClick:()=>t({widthType:"full"===N?"auto":"full"})})]})}),(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("General Settings","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Link URL","axvart"),value:a,onChange:e=>t({url:e})}),(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Link Target","axvart"),value:l,options:[{label:"_self",value:"_self"},{label:"_blank",value:"_blank"}],onChange:e=>t({linkTarget:e})}),(0,s.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("No Follow","axvart"),checked:d,onChange:e=>t({relNofollow:e})}),(0,s.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Sponsored","axvart"),checked:c,onChange:e=>t({relSponsored:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Font Size","axvart"),value:w.fontSize,onChange:e=>t({typography:{...w,fontSize:e}}),min:10,max:100}),(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Font Weight","axvart"),value:w.fontWeight,options:[{label:"Normal",value:"400"},{label:"Medium",value:"500"},{label:"Semi Bold",value:"600"},{label:"Bold",value:"700"},{label:"Extra Bold",value:"800"}],onChange:e=>t({typography:{...w,fontWeight:e}})}),(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Letter Spacing","axvart"),value:w.letterSpacing,onChange:e=>t({typography:{...w,letterSpacing:e}}),min:-5,max:10,step:.1})]}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Colors","axvart"),initialOpen:!1,children:(0,s.jsx)(n.TabPanel,{className:"axvart-color-tabs",activeClass:"active-tab",tabs:[{name:"normal",title:"Normal",className:"tab-normal"},{name:"hover",title:"Hover",className:"tab-hover"}],onSelect:e=>O(e.name),children:e=>(0,s.jsx)("div",{className:"color-controls",children:"normal"===e.name?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Text Color","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.ColorPalette,{colors:G,value:j,onChange:e=>t({textColor:q(e)||""})})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Background Gradient","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.GradientPicker,{value:y||void 0,onChange:e=>t({bgGradient:V(e)||"",bgColor:""}),gradients:U})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Background Color (Solid)","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.ColorPalette,{colors:G,value:f,onChange:e=>t({bgColor:q(e)||"",bgGradient:""})})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hover Text Color","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.ColorPalette,{colors:G,value:S,onChange:e=>t({hoverTextColor:q(e)||""})})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hover Background Gradient","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.GradientPicker,{value:C||void 0,onChange:e=>t({hoverBgGradient:V(e)||"",hoverBgColor:""}),gradients:U})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hover Background Color","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.ColorPalette,{colors:G,value:_,onChange:e=>t({hoverBgColor:q(e)||"",hoverBgGradient:""})})})]})})})}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Icon Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Icon (Dashicon name or SVG)","axvart"),value:x,onChange:e=>t({icon:e}),help:"Enter a dashicon name (e.g., arrow-right-alt) or paste SVG code."}),(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Icon Type","axvart"),value:p,options:[{label:"Dashicon",value:"dashicon"},{label:"SVG",value:"svg"}],onChange:e=>t({iconType:e})}),(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Icon Position","axvart"),value:g,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:e=>t({iconPosition:e})}),(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Icon Size","axvart"),value:h,onChange:e=>t({iconSize:e}),min:10,max:100}),(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Icon Gap","axvart"),value:b,onChange:e=>t({iconGap:e}),min:0,max:50}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Icon Color","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.ColorPalette,{colors:G,value:v,onChange:e=>t({iconColor:q(e)})})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Icon Hover Color","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.ColorPalette,{colors:G,value:m,onChange:e=>t({iconHoverColor:q(e)})})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Border & Shadow","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Border Radius","axvart"),value:k,onChange:e=>t({borderRadius:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Border Width","axvart"),value:P.width,onChange:e=>t({border:{...P,width:e}}),min:0,max:20}),(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Border Style","axvart"),value:P.style,options:[{label:"Solid",value:"solid"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"}],onChange:e=>t({border:{...P,style:e}})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Border Color","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.ColorPalette,{colors:G,value:P.color,onChange:e=>t({border:{...P,color:q(e)||""}})})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hover Border Color","axvart"),__nextHasNoMarginBottom:!0,children:(0,s.jsx)(n.ColorPalette,{colors:G,value:I,onChange:e=>t({hoverBorderColor:q(e)||""})})}),(0,s.jsx)(n.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Box Shadow","axvart"),value:z,onChange:e=>t({shadow:e}),help:"e.g., 0 4px 6px rgba(0,0,0,0.1)"}),(0,s.jsx)(n.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Hover Box Shadow","axvart"),value:R,onChange:e=>t({hoverShadow:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Effects","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Enable Hover Effect","axvart"),checked:H,onChange:e=>t({enableHoverEffect:e})}),H&&(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Hover Effect Type","axvart"),value:F,options:[{label:"Lift",value:"lift"},{label:"Scale",value:"scale"},{label:"None",value:"none"}],onChange:e=>t({hoverEffect:e})}),(0,s.jsx)(n.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Icon Animation","axvart"),value:L,options:[{label:"Slide",value:"slide"},{label:"Wiggle",value:"wiggle"},{label:"Rotate",value:"rotate"},{label:"None",value:"none"}],onChange:e=>t({iconAnimation:e})}),(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Transition Duration (s)","axvart"),value:M,onChange:e=>t({transitionDuration:e}),min:.1,max:2,step:.1})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Spacing","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Padding X","axvart"),value:B,onChange:e=>t({paddingX:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Padding Y","axvart"),value:T,onChange:e=>t({paddingY:e}),min:0,max:100})]}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Advanced CSS","axvart"),initialOpen:!1,children:(0,s.jsx)(n.TextareaControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Custom CSS (JSON format)","axvart"),value:E,onChange:e=>t({customCss:e}),help:'Enter valid JSON for custom styles, e.g. {"marginTop": "20px"}'})})]}),(0,s.jsx)("div",{...Y,children:(0,s.jsxs)("div",{className:"button-content",children:["left"===g&&X(),(0,s.jsx)(r.RichText,{tagName:"span",className:"button-text",value:o,onChange:e=>t({text:e}),placeholder:(0,i.__)("Button Text...","axvart"),allowedFormats:["core/bold","core/italic"]}),"right"===g&&X()]})})]})},save:function({attributes:e}){const{text:t,url:o,linkTarget:a,relNofollow:l,relSponsored:n,icon:i,iconType:d,iconPosition:c,iconSize:x,iconColor:p,iconHoverColor:g,iconGap:u,bgColor:h,bgGradient:v,hoverBgColor:m,hoverBgGradient:b,textColor:f,hoverTextColor:y,typography:_,borderRadius:C,paddingX:j,paddingY:S,alignment:w,widthType:k,border:B,hoverBorderColor:T,shadow:$,hoverShadow:N,enableHoverEffect:P,hoverEffect:I,iconAnimation:z,transitionDuration:R,customCss:H}=e,F=[];l&&F.push("nofollow"),n&&F.push("sponsored");const L=F.length>0?F.join(" "):void 0,M={...h?{"--bg-color":h}:{},...v?{"--bg-gradient":v}:{},...m||h?{"--hover-bg-color":m||h}:{},...b||v?{"--hover-bg-gradient":b||v}:{},...f?{"--text-color":f}:{},...y||f?{"--hover-text-color":y||f}:{},"--font-size":`${_.fontSize}px`,"--font-weight":_.fontWeight,"--line-height":_.lineHeight,"--letter-spacing":`${_.letterSpacing}px`,"--border-radius":`${C}px`,"--padding-x":`${j}px`,"--padding-y":`${S}px`,"--border-width":`${B.width}px`,"--border-style":B.style,...B.color?{"--border-color":B.color}:{},...T||B.color?{"--hover-border-color":T||B.color}:{},...$?{"--shadow":$}:{},...N||$?{"--hover-shadow":N||$}:{},"--icon-size":`${x}px`,...p?{"--icon-color":p}:{},...g||p?{"--icon-hover-color":g||p}:{},"--icon-gap":`${u}px`,"--transition-duration":`${R}s`,...v||h?{background:v||h}:{},...f?{color:f}:{},fontSize:`${_.fontSize}px`,fontWeight:_.fontWeight,lineHeight:_.lineHeight,letterSpacing:`${_.letterSpacing}px`,borderRadius:`${C}px`,padding:`${S}px ${j}px`,border:`${B.width}px ${B.style} ${B.color}`,...$?{boxShadow:$}:{}},E=r.useBlockProps.save({className:`axvart-advanced-button align-${w} width-${k} ${P?`hover-effect-${I}`:""} ${P?`icon-anim-${z}`:""}`,style:{...M,display:"inline-flex",width:"full"===k?"100%":"auto",...(()=>{try{return JSON.parse(H||"{}")}catch(e){return{}}})()}}),W=()=>i?(0,s.jsx)("span",{className:`button-icon position-${c}`,style:{fontSize:`${x}px`,color:p,marginRight:"left"===c?`${u}px`:0,marginLeft:"right"===c?`${u}px`:0},children:"dashicon"===d?(0,s.jsx)("span",{className:`dashicons dashicons-${i}`,style:{fontSize:`${x}px`,width:`${x}px`,height:`${x}px`}}):(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:i}})}):null;return(0,s.jsx)("a",{...E,href:o,target:a,rel:L,children:(0,s.jsxs)("div",{className:"button-content",children:["left"===c&&W(),(0,s.jsx)(r.RichText.Content,{tagName:"span",className:"button-text",value:t}),"right"===c&&W()]})})}});const K=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/interactive-hotspot-image","version":"1.0.0","title":"Interactive Hotspot Image","category":"widgets","icon":"location-alt","description":"Display an image with interactive hotspots.","supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true}},"attributes":{"imageId":{"type":"number"},"imageUrl":{"type":"string","default":""},"imageAlt":{"type":"string","default":""},"imageHeight":{"type":"string","default":"auto"},"imageObjectFit":{"type":"string","default":"cover"},"hotspots":{"type":"array","default":[]},"showConnector":{"type":"boolean","default":false},"overlayColor":{"type":"string","default":"transparent"},"borderRadius":{"type":"string","default":"0px"},"hotspotSize":{"type":"number","default":20},"hotspotColor":{"type":"string","default":"#ffffff"},"hotspotBgColor":{"type":"string","default":"#0073aa"}},"textdomain":"axvart","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');(0,j.registerBlockType)(K.name,{...K,edit:function({attributes:e,setAttributes:t,isSelected:o}){const{imageId:a,imageUrl:l,imageAlt:d,imageHeight:c,imageObjectFit:x,hotspots:p,borderRadius:g,hotspotSize:h,hotspotColor:v,hotspotBgColor:m}=e,[b,f]=(0,u.useState)(null),y=(0,u.useRef)(null),_=(0,u.useRef)(p),C=(0,u.useRef)(!1);(0,u.useEffect)(()=>{_.current=p},[p]);const j=e=>{t({imageUrl:e.url,imageId:e.id,imageAlt:e.alt||""})},S=(e,o,a)=>{const l=p.map(t=>t.id===e?{...t,[o]:a}:t);t({hotspots:l})},w=p.find(e=>e.id===b);return(0,s.jsxs)("div",{...(0,r.useBlockProps)(),children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Image Settings","axvart"),children:[(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:j,allowedTypes:["image"],value:a,render:({open:e})=>(0,s.jsx)(n.Button,{variant:"secondary",onClick:e,children:l?(0,i.__)("Replace Image","axvart"):(0,i.__)("Upload Image","axvart")})})}),l&&(0,s.jsx)(n.Button,{isDestructive:!0,isLink:!0,onClick:()=>{t({imageUrl:"",imageId:void 0,imageAlt:"",hotspots:[]})},style:{marginTop:"10px"},children:(0,i.__)("Remove Image","axvart")}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Alt Text","axvart"),value:d,onChange:e=>t({imageAlt:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Image Height","axvart"),help:"e.g. 500px, 50vh, or auto",value:c,onChange:e=>t({imageHeight:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Object Fit","axvart"),value:x,options:[{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Fill",value:"fill"}],onChange:e=>t({imageObjectFit:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:parseInt(g),onChange:e=>t({borderRadius:`${e}px`}),min:0,max:50})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Global Hotspot Styles","axvart"),children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Hotspot Size","axvart"),value:h,onChange:e=>t({hotspotSize:e}),min:10,max:50}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hotspot Color","axvart"),children:(0,s.jsx)(n.ColorPalette,{value:v,onChange:e=>t({hotspotColor:e})})}),(0,s.jsx)(n.BaseControl,{label:(0,i.__)("Hotspot Background","axvart"),children:(0,s.jsx)(n.ColorPalette,{value:m,onChange:e=>t({hotspotBgColor:e})})})]}),w&&(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Selected Hotspot Settings","axvart"),children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Tooltip Title","axvart"),value:w.title,onChange:e=>S(w.id,"title",e)}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Tooltip Content","axvart"),value:w.content,onChange:e=>S(w.id,"content",e),help:"Basic text content for the tooltip."}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Icon","axvart"),value:w.icon||"plus",options:[{label:"Plus",value:"plus"},{label:"Info",value:"info"},{label:"Question",value:"question"},{label:"Marker",value:"marker"}],onChange:e=>S(w.id,"icon",e)}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Tooltip Direction","axvart"),value:w.direction,options:[{label:"Top",value:"top"},{label:"Bottom",value:"bottom"},{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:e=>S(w.id,"direction",e)}),(0,s.jsx)("div",{style:{display:"flex",gap:"10px",marginTop:"10px"},children:(0,s.jsx)(n.Button,{isDestructive:!0,variant:"secondary",onClick:()=>(e=>{const o=p.filter(t=>t.id!==e);t({hotspots:o}),b===e&&f(null)})(w.id),children:(0,i.__)("Delete Hotspot","axvart")})})]})]}),l?(0,s.jsxs)("div",{className:"axvart-hotspot-container",ref:y,style:{position:"relative",borderRadius:g,overflow:"hidden",height:"auto"===c?"auto":c},onClick:e=>{if(C.current)return;const o=y.current.getBoundingClientRect(),a=(e.clientX-o.left)/o.width*100,l=(e.clientY-o.top)/o.height*100,r={id:Date.now().toString(),x:parseFloat(a.toFixed(2)),y:parseFloat(l.toFixed(2)),title:"New Hotspot",content:"Tooltip content here",direction:"top",icon:"plus"};t({hotspots:[...p,r]}),f(r.id)},children:[(0,s.jsx)("img",{src:l,alt:d,style:{display:"block",width:"100%",height:"auto"===c?"auto":"100%",objectFit:x,pointerEvents:"none"}}),p.map(e=>(0,s.jsxs)("div",{className:"axvart-hotspot "+(b===e.id?"is-selected":""),style:{left:`${e.x}%`,top:`${e.y}%`,width:`${h}px`,height:`${h}px`,backgroundColor:m,color:v,position:"absolute",transform:"translate(-50%, -50%)",borderRadius:"50%",cursor:"grab",display:"flex",alignItems:"center",justifyContent:"center",border:b===e.id?"2px solid #fff":"none",boxShadow:b===e.id?"0 0 0 2px #0073aa":"0 2px 4px rgba(0,0,0,0.2)",zIndex:10},onMouseDown:o=>((e,o)=>{e.preventDefault(),e.stopPropagation(),f(o),C.current=!0;let a=!1;const l=e=>{if(!y.current||a)return;if(0===e.buttons)return void r();const l=y.current.getBoundingClientRect();let n=(e.clientX-l.left)/l.width*100,i=(e.clientY-l.top)/l.height*100;n=Math.max(0,Math.min(100,n)),i=Math.max(0,Math.min(100,i));const s=_.current.map(e=>e.id===o?{...e,x:parseFloat(n.toFixed(2)),y:parseFloat(i.toFixed(2))}:e);t({hotspots:s})},r=()=>{a||(a=!0,document.removeEventListener("mousemove",l,!0),document.removeEventListener("mouseup",r,!0),document.removeEventListener("pointerup",r,!0),window.removeEventListener("mouseup",r,!0),window.removeEventListener("pointerup",r,!0),window.removeEventListener("blur",r,!0),setTimeout(()=>{C.current=!1},100))};document.addEventListener("mousemove",l,!0),document.addEventListener("mouseup",r,!0),document.addEventListener("pointerup",r,!0),window.addEventListener("mouseup",r,!0),window.addEventListener("pointerup",r,!0),window.addEventListener("blur",r,!0)})(o,e.id),onClick:t=>{t.stopPropagation(),isDragging||f(e.id)},children:[(0,s.jsx)(Y,{icon:e.icon||"plus",size:.6*h}),o&&b===e.id&&(0,s.jsxs)("div",{className:`axvart-hotspot-tooltip is-${e.direction}`,style:{position:"absolute",backgroundColor:"#fff",color:"#333",padding:"8px 12px",borderRadius:"4px",width:"200px",fontSize:"13px",pointerEvents:"none",boxShadow:"0 4px 10px rgba(0,0,0,0.15)",zIndex:20,...X(e.direction)},children:[(0,s.jsx)("strong",{children:e.title}),(0,s.jsx)("p",{style:{margin:"4px 0 0",opacity:.8},children:e.content})]})]},e.id))]}):(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:j,allowedTypes:["image"],value:a,render:({open:e})=>(0,s.jsx)("div",{className:"axvart-placeholder-wrapper",style:{padding:"20px",border:"2px dashed #ccc",textAlign:"center"},children:(0,s.jsx)(n.Button,{variant:"primary",onClick:e,children:(0,i.__)("Upload Image","axvart")})})})})]})},save:function({attributes:e}){const{imageUrl:t,imageAlt:o,imageHeight:a,imageObjectFit:l,hotspots:n,borderRadius:i,hotspotSize:d,hotspotColor:c,hotspotBgColor:x}=e;if(!t)return null;const p={borderRadius:i,height:"auto"===a?"auto":a},g={height:"auto"===a?"auto":"100%",objectFit:l};return(0,s.jsx)("div",{...r.useBlockProps.save(),children:(0,s.jsxs)("div",{className:"axvart-hotspot-container",style:p,children:[(0,s.jsx)("img",{src:t,alt:o,className:"axvart-hotspot-img",style:g}),n.map(e=>(0,s.jsxs)("div",{className:"axvart-hotspot",style:{"--hotspot-x":`${e.x}%`,"--hotspot-y":`${e.y}%`,"--hotspot-size":`${d}px`,"--hotspot-color":c,"--hotspot-bg":x,left:`${e.x}%`,top:`${e.y}%`},"data-direction":e.direction,tabIndex:"0",role:"button","aria-label":e.title||"Hotspot","aria-expanded":"false",children:[(0,s.jsx)("span",{className:"axvart-hotspot-icon",children:(0,s.jsx)(J,{icon:e.icon||"plus",size:.6*d})}),(0,s.jsx)("div",{className:`axvart-hotspot-tooltip is-${e.direction}`,children:(0,s.jsxs)("div",{className:"axvart-tooltip-content",children:[(0,s.jsx)("h4",{className:"axvart-tooltip-title",children:e.title}),(0,s.jsx)("p",{className:"axvart-tooltip-text",children:e.content})]})})]},e.id))]})})}});const{registerBlockType:Q}=wp.blocks,Z=[["core/cover",{dimRatio:0,isUserOverlayColor:!0,minHeightUnit:"px",isDark:!1,align:"full",style:{spacing:{padding:{top:"var:preset|spacing|80",bottom:"var:preset|spacing|40",left:"var:preset|spacing|80",right:"var:preset|spacing|80"},blockGap:"0"}}},[["core/heading",{textAlign:"center",className:"is-style-text-section-header",content:(0,i.__)("Pick the best solution to match
your budgeting needs","axvart")}],["core/paragraph",{align:"center",style:{spacing:{padding:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|20",left:"var:preset|spacing|80",right:"var:preset|spacing|80"}}},content:(0,i.__)("Whether you're saving, investing, or budgeting, we offer flexible plans
designed to meet your unique financial goals.","axvart")}],["core/columns",{style:{spacing:{padding:{top:"var:preset|spacing|50",left:"var:preset|spacing|50",right:"var:preset|spacing|30"},blockGap:"var:preset|spacing|50"}},layout:{type:"flex",flexWrap:"nowrap",justifyContent:"space-around"}},[["core/column",{style:{flexBasis:"0",flexGrow:"1",spacing:{padding:{top:"var:preset|spacing|50",bottom:"var:preset|spacing|50",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}},border:{radius:"30px"}},backgroundColor:"accent-6"},[["core/heading",{level:2,className:"is-style-default",fontSize:"x-large",content:(0,i.__)("Standard","axvart")}],["core/paragraph",{style:{spacing:{margin:{bottom:"0",top:"0px"}}},fontSize:"medium",content:(0,i.__)("For personal use","axvart")}],["core/separator",{className:"is-style-default",style:{spacing:{margin:{top:"var:preset|spacing|40",bottom:"var:preset|spacing|40"}}},backgroundColor:"accent-7"}],["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[["core/heading",{level:2,fontSize:"x-large",content:(0,i.__)("$ 29 USD","axvart")}],["core/paragraph",{fontSize:"medium",content:(0,i.__)("Monthly","axvart")}]]],["core/list",{className:"is-style-checkmark-list",style:{spacing:{padding:{top:"var:preset|spacing|20"}}},fontSize:"medium",values:`
  • ${(0,i.__)("Budgeting and Expense Tracking","axvart")}
  • ${(0,i.__)("Unlimited Activity Notifications","axvart")}
  • ${(0,i.__)("Credit Score Monitoring","axvart")}
  • ${(0,i.__)("Expense Tracking","axvart")}
  • ${(0,i.__)("Bank Transaction Imports","axvart")}
  • `}],["core/buttons",{style:{spacing:{padding:{top:"var:preset|spacing|30"}}},layout:{type:"flex",justifyContent:"left"}},[["core/button",{textAlign:"center",className:"is-style-secondary",text:(0,i.__)("Get Started","axvart")}]]]]],["core/column",{style:{flexBasis:"0",flexGrow:"1",spacing:{padding:{top:"var:preset|spacing|50",bottom:"var:preset|spacing|50",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}},border:{radius:"30px"}},backgroundColor:"accent-5"},[["core/heading",{level:2,textAlign:"left",className:"is-style-default",style:{elements:{link:{color:{text:"var:preset|color|base"}}}},textColor:"base",fontSize:"x-large",content:(0,i.__)("Business","axvart")}],["core/paragraph",{align:"left",style:{spacing:{margin:{bottom:"0",top:"0px"}},elements:{link:{color:{text:"var:preset|color|accent-6"}}}},textColor:"accent-6",fontSize:"medium",content:(0,i.__)("For personal use","axvart")}],["core/separator",{className:"is-style-default",style:{spacing:{margin:{top:"var:preset|spacing|40",bottom:"var:preset|spacing|40"}}},backgroundColor:"accent-3"}],["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[["core/heading",{level:2,style:{elements:{link:{color:{text:"var:preset|color|base"}}}},textColor:"base",fontSize:"x-large",content:(0,i.__)("$ 69 USD","axvart")}],["core/paragraph",{style:{elements:{link:{color:{text:"var:preset|color|accent-6"}}}},textColor:"accent-6",fontSize:"medium",content:(0,i.__)("Yearly","axvart")}]]],["core/list",{className:"is-style-checkmark-list",style:{spacing:{padding:{top:"var:preset|spacing|20"}},elements:{link:{color:{text:"var:preset|color|base"}}}},textColor:"base",fontSize:"medium",values:`
  • ${(0,i.__)("Budgeting and Expense Tracking","axvart")}
  • ${(0,i.__)("Unlimited Activity Notifications","axvart")}
  • ${(0,i.__)("Credit Score Monitoring","axvart")}
  • ${(0,i.__)("Expense Tracking","axvart")}
  • ${(0,i.__)("Bank Transaction Imports","axvart")}
  • `}],["core/buttons",{style:{spacing:{padding:{top:"var:preset|spacing|30"}}}},[["core/button",{textAlign:"left",className:"is-style-secondary",text:(0,i.__)("Get Started","axvart")}]]]]],["core/column",{style:{flexBasis:"0",flexGrow:"1",spacing:{padding:{top:"var:preset|spacing|50",bottom:"var:preset|spacing|50",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}},border:{radius:"30px"}},backgroundColor:"accent-6"},[["core/heading",{level:2,className:"is-style-default",fontSize:"x-large",content:(0,i.__)("Unlimited","axvart")}],["core/paragraph",{style:{spacing:{margin:{bottom:"0",top:"0px"}}},fontSize:"medium",content:(0,i.__)("For personal use","axvart")}],["core/separator",{className:"is-style-default",style:{spacing:{margin:{top:"var:preset|spacing|40",bottom:"var:preset|spacing|40"}}},backgroundColor:"accent-7"}],["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[["core/heading",{level:2,fontSize:"x-large",content:(0,i.__)("$ 129 USD","axvart")}],["core/paragraph",{fontSize:"medium",content:(0,i.__)("Lifetime","axvart")}]]],["core/list",{className:"is-style-checkmark-list",style:{spacing:{padding:{top:"var:preset|spacing|20"}}},fontSize:"medium",values:`
  • ${(0,i.__)("Budgeting and Expense Tracking","axvart")}
  • ${(0,i.__)("Unlimited Activity Notifications","axvart")}
  • ${(0,i.__)("Credit Score Monitoring","axvart")}
  • ${(0,i.__)("Expense Tracking","axvart")}
  • ${(0,i.__)("Bank Transaction Imports","axvart")}
  • `}],["core/buttons",{style:{spacing:{padding:{top:"var:preset|spacing|30"}}}},[["core/button",{className:"is-style-secondary",text:(0,i.__)("Get Started","axvart")}]]]]]]]]]];Q("axvart/pricing-block",{apiVersion:3,title:(0,i.__)("Pricing Block","axvart"),icon:"money-alt",category:"design",edit:()=>{const e=(0,r.useBlockProps)();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(r.InnerBlocks,{template:Z})})},save:()=>{const e=r.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(r.InnerBlocks.Content,{})})}});const ee=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/live-clock-date","version":"1.0.0","title":"Live Clock / Date","category":"widgets","icon":"clock","description":"Display a live updating clock and/or date with extensive customization options.","keywords":["time","date","live","clock","widget"],"textdomain":"axvart","supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true}},"attributes":{"displayMode":{"type":"string","default":"both"},"layoutMode":{"type":"string","default":"stack"},"timeFormat":{"type":"string","default":"12"},"dateFormat":{"type":"string","default":"long"},"timezone":{"type":"string","default":"browser"},"customTimezone":{"type":"string","default":"UTC"},"textAlign":{"type":"string","default":"center"},"textColor":{"type":"string","default":""},"backgroundColor":{"type":"string","default":""},"gradient":{"type":"string","default":""},"separator":{"type":"string","default":"colon"},"blinkingSeparator":{"type":"boolean","default":false},"customLabel":{"type":"string","default":""},"digitalStyle":{"type":"boolean","default":false},"glowEffect":{"type":"boolean","default":false},"borderRadius":{"type":"number","default":0},"boxShadow":{"type":"boolean","default":false},"showSeconds":{"type":"boolean","default":true},"showWeekday":{"type":"boolean","default":true}},"example":{"attributes":{"displayMode":"both","timeFormat":"12","digitalStyle":false}},"editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./index.css","viewScript":"file:./view.js"}');(0,j.registerBlockType)(ee.name,{...ee,edit:function({attributes:e,setAttributes:t}){const{displayMode:o,layoutMode:a,timeFormat:l,dateFormat:d,timezone:c,customTimezone:x,textAlign:p,textColor:g,backgroundColor:h,gradient:v,separator:m,blinkingSeparator:b,customLabel:f,digitalStyle:y,glowEffect:_,borderRadius:C,boxShadow:j,showSeconds:S,showWeekday:w}=e,[k,B]=(0,u.useState)(new Date);(0,u.useEffect)(()=>{const e=setInterval(()=>{B(new Date)},1e3);return()=>clearInterval(e)},[]);const T=(0,r.useBlockProps)({style:{textAlign:p,color:g||void 0,background:v||h||void 0,borderRadius:C?`${C}px`:void 0,boxShadow:j?"0 4px 6px rgba(0, 0, 0, 0.1)":void 0},className:`layout-${a} ${y?"digital-style":""} ${_?"glow-effect":""} ${b?"blinking-separator":""}`}),$=[{label:(0,i.__)("Browser Time","axvart"),value:"browser"},{label:(0,i.__)("Custom Timezone","axvart"),value:"custom"}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Display Settings","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Display Mode","axvart"),value:o,options:[{label:(0,i.__)("Time Only","axvart"),value:"time"},{label:(0,i.__)("Date Only","axvart"),value:"date"},{label:(0,i.__)("Both","axvart"),value:"both"}],onChange:e=>t({displayMode:e})}),"both"===o&&(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Layout Mode","axvart"),value:a,options:[{label:(0,i.__)("Stacked","axvart"),value:"stack"},{label:(0,i.__)("Inline","axvart"),value:"inline"},{label:(0,i.__)("Circle Badge","axvart"),value:"circle"}],onChange:e=>t({layoutMode:e})})]}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Time Settings","axvart"),initialOpen:!1,children:("time"===o||"both"===o)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Time Format","axvart"),value:l,options:[{label:(0,i.__)("12 Hour","axvart"),value:"12"},{label:(0,i.__)("24 Hour","axvart"),value:"24"}],onChange:e=>t({timeFormat:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Seconds","axvart"),checked:S,onChange:e=>t({showSeconds:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Separator","axvart"),value:m,options:[{label:(0,i.__)("Colon (:)","axvart"),value:"colon"},{label:(0,i.__)("Dot (·)","axvart"),value:"dot"}],onChange:e=>t({separator:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Blinking Separator","axvart"),checked:b,onChange:e=>t({blinkingSeparator:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Custom Label","axvart"),value:f,onChange:e=>t({customLabel:e}),placeholder:(0,i.__)("e.g., Current Time:","axvart"),help:(0,i.__)("Optional text to display before the time","axvart")})]})}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Date Settings","axvart"),initialOpen:!1,children:("date"===o||"both"===o)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Date Format","axvart"),value:d,options:[{label:(0,i.__)("Long (Monday, November 10, 2025)","axvart"),value:"long"},{label:(0,i.__)("Short (Nov 10, 2025)","axvart"),value:"short"},{label:(0,i.__)("Numeric (11/10/2025)","axvart"),value:"numeric"}],onChange:e=>t({dateFormat:e})}),"long"===d&&(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Weekday","axvart"),checked:w,onChange:e=>t({showWeekday:e})})]})}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Timezone Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Timezone","axvart"),value:c,options:$,onChange:e=>t({timezone:e})}),"custom"===c&&(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Select Timezone","axvart"),value:x,options:[{label:"UTC",value:"UTC"},{label:"UTC+6 – Dhaka",value:"Asia/Dhaka"},{label:"UTC-5 – New York",value:"America/New_York"},{label:"UTC-8 – Los Angeles",value:"America/Los_Angeles"},{label:"UTC+1 – London",value:"Europe/London"},{label:"UTC+2 – Paris",value:"Europe/Paris"},{label:"UTC+9 – Tokyo",value:"Asia/Tokyo"},{label:"UTC+10 – Sydney",value:"Australia/Sydney"},{label:"UTC+5:30 – Mumbai",value:"Asia/Kolkata"},{label:"UTC+8 – Singapore",value:"Asia/Singapore"}],onChange:e=>t({customTimezone:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Style Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Digital Clock Style","axvart"),checked:y,onChange:e=>t({digitalStyle:e}),help:(0,i.__)("Enables a digital/neon clock appearance","axvart")}),y&&(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Glow Effect","axvart"),checked:_,onChange:e=>t({glowEffect:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Text Alignment","axvart"),value:p,options:[{label:(0,i.__)("Left","axvart"),value:"left"},{label:(0,i.__)("Center","axvart"),value:"center"},{label:(0,i.__)("Right","axvart"),value:"right"}],onChange:e=>t({textAlign:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:C,onChange:e=>t({borderRadius:e}),min:0,max:50}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Box Shadow","axvart"),checked:j,onChange:e=>t({boxShadow:e})})]}),(0,s.jsx)(r.PanelColorSettings,{title:(0,i.__)("Color Settings","axvart"),colorSettings:[{value:g,onChange:e=>t({textColor:e}),label:(0,i.__)("Text Color","axvart")},{value:h,onChange:e=>t({backgroundColor:e}),label:(0,i.__)("Background Color","axvart")}]})]}),(0,s.jsx)("div",{...T,children:(0,s.jsxs)("div",{className:"axvart-live-clock-wrapper",children:[f&&(0,s.jsxs)("span",{className:"clock-label",children:[f," "]}),("time"===o||"both"===o)&&(0,s.jsx)("div",{className:"clock-time",children:(e=>{if(!b)return"dot"===m?e.replace(/:/g,"·"):e;const t="dot"===m?"·":":",o=e.split(":");return o.map((e,a)=>(0,s.jsxs)(s.Fragment,{children:[e,a{const e={hour:"2-digit",minute:"2-digit",...S&&{second:"2-digit"},hour12:"12"===l,timeZone:"browser"===c?void 0:x};return k.toLocaleTimeString("en-US",e)})())}),("date"===o||"both"===o)&&(0,s.jsx)("div",{className:"clock-date",children:(()=>{const e={timeZone:"browser"===c?void 0:x};return"long"===d?k.toLocaleDateString("en-US",{...e,weekday:w?"long":void 0,year:"numeric",month:"long",day:"numeric"}):"short"===d?k.toLocaleDateString("en-US",{...e,year:"numeric",month:"short",day:"numeric"}):"numeric"===d?k.toLocaleDateString("en-US",{...e,year:"numeric",month:"2-digit",day:"2-digit"}):k.toLocaleDateString("en-US",e)})()})]})})]})},save:function({attributes:e}){const{displayMode:t,layoutMode:o,timeFormat:a,dateFormat:l,timezone:n,customTimezone:i,textAlign:d,textColor:c,backgroundColor:x,gradient:p,separator:g,blinkingSeparator:u,customLabel:h,digitalStyle:v,glowEffect:m,borderRadius:b,boxShadow:f,showSeconds:y,showWeekday:_}=e,C=r.useBlockProps.save({style:{textAlign:d,color:c||void 0,background:p||x||void 0,borderRadius:b?`${b}px`:void 0,boxShadow:f?"0 4px 6px rgba(0, 0, 0, 0.1)":void 0},className:`layout-${o} ${v?"digital-style":""} ${m?"glow-effect":""} ${u?"blinking-separator":""}`});return(0,s.jsx)("div",{...C,"data-display-mode":t,"data-time-format":a,"data-date-format":l,"data-timezone":n,"data-custom-timezone":i,"data-separator":g,"data-blinking-separator":u,"data-show-seconds":y,"data-show-weekday":_,children:(0,s.jsxs)("div",{className:"axvart-live-clock-wrapper",children:[h&&(0,s.jsxs)("span",{className:"clock-label",children:[h," "]}),("time"===t||"both"===t)&&(0,s.jsx)("div",{className:"clock-time",children:"00:00:00"}),("date"===t||"both"===t)&&(0,s.jsx)("div",{className:"clock-date",children:"Loading..."})]})})}});var te=(0,s.jsx)(N.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(N.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),oe=(0,s.jsx)(N.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(N.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})});const ae={geometric:{label:(0,i.__)("Geometric","axvart"),symbols:["●","○","◆","◇","■","□","▲","△","▼","▽","◀","▶","◁","▷","★","☆","✦","✧","✩","✪","✫","✬","✭","✮","✯","✰","✱","✲","✳","✴","✵","✶","✷","✸","✹","✺","✻","✼","✽","✾"]},arrows:{label:(0,i.__)("Arrows","axvart"),symbols:["→","←","↑","↓","↔","↕","↖","↗","↘","↙","⇒","⇐","⇑","⇓","⇔","⇕","⇖","⇗","⇘","⇙","➤","➥","➦","➧","➨","➩","➪","➫","➬","➭","➮","➯","➰","➱","➲","➳","➴","➵","➶","➷"]},decorative:{label:(0,i.__)("Decorative","axvart"),symbols:["❀","❁","❂","❃","❄","❅","❆","❇","❈","❉","❊","❋","❌","❍","❎","❏","❐","❑","❒","❓","❔","❕","❖","❗","❘","❙","❚","❛","❜","❝","❞","❟","❠","❡","❢","❣","❤","❥","❦","❧"]},symbols:{label:(0,i.__)("Symbols","axvart"),symbols:["♠","♣","♥","♦","♤","♧","♡","♢","♩","♪","♫","♬","♭","♮","♯","♰","♱","♲","♳","♴","♵","♶","♷","♸","♹","♺","♻","♼","♽","♾","♿","⚀","⚁","⚂","⚃","⚄","⚅","⚆","⚇","⚈"]},punctuation:{label:(0,i.__)("Punctuation","axvart"),symbols:["•","‣","⁃","◦","‰","‱","′","″","‴","‵","‶","‷","‸","‹","›","‼","‽","‾","‿","⁀","⁁","⁂","⁃","⁄","⁅","⁆","⁇","⁈","⁉","⁊","⁋","⁌","⁍","⁎","⁏","⁐","⁑","⁒","⁓","⁔"]},mathematical:{label:(0,i.__)("Mathematical","axvart"),symbols:["±","×","÷","∞","∝","∟","∠","∡","∢","∣","∤","∥","∦","∧","∨","∩","∪","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁"]},currency:{label:(0,i.__)("Currency","axvart"),symbols:["$","¢","£","¤","¥","₦","€","₹","₽","₩","₪","₫","₨","₱","₡","₵","₸","₴","₶","₷","₺","₻","₼","₽","₾","₿","$","¢","£","¬"," ̄","¦","¥","₩","￧","│","←","↑","→","↓"]},weather:{label:(0,i.__)("Weather","axvart"),symbols:["☀","☁","☂","☃","☄","★","☆","☇","☈","☉","☊","☋","☌","☍","☎","☏","☐","☑","☒","☓","☔","☕","☖","☗","☘","☙","☚","☛","☜","☝","☞","☟","☠","☡","☢","☣","☤","☥","☦","☧"]},zodiac:{label:(0,i.__)("Zodiac","axvart"),symbols:["♈","♉","♊","♋","♌","♍","♎","♏","♐","♑","♒","♓","⛎","♔","♕","♖","♗","♘","♙","♚","♛","♜","♝","♞","♟","♠","♡","♢","♣","♤","♥","♦","♧","♨","♩","♪","♫","♬","♭","♮"]},misc:{label:(0,i.__)("Miscellaneous","axvart"),symbols:["©","®","™","℠","℡","™","℣","ℤ","℥","Ω","℧","ℨ","℩","K","Å","ℬ","ℭ","℮","ℯ","ℰ","ℱ","Ⅎ","ℳ","ℴ","ℵ","ℶ","ℷ","ℸ","ℹ","℺","℻","ℼ","ℽ","ℾ","ℿ","⅀","⅁","⅂","⅃","⅄"]}},le=["✦","●","★","→","•","◆","▶","❤","✓","×","♦","◇","▲","►","♠","♣","♥","♪","☆","✨"],re="axvart_marquee_recent_symbols",ne=()=>{try{const e=localStorage.getItem(re);return e?JSON.parse(e):[]}catch(e){return[]}},ie=({value:e,onChange:t,size:o="1em",onSizeChange:a,style:l="normal",onStyleChange:d,color:c="",onColorChange:x,weight:p="normal",onWeightChange:g,label:h=(0,i.__)("Select Symbol","axvart")})=>{const[v,m]=(0,u.useState)(!1),[b,f]=(0,u.useState)(""),[y,_]=(0,u.useState)("popular"),[C,j]=(0,u.useState)([]),[S,w]=(0,u.useState)([]);(0,u.useEffect)(()=>{j(ne());try{const e=localStorage.getItem("axvart_marquee_favorite_symbols");e&&w(JSON.parse(e))}catch(e){}},[]);const k=e=>{t(e),(e=>{try{let t=ne();t=t.filter(t=>t!==e),t.unshift(e),t=t.slice(0,20),localStorage.setItem(re,JSON.stringify(t))}catch(e){}})(e),j(ne()),m(!1)},B=(t,o=!1)=>t&&0!==t.length?(0,s.jsx)("div",{className:"axvart-symbol-grid",children:t.map((t,a)=>(0,s.jsx)(n.Tooltip,{text:t,children:(0,s.jsxs)("div",{className:"axvart-symbol-item",children:[(0,s.jsx)(n.Button,{className:"axvart-symbol-button "+(e===t?"is-selected":""),onClick:()=>k(t),style:{fontSize:"1.2em",fontWeight:p,fontStyle:l,color:c||"inherit"},children:t}),o&&(0,s.jsx)(n.Button,{className:"axvart-symbol-favorite",icon:S.includes(t)?te:oe,onClick:()=>(e=>{const t=S.includes(e)?S.filter(t=>t!==e):[...S,e];w(t);try{localStorage.setItem("axvart_marquee_favorite_symbols",JSON.stringify(t))}catch(e){}})(t),size:"small"})]})},`${t}-${a}`))}):(0,s.jsx)("div",{className:"axvart-symbol-grid-empty",children:(0,s.jsx)("p",{children:(0,i.__)("No symbols found.","axvart")})}),T=b?(e=>{if(!e||e.length<1)return[];const t=[],o=e.toLowerCase();return Object.entries(ae).forEach(([a,l])=>{l.symbols.forEach(r=>{(r.includes(e)||a.toLowerCase().includes(o)||l.label.toLowerCase().includes(o))&&t.push({symbol:r,category:l.label,categoryKey:a})})}),t})(b):[],$=[{name:"popular",title:(0,i.__)("Popular","axvart"),content:B(le,!0)},{name:"recent",title:(0,i.__)("Recent","axvart"),content:B(C,!0)},{name:"favorites",title:(0,i.__)("Favorites","axvart"),content:B(S,!0)},...Object.entries(ae).map(([e,t])=>({name:e,title:t.label,content:B(t.symbols,!0)}))];return(0,s.jsxs)("div",{className:"axvart-symbol-selector",children:[(0,s.jsxs)(n.Flex,{align:"center",gap:3,children:[(0,s.jsx)(n.FlexItem,{children:(0,s.jsx)(n.Button,{variant:"secondary",onClick:()=>m(!0),className:"axvart-symbol-current",style:{fontSize:o,fontWeight:p,fontStyle:l,color:c||"inherit",minWidth:"40px",height:"40px"},children:e||"✦"})}),(0,s.jsx)(n.FlexBlock,{children:(0,s.jsxs)(n.__experimentalVStack,{spacing:2,children:[(0,s.jsx)("label",{className:"axvart-symbol-label",children:h}),(0,s.jsxs)(n.__experimentalHStack,{children:[(0,s.jsx)(n.Button,{variant:"tertiary",size:"small",onClick:()=>m(!0),children:(0,i.__)("Browse Symbols","axvart")}),(0,s.jsx)(n.Button,{variant:"tertiary",size:"small",onClick:()=>t(""),disabled:!e,children:(0,i.__)("Clear","axvart")})]})]})})]}),(0,s.jsxs)(n.__experimentalVStack,{spacing:3,className:"axvart-symbol-customization",children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Size","axvart"),value:parseFloat(o),onChange:e=>a(`${e}em`),min:.5,max:3,step:.1,initialPosition:1}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Style","axvart"),value:l,onChange:d,options:[{label:(0,i.__)("Normal","axvart"),value:"normal"},{label:(0,i.__)("Italic","axvart"),value:"italic"},{label:(0,i.__)("Oblique","axvart"),value:"oblique"}]}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Weight","axvart"),value:p,onChange:g,options:[{label:(0,i.__)("Light","axvart"),value:"300"},{label:(0,i.__)("Normal","axvart"),value:"normal"},{label:(0,i.__)("Medium","axvart"),value:"500"},{label:(0,i.__)("Semi Bold","axvart"),value:"600"},{label:(0,i.__)("Bold","axvart"),value:"bold"},{label:(0,i.__)("Extra Bold","axvart"),value:"800"}]}),(0,s.jsxs)("div",{className:"axvart-symbol-color",children:[(0,s.jsx)("label",{children:(0,i.__)("Color","axvart")}),(0,s.jsx)(r.ColorPalette,{colors:[{name:"Black",color:"var(--wp--preset--color--axvart-black)"},{name:"White",color:"var(--wp--preset--color--axvart-white)"},{name:"Light Blue",color:"var(--wp--preset--color--axvart-light-blue)"},{name:"Light Green",color:"var(--wp--preset--color--axvart-light-green)"},{name:"Gray",color:"var(--wp--preset--color--axvart-gray)"},{name:"Light Gray",color:"var(--wp--preset--color--axvart-light-gray)"}],value:c,onChange:x,disableCustomColors:!1,clearable:!0}),c&&(0,s.jsx)(n.Button,{variant:"tertiary",size:"small",onClick:()=>x(""),children:(0,i.__)("Reset Color","axvart")})]})]}),v&&(0,s.jsx)(n.Modal,{title:(0,i.__)("Select Symbol","axvart"),onRequestClose:()=>m(!1),className:"axvart-symbol-modal",size:"large",children:(0,s.jsxs)(n.__experimentalVStack,{spacing:4,children:[(0,s.jsx)(n.SearchControl,{value:b,onChange:f,placeholder:(0,i.__)("Search symbols...","axvart")}),b&&(0,s.jsxs)("div",{className:"axvart-symbol-search-results",children:[(0,s.jsx)("h3",{children:(0,i.__)("Search Results","axvart")}),B(T.map(e=>e.symbol),!0)]}),!b&&(0,s.jsx)(n.TabPanel,{className:"axvart-symbol-tabs",activeClass:"is-active",tabs:$,initialTabName:y,onSelect:e=>_(e),children:e=>(0,s.jsx)("div",{className:"axvart-symbol-tab-content",children:e.content})}),(0,s.jsxs)("div",{className:"axvart-symbol-custom",children:[(0,s.jsx)("h3",{children:(0,i.__)("Custom Symbol","axvart")}),(0,s.jsxs)(n.Flex,{align:"center",gap:2,children:[(0,s.jsx)(n.FlexBlock,{children:(0,s.jsx)("input",{type:"text",placeholder:(0,i.__)("Enter custom symbol...","axvart"),className:"axvart-symbol-custom-input",onKeyPress:e=>{"Enter"===e.key&&e.target.value.trim()&&k(e.target.value.trim())}})}),(0,s.jsx)(n.FlexItem,{children:(0,s.jsx)(n.Button,{variant:"secondary",onClick:e=>{const t=e.target.closest(".axvart-symbol-custom").querySelector("input");t.value.trim()&&k(t.value.trim())},children:(0,i.__)("Use","axvart")})})]})]})]})})]})},se=({attributes:e,setAttributes:t})=>{const{content:o,textSegments:a=[],segmentSeparator:l="✦",separatorSize:d="1em",separatorStyle:c="normal",separatorColor:x="",separatorWeight:p="normal",segmentGap:g="40px",useSegmentMode:h=!1,displayMode:v,logoImages:m,imageHeight:b,imageSpacing:f,speed:y,direction:_,backgroundColor:C,textColor:j,pauseOnHover:S,fontSize:w,fontWeight:k,padding:B}=e,[T,$]=(0,u.useState)(o||""),[N,P]=(0,u.useState)(!1),[I,z]=(0,u.useState)([]),[R,H]=(0,u.useState)(null),[F,L]=(0,u.useState)(""),M=()=>{if(!F.trim())return;const e={id:Math.max(0,...a.map(e=>e.id))+1,text:F.trim(),enabled:!0};t({textSegments:[...a,e]}),L("")},E=(e,o)=>{const l=a.map(t=>t.id===e?{...t,text:o}:t);t({textSegments:l}),H(null)},W=[{name:(0,i.__)("Small","axvart"),slug:"small",size:"14px"},{name:(0,i.__)("Normal","axvart"),slug:"normal",size:"16px"},{name:(0,i.__)("Medium","axvart"),slug:"medium",size:"20px"},{name:(0,i.__)("Large","axvart"),slug:"large",size:"24px"},{name:(0,i.__)("Extra Large","axvart"),slug:"extra-large",size:"32px"}],O=[{label:(0,i.__)("Normal","axvart"),value:"normal"},{label:(0,i.__)("Bold","axvart"),value:"bold"},{label:(0,i.__)("Light","axvart"),value:"300"},{label:(0,i.__)("Medium","axvart"),value:"500"},{label:(0,i.__)("Semi Bold","axvart"),value:"600"},{label:(0,i.__)("Extra Bold","axvart"),value:"800"}];return(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Display Mode","axvart"),className:"axvart-display-panel",initialOpen:!0,children:(0,s.jsxs)("div",{style:{background:"#f8fafc",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",margin:"0 0 16px 0"},children:[(0,s.jsx)("h4",{style:{margin:"0 0 12px 0",color:"#334155",fontSize:"13px",fontWeight:"500"},children:"Content Type"}),(0,s.jsxs)(n.ButtonGroup,{children:[(0,s.jsx)(n.Button,{isPrimary:"text"===v,isSecondary:"text"!==v,onClick:()=>t({displayMode:"text"}),style:{background:"text"===v?"#1e293b":"transparent",color:"text"===v?"#ffffff":"#64748b",border:"1px solid #e2e8f0",borderRadius:"4px"},children:(0,i.__)("Text","axvart")}),(0,s.jsx)(n.Button,{isPrimary:"images"===v,isSecondary:"images"!==v,onClick:()=>t({displayMode:"images"}),style:{background:"images"===v?"#1e293b":"transparent",color:"images"===v?"#ffffff":"#64748b",border:"1px solid #e2e8f0",borderRadius:"4px"},children:(0,i.__)("Images","axvart")})]})]})}),"text"===v&&(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Text Content Mode","axvart"),className:"axvart-text-mode-panel",initialOpen:!0,children:[(0,s.jsxs)("div",{style:{background:"#f8fafc",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",margin:"0 0 16px 0"},children:[(0,s.jsx)("h4",{style:{margin:"0 0 8px 0",color:"#334155",fontSize:"13px",fontWeight:"500"},children:"Text Segments Configuration"}),(0,s.jsx)("p",{style:{margin:"0",color:"#64748b",fontSize:"12px"},children:(0,i.__)("Create and manage text segments for your marquee display","axvart")})]}),(0,s.jsxs)("div",{style:{background:"#ffffff",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",margin:"0 0 16px 0"},children:[(0,s.jsx)("h4",{style:{margin:"0 0 12px 0",color:"#334155",fontSize:"13px",fontWeight:"500"},children:"Segment Settings"}),(0,s.jsx)("div",{style:{marginBottom:"16px"},children:(0,s.jsx)(ie,{value:l,onChange:e=>t({segmentSeparator:e}),size:d,onSizeChange:e=>t({separatorSize:e}),style:c,onStyleChange:e=>t({separatorStyle:e}),color:x,onColorChange:e=>t({separatorColor:e}),weight:p,onWeightChange:e=>t({separatorWeight:e}),label:(0,i.__)("Separator Symbol","axvart")})}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontSize:"12px",fontWeight:"500",color:"#64748b"},children:(0,i.__)("Gap Between Segments","axvart")}),(0,s.jsx)("input",{type:"text",value:g,onChange:e=>t({segmentGap:e.target.value}),style:{width:"100%",padding:"8px 12px",border:"1px solid #e2e8f0",borderRadius:"4px",fontSize:"14px"},placeholder:"40px"})]}),0===a.length&&(0,s.jsxs)("div",{style:{background:"#f0fdf4",border:"1px solid #22c55e",borderRadius:"6px",padding:"12px",marginBottom:"16px",textAlign:"center"},children:[(0,s.jsx)("h5",{style:{margin:"0 0 8px 0",fontSize:"12px",fontWeight:"600",color:"#15803d"},children:(0,i.__)("Quick Start","axvart")}),(0,s.jsx)("p",{style:{margin:"0 0 8px 0",fontSize:"11px",color:"#16a34a"},children:(0,i.__)("Load sample healthcare marquee text","axvart")}),(0,s.jsx)(n.Button,{isPrimary:!0,onClick:()=>{t({textSegments:[{id:1,text:"BOOK FOR ONLINE APPOINTMENT",enabled:!0},{id:2,text:"PROFESSIONAL HEALTHCARE SERVICES",enabled:!0},{id:3,text:"24/7 EMERGENCY SUPPORT",enabled:!0},{id:4,text:"EXPERT MEDICAL CONSULTATIONS",enabled:!0},{id:5,text:"MODERN FACILITIES & EQUIPMENT",enabled:!0},{id:6,text:"TRUSTED BY THOUSANDS OF PATIENTS",enabled:!0}],useSegmentMode:!0,segmentSeparator:"✦",segmentGap:"40px"})},style:{background:"#22c55e",border:"none",borderRadius:"4px",padding:"6px 12px",fontSize:"11px"},children:(0,i.__)("Load Sample Text","axvart")})]}),(0,s.jsxs)("div",{style:{background:"#f0f9ff",border:"1px solid #0ea5e9",borderRadius:"6px",padding:"12px",marginBottom:"16px"},children:[(0,s.jsx)("h5",{style:{margin:"0 0 8px 0",fontSize:"12px",fontWeight:"600",color:"#0369a1"},children:(0,i.__)("Add New Segment","axvart")}),(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,s.jsx)("input",{type:"text",value:F,onChange:e=>L(e.target.value),placeholder:(0,i.__)("Enter segment text...","axvart"),style:{flex:1,padding:"8px 12px",border:"1px solid #0ea5e9",borderRadius:"4px",fontSize:"13px"},onKeyPress:e=>{"Enter"===e.key&&M()}}),(0,s.jsx)(n.Button,{isPrimary:!0,onClick:M,disabled:!F.trim(),style:{background:"#0369a1",border:"none",borderRadius:"4px",padding:"8px 16px",fontSize:"12px"},children:(0,i.__)("Add Text","axvart")})]})]}),a.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"12px"},children:[(0,s.jsxs)("h5",{style:{margin:"0",fontSize:"12px",fontWeight:"600",color:"#334155"},children:[(0,i.__)("Text Segments","axvart")," (",a.length,")"]}),(0,s.jsx)(n.Button,{isDestructive:!0,isSmall:!0,onClick:()=>t({textSegments:[]}),style:{background:"#dc2626",border:"none",borderRadius:"4px",padding:"4px 8px",fontSize:"11px",color:"#ffffff"},children:(0,i.__)("Clear All","axvart")})]}),(0,s.jsx)("div",{style:{maxHeight:"300px",overflowY:"auto"},children:a.map((e,o)=>(0,s.jsx)("div",{style:{background:e.enabled?"#ffffff":"#f8fafc",border:"1px solid "+(e.enabled?"#e2e8f0":"#cbd5e1"),borderRadius:"6px",padding:"12px",marginBottom:"8px",opacity:e.enabled?1:.6},children:R===e.id?(0,s.jsxs)("div",{children:[(0,s.jsx)("input",{type:"text",defaultValue:e.text,autoFocus:!0,style:{width:"100%",padding:"6px 8px",border:"1px solid #0ea5e9",borderRadius:"4px",fontSize:"13px",marginBottom:"8px"},onKeyPress:t=>{"Enter"===t.key&&E(e.id,t.target.value)},onBlur:t=>{E(e.id,t.target.value)}}),(0,s.jsxs)("div",{style:{display:"flex",gap:"6px"},children:[(0,s.jsx)(n.Button,{isSmall:!0,isPrimary:!0,onClick:t=>{const o=t.target.closest("div").previousElementSibling;E(e.id,o.value)},children:(0,i.__)("Save","axvart")}),(0,s.jsx)(n.Button,{isSmall:!0,onClick:()=>H(null),children:(0,i.__)("Cancel","axvart")})]})]}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[(0,s.jsxs)("span",{style:{fontSize:"11px",color:"#64748b",fontWeight:"500"},children:["#",o+1]}),(0,s.jsxs)("div",{style:{display:"flex",gap:"4px"},children:[(0,s.jsx)(n.Button,{isSmall:!0,onClick:()=>(e=>{const o=a.map(t=>t.id===e?{...t,enabled:!t.enabled}:t);t({textSegments:o})})(e.id),style:{background:e.enabled?"#10b981":"#6b7280",color:"#ffffff",border:"none",borderRadius:"3px",padding:"2px 6px",fontSize:"10px"},children:e.enabled?(0,i.__)("ON","axvart"):(0,i.__)("OFF","axvart")}),(0,s.jsx)(n.Button,{isSmall:!0,onClick:()=>H(e.id),style:{background:"#0ea5e9",color:"#ffffff",border:"none",borderRadius:"3px",padding:"2px 6px",fontSize:"10px"},children:"✏️"}),(0,s.jsx)(n.Button,{isSmall:!0,isDestructive:!0,onClick:()=>(e=>{const o=a.filter(t=>t.id!==e);t({textSegments:o})})(e.id),style:{background:"#dc2626",color:"#ffffff",border:"none",borderRadius:"3px",padding:"2px 6px",fontSize:"10px"},children:"🗑️"})]})]}),(0,s.jsx)("div",{style:{fontSize:"13px",color:e.enabled?"#1f2937":"#6b7280",fontWeight:"500",wordBreak:"break-word"},children:e.text})]})},e.id))})]})]})]}),"images"===v&&(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Logo Images","axvart"),className:"axvart-images-panel",initialOpen:!0,children:(0,s.jsxs)("div",{style:{background:"#ffffff",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",margin:"0 0 16px 0"},children:[(0,s.jsx)("h4",{style:{margin:"0 0 12px 0",color:"#334155",fontSize:"13px",fontWeight:"500"},children:"Image Management"}),I.length>0&&(0,s.jsxs)(n.Notice,{status:"error",isDismissible:!1,style:{margin:"0 0 12px 0",background:"#fef2f2",border:"1px solid #fecaca",borderRadius:"4px"},children:[(0,s.jsx)("strong",{style:{color:"#dc2626"},children:(0,i.__)("Upload Errors:","axvart")}),(0,s.jsx)("ul",{style:{margin:"4px 0 0 0",paddingLeft:"16px"},children:I.map((e,t)=>(0,s.jsx)("li",{style:{fontSize:"12px",color:"#991b1b"},children:e},t))})]}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"flex-start",marginBottom:"12px"},children:(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>{const o=[],a=[];e.forEach((e,t)=>{const l=(e=>["image/jpeg","image/jpg","image/png","image/gif","image/svg+xml","image/webp"].includes(e.mime)?e.filesizeInBytes&&e.filesizeInBytes>2097152?{valid:!1,message:(0,i.__)("Image size should be less than 2MB","axvart")}:{valid:!0}:{valid:!1,message:(0,i.__)("Please upload a valid image file (JPEG, PNG, GIF, SVG, WebP)","axvart")})(e);l.valid?o.push({id:e.id,url:e.url,alt:e.alt||`Logo ${t+1}`,width:e.width,height:e.height}):a.push(`${e.filename}: ${l.message}`)}),t({logoImages:[...m,...o]}),a.length>0?(z(a),setTimeout(()=>z([]),5e3)):z([])},multiple:!0,gallery:!0,allowedTypes:["image"],render:({open:e})=>(0,s.jsxs)(n.Button,{isPrimary:!0,onClick:e,style:{background:"#1e293b",border:"none",borderRadius:"4px",padding:"10px 20px",fontSize:"13px",fontWeight:"500",color:"#ffffff",cursor:"pointer",transition:"all 0.2s ease",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:["📁 ",(0,i.__)("Add Logo Images","axvart")]})})})}),m.length>0&&(0,s.jsxs)("div",{style:{marginTop:"12px"},children:[(0,s.jsxs)("p",{style:{margin:"0 0 8px 0",color:"#64748b",fontSize:"12px"},children:[(0,i.__)("Uploaded Images:","axvart")," ",m.length]}),(0,s.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(70px, 1fr))",gap:"12px",alignItems:"start"},children:m.map((e,o)=>(0,s.jsxs)("div",{style:{position:"relative",backgroundColor:"#fff",borderRadius:"6px",padding:"6px",border:"1px solid #e2e8f0",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)",transition:"all 0.2s ease"},children:[(0,s.jsx)("img",{src:e.url,alt:e.alt,style:{width:"100%",height:"45px",objectFit:"contain",borderRadius:"4px",display:"block"}}),(0,s.jsx)(n.Button,{isDestructive:!0,isSmall:!0,onClick:()=>(e=>{const o=m.filter(t=>t.id!==e);t({logoImages:o})})(e.id),style:{position:"absolute",top:"2px",right:"2px",width:"18px",height:"18px",minWidth:"18px",padding:"0",borderRadius:"50%",fontSize:"10px",background:"#dc2626",border:"1px solid #ffffff",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:"×"})]},e.id))})]}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Image Height (px)","axvart"),value:parseInt(b),onChange:e=>t({imageHeight:`${e}px`}),min:20,max:100,step:5,help:(0,i.__)("Adjust the height of logo images in the marquee","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Image Spacing (px)","axvart"),value:parseInt(f),onChange:e=>t({imageSpacing:`${e}px`}),min:10,max:100,step:5,help:(0,i.__)("Set the spacing between logo images","axvart")})]})}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Animation Settings","axvart"),initialOpen:!1,className:"axvart-animation-panel",children:(0,s.jsxs)("div",{style:{background:"#ffffff",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",marginBottom:"16px"},children:[(0,s.jsx)("h4",{style:{margin:"0 0 12px 0",fontSize:"13px",fontWeight:"500",color:"#334155"},children:(0,i.__)("Motion Controls","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Animation Speed","axvart"),value:y,onChange:e=>t({speed:e}),min:10,max:200,step:5,help:(0,i.__)("Lower values create slower, more readable animations","axvart")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Direction","axvart"),value:_,options:[{label:(0,i.__)("Left to Right","axvart"),value:"left"},{label:(0,i.__)("Right to Left","axvart"),value:"right"}],onChange:e=>t({direction:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Pause on Hover","axvart"),checked:S,onChange:e=>t({pauseOnHover:e}),help:(0,i.__)("Pause animation when users hover over the marquee for better readability","axvart")})]})}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("🎨 Typography","axvart"),initialOpen:!1,className:"axvart-typography-panel",children:(0,s.jsxs)("div",{style:{background:"linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%)",border:"1px solid #c084fc",borderRadius:"12px",padding:"20px",marginBottom:"16px"},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px",gap:"8px"},children:[(0,s.jsx)("span",{style:{fontSize:"16px"},children:"✍️"}),(0,s.jsx)("h4",{style:{margin:"0",fontSize:"14px",fontWeight:"600",color:"#7c2d12"},children:(0,i.__)("Text Styling","axvart")})]}),(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsxs)("label",{style:{display:"block",marginBottom:"8px",fontSize:"13px",fontWeight:"600",color:"#7c2d12"},children:["📏 ",(0,i.__)("Font Size","axvart")]}),(0,s.jsx)(n.FontSizePicker,{fontSizes:W,value:w,fallbackFontSize:16,onChange:e=>t({fontSize:e})})]}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("💪 Font Weight","axvart"),value:k,options:O,onChange:e=>t({fontWeight:e}),help:(0,i.__)("🎯 Choose the visual weight of your text for optimal readability","axvart")})]})}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("🌈 Color Settings","axvart"),initialOpen:!1,className:"axvart-color-panel",children:(0,s.jsxs)("div",{style:{background:"linear-gradient(135deg, #fef3c7 0%, #fde68a 100%)",border:"1px solid #f59e0b",borderRadius:"12px",padding:"20px",marginBottom:"16px"},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px",gap:"8px"},children:[(0,s.jsx)("span",{style:{fontSize:"16px"},children:"🎨"}),(0,s.jsx)("h4",{style:{margin:"0",fontSize:"14px",fontWeight:"600",color:"#92400e"},children:(0,i.__)("Visual Theme","axvart")})]}),(0,s.jsx)(r.PanelColorSettings,{title:(0,i.__)("Color Settings","axvart"),colorSettings:[{value:C,onChange:e=>t({backgroundColor:e}),label:C?(0,i.__)("🖼️ Background Color (Custom)","axvart"):(0,i.__)("🖼️ Background Color (Theme Default)","axvart"),clearable:!0},{value:j,onChange:e=>t({textColor:e}),label:j?(0,i.__)("✏️ Text Color (Custom)","axvart"):(0,i.__)("✏️ Text Color (Theme Default)","axvart"),clearable:!0}]}),(0,s.jsxs)("div",{style:{marginTop:"16px",padding:"12px",backgroundColor:"rgba(251, 191, 36, 0.1)",borderRadius:"8px",fontSize:"12px",color:"#92400e"},children:["💡 ",(0,i.__)("Tip: Leave colors empty to use theme defaults that automatically adapt when switching theme styles. Custom colors override theme colors.","axvart")]})]})}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("📐 Spacing","axvart"),initialOpen:!1,className:"axvart-spacing-panel",children:(0,s.jsxs)("div",{style:{background:"linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%)",border:"1px solid #10b981",borderRadius:"12px",padding:"20px",marginBottom:"16px"},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px",gap:"8px"},children:[(0,s.jsx)("span",{style:{fontSize:"16px"},children:"📏"}),(0,s.jsx)("h4",{style:{margin:"0",fontSize:"14px",fontWeight:"600",color:"#065f46"},children:(0,i.__)("Layout Control","axvart")})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsxs)("label",{style:{display:"block",marginBottom:"8px",fontSize:"13px",fontWeight:"600",color:"#065f46"},children:["🎯 ",(0,i.__)("Padding","axvart")]}),(0,s.jsx)(n.__experimentalBoxControl,{values:B,onChange:e=>t({padding:e}),units:[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],allowReset:!0})]}),(0,s.jsxs)("div",{style:{padding:"12px",backgroundColor:"rgba(16, 185, 129, 0.1)",borderRadius:"8px",fontSize:"12px",color:"#065f46"},children:["💡 ",(0,i.__)("Adjust padding to control the space around your marquee content","axvart")]})]})})]})},de=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/marquee","version":"1.0.0","title":"Marquee","category":"widgets","icon":"controls-forward","description":"Display scrolling text with customizable speed, direction, and styling options.","keywords":["marquee","scroll","ticker","animation"],"textdomain":"axvart","editorScript":"file:./index.js","editorStyle":"file:./style-index.css","style":"file:./style-index.css","attributes":{"content":{"type":"string","source":"html","selector":".axvart-marquee-content","default":"✦ BOOK FOR ONLINE APPOINTMENT ✦ PROFESSIONAL HEALTHCARE SERVICES ✦ 24/7 EMERGENCY SUPPORT ✦ EXPERT MEDICAL CONSULTATIONS ✦ MODERN FACILITIES & EQUIPMENT ✦ TRUSTED BY THOUSANDS OF PATIENTS ✦"},"speed":{"type":"number","default":50},"direction":{"type":"string","default":"left"},"backgroundColor":{"type":"string","default":""},"textColor":{"type":"string","default":""}},"supports":{"html":false,"align":["wide","full"]},"example":{"attributes":{"content":"✦ BOOK FOR ONLINE APPOINTMENT ✦ PROFESSIONAL HEALTHCARE SERVICES ✦ 24/7 EMERGENCY SUPPORT ✦ EXPERT MEDICAL CONSULTATIONS ✦ MODERN FACILITIES & EQUIPMENT ✦ TRUSTED BY THOUSANDS OF PATIENTS ✦","speed":50,"direction":"left"}}}');(0,j.registerBlockType)(de.name,{...de,attributes:{content:{type:"string",source:"html",selector:".axvart-marquee-content",default:"✦ BOOK FOR ONLINE APPOINTMENT ✦ PROFESSIONAL HEALTHCARE SERVICES ✦ 24/7 EMERGENCY SUPPORT ✦ EXPERT MEDICAL CONSULTATIONS ✦ MODERN FACILITIES & EQUIPMENT ✦ TRUSTED BY THOUSANDS OF PATIENTS ✦"},textSegments:{type:"array",default:[{id:1,text:"BOOK FOR ONLINE APPOINTMENT",enabled:!0},{id:2,text:"PROFESSIONAL HEALTHCARE SERVICES",enabled:!0},{id:3,text:"24/7 EMERGENCY SUPPORT",enabled:!0},{id:4,text:"EXPERT MEDICAL CONSULTATIONS",enabled:!0},{id:5,text:"MODERN FACILITIES & EQUIPMENT",enabled:!0},{id:6,text:"TRUSTED BY THOUSANDS OF PATIENTS",enabled:!0}]},segmentSeparator:{type:"string",default:"✦"},separatorSize:{type:"string",default:"1em"},separatorStyle:{type:"string",default:"normal"},separatorColor:{type:"string",default:""},separatorWeight:{type:"string",default:"normal"},segmentGap:{type:"string",default:"10px"},displayMode:{type:"string",default:"text"},logoImages:{type:"array",default:[]},imageHeight:{type:"string",default:"40px"},imageSpacing:{type:"string",default:"30px"},speed:{type:"number",default:50},direction:{type:"string",default:"left"},backgroundColor:{type:"string",default:""},textColor:{type:"string",default:""},pauseOnHover:{type:"boolean",default:!0},fontSize:{type:"string",default:"16px"},fontWeight:{type:"string",default:"normal"},padding:{type:"object",default:{top:"10px",right:"20px",bottom:"10px",left:"20px"}}},edit:function({attributes:e,setAttributes:t}){const{content:o="",displayMode:a="text",logoImages:l=[],imageHeight:n="40px",imageSpacing:d="30px",speed:c=50,direction:x="left",backgroundColor:p="",textColor:g="",pauseOnHover:h=!0,fontSize:v="16px",fontWeight:m="normal",padding:b={top:"10px",right:"20px",bottom:"10px",left:"20px"},textSegments:f=[],segmentSeparator:y="✦",separatorSize:_="1em",separatorStyle:C="normal",separatorColor:j="",separatorWeight:S="normal",segmentGap:w="10px"}=e||{},k=Math.max(10,Math.min(200,Number(c)||50)),B=["left","right"].includes(x)?x:"left",T=(0,r.useBlockProps)({className:"axvart-marquee-block "+(h?"pause-on-hover":""),style:{backgroundColor:p||void 0,color:g||void 0,fontSize:v||"16px",fontWeight:m||"normal",padding:(e=>{if(e&&"object"==typeof e)try{return`${e.top||"10px"} ${e.right||"20px"} ${e.bottom||"10px"} ${e.left||"20px"}`}catch(e){return console.warn("Marquee block: Invalid padding format",e),"10px 20px"}})(b),"--marquee-speed":`${k}s`,"--marquee-direction":"right"===B?"reverse":"normal"}});try{return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(se,{attributes:e,setAttributes:t}),(0,s.jsx)("div",{...T,children:(0,s.jsx)("div",{className:"axvart-marquee-container",children:(0,s.jsx)("div",{className:"axvart-marquee-track",children:"text"===a?(0,s.jsx)(s.Fragment,{children:f.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-segments",style:{display:"flex",alignItems:"center",gap:w||"10px",fontSize:v||"16px",fontWeight:m||"normal"},children:f.filter(e=>e.enabled).map(e=>(0,s.jsxs)(u.Fragment,{children:[(0,s.jsx)("span",{className:"axvart-marquee-segment",style:{fontSize:v||"16px",fontWeight:m||"normal"},children:e.text}),y&&(0,s.jsx)("span",{className:"axvart-marquee-separator",style:{fontSize:_||"1em",fontWeight:S||"normal",fontStyle:C||"normal",color:j||"inherit"},children:y})]},e.id))}),(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-segments axvart-marquee-duplicate",style:{display:"flex",alignItems:"center",gap:w||"10px",fontSize:v||"16px",fontWeight:m||"normal"},"aria-hidden":"true",children:f.filter(e=>e.enabled).map(e=>(0,s.jsxs)(u.Fragment,{children:[(0,s.jsx)("span",{className:"axvart-marquee-segment",style:{fontSize:v||"16px",fontWeight:m||"normal"},children:e.text}),y&&(0,s.jsx)("span",{className:"axvart-marquee-separator",style:{fontSize:_||"1em",fontWeight:S||"normal",fontStyle:C||"normal",color:j||"inherit"},children:y})]},`duplicate-${e.id}`))})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-placeholder",style:{fontSize:v||"16px",fontWeight:m||"normal",color:"var(--wp--preset--color--axvart-gray)",fontStyle:"italic"},children:(0,i.__)("Add text segments to display content...","axvart")}),(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-placeholder axvart-marquee-duplicate",style:{fontSize:v||"16px",fontWeight:m||"normal",color:"var(--wp--preset--color--axvart-gray)",fontStyle:"italic"},"aria-hidden":"true",children:(0,i.__)("Add text segments to display content...","axvart")})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-images",style:{display:"flex",alignItems:"center",gap:d||"30px"},children:l&&l.length>0?l.map((e,t)=>(0,s.jsx)("img",{src:e.url,alt:e.alt||`Logo ${t+1}`,style:{height:n||"40px",width:"auto",objectFit:"contain",flexShrink:0}},e.id||t)):(0,s.jsx)("div",{className:"axvart-marquee-placeholder",children:(0,i.__)("No images uploaded. Use the sidebar to add logo images.","axvart")})}),(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-images axvart-marquee-duplicate",style:{display:"flex",alignItems:"center",gap:d||"30px"},"aria-hidden":"true",children:l&&l.length>0&&l.map((e,t)=>(0,s.jsx)("img",{src:e.url,alt:e.alt||`Logo ${t+1}`,style:{height:n||"40px",width:"auto",objectFit:"contain",flexShrink:0}},`duplicate-${e.id||t}`))})]})})})})]})}catch(e){return console.error("Marquee block: Render error",e),(0,s.jsx)("div",{className:"axvart-marquee-error",children:(0,s.jsx)("p",{children:(0,i.__)("Error rendering marquee block. Please refresh the editor.","axvart")})})}},save:function({attributes:e}){const{content:t="",displayMode:o="text",logoImages:a=[],imageHeight:l="40px",imageSpacing:n="30px",speed:i=50,direction:d="left",backgroundColor:c="",textColor:x="",pauseOnHover:p=!0,fontSize:g="16px",fontWeight:h="normal",padding:v={top:"10px",right:"20px",bottom:"10px",left:"20px"},textSegments:m=[],segmentSeparator:b="✦",separatorSize:f="1em",separatorStyle:y="normal",separatorColor:_="",separatorWeight:C="normal",segmentGap:j="10px"}=e||{},S=Math.max(10,Math.min(200,Number(i)||50)),w=["left","right"].includes(d)?d:"left",k=r.useBlockProps.save({className:"axvart-marquee-block "+(p?"pause-on-hover":""),style:{backgroundColor:c||void 0,color:x||void 0,fontSize:g||"16px",fontWeight:h||"normal",padding:(e=>{if(e&&"object"==typeof e)try{return`${e.top||"10px"} ${e.right||"20px"} ${e.bottom||"10px"} ${e.left||"20px"}`}catch(e){return console.warn("Marquee block: Invalid padding format in save",e),"10px 20px"}})(v),"--marquee-speed":`${S}s`,"--marquee-direction":"right"===w?"reverse":"normal"}});try{const e=t||"";return(0,s.jsx)("div",{...k,children:(0,s.jsx)("div",{className:"axvart-marquee-container",children:(0,s.jsx)("div",{className:"axvart-marquee-track",children:"text"===o?(0,s.jsx)(s.Fragment,{children:m.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-segments",style:{display:"flex",alignItems:"center",gap:j||"10px",fontSize:g||"16px",fontWeight:h||"normal"},children:m.filter(e=>e.enabled).map(e=>(0,s.jsxs)(u.Fragment,{children:[(0,s.jsx)("span",{className:"axvart-marquee-segment",style:{fontSize:g||"16px",fontWeight:h||"normal"},children:e.text}),b&&(0,s.jsx)("span",{className:"axvart-marquee-separator",style:{fontSize:f||"1em",fontWeight:C||"normal",fontStyle:y||"normal",color:_||"inherit"},children:b})]},e.id))}),(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-segments axvart-marquee-duplicate",style:{display:"flex",alignItems:"center",gap:j||"10px",fontSize:g||"16px",fontWeight:h||"normal"},"aria-hidden":"true",children:m.filter(e=>e.enabled).map(e=>(0,s.jsxs)(u.Fragment,{children:[(0,s.jsx)("span",{className:"axvart-marquee-segment",style:{fontSize:g||"16px",fontWeight:h||"normal"},children:e.text}),b&&(0,s.jsx)("span",{className:"axvart-marquee-separator",style:{fontSize:f||"1em",fontWeight:C||"normal",fontStyle:y||"normal",color:_||"inherit"},children:b})]},`duplicate-${e.id}`))})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.RichText.Content,{tagName:"div",className:"axvart-marquee-content",value:e}),(0,s.jsx)(r.RichText.Content,{tagName:"div",className:"axvart-marquee-content axvart-marquee-duplicate",value:e,"aria-hidden":"true"})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-images",style:{display:"flex",alignItems:"center",gap:n||"30px"},children:a&&a.length>0&&a.map((e,t)=>(0,s.jsx)("img",{src:e.url,alt:e.alt||`Logo ${t+1}`,style:{height:l||"40px",width:"auto",objectFit:"contain",flexShrink:0}},e.id||t))}),(0,s.jsx)("div",{className:"axvart-marquee-content axvart-marquee-images axvart-marquee-duplicate",style:{display:"flex",alignItems:"center",gap:n||"30px"},"aria-hidden":"true",children:a&&a.length>0&&a.map((e,t)=>(0,s.jsx)("img",{src:e.url,alt:e.alt||`Logo ${t+1}`,style:{height:l||"40px",width:"auto",objectFit:"contain",flexShrink:0}},`duplicate-${e.id||t}`))})]})})})})}catch(e){return console.error("Marquee block: Save render error",e),(0,s.jsx)("div",{className:"axvart-marquee-error",children:(0,s.jsx)("p",{children:"Error rendering marquee content"})})}}});const ce=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/three-d-tilt-card","version":"1.0.0","title":"3D Tilt Card","category":"widgets","icon":"desktop","description":"A modern card with interactive 3D hover animation.","textdomain":"axvart","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","supports":{"html":false,"anchor":true,"customClassName":true},"attributes":{"title":{"type":"string","default":"Card Title"},"description":{"type":"string","default":"This is a description of the 3D Tilt Card. Hover over me to see the effect."},"titleTag":{"type":"string","default":"h3"},"iconUrl":{"type":"string","default":""},"iconId":{"type":"number","default":0},"iconType":{"type":"string","default":"upload"},"iconPreset":{"type":"string","default":"star"},"showButton":{"type":"boolean","default":true},"buttonText":{"type":"string","default":"Read More"},"buttonUrl":{"type":"string","default":"#"},"tiltMax":{"type":"number","default":15},"scale":{"type":"number","default":1.03},"enableFloatingIcon":{"type":"boolean","default":true},"floatSpeed":{"type":"number","default":3},"floatHeight":{"type":"number","default":10},"cardPadding":{"type":"number","default":30},"cardRadius":{"type":"number","default":20},"cardBgColor":{"type":"string","default":"#ffffff"},"cardBgGradient":{"type":"string","default":""},"cardBorderWidth":{"type":"number","default":0},"cardBorderColor":{"type":"string","default":"#e5e5e5"},"shadowColor":{"type":"string","default":"rgba(0,0,0,0.1)"},"shadowIntensity":{"type":"number","default":20},"alignment":{"type":"string","default":"center"},"textColor":{"type":"string","default":"#333333"},"descColor":{"type":"string","default":"#666666"},"iconColor":{"type":"string","default":"#007cba"},"iconSize":{"type":"number","default":40},"buttonTextColor":{"type":"string","default":"#ffffff"},"buttonBgColor":{"type":"string","default":"#007cba"}}}');(0,j.registerBlockType)(ce.name,{...ce,edit:function({attributes:e,setAttributes:t}){const{title:o,description:a,titleTag:l,iconUrl:d,iconId:c,iconType:x,iconPreset:p,showButton:g,buttonText:h,buttonUrl:v,tiltMax:m,scale:b,enableFloatingIcon:f,floatSpeed:y,floatHeight:_,cardPadding:C,cardRadius:j,cardBgColor:S,cardBgGradient:w,cardBorderWidth:k,cardBorderColor:B,shadowColor:T,shadowIntensity:$,alignment:N,textColor:P,descColor:I,iconColor:z,iconSize:R,buttonTextColor:H,buttonBgColor:F}=e,L=(0,u.useRef)(null),M=(0,r.useBlockProps)({className:"axvart-3d-tilt-card-wrapper",style:{display:"flex",justifyContent:"left"===N?"flex-start":"right"===N?"flex-end":"center"}}),E={padding:`${C}px`,borderRadius:`${j}px`,background:w||S,border:`${k}px solid ${B}`,boxShadow:`0 20px 30px ${T}`,textAlign:N},W={width:`${R}px`,height:`${R}px`,fill:z,color:z,animation:f?`float ${y}s ease-in-out infinite`:"none","--float-height":`${_}px`};return(0,s.jsxs)("div",{...M,children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Content Settings","axvart"),children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Title Tag","axvart"),value:l,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"}],onChange:e=>t({titleTag:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Button","axvart"),checked:g,onChange:e=>t({showButton:e})}),g&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Button Text","axvart"),value:h,onChange:e=>t({buttonText:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Button URL","axvart"),value:v,onChange:e=>t({buttonUrl:e})})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Icon Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Icon Type","axvart"),value:x,options:[{label:"Upload SVG/Image",value:"upload"},{label:"Preset (Not Implemented)",value:"preset"},{label:"None",value:"none"}],onChange:e=>t({iconType:e})}),"upload"===x&&(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({iconUrl:e.url,iconId:e.id}),allowedTypes:["image"],value:c,render:({open:e})=>(0,s.jsx)(n.Button,{variant:"secondary",onClick:e,children:d?(0,i.__)("Replace Icon","axvart"):(0,i.__)("Upload Icon","axvart")})})}),d&&(0,s.jsx)(n.Button,{variant:"link",isDestructive:!0,onClick:()=>t({iconUrl:"",iconId:0}),children:(0,i.__)("Remove Icon","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Size","axvart"),value:R,onChange:e=>t({iconSize:e}),min:10,max:100}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Floating Icon","axvart"),checked:f,onChange:e=>t({enableFloatingIcon:e})}),f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Float Speed (s)","axvart"),value:y,onChange:e=>t({floatSpeed:e}),min:1,max:10,step:.1}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Float Height (px)","axvart"),value:_,onChange:e=>t({floatHeight:e}),min:0,max:50})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Animation Settings","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Max Tilt (deg)","axvart"),value:m,onChange:e=>t({tiltMax:e}),min:0,max:45}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Hover Scale","axvart"),value:b,onChange:e=>t({scale:e}),min:1,max:1.5,step:.01})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Styling","axvart"),initialOpen:!1,children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Title Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:P,onChange:e=>t({textColor:e})}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Description Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:I,onChange:e=>t({descColor:e})}),g&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Button Text Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:H,onChange:e=>t({buttonTextColor:e})}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Button Background Color","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:F,onChange:e=>t({buttonBgColor:e})})]}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Card Background (Solid)","axvart")})}),(0,s.jsx)(n.ColorPalette,{value:S||void 0,onChange:e=>t({cardBgColor:e,cardBgGradient:""}),clearable:!0}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:(0,i.__)("Card Background (Gradient)","axvart")})}),(0,s.jsx)(n.GradientPicker,{value:w||void 0,onChange:e=>t({cardBgGradient:e,cardBgColor:""}),clearable:!0}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:j,onChange:e=>t({cardRadius:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Padding","axvart"),value:C,onChange:e=>t({cardPadding:e}),min:0,max:100}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Content Alignment","axvart"),value:N,options:[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],onChange:e=>t({alignment:e})})]})]}),(0,s.jsxs)("div",{className:"axvart-3d-tilt-card",ref:L,onMouseMove:e=>{if(!L.current)return;const t=L.current,o=t.getBoundingClientRect(),a=e.clientX-o.left,l=e.clientY-o.top,r=o.width/2,n=o.height/2,i=(l-n)/n*m*-1,s=(a-r)/r*m;t.style.transform=`perspective(1000px) rotateX(${i}deg) rotateY(${s}deg) scale3d(${b}, ${b}, ${b})`},onMouseLeave:()=>{L.current&&(L.current.style.transform="perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)")},style:E,children:[d&&"none"!==x&&(0,s.jsx)("div",{className:"axvart-card-icon",style:W,children:(0,s.jsx)("img",{src:d,alt:"Card Icon",style:{width:"100%",height:"100%",objectFit:"contain"}})}),(0,s.jsx)(r.RichText,{tagName:l,className:"axvart-card-title",value:o,onChange:e=>t({title:e}),style:{color:P},placeholder:(0,i.__)("Enter Title...","axvart")}),(0,s.jsx)(r.RichText,{tagName:"p",className:"axvart-card-desc",value:a,onChange:e=>t({description:e}),style:{color:I},placeholder:(0,i.__)("Enter Description...","axvart")}),g&&(0,s.jsx)("div",{className:"axvart-card-btn-wrapper",children:(0,s.jsx)("span",{className:"axvart-card-btn",style:{color:H,backgroundColor:F},children:h})})]})]})},save:function({attributes:e}){const{title:t,description:o,titleTag:a,iconUrl:l,iconType:n,iconPreset:i,showButton:d,buttonText:c,buttonUrl:x,tiltMax:p,scale:g,enableFloatingIcon:u,floatSpeed:h,floatHeight:v,cardPadding:m,cardRadius:b,cardBgColor:f,cardBgGradient:y,cardBorderWidth:_,cardBorderColor:C,shadowColor:j,shadowIntensity:S,alignment:w,textColor:k,descColor:B,iconColor:T,iconSize:$,buttonTextColor:N,buttonBgColor:P}=e,I=r.useBlockProps.save({className:"axvart-3d-tilt-card-wrapper",style:{display:"flex",justifyContent:"left"===w?"flex-start":"right"===w?"flex-end":"center","--axvart-tilt-max":`${p}deg`,"--axvart-tilt-scale":g,"--axvart-float-speed":`${h}s`,"--axvart-float-height":`${v}px`}}),z={padding:`${m}px`,borderRadius:`${b}px`,background:y||f,border:`${_}px solid ${C}`,boxShadow:`0 4px 6px ${j}`,textAlign:w},R={width:`${$}px`,height:`${$}px`,fill:T,color:T,animation:u?`axvartFloat ${h}s ease-in-out infinite`:"none"},H=a;return(0,s.jsx)("div",{...I,children:(0,s.jsxs)("div",{className:"axvart-3d-tilt-card",style:z,"data-tilt-max":p,"data-scale":g,"data-shadow-color":j,"data-shadow-intensity":S,children:[l&&"none"!==n&&(0,s.jsx)("div",{className:"axvart-card-icon",style:R,children:(0,s.jsx)("img",{src:l,alt:"Card Icon",style:{width:"100%",height:"100%",objectFit:"contain"}})}),(0,s.jsx)(H,{className:"axvart-card-title",style:{color:k},children:(0,s.jsx)(r.RichText.Content,{value:t})}),(0,s.jsx)("p",{className:"axvart-card-desc",style:{color:B},children:(0,s.jsx)(r.RichText.Content,{value:o})}),d&&(0,s.jsx)("div",{className:"axvart-card-btn-wrapper",children:(0,s.jsx)("a",{href:x,className:"axvart-card-btn",style:{color:N,backgroundColor:P},children:c})})]})})}});const xe=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/button-group","version":"1.0.0","title":"Button Group","category":"widgets","icon":"groups","description":"A group of customizable buttons with advanced layout controls.","textdomain":"axvart","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","supports":{"html":false,"anchor":true,"customClassName":true,"spacing":{"margin":true,"padding":true}},"attributes":{"layoutType":{"type":"string","default":"row"},"blockId":{"type":"string"},"orientation":{"type":"string","default":"horizontal"},"wrap":{"type":"boolean","default":true},"alignment":{"type":"string","default":"center"},"gap":{"type":"number","default":10},"widthType":{"type":"string","default":"auto"},"customWidth":{"type":"string","default":"100%"}}}'),pe=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"axvart/button-item","version":"1.0.0","title":"Button Item","category":"widgets","parent":["axvart/button-group"],"icon":"button","description":"A single customizable button.","textdomain":"axvart","supports":{"html":false,"reusable":false,"spacing":{"padding":true,"margin":true}},"attributes":{"label":{"type":"string","default":"Button"},"url":{"type":"string","default":"#"},"linkTarget":{"type":"string","default":"_self"},"iconUrl":{"type":"string","default":""},"iconId":{"type":"number","default":0},"iconPosition":{"type":"string","default":"left"},"normalStyles":{"type":"object","default":{"bgColor":"#007cba","textColor":"#ffffff","borderColor":"transparent","borderRadius":5,"iconColor":"currentColor"}},"hoverStyles":{"type":"object","default":{"bgColor":"#005a87","textColor":"#ffffff","borderColor":"transparent","iconColor":"currentColor"}},"isActive":{"type":"boolean","default":false},"activeStyles":{"type":"object","default":{"bgColor":"#004466","textColor":"#ffffff","borderColor":"transparent","iconColor":"currentColor"}},"padding":{"type":"object","default":{"top":10,"right":20,"bottom":10,"left":20}},"typography":{"type":"object","default":{"fontSize":16,"fontWeight":"bold"}},"iconSize":{"type":"number","default":18},"gap":{"type":"number","default":8},"isGlass":{"type":"boolean","default":false}}}');(0,j.registerBlockType)(pe.name,{...pe,edit:function({attributes:e,setAttributes:t}){const{label:o,url:a,linkTarget:l,iconUrl:d,iconId:c,iconPosition:x,normalStyles:p,hoverStyles:g,activeStyles:h,isActive:v,padding:m,typography:b,iconSize:f,gap:y,isGlass:_}=e,[C,j]=(0,u.useState)(!1),S=(o,a,l)=>{t({[o]:{...e[o],[a]:l}})},w=(0,r.useBlockProps)({className:"axvart-button-item",onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:`${y}px`,flexDirection:"right"===x?"row-reverse":"row","--btn-bg":p.bgColor,"--btn-text":p.textColor,"--btn-border":p.borderColor,"--btn-radius":`${p.borderRadius}px`,"--btn-padding":`${m.top}px ${m.right}px ${m.bottom}px ${m.left}px`,"--btn-font-size":`${b.fontSize}px`,"--btn-font-weight":b.fontWeight,"--btn-gap":`${y}px`,"--btn-icon-size":`${f}px`,"--btn-icon-color":p.iconColor,"--btn-hover-bg":g.bgColor,"--btn-hover-text":g.textColor,"--btn-hover-border":g.borderColor,"--btn-hover-icon-color":g.iconColor,"--btn-active-bg":h.bgColor,"--btn-active-text":h.textColor,"--btn-active-border":h.borderColor,"--btn-active-icon-color":h.iconColor,backgroundColor:v?h.bgColor:C?g.bgColor:p.bgColor,color:v?h.textColor:C?g.textColor:p.textColor,borderColor:v?h.borderColor:C?g.borderColor:p.borderColor,borderRadius:`${p.borderRadius}px`,padding:`${m.top}px ${m.right}px ${m.bottom}px ${m.left}px`,fontSize:`${b.fontSize}px`,fontWeight:b.fontWeight,cursor:"pointer",backdropFilter:_?"blur(10px)":"none",..._?{backgroundColor:v?"rgba(255, 255, 255, 0.4)":C?"rgba(255, 255, 255, 0.2)":"rgba(255, 255, 255, 0.1)"}:{}}});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Content","axvart"),children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Link URL","axvart"),value:a,onChange:e=>t({url:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Open in New Tab","axvart"),checked:"_blank"===l,onChange:e=>t({linkTarget:e?"_blank":"_self"})}),(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({iconUrl:e.url,iconId:e.id}),allowedTypes:["image"],value:c,render:({open:e})=>(0,s.jsx)(n.Button,{variant:"secondary",onClick:e,style:{marginBottom:"10px"},children:d?(0,i.__)("Replace Icon","axvart"):(0,i.__)("Upload Icon","axvart")})})}),d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Icon Position","axvart"),value:x,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:e=>t({iconPosition:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Size","axvart"),value:f,onChange:e=>t({iconSize:e}),min:10,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Icon Gap","axvart"),value:y,onChange:e=>t({gap:e}),min:0,max:50})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Styling","axvart"),children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Glassmorphism Effect","axvart"),checked:_,onChange:e=>t({isGlass:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:p.borderRadius,onChange:e=>S("normalStyles","borderRadius",e),min:0,max:50}),(0,s.jsx)(n.TabPanel,{className:"axvart-style-tabs",activeClass:"active-tab",tabs:[{name:"normal",title:"Normal",className:"tab-normal"},{name:"hover",title:"Hover",className:"tab-hover"},{name:"active",title:"Active",className:"tab-active"}],children:t=>{const o="normal"===t.name?"normalStyles":"hover"===t.name?"hoverStyles":"activeStyles",a=e[o];return(0,s.jsxs)("div",{style:{marginTop:"15px"},children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:"Background Color"})}),(0,s.jsx)(n.ColorPalette,{value:a.bgColor,onChange:e=>S(o,"bgColor",e)}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:"Text Color"})}),(0,s.jsx)(n.ColorPalette,{value:a.textColor,onChange:e=>S(o,"textColor",e)}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:"Border Color"})}),(0,s.jsx)(n.ColorPalette,{value:a.borderColor,onChange:e=>S(o,"borderColor",e)}),(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:"Icon Color"})}),(0,s.jsx)(n.ColorPalette,{value:a.iconColor,onChange:e=>S(o,"iconColor",e)})]})}})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography & Padding","axvart"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Font Size","axvart"),value:b.fontSize,onChange:e=>t({typography:{...b,fontSize:e}}),min:10,max:100}),(0,s.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"10px"},children:[(0,s.jsx)(n.TextControl,{label:"Top",type:"number",value:m.top,onChange:e=>t({padding:{...m,top:parseInt(e)}})}),(0,s.jsx)(n.TextControl,{label:"Right",type:"number",value:m.right,onChange:e=>t({padding:{...m,right:parseInt(e)}})}),(0,s.jsx)(n.TextControl,{label:"Bottom",type:"number",value:m.bottom,onChange:e=>t({padding:{...m,bottom:parseInt(e)}})}),(0,s.jsx)(n.TextControl,{label:"Left",type:"number",value:m.left,onChange:e=>t({padding:{...m,left:parseInt(e)}})})]})]})]}),(0,s.jsxs)("a",{...w,onClick:e=>e.preventDefault(),children:[d&&(0,s.jsx)("div",{className:"axvart-btn-icon",style:{width:f,height:f,WebkitMaskImage:`url(${d})`,maskImage:`url(${d})`,backgroundColor:v?h.iconColor:C?g.iconColor:p.iconColor,WebkitMaskSize:"contain",maskSize:"contain",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",WebkitMaskPosition:"center",maskPosition:"center"}}),(0,s.jsx)(r.RichText,{tagName:"span",value:o,onChange:e=>t({label:e}),placeholder:(0,i.__)("Button Text","axvart"),allowedFormats:[]})]})]})},save:function({attributes:e}){const{label:t,url:o,linkTarget:a,iconUrl:l,iconPosition:n,normalStyles:i,hoverStyles:d,activeStyles:c,isActive:x,padding:p,typography:g,iconSize:u,gap:h,isGlass:v}=e,m=r.useBlockProps.save({className:`axvart-button-item ${v?"is-glass":""} ${x?"is-active":""}`,style:{"--btn-bg":i.bgColor,"--btn-text":i.textColor,"--btn-border":i.borderColor,"--btn-hover-bg":d.bgColor,"--btn-hover-text":d.textColor,"--btn-hover-border":d.borderColor,"--btn-active-bg":c.bgColor,"--btn-active-text":c.textColor,"--btn-active-border":c.borderColor,"--btn-radius":`${i.borderRadius}px`,"--btn-padding":`${p.top}px ${p.right}px ${p.bottom}px ${p.left}px`,"--btn-font-size":`${g.fontSize}px`,"--btn-font-weight":g.fontWeight,"--btn-gap":`${h}px`,"--btn-icon-size":`${u}px`,"--btn-icon-color":i.iconColor,"--btn-hover-icon-color":d.iconColor,"--btn-active-icon-color":c.iconColor,flexDirection:"right"===n?"row-reverse":"row"}});return(0,s.jsxs)("a",{href:o,target:a,rel:"noopener noreferrer",...m,children:[l&&(0,s.jsx)("div",{className:"axvart-btn-icon",style:{WebkitMaskImage:`url(${l})`,maskImage:`url(${l})`}}),(0,s.jsx)(r.RichText.Content,{tagName:"span",className:"axvart-btn-label",value:t})]})}}),(0,j.registerBlockType)(xe.name,{...xe,edit:function({attributes:e,setAttributes:t,clientId:o}){const{layoutType:a,orientation:l,wrap:d,alignment:c,gap:x,widthType:p,customWidth:g,blockId:h}=e;(0,u.useEffect)(()=>{h||t({blockId:o})},[o]);const v=(0,r.useBlockProps)({className:`axvart-button-group axvart-block-${h}`,style:{display:"flex",flexDirection:"vertical"===l?"column":"row",flexWrap:d?"wrap":"nowrap",justifyContent:"vertical"===l?"center"===c?"center":"right"===c?"flex-end":"flex-start":"space-between"===c?"space-between":"center"===c?"center":"right"===c?"flex-end":"flex-start",alignItems:"vertical"===l?"center"===c?"center":"right"===c?"flex-end":"flex-start":"center",gap:`${x}px`,width:"custom"===p?g:"full"===p?"100%":"auto"}}),m=(0,r.useInnerBlocksProps)(v,{allowedBlocks:["axvart/button-item"],orientation:l,template:[["axvart/button-item",{label:"Button 1"}],["axvart/button-item",{label:"Button 2"}]]});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.InspectorControls,{children:(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Layout Settings","axvart"),children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Orientation","axvart"),value:l,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:e=>t({orientation:e})}),"horizontal"===l&&(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Wrap Items","axvart"),checked:d,onChange:e=>t({wrap:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Alignment","axvart"),value:c,options:[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"},{label:"Space Between",value:"space-between"}],onChange:e=>t({alignment:e})}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Container Width","axvart"),value:p,options:[{label:"Auto",value:"auto"},{label:"Full Width",value:"full"},{label:"Custom",value:"custom"}],onChange:e=>t({widthType:e})}),"custom"===p&&(0,s.jsxs)("div",{style:{marginBottom:"10px"},children:[(0,s.jsx)("label",{children:(0,i.__)("Custom Width","axvart")}),(0,s.jsx)("input",{type:"text",value:g,onChange:e=>t({customWidth:e.target.value}),placeholder:"100% or 500px",style:{width:"100%",padding:"6px"}})]}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Gap","axvart"),value:x,onChange:e=>t({gap:e}),min:0,max:100})]})}),(0,s.jsx)("div",{...m})]})},save:function({attributes:e}){const{orientation:t,wrap:o,alignment:a,gap:l,widthType:n,customWidth:i,blockId:d}=e,c=r.useBlockProps.save({className:`axvart-button-group axvart-block-${d}`,style:{display:"flex",flexDirection:"vertical"===t?"column":"row",flexWrap:o?"wrap":"nowrap",justifyContent:"vertical"===t?"center"===a?"center":"right"===a?"flex-end":"flex-start":"space-between"===a?"space-between":"center"===a?"center":"right"===a?"flex-end":"flex-start",alignItems:"vertical"===t?"center"===a?"center":"right"===a?"flex-end":"flex-start":"center",gap:`${l}px`,width:"custom"===n?i:"full"===n?"100%":"auto"}}),x=r.useInnerBlocksProps.save(c);return(0,s.jsx)("div",{...x})}});const{registerBlockType:ge}=wp.blocks;ge("axvart/modern-video-block",{apiVersion:3,edit:({attributes:e,setAttributes:t})=>{const{sourceType:o,videoURL:a,videoMP4:l,videoWebM:d,videoRemoteURL:c,posterImage:x,posterImageId:p,aspectRatio:g,customAspectWidth:u,customAspectHeight:h,alignment:v,maxWidth:m,overlayType:b,overlayColor:f,overlayGradient:y,overlayOpacity:_,overlayBlur:C,title:j,subtitle:S,contentAlignment:w,titleColor:k,subtitleColor:B,titleSize:T,subtitleSize:$,playIcon:N,playSize:P,playColor:I,playBgColor:z,playAnimation:R,showPlayButton:H,lazyLoad:F,autoplay:L,loop:M,muted:E,controls:W,borderRadius:O,boxShadow:A,shadowColor:D,shadowBlur:G,shadowOffsetX:U,shadowOffsetY:q,brightness:V,contrast:Y,saturation:X}=e,[J=[]]=(0,r.useSettings)("color.palette"),K=e=>e&&(e=>"string"==typeof e&&e.startsWith("var:preset|color|"))(e)?`var(--wp--preset--color--${e.split("|").pop()})`:e,Q=e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},Z=(0,r.useBlockProps)({className:"modern-video-block-editor",style:{textAlign:v}}),ee={maxWidth:m||"100%",margin:"center"===v?"0 auto":"right"===v?"0 0 0 auto":"0",borderRadius:`${O}px`,boxShadow:A?`${U}px ${q}px ${G}px ${D}`:"none",filter:`brightness(${V}%) contrast(${Y}%) saturate(${X}%)`,overflow:"hidden",position:"relative"},te={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",justifyContent:w,alignItems:"center",padding:"2rem",zIndex:2,pointerEvents:"none"};return"color"===b?(te.backgroundColor=K(f),te.opacity=_):"gradient"===b?te.background=y||"linear-gradient(to bottom, rgba(0,0,0,0.7), transparent)":"blur"===b&&(te.backdropFilter=`blur(${C}px)`,te.backgroundColor=`${K(f)}${Math.round(255*_).toString(16)}`),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Video Source","axvart"),initialOpen:!0,children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Source Type","axvart"),value:o,options:[{label:(0,i.__)("YouTube","axvart"),value:"youtube"},{label:(0,i.__)("Vimeo","axvart"),value:"vimeo"},{label:(0,i.__)("Self-hosted","axvart"),value:"self"}],onChange:e=>t({sourceType:e})}),("youtube"===o||"vimeo"===o)&&(0,s.jsx)(n.TextControl,{label:"youtube"===o?(0,i.__)("YouTube URL","axvart"):(0,i.__)("Vimeo URL","axvart"),value:a,onChange:e=>t({videoURL:e}),help:(0,i.__)("Enter the video URL","axvart")}),"self"===o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Remote Video URL","axvart"),value:c,onChange:e=>t({videoRemoteURL:e}),help:(0,i.__)("Enter direct video URL (e.g., https://example.com/video.mp4)","axvart"),placeholder:"https://"}),(0,s.jsx)("p",{style:{margin:"12px 0",fontSize:"13px",color:"#757575"},children:(0,i.__)("OR upload a video file:","axvart")}),(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({videoMP4:e.url}),allowedTypes:["video"],value:l,render:({open:e})=>(0,s.jsx)(n.Button,{variant:"secondary",onClick:e,children:l?(0,i.__)("Change MP4 Video","axvart"):(0,i.__)(" Select MP4 Video","axvart")})})}),(0,s.jsx)(r.MediaUploadCheck,{children:(0,s.jsx)(r.MediaUpload,{onSelect:e=>t({posterImage:e.url,posterImageId:e.id}),allowedTypes:["image"],value:p,render:({open:e})=>(0,s.jsx)(n.Button,{variant:"secondary",onClick:e,style:{marginTop:"8px"},children:x?(0,i.__)("Change Poster Image","axvart"):(0,i.__)("Select Poster Image","axvart")})})})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Layout","axvart"),children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Aspect Ratio","axvart"),value:g,options:[{label:"16:9",value:"16:9"},{label:"4:3",value:"4:3"},{label:"1:1",value:"1:1"},{label:"21:9",value:"21:9"},{label:(0,i.__)("Custom","axvart"),value:"custom"}],onChange:e=>t({aspectRatio:e})}),"custom"===g&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Width Ratio","axvart"),value:u,onChange:e=>t({customAspectWidth:e}),min:1,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Height Ratio","axvart"),value:h,onChange:e=>t({customAspectHeight:e}),min:1,max:50})]}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Alignment","axvart"),value:v,options:[{label:(0,i.__)("Left","axvart"),value:"left"},{label:(0,i.__)("Center","axvart"),value:"center"},{label:(0,i.__)("Right","axvart"),value:"right"}],onChange:e=>t({alignment:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Max Width","axvart"),value:m,onChange:e=>t({maxWidth:e}),help:(0,i.__)("e.g., 800px, 90%, leave empty for full width","axvart")})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Overlay","axvart"),children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Overlay Type","axvart"),value:b,options:[{label:(0,i.__)("None","axvart"),value:"none"},{label:(0,i.__)("Color","axvart"),value:"color"},{label:(0,i.__)("Gradient","axvart"),value:"gradient"},{label:(0,i.__)("Blur + Color","axvart"),value:"blur"}],onChange:e=>t({overlayType:e})}),"none"!==b&&(0,s.jsxs)(s.Fragment,{children:["gradient"===b&&(0,s.jsx)(n.TextControl,{label:(0,i.__)("Gradient CSS","axvart"),value:y,onChange:e=>t({overlayGradient:e}),help:(0,i.__)("e.g., linear-gradient(to bottom, rgba(0,0,0,0.7), transparent)","axvart")}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Overlay Opacity","axvart"),value:_,onChange:e=>t({overlayOpacity:e}),min:0,max:1,step:.1}),"blur"===b&&(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Blur Amount","axvart"),value:C,onChange:e=>t({overlayBlur:e}),min:0,max:50})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Play Button","axvart"),children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Play Button","axvart"),checked:H,onChange:e=>t({showPlayButton:e})}),H&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Button Size","axvart"),value:P,onChange:e=>t({playSize:e}),min:32,max:128}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Animation","axvart"),value:R,options:[{label:(0,i.__)("None","axvart"),value:"none"},{label:(0,i.__)("Pulse","axvart"),value:"pulse"},{label:(0,i.__)("Zoom","axvart"),value:"zoom"},{label:(0,i.__)("Glow","axvart"),value:"glow"}],onChange:e=>t({playAnimation:e})})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Content Overlay","axvart"),children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Title","axvart"),value:j,onChange:e=>t({title:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Subtitle","axvart"),value:S,onChange:e=>t({subtitle:e})}),(j||S)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Content Position","axvart"),value:w,options:[{label:(0,i.__)("Top","axvart"),value:"flex-start"},{label:(0,i.__)("Center","axvart"),value:"center"},{label:(0,i.__)("Bottom","axvart"),value:"flex-end"}],onChange:e=>t({contentAlignment:e})}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Title Size","axvart"),value:T,onChange:e=>t({titleSize:e}),min:16,max:120}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Subtitle Size","axvart"),value:$,onChange:e=>t({subtitleSize:e}),min:12,max:48})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Video Behavior","axvart"),children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Lazy Load","axvart"),checked:F,onChange:e=>t({lazyLoad:e}),help:(0,i.__)("Load video only when visible in viewport","axvart")}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Autoplay","axvart"),checked:L,onChange:e=>t({autoplay:e}),help:(0,i.__)("Automatically play video (muted by default)","axvart")}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Loop","axvart"),checked:M,onChange:e=>t({loop:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Muted","axvart"),checked:E,onChange:e=>t({muted:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Controls","axvart"),checked:W,onChange:e=>t({controls:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Styling","axvart"),children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius","axvart"),value:O,onChange:e=>t({borderRadius:e}),min:0,max:50}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Box Shadow","axvart"),checked:A,onChange:e=>t({boxShadow:e})}),A&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Shadow Blur","axvart"),value:G,onChange:e=>t({shadowBlur:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Shadow Offset Y","axvart"),value:q,onChange:e=>t({shadowOffsetY:e}),min:-50,max:50})]}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Brightness","axvart"),value:V,onChange:e=>t({brightness:e}),min:0,max:200}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Contrast","axvart"),value:Y,onChange:e=>t({contrast:e}),min:0,max:200}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Saturation","axvart"),value:X,onChange:e=>t({saturation:e}),min:0,max:200})]})]}),(0,s.jsx)("div",{...Z,children:(0,s.jsx)("div",{className:"modern-video-container",style:ee,children:(0,s.jsxs)("div",{className:"video-aspect-ratio",style:{paddingBottom:"custom"===g?h/u*100+"%":{"16:9":"56.25%","4:3":"75%","1:1":"100%","21:9":"42.86%"}[g]||"56.25%"},children:["youtube"===o&&a&&Q(a)?(0,s.jsx)("div",{className:"video-placeholder",children:(0,s.jsx)("img",{src:`https://img.youtube.com/vi/${Q(a)}/maxresdefault.jpg`,alt:j||(0,i.__)("YouTube Video","axvart"),style:{width:"100%",height:"100%",objectFit:"cover"}})}):"vimeo"===o&&a?(0,s.jsx)("div",{className:"video-placeholder",style:{background:"#1ab7ea",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:"24px"},children:"Vimeo Video Preview"}):"self"===o&&(l||c||x)?(0,s.jsx)("div",{className:"video-placeholder",children:x&&(0,s.jsx)("img",{src:x,alt:j||(0,i.__)("Video","axvart"),style:{width:"100%",height:"100%",objectFit:"cover"}})}):(0,s.jsx)("div",{className:"video-placeholder",style:{background:"#f0f0f0",display:"flex",alignItems:"center",justifyContent:"center",color:"#666",fontSize:"16px"},children:(0,i.__)("Select a video source","axvart")}),"none"!==b&&(0,s.jsxs)("div",{className:"video-overlay",style:te,children:[j&&(0,s.jsx)("h2",{style:{color:K(k),fontSize:`${T}px`,margin:"0 0 0.5rem",pointerEvents:"auto"},children:j}),S&&(0,s.jsx)("p",{style:{color:K(B),fontSize:`${$}px`,margin:0,pointerEvents:"auto"},children:S})]}),H&&(0,s.jsx)("div",{className:`play-button play-button-${R}`,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:3,width:`${P}px`,height:`${P}px`,borderRadius:"50%",background:z,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:K(I)},children:(0,s.jsx)("svg",{width:"50%",height:"50%",viewBox:"0 0 24 24",fill:"currentColor",children:(0,s.jsx)("path",{d:"M8 5v14l11-7z"})})})]})})})]})},save:({attributes:e})=>{const{sourceType:t,videoURL:o,videoMP4:a,videoRemoteURL:l,posterImage:n,aspectRatio:i,customAspectWidth:d,customAspectHeight:c,alignment:x,maxWidth:p,overlayType:g,overlayColor:u,overlayGradient:h,overlayOpacity:v,overlayBlur:m,title:b,subtitle:f,contentAlignment:y,titleColor:_,subtitleColor:C,titleSize:j,subtitleSize:S,playSize:w,playColor:k,playBgColor:B,playAnimation:T,showPlayButton:$,lazyLoad:N,autoplay:P,loop:I,muted:z,controls:R,borderRadius:H,boxShadow:F,shadowColor:L,shadowBlur:M,shadowOffsetX:E,shadowOffsetY:W,brightness:O,contrast:A,saturation:D}=e,G=e=>e&&(e=>"string"==typeof e&&e.startsWith("var:preset|color|"))(e)?`var(--wp--preset--color--${e.split("|").pop()})`:e,U=e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},q=e=>{const t=e.match(/vimeo.*\/(\d+)/i);return t?t[1]:null},V=r.useBlockProps.save({className:"modern-video-block",style:{textAlign:x}}),Y={"--video-max-width":p||"100%","--video-alignment":x,"--video-border-radius":`${H}px`,"--video-shadow":F?`${E}px ${W}px ${M}px ${L}`:"none","--video-brightness":`${O}%`,"--video-contrast":`${A}%`,"--video-saturation":`${D}%`,"--overlay-opacity":v,"--overlay-color":G(u),"--overlay-blur":`${m}px`,"--play-size":`${w}px`,"--play-color":G(k),"--play-bg":B,"--title-color":G(_),"--subtitle-color":G(C),"--title-size":`${j}px`,"--subtitle-size":`${S}px`};return(0,s.jsx)("div",{...V,children:(0,s.jsx)("div",{className:"modern-video-container",style:Y,"data-lazy-load":N,"data-autoplay":P,"data-source-type":t,children:(0,s.jsxs)("div",{className:"video-aspect-ratio",style:{paddingBottom:"custom"===i?c/d*100+"%":{"16:9":"56.25%","4:3":"75%","1:1":"100%","21:9":"42.86%"}[i]||"56.25%"},children:["youtube"===t&&o&&U(o)&&(0,s.jsx)("iframe",{className:"video-iframe",src:`https://www.youtube.com/embed/${U(o)}?${P?"autoplay=1&mute=1":""}${I?"&loop=1&playlist="+U(o):""}${R?"":"&controls=0"}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:b||"YouTube Video",loading:N?"lazy":"eager"}),"vimeo"===t&&o&&q(o)&&(0,s.jsx)("iframe",{className:"video-iframe",src:`https://player.vimeo.com/video/${q(o)}?${P?"autoplay=1&muted=1":""}${I?"&loop=1":""}${R?"":"&controls=0"}`,frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,title:b||"Vimeo Video",loading:N?"lazy":"eager"}),"self"===t&&(a||l)&&(0,s.jsx)("video",{className:"video-element",src:l||a,poster:n,controls:R,autoPlay:P,loop:I,muted:z,playsInline:!0,preload:N?"none":"metadata"}),"none"!==g&&(0,s.jsxs)("div",{className:`video-overlay overlay-${g} content-${y}`,style:{background:"gradient"===g?h:void 0},children:[b&&(0,s.jsx)("h2",{className:"overlay-title",children:b}),f&&(0,s.jsx)("p",{className:"overlay-subtitle",children:f})]}),$&&(0,s.jsx)("button",{className:`play-button play-button-${T}`,"aria-label":"Play video",type:"button",children:(0,s.jsx)("svg",{width:"50%",height:"50%",viewBox:"0 0 24 24",fill:"currentColor",children:(0,s.jsx)("path",{d:"M8 5v14l11-7z"})})})]})})})}}),(0,j.registerBlockType)("axvart/input-block",{apiVersion:3,edit:({attributes:e,setAttributes:t,clientId:o})=>{const{inputType:a,placeholder:l,borderRadius:d,borderWidth:c,borderColor:x,backgroundColor:p,textColor:g,padding:h,label:v,showLabel:m,fieldId:b}=e;(0,u.useEffect)(()=>{b||t({fieldId:`axvart-input-${o}`})},[o,b,t]);const f=(0,r.useBlockProps)(),[y=[]]=(0,r.useSettings)("color.palette"),_=e=>{if(!e)return e;if(e.startsWith("var(--wp--preset--color--")){const t=e.replace("var(--wp--preset--color--","").replace(")",""),o=y.find(e=>e.slug===t);return o?o.color:e}return e},C=e=>o=>{if(!o)return void t({[e]:""});const a=y.find(e=>e.color===o);t(a?{[e]:`var(--wp--preset--color--${a.slug})`}:{[e]:o})},j={borderRadius:`${d}px`,border:`${c}px solid ${x||"transparent"}`,backgroundColor:p,color:g,padding:`${h}px`,width:"100%",boxSizing:"border-box"};return(0,s.jsxs)("div",{...f,children:[(0,s.jsxs)(r.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Input Settings","axvart"),children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Input Type","axvart"),value:a,options:[{label:"Email",value:"email"},{label:"Text",value:"text"},{label:"URL",value:"url"},{label:"Tel",value:"tel"},{label:"Number",value:"number"}],onChange:e=>t({inputType:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Placeholder","axvart"),value:l,onChange:e=>t({placeholder:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Label","axvart"),checked:m,onChange:e=>t({showLabel:e})}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("Label Text","axvart"),value:v,onChange:e=>t({label:e}),help:(0,i.__)("Visible label for the input field. Also used for screen readers if hidden.","axvart")})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Style Settings","axvart"),children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Radius (px)","axvart"),value:d,onChange:e=>t({borderRadius:e}),min:0,max:100}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Border Width (px)","axvart"),value:c,onChange:e=>t({borderWidth:e}),min:0,max:10}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Padding (px)","axvart"),value:h,onChange:e=>t({padding:e}),min:0,max:50}),(0,s.jsx)("p",{className:"components-base-control__label",children:(0,i.__)("Border Color","axvart")}),(0,s.jsx)(n.ColorPalette,{value:_(x),onChange:C("borderColor"),colors:y,clearable:!0}),(0,s.jsx)("p",{className:"components-base-control__label",children:(0,i.__)("Background Color","axvart")}),(0,s.jsx)(n.ColorPalette,{value:_(p),onChange:C("backgroundColor"),colors:y,clearable:!0}),(0,s.jsx)("p",{className:"components-base-control__label",children:(0,i.__)("Text Color","axvart")}),(0,s.jsx)(n.ColorPalette,{value:_(g),onChange:C("textColor"),colors:y,clearable:!0})]})]}),(0,s.jsxs)("div",{className:"axvart-input-block-wrapper",children:[m&&(0,s.jsx)("label",{htmlFor:b,className:"axvart-input-label",children:v}),(0,s.jsx)("input",{type:"text",id:b,className:"axvart-input-field",placeholder:l,style:j,readOnly:!0,"aria-label":m?void 0:v})]})]})},save:({attributes:e})=>{const{inputType:t,placeholder:o,borderRadius:a,borderWidth:l,borderColor:n,backgroundColor:i,textColor:d,padding:c,label:x,showLabel:p,fieldId:g}=e,u=r.useBlockProps.save(),h={borderRadius:`${a}px`,border:`${l}px solid ${n||"transparent"}`,backgroundColor:i,color:d,padding:`${c}px`,width:"100%",boxSizing:"border-box"};return(0,s.jsx)("div",{...u,children:(0,s.jsxs)("div",{className:"axvart-input-block-wrapper",children:[p&&(0,s.jsx)("label",{htmlFor:g,className:"axvart-input-label",children:x}),(0,s.jsx)("input",{type:t,id:g,className:"axvart-input-field",placeholder:o,style:h,"aria-label":p?void 0:x})]})})},deprecated:[{attributes:{inputType:{type:"string",default:"email"},placeholder:{type:"string",default:"Email"},borderRadius:{type:"number",default:50},borderWidth:{type:"number",default:1},borderColor:{type:"string",default:"var(--wp--preset--color--accent-4)"},backgroundColor:{type:"string",default:"var(--wp--preset--color--base)"},textColor:{type:"string",default:"var(--wp--preset--color--accent-2)"},padding:{type:"number",default:15}},save:({attributes:e})=>{const{inputType:t,placeholder:o,borderRadius:a,borderWidth:l,borderColor:n,backgroundColor:i,textColor:d,padding:c}=e,x=r.useBlockProps.save(),p={borderRadius:`${a}px`,border:`${l}px solid ${n||"transparent"}`,backgroundColor:i,color:d,padding:`${c}px`,width:"100%",boxSizing:"border-box"};return(0,s.jsx)("div",{...x,children:(0,s.jsx)("div",{className:"axvart-input-block-wrapper",children:(0,s.jsx)("input",{type:t,className:"axvart-input-field",placeholder:o,style:p})})})}}]})},917(){document.addEventListener("DOMContentLoaded",function(){const e=document.querySelector(".skip-link"),t=document.getElementById("main-content");e&&t&&e.addEventListener("click",function(e){e.preventDefault(),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.focus(),t.addEventListener("blur",function(){t.removeAttribute("tabindex")},{once:!0})})})},942(e,t){var o;!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e="",t=0;t{if(!o){var n=1/0;for(c=0;c=r)&&Object.keys(a.O).every(e=>a.O[e](o[s]))?o.splice(s--,1):(i=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[o,l,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};a.O.j=t=>0===e[t];var t=(t,o)=>{var l,r,[n,i,s]=o,d=0;if(n.some(t=>0!==e[t])){for(l in i)a.o(i,l)&&(a.m[l]=i[l]);if(s)var c=s(a)}for(t&&t(o);da(744));l=a.O(l)})();