@yoast/ai-insights-client 1.4.5 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,9 +22,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
22
22
  */var lg;function lO(){return lg||(lg=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(ru)),ru.exports}var cO=lO();const Ce=Wp(cO);var uO=function(t){return xk({mutation:{onSettled:function(){t&&t()}}})};function dO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}))}const fO=$.forwardRef(dO);function hO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const gO=$.forwardRef(hO);function yO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))}const mO=$.forwardRef(yO);function pO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const vO=$.forwardRef(pO);function bO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const xO=$.forwardRef(bO);function wO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"}))}const SO=$.forwardRef(wO);function CO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const _O=$.forwardRef(CO);function kO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const OO=$.forwardRef(kO);function EO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const AO=$.forwardRef(EO);function PO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const qv=$.forwardRef(PO);function TO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))}const zv=$.forwardRef(TO);function MO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"}))}const $O=$.forwardRef(MO);function jO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))}const DO=$.forwardRef(jO);function LO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"}))}const IO=$.forwardRef(LO);function RO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const ff=$.forwardRef(RO);function FO(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const NO=$.forwardRef(FO);var BO=function(){return[{label:"Brand analysis",href:"/",Icon:$O,isActive:function(n){return n.startsWith("/setup")||n==="/"},showInMenu:!0},{label:"Settings",href:"/settings",Icon:xO,isActive:function(n){return n.startsWith("/settings")},showInMenu:!0}]},cg;function qO(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ug=function(t){var n=t.className,r=en(),i=r.pathname,s=BO();return y.jsx("div",{className:Ce("yst-flex yst-flex-col yst-gap-10",n),children:y.jsx(E.SidebarNavigation.Sidebar,{children:y.jsx(E.SidebarNavigation.List,{className:"yst-space-y-2",children:s.filter(function(o){return o.showInMenu!==!1}).map(function(o){var a=o.isActive?o.isActive(i):!1;return y.jsx(E.SidebarNavigation.SubmenuItem,{className:Ce("yst-flex yst-gap-x-3",{"yst-sidebar-navigation__item--active":a}),href:o.href,to:o.href,as:Vr,label:y.jsxs(y.Fragment,{children:[y.jsx(o.Icon,{className:Ce(cg||(cg=qO(["yst-sidebar-navigation__icon yst-h-6 yst-w-6"])))}),o.label]})},o.label)})})})})};const zO="data:image/svg+xml,%3csvg%20width='96'%20height='42'%20viewBox='0%200%2096%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M31.6517%2010.1419C24.3001%2010.1419%2021.3588%2015.0112%2021.3588%2020.4319C21.3588%2025.8525%2024.2564%2030.9356%2031.6517%2030.9356C39.0469%2030.9356%2041.9256%2025.8375%2041.9123%2020.7619C41.8952%2014.58%2038.7258%2010.14%2031.6517%2010.14V10.1419ZM27.1978%2020.7394C27.3764%2013.485%2033.0235%2013.4925%2034.9104%2016.0912C36.63%2018.4594%2036.9815%2026.5556%2031.6536%2026.4975C29.1986%2026.4712%2027.2719%2024.8344%2027.1997%2020.7394H27.1978ZM91.2791%2025.905V15.3956H95.0869V10.8337H91.2791V5.32312H85.3982V10.8337H82.415V15.3956H85.3982V25.3087C85.3982%2030.9431%2089.3789%2034.2919%2093.5801%2034.9856L95.3358%2030.3206C92.8866%2030.015%2091.3019%2028.2075%2091.2791%2025.9069V25.905ZM61.6088%2024.2419V16.3425C61.6088%2016.0537%2061.5898%2015.7837%2061.5613%2015.5194C61.0521%209.13687%2051.8669%209.15%2044.7529%2011.6006L46.8089%2015.6844C51.4413%2013.5131%2054.2136%2014.0737%2055.1826%2015.1425C55.2073%2015.1706%2055.232%2015.1969%2055.2548%2015.2269C55.2567%2015.2306%2055.2605%2015.2344%2055.2624%2015.2381C55.7565%2015.8962%2055.6387%2016.935%2055.6387%2017.7525C49.5849%2017.7525%2043.1416%2018.5456%2043.1416%2025.0969C43.1416%2030.0769%2049.4652%2033.2812%2056.0738%2028.5337L57.0542%2030.8681H62.7185C62.2131%2028.1269%2061.6069%2025.7794%2061.6069%2024.2419H61.6088ZM55.6843%2024.1987C51.0271%2029.3419%2046.7613%2024.5006%2051.1297%2022.3894C52.4161%2021.9562%2054.1604%2021.9375%2055.6843%2021.9375V24.1987ZM70.6477%2015.9169C70.6477%2013.9706%2073.8037%2013.0612%2078.7839%2015.3037L80.5054%2011.1769C73.8037%209.17812%2064.6509%208.99812%2064.592%2015.9169C64.5635%2019.2319%2066.7182%2021.015%2069.8211%2022.1531C71.9701%2022.9406%2075.073%2023.3494%2075.0635%2025.0387C75.0521%2027.2456%2070.241%2027.5831%2065.8632%2024.615L64.0942%2029.0906C70.0662%2032.0231%2081.1705%2032.1056%2081.1116%2024.7556C81.0527%2017.4881%2070.6457%2018.735%2070.6457%2015.9169H70.6477ZM18.8734%200.1875L10.3495%2023.5519L6.26617%2010.935H0.195312L6.99391%2028.1644C7.57346%2029.6312%207.57346%2031.2594%206.99391%2032.7262C6.23387%2034.6481%204.97029%2036.2944%201.88831%2036.7031V41.8106C7.88886%2041.8106%2011.1324%2038.1712%2014.0262%2030.1931L25.368%200.1875H18.8734Z'%20fill='%23A61E69'/%3e%3c/svg%3e";function HO(e,t){return WO(e)||VO(e,t)||KO(e,t)||UO()}function UO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
