11 lines
31 KiB
JavaScript
11 lines
31 KiB
JavaScript
import{o as _,c as v,e as Pr,r as E,f as w,d as F,F as G,g as Sr,a as M,w as H,h as W,t as O,n as N,i as Br,j as $,k as Wr,l as $r,b as Gr}from"./js/runtime-dom.esm-bundler.DYN7TRGp.js";import{g as wr,u as Nr,b as Zr,c as z,l as Vr,a as Jr}from"./js/index.ZNJz487u.js";import{u as Yr}from"./js/LicenseUpgrade.DwCB6v67.js";import{C as Kr,a as Xr}from"./js/Index.DjT4_3hb.js";import{U as Cr}from"./js/AnimatedNumber.DQvhUqP6.js";import{_ as I}from"./js/_plugin-vue_export-helper.BN1snXvA.js";import{D as Qr}from"./js/luxon.D0U2KiOE.js";import{u as et}from"./js/LicenseStore.DAzcp1Mc.js";import"./js/Button.Bac-oBXH.js";import"./js/Row.BtyZfqw7.js";import"./js/Check.BHN-SUwW.js";import"./js/constants.DAg4IXD1.js";import"./js/numbers.Bx2B3lvf.js";const rt={emits:["resize"],props:{targetLineCount:{default:1,type:Number},unit:{default:"px",type:String},min:{default:12,type:Number},max:{default:36,type:Number},constrainToElement:{type:[Boolean,Element],default(){return!1}},elementPadding:{type:Number,default(){return 0}}},data(){return{observer:null}},methods:{calculate(){const e=this.$el,r=this.unit==="px"?1:.05;let t=this.max;if(e.style.display="inline-block",e.style.lineHeight="1px",e.style.fontSize=t+this.unit,this.constrainToElement)for(;e.offsetWidth>this.constrainToElement.offsetWidth-this.elementPadding&&t>this.min;)t-=r,e.style.fontSize=t+this.unit;else for(;e.offsetHeight>this.targetLineCount&&t>this.min;)t-=r,e.style.fontSize=t+this.unit;this.$emit("resize",{size:t,unit:this.unit}),e.style.display=null,e.style.lineHeight=null}},mounted(){this.calculate(),"MutationObserver"in window&&this.observer===null&&(this.observer=new MutationObserver(this.calculate),this.observer.observe(this.$el,{subtree:!0,characterData:!0})),window.addEventListener("resize",this.calculate)},beforeUnmount:function(){this.observer.disconnect(),window.removeEventListener("resize",this.calculate)}};function tt(e,r,t,n,i,s){return _(),v("span",null,[Pr(e.$slots,"default")])}const nt=I(rt,[["render",tt]]),it={components:{UtilAnimatedNumber:Cr,UtilFitText:nt},props:{parts:{type:Array,required:!0},label:{type:String,required:!0},total:{type:Number,required:!0},animatedNumber:{type:Boolean,default(){return!0}},maxTotal:{type:String,required:!1},isLabelColored:{type:Boolean,default(){return!1}}},computed:{getColorClass(){if(!this.maxTotal)return"";switch(!0){case 33>=this.total:return"red";case 66>=this.total:return"orange";default:return"green"}},getClass(){return`total-container-large ${this.getColorClass}`}}},ot={class:"aioseo-donut-chart"},st={key:0,viewBox:"0 0 33.83098862 33.83098862",xmlns:"http://www.w3.org/2000/svg"},at={key:1,viewBox:"0 0 33.83098862 33.83098862",xmlns:"http://www.w3.org/2000/svg"},ut=["stroke-dasharray"],lt=["stroke","stroke-dasharray"],ct={class:"total-amount-wrapper"},dt={class:"total-amount"},ft={class:"total"},pt=["innerHTML"],ht={key:2,class:"total-max"},gt=["innerHTML"];function _t(e,r,t,n,i,s){const o=E("util-animated-number"),a=E("util-fit-text");return _(),v("div",ot,[t.total===0?(_(),v("svg",st,[...r[0]||(r[0]=[w("circle",{class:"aioseo-donut-chart-score__circle",stroke:"#e8e8eb","stroke-dasharray":"100","stroke-linecap":"round","stroke-width":2,fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"},null,-1)])])):F("",!0),0<t.total?(_(),v("svg",at,[(_(!0),v(G,null,Sr(t.parts,(c,l)=>(_(),v(G,{key:l},[Math.round(c.ratio)&&l!==0?(_(),v("circle",{key:0,class:"aioseo-donut-chart-score__circle",stroke:"#FFFFFF","stroke-dasharray":`${Math.round(c.ratio)} ${parseFloat(99-Math.round(c.ratio))}`,"stroke-linecap":"round","stroke-width":2.5,fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"},null,8,ut)):F("",!0),Math.round(c.ratio)?(_(),v("circle",{key:1,class:"aioseo-donut-chart-score__circle",stroke:c.color,"stroke-dasharray":`${Math.round(c.ratio)===100?100:Math.round(c.ratio)-1} 100`,"stroke-linecap":"round","stroke-width":2,fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"},null,8,lt)):F("",!0)],64))),128))])):F("",!0),w("div",ct,[w("div",dt,[w("div",ft,[M(a,{max:32,"constrain-to-element":e.$el,class:N(["total-container",s.getClass])},{default:H(()=>[t.animatedNumber?(_(),W(o,{key:0,number:parseInt(t.total)},null,8,["number"])):(_(),v("div",{key:1,innerHTML:parseInt(t.total)},null,8,pt)),t.maxTotal?(_(),v("span",ht," / "+O(parseInt(t.maxTotal)),1)):F("",!0)]),_:1},8,["constrain-to-element","class"])]),w("div",{class:N(["label",{[s.getColorClass]:t.isLabelColored}]),innerHTML:t.label},null,10,gt)])])])}const bt=I(it,[["render",_t]]),vt={},mt={class:"aioseo-seo-site-score-loading",viewBox:"0 0 33.83098862 33.83098862",xmlns:"http://www.w3.org/2000/svg"};function yt(e,r){return _(),v("svg",mt,[...r[0]||(r[0]=[w("circle",{fill:"none",class:"aioseo-seo-site-score-loading__circle",cx:"16.91549431",cy:"16.91549431",r:"15.91549431","stroke-linecap":"round","stroke-width":"2","stroke-dasharray":"93","stroke-dashoffset":"90"},null,-1)])])}const xt=I(vt,[["render",yt]]),kt={emits:["onLabelClick"],components:{CoreDonutChart:bt,UtilAnimatedNumber:Cr,SvgSeoSiteScoreLoading:xt},props:{parts:{type:Array,required:!0},total:{type:Number,required:!0},label:{type:String,required:!0},link:{type:String,required:!1},animatedNumber:{type:Boolean,default(){return!0}},maxTotal:{type:String,required:!1},loading:{type:Boolean,required:!1},loadingText:{type:String,required:!1}},computed:{sortedParts(){const e=this.parts.map(r=>r);return e.forEach(function(r,t){r.last&&(e.push(e[t]),e.splice(t,1))}),e}},methods:{handleLabelClick(e,r){r?.emitValue&&(e.preventDefault(),this.$emit("onLabelClick",r.emitValue))}}},St={class:"aioseo-donut-chart-with-legend"},wt={class:"chart-left"},Ct={key:0,class:"aioseo-donut-chart-with-legend__loading"},Tt={key:0,class:"aioseo-donut-chart-with-legend__loading-text"},Rt={class:"chart-right"},At={class:"legend-amount"},Lt=["innerHTML"],qt={key:0,class:"chart-more"},Ot=["innerHTML"];function Ft(e,r,t,n,i,s){const o=E("svg-seo-site-score-loading"),a=E("core-donut-chart"),c=E("util-animated-number");return _(),v("div",St,[w("div",wt,[t.loading?(_(),v("div",Ct,[M(o),t.loadingText?(_(),v("div",Tt,O(t.loadingText),1)):F("",!0)])):(_(),W(a,{key:1,parts:t.parts,total:t.total,label:t.label,animatedNumber:t.animatedNumber,maxTotal:t.maxTotal,"is-label-colored":""},null,8,["parts","total","label","animatedNumber","maxTotal"]))]),w("div",Rt,[(_(!0),v(G,null,Sr(s.sortedParts,(l,h)=>(_(),v("div",{class:"legend",key:h},[w("div",{class:"legend-bullet",style:Br(`background-color: ${l.color}`)},null,4),w("span",At,[t.animatedNumber?(_(),W(c,{key:0,number:parseInt(l.count)},null,8,["number"])):(_(),v("div",{key:1,innerHTML:parseInt(l.count)},null,8,Lt))]),(_(),W(Wr(l.link?"a":"span"),{href:l.link||null,class:N(["legend-label",{"is-link":l.link}]),onClick:u=>s.handleLabelClick(u,l)},{default:H(()=>[$(O(l.name),1)]),_:2},1032,["href","class","onClick"]))]))),128)),t.link&&t.total>0?(_(),v("div",qt,[w("span",{innerHTML:t.link},null,8,Ot)])):F("",!0)])])}const Et=I(kt,[["render",Ft]]);function Ut(e,r){var t=0,n,i;r=r||{};function s(){var o=n,a=arguments.length,c,l;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(l=0;l<a;l++)if(o.args[l]!==arguments[l]){o=o.next;continue e}return o!==n&&(o===i&&(i=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n,o.prev=null,n.prev=o,n=o),o.val}for(c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];return o={args:c,val:e.apply(null,c)},n?(n.prev=o,o.next=n):i=o,t===r.maxSize?(i=i.prev,i.next=null):t++,n=o,o.val}return s.clear=function(){n=null,i=null,t=0},s}var V={},je;function jt(){return je||(je=1,(function(e){(function(){var r={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(a){return i(o(a),arguments)}function n(a,c){return t.apply(null,[a].concat(c||[]))}function i(a,c){var l=1,h=a.length,u,k="",b,m,f,R,A,q,L,d;for(b=0;b<h;b++)if(typeof a[b]=="string")k+=a[b];else if(typeof a[b]=="object"){if(f=a[b],f.keys)for(u=c[l],m=0;m<f.keys.length;m++){if(u==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',f.keys[m],f.keys[m-1]));u=u[f.keys[m]]}else f.param_no?u=c[f.param_no]:u=c[l++];if(r.not_type.test(f.type)&&r.not_primitive.test(f.type)&&u instanceof Function&&(u=u()),r.numeric_arg.test(f.type)&&typeof u!="number"&&isNaN(u))throw new TypeError(t("[sprintf] expecting number but found %T",u));switch(r.number.test(f.type)&&(L=u>=0),f.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,f.width?parseInt(f.width):0);break;case"e":u=f.precision?parseFloat(u).toExponential(f.precision):parseFloat(u).toExponential();break;case"f":u=f.precision?parseFloat(u).toFixed(f.precision):parseFloat(u);break;case"g":u=f.precision?String(Number(u.toPrecision(f.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=f.precision?u.substring(0,f.precision):u;break;case"t":u=String(!!u),u=f.precision?u.substring(0,f.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=f.precision?u.substring(0,f.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=f.precision?u.substring(0,f.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase();break}r.json.test(f.type)?k+=u:(r.number.test(f.type)&&(!L||f.sign)?(d=L?"+":"-",u=u.toString().replace(r.sign,"")):d="",A=f.pad_char?f.pad_char==="0"?"0":f.pad_char.charAt(1):" ",q=f.width-(d+u).length,R=f.width&&q>0?A.repeat(q):"",k+=f.align?d+u+R:A==="0"?d+R+u:R+d+u)}return k}var s=Object.create(null);function o(a){if(s[a])return s[a];for(var c=a,l,h=[],u=0;c;){if((l=r.text.exec(c))!==null)h.push(l[0]);else if((l=r.modulo.exec(c))!==null)h.push("%");else if((l=r.placeholder.exec(c))!==null){if(l[2]){u|=1;var k=[],b=l[2],m=[];if((m=r.key.exec(b))!==null)for(k.push(m[1]);(b=b.substring(m[0].length))!=="";)if((m=r.key_access.exec(b))!==null)k.push(m[1]);else if((m=r.index_access.exec(b))!==null)k.push(m[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=k}else u|=2;if(u===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");h.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");c=c.substring(l[0].length)}return s[a]=h}e.sprintf=t,e.vsprintf=n,typeof window<"u"&&(window.sprintf=t,window.vsprintf=n)})()})(V)),V}var Mt=jt();const Dt=wr(Mt),Ht=Ut(console.error);function P(e,...r){try{return Dt.sprintf(e,...r)}catch(t){return t instanceof Error&&Ht(`sprintf error:
|
||
|
||
`+t.toString()),e}}var Te,Tr,D,Rr;Te={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1};Tr=["(","?"];D={")":["("],":":["?","?:"]};Rr=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function It(e){for(var r=[],t=[],n,i,s,o;n=e.match(Rr);){for(i=n[0],s=e.substr(0,n.index).trim(),s&&r.push(s);o=t.pop();){if(D[i]){if(D[i][0]===o){i=D[i][1]||i;break}}else if(Tr.indexOf(o)>=0||Te[o]<Te[i]){t.push(o);break}r.push(o)}D[i]||t.push(i),e=e.substr(n.index+i.length)}return e=e.trim(),e&&r.push(e),r.concat(t.reverse())}var zt={"!":function(e){return!e},"*":function(e,r){return e*r},"/":function(e,r){return e/r},"%":function(e,r){return e%r},"+":function(e,r){return e+r},"-":function(e,r){return e-r},"<":function(e,r){return e<r},"<=":function(e,r){return e<=r},">":function(e,r){return e>r},">=":function(e,r){return e>=r},"==":function(e,r){return e===r},"!=":function(e,r){return e!==r},"&&":function(e,r){return e&&r},"||":function(e,r){return e||r},"?:":function(e,r,t){if(e)throw r;return t}};function Pt(e,r){var t=[],n,i,s,o,a,c;for(n=0;n<e.length;n++){if(a=e[n],o=zt[a],o){for(i=o.length,s=Array(i);i--;)s[i]=t.pop();try{c=o.apply(null,s)}catch(l){return l}}else r.hasOwnProperty(a)?c=r[a]:c=+a;t.push(c)}return t[0]}function Bt(e){var r=It(e);return function(t){return Pt(r,t)}}function Wt(e){var r=Bt(e);return function(t){return+r({n:t})}}var Me={contextDelimiter:"",onMissingKey:null};function $t(e){var r,t,n;for(r=e.split(";"),t=0;t<r.length;t++)if(n=r[t].trim(),n.indexOf("plural=")===0)return n.substr(7)}function Re(e,r){var t;this.data=e,this.pluralForms={},this.options={};for(t in Me)this.options[t]=r!==void 0&&t in r?r[t]:Me[t]}Re.prototype.getPluralForm=function(e,r){var t=this.pluralForms[e],n,i,s;return t||(n=this.data[e][""],s=n["Plural-Forms"]||n["plural-forms"]||n.plural_forms,typeof s!="function"&&(i=$t(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),s=Wt(i)),t=this.pluralForms[e]=s),t(r)};Re.prototype.dcnpgettext=function(e,r,t,n,i){var s,o,a;return i===void 0?s=0:s=this.getPluralForm(e,i),o=t,r&&(o=r+this.options.contextDelimiter+t),a=this.data[e][o],a&&a[s]?a[s]:(this.options.onMissingKey&&this.options.onMissingKey(t,e),s===0?t:n)};const De={"":{plural_forms(e){return e===1?0:1}}},Gt=/^i18n\.(n?gettext|has_translation)(_|$)/,Nt=(e,r,t)=>{const n=new Re({}),i=new Set,s=()=>{i.forEach(d=>d())},o=d=>(i.add(d),()=>i.delete(d)),a=(d="default")=>n.data[d],c=(d,p="default")=>{n.data[p]={...n.data[p],...d},n.data[p][""]={...De[""],...n.data[p]?.[""]},delete n.pluralForms[p]},l=(d,p)=>{c(d,p),s()},h=(d,p="default")=>{n.data[p]={...n.data[p],...d,"":{...De[""],...n.data[p]?.[""],...d?.[""]}},delete n.pluralForms[p],s()},u=(d,p)=>{n.data={},n.pluralForms={},l(d,p)},k=(d="default",p,g,S,y)=>(n.data[d]||c(void 0,d),n.dcnpgettext(d,p,g,S,y)),b=(d="default")=>d,m=(d,p)=>{let g=k(p,void 0,d);return t?(g=t.applyFilters("i18n.gettext",g,d,p),t.applyFilters("i18n.gettext_"+b(p),g,d,p)):g},f=(d,p,g)=>{let S=k(g,p,d);return t?(S=t.applyFilters("i18n.gettext_with_context",S,d,p,g),t.applyFilters("i18n.gettext_with_context_"+b(g),S,d,p,g)):S},R=(d,p,g,S)=>{let y=k(S,void 0,d,p,g);return t?(y=t.applyFilters("i18n.ngettext",y,d,p,g,S),t.applyFilters("i18n.ngettext_"+b(S),y,d,p,g,S)):y},A=(d,p,g,S,y)=>{let U=k(y,S,d,p,g);return t?(U=t.applyFilters("i18n.ngettext_with_context",U,d,p,g,S,y),t.applyFilters("i18n.ngettext_with_context_"+b(y),U,d,p,g,S,y)):U},q=()=>f("ltr","text direction")==="rtl",L=(d,p,g)=>{const S=p?p+""+d:d;let y=!!n.data?.[g??"default"]?.[S];return t&&(y=t.applyFilters("i18n.has_translation",y,d,p,g),y=t.applyFilters("i18n.has_translation_"+b(g),y,d,p,g)),y};if(t){const d=p=>{Gt.test(p)&&s()};t.addAction("hookAdded","core/i18n",d),t.addAction("hookRemoved","core/i18n",d)}return{getLocaleData:a,setLocaleData:l,addLocaleData:h,resetLocaleData:u,subscribe:o,__:m,_x:f,_n:R,_nx:A,isRTL:q,hasTranslation:L}};function Ar(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function Ae(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function He(e,r){return function(n,i,s,o=10){const a=e[r];if(!Ae(n)||!Ar(i))return;if(typeof s!="function"){console.error("The hook callback must be a function.");return}if(typeof o!="number"){console.error("If specified, the hook priority must be a number.");return}const c={callback:s,priority:o,namespace:i};if(a[n]){const l=a[n].handlers;let h;for(h=l.length;h>0&&!(o>=l[h-1].priority);h--);h===l.length?l[h]=c:l.splice(h,0,c),a.__current.forEach(u=>{u.name===n&&u.currentIndex>=h&&u.currentIndex++})}else a[n]={handlers:[c],runs:0};n!=="hookAdded"&&e.doAction("hookAdded",n,i,s,o)}}function B(e,r,t=!1){return function(i,s){const o=e[r];if(!Ae(i)||!t&&!Ar(s))return;if(!o[i])return 0;let a=0;if(t)a=o[i].handlers.length,o[i]={runs:o[i].runs,handlers:[]};else{const c=o[i].handlers;for(let l=c.length-1;l>=0;l--)c[l].namespace===s&&(c.splice(l,1),a++,o.__current.forEach(h=>{h.name===i&&h.currentIndex>=l&&h.currentIndex--}))}return i!=="hookRemoved"&&e.doAction("hookRemoved",i,s),a}}function Ie(e,r){return function(n,i){const s=e[r];return typeof i<"u"?n in s&&s[n].handlers.some(o=>o.namespace===i):n in s}}function ze(e,r,t=!1){return function(i,...s){const o=e[r];o[i]||(o[i]={handlers:[],runs:0}),o[i].runs++;const a=o[i].handlers;if(!a||!a.length)return t?s[0]:void 0;const c={name:i,currentIndex:0};for(o.__current.push(c);c.currentIndex<a.length;){const h=a[c.currentIndex].callback.apply(null,s);t&&(s[0]=h),c.currentIndex++}if(o.__current.pop(),t)return s[0]}}function Pe(e,r){return function(){var n;const i=e[r];return(n=i.__current[i.__current.length-1]?.name)!==null&&n!==void 0?n:null}}function Be(e,r){return function(n){const i=e[r];return typeof n>"u"?typeof i.__current[0]<"u":i.__current[0]?n===i.__current[0].name:!1}}function We(e,r){return function(n){const i=e[r];if(Ae(n))return i[n]&&i[n].runs?i[n].runs:0}}class Zt{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=He(this,"actions"),this.addFilter=He(this,"filters"),this.removeAction=B(this,"actions"),this.removeFilter=B(this,"filters"),this.hasAction=Ie(this,"actions"),this.hasFilter=Ie(this,"filters"),this.removeAllActions=B(this,"actions",!0),this.removeAllFilters=B(this,"filters",!0),this.doAction=ze(this,"actions"),this.applyFilters=ze(this,"filters",!0),this.currentAction=Pe(this,"actions"),this.currentFilter=Pe(this,"filters"),this.doingAction=Be(this,"actions"),this.doingFilter=Be(this,"filters"),this.didAction=We(this,"actions"),this.didFilter=We(this,"filters")}}function Vt(){return new Zt}const Lr=Vt(),{addAction:Kn,addFilter:Xn,removeAction:Qn,removeFilter:ei,hasAction:ri,hasFilter:ti,removeAllActions:ni,removeAllFilters:ii,doAction:oi,applyFilters:si,currentAction:ai,currentFilter:ui,doingAction:li,doingFilter:ci,didAction:di,didFilter:fi,actions:pi,filters:hi}=Lr,x=Nt(void 0,void 0,Lr);x.getLocaleData.bind(x);const Jt=x.setLocaleData.bind(x);x.resetLocaleData.bind(x);x.subscribe.bind(x);const C=x.__.bind(x);x._x.bind(x);x._n.bind(x);x._nx.bind(x);x.isRTL.bind(x);x.hasTranslation.bind(x);window.aioseoBrokenLinkChecker.translations?Jt(window.aioseoBrokenLinkChecker.translations.translations,"broken-link-checker-seo"):window.aioseoBrokenLinkChecker&&console.warn("BLC translations couldn't be loaded.");const T="broken-link-checker-seo",Yt={setup(){return{licenseStore:et(),licenseUpgradeComposable:Yr(),optionsStore:Zr(),rootStore:Nr()}},components:{CoreBlur:Xr,CoreCta:Kr,CoreDonutChartWithLegend:Et},props:{isWpDashboard:{type:Boolean,default(){return!1}}},data(){return{loading:!1,strings:{description:C("Below is the distribution of the links on your site. Fixing broken links can help you improve your site's SEO.",T),totalLinks:C("Total Links",T),ctaButtonText:C("Go to Settings",T),ctaHeader:P(C("Connect Your Site with %1$s",T),"Broken Link Checker"),ctaDescription:P(C("Before you can start using %1$s, you need to connect the plugin to your account.",T),"Broken Link Checker")},parts:[{slug:"broken",name:C("Broken",T),color:"#DF2A4A"},{slug:"redirects",name:C("Redirecting",T),color:"#F18200"},{slug:"good",name:C("Good",T),color:"#00AA63"}]}},computed:{linkStatusOverview(){return this.rootStore.aioseoBrokenLinkChecker?.linkStatusOverview||{total:0,good:0,broken:0,redirects:0}},totalLinks(){return this.linkStatusOverview.total},licenseInfo(){if(!this.optionsStore.internalOptions.internal.license.expires)return"";const e=Qr.fromMillis(this.optionsStore.internalOptions.internal.license.expires*1e3);if(3e3<=e.year)return P(C("You have a total quota of %1$s links (%2$s remaining). Your free subscription resets each month.",T),`<strong>${this.optionsStore.internalOptions.internal.license.quota.toLocaleString()}</strong>`,`${this.optionsStore.internalOptions.internal.license.quotaRemaining.toLocaleString()}`,`<strong>${C("Free Forever",T)}</strong>`);const t=e.toFormat("MM/dd/yyyy");return P(C("You have a total quota of %1$s links (%2$s remaining), which renews on %3$s.",T),`<strong>${this.optionsStore.internalOptions.internal.license.quota.toLocaleString()}</strong>`,`${this.optionsStore.internalOptions.internal.license.quotaRemaining.toLocaleString()}`,`<strong>${t}</strong>`)},showUpgradeLink(){return this.optionsStore.internalOptions.internal.license.level&&this.optionsStore.internalOptions.internal.license.level.toLowerCase()!=="elite"},sortedParts(){const e=this.parts;return e.forEach((r,t)=>{e[t].count=this.linkStatusOverview[r.slug]||0,e[t].ratio=t===0?100:r.count/this.totalLinks*100;const n=r.slug;e[t].link=`${this.rootStore.aioseoBrokenLinkChecker.urls.blc.links}${n!=="all"?"#/?filter="+n:""}`}),e.filter(r=>r.count!==0),e.forEach((r,t)=>(t===0||e.forEach((n,i)=>(t<i&&(r.ratio=r.ratio+n.ratio),r)),r)),e},linksUrl(){return this.rootStore.aioseoBrokenLinkChecker.urls.blc.links},settingsUrl(){return`${this.rootStore.aioseoBrokenLinkChecker.urls.blc.links}#/settings`}},methods:{goToSettings(){window.location.href=this.settingsUrl}}},Kt={class:"aioseo-blc-app"},Xt={key:0,class:"aioseo-blc-overview-connect"},Qt={class:"aioseo-blc-overview-description"},en={class:"aioseo-blc-overview-description"},rn={key:0,class:"aioseo-blc-overview-license-info"},tn=["innerHTML"],nn={key:0};function on(e,r,t,n,i,s){const o=E("core-donut-chart-with-legend"),a=E("core-blur"),c=E("core-cta");return _(),v("div",Kt,[w("div",{class:N(["aioseo-blc-overview",[t.isWpDashboard?"aioseo-blc-overview--wp-styles":"",n.licenseStore.isUnlicensed?"aioseo-blc-overview--unlicensed":""]])},[n.licenseStore.isUnlicensed?(_(),v("div",Xt,[M(a,null,{default:H(()=>[w("p",Qt,O(i.strings.description),1),M(o,{parts:s.sortedParts,total:s.totalLinks,label:i.strings.totalLinks,animatedNumber:!t.isWpDashboard},null,8,["parts","total","label","animatedNumber"])]),_:1}),M(c,{"cta-button-action":"",onCtaButtonClick:s.goToSettings,"cta-button-loading":i.loading,"show-link":!1,"button-text":i.strings.ctaButtonText,"align-top":"",hideBonus:""},{"header-text":H(()=>[$(O(i.strings.ctaHeader),1)]),description:H(()=>[$(O(i.strings.ctaDescription),1)]),_:1},8,["onCtaButtonClick","cta-button-loading","button-text"])])):(_(),v(G,{key:1},[w("p",en,O(i.strings.description),1),M(o,{parts:s.sortedParts,total:s.totalLinks,label:i.strings.totalLinks,animatedNumber:!t.isWpDashboard},null,8,["parts","total","label","animatedNumber"]),s.licenseInfo?(_(),v("div",rn,[w("p",{innerHTML:s.licenseInfo},null,8,tn),s.showUpgradeLink?(_(),v("p",nn,[w("span",null,O(n.licenseUpgradeComposable.strings.toUnlock)+" ",1),w("strong",null,[w("a",{href:"#",onClick:r[0]||(r[0]=$r(l=>n.licenseUpgradeComposable.openLicenseUpgradePopup("overview-widget","quota-info"),["prevent","stop"]))},O(n.licenseUpgradeComposable.upgradeAnchor.value),1)]),r[1]||(r[1]=$(". ",-1))])):F("",!0)])):F("",!0)],64))],2)])}const sn=I(Yt,[["render",on]]),an=(e,r)=>{const t=document.createElement("style");t.innerHTML=`@keyframes ${r} {
|
||
from { opacity: 0.99; }
|
||
to { opacity: 1; }
|
||
}
|
||
${e} {
|
||
animation-duration: 0.001s;
|
||
animation-name: ${r};
|
||
}`,document.head.appendChild(t)};var J,$e;function un(){if($e)return J;$e=1;var e=typeof z=="object"&&z&&z.Object===Object&&z;return J=e,J}var Y,Ge;function ln(){if(Ge)return Y;Ge=1;var e=un(),r=typeof self=="object"&&self&&self.Object===Object&&self,t=e||r||Function("return this")();return Y=t,Y}var K,Ne;function Le(){if(Ne)return K;Ne=1;var e=ln(),r=e.Symbol;return K=r,K}var X,Ze;function cn(){if(Ze)return X;Ze=1;function e(r,t){for(var n=-1,i=r==null?0:r.length,s=Array(i);++n<i;)s[n]=t(r[n],n,r);return s}return X=e,X}var Q,Ve;function dn(){if(Ve)return Q;Ve=1;var e=Array.isArray;return Q=e,Q}var ee,Je;function fn(){if(Je)return ee;Je=1;var e=Le(),r=Object.prototype,t=r.hasOwnProperty,n=r.toString,i=e?e.toStringTag:void 0;function s(o){var a=t.call(o,i),c=o[i];try{o[i]=void 0;var l=!0}catch{}var h=n.call(o);return l&&(a?o[i]=c:delete o[i]),h}return ee=s,ee}var re,Ye;function pn(){if(Ye)return re;Ye=1;var e=Object.prototype,r=e.toString;function t(n){return r.call(n)}return re=t,re}var te,Ke;function hn(){if(Ke)return te;Ke=1;var e=Le(),r=fn(),t=pn(),n="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function o(a){return a==null?a===void 0?i:n:s&&s in Object(a)?r(a):t(a)}return te=o,te}var ne,Xe;function gn(){if(Xe)return ne;Xe=1;function e(r){return r!=null&&typeof r=="object"}return ne=e,ne}var ie,Qe;function _n(){if(Qe)return ie;Qe=1;var e=hn(),r=gn(),t="[object Symbol]";function n(i){return typeof i=="symbol"||r(i)&&e(i)==t}return ie=n,ie}var oe,er;function bn(){if(er)return oe;er=1;var e=Le(),r=cn(),t=dn(),n=_n(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function o(a){if(typeof a=="string")return a;if(t(a))return r(a,o)+"";if(n(a))return s?s.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}return oe=o,oe}var se,rr;function Z(){if(rr)return se;rr=1;var e=bn();function r(t){return t==null?"":e(t)}return se=r,se}var ae,tr;function vn(){if(tr)return ae;tr=1;function e(r,t,n){var i=-1,s=r.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++i<s;)o[i]=r[i+t];return o}return ae=e,ae}var ue,nr;function mn(){if(nr)return ue;nr=1;var e=vn();function r(t,n,i){var s=t.length;return i=i===void 0?s:i,!n&&i>=s?t:e(t,n,i)}return ue=r,ue}var le,ir;function qr(){if(ir)return le;ir=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=r+t+n,s="\\ufe0e\\ufe0f",o="\\u200d",a=RegExp("["+o+e+i+s+"]");function c(l){return a.test(l)}return le=c,le}var ce,or;function yn(){if(or)return ce;or=1;function e(r){return r.split("")}return ce=e,ce}var de,sr;function xn(){if(sr)return de;sr=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=r+t+n,s="\\ufe0e\\ufe0f",o="["+e+"]",a="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",l="(?:"+a+"|"+c+")",h="[^"+e+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",m=l+"?",f="["+s+"]?",R="(?:"+b+"(?:"+[h,u,k].join("|")+")"+f+m+")*",A=f+m+R,q="(?:"+[h+a+"?",a,u,k,o].join("|")+")",L=RegExp(c+"(?="+c+")|"+q+A,"g");function d(p){return p.match(L)||[]}return de=d,de}var fe,ar;function kn(){if(ar)return fe;ar=1;var e=yn(),r=qr(),t=xn();function n(i){return r(i)?t(i):e(i)}return fe=n,fe}var pe,ur;function Sn(){if(ur)return pe;ur=1;var e=mn(),r=qr(),t=kn(),n=Z();function i(s){return function(o){o=n(o);var a=r(o)?t(o):void 0,c=a?a[0]:o.charAt(0),l=a?e(a,1).join(""):o.slice(1);return c[s]()+l}}return pe=i,pe}var he,lr;function wn(){if(lr)return he;lr=1;var e=Sn(),r=e("toUpperCase");return he=r,he}var ge,cr;function Cn(){if(cr)return ge;cr=1;var e=Z(),r=wn();function t(n){return r(e(n).toLowerCase())}return ge=t,ge}var _e,dr;function Tn(){if(dr)return _e;dr=1;function e(r,t,n,i){var s=-1,o=r==null?0:r.length;for(i&&o&&(n=r[++s]);++s<o;)n=t(n,r[s],s,r);return n}return _e=e,_e}var be,fr;function Rn(){if(fr)return be;fr=1;function e(r){return function(t){return r?.[t]}}return be=e,be}var ve,pr;function An(){if(pr)return ve;pr=1;var e=Rn(),r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},t=e(r);return ve=t,ve}var me,hr;function Ln(){if(hr)return me;hr=1;var e=An(),r=Z(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",o=n+i+s,a="["+o+"]",c=RegExp(a,"g");function l(h){return h=r(h),h&&h.replace(t,e).replace(c,"")}return me=l,me}var ye,gr;function qn(){if(gr)return ye;gr=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function r(t){return t.match(e)||[]}return ye=r,ye}var xe,_r;function On(){if(_r)return xe;_r=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function r(t){return e.test(t)}return xe=r,xe}var ke,br;function Fn(){if(br)return ke;br=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=r+t+n,s="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",a="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",l="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",u="A-Z\\xc0-\\xd6\\xd8-\\xde",k="\\ufe0e\\ufe0f",b=a+c+l+h,m="['’]",f="["+b+"]",R="["+i+"]",A="\\d+",q="["+s+"]",L="["+o+"]",d="[^"+e+b+A+s+o+u+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+R+"|"+p+")",S="[^"+e+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",U="[\\ud800-\\udbff][\\udc00-\\udfff]",j="["+u+"]",Or="\\u200d",qe="(?:"+L+"|"+d+")",Fr="(?:"+j+"|"+d+")",Oe="(?:"+m+"(?:d|ll|m|re|s|t|ve))?",Fe="(?:"+m+"(?:D|LL|M|RE|S|T|VE))?",Ee=g+"?",Ue="["+k+"]?",Er="(?:"+Or+"(?:"+[S,y,U].join("|")+")"+Ue+Ee+")*",Ur="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Mr=Ue+Ee+Er,Dr="(?:"+[q,y,U].join("|")+")"+Mr,Hr=RegExp([j+"?"+L+"+"+Oe+"(?="+[f,j,"$"].join("|")+")",Fr+"+"+Fe+"(?="+[f,j+qe,"$"].join("|")+")",j+"?"+qe+"+"+Oe,j+"+"+Fe,jr,Ur,A,Dr].join("|"),"g");function Ir(zr){return zr.match(Hr)||[]}return ke=Ir,ke}var Se,vr;function En(){if(vr)return Se;vr=1;var e=qn(),r=On(),t=Z(),n=Fn();function i(s,o,a){return s=t(s),o=a?void 0:o,o===void 0?r(s)?n(s):e(s):s.match(o)||[]}return Se=i,Se}var we,mr;function Un(){if(mr)return we;mr=1;var e=Tn(),r=Ln(),t=En(),n="['’]",i=RegExp(n,"g");function s(o){return function(a){return e(t(r(a).replace(i,"")),o,"")}}return we=s,we}var Ce,yr;function jn(){if(yr)return Ce;yr=1;var e=Cn(),r=Un(),t=r(function(n,i,s){return i=i.toLowerCase(),n+(s?e(i):i)});return Ce=t,Ce}var Mn=jn();const xr=wr(Mn),Dn=[{id:"aioseo-blc-overview-app",component:sn}],kr=e=>{let r=Gr({...e.component,name:"Standalone/DashboardWidgets"});r=Jr(r),Vr(r),r.mount("#"+e.id)};Dn.forEach(e=>{document.getElementById(e.id)?kr(e):(an("#"+e.id,xr(e.id)),document.addEventListener("animationstart",function(r){xr(e.id)===r.animationName&&kr(e)},{passive:!0}))});
|