!function(){"use strict";var e={1513:function(e){var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,c,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var l in a=Object(arguments[i]))r.call(a,l)&&(s[l]=a[l]);if(t){c=t(a);for(var u=0;u<c.length;u++)n.call(a,c[u])&&(s[c[u]]=a[c[u]])}}return s}},3335:function(e,t,r){r(1513);var n=r(1609),o=60103;if("function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),a("react.fragment")}var c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var n,a={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,n)&&!i.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:u,props:a,_owner:c.current}}},1085:function(e,t,r){e.exports=r(3335)},1609:function(e){e.exports=window.React}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=window.wp.blocks,t=window.wp.primitives,n=r(1085),o=(0,n.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(t.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),a=window.wp.blockEditor,c=window.wp.i18n,s=r(1609),i=r.n(s);function l(e){let{name:t,...r}=e;const[n,o]=(0,s.useState)(null),a=window?.scData?.plugin_url+"/dist/icon-assets";if((0,s.useEffect)((()=>{fetch(`${a}/${t}.svg`).then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"image/svg+xml");o(t?.documentElement)})).catch(console.error)}),[t]),!n)return null;const c={...Array.from(n.attributes).reduce(((e,t)=>(e[t.name.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))]=t.value,e)),{}),...r};return i().createElement(n.tagName,{...c,dangerouslySetInnerHTML:{__html:n.innerHTML}})}var u=JSON.parse('{"UU":"surecart/product-list-filter-tag"}');(0,e.registerBlockType)(u.UU,{icon:o,edit:e=>{let{context:{"surecart/filterTag/name":t},__unstableLayoutClassNames:r}=e;const n=(0,a.useBlockProps)({className:"sc-tag sc-tag--default sc-tag--medium"+r,role:"button"});return React.createElement("div",n,React.createElement("span",{className:"tag__content"},t),React.createElement(l,{name:"x",className:"sc-tag__clear","aria-label":(0,c.__)("Remove tag","surecart")}))}})}()}();