/home/egir5919/public_html/wp-content/plugins/surerank/build/divi/index.js
"use strict";(globalThis.webpackChunksurerank=globalThis.webpackChunksurerank||[]).push([[5177],{38679(e,t,n){var s=n(9607),r=n(1671),a=n(47143),i=n(27723),o=n(11936),l=n(61701),c=n(76016),u=n(89920);const d=(e,t)=>{if(!e||!t)return;const n=document.createElement("div");n.className="surerank-root";const r=document.createElement("div");r.className=(0,s.cn)("surerank-tooltip","absolute","bg-black/95","text-white","px-3","py-[0.3125rem]","rounded","text-xs","font-normal","leading-normal","whitespace-nowrap","invisible","opacity-0","pointer-events-none","z-[9999]","top-0","left-0"),r.textContent=t,n.appendChild(r),document.body.appendChild(n);const a=()=>{(()=>{const t=e.getBoundingClientRect(),n=t.left+t.width/2;r.style.top=t.bottom+10+"px",r.style.left=n+"px"})(),r.classList.remove("invisible"),r.classList.add("visible","opacity-100")},i=()=>{r.classList.remove("visible","opacity-100"),r.classList.add("invisible","opacity-0")},o=()=>{a()},l=()=>{i()};return e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",l),e.addEventListener("focus",a),e.addEventListener("blur",i),()=>{e.removeEventListener("mouseenter",o),e.removeEventListener("mouseleave",l),e.removeEventListener("focus",a),e.removeEventListener("blur",i),n.parentNode&&n.parentNode.removeChild(n)}},g=()=>{let e=!1,t=null,n=null,r=null;const a=()=>{if(e)return;const r=document.querySelector(".et-vb-page-bar-tools-action-buttons");if(!r)return;e=!0;const a=document.createElement("div");a.className="surerank-root";const g=document.createElement("button");g.className="et-vb-page-bar-button",g.type="button",g.setAttribute("aria-label",(0,i.__)("Open SureRank SEO","surerank")),g.tabIndex=0;const p=document.createElement("div");p.className="relative",p.style.cssText="width:28px;min-width:28px;height:28px;display:flex;align-items:center;justify-content:center;",p.innerHTML=(0,l.R)("w-5 h-5"),g.appendChild(p),g.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),(0,l.J)()}),a.appendChild(g),r.appendChild(a);const h=()=>{const e=p.querySelector(".surerank-status-indicator");e&&e.remove();const t=(()=>{const{status:e,counts:t}=(0,u.C)();if(!e||!c.Jj)return null;const n=(0,s.ns)(e),r=(0,s.x7)(t.errorAndWarnings),a=document.createElement("div");return a.className=(0,s.cn)("surerank-status-indicator","absolute top-0.5 right-0.5 size-2 rounded-full z-10 duration-200",n),a.setAttribute("aria-label",r),a.setAttribute("title",r),a})();t&&p.appendChild(t)};h(),(0,u.o)(),n=wp?.data?.subscribe?.(()=>{h(),(()=>{t&&t();const{counts:e}=(0,u.C)();t=d(g,(0,o.R)(e))})()});const{counts:k}=(0,u.C)();t=d(g,(0,o.R)(k))};a(),e||(r=new MutationObserver(()=>{a(),e&&r.disconnect()}),r.observe(document.body,{childList:!0,subtree:!0})),window.addEventListener("beforeunload",()=>{t&&(t(),t=null),n&&"function"===typeof n&&(n(),n=null),r&&(r.disconnect(),r=null)})};(()=>{let e=0,t=null,n=!1;const s=()=>{t&&"function"===typeof t&&(t(),t=null)},i=()=>{if(!n)try{const o=(0,a.select)(r.E);if(!o||"function"!==typeof o.getVariables)return void(e<50&&(e++,setTimeout(i,100)));o.getVariables()?(n=!0,s(),g()):t||(t=wp?.data?.subscribe?.(()=>{try{const e=(0,a.select)(r.E)?.getVariables();e&&!n&&(n=!0,s(),g())}catch(e){}}),setTimeout(()=>{if(!n){const e=(0,a.select)(r.E)?.getVariables();e&&(n=!0,s(),g())}},3e3))}catch(o){e<50&&(e++,setTimeout(i,100))}};i()})()},89920(e,t,n){n.d(t,{C:()=>g,o:()=>d});var s=n(47143),r=n(1671),a=n(54486),i=n(74801),o=n(76016);let l={isChecking:!1,checkedLinks:new Set,brokenLinks:new Set,allLinks:[]},c=!1;const u=e=>{l="function"===typeof e?e(l):e},d=async()=>{const e=(0,s.dispatch)(r.E),t=(0,s.select)(r.E);if(t&&e&&o.Jj&&!c)try{c=!0;const n=t.getPageSeoChecks()||{};await(0,i.OV)(()=>{},u,e.setPageSeoCheck,s.select,n,l)}catch(n){}},g=()=>{try{const e=(0,s.select)(r.E);if(!e||"function"!==typeof e.getPageSeoChecks)return{status:null,initializing:!0,counts:{errorAndWarnings:0,error:0,warning:0}};const t=e.getPageSeoChecks()||{},{categorizedChecks:n={},initializing:i=!0}=t,{status:o,counts:l}=(0,a.F)(n);return i&&(0,s.dispatch)(r.E).setPageSeoCheck("initializing",!1),{status:o,initializing:i,counts:l}}catch(e){return{status:null,initializing:!1,counts:{errorAndWarnings:0,error:0,warning:0}}}}},18947(e,t,n){n.d(t,{SZ:()=>c,_e:()=>d,aS:()=>l,bY:()=>a,cd:()=>u,jU:()=>o});var s=n(27723),r=n(76016);const a=({id:e,title:t,status:n,description:s,data:r,showImages:a,type:i="page"})=>({id:e,title:t,status:n,description:s,data:r,showImages:a,type:i}),i=async()=>{if(window?.tinymce?.editors?.length)return document.querySelector("#set-post-thumbnail>img");const e=window?.wp?.data?.select("core/editor");if(e&&"function"===typeof e.getEditedPostContent){const t=e.getEditedPostAttribute("featured_media");if(t){const e=await new Promise(e=>{const n=wp.media.attachment(t);"function"===typeof n.fetch&&n.fetch().then(t=>e(t)).catch(()=>{e({})})});return{alt:e?.alt??"",src:e?.url??""}}}},o=async e=>{let t=[];const n=await i();if(n&&t.push(n),t=[...t,...Array.from(e.querySelectorAll("img"))?.filter(e=>e?.src)],0===t.length)return;const r=t.filter(Boolean).filter(e=>!e?.alt?.trim());if(0===r.length)return a({id:"image_alt_text",title:(0,s.__)("All images on this page have alt text attributes.","surerank"),status:"success",type:"page"});const o=window?.surerank_seo_popup?.image_seo,l=(0,s.__)("One or more images are missing alt text attributes.","surerank");let c=`${l} ${(0,s.__)("You can add them manually or turn on auto-set image title and alt in the settings.","surerank")}`;return o&&(c=`${l} ${(0,s.__)("But don't worry, we will add them automatically for you.","surerank")}`),a({id:"image_alt_text",title:c,status:"suggestion",data:Array.from(new Set(r.map(e=>e.src))),showImages:!0,type:"page"})},l=async e=>{const t=!!await i(),n=e.querySelectorAll("img, figure img, figure picture, figure.is-type-photo").length>0||t,r=e.querySelectorAll("video, figure.is-type-video").length>0;return a(n||r?!n&&r?{id:"media_present",title:(0,s.__)("This page includes video(s) but no images.","surerank"),status:"warning",type:"page"}:{id:"media_present",title:(0,s.__)("This page includes images or videos to enhance content.","surerank"),status:"success",type:"page"}:{id:"media_present",title:(0,s.__)("No images or videos found on this page.","surerank"),status:"warning",type:"page"})},c=e=>{const t=Array.from(e.querySelectorAll("a[href]"));return 0===t.length?a({id:"links_present",title:(0,s.__)("No links found on this page.","surerank"),status:"warning",type:"page"}):t.length>0?a({id:"links_present",title:(0,s.__)("Links are present on this page.","surerank"),status:"success",type:"page"}):void 0},u=e=>{const t=e.length,n=(0,s.sprintf)((0,s.__)("Page URL is longer than %s characters and may affect SEO and readability.","surerank"),r.X);return a(t>r.X?{id:"url_length",title:n,status:"warning",type:"page"}:{id:"url_length",title:(0,s.__)("Page URL is short and SEO-friendly.","surerank"),status:"success",type:"page"})},d=e=>{const t=Array.from(e.querySelectorAll("h2, h3, h4, h5, h6"));return a(t.length?{id:"h2_subheadings",title:(0,s.__)("Page contains at least one subheading.","surerank"),status:"success",type:"page"}:{id:"h2_subheadings",title:(0,s.__)("Page does not contain at least one subheading.","surerank"),status:"warning",type:"page"})}},84038(e,t,n){n.d(t,{Q7:()=>d,Tq:()=>c,aO:()=>u});var s=n(27723),r=n(18947),a=n(1455),i=n.n(a);const o=new Map,l=e=>{if(!e?.length)return[];const t=[];for(const n of e){const e=o.get(n);e?.broken&&t.push({url:n,...e})}return t},c=async(e,t,n=window.navigator.userAgent,a)=>{if(!e||!t)return;const i=(e=>{if(!e)return[];const t=Array.from(e.querySelectorAll("a[href]")).map(e=>{const t=e.getAttribute("href");if(!t)return null;const n=t.trim();if((e=>{if(!e)return!0;const t=e.trim();if(""===t)return!0;if(t.startsWith("#"))return!0;try{const e=(new URL(t,surerank_globals.site_url).protocol||"").replace(":","").toLowerCase();return!("http"===e||"https"===e)}catch(n){return t.includes(":")}})(n))return null;if(!n.startsWith("http")){const e=(n.startsWith("/")?"":"/")+n;return`${surerank_globals.site_url}${e}`}return n}).filter(Boolean);return[...new Set(t)]})(e);if(!i.length)return;const c=await(async({links:e,postId:t,userAgent:n,onProgress:r})=>{if((e=>{if(!e?.length)return o.clear();Array.from(o.keys()).forEach(t=>{e.includes(t)||o.delete(t)})})(e),!e.length)return[];const a=e.filter(e=>!o.has(e)),i=l(e);if(0===a.length)return i;const c=e.length;let u=e.length-a.length;"function"===typeof r&&(r("isCheckingLinks",!0),r("linkCheckProgress",{current:u,total:c}));for(const l of a){try{const s=await d({postId:t,userAgent:n,url:l,allLinks:e}),{success:r,...a}=s;o.set(l,{broken:!r,...a})}catch(g){o.set(l,{broken:!0,status:g?.data?.status??g?.code??"error",details:g.message,message:(0,s.__)("Failed to check link","surerank")})}u++,"function"===typeof r&&r("linkCheckProgress",{current:u,total:c}),u<c&&await new Promise(e=>setTimeout(e,100))}return r("isCheckingLinks",!1),l(e)})({links:i,postId:t,userAgent:n,onProgress:a});return(0,r.bY)(c.length?{id:"broken_links",title:(0,s.__)("One or more broken links found on the page.","surerank"),status:"error",data:c,type:"page"}:{id:"broken_links",title:(0,s.__)("No broken links found on the page.","surerank"),status:"success",description:[],type:"page"})},u=e=>(0,r.bY)(e?{id:"canonical_url",title:(0,s.__)("Canonical tag is present on the page.","surerank"),status:"success",type:"page"}:{id:"canonical_url",title:(0,s.__)("Canonical tag is not present on the page.","surerank"),status:"warning",type:"page"}),d=async({postId:e,userAgent:t,url:n,allLinks:s})=>await i()({path:"/surerank/v1/checks/broken-link",method:"POST",data:{post_id:e,user_agent:t,url:n,urls:s}})},74801(e,t,n){n.d(t,{OV:()=>k,QZ:()=>x,Rm:()=>y,ep:()=>_,fJ:()=>f,jK:()=>v,jp:()=>m,qQ:()=>b,sv:()=>C,uf:()=>w});var s=n(1455),r=n.n(s),a=n(27723),i=n(93832),o=n(88029),l=n(60443),c=n(9607),u=n(1671),d=n(84038),g=n(14060),p=n(76016),h=n(10790);const k=async(e,t,n,s,o,g)=>{const h=s(u.E).getVariables()?.post?.ID?.value||s(u.E).getActivePostId()||0;e(!0);const k="1"===surerank_seo_popup?.is_taxonomy,f=k?"/surerank/v1/checks/taxonomy":"/surerank/v1/checks/page",m=Date.now(),_=k?{term_ids:[h],_t:m}:{post_ids:[h],_t:m};try{const e=await r()({path:(0,i.addQueryArgs)(f,_),method:"GET"}),s=(0,c.mT)(e?.data[h]?.checks),o=e.data[h]?.checks?.all_links||[];t(e=>{const t=new Set(o),n=new Set;return e.brokenLinks.forEach(e=>{t.has(e)&&n.add(e)}),{isChecking:!1,checkedLinks:new Set,brokenLinks:n,allLinks:o}});const l=s.filter(e=>!0===e.ignore).map(e=>e.id);n("ignoredList",l);const u=[...s].filter(e=>"broken_links"!==e.id);p.Tv.forEach(e=>{n(e,u.filter(t=>t.type===e))}),n("initializing",!1),0===o.length?(n("isCheckingLinks",!1),n("linkCheckProgress",{current:0,total:0})):(n("isCheckingLinks",!0),n("linkCheckProgress",{current:0,total:o.length}),await(async(e,t,n,s,r,i,o)=>{const l=n.length,c=[];for(const a of e){let e=!1;try{(await(0,d.Q7)({postId:t,userAgent:window.navigator.userAgent,url:a,allLinks:n})).success||(e=!0)}catch{e=!0}s(t=>{const n=new Set(t.checkedLinks),s=new Set(t.brokenLinks);return n.add(a),e&&(s.add(a),c.push(a)),r("linkCheckProgress",{current:n.size,total:l}),{...t,checkedLinks:n,brokenLinks:s}})}s(e=>{const t=[...o].filter(e=>"broken_links"!==e.id);return c.length>0&&t.push({id:"broken_links",title:(0,a.__)("One or more broken links found on the page.","surerank"),status:"error",type:"page",data:[(0,a.__)("These broken links were found on the page:","surerank"),{list:[...c]}]}),p.Tv.forEach(e=>{r(e,t.filter(t=>t.type===e))}),r("isCheckingLinks",!1),r("linkCheckProgress",{current:l,total:l}),{...e,isChecking:!1}})})(o,h,o,t,n,0,u))}catch(w){l.o.error(w.message),t({isChecking:!1,checkedLinks:new Set,brokenLinks:new Set,allLinks:[]}),n("isCheckingLinks",!1),n("linkCheckProgress",{current:0,total:0})}finally{e(!1)}},f=()=>!!surerank_seo_popup?.is_frontend&&!surerank_seo_popup?.is_taxonomy,m=()=>"undefined"!==typeof window&&"undefined"!==typeof window.elementor&&window.elementor.hasOwnProperty("elements"),_=()=>!!surerank_globals?.is_bricks,w=()=>!!surerank_globals?.is_breakdance,y=()=>"undefined"!==typeof window&&"undefined"!==typeof window.FusionPageBuilder,b=()=>"listing"===surerank_seo_popup?.editor_type,v=()=>_()||w()||m()||y()||f()||b(),x=()=>!p.Jj||y(),C=({isRefreshing:e,isChecking:t,onClick:n})=>(0,h.jsx)(o.A,{variant:"outline",size:"xs",onClick:n,disabled:e||t,icon:(0,h.jsx)(g.A,{className:(0,c.cn)("size-4",(e||t)&&"animate-spin")}),children:(0,a.__)(e||t?"Refreshing":"Refresh","surerank")})},54486(e,t,n){n.d(t,{F:()=>s});const s=(e={})=>{const t=e.badChecks||[],n=e.fairChecks||[],s=e.suggestionChecks||[];let r="success";return t.length>0?r="error":n.length>0?r="warning":s.length>0&&(r="suggestion"),{status:r,counts:{errorAndWarnings:t.length+n.length,success:(e.passedChecks||[]).length,error:t.length,warning:n.length,suggestion:s.length}}}},61701(e,t,n){n.d(t,{J:()=>i,R:()=>o});var s=n(9607),r=n(1671),a=n(47143);const i=()=>{(0,a.dispatch)(r.E).updateModalState(!0)},o=e=>`<svg class="${(0,s.cn)(e)}" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n          <path d="M13.5537 1.5C17.8453 1.5 21.3251 4.97895 21.3252 9.27051C21.3252 12.347 19.5368 15.0056 16.9434 16.2646H21.3252V22.5H18.0889C14.9086 22.5 12.2861 20.1186 11.9033 17.042H11.9014L11.9033 13.7852C14.8283 13.7661 17.0342 11.3894 17.0342 8.45996V6.0293C14.137 6.02947 11.6948 7.97682 10.9443 10.6338C10.1605 9.53345 8.87383 8.8165 7.41992 8.81641H6.38086V9.85352H6.38379C6.44515 12.0356 8.23375 13.786 10.4307 13.7861H10.7061L10.6934 17.042H10.6865C10.2943 20.1082 7.67678 22.4785 4.50391 22.4785H2.6748V1.5H13.5537Z" fill="white"/>\n        </svg>`},11936(e,t,n){n.d(t,{R:()=>r});var s=n(27723);const r=e=>{if(!e||"object"!==typeof e)return(0,s.__)("SureRank Meta Box","surerank");const t="number"===typeof e.error?e.error:0,n="number"===typeof e.warning?e.warning:0;return t>0?(0,s.sprintf)((0,s._n)("%s Issue Detected","%s Issues Detected",t,"surerank"),t):n>0?(0,s.sprintf)((0,s._n)("%s Warning Detected","%s Warnings Detected",n,"surerank"),n):(0,s.__)("SureRank Meta Box","surerank")}},9607(e,t,n){n.d(t,{EJ:()=>p,MI:()=>M,OY:()=>E,P$:()=>v,P3:()=>w,PA:()=>x,RL:()=>B,XY:()=>g,ZV:()=>S,_t:()=>z,b7:()=>j,bF:()=>k,cn:()=>_,d_:()=>W,e$:()=>m,jP:()=>b,jT:()=>N,mT:()=>$,mv:()=>R,ns:()=>D,pk:()=>y,rj:()=>h,rt:()=>H,sI:()=>T,sL:()=>A,sz:()=>F,tI:()=>V,tX:()=>P,we:()=>q,x7:()=>I,xZ:()=>O,xx:()=>C});var s=n(27723),r=n(65313),a=n(6463),i=n(80696),o=n(81301),l=n(34164),c=n(75795),u=n(50856),d=n(76016);const g=e=>{const t=e.match(/<p>(.*?)<\/p>/g);return t?.length?t[0].replace(/(<([^>]+)>)/gi,""):e.replace(/(<([^>]+)>)/gi,"").replace(/\s+/g," ")},p=(e,t,n="...")=>!e?.length||!t||t<0||e.length<=t?e:e.slice(0,t)+n,h=e=>e&&"string"===typeof e?e.trim().split(/\s+/).filter(Boolean).length:0,k=(e,t,n=100)=>{if("string"!==typeof e||!e.trim())return;if(!f(t))return;const s=document.querySelector(e);s&&setTimeout(()=>{(0,c.createRoot)(s).render(t)},n)},f=e=>e&&e?.$$typeof===Symbol.for("react.element"),m=()=>({surerank_general:"general_settings",surerank_social:"social_settings",surerank_advanced:"advanced_settings"}[new URLSearchParams(window.location.search).get("page")]||"general_settings"),_=(...e)=>(0,u.QP)((0,l.A)(...e)),w=(e,t="value")=>{const n=e?.root?.children[0]?.children;if(!n||!n?.length)return"";let s="";return n.forEach(e=>{switch(e.type){case"text":s+=e.text;break;case"mention":s+=e.data[t];break;case"linebreak":s+="\n"}}),s},y=(e,t=[],n="value",s={type:"mention",version:1,data:{},size:"md",by:"label"})=>{const r={root:{children:[{children:[],direction:null,format:"",indent:0,type:"paragraph",version:1,textFormat:0,textStyle:""}],direction:null,format:"",indent:0,type:"root",version:1}};return("string"===typeof e?e:"").trim().split(/(\s+|%[\w\-_.]+%)/).filter(Boolean).forEach(e=>{if("\n"===e)r.root.children[0].children.push({type:"linebreak",version:1});else if(e?.startsWith("%")&&e?.endsWith("%")){const a=t?.find(t=>t[n]===e.trim());r.root.children[0].children.push(a?{...s,data:{...a}}:{detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1})}else r.root.children[0].children.push({detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1})}),JSON.stringify(r)};function b(e,t=65){if(!e)return"";const n=e.split("/");let s=`${n.slice(0,3).join("/")} \u203a ${n.slice(3).filter(Boolean).join(" \u203a ")}`;return s.length>t&&(s=s.substring(0,t-3)+"..."),s}const v=e=>{const t=window.location.pathname;return Array.isArray(e)?e.some(e=>t.includes(e)):t.includes(e)},x=(e,t={})=>{if(!e)return;const{delay:n=1e3,retryDelay:s=200,maxRetries:r=5}=t,a=(t=0)=>{const i=document.getElementById(e);i?setTimeout(()=>{i.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n):t<r&&setTimeout(()=>{a(t+1)},s)};window.requestAnimationFrame(()=>{a()})},C=(e,t)=>{try{return new URL(window.location.href).searchParams.get(e)===t}catch(n){return!1}},L=(e,t="yyyy-MM-dd")=>{try{if(!e||isNaN(new Date(e).getTime()))throw new Error((0,s.__)("Invalid Date","surerank"));return(0,r.GP)(new Date(e),t)}catch(n){return(0,s.__)("No Date","surerank")}},E=(e,t=!0)=>{if(isNaN(e))return{from:"",to:""};const n=t?(0,i.R)():(0,o.K)();let s=new Date(n);return s.setDate(n.getDate()-e),s=(0,a.o)(s),{from:s,to:n}},S=(e,t={})=>{const{decimals:n=1,forceDecimals:s=!1}=t;if("number"!==typeof e||isNaN(e))return"0";const r=e<0,a=Math.abs(e);if(a<1e3)return r?`-${a}`:a.toString();const i=[{value:1e3,suffix:"k"},{value:1e6,suffix:"m"},{value:1e9,suffix:"b"},{value:1e12,suffix:"t"},{value:1e15,suffix:"p"},{value:1e18,suffix:"e"},{value:1e21,suffix:"z"},{value:1e24,suffix:"y"},{value:1e27,suffix:"r"},{value:1e30,suffix:"q"}],o=i.find(({value:e})=>a<1e3*e)||i[i.length-1],l=(a/o.value).toFixed(n);return`${r?"-":""}${s?l:l.replace(/\.?0+$/,"")}${o.suffix}`},A=e=>{const t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString()},P=(e,t,n,r="MMM dd, yyyy")=>{if(!e)return"";const a=new Date(e),i=t?new Date(t):null,o=n?new Date(n):null;return isNaN(a.getTime())?(0,s.__)("Invalid Date","surerank"):i&&o?i.getMonth()===o.getMonth()&&i.getFullYear()===o.getFullYear()?L(a,"dd"):i.getFullYear()===o.getFullYear()?L(a,"MMM dd"):L(a,r):L(a,r)},T=e=>{let t,n="pending";const s=e.then(e=>{n="success",t=e},e=>{n="error",t=e});return{read(){if("pending"===n)throw s;if("error"===n)throw t;if("success"===n)return t}}},N=e=>e&&"string"===typeof e?(new DOMParser).parseFromString(e,"text/html").documentElement.textContent??e:e,R=e=>{try{return/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|localhost|\d{1,3}(\.\d{1,3}){3})(:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?(\s.*)?$/i.test(e)}catch(t){return!1}},$=e=>e?Object.entries(e).map(([e,t])=>{const n=e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return{...t,id:e,title:t?.message||n,data:t?.description,showImages:"image_alt_text"===e}}):[],O=(e,t=[])=>e.filter(Boolean).reduce((e,n)=>(t.includes(n.id)?(n.ignore=!0,e.ignoredChecks.push(n)):(n.ignore=!1,"error"===n.status?e.badChecks.push(n):"warning"===n.status?e.fairChecks.push(n):"suggestion"===n.status?e.suggestionChecks.push(n):"success"===n.status&&e.passedChecks.push(n)),e),{badChecks:[],fairChecks:[],suggestionChecks:[],passedChecks:[],ignoredChecks:[]}),z=(e,t)=>"error"===e?(0,s.sprintf)("%1$s %2$s",t,(0,s._n)("Issue","Issues",t,"surerank")):"warning"===e?(0,s.sprintf)("%1$s %2$s",t,(0,s._n)("Warning","Warnings",t,"surerank")):(0,s.__)("SEO is Optimized","surerank"),D=e=>{switch(e){case"error":return"bg-support-error";case"warning":return"bg-support-warning";case"suggestion":return"bg-support-info";case"success":return"bg-support-success";default:return"bg-background-secondary"}},I=e=>e>0?(0,s.sprintf)((0,s.__)("%1$d %2$s need attention.","surerank"),e,(0,s._n)("issue","issues",e,"surerank")):(0,s.__)("All SEO checks passed.","surerank"),M=(e,t="")=>{try{const n=new URL(e,window.location.origin).searchParams;return t?n.get(t)||"":Object.fromEntries(n.entries())}catch(n){return t?"":{}}},j=(e,t)=>{try{const n=new URL(e,window.location.origin),s=n.searchParams;return Array.isArray(t)?t.forEach(e=>s.delete(e)):s.delete(t),n.toString()}catch(n){return e}},q=(e,t)=>(e&&"object"===typeof e&&Object.keys(e).forEach(n=>{e[n]&&"object"===typeof e[n]&&(e[n].category=t)}),e),B=(e,t,n)=>{const s=[];return d.Tv.forEach(r=>{if(r===t)s.push(...n);else{const t=F(r).type;s.push(...e.pageSeoChecks?.[t]||[])}}),s},F=e=>({type:`${e}Checks`,categorizedType:`categorized${e.charAt(0).toUpperCase()+e.slice(1)}Checks`}),V=e=>{let t=e??"";return t.includes("sc-domain:")&&(t=t.replace(/sc-domain:/,"")),t.includes("https://")||t.includes("http://")||(t=`https://${t}`),t},W=e=>{let t="";switch(e.percentageType){case"danger":t="text-support-error [&>*]:text-support-error";break;case"success":t="text-support-success [&>*]:text-support-success";break;default:t=""}let n="";return null===e.value&&null===e.previous&&(n="text-text-tertiary [&>*]:text-text-tertiary"),{differenceClassName:t,fallbackClassName:n}},H=e=>({renderValue:null===e.value&&null===e.previous?"N/A":S(e.value),renderDifference:null===e.value&&null===e.previous?"N/A":S(Math.abs(e?.value-e?.previous))})},76016(e,t,n){n.d(t,{$K:()=>i,HH:()=>m,Jj:()=>g,KT:()=>p,Op:()=>r,Rw:()=>h,Tv:()=>f,UM:()=>l,X:()=>u,dc:()=>k,de:()=>o,oI:()=>_,qt:()=>c,vr:()=>a,x8:()=>d});var s=n(27723);n(10790);const r=window?.surerank_globals?.input_variable_suggestions??null,a=[{id:"post_no_index",value:"no",label:(0,s.__)("No index","surerank"),description:(0,s.__)("Prevents search engines from listing your page in search results.","surerank")},{id:"post_no_follow",value:"no",label:(0,s.__)("No follow","surerank"),description:(0,s.__)("Tells search engines not to follow any links on your page.","surerank")},{id:"post_no_archive",value:"no",label:(0,s.__)("No archive","surerank"),description:(0,s.__)("Blocks search engines from storing a cached version of your page.","surerank")}],i=()=>(0,s.__)("This content will be set as the meta description tag and may appear in search results. Keep it short and clearly explain what the page is about.","surerank"),o=window?.surerank_globals?.wp_dashboard_url??"",l=window?.surerank_globals?.description_length??160,c=window?.surerank_globals?.title_length??60,u=window?.surerank_globals?.url_length??90,d=500,g=window?.surerank_globals?.enable_page_level_seo??!1,p=window?.surerank_globals?.enable_google_console??!1,h=window?.surerank_globals?.enable_schemas??!1,k=window?.surerank_globals?.enable_migration??!1,f=["page","keyword"],m="https://surerank.com/surerank-ai/?utm_medium=surerank_plugin",_=e=>e?e.includes("title")?c:e.includes("url")||e.includes("slug")?u:(e.includes("description"),l):l},1671(e,t,n){n.d(t,{E:()=>s});const s="surerank"},51609(e){e.exports=window.React},75795(e){e.exports=window.ReactDOM},10790(e){e.exports=window.ReactJSXRuntime},1455(e){e.exports=window.wp.apiFetch},47143(e){e.exports=window.wp.data},27723(e){e.exports=window.wp.i18n},93832(e){e.exports=window.wp.url}},e=>{e.O(0,[9603,4631,5769,4795,7167,1392,6115,1085,6152,359,9545,641,6018,2691,8426,4400,6770,938,8427,8562,7938,9171,2373,2738,91,6289,1544,8789,4321,4973,5043,8732,5599,1811,4160,7683,5408,7040,703,4634,6061,9792,4787,8433,1817,1624,6784,5789],()=>e(e.s=38679)),e.O()}]);