FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
surerank
/
build
/
elementor
Edit File: index.js
"use strict";(globalThis.webpackChunksurerank=globalThis.webpackChunksurerank||[]).push([[7322],{90742(e,t,n){var r=n(9607),s=n(1671),a=n(47143),i=n(27723),o=n(11936),l=n(61701),u=n(76016),c=n(89920);const d=(e,t)=>{if(!e||!t)return;const n=document.createElement("div");n.className="surerank-root";const s=document.createElement("div");s.className=(0,r.cn)("surerank-tooltip","absolute","bg-gray-700","text-white","px-2","py-0.5","rounded","text-[0.6875rem]","font-medium","leading-tight","tracking-wide","invisible","opacity-0","pointer-events-none","origin-top","z-[9999]","top-0","left-0"),s.textContent=t;const a=document.createElement("div");a.className=(0,r.cn)("absolute","-top-[0.4375rem]","left-1/2","w-0","h-0","border-solid","border-l-[0.375rem]","border-r-[0.375rem]","border-b-[0.375rem]","border-l-transparent","border-r-transparent","border-t-transparent","border-b-gray-700","translate-x-[-50%]","bg-transparent"),s.appendChild(a),n.appendChild(s),document.body.appendChild(n);const i=()=>{(()=>{const t=e.getBoundingClientRect(),n=t.left+t.width/2;s.style.top=t.bottom+16+"px",s.style.left=n+"px"})(),s.classList.remove("invisible","opacity-0","surerank-tooltip--hidden"),s.classList.add("visible","opacity-100","surerank-tooltip--visible")};let o,l,u;const c=()=>{clearTimeout(u),s.classList.remove("opacity-100"),s.classList.add("opacity-0"),u=setTimeout(()=>{s.classList.remove("visible"),s.classList.add("invisible","surerank-tooltip--hidden")},250)},d=()=>{clearTimeout(l),o=setTimeout(i,200)},g=()=>{clearTimeout(o),l=setTimeout(c,0)},p=()=>{clearTimeout(l),i()},h=()=>{clearTimeout(o),c()};return e.addEventListener("mouseenter",d),e.addEventListener("mouseleave",g),e.addEventListener("focus",p),e.addEventListener("blur",h),()=>{clearTimeout(o),clearTimeout(l),clearTimeout(u),e.removeEventListener("mouseenter",d),e.removeEventListener("mouseleave",g),e.removeEventListener("focus",p),e.removeEventListener("blur",h),n.parentNode&&n.parentNode.removeChild(n)}};!function(e){let t=null,n=null,g=null;const p=()=>{const n=e("#elementor-editor-wrapper-v2 header .MuiGrid-root:nth-child(3) .MuiStack-root"),s=n.last(),a=s.find("button").attr("class"),p=s.find("svg").attr("class"),h=e('<div class="surerank-root"></div>'),k=e('<div class="relative"></div>'),f=e(`<button type="button" class="${a}" aria-label="${(0,i.__)("Open SureRank SEO","surerank")}" tabindex="0">\n\t\t\t\t${(0,l.R)(p)}\n\t\t\t</button>`).on("click",l.J);k.append(f),h.append(k),n.children().first().after(h);const m=()=>{k.find(".surerank-status-indicator").remove();const t=(e=>{const{status:t,counts:n}=(0,c.C)();if(!t||!u.Jj)return null;const s=(0,r.ns)(t),a=(0,r.x7)(n.errorAndWarnings),i=e("<div></div>");return i.addClass((0,r.cn)("absolute top-1.5 right-1.5 size-2 rounded-full z-10 duration-200",s)),i.attr("aria-label",a),i.attr("title",a),i})(e);t&&(t.addClass("surerank-status-indicator"),k.append(t))};m(),(0,c.o)(),g=wp?.data?.subscribe?.(()=>{m(),(()=>{t&&t();const{counts:e}=(0,c.C)();t=d(f[0],(0,o.R)(e))})()});const{counts:w}=(0,c.C)();t=d(f[0],(0,o.R)(w))};e(window).on("load",function(){(()=>{let e=0,t=null,n=!1;const r=()=>{t&&"function"===typeof t&&(t(),t=null)},i=()=>{if(!n)try{const o=(0,a.select)(s.E);if(!o||"function"!==typeof o.getVariables)return void(e<50&&(e++,setTimeout(i,100)));o.getVariables()?(n=!0,r(),p()):t||(t=wp?.data?.subscribe?.(()=>{try{const e=(0,a.select)(s.E)?.getVariables();e&&!n&&(n=!0,r(),p())}catch(e){}}),setTimeout(()=>{if(!n){const e=(0,a.select)(s.E)?.getVariables();e&&(n=!0,r(),p())}},3e3))}catch(o){e<50&&(e++,setTimeout(i,100))}};i()})()}),e(window).on("beforeunload",function(){t&&(t(),t=null),n&&(clearInterval(n),n=null),g&&"function"===typeof g&&(g(),g=null)})}(jQuery)},89920(e,t,n){n.d(t,{C:()=>g,o:()=>d});var r=n(47143),s=n(1671),a=n(54486),i=n(74801),o=n(76016);let l={isChecking:!1,checkedLinks:new Set,brokenLinks:new Set,allLinks:[]},u=!1;const c=e=>{l="function"===typeof e?e(l):e},d=async()=>{const e=(0,r.dispatch)(s.E),t=(0,r.select)(s.E);if(t&&e&&o.Jj&&!u)try{u=!0;const n=t.getPageSeoChecks()||{};await(0,i.OV)(()=>{},c,e.setPageSeoCheck,r.select,n,l)}catch(n){}},g=()=>{try{const e=(0,r.select)(s.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,r.dispatch)(s.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:()=>u,_e:()=>d,aS:()=>l,bY:()=>a,cd:()=>c,jU:()=>o});var r=n(27723),s=n(76016);const a=({id:e,title:t,status:n,description:r,data:s,showImages:a,type:i="page"})=>({id:e,title:t,status:n,description:r,data:s,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 r=e.getEditedPostAttribute("featured_media");if(r){var t,n;const e=await new Promise(e=>{const t=wp.media.attachment(r);"function"===typeof t.fetch&&t.fetch().then(t=>e(t)).catch(()=>{e({})})});return{alt:null!==(t=e?.alt)&&void 0!==t?t:"",src:null!==(n=e?.url)&&void 0!==n?n:""}}}},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 s=t.filter(Boolean).filter(e=>!e?.alt?.trim());if(0===s.length)return a({id:"image_alt_text",title:(0,r.__)("All images on this page have alt text attributes.","surerank"),status:"success",type:"page"});const o=window?.surerank_seo_popup?.image_seo,l=(0,r.__)("One or more images are missing alt text attributes.","surerank");let u=`${l} ${(0,r.__)("You can add them manually or turn on auto-set image title and alt in the settings.","surerank")}`;return o&&(u=`${l} ${(0,r.__)("But don't worry, we will add them automatically for you.","surerank")}`),a({id:"image_alt_text",title:u,status:"suggestion",data:Array.from(new Set(s.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,s=e.querySelectorAll("video, figure.is-type-video").length>0;return a(n||s?!n&&s?{id:"media_present",title:(0,r.__)("This page includes video(s) but no images.","surerank"),status:"warning",type:"page"}:{id:"media_present",title:(0,r.__)("This page includes images or videos to enhance content.","surerank"),status:"success",type:"page"}:{id:"media_present",title:(0,r.__)("No images or videos found on this page.","surerank"),status:"warning",type:"page"})},u=e=>{const t=Array.from(e.querySelectorAll("a[href]"));return 0===t.length?a({id:"links_present",title:(0,r.__)("No links found on this page.","surerank"),status:"warning",type:"page"}):t.length>0?a({id:"links_present",title:(0,r.__)("Links are present on this page.","surerank"),status:"success",type:"page"}):void 0},c=e=>{const t=e.length,n=(0,r.sprintf)((0,r.__)("Page URL is longer than %s characters and may affect SEO and readability.","surerank"),s.X);return a(t>s.X?{id:"url_length",title:n,status:"warning",type:"page"}:{id:"url_length",title:(0,r.__)("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,r.__)("Page contains at least one subheading.","surerank"),status:"success",type:"page"}:{id:"h2_subheadings",title:(0,r.__)("Page does not contain at least one subheading.","surerank"),status:"warning",type:"page"})}},84038(e,t,n){n.d(t,{Q7:()=>d,Tq:()=>u,aO:()=>c});var r=n(27723),s=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},u=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 u=await(async({links:e,postId:t,userAgent:n,onProgress:s})=>{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 u=e.length;let c=e.length-a.length;"function"===typeof s&&(s("isCheckingLinks",!0),s("linkCheckProgress",{current:c,total:u}));for(const l of a){try{const r=await d({postId:t,userAgent:n,url:l,allLinks:e}),{success:s,...a}=r;o.set(l,{broken:!s,...a})}catch(h){var g,p;o.set(l,{broken:!0,status:null!==(g=null!==(p=h?.data?.status)&&void 0!==p?p:h?.code)&&void 0!==g?g:"error",details:h.message,message:(0,r.__)("Failed to check link","surerank")})}c++,"function"===typeof s&&s("linkCheckProgress",{current:c,total:u}),c<u&&await new Promise(e=>setTimeout(e,100))}return s("isCheckingLinks",!1),l(e)})({links:i,postId:t,userAgent:n,onProgress:a});return(0,s.bY)(u.length?{id:"broken_links",title:(0,r.__)("One or more broken links found on the page.","surerank"),status:"error",data:u,type:"page"}:{id:"broken_links",title:(0,r.__)("No broken links found on the page.","surerank"),status:"success",description:[],type:"page"})},c=e=>(0,s.bY)(e?{id:"canonical_url",title:(0,r.__)("Canonical tag is present on the page.","surerank"),status:"success",type:"page"}:{id:"canonical_url",title:(0,r.__)("Canonical tag is not present on the page.","surerank"),status:"warning",type:"page"}),d=async({postId:e,userAgent:t,url:n,allLinks:r})=>await i()({path:"/surerank/v1/checks/broken-link",method:"POST",data:{post_id:e,user_agent:t,url:n,urls:r}})},74801(e,t,n){n.d(t,{OV:()=>k,QZ:()=>b,Rm:()=>_,ep:()=>w,fJ:()=>f,jK:()=>y,jp:()=>m,sv:()=>v});var r=n(51609),s=n(1455),a=n.n(s),i=n(27723),o=n(93832),l=n(88029),u=n(60443),c=n(9607),d=n(1671),g=n(84038),p=n(14060),h=n(76016);const k=async(e,t,n,r,s,l)=>{const p=r(d.E).getVariables()?.post?.ID?.value||0;e(!0);try{const e=await a()({path:(0,o.addQueryArgs)("/surerank/v1/checks/page",{post_ids:[p],_t:Date.now()}),method:"GET"}),r=(0,c.mT)(e?.data[p]?.checks),s=e.data[p]?.checks?.all_links||[];t(e=>{const t=new Set(s),n=new Set;return e.brokenLinks.forEach(e=>{t.has(e)&&n.add(e)}),{isChecking:!1,checkedLinks:new Set,brokenLinks:n,allLinks:s}});const l=[...r].filter(e=>"broken_links"!==e.id);h.Tv.forEach(e=>{n(e,l.filter(t=>t.type===e))}),0===s.length?(n("isCheckingLinks",!1),n("linkCheckProgress",{current:0,total:0})):(n("isCheckingLinks",!0),n("linkCheckProgress",{current:0,total:s.length}),await(async(e,t,n,r,s,a,o)=>{const l=n.length,u=[];for(const i of e){let e=!1;try{(await(0,g.Q7)({postId:t,userAgent:window.navigator.userAgent,url:i,allLinks:n})).success||(e=!0)}catch{e=!0}r(t=>{const n=new Set(t.checkedLinks),r=new Set(t.brokenLinks);return n.add(i),e&&(r.add(i),u.push(i)),s("linkCheckProgress",{current:n.size,total:l}),{...t,checkedLinks:n,brokenLinks:r}})}r(e=>{const t=[...o].filter(e=>"broken_links"!==e.id);return u.length>0&&t.push({id:"broken_links",title:(0,i.__)("One or more broken links found on the page.","surerank"),status:"error",type:"page",data:[(0,i.__)("These broken links were found on the page:","surerank"),{list:[...u]}]}),h.Tv.forEach(e=>{s(e,t.filter(t=>t.type===e))}),s("isCheckingLinks",!1),s("linkCheckProgress",{current:l,total:l}),{...e,isChecking:!1}})})(s,p,s,t,n,0,l))}catch(k){u.o.error(k.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"),w=()=>!!surerank_globals?.is_bricks,_=()=>"undefined"!==typeof window&&"undefined"!==typeof window.FusionPageBuilder,y=()=>w()||m()||_()||f(),b=()=>!h.Jj||w()||_(),v=({isRefreshing:e,isChecking:t,onClick:n})=>(0,r.createElement)(l.A,{variant:"outline",size:"xs",onClick:n,disabled:e||t,icon:(0,r.createElement)(p.A,{className:(0,c.cn)("size-4",(e||t)&&"animate-spin")})},(0,i.__)(e||t?"Refreshing":"Refresh","surerank"))},54486(e,t,n){n.d(t,{F:()=>r});const r=(e={})=>{const t=e.badChecks||[],n=e.fairChecks||[],r=e.suggestionChecks||[];let s="success";return t.length>0?s="error":n.length>0?s="warning":r.length>0&&(s="suggestion"),{status:s,counts:{errorAndWarnings:t.length+n.length,success:(e.passedChecks||[]).length,error:t.length,warning:n.length,suggestion:r.length}}}},61701(e,t,n){n.d(t,{J:()=>i,R:()=>o});var r=n(9607),s=n(1671),a=n(47143);const i=()=>{(0,a.dispatch)(s.E).updateModalState(!0)},o=e=>`<svg class="${(0,r.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:()=>s});var r=n(27723);const s=e=>{if(!e||"object"!==typeof e)return(0,r.__)("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,r.sprintf)((0,r._n)("%s Issue Detected","%s Issues Detected",t,"surerank"),t):n>0?(0,r.sprintf)((0,r._n)("%s Warning Detected","%s Warnings Detected",n,"surerank"),n):(0,r.__)("SureRank Meta Box","surerank")}},9607(e,t,n){n.d(t,{EJ:()=>p,MI:()=>M,OY:()=>S,P$:()=>v,P3:()=>_,PA:()=>C,RL:()=>F,XY:()=>g,ZV:()=>E,_t:()=>N,b7:()=>j,bF:()=>k,cn:()=>w,d_:()=>q,e$:()=>m,jP:()=>b,jT:()=>$,mT:()=>R,mv:()=>O,ns:()=>D,pk:()=>y,rj:()=>h,rt:()=>H,sI:()=>P,sL:()=>T,sz:()=>V,tI:()=>W,tX:()=>A,we:()=>B,x7:()=>I,xZ:()=>z,xx:()=>x});var r=n(27723),s=n(65313),a=n(6463),i=n(80696),o=n(81301),l=n(34164),u=n(75795),c=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 r=document.querySelector(e);r&&setTimeout(()=>{(0,u.createRoot)(r).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"),w=(...e)=>(0,c.QP)((0,l.A)(...e)),_=(e,t="value")=>{const n=e?.root?.children[0]?.children;if(!n||!n?.length)return"";let r="";return n.forEach(e=>{switch(e.type){case"text":r+=e.text;break;case"mention":r+=e.data[t];break;case"linebreak":r+="\n"}}),r},y=(e,t=[],n="value",r={type:"mention",version:1,data:{},size:"md",by:"label"})=>{const s={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)s.root.children[0].children.push({type:"linebreak",version:1});else if(e?.startsWith("%")&&e?.endsWith("%")){const a=t?.find(t=>t[n]===e.trim());s.root.children[0].children.push(a?{...r,data:{...a}}:{detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1})}else s.root.children[0].children.push({detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1})}),JSON.stringify(s)};function b(e,t=65){if(!e)return"";const n=e.split("/");let r=`${n.slice(0,3).join("/")} \u203a ${n.slice(3).filter(Boolean).join(" \u203a ")}`;return r.length>t&&(r=r.substring(0,t-3)+"..."),r}const v=e=>{const t=window.location.pathname;return Array.isArray(e)?e.some(e=>t.includes(e)):t.includes(e)},C=(e,t={})=>{if(!e)return;const{delay:n=1e3,retryDelay:r=200,maxRetries:s=5}=t,a=(t=0)=>{const i=document.getElementById(e);i?setTimeout(()=>{i.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n):t<s&&setTimeout(()=>{a(t+1)},r)};window.requestAnimationFrame(()=>{a()})},x=(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,r.__)("Invalid Date","surerank"));return(0,s.GP)(new Date(e),t)}catch(n){return(0,r.__)("No Date","surerank")}},S=(e,t=!0)=>{if(isNaN(e))return{from:"",to:""};const n=t?(0,i.R)():(0,o.K)();let r=new Date(n);return r.setDate(n.getDate()-e),r=(0,a.o)(r),{from:r,to:n}},E=(e,t={})=>{const{decimals:n=1,forceDecimals:r=!1}=t;if("number"!==typeof e||isNaN(e))return"0";const s=e<0,a=Math.abs(e);if(a<1e3)return s?`-${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`${s?"-":""}${r?l:l.replace(/\.?0+$/,"")}${o.suffix}`},T=e=>{const t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString()},A=(e,t,n,s="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,r.__)("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,s):L(a,s)},P=e=>{let t,n="pending";const r=e.then(e=>{n="success",t=e},e=>{n="error",t=e});return{read(){if("pending"===n)throw r;if("error"===n)throw t;if("success"===n)return t}}},$=e=>{var t;return e&&"string"===typeof e&&null!==(t=(new DOMParser).parseFromString(e,"text/html").documentElement.textContent)&&void 0!==t?t:e},O=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}},R=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}}):[],z=(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:[]}),N=(e,t)=>"error"===e?(0,r.sprintf)("%1$s %2$s",t,(0,r._n)("Issue","Issues",t,"surerank")):"warning"===e?(0,r.sprintf)("%1$s %2$s",t,(0,r._n)("Warning","Warnings",t,"surerank")):(0,r.__)("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,r.sprintf)((0,r.__)("%1$d %2$s need attention.","surerank"),e,(0,r._n)("issue","issues",e,"surerank")):(0,r.__)("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),r=n.searchParams;return Array.isArray(t)?t.forEach(e=>r.delete(e)):r.delete(t),n.toString()}catch(n){return e}},B=(e,t)=>(e&&"object"===typeof e&&Object.keys(e).forEach(n=>{e[n]&&"object"===typeof e[n]&&(e[n].category=t)}),e),F=(e,t,n)=>{const r=[];return d.Tv.forEach(s=>{if(s===t)r.push(...n);else{const t=V(s).type;r.push(...e.pageSeoChecks?.[t]||[])}}),r},V=e=>({type:`${e}Checks`,categorizedType:`categorized${e.charAt(0).toUpperCase()+e.slice(1)}Checks`}),W=e=>{let t=null!==e&&void 0!==e?e:"";return t.includes("sc-domain:")&&(t=t.replace(/sc-domain:/,"")),t.includes("https://")||t.includes("http://")||(t=`https://${t}`),t},q=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":E(e.value),renderDifference:null===e.value&&null===e.previous?"N/A":E(Math.abs(e?.value-e?.previous))})},76016(e,t,n){n.d(t,{$K:()=>k,HH:()=>S,Jj:()=>b,KT:()=>v,Op:()=>p,Rw:()=>C,Tv:()=>L,UM:()=>m,X:()=>_,dc:()=>x,de:()=>f,oI:()=>E,qt:()=>w,vr:()=>h,x8:()=>y}),n(51609);var r,s,a,i,o,l,u,c,d,g=n(27723);const p=null!==(r=window?.surerank_globals?.input_variable_suggestions)&&void 0!==r?r:null,h=[{id:"post_no_index",value:"no",label:(0,g.__)("No index","surerank"),description:(0,g.__)("Prevents search engines from listing your page in search results.","surerank")},{id:"post_no_follow",value:"no",label:(0,g.__)("No follow","surerank"),description:(0,g.__)("Tells search engines not to follow any links on your page.","surerank")},{id:"post_no_archive",value:"no",label:(0,g.__)("No archive","surerank"),description:(0,g.__)("Blocks search engines from storing a cached version of your page.","surerank")}],k=()=>(0,g.__)("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"),f=null!==(s=window?.surerank_globals?.wp_dashboard_url)&&void 0!==s?s:"",m=null!==(a=window?.surerank_globals?.description_length)&&void 0!==a?a:160,w=null!==(i=window?.surerank_globals?.title_length)&&void 0!==i?i:60,_=null!==(o=window?.surerank_globals?.url_length)&&void 0!==o?o:90,y=500,b=null!==(l=window?.surerank_globals?.enable_page_level_seo)&&void 0!==l&&l,v=null!==(u=window?.surerank_globals?.enable_google_console)&&void 0!==u&&u,C=null!==(c=window?.surerank_globals?.enable_schemas)&&void 0!==c&&c,x=null!==(d=window?.surerank_globals?.enable_migration)&&void 0!==d&&d,L=["page","keyword"],S="https://surerank.com/surerank-ai/?utm_medium=surerank_plugin",E=e=>e?e.includes("title")?w:e.includes("url")||e.includes("slug")?_:(e.includes("description"),m):m},1671(e,t,n){n.d(t,{E:()=>r});const r="surerank"},51609(e){e.exports=window.React},75795(e){e.exports=window.ReactDOM},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,862,5988,9743,4912,4865,5608,6115,1085,6152,359,9545,641,6018,2691,8426,4400,6770,938,8427,8562,7938,9171,2373,2738,91,908,8789,9658,8645,4973,5043,8732,5599,1811,4160,7683,5408,7040,703,4634,6061,9792,4787,8433,1817,1624,6784,5789],()=>e(e.s=90742)),e.O()}]);
Save
Back