Sid Gifari File Manager
🏠 Root
/
home2
/
meumer25
/
www
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
js
/
Editing: Main.7e5f79a9.js
import{d as de,u as pe}from"./vue-router.41e9d860.js";import{C as Ve}from"./Index.3c8fd730.js";import Be from"./BrandTracker.dc4b0c9e.js";import{a as O,w as He}from"./runtime-dom.esm-bundler.dc49ee3e.js";import{H as Ie,b as j,h as Y,a as De}from"./index.317ad629.js";import{C as ee}from"./Index.2a391835.js";import{C as oe}from"./Card.b75a3969.js";import{G as ve,a as _e}from"./Row.bb9acf3f.js";import{_ as Z}from"./_plugin-vue_export-helper.eefbdd86.js";import{o as l,c as C,_ as e,F as W,af as Q,a1 as P,a5 as he,$ as r,l as v,a2 as c,R as i,Y as S,W as V,f as me,a7 as M,ae as F,a6 as te,a4 as H,a0 as Pe,a9 as Fe}from"./runtime-core.esm-bundler.ce5add0b.js";import{S as Ze}from"./AiContent.162ae902.js";import"./translations.e71e2202.js";import{_ as u,a as G,b as se}from"./default-i18n.65d58dd6.js";import{C as Te}from"./Index.3a1576c6.js";import{C as ge}from"./Table.b24bacad.js";import{S as Ue}from"./Close.ccd53ef3.js";import{S as fe}from"./Caret.cd869c5d.js";import{_ as X,C as Ee}from"./Button.9a301412.js";import{T as Ne}from"./Slide.3003ef51.js";import{S as Oe}from"./Simple.ad972ba4.js";import{S as Ge}from"./External.5f8a6285.js";import"./license.414793bf.js";import"./upperFirst.5dc701f8.js";import"./helpers.633a054c.js";/* empty css */import"./params.af7ed354.js";import"./Tabs.a35aa612.js";import"./ProBadge.e6ec5f9a.js";import"./Information.98ebb530.js";import"./Header.ae0d0374.js";import"./addons.a280be1f.js";import"./ScrollAndHighlight.f74ce42e.js";import"./ScrollTo.81bea8a7.js";import"./LicenseKeyBar.48793272.js";import"./LogoGear.32164283.js";import"./AnimatedNumber.97e7e241.js";import"./numbers.cdba2587.js";import"./Logo.3715aad2.js";import"./Trash.87a7d946.js";import"./Support.1c4a9051.js";import"./date.f7db1924.js";import"./datetime.f197aeae.js";import"./constants.bc5863fe.js";import"./Url.c2dcf147.js";import"./Pencil.d82df6a1.js";import"./Exclamation.fc507dc9.js";import"./Gear.0f79dbf5.js";import"./Tooltip.23c7170d.js";import"./Download.aa34559d.js";const ze={name:"GeminiIcon",setup(){return{uniqueId:Math.random().toString(36).substring(2,11)}}},qe={width:"20",height:"20",viewBox:"0 0 20 20",class:"aioseo-provider-icon gemini",fill:"none",xmlns:"http://www.w3.org/2000/svg"},je=e("rect",{width:"20",height:"20",rx:"10",fill:"white"},null,-1),Ye=["fill"],We=["id"],Ke=e("stop",{offset:"0.067","stop-color":"#9168C0"},null,-1),Je=e("stop",{offset:"0.343","stop-color":"#5684D1"},null,-1),Qe=e("stop",{offset:"0.672","stop-color":"#1BA1E3"},null,-1),Xe=[Ke,Je,Qe];function et(R,t,x,o,g,n){return l(),C("svg",qe,[je,e("path",{fill:`url(#gradient-${o.uniqueId})`,d:"M17.5 9.515C15.5539 9.63443 13.7187 10.4614 12.34 11.84C10.9614 13.2187 10.1344 15.0539 10.015 17H9.985C9.86577 15.0539 9.0389 13.2185 7.66019 11.8398C6.28148 10.4611 4.44614 9.63423 2.5 9.515L2.5 9.485C4.44614 9.36577 6.28148 8.5389 7.66019 7.16019C9.0389 5.78148 9.86577 3.94614 9.985 2L10.015 2C10.1344 3.94607 10.9614 5.7813 12.34 7.15997C13.7187 8.53864 15.5539 9.36557 17.5 9.485V9.515Z"},null,8,Ye),e("defs",null,[e("radialGradient",{id:`gradient-${o.uniqueId}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(3.98875 8.09656) rotate(18.6832) scale(15.9656 127.895)"},Xe,8,We)])])}const ae=Z(ze,[["render",et]]),tt={},st={width:"20",height:"20",viewBox:"0 0 20 20",class:"aioseo-provider-icon anthropic",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ot=e("path",{d:"M15.9302 0H4.0698C1.82211 0 0 1.83707 0 4.1032V15.8968C0 18.1629 1.82211 20 4.0698 20H15.9302C18.1779 20 20 18.1629 20 15.8968V4.1032C20 1.83707 18.1779 0 15.9302 0Z",fill:"#CC9B7A"},null,-1),at=e("path",{d:"M12.4477 5.85107H10.7537L13.8377 14.1488L15.5318 14.149L12.4477 5.85107ZM7.5522 5.85107L4.46814 14.149H6.19685L6.81919 12.4065L10.0554 12.4063L10.6845 14.149H12.4133L9.3224 5.85107H7.5522ZM7.38615 10.8644L8.43732 7.94639L9.49525 10.8644H7.38615Z",fill:"#1F1F1E"},null,-1),rt=[ot,at];function nt(R,t){return l(),C("svg",st,rt)}const re=Z(tt,[["render",nt]]),lt={},it={width:"20",height:"20",viewBox:"0 0 20 20",class:"aioseo-provider-icon openai",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ut=e("path",{d:"M18.6863 8.16932C18.913 7.49711 18.9914 6.78502 18.9163 6.0806C18.8411 5.37617 18.6142 4.69564 18.2506 4.08447C17.1447 2.18901 14.9219 1.21401 12.751 1.67216C12.15 1.01385 11.3835 0.522841 10.5287 0.24846C9.67395 -0.025921 8.76089 -0.0740183 7.88124 0.108998C7.0016 0.292015 6.18635 0.699703 5.51737 1.29112C4.84838 1.88253 4.34922 2.63685 4.07002 3.47832C3.36515 3.62063 2.69925 3.90944 2.11683 4.32544C1.5344 4.74145 1.04887 5.27506 0.692672 5.89062C-0.425297 7.78309 -0.171469 10.1702 1.32025 11.7937C1.09271 12.4656 1.0135 13.1776 1.08794 13.882C1.16238 14.5864 1.38875 15.2671 1.75189 15.8785C2.85923 17.7746 5.08345 18.7495 7.25549 18.2908C7.73304 18.8203 8.31981 19.2433 8.97663 19.5318C9.63346 19.8202 10.3452 19.9674 11.0644 19.9634C13.2895 19.9653 15.2608 18.551 15.9405 16.4649C16.6452 16.3223 17.311 16.0334 17.8934 15.6174C18.4758 15.2014 18.9614 14.6679 19.3177 14.0525C20.4222 12.1635 20.1674 9.78932 18.6863 8.16932ZM11.0644 18.6569C10.1762 18.6582 9.31592 18.3517 8.63431 17.7911L8.75424 17.7242L12.791 15.4299C12.8914 15.3719 12.9748 15.2892 13.033 15.1898C13.0912 15.0905 13.1221 14.9779 13.1227 14.8632V9.25939L14.8294 10.2314C14.8464 10.2399 14.8583 10.256 14.8613 10.2747V14.9183C14.857 16.9812 13.1595 18.6525 11.0644 18.6569ZM2.90298 15.2253C2.45757 14.468 2.29765 13.5804 2.45134 12.7185L2.57119 12.7893L6.61197 15.0836C6.71195 15.1414 6.82577 15.1718 6.9417 15.1718C7.05762 15.1718 7.17144 15.1414 7.27142 15.0836L12.2074 12.2817V14.2218C12.207 14.2318 12.2042 14.2416 12.1994 14.2505C12.1945 14.2594 12.1877 14.267 12.1795 14.2729L8.0908 16.5948C6.27384 17.6254 3.95252 17.0125 2.90298 15.2253ZM1.83978 6.56755C2.28829 5.80541 2.99621 5.2241 3.83822 4.92655V9.64885C3.8367 9.76295 3.86631 9.87536 3.92395 9.97435C3.9816 10.0733 4.06517 10.1553 4.16595 10.2116L9.07798 13.0018L7.37134 13.9738C7.36211 13.9786 7.35183 13.9811 7.34138 13.9811C7.33094 13.9811 7.32065 13.9786 7.31142 13.9738L3.23072 11.656C1.41736 10.6211 0.795485 8.33724 1.83978 6.54793V6.56755ZM15.8606 9.77485L10.9324 6.95716L12.6352 5.98909C12.6444 5.98426 12.6547 5.98173 12.6652 5.98173C12.6756 5.98173 12.6859 5.98426 12.6952 5.98909L16.7759 8.31093C17.3998 8.66541 17.9085 9.18733 18.2424 9.81577C18.5764 10.4442 18.7219 11.1532 18.662 11.86C18.6021 12.5668 18.3392 13.2423 17.904 13.8075C17.4688 14.3727 16.8793 14.8044 16.2043 15.0521V10.3297C16.2008 10.2158 16.1672 10.1048 16.107 10.0075C16.0467 9.91024 15.9618 9.83007 15.8606 9.77485ZM17.5592 7.26024L17.4392 7.18932L13.4065 4.87539C13.3059 4.81728 13.1914 4.78664 13.0748 4.78664C12.9582 4.78664 12.8436 4.81728 12.7431 4.87539L7.81095 7.67739V5.73732C7.8099 5.72745 7.81158 5.71749 7.8158 5.70849C7.82002 5.69949 7.82663 5.69177 7.83494 5.68616L11.9156 3.36824C12.5411 3.01349 13.2561 2.84141 13.9772 2.87212C14.6983 2.90284 15.3956 3.13507 15.9876 3.54167C16.5796 3.94827 17.0417 4.51242 17.32 5.16814C17.5983 5.82387 17.6812 6.54405 17.5591 7.24447V7.26024H17.5592ZM6.87978 10.6996L5.17314 9.73155C5.16461 9.72647 5.15732 9.71961 5.15178 9.71144C5.14625 9.70328 5.1426 9.69402 5.14111 9.68432V5.05255C5.14206 4.342 5.34842 3.6464 5.73608 3.04708C6.12374 2.44775 6.67666 1.96947 7.33022 1.66816C7.98377 1.36684 8.71093 1.25494 9.42669 1.34554C10.1425 1.43614 10.8172 1.7255 11.3721 2.17978L11.2522 2.2467L7.21549 4.54093C7.11503 4.59895 7.03162 4.68171 6.97347 4.78106C6.91531 4.88041 6.8844 4.99295 6.88377 5.10762L6.87978 10.6997V10.6996ZM7.80697 8.73193L10.0052 7.48447L12.2074 8.73201V11.2269L10.0132 12.4745L7.81103 11.2269L7.80697 8.73193Z",fill:"#141B38"},null,-1),ct=[ut];function dt(R,t){return l(),C("svg",it,ct)}const ne=Z(lt,[["render",dt]]),pt={},vt={width:"20",height:"20",viewBox:"0 0 20 20",class:"aioseo-provider-icon deepseek",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_t=e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.79 3.7348C19.5784 3.63146 19.4867 3.82896 19.3634 3.9298C19.3209 3.9623 19.285 4.0048 19.2492 4.04313C18.9392 4.37396 18.5775 4.59063 18.105 4.5648C17.4142 4.52646 16.8242 4.74313 16.3025 5.27146C16.1917 4.6198 15.8234 4.23146 15.2634 3.98146C14.97 3.85146 14.6734 3.7223 14.4675 3.4398C14.3242 3.23896 14.285 3.0148 14.2134 2.7948C14.1675 2.66146 14.1217 2.52563 13.9692 2.50313C13.8025 2.4773 13.7375 2.61646 13.6725 2.73313C13.4117 3.2098 13.3109 3.7348 13.3209 4.26646C13.3434 5.46313 13.8484 6.41646 14.8525 7.09396C14.9667 7.17146 14.9959 7.2498 14.96 7.36313C14.8917 7.59646 14.81 7.82313 14.7384 8.0573C14.6925 8.20646 14.6242 8.23813 14.4642 8.17396C13.9236 7.94162 13.4325 7.60783 13.0175 7.19063C12.3034 6.50063 11.6584 5.73896 10.8534 5.1423C10.6668 5.00448 10.4753 4.87356 10.2792 4.7498C9.45835 3.9523 10.3875 3.2973 10.6025 3.2198C10.8275 3.13813 10.68 2.8598 9.95335 2.86313C9.22669 2.86646 8.56169 3.10896 7.71419 3.43313C7.58825 3.48139 7.45867 3.51957 7.32669 3.5473C6.53471 3.39807 5.72473 3.36942 4.92419 3.4623C3.35335 3.6373 2.09919 4.38063 1.17669 5.64813C0.0683524 7.17146 -0.192481 8.90313 0.126686 10.7081C0.462519 12.6115 1.43419 14.1873 2.92669 15.419C4.47502 16.6965 6.25752 17.3223 8.29169 17.2023C9.52669 17.1315 10.9025 16.9656 12.4534 15.6523C12.845 15.8473 13.255 15.9248 13.9367 15.9831C14.4617 16.0323 14.9667 15.9581 15.3575 15.8765C15.97 15.7465 15.9275 15.179 15.7067 15.0756C13.9109 14.239 14.305 14.5798 13.9459 14.304C14.8592 13.224 16.2342 12.1023 16.7725 8.46813C16.8142 8.17896 16.7784 7.9973 16.7725 7.76396C16.7692 7.6223 16.8017 7.56646 16.9642 7.55063C17.4151 7.50386 17.8524 7.36939 18.2517 7.1548C19.415 6.51896 19.885 5.47563 19.9959 4.22396C20.0125 4.0323 19.9925 3.83563 19.79 3.7348ZM9.65085 14.9998C7.91002 13.6315 7.06585 13.1806 6.71752 13.1998C6.39085 13.2198 6.45002 13.5923 6.52169 13.8356C6.59669 14.0756 6.69419 14.2406 6.83085 14.4515C6.92585 14.5906 6.99085 14.7981 6.73669 14.954C6.17585 15.3006 5.20169 14.8373 5.15585 14.8148C4.02169 14.1465 3.07252 13.2648 2.40502 12.059C1.76002 10.8981 1.38502 9.65313 1.32335 8.32396C1.30669 8.0023 1.40085 7.88896 1.72085 7.83063C2.14094 7.75024 2.57137 7.73926 2.99502 7.79813C4.77169 8.05813 6.28335 8.8523 7.55169 10.1098C8.27502 10.8265 8.82252 11.6823 9.38669 12.519C9.98669 13.4073 10.6317 14.254 11.4534 14.9473C11.7434 15.1906 11.9742 15.3756 12.1959 15.5115C11.5275 15.5865 10.4125 15.6031 9.65085 14.9998ZM10.4842 9.63313C10.484 9.59173 10.494 9.55093 10.5131 9.51423C10.5323 9.47753 10.5601 9.44605 10.5941 9.4225C10.6282 9.39896 10.6675 9.38406 10.7086 9.37908C10.7497 9.37411 10.7913 9.37922 10.83 9.39396C10.8793 9.41165 10.9219 9.44428 10.9517 9.4873C10.9816 9.53032 10.9973 9.58159 10.9967 9.63396C10.9968 9.6678 10.9902 9.70133 10.9772 9.73258C10.9642 9.76383 10.9452 9.79219 10.9211 9.81601C10.8971 9.83982 10.8685 9.85861 10.8372 9.87127C10.8058 9.88394 10.7722 9.89024 10.7384 9.8898C10.7048 9.88991 10.6715 9.88333 10.6405 9.87043C10.6095 9.85753 10.5814 9.83857 10.5578 9.81467C10.5342 9.79077 10.5156 9.7624 10.5031 9.73123C10.4906 9.70006 10.4836 9.66671 10.4842 9.63313ZM13.0759 10.9631C12.9092 11.0306 12.7434 11.089 12.5842 11.0965C12.3447 11.1048 12.1098 11.03 11.9192 10.8848C11.6909 10.6931 11.5275 10.5865 11.4592 10.2531C11.4356 10.0902 11.4401 9.9245 11.4725 9.76313C11.5309 9.49063 11.4659 9.31563 11.2734 9.1573C11.1175 9.0273 10.9184 8.99146 10.7 8.99146C10.6253 8.98712 10.5527 8.96483 10.4884 8.92646C10.3967 8.88146 10.3217 8.76813 10.3934 8.62813C10.4167 8.58313 10.5267 8.47313 10.5534 8.45313C10.85 8.2848 11.1925 8.3398 11.5084 8.46646C11.8017 8.58646 12.0234 8.80646 12.3425 9.11813C12.6684 9.49396 12.7275 9.59813 12.9134 9.8798C13.06 10.1006 13.1934 10.3273 13.2842 10.5865C13.34 10.749 13.2684 10.8815 13.0759 10.9631Z",fill:"#141B38"},null,-1),ht=[_t];function mt(R,t){return l(),C("svg",vt,ht)}const le=Z(pt,[["render",mt]]),gt={},ft={width:"20",height:"20",viewBox:"0 0 20 20",class:"aioseo-provider-icon perplexity",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ct=e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.05035 2.1001L9.54945 6.24535V6.2444V2.10966H10.4253V6.2639L14.9445 2.1001V6.8263H16.8V13.6434H14.9502V17.8518L10.4253 13.8763V17.8975H9.54945V13.9419L5.05545 17.9001V13.6434H3.19995V6.8263H5.05035V2.1001ZM8.8892 7.6914H4.07575V12.7783H5.05435V11.1737L8.8892 7.6914ZM5.9312 11.5575V15.9697L9.54945 12.7828V8.27115L5.9312 11.5575ZM10.4505 12.7407V8.2669L14.0698 11.5535V13.6434H14.0744V15.9246L10.4505 12.7407ZM14.9502 12.7783H15.9242V7.6914H11.1466L14.9502 11.1376V12.7783ZM14.0687 6.8263V4.09001L11.0988 6.8263H14.0687ZM8.896 6.8263H5.92615V4.09001L8.896 6.8263Z",fill:"#141B38"},null,-1),yt=[Ct];function kt(R,t){return l(),C("svg",ft,yt)}const ie=Z(gt,[["render",kt]]),bt={class:"ai-providers"},wt={class:"ai-provider-icon"},$t={class:"ai-provider-name"},xt={__name:"AiProviders",setup(R){const t=[{id:"gemini",name:"Gemini"},{id:"anthropic",name:"Claude"},{id:"openai",name:"OpenAI"},{id:"deepseek",name:"DeepSeek"},{id:"perplexity",name:"Perplexity"}],x={gemini:ae,anthropic:re,openai:ne,deepseek:le,perplexity:ie};return(o,g)=>(l(),C("div",bt,[(l(),C(W,null,Q(t,n=>e("div",{key:n.id,class:"ai-provider"},[e("div",wt,[(l(),P(he(x[n.id])))]),e("span",$t,r(n.name),1)])),64))]))}},Lt={class:"promotional-alert"},St={class:"promotional-alert-content"},Mt={class:"promotional-alert-icon"},Rt={class:"promotional-alert-text"},At={__name:"PromotionalAlert",setup(R){const x={promotionalAlertText:u("Our new AI-powered keyword reports are 100% free for a limited time only. Enjoy!","all-in-one-seo-pack")};return(o,g)=>(l(),C("div",Lt,[v(i(ee),{type:"blue"},{default:c(()=>[e("div",St,[e("div",Mt,[v(i(Ze))]),e("div",Rt,[e("span",null,r(x.promotionalAlertText),1)])])]),_:1})]))}},Vt=Z(At,[["__scopeId","data-v-1f971962"]]),Bt=["onClick"],Ht={class:"row-actions"},It=["onClick"],Dt=["onClick"],Pt={class:"trash"},Ft=["onClick"],Zt=["title"],Tt={class:"aioseo-modal-body"},Ut=["innerHTML"],Et={__name:"ReportsTable",setup(R){const t="all-in-one-seo-pack",x=de(),o=S([]),g=S(!1),n=S(1),f=S(10),y=S(""),p=S("created"),s=S("desc"),h=S("all"),b=S({total:0,pages:1,per_page:10}),k=S(null),L=S(!1),w=S(null),A=S(null),d={reports:u("Reports",t),reportsTooltip:u("View and manage your keyword ranking reports generated by AI-powered analysis.",t),filterByStatus:u("Filter by Status",t),allStatuses:u("All Statuses",t),pending:u("Pending",t),processing:u("Processing",t),completed:u("Completed",t),failed:u("Failed",t),viewReport:u("View Report",t),regenerate:u("Regenerate",t),delete:u("Delete",t),actionCannotBeUndone:u("This action cannot be undone.",t),noChangedMind:u("No, I changed my mind",t)},B=[{label:d.delete,value:"delete"}],$=[{name:"status",label:d.filterByStatus,options:[{value:"all",label:d.allStatuses},{value:"pending",label:d.pending},{value:"processing",label:d.processing},{value:"completed",label:d.completed},{value:"failed",label:d.failed}]}],D=V(()=>({status:h.value})),U=V(()=>[{slug:"keyword",label:u("Keyword",t),sortable:!0,sortDir:p.value==="keyword"?s.value:"asc",sorted:p.value==="keyword",width:"40%"},{slug:"status",label:u("Status",t),sortable:!0,sortDir:p.value==="status"?s.value:"asc",sorted:p.value==="status"},{slug:"brandsMentioned",label:u("Brands",t),sortable:!0,sortDir:p.value==="brandsMentioned"?s.value:"asc",sorted:p.value==="brandsMentioned"},{slug:"created",label:u("Created",t),sortable:!0,sortDir:p.value==="created"?s.value:"desc",sorted:p.value==="created"},{slug:"actions",label:"",sortable:!1,width:"50px"}]),E=_=>_.map(m=>({id:m.uuid||"",uuid:m.uuid||"",keyword:m.keyword||"-",status:m.status||"pending",brandsMentioned:m.brands_mentioned||null,created:m.created_at||new Date().toISOString()})),T=async()=>{var _;g.value=!0;try{const m=n.value===1?0:(n.value-1)*f.value,a={};p.value&&(a.orderBy=p.value),s.value&&(a.orderDir=s.value),f.value&&(a.limit=f.value),m!==null&&(a.offset=m),y.value&&(a.searchTerm=y.value),h.value&&h.value!=="all"&&(a.status=h.value);let I=j.restUrl("ai/insights/reports");const q=new URLSearchParams(a).toString();q&&(I+="?"+q);const N=await Y.get(I).then(Ae=>Ae.body);N.success&&((_=N.data)!=null&&_.reports)&&(o.value=E(N.data.reports),b.value={total:N.data.total,pages:Math.ceil(N.data.total/f.value),per_page:f.value})}catch(m){console.error("Error fetching reports:",m)}finally{g.value=!1}},z=_=>{x.push({name:"keyword-reports",params:{uuid:_}})},Ce=async _=>{var m;if(!(!_||!_.uuid||A.value===_.uuid)){A.value=_.uuid;try{const a=await Y.post(j.restUrl(`ai/insights/reports/${_.uuid}/regenerate`)).then(I=>I.body);a.success&&((m=a.data)!=null&&m.uuid)?x.push({name:"keyword-reports",params:{uuid:a.data.uuid}}):(console.error("Failed to regenerate report:",a),A.value=null)}catch(a){console.error("Error regenerating report:",a),A.value=null}}},ye=_=>{_&&(w.value=_,L.value=!0)},K=V(()=>Array.isArray(w.value)?w.value.length:1),ke=V(()=>G(se("Are you sure you want to delete this report?","Are you sure you want to delete %d reports?",K.value,t),K.value)),be=V(()=>G(se("Yes, I want to delete this report","Yes, I want to delete %d reports",K.value,t),K.value)),we=async()=>{const _=Array.isArray(w.value)?w.value:[w.value];if(_.length)if(_.length===1){const m=_[0];if(k.value===m)return;k.value=m;try{const a=await Y.delete(j.restUrl(`ai/insights/reports/${m}`)).then(I=>I.body);a.success?(T(),L.value=!1,w.value=null):console.error("Failed to delete report:",a)}catch(a){console.error("Error deleting report:",a)}finally{k.value=null}}else await Re()},$e=_=>{n.value=_,T()},xe=_=>{y.value=_,n.value=1,T()},Le=_=>{_.slug===p.value?s.value=s.value==="asc"?"desc":"asc":(p.value=_.slug,s.value=_.sortDir||"asc"),n.value=1,T()},Se=_=>{const m=_.filters||_;h.value=m.status||"all",n.value=1,T()},Me=async _=>{const{action:m,selectedRows:a}=_;m==="delete"&&a&&a.length&&(w.value=a,L.value=!0)},Re=async()=>{const _=Array.isArray(w.value)?w.value:[w.value];if(_.length){g.value=!0;try{const m=_.map(q=>Y.delete(j.restUrl(`ai/insights/reports/${q}`)).then(N=>N.body)),a=await Promise.all(m);a.every(q=>q.success)?(await T(),L.value=!1,w.value=null):console.error("Some reports failed to delete:",a)}catch(m){console.error("Error deleting reports:",m)}finally{g.value=!1}}};return me(()=>{T()}),(_,m)=>(l(),P(i(oe),{slug:"reports","header-text":d.reports,toggles:!1,"no-slide":""},{tooltip:c(()=>[M(r(d.reportsTooltip),1)]),default:c(()=>[v(i(ge),{ref:"table",columns:U.value,rows:o.value,loading:g.value||A.value!==null,totals:b.value,"show-pagination":"","show-bulk-actions":"","show-search":"","bulk-options":B,"additional-filters":$,"selected-filters":D.value,onPaginate:$e,onSearch:xe,onProcessBulkAction:Me,onProcessAdditionalFilters:Se,onSortColumn:Le},{keyword:c(({row:a})=>[e("strong",null,[e("a",{href:"#",onClick:O(I=>z(a.uuid),["prevent"])},r(a.keyword),9,Bt)]),e("div",Ht,[e("span",null,[e("a",{href:"#",class:"view",onClick:O(I=>z(a.uuid),["prevent"])},[e("span",null,r(d.viewReport),1)],8,It),M(" | ")]),e("span",null,[e("a",{href:"#",class:F(["regenerate",{regenerating:A.value===a.uuid}]),onClick:O(I=>Ce(a),["prevent"])},[e("span",null,r(d.regenerate),1)],10,Dt),M(" | ")]),e("span",Pt,[e("a",{href:"#",class:"submitdelete",onClick:O(I=>ye(a.uuid),["prevent"])},[e("span",null,r(d.delete),1)],8,Ft)])])]),status:c(({row:a})=>[e("span",{class:F(["status-badge",`status-${a.status}`])},r(a.status),3)]),brandsMentioned:c(({row:a})=>[M(r(a.brandsMentioned||"-"),1)]),created:c(({row:a})=>[e("span",{title:a.created?new Date(a.created).toLocaleString():"-"},r(a.created?i(Ie)(new Date(a.created),"M j, Y"):"-"),9,Zt)]),actions:c(({row:a})=>[v(i(X),{type:"gray",class:"btn-toggle-row allow-click",onClick:I=>z(a.uuid)},{default:c(()=>[v(i(fe),{width:"20"})]),_:2},1032,["onClick"])]),_:1},8,["columns","rows","loading","totals","selected-filters"]),v(i(Te),{show:L.value,"no-header":"",onClose:m[3]||(m[3]=a=>L.value=!1)},{body:c(()=>[e("div",Tt,[e("button",{class:"close",onClick:m[1]||(m[1]=O(a=>L.value=!1,["stop"]))},[v(i(Ue),{onClick:m[0]||(m[0]=a=>L.value=!1)})]),e("h3",null,r(ke.value),1),e("div",{class:"reset-description",innerHTML:d.actionCannotBeUndone},null,8,Ut),v(i(X),{type:"blue",size:"medium",onClick:we,loading:k.value!==null||g.value},{default:c(()=>[M(r(be.value),1)]),_:1},8,["loading"]),v(i(X),{type:"gray",size:"medium",onClick:m[2]||(m[2]=a=>L.value=!1)},{default:c(()=>[M(r(d.noChangedMind),1)]),_:1})])]),_:1},8,["show"])]),_:1},8,["header-text"]))}},Nt=Z(Et,[["__scopeId","data-v-bb55734d"]]),Ot={class:"aioseo-ai-insights"},Gt={class:"keyword-intro"},zt={class:"keyword-title"},qt={class:"keyword-description"},jt={class:"keyword-form"},ue={__name:"Index",setup(R){const t="all-in-one-seo-pack",x=de(),o=De(),g=S(""),n=S(!1),f=S(""),y=V(()=>{var h,b,k,L,w,A;return(k=(b=(h=o.aioseo)==null?void 0:h.aiInsights)==null?void 0:b.rateLimit)!=null&&k.reached?(A=(w=(L=o.aioseo)==null?void 0:L.aiInsights)==null?void 0:w.rateLimit)==null?void 0:A.message:!1}),p={title:u("Discover Which Brands Rank in AI Search Results",t),description:u("Get a detailed report on which brands rank for a particular query or keyword, and how they perform in AI search results.",t),placeholder:u('e.g. "best dog food for puppies"',t),analyze:u("Generate",t),errorCreatingReport:u("An error occurred while creating the report. Please try again.",t)},s=async()=>{var h,b;if(!(!g.value||n.value)){n.value=!0,f.value="";try{const k=await Y.post(j.restUrl("ai/insights/reports")).send({keyword:g.value}).then(L=>L.body);k.success&&((h=k.data)!=null&&h.uuid)?x.push({name:"keyword-reports",params:{uuid:k.data.uuid}}):f.value=((b=k.data)==null?void 0:b.message)||k.message||p.errorCreatingReport}catch(k){k.response&&k.response.body?f.value=k.response.body.message||k.message:f.value=k.message||p.errorCreatingReport}finally{n.value=!1}}};return(h,b)=>{const k=te("base-input"),L=te("base-button");return l(),C("div",Ot,[v(i(_e),null,{default:c(()=>[v(i(ve),null,{default:c(()=>[v(Vt),y.value?(l(),P(i(ee),{key:0,type:"red",onCloseAlert:b[0]||(b[0]=w=>h.showRateLimitAlert=!1)},{default:c(()=>[M(r(y.value),1)]),_:1})):H("",!0),v(i(oe),{slug:"queryReport",toggles:!1,"hide-header":"","no-slide":""},{default:c(()=>[e("div",Gt,[e("h2",zt,r(p.title),1),e("p",qt,r(p.description),1),v(xt),e("div",jt,[v(k,{modelValue:g.value,"onUpdate:modelValue":b[1]||(b[1]=w=>g.value=w),placeholder:p.placeholder,disabled:!!y.value,onKeyup:He(s,["enter"])},null,8,["modelValue","placeholder","disabled"]),v(L,{type:"blue",onClick:s,loading:n.value,disabled:!g.value||n.value||!!y.value},{default:c(()=>[M(r(p.analyze),1)]),_:1},8,["loading","disabled"])]),f.value?(l(),P(i(ee),{key:0,type:"red",onCloseAlert:b[2]||(b[2]=w=>f.value="")},{default:c(()=>[M(r(f.value),1)]),_:1})):H("",!0)])]),_:1}),v(Nt)]),_:1})]),_:1})])}}},Yt={__name:"LoaderProgress",props:{show:{type:Boolean,default:!0},duration:{type:Number,default:5},customClass:{type:String,default:""}},setup(R){return(t,x)=>R.show?(l(),C("div",{key:0,class:F(["aioseo-loader-progress",R.customClass])},[e("div",{class:"aioseo-loader-progress__value",style:Pe({animationDuration:R.duration+"s"})},null,4)],2)):H("",!0)}},Wt=Z(Yt,[["__scopeId","data-v-d916a77c"]]),Kt={class:"brands-partial"},Jt={key:0,class:"brands-mentioned"},Qt={class:"provider-header"},Xt={class:"provider-header"},es={class:"provider-header"},ts={class:"provider-header"},ss={class:"provider-header"},os={class:"rank-cell rank-cell-avg"},J=10,as={__name:"Brands",props:{report:{type:Object,required:!0}},setup(R){const t="all-in-one-seo-pack",x=R,o={brand:u("Brand",t),rank:u("Rank",t),openAi:u("OpenAI",t),anthropic:u("Claude",t),gemini:u("Gemini",t),deepSeek:u("DeepSeek",t),perplexity:u("Perplexity",t)},g=S(1),n=S("rank"),f=S("asc"),y=V(()=>[{slug:"brand",label:o.brand,sortable:!1,width:"30%",sorted:!1},{slug:"rank",label:o.rank,sortable:!0,width:"100px",sorted:n.value==="rank",sortDir:n.value==="rank"?f.value:"asc"},{slug:"openai",label:o.openAi,sortable:!0,width:"120px",sorted:n.value==="openai",sortDir:n.value==="openai"?f.value:"asc"},{slug:"anthropic",label:o.anthropic,sortable:!0,width:"120px",sorted:n.value==="anthropic",sortDir:n.value==="anthropic"?f.value:"asc"},{slug:"gemini",label:o.gemini,sortable:!0,width:"120px",sorted:n.value==="gemini",sortDir:n.value==="gemini"?f.value:"asc"},{slug:"deepseek",label:o.deepSeek,sortable:!0,width:"120px",sorted:n.value==="deepseek",sortDir:n.value==="deepseek"?f.value:"asc"},{slug:"perplexity",label:o.perplexity,sortable:!0,width:"120px",sorted:n.value==="perplexity",sortDir:n.value==="perplexity"?f.value:"asc"}]),p=V(()=>{var B;return(B=x.report)!=null&&B.brands?Object.entries(x.report.brands).map(([$,D])=>({name:$,rank:D.rank||0,scores:{openai:D.openai||null,anthropic:D.anthropic||null,gemini:D.gemini||null,deepseek:D.deepseek||null,perplexity:D.perplexity||null}})).sort(($,D)=>{let U,E;if(n.value==="rank")U=$.rank||0,E=D.rank||0;else{if(U=$.scores[n.value]||null,E=D.scores[n.value]||null,U===null&&E===null)return 0;if(U===null)return 1;if(E===null)return-1}const T=typeof U=="number"?U:parseFloat(U)||0,z=typeof E=="number"?E:parseFloat(E)||0;return f.value==="asc"?T-z:z-T}):[]}),s=V(()=>{const d=p.value.length,B=Math.ceil(d/J);return{total:d,pages:B,per_page:J}}),h=V(()=>{const d=(g.value-1)*J,B=d+J;return p.value.slice(d,B)}),b=d=>{g.value=d},k=d=>{g.value=1,d.slug===n.value?f.value=f.value==="asc"?"desc":"asc":(n.value=d.slug,f.value="asc")},L=d=>d?parseFloat(d.toFixed(1)):"-",w=d=>!d||d==="-"||d===null?"":`rank-cell-${parseInt(d,10)}`,A=d=>{const B=parseInt(d,10);return G(se("%1$s brand mentioned","%1$s brands mentioned",B,t),B)};return(d,B)=>(l(),C("div",Kt,[v(i(ge),{columns:y.value,rows:h.value,totals:s.value,"initial-page-number":g.value,"show-search":!1,"show-pagination":!0,"show-bulk-actions":!1,"show-header":!0,"show-table-footer":!0,"initial-items-per-page":10,onPaginate:b,onSortColumn:k},{tablenav:c(()=>{var $;return[($=x.report)!=null&&$.brands_mentioned?(l(),C("div",Jt,r(A(x.report.brands_mentioned)),1)):H("",!0)]}),brandHeaderFooter:c(()=>[M(r(o.brand),1)]),rankHeaderFooter:c(()=>[M(r(o.rank),1)]),openaiHeaderFooter:c(()=>[e("span",Qt,[v(i(ne)),M(" "+r(o.openAi),1)])]),anthropicHeaderFooter:c(()=>[e("span",Xt,[v(i(re)),M(" "+r(o.anthropic),1)])]),geminiHeaderFooter:c(()=>[e("span",es,[v(i(ae)),M(" "+r(o.gemini),1)])]),deepseekHeaderFooter:c(()=>[e("span",ts,[v(i(le)),M(" "+r(o.deepSeek),1)])]),perplexityHeaderFooter:c(()=>[e("span",ss,[v(i(ie)),M(" "+r(o.perplexity),1)])]),brand:c(({row:$})=>[M(r($.name),1)]),rank:c(({row:$})=>[e("span",os,r(L($.rank)),1)]),openai:c(({row:$})=>[e("span",{class:F(["rank-cell",w($.scores.openai)])},r($.scores.openai||"-"),3)]),anthropic:c(({row:$})=>[e("span",{class:F(["rank-cell",w($.scores.anthropic)])},r($.scores.anthropic||"-"),3)]),gemini:c(({row:$})=>[e("span",{class:F(["rank-cell",w($.scores.gemini)])},r($.scores.gemini||"-"),3)]),deepseek:c(({row:$})=>[e("span",{class:F(["rank-cell",w($.scores.deepseek)])},r($.scores.deepseek||"-"),3)]),perplexity:c(({row:$})=>[e("span",{class:F(["rank-cell",w($.scores.perplexity)])},r($.scores.perplexity||"-"),3)]),_:1},8,["columns","rows","totals","initial-page-number"])]))}},rs=Z(as,[["__scopeId","data-v-272d28fa"]]),ns={},ls={focusable:"false",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-globe",fill:"currentColor",viewBox:"2 2 20 20"},is=e("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"},null,-1),us=[is];function cs(R,t){return l(),C("svg",ls,us)}const ce=Z(ns,[["render",cs]]),ds={class:"report-results-partial"},ps={class:"providers-list"},vs=["onClick"],_s={class:"provider-entry-main"},hs={class:"provider-info"},ms={class:"provider-icon"},gs={class:"provider-name"},fs={class:"provider-metrics"},Cs={key:0,class:"metric-badge"},ys={class:"metric-badge"},ks={class:"expand-button"},bs={key:0,class:"brands-list-section"},ws=["innerHTML"],$s={key:2,class:"sources-section"},xs={class:"sources-header"},Ls={class:"sources-title"},Ss={class:"sources-list"},Ms=["href"],Rs={class:"source-content"},As={class:"source-title"},Vs={class:"source-url"},Bs={class:"source-link-button"},Hs={__name:"ReportResults",props:{report:{type:Object,required:!0}},setup(R){const t="all-in-one-seo-pack",x=R,o=S(null),g={aiEngineResults:u("AI Engine Results",t),tooltip:u("Results from different AI engines",t),sourcesCount:u("%1$s sources",t),brandsCount:u("%1$s brands",t),webSearchSources:u("%1$s Web Search Sources",t),positionNumber:u("#%1$s",t)},n=V(()=>{var p;if(!((p=x.report)!=null&&p.results)||!Array.isArray(x.report.results))return[];const y={openai:"OpenAI",anthropic:"Claude",gemini:"Gemini",deepseek:"DeepSeek",perplexity:"Perplexity"};return x.report.results.map(s=>{var k,L;const h=((k=s.brands)==null?void 0:k.length)||0,b=((L=s.sources)==null?void 0:L.length)||0;return{key:s.provider,name:y[s.provider]||s.provider,brandsCount:h,sourcesCount:0<b?b:null,data:s}}).sort((s,h)=>{const b=["openai","anthropic","gemini","deepseek","perplexity"];return b.indexOf(s.key)-b.indexOf(h.key)})}),f=y=>{o.value===y?o.value=null:o.value=y};return(y,p)=>(l(),C("div",ds,[v(i(oe),{slug:"ai-engine-results",toggles:!1,"no-slide":""},{header:c(()=>[M(r(g.aiEngineResults),1)]),tooltip:c(()=>[M(r(g.tooltip),1)]),default:c(()=>[e("div",ps,[(l(!0),C(W,null,Q(n.value,s=>(l(),C("div",{key:s.key,class:F(["provider-entry",{"is-expanded":o.value===s.key}]),onClick:h=>f(s.key)},[e("div",_s,[e("div",hs,[e("div",ms,[s.key==="anthropic"?(l(),P(i(re),{key:0})):s.key==="deepseek"?(l(),P(i(le),{key:1})):s.key==="perplexity"?(l(),P(i(ie),{key:2})):s.key==="gemini"?(l(),P(i(ae),{key:3})):s.key==="openai"?(l(),P(i(ne),{key:4})):H("",!0)]),e("span",gs,r(s.name),1)]),e("div",fs,[s.sourcesCount?(l(),C("div",Cs,[v(i(ce),{class:"badge-icon"}),e("span",null,r(i(G)(g.sourcesCount,s.sourcesCount)),1)])):H("",!0),e("div",ys,[e("span",null,r(i(G)(g.brandsCount,s.brandsCount)),1)]),e("button",ks,[v(i(Oe),{class:F({rotated:o.value===s.key})},null,8,["class"])])])]),v(i(Ne),{active:o.value===s.key},{default:c(()=>[o.value===s.key?(l(),C("div",{key:0,class:"provider-details",onClick:p[1]||(p[1]=O(()=>{},["stop"]))},[s.data.brands&&0<s.data.brands.length?(l(),C("div",bs,[(l(!0),C(W,null,Q(s.data.brands,h=>(l(),C("div",{key:h.name,class:"brand-tag"},r(h.name)+" ("+r(i(G)(g.positionNumber,h.position))+") ",1))),128))])):H("",!0),s.data.overview?(l(),C("div",{key:1,class:"provider-overview",innerHTML:s.data.overview},null,8,ws)):H("",!0),s.sourcesCount&&s.data.sources&&0<s.data.sources.length?(l(),C("div",$s,[e("div",xs,[e("h3",Ls,[v(i(ce),{class:"sources-globe-icon"}),M(" "+r(i(G)(g.webSearchSources,s.sourcesCount))+" ",1),v(i(fe),{class:F(["sources-chevron",{rotated:o.value===s.key}])},null,8,["class"])])]),e("div",Ss,[(l(!0),C(W,null,Q(s.data.sources,(h,b)=>(l(),C("a",{key:b,href:h.url,target:"_blank",rel:"noopener noreferrer",class:"source-entry",onClick:p[0]||(p[0]=O(()=>{},["stop"]))},[e("div",Rs,[e("h4",As,r(h.title||h.name||h.url),1),e("span",Vs,r(h.url),1)]),e("span",Bs,[v(i(Ge))])],8,Ms))),128))])])):H("",!0)])):H("",!0)]),_:2},1032,["active"])],10,vs))),128))])]),_:1})]))}},Is=Z(Hs,[["__scopeId","data-v-6a0e7250"]]),Ds={class:"aioseo-ai-insights-report"},Ps={class:"back-link"},Fs={key:0,class:"loading-state"},Zs={key:0,class:"report-title"},Ts={key:2,class:"report-content"},Us={key:0,class:"report-section"},Es={key:3,class:"error-state"},Ns={__name:"Report",setup(R){const t="all-in-one-seo-pack",x=pe(),o=S(null),g=S(!0),n=S(!1),f=S(null),y={backToReports:u("Back to Reports",t),resultsFor:u("Results for:",t),loadingResultsFor:u("Loading results for:",t),errorLoading:u("Error loading report.",t)},p=async()=>{var k,L,w;const b=x.params.uuid;if(!b){g.value=!1;return}try{const A=await Y.get(j.restUrl(`ai/insights/reports/${b}`)).then(d=>d.body);A.success&&((k=A.data)!=null&&k.report)?(o.value=A.data.report,["pending","processing"].includes((L=o.value)==null?void 0:L.status)&&s(),["completed","failed"].includes((w=o.value)==null?void 0:w.status)&&h()):(o.value=null,h())}catch(A){console.error("Error fetching report:",A),o.value=null,h()}finally{g.value=!1}},s=()=>{n.value||(n.value=!0,f.value=setInterval(p,5e3))},h=()=>{n.value=!1,f.value&&(clearInterval(f.value),f.value=null)};return me(()=>{g.value=!0,p()}),Fe(()=>{h()}),(b,k)=>{const L=te("router-link");return l(),C("div",Ds,[v(i(_e),null,{default:c(()=>[v(i(ve),null,{default:c(()=>[e("div",Ps,[v(L,{to:{name:"keyword-reports"}},{default:c(()=>[M(" ← "+r(y.backToReports),1)]),_:1})]),g.value?(l(),C("div",Fs,[v(i(Ee),{dark:!0})])):(l(),C(W,{key:1},[o.value?(l(),C("h1",Zs,[M(r(n.value?y.loadingResultsFor:y.resultsFor)+' "',1),e("strong",null,r(o.value.keyword),1),M('" ')])):H("",!0),n.value&&o.value&&(o.value.status==="pending"||o.value.status==="processing")?(l(),P(i(Wt),{key:1,duration:15})):H("",!0),o.value?(l(),C("div",Ts,[o.value.status==="completed"?(l(),C("div",Us,[v(rs,{report:o.value},null,8,["report"]),v(Is,{report:o.value},null,8,["report"])])):H("",!0)])):(l(),C("div",Es,[e("p",null,r(y.errorLoading),1)]))],64))]),_:1})]),_:1})])}}},Os={class:"aioseo-ai-insights"},T1={__name:"Main",setup(R){const t="all-in-one-seo-pack",x=pe(),o=u("AI Insights",t),g=V(()=>{var y,p;return(y=x.params)!=null&&y.uuid?!1:((p=x.meta)==null?void 0:p.showTabs)!==!1}),n=V(()=>{var y;return((y=x.meta)==null?void 0:y.showSaveButton)!==!1}),f=V(()=>{var y;switch(x.name){case"keyword-reports":return(y=x.params)!=null&&y.uuid?Ns:ue;case"brand-tracker":return Be;default:return ue}});return(y,p)=>(l(),C("div",Os,[v(i(Ve),{"page-name":i(o),"show-tabs":g.value,"show-save-button":n.value},{default:c(()=>[(l(),P(he(f.value)))]),_:1},8,["page-name","show-tabs","show-save-button"])]))}};export{T1 as default};
Save
Cancel