Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
superstepsgroup.com
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
js
/
Editing: Index.d071d04b.js
import{O as y,c as D,E as W,b as j,u as Z,aS as Q}from"./app-core.b862f9c8.js";import{u as H}from"./Url.2a5968be.js";import{B as I}from"./Input.af82b72e.js";import{C as N}from"./Button.6c09d515.js";import{S as M,a as q}from"./Pencil.1ca5815a.js";import{S as G}from"./Exclamation.2e91b03a.js";import{_ as T}from"./_plugin-vue_export-helper.eefbdd86.js";import{aq as n,f as l,i as f,j as p,O as U,ad as B,Q as h,R as _,ae as L,U as b,M as d,T as J,a0 as v,P as F}from"./vendor-vue-ui.f00a1236.js";import{_ as o,a as k}from"./vendor-other.7b559694.js";import{B as X}from"./Checkbox.e62f1ba4.js";import{C as $}from"./ProBadge.838818f5.js";import{S as ee}from"./External.e3085be4.js";import{t as te}from"./vendor-lodash.d3ad8b99.js";import{C as re}from"./Index.3967c277.js";import{S as se}from"./Gear.25f22448.js";import{_ as le}from"./Trash.c3e8db0b.js";import{T as oe}from"./Slide.805812ec.js";const x="all-in-one-seo-pack",ie=()=>({redirectHasUnPublishedPost:e=>e.post_id&&e.postStatus!=="publish",validateRedirect:e=>{const u=[];if(!e.url.url)return u;if(e.url.regex)try{new RegExp(e.url.url)}catch{return u.push(o("The regex syntax is invalid.",x)),u}if(!e.url.regex&&!y(e.url.url))return u.push(o("Your URL is invalid.",x)),u;e.url.url.substr(0,4)==="http"&&u.push(o("Please enter a valid relative source URL.",x));const s=/%[a-zA-Z_]+%/,a=/%[0-9A-Fa-f]{2}/;if(e.url.url.match(s)&&!e.url.url.match(a)&&u.push(o("Permalinks are not currently supported.",x)),(e.url.url==="/(.*)"||e.url.url==="^/(.*)")&&u.push(o("This redirect is supported using the Relocate Site feature under Full Site Redirect tab.",x)),e.url.url&&e.url.url.length&&e.targetUrl&&e.targetUrl.length){let c=e.url.ignoreSlash?D.unTrailingSlashIt(e.url.url):e.url.url,i=e.url.ignoreSlash?D.unTrailingSlashIt(e.targetUrl):e.targetUrl;c=e.url.ignoreCase?c.toLowerCase():c,i=e.url.ignoreCase?i.toLowerCase():i,e.url.regex||(c=c.replace(/#.*?$/,"")),i=i.replace(/#.*?$/,""),(c===i||e.url.regex&&i.match(c))&&u.push(o("Your source is the same as a target and this will create a loop.",x))}const S=W();if(0<S?.protectedPaths.length){const c=S.protectedPaths.map(i=>i.replace(/\/$/,""));e.url.url.match(new RegExp("^("+c.join("|")+")"))&&u.push(o("Your source is a protected path and cannot be redirected.",x))}return u}}),A="all-in-one-seo-pack",ne={emits:["set-url"],components:{CoreProBadge:$,SvgExternal:ee},props:{results:{type:Array,required:!0},url:String},data(){return{strings:{DRAFT:o("DRAFT",A),PENDING:o("PENDING",A),FUTURE:o("FUTURE",A)}}},methods:{getOptionTitle(t){t=y(t);const r=y(this.url),e=new RegExp(`(${te(r)})`,"gi");return t.replace(e,'<span class="search-term">$1</span>')},getStatusLabel(t){switch(t.toLowerCase()){case"draft":return this.strings.DRAFT;case"future":return this.strings.FUTURE;case"pending":return this.strings.PENDING}}}},ue={class:"aioseo-add-redirection-url-results"},ae=["onClick"],ce={class:"option"},he={class:"option-title"},de=["innerHTML"],ge={class:"option-details"},me=["href"];function pe(t,r,e,u,s,a){const S=n("core-pro-badge"),c=n("svg-external");return l(),f("div",ue,[p("ul",null,[(l(!0),f(U,null,B(e.results,(i,R)=>(l(),f("li",{key:R,onClick:C=>t.$emit("set-url",i.link)},[p("span",null,[p("div",ce,[p("div",he,[p("div",{innerHTML:a.getOptionTitle(i.label)},null,8,de),i.status!=="publish"?(l(),h(S,{key:0},{default:_(()=>[L(b(a.getStatusLabel(i.status)),1)]),_:2},1024)):d("",!0)]),p("div",ge,[p("span",null,b(i.link),1)])]),p("a",{class:"option-permalink",href:i.link,target:"_blank",onClick:J(()=>{},["stop"])},[v(c)],8,me)])],8,ae))),128))])])}const K=T(ne,[["render",pe]]),fe={setup(){const{decodeUrl:t}=H();return{postEditorStore:Z(),redirectsStore:W(),rootStore:j(),decodeUrl:t}},components:{BaseInput:I,CoreAddRedirectionUrlResults:K,CoreLoader:N,SvgCircleCheck:q,SvgCircleClose:M,SvgCircleExclamation:G},props:{url:String,errors:Array,warnings:Array,disableSearch:Boolean},data(){return{showResults:!1,isLoading:!1,value:null,results:[],searchTimer:null}},watch:{value(){this.value&&(this.value=this.value.replace(/(https?:\/)(\/)+|(\/)+/g,"$1$2$3"),this.value.startsWith("/")&&(this.value=this.value.replace(/\s+/g,"")))},url:{immediate:!0,handler(){this.value=this.url}}},methods:{onBlur(){setTimeout(()=>{this.$emit("update:modelValue",this.value)},150)},searchChange(){if(!this.disableSearch){if(!this.value){this.isLoading=!1,this.showResults=!1,this.results=[];return}if(this.value.startsWith("/")||this.value.startsWith("http:")||this.value.startsWith("https:")){this.isLoading=!1,this.showResults=!1,this.results=[];return}this.isLoading=!0,this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{if(!this.value){this.isLoading=!1,this.showResults=!1,this.results=[];return}this.showResults=!0,this.ajaxSearch(this.value).finally(()=>this.isLoading=!1)},500)}},async ajaxSearch(t){const r=await this.redirectsStore.getPosts({query:t,postId:this.postEditorStore.currentPost.id});this.results=r.body.objects},setUrl(t){this.showResults=!1,this.value=t.replace(this.rootStore.aioseo.urls.home,"",t),this.$emit("update:modelValue",this.value)},inputEventDecodeUrl(t){this.value="",this.value=this.decodeUrl(t)},documentClick(t){if(!this.showResults)return;const r=t&&t.target?t.target:null,e=this.$refs["redirect-target-url"];e&&e!==r&&!e.contains(r)&&(this.showResults=!1)}},mounted(){document.addEventListener("click",this.documentClick);const t=document.querySelector("#aioseo-modal-portal .modal-wrapper");t&&t.addEventListener("click",this.documentClick);const r=document.querySelector("#main-settings-cont");r&&r.addEventListener("click",this.documentClick)},beforeUnmount(){document.removeEventListener("click",this.documentClick);const t=document.querySelector("#aioseo-modal-portal .modal-wrapper");t&&t.removeEventListener("click",this.documentClick);const r=document.querySelector("#main-settings-cont");r&&r.removeEventListener("click",this.documentClick)}},_e={class:"aioseo-add-redirection-target-url",ref:"redirect-target-url"},ve={class:"append-icon"};function Se(t,r,e,u,s,a){const S=n("svg-circle-close"),c=n("svg-circle-check"),i=n("svg-circle-exclamation"),R=n("core-loader"),C=n("base-input"),E=n("core-add-redirection-url-results");return l(),f("div",_e,[v(C,{modelValue:s.value,"onUpdate:modelValue":[r[0]||(r[0]=w=>s.value=w),r[2]||(r[2]=w=>t.$emit("update:modelValue",u.decodeUrl(s.value)))],onKeyup:a.searchChange,onFocus:r[1]||(r[1]=w=>s.showResults=!0),onInput:r[3]||(r[3]=w=>a.inputEventDecodeUrl(w.target.value)),size:"medium",placeholder:"/target-page/",class:F({"aioseo-error":e.errors.length,"aioseo-active":!e.errors.length&&!e.warnings.length&&e.url,"aioseo-warning":e.warnings.length})},{"append-icon":_(()=>[p("div",ve,[s.isLoading?d("",!0):(l(),f(U,{key:0},[e.errors.length?(l(),h(S,{key:0})):d("",!0),!e.errors.length&&!e.warnings.length&&e.url?(l(),h(c,{key:1})):d("",!0),e.warnings.length?(l(),h(i,{key:2})):d("",!0)],64)),s.isLoading?(l(),h(R,{key:1,dark:""})):d("",!0)])]),_:1},8,["modelValue","onKeyup","class"]),s.showResults&&s.results.length?(l(),h(E,{key:0,results:s.results,url:s.value,onSetUrl:a.setUrl},null,8,["results","url","onSetUrl"])):d("",!0)],512)}const Me=T(fe,[["render",Se]]),m="all-in-one-seo-pack",we={emits:["updated-url","remove-url","updated-option"],setup(){const{validateRedirect:t}=ie(),{decodeUrl:r}=H();return{redirectsStore:W(),rootStore:j(),validateRedirect:t,decodeUrl:r}},components:{BaseCheckbox:X,BaseInput:I,CoreAddRedirectionUrlResults:K,CoreAlert:re,CoreLoader:N,SvgCircleCheck:q,SvgCircleClose:M,SvgCircleExclamation:G,SvgGear:se,SvgTrash:le,TransitionSlide:oe},props:{url:{type:Object,default(){return{id:null,url:null,regex:!1,ignoreSlash:!0,ignoreCase:!0,errors:[],warnings:[]}}},allowDelete:Boolean,targetUrl:String,log404:Boolean,disableSource:Boolean,disableSearch:Boolean},data(){return{showResults:!1,isLoading:!1,showOptions:!1,searchTimer:null,strings:{ignoreSlash:o("Ignore Slash",m),ignoreCase:o("Ignore Case",m),regex:o("Regex",m)},results:[]}},watch:{targetUrl(){this.updateSourceUrl(this.url.url)}},computed:{maybeRegex(){return this.url.url.match(/[*\\()[\]^$]/)!==null||this.url.url.indexOf(".?")!==-1},iffyUrl(){if(!this.url.url||this.disableSource)return[];const t=[];return this.url.url.substr(0,4)!=="http"&&this.url.url.substr(0,1)!=="/"&&0<this.url.url.length&&!this.url.regex&&t.push(k(o("We recommend starting the source URL with a %1$s",m),"<code>/</code>")),this.url.url.indexOf("#")!==-1&&t.push(o("Anchor values are not sent to the server and cannot be redirected.",m)),!this.log404&&this.maybeRegex&&!this.url.regex&&t.push(k(o("Possible regex character detected. Remember to enable the %1$s option under the advanced settings (gear icon) if this is a regular expression.",m),"<code>Regex</code>")),this.url.regex&&(this.url.url.indexOf("^")===-1&&this.url.url.indexOf("$")===-1&&t.push(k(o("To prevent a greedy regular expression you can use %1$s to anchor it to the start of the URL. For example: %2$s",m),"<code>^/</code>","<code>^/"+y(this.url.url.replace(/^\//,""))+"</code>")),0<this.url.url.indexOf("^")&&t.push(k(o("The caret %1$s should be at the start. For example: %2$s",m),"<code>^/</code>","<code>^/"+y(this.url.url.replace("^","").replace(/^\//,""))+"</code>")),this.url.url.indexOf("^")===0&&this.url.url.indexOf("^/")===-1&&t.push(k(o("We recommend starting the source URL with a %1$s",m),"<code>^/</code>")),this.url.url.length-1!==this.url.url.indexOf("$")&&this.url.url.indexOf("$")!==-1&&t.push(k(o("The dollar symbol %1$s should be at the end. For example: %2$s",m),"<code>$</code>","<code>"+y(this.url.url.replace(/\$/g,""))+"$</code>"))),this.url.url.match(/(\.html|\.htm|\.php|\.pdf|\.jpg)$/)!==null&&t.push(o("Some servers may be configured to serve file resources directly, preventing a redirect occurring.",m)),t},urlOptionsActive(){return this.url.regex||this.showOptions}},methods:{updateSourceUrl(t){!this.disableSource&&t&&(t&&(t=t.replace(/(https?:\/)(\/)+|(\/)+/g,"$1$2$3")),!this.url.regex&&t.startsWith("/")&&(t=t.replace(/\s+/g,"")),t=Q(t,this.rootStore.aioseo.urls.home)),this.url.url=t,this.url.errors=this.validateRedirect(this),this.url.warnings=this.iffyUrl,this.$emit("updated-url",this.url)},updateOption(t,r){this.url[t]=r,this.updateSourceUrl(this.url.url),this.$emit("updated-option",this.url)},searchChange(){if(!this.disableSearch){if(!this.url.url||this.url.regex){this.isLoading=!1,this.showResults=!1,this.results=[];return}if(this.url.url.startsWith("/")||this.url.url.startsWith("^")||this.url.url.startsWith("http:")||this.url.url.startsWith("https:")){this.isLoading=!1,this.showResults=!1,this.results=[];return}this.isLoading=!0,this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{if(!this.url.url){this.isLoading=!1,this.showResults=!1,this.results=[];return}this.showResults=!0,this.ajaxSearch(this.url.url).finally(()=>this.isLoading=!1)},500)}},async ajaxSearch(t){const r=await this.redirectsStore.getPosts({query:t});this.results=r.body.objects},setUrl(t){this.showResults=!1,this.updateOption("url",t.replace(this.rootStore.aioseo.urls.home,"",t))},documentClick(t){if(!this.showResults)return;const r=t&&t.target?t.target:null,e=this.$refs["redirect-source-url"];e&&e!==r&&!e.contains(r)&&(this.showResults=!1)}},mounted(){this.url.showOptions&&(this.showOptions=!0,this.updateSourceUrl(this.url.url)),document.addEventListener("click",this.documentClick)},beforeUnmount(){document.removeEventListener("click",this.documentClick)}},xe={class:"aioseo-redirect-source-url",ref:"redirect-source-url"},ke={class:"append-icon"};function ye(t,r,e,u,s,a){const S=n("svg-circle-close"),c=n("svg-circle-check"),i=n("svg-circle-exclamation"),R=n("svg-gear"),C=n("svg-trash"),E=n("core-loader"),w=n("base-input"),Y=n("core-add-redirection-url-results"),O=n("base-checkbox"),V=n("transition-slide"),z=n("core-alert");return l(),f("div",xe,[v(w,{modelValue:u.decodeUrl(e.url.url),"onUpdate:modelValue":r[2]||(r[2]=g=>a.updateSourceUrl(u.decodeUrl(g))),onKeyup:a.searchChange,onFocus:r[3]||(r[3]=g=>s.showResults=!0),disabled:e.log404||e.disableSource,size:"medium",placeholder:"/source-page/",class:F({"aioseo-error":e.url.errors.length,"aioseo-active":!e.url.errors.length&&!e.url.warnings.length&&e.url.url,"aioseo-warning":e.url.warnings.length})},{"append-icon":_(()=>[p("div",ke,[s.isLoading?d("",!0):(l(),f(U,{key:0},[e.url.errors.length?(l(),h(S,{key:0})):d("",!0),!e.url.errors.length&&!e.url.warnings.length&&e.url.url?(l(),h(c,{key:1})):d("",!0),e.url.warnings.length?(l(),h(i,{key:2})):d("",!0),v(R,{class:F({active:a.urlOptionsActive}),onClick:r[0]||(r[0]=g=>s.showOptions=!s.showOptions)},null,8,["class"]),e.allowDelete?(l(),h(C,{key:3,onClick:r[1]||(r[1]=g=>t.$emit("remove-url"))})):d("",!0)],64)),s.isLoading?(l(),h(E,{key:1,dark:""})):d("",!0)])]),_:1},8,["modelValue","onKeyup","disabled","class"]),!e.url.regex&&s.showResults&&s.results.length?(l(),h(Y,{key:0,results:s.results,url:e.url.url,onSetUrl:a.setUrl},null,8,["results","url","onSetUrl"])):d("",!0),v(V,{active:s.showOptions,class:"source-url-options"},{default:_(()=>[v(O,{size:"medium",modelValue:e.url.ignoreSlash,"onUpdate:modelValue":r[4]||(r[4]=g=>a.updateOption("ignoreSlash",g))},{default:_(()=>[L(b(s.strings.ignoreSlash),1)]),_:1},8,["modelValue"]),v(O,{size:"medium",modelValue:e.url.ignoreCase,"onUpdate:modelValue":r[5]||(r[5]=g=>a.updateOption("ignoreCase",g))},{default:_(()=>[L(b(s.strings.ignoreCase),1)]),_:1},8,["modelValue"]),!e.log404&&!e.disableSource?(l(),h(O,{key:0,size:"medium",modelValue:e.url.regex,"onUpdate:modelValue":r[6]||(r[6]=g=>a.updateOption("regex",g))},{default:_(()=>[L(b(s.strings.regex),1)]),_:1},8,["modelValue"])):d("",!0)]),_:1},8,["active"]),v(V,{active:!!e.url.errors.length},{default:_(()=>[(l(!0),f(U,null,B(e.url.errors,(g,P)=>(l(),h(z,{key:P,class:"source-url-error",type:"red",size:"small",innerHTML:g},null,8,["innerHTML"]))),128))]),_:1},8,["active"]),v(V,{active:!!e.url.warnings.length},{default:_(()=>[(l(!0),f(U,null,B(e.url.warnings,(g,P)=>(l(),h(z,{key:P,class:"source-url-warning",type:"yellow",size:"small",innerHTML:g},null,8,["innerHTML"]))),128))]),_:1},8,["active"])],512)}const qe=T(we,[["render",ye]]),Re={},Ue={width:"36",height:"16",viewBox:"0 0 36 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow"};function be(t,r){return l(),f("svg",Ue,[...r[0]||(r[0]=[p("path",{d:"M36 8L28.4211 0.5V6.125H0V9.875H28.4211V15.5L36 8Z",fill:"currentColor"},null,-1)])])}const Ge=T(Re,[["render",be]]);export{qe as C,Ge as S,Me as a,ie as u};
Save
Cancel