Files
medicalalert-web-reloaded/wp/wp-content/plugins/wordpress-seo-premium/assets/js/dist/dynamic-blocks-2290.min.js
2024-09-25 09:25:31 -04:00

1 line
8.4 KiB
JavaScript

(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var a in s)e.o(s,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,s=window.lodash,a=window.wp.blockEditor,i=window.wp.blocks,n=window.wp.data,r=window.wp.domReady;var o=e.n(r);const l=window.wp.serverSideRender;var c=e.n(l);const m=window.wp.components,d=window.wp.i18n,p=window.wp.element,u=window.wp.hooks;function g(){(0,u.addFilter)("blocks.getSaveContent.extraProps","yoast/yoast-seo-premium/remove-extra-class",(e=>e.className?{...e,className:e.className.replace("wp-block-yoast-seo-estimated-reading-time ","")}:e),Number.MAX_SAFE_INTEGER)}const w=(0,t.createElement)(p.Fragment,null,(0,t.createElement)("span",{className:"yoast-reading-time__icon"},(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-icon":"clock",width:"20",height:"20",fill:"none",stroke:"currentColor",style:{display:"inline-block",verticalAlign:"-0.1em"},role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))),(0,t.createElement)("span",{className:"yoast-reading-time__spacer",style:{display:"inline-block",width:"1em"}})),_=(0,t.createElement)(p.Fragment,null,(0,t.createElement)("span",{className:"yoast-reading-time__icon"}),(0,t.createElement)("span",{className:"yoast-reading-time__spacer",style:"width:1em"})),y={v15_6:function({attributes:e}){const{estimatedReadingTime:s,descriptiveText:a,showDescriptiveText:i,showIcon:n}=e;return g(),(0,t.createElement)("p",{className:"yoast-reading-time__wrapper"},n?w:"",i?(0,t.createElement)("span",{className:"yoast-reading-time__descriptive-text"},a," "):"",(0,t.createElement)("span",{className:"yoast-reading-time__reading-time"},s),(0,t.createElement)("span",{className:"yoast-reading-time__time-unit"}," "+(0,d._n)("minute","minutes",s,"wordpress-seo-premium")))},v15_6_nonAdmin:function({attributes:e}){const{estimatedReadingTime:s,descriptiveText:a,showDescriptiveText:i,showIcon:n}=e;return g(),(0,t.createElement)("p",{className:"yoast-reading-time__wrapper"},n?_:"",i?(0,t.createElement)("span",{className:"yoast-reading-time__descriptive-text"},a," "):"",(0,t.createElement)("span",{className:"yoast-reading-time__reading-time"},s),(0,t.createElement)("span",{className:"yoast-reading-time__time-unit"}," "+(0,d._n)("minute","minutes",s,"wordpress-seo-premium")))},v15_8:function({attributes:e}){const{className:s,estimatedReadingTime:a,descriptiveText:i,showDescriptiveText:n,showIcon:r}=e;return(0,t.createElement)("p",{className:s?`yoast-reading-time__wrapper ${s}`:"yoast-reading-time__wrapper"},r?"ICON_PLACEHOLDER":null,n?(0,t.createElement)("span",{className:"yoast-reading-time__descriptive-text"},i," "):null,(0,t.createElement)("span",{className:"yoast-reading-time__reading-time"},a),(0,t.createElement)("span",{className:"yoast-reading-time__time-unit"}," "+(0,d._n)("minute","minutes",a,"wordpress-seo-premium")))}},b=(0,t.createElement)("span",{className:"yoast-reading-time__icon"}),h=(0,t.createElement)(p.Fragment,null,(0,t.createElement)("span",{className:"yoast-reading-time__icon"},(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-icon":"clock",width:"20",height:"20",fill:"none",stroke:"currentColor",style:{display:"inline-block",verticalAlign:"-0.1em"},role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))),(0,t.createElement)("span",{className:"yoast-reading-time__spacer",style:{display:"inline-block",width:"1em"}}));function v({attributes:e,useIconPlaceholder:s=!1}){const{className:a,estimatedReadingTime:i,descriptiveText:n,showDescriptiveText:r,showIcon:o}=e,l=s?b:h;return(0,t.createElement)("p",{className:a?`yoast-reading-time__wrapper ${a}`:"yoast-reading-time__wrapper"},o?l:null,r?(0,t.createElement)("span",{className:"yoast-reading-time__descriptive-text"},n," "):null,(0,t.createElement)("span",{className:"yoast-reading-time__reading-time"},i),(0,t.createElement)("span",{className:"yoast-reading-time__time-unit"}," "+(0,d._n)("minute","minutes",i,"wordpress-seo-premium")))}function E({attributes:e}){return(0,t.createElement)(v,{attributes:e,useIconPlaceholder:!0})}const k=(0,n.withSelect)(((e,t)=>{let s=t.attributes.estimatedReadingTime;return e("yoast-seo/editor")&&(s=e("yoast-seo/editor").getEstimatedReadingTime()),"string"==typeof s&&(s=parseInt(s,10)),{attributes:{...t.attributes,estimatedReadingTime:s}}}))((function({attributes:e,setAttributes:s}){const{estimatedReadingTime:i,descriptiveText:n,showDescriptiveText:r,showIcon:o}=e;(0,p.useEffect)((()=>s({estimatedReadingTime:i})),[i]);const l=(0,p.useCallback)((e=>s({descriptiveText:e})),[n]),c=(0,p.useCallback)((()=>s({showDescriptiveText:!r})),[r]),u=(0,p.useCallback)((()=>s({showIcon:!o})),[o]);return(0,t.createElement)("div",null,(0,t.createElement)(a.InspectorControls,null,(0,t.createElement)(m.PanelBody,{title:(0,d.__)("Settings","wordpress-seo-premium"),className:"yoast-reading-time-controls"},(0,t.createElement)(m.TextControl,{label:(0,d.__)("Descriptive text","wordpress-seo-premium"),value:n,onChange:l}),(0,t.createElement)(m.ToggleControl,{label:(0,d.__)("Show the descriptive text","wordpress-seo-premium"),checked:r,onChange:c}),(0,t.createElement)(m.ToggleControl,{label:(0,d.__)("Show icon","wordpress-seo-premium"),checked:o,onChange:u}))),(0,t.createElement)(v,{attributes:e}))})),T=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"version":"23.0","name":"yoast-seo/siblings","title":"Yoast Siblings","description":"Adds a list of internal links to sibling pages which share the same parent.","category":"yoast-internal-linking-blocks","icon":"editor-ul","keywords":["SEO","siblings","siblings pages","internal linking","site structure"],"textdomain":"wordpress-seo-premium","attributes":{},"example":{"attributes":{}}}'),N=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"version":"23.0","name":"yoast-seo/subpages","title":"Yoast Subpages","description":"Adds a list of internal links to subpages of this page.","category":"yoast-internal-linking-blocks","icon":"editor-ul","keywords":["SEO","subpages","childpages","children","internal linking","site structure"],"textdomain":"wordpress-seo-premium","attributes":{},"example":{"attributes":{}}}');o()((()=>{window._wpLoadBlockEditor&&window._wpLoadBlockEditor.then((()=>{const e=setInterval((()=>{const t=(()=>{const{getPostType:e}=(0,n.select)("core"),{getEditedPostAttribute:t}=(0,n.select)("core/editor"),a=t("type");if(null===a)return null;const i=e(a);return i?(0,s.get)(i,["hierarchical"],!1):null})();if(null===t)return;const a=((0,n.select)("core/block-editor").getBlocks()||[]).map((e=>e.name)),r=a.includes("yoast-seo/subpages")||a.includes("yoast-seo/siblings");!1===t&&!1===r&&((0,i.unregisterBlockType)("yoast-seo/subpages"),(0,i.unregisterBlockType)("yoast-seo/siblings")),clearInterval(e)}),250)}))})),(0,i.registerBlockType)(T,{edit:function(e){const s=(0,a.useBlockProps)();return(0,t.createElement)("div",{...s},(0,t.createElement)(c(),{block:"yoast-seo/siblings",attributes:e.attributes}))},save:function(){return null}}),(0,i.registerBlockType)(N,{edit:function(e){const s=(0,a.useBlockProps)();return(0,t.createElement)("div",{...s},(0,t.createElement)(c(),{block:"yoast-seo/subpages",attributes:e.attributes}))},save:function(){return null}}),function(){const e={estimatedReadingTime:{type:"number",default:0},descriptiveText:{type:"string",default:(0,d.__)("Estimated reading time:","wordpress-seo-premium")+" "},showDescriptiveText:{type:"boolean",default:!0},showIcon:{type:"boolean",default:!0}};(0,i.registerBlockType)("yoast-seo/estimated-reading-time",{title:(0,d.__)("Yoast Estimated Reading Time","wordpress-seo-premium"),icon:"clock",category:"yoast-structured-data-blocks",description:(0,d.__)("Shows an estimated reading time based on the content length.","wordpress-seo-premium"),keywords:[(0,d.__)("seo","wordpress-seo-premium"),(0,d.__)("reading time","wordpress-seo-premium"),(0,d.__)("content length","wordpress-seo-premium")],attributes:e,example:{attributes:{}},edit:k,save:E,deprecated:[{attributes:e,save:y.v15_6},{attributes:e,save:y.v15_6_nonAdmin},{attributes:e,save:y.v15_8}]})}()})();