/home/ramtczxy/fordtruckpartsshop.com/wp-content/plugins/wordpress-seo/js/dist/how-to-block.js
(()=>{var e={885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")},8276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,d=(e=(0,r.escapeSpecialCharacters)(e)).match(a),h=d&&d[1]?d[1].toLowerCase():"";switch(h){case o:var m=p(e);return l.test(e)||null===(t=null==(y=m.querySelector(i))?void 0:y.parentNode)||void 0===t||t.removeChild(y),c.test(e)||null===(n=null==(y=m.querySelector(s))?void 0:y.parentNode)||void 0===n||n.removeChild(y),m.querySelectorAll(o);case i:case s:var g=u(e).querySelectorAll(h);return c.test(e)&&l.test(e)?g[0].parentNode.childNodes:g;default:return f?f(e):(y=u(e,s).querySelector(s)).childNodes;var y}};var r=n(1507),o="html",i="head",s="body",a=/<([a-zA-Z]+[0-9]?)/,l=/<head[^]*>/i,c=/<body[^]*>/i,u=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},p=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},d="object"==typeof window&&window.DOMParser;if("function"==typeof d){var h=new d;u=p=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),h.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var m=document.implementation.createHTMLDocument();u=function(e,t){if(t){var n=m.documentElement.querySelector(t);return n&&(n.innerHTML=e),m}return m.documentElement.innerHTML=e,m}}var f,g="object"==typeof document&&document.createElement("template");g&&g.content&&(f=function(e){return g.innerHTML=e,g.content.childNodes})},4152:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(8276)),i=n(1507),s=/<(![a-zA-Z\s]+)>/},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.escapeSpecialCharacters=function(e){return e.replace(o.CARRIAGE_RETURN_REGEX,o.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=a,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var l,c=[],u=0,p=t.length;u<p;u++){var d=t[u];switch(d.nodeType){case 1:var h=s(d.nodeName);(l=new r.Element(h,i(d.attributes))).children=e("template"===h?d.content.childNodes:d.childNodes,l);break;case 3:l=new r.Text(a(d.nodeValue));break;case 8:l=new r.Comment(d.nodeValue);break;default:continue}var m=c[u-1]||null;m&&(m.next=l),l.parent=n,l.prev=m,l.next=null,c.push(l)}return o&&((l=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=c[0]||null,l.parent=n,c.unshift(l),c[1]&&(c[1].prev=c[0])),c};var r=n(4584),o=n(885);function i(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function s(e){return function(e){return o.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}function a(e){return e.replace(o.CARRIAGE_RETURN_PLACEHOLDER_REGEX,o.CARRIAGE_RETURN)}},1953:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},4584:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(1953),s=n(1642);o(n(1642),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new s.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},1642:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=n(1953),a=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),T(this,e)},e}();t.Node=a;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(a);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var p=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=s.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=p;var d=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=d;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=h;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=m;var f=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function v(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function x(e){return e.type===s.ElementType.Directive}function w(e){return e.type===s.ElementType.Root}function T(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?C(e.children):[],o=new f(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(y(e)){r=t?C(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),n=s}else if(w(e)){r=t?C(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!x(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function C(e){for(var t=e.map((function(e){return T(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=f,t.isTag=g,t.isCDATA=y,t.isText=v,t.isComment=b,t.isDirective=x,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=T},484:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var p=e[u];if((0,r.isCustomAttribute)(u))n[u]=p;else{var d=u.toLowerCase(),h=l(d);if(h){var m=(0,r.getPropertyInfo)(h);switch(i.includes(h)&&s.includes(t)&&!c&&(h=l("default"+d)),n[h]=p,m&&m.type){case r.BOOLEAN:n[h]=!0;break;case r.OVERLOADED_BOOLEAN:""===p&&(n[h]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=p)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(5726),o=n(4606),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}},3670:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||a,p=u.cloneElement,d=u.createElement,h=u.isValidElement,m=t.length,f=0;f<m;f++){var g=t[f];if(o){var y=n.replace(g,f);if(h(y)){m>1&&(y=p(y,{key:y.key||f})),r.push(c(y,g,f));continue}}if("text"!==g.type){var v=g,b={};l(v)?((0,s.setStyleProp)(v.attribs.style,v.attribs),b=v.attribs):v.attribs&&(b=(0,i.default)(v.attribs,v.name));var x=void 0;switch(g.type){case"script":case"style":g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?b.defaultValue=g.children[0].data:g.children&&g.children.length&&(x=e(g.children,n));break;default:continue}m>1&&(b.key=f),r.push(c(d(g.name,b,x),g,f))}else{var w=!g.data.trim().length;if(w&&g.parent&&!(0,s.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&w)continue;r.push(c(g.data,g,f))}}return 1===r.length?r[0]:r};var o=n(9196),i=r(n(484)),s=n(4606),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},3426:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var o=r(n(4152));t.htmlToDOM=o.default;var i=r(n(484));t.attributesToProps=i.default;var s=r(n(3670));t.domToReact=s.default;var a=n(7384);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1}},4606:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}};var o=n(9196),i=r(n(1476)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8908:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7384:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(8908),s=n(5079);o(n(5079),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new s.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},5079:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=n(8908),a=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),T(this,e)},e}();t.Node=a;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(a);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var p=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=s.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=p;var d=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=d;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=h;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=m;var f=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function v(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function x(e){return e.type===s.ElementType.Directive}function w(e){return e.type===s.ElementType.Root}function T(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?C(e.children):[],o=new f(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(y(e)){r=t?C(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),n=s}else if(w(e)){r=t?C(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!x(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function C(e){for(var t=e.map((function(e){return T(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=f,t.isTag=g,t.isCDATA=y,t.isText=v,t.isComment=b,t.isDirective=x,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=T},5321:e=>{"use strict";var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var p=1,d=1;function h(e){var t=e.match(n);t&&(p+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function m(){var e={line:p,column:d};return function(t){return t.position=new f(e),v(),t}}function f(e){this.start=e,this.end={line:p,column:d},this.source=l.source}function g(t){var n=new Error(l.source+":"+p+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=p,n.column=d,n.source=e,!l.silent)throw n}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function v(){y(r)}function b(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,h(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function w(){var e=m(),n=y(o);if(n){if(x(),!y(i))return g("property missing ':'");var r=y(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(a),l}}return f.prototype.content=e,v(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}},5726:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(5174)),o=n(6678);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(i,l)).replace(r,a))}},5174:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,o.default)(e),i="function"==typeof t;return r.forEach((e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;i?t(r,o,e):o&&(n=n||{},n[r]=o)})),n};const o=r(n(5321))},9196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{legacySave:()=>M,migrateToStringFormat:()=>P,needsMigration:()=>I});const t=window.wp.blockEditor,r=window.wp.blocks,o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"version":"22.7","name":"yoast/how-to-block","title":"Yoast How-to","description":"Create a How-to guide in an SEO-friendly way. You can only use one How-to block per post.","category":"yoast-structured-data-blocks","icon":"editor-ol","keywords":["How-to","How to","Schema","SEO","Structured Data"],"supports":{"multiple":false},"textdomain":"wordpress-seo","attributes":{"hasDuration":{"type":"boolean"},"days":{"type":"string"},"hours":{"type":"string"},"minutes":{"type":"string"},"description":{"type":"string","source":"html","selector":".schema-how-to-description"},"jsonDescription":{"type":"string"},"steps":{"type":"array"},"additionalListCssClasses":{"type":"string"},"unorderedList":{"type":"boolean"},"durationText":{"type":"string"},"defaultDurationText":{"type":"string"}},"example":{"attributes":{"steps":[{"id":"how-to-step-example-1","name":"","text":"","images":[]},{"id":"how-to-step-example-2","name":"","text":"","images":[]}]}},"editorScript":"yoast-seo-how-to-block","editorStyle":"yoast-seo-structured-data-blocks"}'),i=window.yoast.propTypes;var s=n.n(i);const a=window.wp.i18n,l=window.wp.a11y,c=window.lodash,u=window.wp.element,p=window.ReactJSXRuntime,d=function(e){return class extends u.Component{render(){return(0,p.jsxs)(u.Fragment,{children:[(0,p.jsx)(e,{...this.props})," "]})}}},h=window.wp.isShallowEqual,m=window.wp.components,f=e=>Array.isArray(e)?e.map((e=>e?"string"==typeof e?e:(0,u.renderToString)(e):"")).join(""):e;var g=n(3426);const y=g.default||g,v=e=>{if("string"!=typeof e||!e.includes("<img"))return[];const t=[...e.matchAll(/<img\b[^>]*\bsrc=["']([^"']+)["'][^>]*>/gi)],n=[];return t.forEach((e=>{const t=e[0],r=y(t);n.push(r)})),n},b=e=>{if(Array.isArray(e))return(e=>{var t;const n=e.find((e=>"img"===(null==e?void 0:e.type)));return(null==n||null===(t=n.props)||void 0===t?void 0:t.src)||!1})(e);if("string"==typeof e){var t;const n=v(e);return 0!==n.length&&((null===(t=n[0].props)||void 0===t?void 0:t.src)||!1)}return!1},x=d(t.RichText.Content);class w extends u.Component{constructor(e){super(e),this.onSelectImage=this.onSelectImage.bind(this),this.onInsertStep=this.onInsertStep.bind(this),this.onRemoveStep=this.onRemoveStep.bind(this),this.onMoveStepUp=this.onMoveStepUp.bind(this),this.onMoveStepDown=this.onMoveStepDown.bind(this),this.onFocusText=this.onFocusText.bind(this),this.onFocusTitle=this.onFocusTitle.bind(this),this.onChangeTitle=this.onChangeTitle.bind(this),this.onChangeText=this.onChangeText.bind(this)}onInsertStep(){this.props.insertStep(this.props.index)}onRemoveStep(){this.props.removeStep(this.props.index)}onMoveStepUp(){this.props.isFirst||this.props.onMoveUp(this.props.index)}onMoveStepDown(){this.props.isLast||this.props.onMoveDown(this.props.index)}onFocusTitle(){this.props.onFocus(this.props.index,"name")}onFocusText(){this.props.onFocus(this.props.index,"text")}onChangeTitle(e){const{onChange:t,index:n,step:{text:r,name:o}}=this.props;t(e,r,o,r,n)}onChangeText(e){const{onChange:t,index:n,step:{text:r,name:o}}=this.props;t(o,e,o,r,n)}getMediaUploadButton(e){return(0,p.jsx)(m.Button,{className:"schema-how-to-step-button how-to-step-add-media",icon:"insert",onClick:e.open,children:(0,a.__)("Add image","wordpress-seo")})}getButtons(){const{step:e}=this.props;return(0,p.jsxs)("div",{className:"schema-how-to-step-button-container",children:[!b(e.text)&&(0,p.jsx)(t.MediaUpload,{onSelect:this.onSelectImage,allowedTypes:["image"],value:e.id,render:this.getMediaUploadButton}),(0,p.jsx)(m.Button,{className:"schema-how-to-step-button",icon:"trash",label:(0,a.__)("Delete step","wordpress-seo"),onClick:this.onRemoveStep}),(0,p.jsx)(m.Button,{className:"schema-how-to-step-button",icon:"insert",label:(0,a.__)("Insert step","wordpress-seo"),onClick:this.onInsertStep})]})}getMover(){return(0,p.jsxs)("div",{className:"schema-how-to-step-mover",children:[(0,p.jsx)(m.Button,{className:"editor-block-mover__control",onClick:this.onMoveStepUp,icon:"arrow-up-alt2",label:(0,a.__)("Move step up","wordpress-seo"),"aria-disabled":this.props.isFirst}),(0,p.jsx)(m.Button,{className:"editor-block-mover__control",onClick:this.onMoveStepDown,icon:"arrow-down-alt2",label:(0,a.__)("Move step down","wordpress-seo"),"aria-disabled":this.props.isLast})]})}onSelectImage(e){const{index:t,step:{name:n,text:r}}=this.props,o=(0,p.jsx)("img",{className:`wp-image-${e.id}`,alt:e.alt||"",src:e.url,style:{maxWidth:"100%"}}),i=(r||"")+(0,u.renderToString)(o);this.props.onChange(n,i,n,r,t)}shouldComponentUpdate(e){return!(0,h.isShallowEqualObjects)(e,this.props)}static Content(e){const{name:t,text:n,id:r}=e,o=Array.isArray(t)?f(t):t,i=Array.isArray(n)?f(n):n;return(0,p.jsxs)("li",{className:"schema-how-to-step",id:r,children:[(0,p.jsx)(x,{tagName:"strong",className:"schema-how-to-step-name",value:o},r+"-name"),(0,p.jsx)(x,{tagName:"p",className:"schema-how-to-step-text",value:i},r+"-text")]},r)}render(){const{index:e,step:n,isSelected:r,isUnorderedList:o}=this.props,{id:i,name:s,text:l}=n;return(0,p.jsxs)("li",{className:"schema-how-to-step",children:[(0,p.jsx)("span",{className:"schema-how-to-step-number",children:o?"•":e+1+"."}),(0,p.jsx)(t.RichText,{identifier:`${i}-name`,className:"schema-how-to-step-name",tagName:"p",value:s,onChange:this.onChangeTitle,onFocus:this.onFocusTitle,placeholder:(0,a.__)("Enter a step title","wordpress-seo"),allowedFormats:["core/italic","core/strikethrough","core/link","core/annotation"]},`${i}-name`),(0,p.jsx)(t.RichText,{identifier:`${i}-text`,className:"schema-how-to-step-text",tagName:"p",value:l,onChange:this.onChangeText,onFocus:this.onFocusText,placeholder:(0,a.__)("Enter a step description","wordpress-seo")},`${i}-text`),r&&(0,p.jsxs)("div",{className:"schema-how-to-step-controls-container",children:[this.getMover(),this.getButtons()]})]},i)}}function T(e,t=0){return parseInt(e,10)||t}w.propTypes={index:s().number.isRequired,step:s().object.isRequired,onChange:s().func.isRequired,insertStep:s().func.isRequired,removeStep:s().func.isRequired,onFocus:s().func.isRequired,onMoveUp:s().func.isRequired,onMoveDown:s().func.isRequired,isSelected:s().bool.isRequired,isFirst:s().bool.isRequired,isLast:s().bool.isRequired,isUnorderedList:s().bool},w.defaultProps={isUnorderedList:!1};var C=n(9196);const S=d(t.RichText.Content);class E extends u.Component{constructor(e){super(e),this.state={focus:""},this.changeStep=this.changeStep.bind(this),this.insertStep=this.insertStep.bind(this),this.removeStep=this.removeStep.bind(this),this.swapSteps=this.swapSteps.bind(this),this.setFocus=this.setFocus.bind(this),this.addCSSClasses=this.addCSSClasses.bind(this),this.getListTypeHelp=this.getListTypeHelp.bind(this),this.toggleListType=this.toggleListType.bind(this),this.setDurationText=this.setDurationText.bind(this),this.setFocusToStep=this.setFocusToStep.bind(this),this.moveStepUp=this.moveStepUp.bind(this),this.moveStepDown=this.moveStepDown.bind(this),this.focusDescription=this.focusDescription.bind(this),this.addDuration=this.addDuration.bind(this),this.removeDuration=this.removeDuration.bind(this),this.onChangeDescription=this.onChangeDescription.bind(this),this.onChangeDays=this.onChangeDays.bind(this),this.onChangeHours=this.onChangeHours.bind(this),this.onChangeMinutes=this.onChangeMinutes.bind(this),this.onAddStepButtonClick=this.onAddStepButtonClick.bind(this),this.daysInput=(0,u.createRef)(),this.addDurationButton=(0,u.createRef)();const t=this.getDefaultDurationText();this.setDefaultDurationText(t)}getDefaultDurationText(){const e=(0,c.get)(window,"wp.hooks.applyFilters");let t=(0,a.__)("Time needed:","wordpress-seo");return e&&(t=e("wpseo_duration_text",t)),t}setDurationText(e){this.props.setAttributes({durationText:e})}setDefaultDurationText(e){this.props.setAttributes({defaultDurationText:e})}onAddStepButtonClick(){this.insertStep(null,"","",[],!1)}static generateId(e=""){return`${e}-${(new Date).getTime()}`}changeStep(e,t,n,r,o){const i=this.props.attributes.steps?this.props.attributes.steps.slice():[];if(o>=i.length)return;if(i[o].name!==n||i[o].text!==r)return;i[o]={id:i[o].id,name:e,text:t,jsonName:e,jsonText:t},i[o].images=v(t);const s=b(t);s&&(i[o].jsonImageSrc=s),this.props.setAttributes({steps:i})}insertStep(e=null,t="",n="",r=[],o=!0){const i=this.props.attributes.steps?this.props.attributes.steps.slice():[];null===e&&(e=i.length-1),i.splice(e+1,0,{id:E.generateId("how-to-step"),name:t,text:n,images:r,jsonName:"",jsonText:""}),this.props.setAttributes({steps:i}),o?setTimeout(this.setFocus.bind(this,`${e+1}:name`)):(0,l.speak)((0,a.__)("New step added","wordpress-seo"))}swapSteps(e,t){const n=this.props.attributes.steps?this.props.attributes.steps.slice():[],r=n[e];n[e]=n[t],n[t]=r,this.props.setAttributes({steps:n});const[o,i]=this.state.focus.split(":");o===`${e}`&&this.setFocus(`${t}:${i}`),o===`${t}`&&this.setFocus(`${e}:${i}`)}removeStep(e){const t=this.props.attributes.steps?this.props.attributes.steps.slice():[];t.splice(e,1),this.props.setAttributes({steps:t});let n="description";t[e]?n=`${e}:name`:t[e-1]&&(n=e-1+":text"),this.setFocus(n)}setFocus(e){e!==this.state.focus&&this.setState({focus:e})}setFocusToStep(e,t){this.setFocus(`${e}:${t}`)}moveStepUp(e){this.swapSteps(e,e-1)}moveStepDown(e){this.swapSteps(e,e+1)}getSteps(){if(!this.props.attributes.steps)return null;const[e]=this.state.focus.split(":");return this.props.attributes.steps.map(((t,n)=>(0,p.jsx)(w,{step:t,index:n,onChange:this.changeStep,insertStep:this.insertStep,removeStep:this.removeStep,onFocus:this.setFocusToStep,onMoveUp:this.moveStepUp,onMoveDown:this.moveStepDown,isFirst:0===n,isLast:n===this.props.attributes.steps.length-1,isSelected:e===`${n}`,isUnorderedList:this.props.attributes.unorderedList},t.id)))}formatDuration(e,t=null){if(""===e)return"";const n=e.replace(/^[0]+/,"");return""===n?0:null!==t?Math.min(Math.max(0,parseInt(n,10)),t):Math.max(0,parseInt(n,10))}static getStepsContent(e){return e?e.map((e=>(0,C.createElement)(w.Content,{...e,key:e.id}))):null}static Content(e){const{steps:t,hasDuration:n,days:r,hours:o,minutes:i,description:s,unorderedList:l,additionalListCssClasses:c,className:u,durationText:d,defaultDurationText:h}=e,m=["schema-how-to",u].filter((e=>e)).join(" "),f=["schema-how-to-steps",c].filter((e=>e)).join(" "),g=function(e){const t=function({days:e,hours:t,minutes:n}){const r=[];return 0!==e&&r.push((0,a.sprintf)(/* translators: %d expands to the number of days. */
(0,a._n)("%d day","%d days",e,"wordpress-seo"),e)),0!==t&&r.push((0,a.sprintf)(/* translators: %d expands to the number of hours. */
(0,a._n)("%d hour","%d hours",t,"wordpress-seo"),t)),0!==n&&r.push((0,a.sprintf)(/* translators: %d expands to the number of minutes. */
(0,a._n)("%d minute","%d minutes",n,"wordpress-seo"),n)),r}({days:T(e.days),hours:T(e.hours),minutes:T(e.minutes)});return 1===t.length?t[0]:2===t.length?(0,a.sprintf)(/* translators: %1$s and %2$s expand to units of time (e.g. 1 day). */
(0,a.__)("%1$s and %2$s","wordpress-seo"),...t):3===t.length?(0,a.sprintf)(/* translators: %1$s, %2$s and %3$s expand to units of time (e.g. 1 day). */
(0,a.__)("%1$s, %2$s and %3$s","wordpress-seo"),...t):""}({days:r,hours:o,minutes:i});return(0,p.jsxs)("div",{className:m,children:[n&&"string"==typeof g&&g.length>0&&(0,p.jsxs)("p",{className:"schema-how-to-total-time",children:[(0,p.jsxs)("span",{className:"schema-how-to-duration-time-text",children:[d||h," "]}),g+". "]}),(0,p.jsx)(S,{tagName:"p",className:"schema-how-to-description",value:s}),l?(0,p.jsx)("ul",{className:f,children:E.getStepsContent(t)}):(0,p.jsx)("ol",{className:f,children:E.getStepsContent(t)})]})}getAddStepButton(){return(0,p.jsx)(m.Button,{icon:"insert",onClick:this.onAddStepButtonClick,className:"schema-how-to-add-step",children:(0,a.__)("Add step","wordpress-seo")})}addCSSClasses(e){this.props.setAttributes({additionalListCssClasses:e})}toggleListType(e){this.props.setAttributes({unorderedList:e})}getListTypeHelp(e){return e?(0,a.__)("Showing step items as an unordered list","wordpress-seo"):(0,a.__)("Showing step items as an ordered list.","wordpress-seo")}focusDescription(){this.setFocus("description")}onChangeDescription(e){this.props.setAttributes({description:e,jsonDescription:e})}addDuration(){this.props.setAttributes({hasDuration:!0}),setTimeout((()=>this.daysInput.current.focus()))}removeDuration(){this.props.setAttributes({hasDuration:!1}),setTimeout((()=>{this.addDurationButton.current instanceof u.Component||this.addDurationButton.current.focus()}))}onChangeDays(e){const t=this.formatDuration(e.target.value);this.props.setAttributes({days:(0,c.toString)(t)})}onChangeHours(e){const t=this.formatDuration(e.target.value,23);this.props.setAttributes({hours:(0,c.toString)(t)})}onChangeMinutes(e){const t=this.formatDuration(e.target.value,59);this.props.setAttributes({minutes:(0,c.toString)(t)})}getDuration(){const{attributes:e}=this.props;return e.hasDuration?(0,p.jsx)("fieldset",{className:"schema-how-to-duration",children:(0,p.jsxs)("span",{className:"schema-how-to-duration-flex-container",role:"presentation",children:[(0,p.jsx)("legend",{className:"schema-how-to-duration-legend",children:e.durationText||this.getDefaultDurationText()}),(0,p.jsxs)("span",{className:"schema-how-to-duration-time-input",children:[(0,p.jsx)("label",{htmlFor:"schema-how-to-duration-days",className:"screen-reader-text",children:/* translators: Hidden accessibility text. */
(0,a.__)("days","wordpress-seo")}),(0,p.jsx)("input",{id:"schema-how-to-duration-days",className:"schema-how-to-duration-input",type:"number",value:e.days||"",onChange:this.onChangeDays,placeholder:"DD",ref:this.daysInput}),(0,p.jsx)("label",{htmlFor:"schema-how-to-duration-hours",className:"screen-reader-text",children:(0,a.__)("hours","wordpress-seo")}),(0,p.jsx)("input",{id:"schema-how-to-duration-hours",className:"schema-how-to-duration-input",type:"number",value:e.hours||"",onChange:this.onChangeHours,placeholder:"HH"}),(0,p.jsx)("span",{"aria-hidden":"true",children:":"}),(0,p.jsx)("label",{htmlFor:"schema-how-to-duration-minutes",className:"screen-reader-text",children:(0,a.__)("minutes","wordpress-seo")}),(0,p.jsx)("input",{id:"schema-how-to-duration-minutes",className:"schema-how-to-duration-input",type:"number",value:e.minutes||"",onChange:this.onChangeMinutes,placeholder:"MM"}),(0,p.jsx)(m.Button,{className:"schema-how-to-duration-delete-button",icon:"trash",label:(0,a.__)("Delete total time","wordpress-seo"),onClick:this.removeDuration})]})]})}):(0,p.jsx)(m.Button,{onClick:this.addDuration,className:"schema-how-to-duration-button",ref:this.addDurationButton,icon:"insert",children:(0,a.__)("Add total time","wordpress-seo")})}getSidebar(e,n,r){return r===this.getDefaultDurationText()&&(r=""),(0,p.jsx)(t.InspectorControls,{children:(0,p.jsxs)(m.PanelBody,{title:(0,a.__)("Settings","wordpress-seo"),className:"blocks-font-size",children:[(0,p.jsx)(m.TextControl,{label:(0,a.__)("CSS class(es) to apply to the steps","wordpress-seo"),value:n,onChange:this.addCSSClasses,help:(0,a.__)("Optional. This can give you better control over the styling of the steps.","wordpress-seo"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,p.jsx)(m.TextControl,{label:(0,a.__)("Describe the duration of the instruction:","wordpress-seo"),value:r,onChange:this.setDurationText,help:(0,a.__)("Optional. Customize how you want to describe the duration of the instruction","wordpress-seo"),placeholder:this.getDefaultDurationText(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,p.jsx)(m.ToggleControl,{label:(0,a.__)("Unordered list","wordpress-seo"),checked:e||!1,onChange:this.toggleListType,help:this.getListTypeHelp,__nextHasNoMarginBottom:!0})]})})}render(){const{attributes:e,className:n}=this.props,r=["schema-how-to",n].filter((e=>e)).join(" "),o=["schema-how-to-steps",e.additionalListCssClasses].filter((e=>e)).join(" ");return(0,p.jsxs)("div",{className:r,children:[this.getDuration(),(0,p.jsx)(t.RichText,{identifier:"description",tagName:"p",className:"schema-how-to-description",value:e.description,onChange:this.onChangeDescription,onFocus:this.focusDescription,placeholder:(0,a.__)("Enter a description","wordpress-seo")}),(0,p.jsx)("ul",{className:o,children:this.getSteps()}),(0,p.jsx)("div",{className:"schema-how-to-buttons",children:this.getAddStepButton()}),this.getSidebar(e.unorderedList,e.additionalListCssClasses,e.durationText)]})}}function _(e,t=0){return parseInt(e,10)||t}function N(e){const t=function({days:e,hours:t,minutes:n}){const r=[];return 0!==e&&r.push((0,a.sprintf)(/* translators: %d expands to the number of days. */
(0,a._n)("%d day","%d days",e,"wordpress-seo"),e)),0!==t&&r.push((0,a.sprintf)(/* translators: %d expands to the number of hours. */
(0,a._n)("%d hour","%d hours",t,"wordpress-seo"),t)),0!==n&&r.push((0,a.sprintf)(/* translators: %d expands to the number of minutes. */
(0,a._n)("%d minute","%d minutes",n,"wordpress-seo"),n)),r}({days:_(e.days),hours:_(e.hours),minutes:_(e.minutes)});return 1===t.length?t[0]:2===t.length?(0,a.sprintf)(/* translators: %1$s and %2$s expand to units of time (e.g. 1 day). */
(0,a.__)("%1$s and %2$s","wordpress-seo"),...t):3===t.length?(0,a.sprintf)(/* translators: %1$s, %2$s and %3$s expand to units of time (e.g. 1 day). */
(0,a.__)("%1$s, %2$s and %3$s","wordpress-seo"),...t):""}E.propTypes={attributes:s().object.isRequired,setAttributes:s().func.isRequired,className:s().string},E.defaultProps={className:""};const A=e=>(0,p.jsxs)("li",{className:"schema-how-to-step",children:[(0,p.jsx)("strong",{className:"schema-how-to-step-name",children:e.name},e.id+"-name")," ",(0,p.jsx)("p",{className:"schema-how-to-step-text",children:e.text},e.id+"-text")," "]},e.id);function k(e){let{steps:t}=e.attributes;const{hasDuration:n,days:r,hours:o,minutes:i,description:s,unorderedList:l,additionalListCssClasses:c,className:u}=e.attributes;t=t?t.map((e=>(0,C.createElement)(A,{...e,key:e.id}))):null;const d=["schema-how-to",u].filter((e=>e)).join(" "),h=["schema-how-to-steps",c].filter((e=>e)).join(" "),m=N({days:r,hours:o,minutes:i});return(0,p.jsxs)("div",{className:d,children:[n&&"string"==typeof m&&m.length>0&&(0,p.jsxs)("p",{className:"schema-how-to-total-time",children:[(0,a.__)("Time needed:","wordpress-seo")," ",m+". "]}),(0,p.jsx)("p",{className:"schema-how-to-description",children:s})," ",l?(0,p.jsx)("ul",{className:h,children:t}):(0,p.jsx)("ol",{className:h,children:t})]})}function D(e){return(0,p.jsxs)("li",{className:"schema-how-to-step",children:[(0,p.jsx)("strong",{className:"schema-how-to-step-name",children:e.name},e.id+"-name")," ",(0,p.jsx)("p",{className:"schema-how-to-step-text",children:e.text},e.id+"-text")," "]},e.id)}function j(e){const{steps:t,hasDuration:n,days:r,hours:o,minutes:i,description:s,unorderedList:a,additionalListCssClasses:l,className:c,durationText:u,defaultDurationText:d}=e.attributes,h=["schema-how-to",c].filter((e=>e)).join(" "),m=["schema-how-to-steps",l].filter((e=>e)).join(" "),f=N({days:r,hours:o,minutes:i});let g=[];return t&&(g=t.map((e=>(0,C.createElement)(D,{...e,key:e.id})))),(0,p.jsxs)("div",{className:h,children:[n&&"string"==typeof f&&f.length>0&&(0,p.jsxs)("p",{className:"schema-how-to-total-time",children:[(0,p.jsxs)("span",{className:"schema-how-to-duration-time-text",children:[u||d," "]}),f+". "]}),(0,p.jsx)("p",{className:"schema-how-to-description",children:s})," ",a?(0,p.jsx)("ul",{className:m,children:g}):(0,p.jsx)("ol",{className:m,children:g})]})}k.propTypes={attributes:s().object},j.propTypes={attributes:s().object.isRequired};const R=e=>{if(!e)return"";if("string"==typeof e)return e;if(Array.isArray(e))try{return(0,u.renderToString)(e)}catch(t){return e.map((e=>"string"==typeof e?e:e&&e.props?(0,u.renderToString)(e):"")).join("")}return""},O=e=>{const{key:t,props:n={}}=e,{src:r="",alt:o="",className:i="",style:s=""}=n;return{type:"img",key:t,props:{src:r,alt:o,className:i,style:s}}},P=e=>{if(!e.steps)return e;const t=e.steps.map((e=>{const t=((e,t)=>{var n;return Array.isArray(t)&&0===e.length&&(n=t,e=Array.isArray(n)?n.filter((e=>e&&e.type&&"img"===e.type)).map(O):[]),e})(e.images||[],e.text),n=R(e.name),r=R(e.text);let o=e.jsonImageSrc||"";return!o&&t.length>0&&t[0].props.src&&(o=t[0].props.src),{id:e.id,name:n,text:r,images:t,jsonName:n,jsonText:r,jsonImageSrc:o}})),n={...e,steps:t};return Array.isArray(e.description)&&(n.description=R(e.description),n.jsonDescription=n.description),(0,c.pickBy)(n,(e=>void 0!==e))},I=e=>!(!e.steps||!Array.isArray(e.steps))&&e.steps.some((e=>Array.isArray(e.name)||Array.isArray(e.text)||!e.images&&Array.isArray(e.text))),M=({attributes:e})=>{const n=t.useBlockProps.save(e);return(0,p.jsx)(E.Content,{...n})},L={v8_2:k,v11_4:j,v27_0:e};(0,r.registerBlockType)(o,{edit:({attributes:e,setAttributes:n,className:r})=>{const o=(0,t.useBlockProps)();return e.steps&&0!==e.steps.length||(e.steps=[{id:E.generateId("how-to-step"),name:"",text:"",images:[]}]),(0,p.jsx)("div",{...o,children:(0,p.jsx)(E,{attributes:e,setAttributes:n,className:r})})},save:({attributes:e})=>{const n=t.useBlockProps.save(e);return(0,p.jsx)(E.Content,{...n})},deprecated:[{attributes:o.attributes,save:L.v27_0.legacySave,migrate:L.v27_0.migrateToStringFormat,isEligible:L.v27_0.needsMigration},{attributes:o.attributes,save:L.v11_4},{attributes:o.attributes,save:L.v8_2}]})})()})();