23
23
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KO(e,t){if(e){if(typeof e=="string")return dg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dg(e,t):void 0}}function dg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function VO(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function WO(e){if(Array.isArray(e))return e}var GO=function(t){var n=t.className,r=en(),i=r.pathname,s=Hn(),o=s.hostAppProps,a=o.onLogout,l=z.useState(!1),c=HO(l,2),u=c[0],d=c[1],f=Sc({query:{select:function(C){var w=C.data;return w==null?void 0:w.data}}}),h=f.data,g=f.isLoading,m=uO(a),p=m.mutate,v=m.isPending,b=function(C){if(C.preventDefault(),d(!0),!v)return p()};return y.jsxs("div",{className:Ce("ystaii-sidemenu"),children:[y.jsx("div",{className:"ystaii-mobile-menu lg:yst-hidden",children:y.jsx(E.SidebarNavigation,{activePath:i,children:y.jsx(E.SidebarNavigation.Mobile,{closeButtonScreenReaderText:"Close sidebar",openButtonScreenReaderText:"Open sidebar",children:y.jsx(ug,{})})})}),y.jsxs("div",{className:Ce("ystaii-menuHeader","yst-mb-6 yst-mt-10 yst-flex yst-flex-row yst-items-center yst-justify-between yst-px-4","lg:yst-flex-col lg:yst-items-start lg:yst-space-y-12"),children:[y.jsx(E.Title,{children:y.jsx(Vr,{className:Ce("yst-outline-none"),to:"/",children:y.jsx("img",{src:zO,alt:"Yoast",className:"yst-inline-block yst-h-8"})})}),y.jsxs("div",{className:Ce("ystaii-userInfoContainer","yst-flex yst-flex-col"),children:[y.jsx("div",{children:y.jsx("b",{children:(h==null?void 0:h.displayName)||y.jsx(E.SkeletonLoader,{children:"Display name"})})}),y.jsx("div",{children:(h==null?void 0:h.email)||y.jsx(E.SkeletonLoader,{children:"loading-email@address.com"})}),y.jsx("div",{children:y.jsx(E.Link,{variant:"primary",className:"yst-no-underline",onClick:b,children:g?y.jsxs(E.SkeletonLoader,{children:["Sign out ",y.jsx("span",{"aria-hidden":"true",children:"→"})]}):u||v?y.jsx(y.Fragment,{children:"Signing out..."}):y.jsxs(y.Fragment,{children:["Sign out ",y.jsx("span",{"aria-hidden":"true",children:"→"})]})})})]})]}),y.jsx("div",{className:Ce("ystaii-desktopMenu","yst-hidden","lg:yst-mb-0 lg:yst-block lg:yst-w-full lg:yst-shrink-0"),children:y.jsx(E.SidebarNavigation,{activePath:i,children:y.jsx(ug,{className:n})})})]})},Hv=Nx.a.withConfig({displayName:"SkipLink",componentId:"sc-40h6pc-0"})(["position:absolute;top:-1000em;left:10px;z-index:100000;display:block;height:48px;min-width:150px;padding:0 15px;font-size:14px;line-height:48px;background:var(--bg-color-white);border-radius:3px;box-shadow:0px 2px 2px 2px rgba(0,0,0,0.1);text-decoration:underline;text-align:center;outline:none;&:focus{top:10px;color:var(--text-color-blue);}"]);Hv.defaultProps={href:"#content"};function iu(e){var t=e.children,n=e.disable,r=n===void 0?!1:n,i=e.hideNav,s=i===void 0?!1:i,o=e.DebugInfo;return r?t:y.jsxs("div",{className:Ce("ystaii-layout","yst-block","lg:yst-flex lg:yst-min-h-full lg:yst-overflow-visible"),children:[y.jsx(Hv,{children:"Skip to main content"}),!s&&y.jsxs("div",{className:Ce("ystaii-sidebar","yst-overflow-hidden","lg:yst-flex-grow-1 lg:yst-max-w-[300px] lg:yst-flex-shrink-0 lg:yst-basis-[300px] lg:yst-overflow-visible lg:yst-pl-4"),children:[y.jsx(GO,{}),o&&y.jsx(o,{})]}),y.jsx("main",{className:Ce("ystaii-main","yst-mx-4 yst-my-0 yst-flex yst-min-w-0 yst-shrink yst-grow yst-basis-auto yst-px-0 yst-py-6","lg:yst-ml-12 lg:yst-mr-6"),children:y.jsx("div",{className:Ce("ystaii-main-content","yst-mx-auto yst-flex yst-flex-col yst-gap-8","lg:yst-w-full lg:yst-flex-row"),children:y.jsx("div",{className:"yst-layout-root yst-mx-auto yst-w-full yst-max-w-[1200px] yst-flex-1",children:t})})})]})}function md(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Ut(b,"_invoke",function(x,C,w){var k,S,_,O=0,A=w||[],M=!1,D={p:0,n:0,v:e,a:W,f:W.bind(e,4),d:function(L,j){return k=L,S=0,_=e,D.n=j,o}};function W(R,L){for(S=R,_=L,t=0;!M&&O&&!j&&t<A.length;t++){var j,I=A[t],oe=D.p,ue=I[2];R>3?(j=ue===L)&&(_=I[(S=I[4])?5:(S=3,3)],I[4]=I[5]=e):I[0]<=oe&&((j=R<2&&oe<I[1])?(S=0,D.v=L,D.n=I[1]):oe<ue&&(j=R<3||I[0]>L||L>ue)&&(I[4]=R,I[5]=L,D.n=ue,S=0))}if(j||R>1)return o;throw M=!0,L}return function(R,L,j){if(O>1)throw TypeError("Generator is already running");for(M&&L===1&&W(L,j),S=L,_=j;(t=S<2?e:_)||!M;){k||(S?S<3?(S>1&&(D.n=-1),W(S,_)):D.n=_:D.v=_);try{if(O=2,k){if(S||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,S<2&&(S=0)}else S===1&&(t=k.return)&&t.call(k),S<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),S=1);k=e}else if((t=(M=D.n<0)?_:x.call(C,D))!==o)break}catch(I){k=e,S=1,_=I}finally{O=1}}return{value:t,done:M}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Ut(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Ut(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,Ut(d,"constructor",c),Ut(c,"constructor",l),l.displayName="GeneratorFunction",Ut(c,i,"GeneratorFunction"),Ut(d),Ut(d,i,"Generator"),Ut(d,r,function(){return this}),Ut(d,"toString",function(){return"[object Generator]"}),(md=function(){return{w:s,m:f}})()}function Ut(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Ut=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){Ut(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},Ut(e,t,n,r)}function fg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function QO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){fg(s,r,i,o,a,"next",l)}function a(l){fg(s,r,i,o,a,"throw",l)}o(void 0)})}}function YO(e,t){return eE(e)||ZO(e,t)||JO(e,t)||XO()}function XO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
24
24
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JO(e,t){if(e){if(typeof e=="string")return hg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hg(e,t):void 0}}function hg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ZO(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function eE(e){if(Array.isArray(e))return e}var tE=function(t){var n,r,i=t.className,s=tn(),o=_n(),a=z.useState(!1),l=YO(a,2),c=l[0],u=l[1],d=zs({query:{select:function(k){var S=k.data;return S==null?void 0:S.brands}}}),f=d.data,h=Fv({mutation:{onSettled:function(){s.invalidateQueries({queryKey:[nr()]})}}}),g=h.mutateAsync,m=h.isPending,p=(n=f==null?void 0:f.filter(function(w){var k;return((k=w.settings)===null||k===void 0?void 0:k.showAutomaticAnalysisDisabledNotification)===!0}))!==null&&n!==void 0?n:[],v=function(){u(!1)},b=function(){var w=QO(md().m(function k(){var S;return md().w(function(_){for(;;)switch(_.n){case 0:if(p.length!==0){_.n=1;break}return _.a(2);case 1:return S=p.map(function(O){return g({brandId:String(O.id),data:{showAutomaticAnalysisDisabledNotification:!1}})}),_.n=2,Promise.all(S);case 2:o("/settings"),v();case 3:return _.a(2)}},k)}));return function(){return w.apply(this,arguments)}}();z.useEffect(function(){f&&f.some(function(w){var k;return((k=w.settings)===null||k===void 0?void 0:k.showAutomaticAnalysisDisabledNotification)===!0})&&u(!0)},[f]);var x=p.length===1?"One brand has been deactivated":"Multiple brands have been deactivated",C=p.length===1?y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),y.jsxs("p",{children:["The brand ",y.jsx("b",{children:p==null||(r=p[0])===null||r===void 0?void 0:r.name})," was deactivated, since it was the most recently analyzed."]}),y.jsxs("p",{children:["If you prefer, you can go to ",y.jsx("b",{children:"Settings"})," and deactivate a different brand instead."]})]}):y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),y.jsx("p",{children:"The following brands were deactivated, since they were the most recently analyzed:"}),y.jsx("ul",{children:p.map(function(w){return y.jsx("li",{children:y.jsx("b",{children:w.name})},w.id)})}),y.jsxs("p",{children:["If you prefer, you can go to ",y.jsx("b",{children:"Settings"})," and deactivate different brand(s) instead."]})]});return c?y.jsx(E.Modal,{isOpen:c,onClose:v,position:"center",as:"div",className:i,children:y.jsxs(E.Modal.Panel,{children:[y.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:x})}),y.jsx(E.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:C})]})}),y.jsxs(E.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(E.Button,{variant:"secondary",onClick:v,children:"Close"}),y.jsx(E.Button,{variant:"primary",onClick:b,isLoading:m,disabled:p.length===0,children:"Go to settings"})]})]})}):null};function _c(e){var t=e.children,n=e.description,r=e.title;return y.jsxs(E.Paper.Header,{children:[r&&y.jsx(E.Title,{className:Ce({"yst-mb-3":n||t}),children:r}),n&&(typeof n=="string"?y.jsx("p",{children:n}):n),t]})}var nE={HOME:"/"},rE=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo,a=en(),l=_n(),c={disable:s,hideNav:r},u=Hn(),d=u.brandId,f=Cc(),h=f.setBrandId,g=zs({query:{refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:function(_){var O;return _==null||(O=_.data)===null||O===void 0?void 0:O.brands}}}),m=g.data,p=g.isLoading,v=g.error,b=g.refetch,x=z.useRef(!1),C=z.useMemo(function(){return m==null?void 0:m.find(function(S){return S.id===d})},[m,d]);z.useEffect(function(){var S;if(!(m===void 0||d)){var _=(S=m[0])===null||S===void 0?void 0:S.id;_&&h(_)}},[m,d,h,l,a.pathname]),z.useEffect(function(){!d||x.current||(x.current=!0)},[C,d,l,a.pathname,m]);var w=z.useCallback(function(){b()},[b]),k=["Loading your brands...","Preparing your dashboard...","Checking analysis status...","Almost ready!"];return a.pathname!==nE.HOME&&p?y.jsx(iu,{...c,children:y.jsxs(E.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx(_c,{title:y.jsx(E.SkeletonLoader,{className:"yst-h-12 yst-w-36"}),description:y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-3/4"})}),y.jsx(E.Paper.Content,{children:y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-start yst-justify-center",children:y.jsx("div",{className:"yst-w-full yst-space-y-4",children:y.jsx("div",{className:"yst-space-y-4",children:k.map(function(S,_){return y.jsx(E.SkeletonLoader,{children:S},_)})})})})})]})}):v?y.jsx(iu,{...c,children:y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-space-y-4 yst-text-center",children:[y.jsx("div",{className:"yst-mb-4 yst-text-6xl yst-text-red-600",children:"⚠️"}),y.jsx("h2",{className:"yst-text-xl yst-font-semibold yst-text-slate-900",children:"Something went wrong"}),y.jsx("p",{className:"yst-text-slate-600",children:"We couldn't load your Brand Analysis. Please try again shortly."}),y.jsx(E.Button,{variant:"primary",onClick:w,children:"Retry"})]})})}):y.jsxs(iu,{DebugInfo:o,...c,children:[y.jsx(Zd,{}),y.jsx(tE,{})]})};function iE(e){if(e!=null){if(typeof e=="number"){var t=1e12;return e>t?e-Date.now():e}var n=Date.parse(e);if(!Number.isNaN(n))return n-Date.now()}}function sE(e,t){var n=iE(e);return n!==void 0&&n>t*60*1e3}function oE(e){if(e==null)return"a future date";var t;if(typeof e=="number"){var n=1e12;e>n?t=e:t=Date.now()+e}else{var r=Date.parse(e);Number.isNaN(r)||(t=r)}if(t===void 0)return"a future date";var i=new Date(t),s={month:"long",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0},o=i.toLocaleDateString("en-US",s),a=o.split(" ");if(a.length>=4){var l=a[0],c=a[1].replace(",",""),u=a.slice(2).join(" ");return"".concat(l," ").concat(c," at ").concat(u)}return"".concat(o)}function aE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{fillRule:"evenodd",d:"M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const Uv=$.forwardRef(aE);function lE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}const cE=$.forwardRef(lE);function uE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{fillRule:"evenodd",d:"M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const Kv=$.forwardRef(uE);function dE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}const Vv=$.forwardRef(dE);function fE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const hE=$.forwardRef(fE);function gE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))}const yE=$.forwardRef(gE);function mE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))}const gg=$.forwardRef(mE);function pE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),$.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))}const vE=$.forwardRef(pE);function bE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"}))}const xE=$.forwardRef(bE);function wE(e,t){return $.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}const SE=$.forwardRef(wE);function Wo(e){"@babel/helpers - typeof";return Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wo(e)}var CE=["children","as","startColor","endColor","angle","disabled","style","className"];function yg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yg(Object(n),!0).forEach(function(r){_E(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _E(e,t,n){return(t=kE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kE(e){var t=OE(e,"string");return Wo(t)=="symbol"?t:t+""}function OE(e,t){if(Wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EE(e,t){if(e==null)return{};var n,r,i=AE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var kc=function(t){var n=t.children,r=t.as,i=r===void 0?"span":r,s=t.startColor,o=s===void 0?"#A61E69":s,a=t.endColor,l=a===void 0?"#6366F1":a,c=t.angle,u=c===void 0?102:c,d=t.disabled,f=d===void 0?!1:d,h=t.style,g=h===void 0?{}:h,m=t.className,p=m===void 0?"":m,v=EE(t,CE),b=mg(f?{display:"inline-block"}:{background:"linear-gradient(".concat(u,"deg, ").concat(o,", ").concat(l,")"),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",display:"inline-block"},g);return y.jsx(i,{className:p,style:b,...v,children:n})};function hf(e){var t=e.children,n=e.nestedInPaperContent,r=n===void 0?!1:n,i=e.className;return y.jsx("div",{className:Ce("yst-mt-8 yst-flex yst-items-center yst-justify-end yst-gap-6 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",{"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem]":r},i),children:t})}var PE=function(){var t=_n();return y.jsx("form",{onSubmit:function(){return t("/setup")},children:y.jsxs(E.Paper,{className:"yst-mx-auto yst-flex yst-max-w-2xl",children:[y.jsx(E.Paper.Header,{children:y.jsxs(E.Title,{size:"1",children:["Welcome to ",y.jsx(kc,{children:"Yoast AI Brand Insights"}),"!"]})}),y.jsxs(E.Paper.Content,{className:"yst-space-y-8",children:[y.jsxs("div",{className:"yst-space-y-4 *:yst-text-tiny",children:[y.jsx("p",{children:"See how your brand is represented in AI answers"}),y.jsxs("p",{children:[y.jsx("b",{className:"yst-font-medium yst-text-slate-800",children:"Yoast AI Brand Insights"})," ","shows how often your brand appears, how it's described, and how it compares to competitors in tools like ChatGPT and Perplexity."]}),y.jsx("p",{children:"It only takes three simple steps to get your brand insights:"})]}),y.jsx("div",{className:"yst-flex yst-flex-col yst-items-stretch yst-justify-stretch yst-gap-4 yst-pb-8",children:[{title:"1. ADD BRAND INFO",description:"Tell us about your brand and where it's active so we can customize your analysis."},{title:"2. REVIEW QUERIES",description:"Edit or approve the queries generated from your input."},{title:"3. RUN ANALYSIS",description:"Run your queries through relevant AI models to see how your brand shows up."}].map(function(n,r,i){return y.jsxs("div",{className:"yst-relative yst-flex yst-flex-col yst-items-stretch",children:[y.jsxs("div",{className:"yst-flex yst-flex-row yst-items-center yst-justify-stretch yst-gap-6",children:[y.jsx(E.Stepper.Step,{isActive:!0,isComplete:!1,children:y.jsx("span",{className:"yst-hidden",children:r+1})}),y.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-gap-2 yst-rounded yst-border yst-border-slate-200 yst-p-6",children:[y.jsx(E.Title,{size:"3",className:"yst-font-semibold yst-uppercase",children:n.title}),y.jsx("p",{children:n.description})]})]}),r<i.length-1&&y.jsx("div",{className:"yst-absolute yst-left-[-2px] yst-top-1/2 yst-my-0 yst-ml-[13px] yst-h-full yst-border-l-2 yst-border-l-primary-600"})]},n.title)})})]}),y.jsx(hf,{className:"yst-justify-end",children:y.jsxs(E.Button,{variant:"primary",onClick:function(){return t("/setup")},className:"yst-gap-1.5",children:["Start your first analysis ",y.jsx(cE,{})]})})]})})};function Go(e){return typeof e!="number"?{}:{"yst-text-green-600":e>0,"yst-text-red-600":e<0,"yst-text-gray-400":e===0}}function Ta(e){var t=e.score,n=e.total,r=e.suffix,i=e.isLoading,s=i===void 0?!1:i,o=e.className,a=e.hideTotal,l=a===void 0?!1:a,c=e.delta,u=e.deltaFormat,d=u===void 0?"absolute":u,f=e.deltaSuffix,h=e.scoreFormat,g=h===void 0?"absolute":h;return y.jsxs("div",{className:Ce(o,"yst-font-medium"),children:[y.jsxs("span",{className:"yst-mr-1 yst-text-xl yst-font-bold yst-text-slate-900",children:[s||t===void 0||t===null?"—":t,!s&&t!==void 0&&t!==null&&g==="percentage"?"%":""]}),!l&&n&&n!==0&&n!=="0"&&y.jsxs("span",{className:"yst-text-slate-500",children:["/ ",s?"—":n]}),r&&y.jsxs("span",{className:"yst-text-slate-500",children:[" ",r]}),typeof c=="number"&&!isNaN(c)&&y.jsxs("span",{className:Ce("yst-ml-2",Go(c)),children:[c>-1&&"+",c,d==="percentage"&&"%"," ",f]})]})}var TE=["Icon","className","children","position","id"];function ME(e,t){return LE(e)||DE(e,t)||jE(e,t)||$E()}function $E(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
25
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jE(e,t){if(e){if(typeof e=="string")return pg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pg(e,t):void 0}}function pg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DE(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function LE(e){if(Array.isArray(e))return e}function IE(e,t){if(e==null)return{};var n,r,i=RE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function RE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gf(e){var t=e.Icon,n=t===void 0?AO:t,r=e.className,i=r===void 0?"":r,s=e.children,o=e.position,a=o===void 0?"left":o,l=e.id,c=l===void 0?"":l,u=IE(e,TE),d=z.useState(!1),f=ME(d,2),h=f[0],g=f[1];return s?y.jsxs("div",{className:i||"yst-relative",onMouseEnter:function(){return g(!0)},onMouseLeave:function(){return g(!1)},"aria-describedby":c?"tooltip-button-id":"tooltip-button",...u,children:[y.jsx(n,{className:"yst-relative yst-h-6 yst-w-6 yst-text-slate-400"}),h&&y.jsx(E.Tooltip,{position:a,id:c||"tooltip-button",children:s})]}):null}var Ma=function(t){var n=t.title,r=t.tooltip,i=t.size,s=i===void 0?"3":i,o=t.className,a=o===void 0?"":o,l=function(d){var f=typeof d=="string"?d:"tooltip";return"tooltip-".concat(f.toLowerCase().replace(/\s+/g,"-"))},c=l(n);return y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between ".concat(a),children:[y.jsx(E.Title,{size:s,children:n}),y.jsx(gf,{id:c,children:r})]})},vg=function(t){var n=t.keywords,r=t.badgeClassName;return y.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:n.map(function(i){return i&&y.jsx(E.Badge,{className:r,children:i},i)})})},Wv=function(t){var n,r,i,s,o=t.title,a=o===void 0?"Sentiment":o,l=t.tooltip,c=l===void 0?"":l,u=t.data,d=u==null?void 0:u.brandName,f=u==null||(n=u.positivityPercentage)===null||n===void 0?void 0:n.value,h=u==null||(r=u.positivityPercentage)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,g=u==null||(i=u.keywords)===null||i===void 0?void 0:i.positive,m=u==null||(s=u.keywords)===null||s===void 0?void 0:s.negative,p=!u||f===void 0&&h===void 0;return y.jsx(E.Card,{className:"yst-overflow-visible",children:y.jsxs(E.Card.Content,{className:"yst-space-y-8",children:[y.jsx(Ma,{title:a,tooltip:c}),y.jsx("div",{className:"yst-space-y-3",children:!p&&y.jsxs(y.Fragment,{children:[y.jsx("p",{children:d||y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-20"})}),y.jsxs("div",{children:[y.jsx("div",{className:"yst-inline-flex",children:y.jsx(Ta,{className:"yst-mb-1.5",score:f,scoreFormat:"percentage",suffix:"positive",delta:h})}),y.jsx(E.ProgressBar,{max:100,min:0,progress:f||0,className:Ce({"yst-bg-red-500":f},"[&>*]:yst-bg-green-500")})]})]})}),p&&y.jsx(E.Alert,{variant:"info",children:"The selected AI model returned no brand sentiment data for your queries. This can happen with some queries or models."}),!!g&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(E.Title,{as:"h5",size:"5",children:"Positive keywords"}),y.jsx(vg,{keywords:g,badgeClassName:"yst-bg-green-100 yst-text-green-800"})]}),!!m&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(E.Title,{as:"h5",size:"5",children:"Negative keywords"}),y.jsx(vg,{keywords:m,badgeClassName:"yst-bg-red-100 yst-text-red-800"})]})]})})};function Qo(e){"@babel/helpers - typeof";return Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(e)}var FE=["data"];function bg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bg(Object(n),!0).forEach(function(r){BE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BE(e,t,n){return(t=qE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qE(e){var t=zE(e,"string");return Qo(t)=="symbol"?t:t+""}function zE(e,t){if(Qo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HE(e,t){if(e==null)return{};var n,r,i=UE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Hs=function(t,n,r){var i=Hn(),s=i.brandId,o=i.analysisId,a=i.model,l=s,c=o,u=a,d=wc(l,c,{query:{enabled:!!l&&!!c,select:function(p){var v=p.data;return v==null?void 0:v.analysis}}}),f=d.data,h=HE(d,FE),g=z.useMemo(function(){if(!f||!u)return null;var m=f.scans||[];return m.find(function(p){return String(p.aiProvider)===String(u)})||null},[f,u]);return NE({data:g},h)};function KE(){var e,t=Hs(),n=t.data;return y.jsx(Wv,{title:"Brand Sentiment",data:n==null||(e=n.sentiment)===null||e===void 0?void 0:e.own,tooltip:"Percentage of positive versus negative keywords in your query results related to your brand."})}var VE=["children","as","className"];function WE(e,t){if(e==null)return{};var n,r,i=GE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function GE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $a=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=t.reduce(function(o,a,l){return o+a+(r[l]||"")},"");return function(o){var a=o.children,l=o.as,c=l===void 0?"div":l,u=o.className,d=u===void 0?"":u,f=WE(o,VE);return y.jsx(c,{className:Ce(String(s).trim(),d),...f,children:a})}},su=[{bg:"yst-bg-blue-200",text:"yst-text-blue-900"},{bg:"yst-bg-green-200",text:"yst-text-green-900"},{bg:"yst-bg-purple-200",text:"yst-text-purple-900"},{bg:"yst-bg-pink-200",text:"yst-text-pink-900"},{bg:"yst-bg-yellow-200",text:"yst-text-yellow-900"},{bg:"yst-bg-indigo-200",text:"yst-text-indigo-900"},{bg:"yst-bg-red-200",text:"yst-text-red-900"},{bg:"yst-bg-orange-200",text:"yst-text-orange-900"},{bg:"yst-bg-teal-200",text:"yst-text-teal-900"},{bg:"yst-bg-cyan-200",text:"yst-text-cyan-900"},{bg:"yst-bg-lime-200",text:"yst-text-lime-900"},{bg:"yst-bg-emerald-200",text:"yst-text-emerald-900"},{bg:"yst-bg-sky-200",text:"yst-text-sky-900"},{bg:"yst-bg-violet-200",text:"yst-text-violet-900"},{bg:"yst-bg-fuchsia-200",text:"yst-text-fuchsia-900"},{bg:"yst-bg-rose-200",text:"yst-text-rose-900"},{bg:"yst-bg-amber-200",text:"yst-text-amber-900"}],xg=function(t){if(!t)return su[0];if(t.toLowerCase()==="other")return{bg:"yst-bg-slate-200",text:"yst-text-slate-900"};for(var n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);n=(n<<5)-n+i,n=n&n}var s=Math.abs(n)%su.length;return su[s]};function Yo(e){"@babel/helpers - typeof";return Yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yo(e)}var wg;function Sg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sg(Object(n),!0).forEach(function(r){QE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QE(e,t,n){return(t=YE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YE(e){var t=XE(e,"string");return Yo(t)=="symbol"?t:t+""}function XE(e,t){if(Yo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JE(e){return tA(e)||eA(e)||Gv(e)||ZE()}function ZE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jE(e,t){if(e){if(typeof e=="string")return pg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pg(e,t):void 0}}function pg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DE(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function LE(e){if(Array.isArray(e))return e}function IE(e,t){if(e==null)return{};var n,r,i=RE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function RE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gf(e){var t=e.Icon,n=t===void 0?AO:t,r=e.className,i=r===void 0?"":r,s=e.children,o=e.position,a=o===void 0?"left":o,l=e.id,c=l===void 0?"":l,u=IE(e,TE),d=z.useState(!1),f=ME(d,2),h=f[0],g=f[1];return s?y.jsxs("div",{className:i||"yst-relative",onMouseEnter:function(){return g(!0)},onMouseLeave:function(){return g(!1)},"aria-describedby":c?"tooltip-button-id":"tooltip-button",...u,children:[y.jsx(n,{className:"yst-relative yst-h-6 yst-w-6 yst-text-slate-400"}),h&&y.jsx(E.Tooltip,{position:a,id:c||"tooltip-button",children:s})]}):null}var Ma=function(t){var n=t.title,r=t.tooltip,i=t.size,s=i===void 0?"3":i,o=t.className,a=o===void 0?"":o,l=function(d){var f=typeof d=="string"?d:"tooltip";return"tooltip-".concat(f.toLowerCase().replace(/\s+/g,"-"))},c=l(n);return y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between ".concat(a),children:[y.jsx(E.Title,{size:s,children:n}),y.jsx(gf,{id:c,children:r})]})},vg=function(t){var n=t.keywords,r=t.badgeClassName;return y.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:n.map(function(i,s){return i&&y.jsx(E.Badge,{className:r,children:i},s)})})},Wv=function(t){var n,r,i,s,o=t.title,a=o===void 0?"Sentiment":o,l=t.tooltip,c=l===void 0?"":l,u=t.data,d=u==null?void 0:u.brandName,f=u==null||(n=u.positivityPercentage)===null||n===void 0?void 0:n.value,h=u==null||(r=u.positivityPercentage)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,g=u==null||(i=u.keywords)===null||i===void 0?void 0:i.positive,m=u==null||(s=u.keywords)===null||s===void 0?void 0:s.negative,p=!u||f===void 0&&h===void 0;return y.jsx(E.Card,{className:"yst-overflow-visible",children:y.jsxs(E.Card.Content,{className:"yst-space-y-8",children:[y.jsx(Ma,{title:a,tooltip:c}),y.jsx("div",{className:"yst-space-y-3",children:!p&&y.jsxs(y.Fragment,{children:[y.jsx("p",{children:d||y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-20"})}),y.jsxs("div",{children:[y.jsx("div",{className:"yst-inline-flex",children:y.jsx(Ta,{className:"yst-mb-1.5",score:f,scoreFormat:"percentage",suffix:"positive",delta:h})}),y.jsx(E.ProgressBar,{max:100,min:0,progress:f||0,className:Ce({"yst-bg-red-500":f},"[&>*]:yst-bg-green-500")})]})]})}),p&&y.jsx(E.Alert,{variant:"info",children:"The selected AI model returned no brand sentiment data for your queries. This can happen with some queries or models."}),!!g&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(E.Title,{as:"h5",size:"5",children:"Positive keywords"}),y.jsx(vg,{keywords:g,badgeClassName:"yst-bg-green-100 yst-text-green-800"})]}),!!m&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(E.Title,{as:"h5",size:"5",children:"Negative keywords"}),y.jsx(vg,{keywords:m,badgeClassName:"yst-bg-red-100 yst-text-red-800"})]})]})})};function Qo(e){"@babel/helpers - typeof";return Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(e)}var FE=["data"];function bg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bg(Object(n),!0).forEach(function(r){BE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BE(e,t,n){return(t=qE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qE(e){var t=zE(e,"string");return Qo(t)=="symbol"?t:t+""}function zE(e,t){if(Qo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HE(e,t){if(e==null)return{};var n,r,i=UE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Hs=function(t,n,r){var i=Hn(),s=i.brandId,o=i.analysisId,a=i.model,l=s,c=o,u=a,d=wc(l,c,{query:{enabled:!!l&&!!c,select:function(p){var v=p.data;return v==null?void 0:v.analysis}}}),f=d.data,h=HE(d,FE),g=z.useMemo(function(){if(!f||!u)return null;var m=f.scans||[];return m.find(function(p){return String(p.aiProvider)===String(u)})||null},[f,u]);return NE({data:g},h)};function KE(){var e,t=Hs(),n=t.data;return y.jsx(Wv,{title:"Brand Sentiment",data:n==null||(e=n.sentiment)===null||e===void 0?void 0:e.own,tooltip:"Percentage of positive versus negative keywords in your query results related to your brand."})}var VE=["children","as","className"];function WE(e,t){if(e==null)return{};var n,r,i=GE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function GE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $a=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=t.reduce(function(o,a,l){return o+a+(r[l]||"")},"");return function(o){var a=o.children,l=o.as,c=l===void 0?"div":l,u=o.className,d=u===void 0?"":u,f=WE(o,VE);return y.jsx(c,{className:Ce(String(s).trim(),d),...f,children:a})}},su=[{bg:"yst-bg-blue-200",text:"yst-text-blue-900"},{bg:"yst-bg-green-200",text:"yst-text-green-900"},{bg:"yst-bg-purple-200",text:"yst-text-purple-900"},{bg:"yst-bg-pink-200",text:"yst-text-pink-900"},{bg:"yst-bg-yellow-200",text:"yst-text-yellow-900"},{bg:"yst-bg-indigo-200",text:"yst-text-indigo-900"},{bg:"yst-bg-red-200",text:"yst-text-red-900"},{bg:"yst-bg-orange-200",text:"yst-text-orange-900"},{bg:"yst-bg-teal-200",text:"yst-text-teal-900"},{bg:"yst-bg-cyan-200",text:"yst-text-cyan-900"},{bg:"yst-bg-lime-200",text:"yst-text-lime-900"},{bg:"yst-bg-emerald-200",text:"yst-text-emerald-900"},{bg:"yst-bg-sky-200",text:"yst-text-sky-900"},{bg:"yst-bg-violet-200",text:"yst-text-violet-900"},{bg:"yst-bg-fuchsia-200",text:"yst-text-fuchsia-900"},{bg:"yst-bg-rose-200",text:"yst-text-rose-900"},{bg:"yst-bg-amber-200",text:"yst-text-amber-900"}],xg=function(t){if(!t)return su[0];if(t.toLowerCase()==="other")return{bg:"yst-bg-slate-200",text:"yst-text-slate-900"};for(var n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);n=(n<<5)-n+i,n=n&n}var s=Math.abs(n)%su.length;return su[s]};function Yo(e){"@babel/helpers - typeof";return Yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yo(e)}var wg;function Sg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sg(Object(n),!0).forEach(function(r){QE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QE(e,t,n){return(t=YE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YE(e){var t=XE(e,"string");return Yo(t)=="symbol"?t:t+""}function XE(e,t){if(Yo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JE(e){return tA(e)||eA(e)||Gv(e)||ZE()}function ZE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
26
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eA(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tA(e){if(Array.isArray(e))return pd(e)}function _g(e,t){return iA(e)||rA(e,t)||Gv(e,t)||nA()}function nA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
27
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gv(e,t){if(e){if(typeof e=="string")return pd(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pd(e,t):void 0}}function pd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rA(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function iA(e){if(Array.isArray(e))return e}function sA(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var io=$a(wg||(wg=sA(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-slate-400 yst-inline-flex yst-w-20"]))),kg=function(t){var n=t.data,r=t.totalQueries,i=t.isLoading,s=i===void 0?!1:i,o=t.isFirstScan,a=o===void 0?!1:o,l=s||!n,c=n||{},u=c.rank,d=c.url,f=c.rootDomain,h=c.category,g=c.impact,m=c.numberOfMentions,p=m==null?void 0:m.value,v=m==null?void 0:m.previous,b=typeof(v==null?void 0:v.difference)=="number"?v.difference:m;return y.jsxs("tr",{className:"yst-flex yst-flex-col md:yst-table-row",children:[y.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[y.jsx(io,{as:"span",children:"Rank:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:u!=null?u:"—"})]}),y.jsx(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-full"}):y.jsx("div",{className:"yst-flex yst-items-center yst-gap-2",children:y.jsxs(E.Link,{className:"yst-flex yst-items-center yst-gap-1 yst-font-medium",href:d||"#",rel:"nofollow noreferrer",children:[y.jsx("span",{children:d!=null?d:"—"})," ",y.jsx(vE,{})]})})}),y.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 yst-font-medium md:yst-ml-0 md:yst-p-2",children:[y.jsx(io,{as:"span",children:"Domain:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:f!=null?f:"—"})]}),y.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[y.jsx(io,{as:"span",children:"Category:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-16"}):y.jsx(E.Badge,{className:Ce(xg(h||"").bg,xg(h||"").text),children:h!=null?h:"—"})]}),y.jsxs(E.Table.Cell,{className:Ce("yst-ml-2 yst-py-0 md:yst-ml-0 md:yst-p-2","yst-font-medium",{"yst-text-green-600":g==="High","yst-text-yellow-600":g==="Medium","yst-text-red-600":g==="Low"}),children:[y.jsx(io,{as:"span",children:"Impact:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-12"}):g!=null?g:"—"]}),y.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-pt-1 md:yst-ml-0 md:yst-p-2 md:yst-text-right",children:[y.jsx(io,{as:"span",children:"Mentions:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):p?y.jsxs("span",{className:"yst-flex yst-justify-end yst-gap-4",children:[y.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-1 yst-font-medium",children:[y.jsx("span",{className:"yst-text-slate-500",children:p}),y.jsxs("span",{className:"yst-text-slate-900",children:["/ ",r]})]}),!a&&y.jsxs("span",{className:Ce("yst-ml-auto",Go(b)),children:[b>-1&&"+",b]})]}):"—"]})]},l?void 0:d)},oA=function(){var t,n,r,i,s,o=z.useState("all"),a=_g(o,2),l=a[0],c=a[1],u=z.useState(1),d=_g(u,2),f=d[0],h=d[1],g=Hs(),m=g.data,p=g.isLoading,v=g.isRefetching,b=m==null?void 0:m.citations,x=(m==null||(t=m.scores)===null||t===void 0||(t=t.standardized)===null||t===void 0?void 0:t.citations)||{},C=Object.hasOwn(x,"previous"),w=b==null||(n=b.list)===null||n===void 0?void 0:n.filter(function(D){return l==="all"?!0:D.category===l}),k=10,S=(w==null?void 0:w.length)||0,_=Math.ceil(S/k),O=(f-1)*k,A=O+k,M=w==null?void 0:w.slice(O,A);return z.useEffect(function(){f>_&&_>0&&h(1)},[_,f,h,l]),y.jsx(E.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:y.jsxs(E.Card.Content,{className:"yst-flex yst-flex-col yst-gap-6",children:[y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx(Ma,{title:"Citations",tooltip:"Sources the AI used to support brand mentions in the results."}),y.jsx("p",{children:"This table highlights the most important sources where your brand was cited."}),y.jsx(Ta,{score:b==null||(r=b.total)===null||r===void 0?void 0:r.value,suffix:"citations",delta:b==null||(i=b.total)===null||i===void 0||(i=i.previous)===null||i===void 0?void 0:i.difference,deltaSuffix:"since last scan",isLoading:p,hideTotal:!0})]}),(b==null||(s=b.list)===null||s===void 0?void 0:s.length)===0&&!p&&!v?y.jsx(E.Alert,{children:"The selected AI model returned no citations for your queries. This can happen with some queries or models."}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{children:[y.jsx(E.Select,{className:"yst-mb-4 md:yst-max-w-sm",label:"Filter categories",value:l,onChange:function(D){c(D)},id:"citation-category-filter",options:[{value:"all",label:"All categories"}].concat(JE(b!=null&&b.categories?b.categories.map(function(D){return{value:D,label:D}}):[]))}),y.jsxs(E.Table,{variant:"minimal",children:[y.jsx(E.Table.Head,{className:"yst-font-semibold",children:y.jsxs(E.Table.Row,{children:[y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-pl-2",children:"#"}),y.jsx(E.Table.Cell,{className:"yst yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"URL"}),y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"Root domain"}),y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell",children:"Category"}),y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"Impact"}),y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-right yst-text-slate-900 md:yst-table-cell",children:"Mentions"})]})}),y.jsx(E.Table.Body,{children:p||v?Array.from({length:5}).map(function(D,W){return y.jsx(kg,{isLoading:!0},"skeleton-".concat(W))}):M&&M.length>0?M.map(function(D,W){return y.jsx(kg,{data:Cg(Cg({},D),{},{rank:O+W+1}),totalQueries:m==null?void 0:m.numberOfQueries,isFirstScan:!C},"citation-table-row-".concat(D.url,"-").concat(W))}):y.jsx(E.Table.Row,{children:y.jsxs(E.Table.Cell,{colSpan:6,className:"yst-py-8 yst-text-center yst-text-slate-500",children:[l==="all"?"No citations found.":'No citations found for the "'.concat(l,'" category.')," ",y.jsx(E.Link,{onClick:function(){return c("all")},children:"Show all categories."})]})},"no-results")})]})]}),w&&w.length>k&&y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:[y.jsxs("p",{className:"yst-mb-0",children:["Showing ",O+1," to"," ",A>S?S:A," of"," ",S," results"]}),y.jsx(E.Pagination,{variant:"text",className:"yst-flex-row yst-gap-0",current:f,total:_,onNavigate:h,screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]})]})})};function aA(e,t){return dA(e)||uA(e,t)||cA(e,t)||lA()}function lA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gv(e,t){if(e){if(typeof e=="string")return pd(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pd(e,t):void 0}}function pd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rA(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function iA(e){if(Array.isArray(e))return e}function sA(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var io=$a(wg||(wg=sA(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-slate-400 yst-inline-flex yst-w-20"]))),kg=function(t){var n=t.data,r=t.totalQueries,i=t.isLoading,s=i===void 0?!1:i,o=t.isFirstScan,a=o===void 0?!1:o,l=s||!n,c=n||{},u=c.rank,d=c.url,f=c.rootDomain,h=c.category,g=c.impact,m=c.numberOfMentions,p=m==null?void 0:m.value,v=m==null?void 0:m.previous,b=typeof(v==null?void 0:v.difference)=="number"?v.difference:p;return y.jsxs("tr",{className:"yst-flex yst-flex-col md:yst-table-row",children:[y.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[y.jsx(io,{as:"span",children:"Rank:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:u!=null?u:"—"})]}),y.jsx(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-full"}):y.jsx("div",{className:"yst-flex yst-items-center yst-gap-2",children:y.jsxs(E.Link,{className:"yst-flex yst-items-center yst-gap-1 yst-font-medium",href:d||"#",rel:"nofollow noreferrer",children:[y.jsx("span",{children:d!=null?d:"—"})," ",y.jsx(vE,{})]})})}),y.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 yst-font-medium md:yst-ml-0 md:yst-p-2",children:[y.jsx(io,{as:"span",children:"Domain:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:f!=null?f:"—"})]}),y.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[y.jsx(io,{as:"span",children:"Category:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-16"}):y.jsx(E.Badge,{className:Ce(xg(h||"").bg,xg(h||"").text),children:h!=null?h:"—"})]}),y.jsxs(E.Table.Cell,{className:Ce("yst-ml-2 yst-py-0 md:yst-ml-0 md:yst-p-2","yst-font-medium",{"yst-text-green-600":g==="High","yst-text-yellow-600":g==="Medium","yst-text-red-600":g==="Low"}),children:[y.jsx(io,{as:"span",children:"Impact:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-12"}):g!=null?g:"—"]}),y.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-pt-1 md:yst-ml-0 md:yst-p-2 md:yst-text-right",children:[y.jsx(io,{as:"span",children:"Mentions:"}),l?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):p?y.jsxs("span",{className:"yst-flex yst-justify-end yst-gap-4",children:[y.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-1 yst-font-medium",children:[y.jsx("span",{className:"yst-text-slate-500",children:p}),y.jsxs("span",{className:"yst-text-slate-900",children:["/ ",r]})]}),!a&&y.jsxs("span",{className:Ce("yst-ml-auto",Go(b)),children:[b>-1&&"+",b]})]}):"—"]})]},l?void 0:d)},oA=function(){var t,n,r,i,s,o=z.useState("all"),a=_g(o,2),l=a[0],c=a[1],u=z.useState(1),d=_g(u,2),f=d[0],h=d[1],g=Hs(),m=g.data,p=g.isLoading,v=g.isRefetching,b=m==null?void 0:m.citations,x=(m==null||(t=m.scores)===null||t===void 0||(t=t.standardized)===null||t===void 0?void 0:t.citations)||{},C=Object.hasOwn(x,"previous"),w=b==null||(n=b.list)===null||n===void 0?void 0:n.filter(function(D){return l==="all"?!0:D.category===l}),k=10,S=(w==null?void 0:w.length)||0,_=Math.ceil(S/k),O=(f-1)*k,A=O+k,M=w==null?void 0:w.slice(O,A);return z.useEffect(function(){f>_&&_>0&&h(1)},[_,f,h,l]),y.jsx(E.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:y.jsxs(E.Card.Content,{className:"yst-flex yst-flex-col yst-gap-6",children:[y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx(Ma,{title:"Citations",tooltip:"Sources the AI used to support brand mentions in the results."}),y.jsx("p",{children:"This table highlights the most important sources where your brand was cited."}),y.jsx(Ta,{score:b==null||(r=b.total)===null||r===void 0?void 0:r.value,suffix:"citations",delta:b==null||(i=b.total)===null||i===void 0||(i=i.previous)===null||i===void 0?void 0:i.difference,deltaSuffix:"since last scan",isLoading:p,hideTotal:!0})]}),(b==null||(s=b.list)===null||s===void 0?void 0:s.length)===0&&!p&&!v?y.jsx(E.Alert,{children:"The selected AI model returned no citations for your queries. This can happen with some queries or models."}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{children:[y.jsx(E.Select,{className:"yst-mb-4 md:yst-max-w-sm",label:"Filter categories",value:l,onChange:function(D){c(D)},id:"citation-category-filter",options:[{value:"all",label:"All categories"}].concat(JE(b!=null&&b.categories?b.categories.map(function(D){return{value:D,label:D}}):[]))}),y.jsxs(E.Table,{variant:"minimal",children:[y.jsx(E.Table.Head,{className:"yst-font-semibold",children:y.jsxs(E.Table.Row,{children:[y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-pl-2",children:"#"}),y.jsx(E.Table.Cell,{className:"yst yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"URL"}),y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"Root domain"}),y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell",children:"Category"}),y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"Impact"}),y.jsx(E.Table.Cell,{className:"yst-hidden yst-text-right yst-text-slate-900 md:yst-table-cell",children:"Mentions"})]})}),y.jsx(E.Table.Body,{children:p||v?Array.from({length:5}).map(function(D,W){return y.jsx(kg,{isLoading:!0},"skeleton-".concat(W))}):M&&M.length>0?M.map(function(D,W){return y.jsx(kg,{data:Cg(Cg({},D),{},{rank:O+W+1}),totalQueries:m==null?void 0:m.numberOfQueries,isFirstScan:!C},"citation-table-row-".concat(D.url,"-").concat(W))}):y.jsx(E.Table.Row,{children:y.jsxs(E.Table.Cell,{colSpan:6,className:"yst-py-8 yst-text-center yst-text-slate-500",children:[l==="all"?"No citations found.":'No citations found for the "'.concat(l,'" category.')," ",y.jsx(E.Link,{onClick:function(){return c("all")},children:"Show all categories."})]})},"no-results")})]})]}),w&&w.length>k&&y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:[y.jsxs("p",{className:"yst-mb-0",children:["Showing ",O+1," to"," ",A>S?S:A," of"," ",S," results"]}),y.jsx(E.Pagination,{variant:"text",className:"yst-flex-row yst-gap-0",current:f,total:_,onNavigate:h,screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]})]})})};function aA(e,t){return dA(e)||uA(e,t)||cA(e,t)||lA()}function lA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
28
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cA(e,t){if(e){if(typeof e=="string")return Og(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Og(e,t):void 0}}function Og(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uA(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function dA(e){if(Array.isArray(e))return e}var Eg=function(t){var n,r=t.data,i=t.totalQueries,s=t.isFirstScan,o=s===void 0?!0:s,a=t.isLoading,l=a===void 0?!1:a,c=l||!r,u=r||{},d=u.rank,f=u.brand,h=d==null?void 0:d.previous,g=typeof(h==null?void 0:h.difference)=="number"?h.difference*-1:void 0,m=f==null?void 0:f.numberOfMentions,p=m==null?void 0:m.previous,v=typeof(p==null?void 0:p.difference)=="number"?p.difference:void 0;return y.jsxs(E.Table.Row,{children:[y.jsx(E.Table.Cell,{children:c?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):y.jsxs("span",{className:"yst-flex yst-justify-between yst-gap-4",children:[y.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-2 yst-font-medium",children:[y.jsx("span",{className:"yst-text-slate-500",children:"#"}),y.jsx("span",{className:"yst-text-slate-900",children:d==null?void 0:d.value})]}),!o&&y.jsx("span",{className:Ce("yst-inline-flex yst-items-center yst-justify-end",Go(h&&typeof g=="number"?g:0)),children:h&&typeof g=="number"?y.jsxs(y.Fragment,{children:[Math.abs(g),g>0?y.jsx(yE,{className:"yst-h-4 yst-w-4"}):y.jsx(hE,{className:"yst-h-4 yst-w-4"})]}):y.jsx(gg,{className:"yst-mx-1 yst-h-4 yst-w-4"})})]})}),y.jsx(E.Table.Cell,{children:c?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium",children:f!=null&&f.isSelf?y.jsx(kc,{children:f==null?void 0:f.name}):(n=f==null?void 0:f.name)!==null&&n!==void 0?n:"—"})}),y.jsx(E.Table.Cell,{children:c?y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):y.jsxs("span",{className:"yst-flex yst-justify-end yst-gap-4",children:[y.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-1 yst-font-medium",children:[y.jsx("span",{className:"yst-text-slate-500",children:m==null?void 0:m.value}),y.jsxs("span",{className:"yst-text-slate-900",children:["/ ",i]})]}),!o&&y.jsx("span",{className:Ce("yst-ml-auto",Go(p&&typeof v=="number"?v:0)),children:p&&typeof v=="number"?y.jsxs(y.Fragment,{children:[v>-1&&"+",v]}):y.jsx(gg,{className:"yst-h-4 yst-w-4"})})]})})]},c||d==null?void 0:d.value)},fA=function(t){var n,r,i=t.className,s=z.useRef(null),o=z.useState(1),a=aA(o,2),l=a[0],c=a[1],u=Hs(),d=u.data,f=u.isLoading,h=u.isRefetching,g=d==null||(n=d.rankings)===null||n===void 0?void 0:n.list,m=(d==null||(r=d.scores)===null||r===void 0||(r=r.standardized)===null||r===void 0?void 0:r.ranking)||{},p=Object.hasOwn(m,"previous"),v=5,b=(g==null?void 0:g.length)||0,x=Math.ceil(b/v),C=(l-1)*v,w=C+v,k=g==null?void 0:g.slice(C,w);return z.useEffect(function(){l>x&&x>0&&c(1)},[x,l,c]),y.jsx(E.Card,{ref:s,className:Ce("yst-overflow-visible",i),children:y.jsxs(E.Card.Content,{className:"yst-mt-0 yst-space-y-6",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(Ma,{title:"Competitor ranking",tooltip:"How often competitors are mentioned in your submitted queries."}),y.jsx("p",{children:"Brands with the most mentions for your prompts."})]}),!f&&!h&&(!g||g.length===0)?y.jsx(E.Alert,{variant:"info",children:"The selected AI model returned no brands for your queries. This can happen with some queries or models."}):y.jsxs(E.Table,{variant:"minimal",children:[y.jsx(E.Table.Head,{children:y.jsxs(E.Table.Row,{children:[y.jsx(E.Table.Cell,{className:"yst-w-20 yst-font-semibold",children:"Rank"}),y.jsx(E.Table.Cell,{className:"yst-font-semibold",children:"Brand"}),y.jsx(E.Table.Cell,{className:"yst-w-20 yst-text-right yst-font-semibold",children:"Mentions"})]})}),y.jsx(E.Table.Body,{children:k&&Array.isArray(k)&&k.length>0?k.map(function(S){var _;return y.jsx(Eg,{data:S,totalQueries:d==null?void 0:d.numberOfQueries,isFirstScan:!p},"rank-row-".concat((_=S.rank)===null||_===void 0?void 0:_.value))}):f||h?Array.from({length:v}).map(function(S,_){return y.jsx(Eg,{isLoading:!0},"skeleton-".concat(_))}):null})]}),!f&&!h&&g&&g.length>v&&y.jsx(E.Pagination,{current:l,total:x,className:"yst-flex-row",onNavigate:c,screenReaderTextNext:"Next",screenReaderTextPrevious:"Previous",variant:"text"})]})})},hA=function(){var t,n=Hs(),r=n.data,i=r==null||(t=r.sentiment)===null||t===void 0?void 0:t.topCompetitor;return y.jsx(Wv,{title:"Competitor sentiment",data:i,tooltip:"Percentage of positive versus negative keywords in your query results related to your competitor's brand."})},gA=function(t){var n=t.brand,r=_n(),i=Cc(),s=i.setBrandId;return(n==null?void 0:n.setupStatus)==="pendingQuerySelection"?y.jsx(E.Alert,{className:"yst-mt-0",children:y.jsxs("div",{className:"yst-max-w-xl yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsxs("h3",{className:"yst-font-medium",children:["Finish your analysis for ",(n==null?void 0:n.name)||"Brand ".concat(n==null?void 0:n.id)]}),y.jsx("p",{children:"Your brand is saved, but you haven’t completed the analysis yet. Review your queries and run the analysis to get your brand insights!"})]}),y.jsx("div",{className:"yst-flex yst-justify-start yst-gap-6",children:y.jsx(E.Link,{onClick:function(){n.id?(s(n.id),r("/setup/".concat(n.id,"/queries"))):console.error("Brand ID is missing.")},children:"Review queries"})})]})}):null},yf=function(t){var n=t.isOpen,r=t.onClose,i=t.onConfirm,s=t.isLoading,o=s===void 0?!1:s,a=t.title,l=t.description,c=t.disabled,u=c===void 0?!1:c,d=t.confirmText,f=d===void 0?"Yes, delete":d,h=t.cancelText,g=h===void 0?"No, go back":h,m=t.className;return y.jsx(E.Modal,{isOpen:n,onClose:r,position:"center",as:"div",className:m,children:y.jsxs(E.Modal.Panel,{children:[y.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[y.jsx("div",{children:y.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-red-100",children:y.jsx(OO,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:a})}),y.jsx(E.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:typeof l=="string"?y.jsx("p",{children:l}):l})]})]}),y.jsxs(E.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(E.Button,{variant:"secondary",onClick:r,children:g}),y.jsx(E.Button,{variant:"error",onClick:i,isLoading:o,disabled:u,children:f})]})]})})},Ya={exports:{}},Xa={exports:{}},Ue={};/** @license React v16.13.1
29
29
  * react-is.production.min.js
30
30
  *
@@ -9479,8 +9479,8 @@ var Xa = function(t) {
9479
9479
  ] });
9480
9480
  }, Vg = function(t) {
9481
9481
  var n = t.keywords, r = t.badgeClassName;
9482
- return /* @__PURE__ */ v("div", { className: "yst-flex yst-flex-wrap yst-gap-2", children: n.map(function(i) {
9483
- return i && /* @__PURE__ */ v(Wn, { className: r, children: i }, i);
9482
+ return /* @__PURE__ */ v("div", { className: "yst-flex yst-flex-wrap yst-gap-2", children: n.map(function(i, s) {
9483
+ return i && /* @__PURE__ */ v(Wn, { className: r, children: i }, s);
9484
9484
  }) });
9485
9485
  }, kb = function(t) {
9486
9486
  var n, r, i, s, o = t.title, a = o === void 0 ? "Sentiment" : o, l = t.tooltip, c = l === void 0 ? "" : l, u = t.data, d = u == null ? void 0 : u.brandName, f = u == null || (n = u.positivityPercentage) === null || n === void 0 ? void 0 : n.value, h = u == null || (r = u.positivityPercentage) === null || r === void 0 || (r = r.previous) === null || r === void 0 ? void 0 : r.difference, g = u == null || (i = u.keywords) === null || i === void 0 ? void 0 : i.positive, y = u == null || (s = u.keywords) === null || s === void 0 ? void 0 : s.negative, m = !u || f === void 0 && h === void 0;
@@ -9805,7 +9805,7 @@ function qA(e, t) {
9805
9805
  return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
9806
9806
  }
9807
9807
  var Co = Ja(Qg || (Qg = qA(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-slate-400 yst-inline-flex yst-w-20"]))), Zg = function(t) {
9808
- var n = t.data, r = t.totalQueries, i = t.isLoading, s = i === void 0 ? !1 : i, o = t.isFirstScan, a = o === void 0 ? !1 : o, l = s || !n, c = n || {}, u = c.rank, d = c.url, f = c.rootDomain, h = c.category, g = c.impact, y = c.numberOfMentions, m = y == null ? void 0 : y.value, p = y == null ? void 0 : y.previous, b = typeof (p == null ? void 0 : p.difference) == "number" ? p.difference : y;
9808
+ var n = t.data, r = t.totalQueries, i = t.isLoading, s = i === void 0 ? !1 : i, o = t.isFirstScan, a = o === void 0 ? !1 : o, l = s || !n, c = n || {}, u = c.rank, d = c.url, f = c.rootDomain, h = c.category, g = c.impact, y = c.numberOfMentions, m = y == null ? void 0 : y.value, p = y == null ? void 0 : y.previous, b = typeof (p == null ? void 0 : p.difference) == "number" ? p.difference : m;
9809
9809
  return /* @__PURE__ */ M("tr", { className: "yst-flex yst-flex-col md:yst-table-row", children: [
9810
9810
  /* @__PURE__ */ M(
9811
9811
  xe.Cell,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yoast/ai-insights-client",
3
3
  "private": false,
4
- "version": "1.4.5",
4
+ "version": "1.4.6",
5
5
  "type": "module",
6
6
  "description": "A React component library for AI-powered brand analysis and insights",
7
7
  "keywords": [