Sid Gifari File Manager
🏠 Root
/
home
/
caldereriajp
/
www
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
js
/
Editing: Tabs.b92dcfbe.js
import{k as nt,u as rt,n as it}from"./links.96235554.js";import"./default-i18n.cc9dbff0.js";import{u as at,T as ot}from"./TruSeoScore.25c11e71.js";import{S as st}from"./SaveChanges.dad94bb3.js";import{B as lt,b as ut,S as ct}from"./Caret.7f04b0aa.js";import{S as dt}from"./Information.73bebac2.js";import{o as b,c as M,a as k,l as pe,U as Le,m as ce,V as Pe,W as ft,A,X as Be,Y as We,u as vt,q as pt,k as C,R as he,y as ht,Z as mt,p as me,z as y,_ as bt,f as N,n as z,B as U,O as yt,I as Ne,j as gt,d as X,w as V,$ as wt,C as St,r as $,M as Tt,e as H,F as se,h as le,t as I,b as L,g as G,i as ge}from"./vue.runtime.esm-bundler.a49acf4f.js";import{_ as Ae}from"./_plugin-vue_export-helper.bd508f36.js";import{T as Ct}from"./Slide.f53bd663.js";const kt={},Mt={viewBox:"0 0 6 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-ellipse"},_t=k("circle",{r:"2",transform:"matrix(-1 0 0 1 3 3)",fill:"currentColor",stroke:"currentColor","stroke-width":"2"},null,-1),Et=[_t];function $t(e,t){return b(),M("svg",Mt,Et)}const zt=Ae(kt,[["render",$t]]);var xe={locks:{},zIndex:2e3,enableRipple:!0};pe(xe);const Oe=pe(xe),_=e=>typeof e=="string",Lt=e=>typeof e=="boolean",be=e=>typeof e=="number",Pt=e=>typeof e=="function",Re=e=>Array.isArray(e),Bt=e=>e===window,De=e=>e==null?0:_(e)?(e=parseFloat(e),e=Number.isNaN(e)?0:e,e):Lt(e)?Number(e):e,we=(e,t)=>{if(e.length){const n=e.indexOf(t);if(n>-1)return e.splice(n,1)}},Ie=()=>typeof window<"u",Wt=(e,t,n)=>Math.min(n,Math.max(t,e));var Se=e=>e,Nt=()=>typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:self;function At(e,t){throw Error("Varlet ["+e+"]: "+t)}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(this,arguments)}function ye(e){return window.getComputedStyle(e)}function j(e){if(Bt(e)){var t=e.innerWidth,n=e.innerHeight,r={x:0,y:0,top:0,left:0,right:t,bottom:n,width:t,height:n};return de({},r,{toJSON:()=>r})}return e.getBoundingClientRect()}function xt(e){var t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function Ot(e){var t="scrollLeft"in e?e.scrollLeft:e.pageXOffset;return Math.max(t,0)}function Rt(e){for(var t=e;t&&!(!t.parentNode||(t=t.parentNode,t===document.body||t===document.documentElement));){var n=/(scroll|auto)/,{overflowY:r,overflow:i}=ye(t);if(n.test(r)||n.test(i))return t}return window}function Te(){var{width:e,height:t}=j(window);return e>t?{vMin:t,vMax:e}:{vMin:e,vMax:t}}var Ve=e=>_(e)&&e.endsWith("rem"),Dt=e=>_(e)&&e.endsWith("em")&&!e.endsWith("rem"),It=e=>_(e)&&e.endsWith("px")||be(e),Vt=e=>_(e)&&e.endsWith("%"),Fe=e=>_(e)&&e.endsWith("vw"),He=e=>_(e)&&e.endsWith("vh"),Xe=e=>_(e)&&e.endsWith("vmin"),Ye=e=>_(e)&&e.endsWith("vmax"),Ft=e=>_(e)&&e.startsWith("calc("),Ht=e=>_(e)&&e.startsWith("var("),Ue=e=>{if(be(e))return e;if(It(e))return+e.replace("px","");if(!Ie())return 0;var{width:t,height:n}=j(window);if(Fe(e))return+e.replace("vw","")*t/100;if(He(e))return+e.replace("vh","")*n/100;if(Ve(e)){var r=+e.replace("rem",""),i=ye(document.documentElement).fontSize;return r*parseFloat(i)}return Xe(e)?Te().vMin:Ye(e)?Te().vMax:_(e)?De(e):0},Xt=e=>{if(e!=null)return Vt(e)||Fe(e)||He(e)||Dt(e)||Ve(e)||Ft(e)||Ht(e)||Xe(e)||Ye(e)?e:Ue(e)+"px"};function q(e){var t=Nt();return t.requestAnimationFrame?t.requestAnimationFrame(e):t.setTimeout(e,16)}function je(){return new Promise(e=>{q(()=>{q(e)})})}function Yt(){return new Promise(e=>{q(e)})}function Ce(e,t){var{top:n=0,left:r=0,duration:i=300,animation:a}=t,o=Date.now(),l=xt(e),s=Ot(e);return new Promise(u=>{var f=()=>{var p=(Date.now()-o)/i;if(p<1){var g=l+(n-l)*a(p),c=s+(r-s)*a(p);e.scrollTo(c,g),q(f)}else e.scrollTo(r,n),u()};q(f)})}function Ut(){var e=typeof window<"u";return e&&"ontouchstart"in window}function qe(e){let t=!1;Le(()=>{e(),ce(()=>{t=!0})}),Pe(()=>{t&&e()})}function fe(e,t,n,r={}){if(!Ie())return;const{passive:i=!1,capture:a=!1}=r;let o=!1,l=!1;const s=c=>Pt(c)?c():vt(c),u=c=>{if(o||l)return;const h=s(c);h&&(h.addEventListener(t,n,{passive:i,capture:a}),o=!0)},f=c=>{if(!o||l)return;const h=s(c);h&&(h.removeEventListener(t,n,{capture:a}),o=!1)};let p;ft(e)&&(p=A(()=>e.value,(c,h)=>{f(h),u(c)}));const g=()=>{p==null||p(),f(e),l=!0};return qe(()=>{u(e)}),Be(()=>{f(e)}),We(()=>{f(e)}),g}var jt=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function qt(e){const t=he();return e in t.provides}function Gt(e){if(!qt(e))return{index:null,parentProvider:null,bindParent:null};const t=pt(e),{childInstances:n,collect:r,clear:i}=t,a=jt(t,["childInstances","collect","clear"]),o=he();return{index:C(()=>n.indexOf(o)),parentProvider:a,bindParent:u=>{Le(()=>{ce().then(()=>{r(o,u)})}),Be(()=>{ce().then(()=>{i(o,u)})})}}}function Zt(e){const t=[],n=r=>{if(r!=null&&r.component){n(r==null?void 0:r.component.subTree);return}Array.isArray(r==null?void 0:r.children)&&r.children.forEach(i=>{mt(i)&&(t.push(i),n(i))})};return n(e),t}function Jt(e){const t=he(),n=pe([]),r=[],i=C(()=>n.length),a=()=>{const u=Zt(t.subTree);n.sort((f,p)=>u.indexOf(f.vnode)-u.indexOf(p.vnode))},o=(u,f)=>{n.push(u),r.push(f),a()},l=(u,f)=>{we(n,u),we(r,f)};return{length:i,childProviders:r,bindChildren:u=>{ht(e,Object.assign({childInstances:n,collect:o,clear:l},u))}}}function ue(e,t){return Array.isArray(t)?t.reduce((n,r)=>(n[r]=e[r],n),{}):e[t]}function ne(e){var t="var",n=t+"-"+e,r=a=>a?a[0]==="$"?a.replace("$",t):a.startsWith("--")?""+n+a:n+"__"+a:n,i=function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return o.map(s=>{if(Re(s)){var[u,f,p=null]=s;return u?f:p}return s})};return{n:r,classes:i}}function F(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Re(e))return e.map(i=>i(...n));if(e)return e(...n)}function Y(e){return{type:[Function,Array],default:e}}function Kt(e,t){return e===!1?null:(e===!0&&t&&(e=t),"var-elevation--"+e)}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te.apply(this,arguments)}var{n:Ge}=ne("ripple"),ke=250;function Qt(e){var{zIndex:t,position:n}=ye(e);e.style.overflow="hidden",e.style.overflowX="hidden",e.style.overflowY="hidden",n==="static"&&(e.style.position="relative"),t==="auto"&&(e.style.zIndex="1")}function en(e,t){var{top:n,left:r}=j(e),{clientWidth:i,clientHeight:a}=e,o=Math.sqrt(Math.pow(i,2)+Math.pow(a,2))/2,l=o*2,s=t.touches[0].clientX-r,u=t.touches[0].clientY-n,f=(i-o*2)/2,p=(a-o*2)/2,g=s-o,c=u-o;return{x:g,y:c,centerX:f,centerY:p,size:l}}function Ze(e){var t=this._ripple;if(t.removeRipple(),!(t.disabled||t.tasker||!Oe.enableRipple)){var n=()=>{t.tasker=null;var{x:r,y:i,centerX:a,centerY:o,size:l}=en(this,e),s=document.createElement("div");s.classList.add(Ge()),s.style.opacity="0",s.style.transform="translate("+r+"px, "+i+"px) scale3d(.3, .3, .3)",s.style.width=l+"px",s.style.height=l+"px",t.color&&(s.style.backgroundColor=t.color),s.dataset.createdAt=String(performance.now()),Qt(this),this.appendChild(s),window.setTimeout(()=>{s.style.transform="translate("+a+"px, "+o+"px) scale3d(1, 1, 1)",s.style.opacity=".25"},20)};t.tasker=window.setTimeout(n,30)}}function ve(){var e=this._ripple,t=()=>{var n=this.querySelectorAll("."+Ge());if(n.length){var r=n[n.length-1],i=ke-performance.now()+Number(r.dataset.createdAt);window.setTimeout(()=>{r.style.opacity="0",window.setTimeout(()=>{var a;return(a=r.parentNode)==null?void 0:a.removeChild(r)},ke)},i)}};e.tasker?window.setTimeout(t,30):t()}function Je(){if(!(!Ut()||!Oe.enableRipple)){var e=this._ripple;e.tasker&&window.clearTimeout(e.tasker),e.tasker=null}}function tn(e,t){var n;e._ripple=te({tasker:null},(n=t.value)!=null?n:{},{removeRipple:ve.bind(e)}),e.addEventListener("touchstart",Ze,{passive:!0}),e.addEventListener("touchmove",Je,{passive:!0}),e.addEventListener("dragstart",ve,{passive:!0}),document.addEventListener("touchend",e._ripple.removeRipple,{passive:!0}),document.addEventListener("touchcancel",e._ripple.removeRipple,{passive:!0})}function nn(e){e.removeEventListener("touchstart",Ze),e.removeEventListener("touchmove",Je),e.removeEventListener("dragstart",ve),document.removeEventListener("touchend",e._ripple.removeRipple),document.removeEventListener("touchcancel",e._ripple.removeRipple)}function rn(e,t){var n,r,i,a,o={color:(n=t.value)==null?void 0:n.color,disabled:(r=t.value)==null?void 0:r.disabled},l=o.color!==((i=e._ripple)==null?void 0:i.color)||o.disabled!==((a=e._ripple)==null?void 0:a.disabled);if(l){var s,u;e._ripple=te({tasker:o.disabled?null:(s=e._ripple)==null?void 0:s.tasker,removeRipple:(u=e._ripple)==null?void 0:u.removeRipple},o)}}var an={mounted:tn,unmounted:nn,updated:rn,install(e){e.directive("ripple",this)}};const on=an;var J={offsetTop:{type:[String,Number],default:0},zIndex:{type:[String,Number],default:10},cssMode:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},onScroll:Y()};function Me(e,t,n,r,i,a,o){try{var l=e[a](o),s=l.value}catch(u){n(u);return}l.done?t(s):Promise.resolve(s).then(r,i)}function _e(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(s){Me(a,r,i,o,l,"next",s)}function l(s){Me(a,r,i,o,l,"throw",s)}o(void 0)})}}var{n:sn,classes:ln}=ne("sticky");function un(e,t){return b(),M("div",{class:z(e.classes(e.n(),[e.enableCSSMode,e.n("--css-mode")])),ref:"stickyEl",style:U({zIndex:e.toNumber(e.zIndex),top:e.enableCSSMode?e.offsetTop+"px":void 0,width:e.enableFixedMode?e.fixedWidth:void 0,height:e.enableFixedMode?e.fixedHeight:void 0})},[k("div",{class:z(e.n("wrapper")),ref:"wrapperEl",style:U({zIndex:e.toNumber(e.zIndex),position:e.enableFixedMode?"fixed":void 0,width:e.enableFixedMode?e.fixedWrapperWidth:void 0,height:e.enableFixedMode?e.fixedWrapperHeight:void 0,left:e.enableFixedMode?e.fixedLeft:void 0,top:e.enableFixedMode?e.fixedTop:void 0})},[N(e.$slots,"default")],6)],6)}var Ke=me({name:"VarSticky",props:J,setup(e){var t=y(null),n=y(null),r=y(!1),i=y("0px"),a=y("0px"),o=y("auto"),l=y("auto"),s=y("auto"),u=y("auto"),f=C(()=>!e.disabled&&e.cssMode),p=C(()=>!e.disabled&&!e.cssMode&&r.value),g=C(()=>Ue(e.offsetTop)),c,h=()=>{var{cssMode:S,disabled:B}=e;if(!B){var W=0;if(c!==window){var{top:O}=j(c);W=O}var R=n.value,E=t.value,{top:re,left:ie}=j(E),v=re-W;return v<=g.value?(S||(o.value=E.offsetWidth+"px",l.value=E.offsetHeight+"px",i.value=W+g.value+"px",a.value=ie+"px",s.value=R.offsetWidth+"px",u.value=R.offsetHeight+"px",r.value=!0),{offsetTop:g.value,isFixed:!0}):(r.value=!1,{offsetTop:v,isFixed:!1})}},d=()=>{if(c){var S=h();S&&F(e.onScroll,S.offsetTop,S.isFixed)}},w=function(){var S=_e(function*(){r.value=!1,yield Yt(),h()});return function(){return S.apply(this,arguments)}}(),P=function(){var S=_e(function*(){yield je(),c=Rt(t.value),c!==window&&c.addEventListener("scroll",d),d()});return function(){return S.apply(this,arguments)}}(),x=()=>{c!==window&&c.removeEventListener("scroll",d)};return A(()=>e.disabled,w),qe(P),bt(x),We(x),fe(()=>window,"scroll",d),fe(()=>window,"resize",w),{n:sn,classes:ln,resize:w,stickyEl:t,wrapperEl:n,isFixed:r,offsetTop:g,fixedTop:i,fixedLeft:a,fixedWidth:o,fixedHeight:l,fixedWrapperWidth:s,fixedWrapperHeight:u,enableCSSMode:f,enableFixedMode:p,toNumber:De}}});Ke.render=un;const K=Ke;K.install=function(e){e.component(K.name,K)};var cn={name:{type:[String,Number]},disabled:{type:Boolean,default:!1},onClick:Y()},Qe=Symbol("TABS_BIND_TAB_KEY");function dn(){var{childProviders:e,bindChildren:t,length:n}=Jt(Qe);return{length:n,tabList:e,bindTabList:t}}function fn(){var{parentProvider:e,bindParent:t,index:n}=Gt(Qe);return t||At("Tab","<var-tab/> must in <var-tabs/>"),{index:n,tabs:e,bindTabs:t}}var{n:Z,classes:vn}=ne("tab");function pn(e,t){var n=yt("ripple");return Ne((b(),M("div",{class:z(e.classes(e.n(),e.n("$--box"),e.computeColorClass(),e.n("--"+e.itemDirection))),ref:"tabEl",style:U({color:e.computeColorStyle()}),onClick:t[0]||(t[0]=function(){return e.handleClick&&e.handleClick(...arguments)})},[N(e.$slots,"default")],6)),[[n,{disabled:e.disabled}]])}var et=me({name:"VarTab",directives:{Ripple:on},props:cn,setup(e){var t=y(null),n=C(()=>e.name),r=C(()=>e.disabled),i=C(()=>t.value),{index:a,tabs:o,bindTabs:l}=fn(),{onTabClick:s,active:u,activeColor:f,inactiveColor:p,disabledColor:g,itemDirection:c,resize:h}=o,d={name:n,index:a,disabled:r,element:i};l(d);var w=()=>e.name!=null?u.value===e.name:u.value===(a==null?void 0:a.value),P=()=>e.disabled?g.value:w()?f.value:p.value,x=()=>e.disabled?Z("$-tab--disabled"):w()?Z("$-tab--active"):Z("$-tab--inactive"),S=B=>{var{disabled:W,name:O,onClick:R}=e;W||(F(R,O??a.value,B),s(d))};return A(()=>e.name,h),A(()=>e.disabled,h),{n:Z,classes:vn,tabEl:t,active:u,activeColor:f,inactiveColor:p,itemDirection:c,computeColorStyle:P,computeColorClass:x,handleClick:S}}});et.render=pn;const Q=et;Q.install=function(e){e.component(Q.name,Q)};function Ee(e){return["horizontal","vertical"].includes(e)}function hn(e){return["auto","always"].includes(e)}function mn(e){return["normal","reverse"].includes(e)}var bn={active:{type:[String,Number],default:0},layoutDirection:{type:String,default:"horizontal",validator:Ee},itemDirection:{type:String,default:"horizontal",validator:Ee},fixedBottom:{type:Boolean,default:!1},activeColor:{type:String},inactiveColor:{type:String},disabledColor:{type:String},color:{type:String},indicatorColor:{type:String},indicatorSize:{type:[String,Number]},elevation:{type:[Boolean,String,Number],default:!1},scrollable:{type:String,default:"auto",validator:hn},indicatorPosition:{type:String,default:"normal",validator:mn},safeArea:{type:Boolean,default:!1},sticky:{type:Boolean,default:!1},stickyCssMode:ue(J,"cssMode"),stickyZIndex:ue(J,"zIndex"),offsetTop:ue(J,"offsetTop"),onClick:Y(),onChange:Y(),"onUpdate:active":Y()};function $e(e,t,n,r,i,a,o){try{var l=e[a](o),s=l.value}catch(u){n(u);return}l.done?t(s):Promise.resolve(s).then(r,i)}function ze(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(s){$e(a,r,i,o,l,"next",s)}function l(s){$e(a,r,i,o,l,"throw",s)}o(void 0)})}}var{n:yn,classes:gn}=ne("tabs");function wn(e,t){return b(),X(St(e.sticky?e.n("$-sticky"):e.Transition),{ref:e.sticky?"stickyComponent":void 0,"css-mode":e.sticky?e.stickyCssMode:void 0,"offset-top":e.sticky?e.offsetTop:void 0,"z-index":e.sticky?e.stickyZIndex:void 0},{default:V(()=>[k("div",wt({class:e.classes(e.n(),e.n("$--box"),e.n("--item-"+e.itemDirection),e.n("--layout-"+e.layoutDirection+"-padding"),e.formatElevation(e.elevation,4),[e.fixedBottom,e.n("--fixed-bottom")],[e.safeArea,e.n("--safe-area")]),style:{background:e.color}},e.$attrs),[k("div",{ref:"scrollerEl",class:z(e.classes(e.n("tab-wrap"),[e.localScrollable,e.n("--layout-"+e.layoutDirection+"-scrollable")],e.n("--layout-"+e.layoutDirection)))},[N(e.$slots,"default"),k("div",{class:z(e.classes(e.n("indicator"),e.n("--layout-"+e.layoutDirection+e.indicatorPosition+"-indicator"))),style:U({width:e.layoutDirection==="horizontal"?e.indicatorWidth:e.toSizeUnit(e.indicatorSize),height:e.layoutDirection==="horizontal"?e.toSizeUnit(e.indicatorSize):e.indicatorHeight,transform:e.layoutDirection==="horizontal"?"translateX("+e.indicatorX+")":"translateY("+e.indicatorY+")"})},[k("div",{class:z(e.classes(e.n("indicator-inner"),e.n("--layout-"+e.layoutDirection+"-indicator-inner"))),style:U({background:e.indicatorColor||e.activeColor})},null,6)],6)],2)],16)]),_:3},8,["css-mode","offset-top","z-index"])}var tt=me({name:"VarTabs",components:{VarSticky:K},inheritAttrs:!1,props:bn,setup(e){var t=y("0px"),n=y("0px"),r=y("0px"),i=y("0px"),a=y(!1),o=y(null),l=C(()=>e.active),s=C(()=>e.indicatorPosition==="reverse"?"-reverse":""),u=C(()=>e.activeColor),f=C(()=>e.inactiveColor),p=C(()=>e.disabledColor),g=C(()=>e.itemDirection),c=y(null),{tabList:h,bindTabList:d,length:w}=dn(),P=v=>{var T,m=(T=v.name.value)!=null?T:v.index.value,{active:D,onChange:ae,onClick:oe}=e;F(e["onUpdate:active"],m),F(oe,m),m!==D&&F(ae,m)},x=()=>h.find(v=>{var{name:T}=v;return e.active===T.value}),S=v=>h.find(T=>{var{index:m}=T;return(v??e.active)===m.value}),B=()=>{if(w.value!==0){var{active:v}=e;if(be(v)){var T=Wt(v,0,w.value-1);return F(e["onUpdate:active"],T),S(T)}}},W=()=>{a.value=e.scrollable==="always"||h.length>=5},O=v=>{var{element:T}=v,m=T.value;m&&(e.layoutDirection==="horizontal"?(t.value=m.offsetWidth+"px",r.value=m.offsetLeft+"px"):(n.value=m.offsetHeight+"px",i.value=m.offsetTop+"px"))},R=v=>{var{element:T}=v;if(a.value){var m=o.value,D=T.value;if(e.layoutDirection==="horizontal"){var ae=D.offsetLeft+D.offsetWidth/2-m.offsetWidth/2;Ce(m,{left:ae,animation:Se})}else{var oe=D.offsetTop+D.offsetHeight/2-m.offsetHeight/2;Ce(m,{top:oe,animation:Se})}}},E=()=>{var v=x()||S()||B();!v||v.disabled.value||(W(),O(v),R(v))},re=function(){var v=ze(function*(){e.sticky&&c.value&&(yield c.value.resize())});return function(){return v.apply(this,arguments)}}(),ie={active:l,activeColor:u,inactiveColor:f,disabledColor:p,itemDirection:g,resize:E,onTabClick:P};return d(ie),A(()=>w.value,ze(function*(){yield je(),E()})),A(()=>e.active,E),A(()=>e.scrollable,E),Pe(E),fe(()=>window,"resize",E),{stickyComponent:c,indicatorWidth:t,indicatorHeight:n,indicatorX:r,indicatorY:i,indicatorPosition:s,localScrollable:a,scrollerEl:o,Transition:gt,toSizeUnit:Xt,n:yn,classes:gn,resize:E,resizeSticky:re,formatElevation:Kt}}});tt.render=wn;const ee=tt;ee.install=function(e){e.component(ee.name,ee)};const Sn={setup(){const{strings:e}=at();return{postEditorStore:nt(),rootStore:rt(),composableStrings:e}},emits:["changed"],components:{BaseButton:lt,SvgCaret:ut,SvgCircleCheck:ct,SvgCircleInformation:dt,SvgEllipse:zt,TransitionSlide:Ct,VarTab:Q,VarTabs:ee},mixins:[st,ot],props:{tabs:{type:Array,required:!0},skinnyTabs:Boolean,active:String,showSaveButton:{type:Boolean,default(){return!0}},internal:Boolean,disableMobile:Boolean},data(){return{buttonLoading:!1,showMobileMenu:!0,calculateWidth:!1,showMobileTabs:!1,strings:it(this.composableStrings,{saveChanges:this.$t.__("Save Changes",this.$td)})}},computed:{activeTab(){var e;return this.active?this.active:this.$route&&this.$route.name?this.$route.name:(e=this.tabs[0])==null?void 0:e.slug},filteredTabs(){return this.tabs.filter(e=>e.slug!==(this.active?this.active:this.$route&&this.$route.name?this.$route.name:""))}},methods:{maybeChangeTab(e){if(this.active){this.$emit("changed",e);return}const t=this.tabs.find(n=>n.slug===e);t&&this.$router.push(t.url)},getActiveTabName(){const e=this.tabs.find(t=>t.slug===(this.active?this.active:this.$route&&this.$route.name?this.$route.name:""));return e?e.name:""},maybeShowMobileMenu(){if(window.matchMedia("(max-width: 782px)").matches&&!this.disableMobile){this.showMobileMenu=!0;return}let e=0;this.calculateWidth=!0,this.$nextTick(()=>{e=this.$refs["tabs-scroller"].offsetWidth,this.calculateWidth=!1;let t=0;const n=this.$refs["tabs-button"];if(n){const r=n.querySelector(".aioseo-button");t=r?r.scrollWidth:0}if(e+t>this.$refs["aioseo-tabs"].offsetWidth){this.showMobileMenu=!0;return}this.showMobileMenu=!1})},createRipple(e){const t=e.currentTarget,n=document.createElement("span"),r=Math.max(t.clientWidth,t.clientHeight),i=r/2,a=t.getBoundingClientRect();n.style.width=n.style.height=`${r}px`,n.style.left=`${e.clientX-(a.left+i)}px`,n.style.top=`${e.clientY-(a.top+i)}px`,n.classList.add("ripple");const o=t.getElementsByClassName("ripple")[0];o&&o.remove(),t.appendChild(n)}},beforeMount(){window.addEventListener("resize",this.maybeShowMobileMenu)},async mounted(){this.$nextTick(()=>{this.maybeShowMobileMenu();const e=this.$refs["aioseo-tabs"],t=e.querySelector(".var-tab--active"),n=e.querySelector(".var-tabs__indicator");if(!t||!n)return;setTimeout(()=>{n.style.width==="0px"&&(n.style.width=`${t.offsetWidth}px`,n.style.transform=`translateX(${t.offsetLeft}px)`)},300),new MutationObserver(()=>{n.style.width==="0px"&&(n.style.width=`${t.offsetWidth}px`,n.style.transform=`translateX(${t.offsetLeft}px)`)}).observe(n,{attributes:!0});const i=e.querySelectorAll(".var-tab");i.length&&i.forEach(a=>{a.addEventListener("click",this.createRipple)})})},beforeUnmount(){window.removeEventListener("resize",this.maybeShowMobileMenu)}},Tn={class:"tabs-scroller",ref:"tabs-scroller"},Cn={class:"label"},kn={key:1,class:"warning"},Mn={key:0,class:"aioseo-mobile-tabs"},_n=k("span",{class:"tab-indicator"},null,-1),En={class:"tab-links"},$n=["onClick"],zn={key:1,class:"button-right",ref:"tabs-button"},Ln={class:"tabs-extra"};function Pn(e,t,n,r,i,a){const o=$("svg-ellipse"),l=$("svg-circle-check"),s=$("svg-circle-information"),u=$("var-tab"),f=$("var-tabs"),p=$("svg-caret"),g=$("router-link"),c=$("transition-slide"),h=$("base-button");return b(),M("div",{class:z(["aioseo-tabs",{internal:n.internal,skinny:n.skinnyTabs}]),ref:"aioseo-tabs"},[Ne(k("div",Tn,[H(f,{active:a.activeTab,onClick:a.maybeChangeTab,ref:"var-tabs"},{default:V(()=>[(b(!0),M(se,null,le(n.tabs,(d,w)=>(b(),X(u,{name:d.slug,key:w},{default:V(()=>[N(e.$slots,"var-tab",{tab:d},()=>[N(e.$slots,"var-tab-icon",{tab:d}),k("span",Cn,I(d.name),1),d.errorCount>=0?(b(),M("span",{key:0,class:z(["tab-score",e.getErrorClass(r.postEditorStore.currentPost.page_analysis.analysis[d.slug].errors)])},[0<r.postEditorStore.currentPost.page_analysis.analysis[d.slug].errors?(b(),X(o,{key:0,width:"6"})):L("",!0),r.postEditorStore.currentPost.page_analysis.analysis[d.slug].errors===0?(b(),X(l,{key:1,width:"12"})):L("",!0),G(" "+I(e.getErrorDisplay(r.postEditorStore.currentPost.page_analysis.analysis[d.slug].errors)),1)],2)):L("",!0),d.warning&&e.$root._data.screenContext!=="sidebar"?(b(),M("span",kn,[H(s,{width:"15",height:"15"})])):L("",!0)])]),_:2},1032,["name"]))),128))]),_:3},8,["active","onClick"])],512),[[Tt,!i.showMobileMenu||i.calculateWidth]]),i.showMobileMenu?(b(),M("div",Mn,[k("div",{class:"active-tab",onClick:t[1]||(t[1]=d=>i.showMobileTabs=!i.showMobileTabs)},[k("div",null,[G(I(a.getActiveTabName())+" ",1),H(p,{onClick:t[0]||(t[0]=ge(d=>i.showMobileTabs=!i.showMobileTabs,["stop"])),class:z({rotated:!i.showMobileTabs})},null,8,["class"]),_n])]),H(c,{active:i.showMobileTabs,class:"tab-dropdown"},{default:V(()=>[k("div",En,[n.active?L("",!0):(b(!0),M(se,{key:0},le(a.filteredTabs,(d,w)=>(b(),X(g,{key:w,to:d.url,onClick:t[2]||(t[2]=P=>i.showMobileTabs=!1)},{default:V(()=>[G(I(d.name),1)]),_:2},1032,["to"]))),128)),n.active?(b(!0),M(se,{key:1},le(a.filteredTabs,(d,w)=>(b(),M("a",{href:"#",key:w,onClick:ge(P=>e.$emit("changed",d.slug)&&(i.showMobileTabs=!1),["prevent"])},I(d.name),9,$n))),128)):L("",!0)])]),_:1},8,["active"])])):L("",!0),n.showSaveButton?(b(),M("div",zn,[N(e.$slots,"button",{},()=>[H(h,{type:"blue",size:"medium",loading:r.rootStore.loading,onClick:e.processSaveChanges},{default:V(()=>[G(I(i.strings.saveChanges),1)]),_:1},8,["loading","onClick"])])],512)):L("",!0),k("div",Ln,[N(e.$slots,"extra")])],2)}const Vn=Ae(Sn,[["render",Pn]]);export{Vn as C,zt as S};
Save
Cancel