kollapsminoriteten/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-modules-searc...

43 lines
213 KiB
JavaScript
Raw Normal View History

2025-12-12 13:13:07 +01:00
(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[918],{311:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var s=i(62688),o=i.n(s),r=i(15167),n=i(62540);function WidgetHeaderTitle({title:e}){return(0,n.jsx)(r.A,{className:"googlesitekit-widget__header-title",as:"h3",type:"title",size:"small",children:e})}WidgetHeaderTitle.propTypes={title:o().string.isRequired};const a=WidgetHeaderTitle},674:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,o,r=i(63696);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},n.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 22"},e),s||(s=r.createElement("path",{fillRule:"evenodd",d:"m12.149 7.96-5.166 5.166a.34.34 0 0 0-.094.176l-.35 1.755a.344.344 0 0 0 .404.404l1.755-.35a.34.34 0 0 0 .175-.095l5.166-5.165zm2.301-1.814a1.03 1.03 0 0 0-1.458 0L6.497 12.64a1.03 1.03 0 0 0-.282.527l-.35 1.755a1.03 1.03 0 0 0 1.213 1.213l1.754-.35c.2-.04.383-.139.527-.283l6.495-6.494a1.03 1.03 0 0 0 0-1.459z",clipRule:"evenodd"})),o||(o=r.createElement("path",{d:"m12.149 7.96.117-.116a.165.165 0 0 0-.234 0zm-5.166 5.166-.116-.116zm-.094.176.162.033zm-.35 1.755.161.032zm.404.404.032.162zm1.755-.35.032.161zm.175-.095.117.117zm5.166-5.165.116.116a.165.165 0 0 0 0-.233zm-1.047-3.705.116.116zm1.458 0-.116.116zM6.497 12.64l.117.117zm-.282.527-.162-.032zm-.35 1.755.161.032zm1.213 1.213-.033-.162zm1.754-.35.033.161zm.527-.283.117.117zm6.495-6.494-.117-.117zm0-1.459.117-.116zm-3.822.295L6.867 13.01l.233.233 5.166-5.165zM6.867 13.01a.5.5 0 0 0-.14.26l.324.065a.2.2 0 0 1 .05-.092zm-.14.26-.35 1.754.323.065.351-1.755zm-.35 1.754a.51.51 0 0 0 .598.599l-.064-.324a.18.18 0 0 1-.21-.21zm.598.599 1.755-.35-.065-.325-1.754.351zm1.755-.35a.5.5 0 0 0 .26-.14l-.233-.233a.2.2 0 0 1-.092.048zm.26-.14 5.165-5.166-.233-.233L8.757 14.9zm3.042-7.055 1.89 1.89.233-.234-1.89-1.89zm1.076-1.816a.866.866 0 0 1 1.226 0l.233-.233a1.196 1.196 0 0 0-1.692 0zm-6.494 6.495 6.494-6.495-.233-.233-6.494 6.495zm-.237.443a.87.87 0 0 1 .237-.443l-.233-.233c-.167.167-.281.38-.328.61zm-.35 1.754.35-1.754-.324-.065-.35 1.755zm1.018 1.02a.866.866 0 0 1-1.019-1.02l-.323-.065a1.196 1.196 0 0 0 1.407 1.408zm1.755-.351-1.755.35.065.324 1.755-.35zm.443-.237a.87.87 0 0 1-.443.237l.065.323c.231-.046.444-.16.611-.327zm6.494-6.495-6.494 6.495.233.233 6.495-6.494zm0-1.225a.866.866 0 0 1 0 1.225l.234.234a1.196 1.196 0 0 0 0-1.692zm-1.403-1.404 1.403 1.404.234-.233-1.404-1.404z"})))},718:(e,t,i)=>{"use strict";i.d(t,{gy:()=>SelectionPanelFooter,W4:()=>SelectionPanelHeader,y3:()=>SelectionPanelItem,DW:()=>SelectionPanelItems,Ay:()=>x});var s=i(4452),o=i.n(s),r=i(62688),n=i.n(r),a=i(4544),l=i.n(a),c=i(21795),g=i(78174),d=i(63696),u=i(19266),p=i(14007),m=i(62540);function SideSheet({className:e,children:t,isOpen:i,isLoading:s,onOpen:r=()=>{},closeSheet:n=()=>{},focusTrapOptions:a={}}){const h=(0,d.useRef)();return(0,d.useEffect)(()=>{i?(r(),document.body.classList.add("googlesitekit-side-sheet-scroll-lock")):document.body.classList.remove("googlesitekit-side-sheet-scroll-lock")},[i,r]),(0,c.A)(h,n),(0,g.A)(e=>i&&u._f===e.keyCode,n),(0,m.jsxs)(p.A,{children:[(0,m.jsx)(l(),{active:!!i&&!s,focusTrapOptions:{fallbackFocus:"body",...a},children:(0,m.jsx)("section",{ref:h,className:o()("googlesitekit-side-sheet",e,{"googlesitekit-side-sheet--open":i}),role:"dialog","aria-modal":"true","aria-hidden":!i,tabIndex:"0",children:t})}),i&&(0,m.jsx)("span",{className:"googlesitekit-side-sheet-overlay"})]})}function SelectionPanel({children:e,isOpen:t,isLoading:i,onOpen:s,closePanel:r,className:n}){const a=n?.split(/\s+/).map(e=>`.${e}`).join(""),l=a?`${a} .googlesitekit-selection-panel-item .googlesitekit-selection-box input`:".googlesitekit-selection-panel-item .googlesitekit-selection-box input";return(0,m.jsx)(SideSheet,{className:o()("googlesitekit-selection-panel",n),isOpen:t,isLoadi
(0,I.__)("%1$d selected <MaxCount>(up to %2$d)</MaxCount>","google-site-kit"),C,o),{MaxCount:(0,m.jsx)("span",{className:"googlesitekit-selection-panel-footer__item-count--max-count"})})});return(0,m.jsx)("footer",{className:"googlesitekit-selection-panel-footer",children:(0,m.jsxs)("div",{className:"googlesitekit-selection-panel-footer__content",children:[w,(0,m.jsxs)("div",{className:"googlesitekit-selection-panel-footer__actions",children:[(0,m.jsx)(b.Button,{onClick:N,disabled:r,tertiary:!0,children:(0,I.__)("Cancel","google-site-kit")}),(0,m.jsx)(b.SpinnerButton,{onClick:x,isSaving:r,disabled:C<s||C>o||r||!l&&p,children:g||v})]})]})})}SelectionPanelFooter.propTypes={savedItemSlugs:n().array,selectedItemSlugs:n().array,saveSettings:n().func,minSelectedItemCount:n().number,maxSelectedItemCount:n().number,isBusy:n().bool,onSaveSuccess:n().func,onCancel:n().func,isOpen:n().bool,closePanel:n().func};const x=SelectionPanel},2362:(e,t,i)=>{"use strict";i.d(t,{A:()=>g});var s=i(4452),o=i.n(s),r=i(62688),n=i.n(r),a=i(63696),l=i(62540);const c=(0,a.forwardRef)(({label:e,className:t,hasLeftSpacing:i=!1,...s},r)=>(0,l.jsx)("span",{ref:r,...s,className:o()("googlesitekit-badge",t,{"googlesitekit-badge--has-left-spacing":i}),children:e}));c.displayName="Badge",c.propTypes={label:n().string.isRequired,hasLeftSpacing:n().bool};const g=c},2478:(e,t,i)=>{"use strict";i.d(t,{A:()=>ChangeBadge});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(12850),l=i(62540);function ChangeBadge(e){const{previousValue:t,currentValue:i,isAbsolute:s}=e,o=s?i-t:(0,a.Zf)(t,i),r=o<0,c=0===o;return null===o?null:(0,l.jsx)("div",{className:n()("googlesitekit-change-badge",{"googlesitekit-change-badge--negative":r,"googlesitekit-change-badge--zero":c}),children:(0,a.Eo)(o,{style:"percent",signDisplay:"exceptZero",maximumFractionDigits:1})})}ChangeBadge.propTypes={isAbsolute:o().bool,previousValue:o().number.isRequired,currentValue:o().number.isRequired}},2522:(e,t,i)=>{"use strict";i.d(t,{D:()=>r});var s=i(32091),o=i.n(s);function r(e,{dateRangeLength:t}){o()(Array.isArray(e),"report must be an array to partition."),o()(Number.isInteger(t)&&t>0,"dateRangeLength must be a positive integer.");const i=-1*t;return{currentRange:e.slice(i),compareRange:e.slice(2*i,i)}}},3687:(e,t,i)=>{"use strict";i.d(t,{U:()=>h});var s=i(32091),o=i.n(s),r=i(17243),n=i(21125),a=i(71769),l=i(12850),c=i(50539);function g(e){return e}function d(){return{}}function u(){}const{clearError:p,receiveError:m}=n.o1;function h({baseName:e,controlCallback:t,reducerCallback:i=g,argsToParams:s=d,validateParams:n=u}){let h;o()(e,"baseName is required."),o()("function"==typeof t,"controlCallback is required and must be a function."),o()("function"==typeof i,"reducerCallback must be a function."),o()("function"==typeof s,"argsToParams must be a function."),o()("function"==typeof n,"validateParams must be a function.");try{n(s()),h=!1}catch(e){h=!0}const y=(0,a.m2)(e),f=(0,a.sP)(e),I=`FETCH_${f}`,b=`START_${I}`,v=`FINISH_${I}`,k=`CATCH_${I}`,A=`RECEIVE_${f}`,_=`fetch${y}`,S=`receive${y}`,j=`isFetching${y}`,M={[j]:{}};const x={[_](...t){const i=s(...t);return n(i),function*(t,i){let s,o;yield{payload:{params:t},type:b},yield p(e,i);try{s=yield{payload:{params:t},type:I},yield x[S](s,t),yield{payload:{params:t},type:v}}catch(s){o=s,yield m(o,e,i),yield{payload:{params:t},type:k}}return{response:s,error:o}}(i,t)},[S]:(e,t)=>(o()(void 0!==e,"response is required."),h?(o()((0,r.isPlainObject)(t),"params is required."),n(t)):t={},{payload:{response:e,params:t},type:A})},N={[I]:({payload:e})=>t(e.params)},D=(0,c.createReducer)((e,{type:t,payload:s})=>{switch(t){case b:{const{params:t}=s;return e[j]=e[j]||{},e[j][(0,l.Zm)(t)]=!0,e}case A:{const{response:t,params:o}=s;return i(e,t,o)}case v:{const{params:t}=s;return e[j]=e[j]||{},e[j][(0,l.Zm)(t)]=!1,e}case k:{const{params:t}=s;return e[j]=e[j]||{},e[j][(0,l.Zm)(t)]=!1,e}default:return e}});return{initialState:M,actions:x,controls:N,reducer:D,resolvers:{},selectors:{[j]:(e,...t)=>{if(void 0===e[j])return!1;let i;try{i=s(...t),n(i)}catch(e){return!1}return!!
(0,r.__)("%s data was previously shared by an admin who no longer has access. Please contact another admin to restore it.","google-site-kit"),t[0]):(0,r.sprintf)(/* translators: %s: List of module names */ /* translators: %s: List of module names */
(0,r.__)("The data for the following modules was previously shared by an admin who no longer has access: %s. Please contact another admin to restore it.","google-site-kit"),t.join((0,r._x)(", ","Recoverable modules","google-site-kit")));return(0,c.jsx)(l.A,{title:(0,r.__)("Data Unavailable","google-site-kit"),description:i})}RecoverableModules.propTypes={moduleSlugs:o().arrayOf(o().string).isRequired}},10953:(e,t,i)=>{"use strict";i.d(t,{A:()=>InfoTooltip});var s,o=i(4452),r=i.n(o),n=i(62688),a=i.n(n),l=i(49383),c=i(63696);function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},g.apply(null,arguments)}const d=e=>c.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),s||(s=c.createElement("path",{fill:"currentColor",d:"M7.334 11.333h1.333v-4H7.334zM8.001 6a.658.658 0 0 0 .667-.667.6.6 0 0 0-.2-.467.6.6 0 0 0-.467-.2.66.66 0 0 0-.667.667q0 .284.183.483A.7.7 0 0 0 8.001 6m0 8.666a6.6 6.6 0 0 1-2.6-.516 6.9 6.9 0 0 1-2.117-1.434A6.9 6.9 0 0 1 1.851 10.6 6.6 6.6 0 0 1 1.334 8q0-1.385.517-2.6a6.9 6.9 0 0 1 1.433-2.117q.9-.9 2.117-1.417A6.4 6.4 0 0 1 8 1.333q1.383 0 2.6.533a6.6 6.6 0 0 1 2.116 1.417q.9.9 1.417 2.117.533 1.215.533 2.6 0 1.383-.533 2.6a6.6 6.6 0 0 1-1.417 2.116 6.9 6.9 0 0 1-2.116 1.434 6.6 6.6 0 0 1-2.6.516m0-1.333q2.233 0 3.783-1.55T13.334 8t-1.55-3.784-3.783-1.55-3.784 1.55T2.667 8t1.55 3.783 3.784 1.55"})));var u=i(62540);function InfoTooltip({onOpen:e,title:t,tooltipClassName:i}){return t?(0,u.jsx)(l.Tooltip,{className:"googlesitekit-info-tooltip",tooltipClassName:r()("googlesitekit-info-tooltip__content",i),title:t,placement:"top",enterTouchDelay:0,leaveTouchDelay:5e3,onOpen:e,interactive:!0,children:(0,u.jsx)("span",{children:(0,u.jsx)(d,{width:"16",height:"16"})})}):null}InfoTooltip.propTypes={onOpen:a().func,title:a().oneOfType([a().string,a().element]),tooltipClassName:a().string}},12850:(e,t,i)=>{"use strict";i.d(t,{tt:()=>j,Jg:()=>S,Gp:()=>A,GH:()=>k,r0:()=>_,Du:()=>M,Zf:()=>V,Cn:()=>P,G7:()=>y,vH:()=>h,N_:()=>E,zh:()=>F,mK:()=>g.mK,Ql:()=>x,vY:()=>G,sq:()=>D,VZ:()=>z.VZ,JK:()=>g.JK,IS:()=>C,pH:()=>z.pH,kf:()=>W,O5:()=>w,Qr:()=>N,x6:()=>Z,K5:()=>g.K5,S_:()=>m,dc:()=>z.dc,Eo:()=>g.Eo,jq:()=>g.jq,DK:()=>B.D,N9:()=>U,p9:()=>r.p,XH:()=>T,Zm:()=>l,sx:()=>o.sx,BI:()=>o.BI,CZ:()=>r.C,BG:()=>H});var s=i(17243),o=i(89318),r=i(82046),n=i(10523),a=i.n(n);function l(e){return a()(JSON.stringify(c(e)))}function c(e){const t={};return Object.keys(e).sort().forEach(i=>{let s=e[i];s&&"object"==typeof s&&!Array.isArray(s)&&(s=c(s)),t[i]=s}),t}var g=i(79829);function d(e){return e.replace(new RegExp("\\[([^\\]]+)\\]\\((https?://[^/]+\\.\\w+/?.*?)\\)","gi"),'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}function u(e){return`<p>${e.replace(/\n{2,}/g,"</p><p>")}</p>`}function p(e){return e.replace(/\n/gi,"<br>")}function m(e){const t=[d,u,p];let i=e;for(const e of t)i=e(i);return i}function h(e){return e=parseFloat(e),isNaN(e)||0===e?[0,0,0,0]:[Math.floor(e/60/60),Math.floor(e/60%60),Math.floor(e%60),Math.floor(1e3*e)-1e3*Math.floor(e)]}function y(e){const t=e&&!Number.isInteger(e)?new Date(e).getTime():e;return isNaN(t)||!t?0:t}var f=i(32091),I=i.n(f),b=i(82871);const v="Date param must construct to a valid date instance or be a valid date instance itself.",k="Invalid dateString parameter, it must be a string.",A='Invalid date range, it must be a string with the format "last-x-days".',_=60,S=60*_,j=24*S,M=7*j;function x(){function e(e){return(0,b.sprintf)(/* translators: %s: number of days */ /* translators: %s: number of days */
(0,b._n)("Last %s day","Last %s days",e,"google-site-kit"),e)}return{"last-7-days":{slug:"last-7-days",label:e(7),days:7},"last-14-days":{slug:"last-14-days",label:e(14),days:14},"last-28-days":{slug:"last-28-days",label:e(28),days:28},"last-90-days":{slug:"last-90-days",label:e(90),days:90}}}function N(e=""){if(!(0,s.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,s.isDate)(t)&&!isNaN(t)}function D(e){I()((0,s.isDate)(e)&&!isNaN(e),v);const t=`${e.getMonth()+1}`,i=`${e.getDate()}`;return[e.getFullYear(),t.length<2?`0${t}`:t,i.length<2?`0${i}`:i].join("-")}function T(e){I()(N(e),k);const[t,i,s]=e.split("-");return new Date(t,i-1,s)}function C(e,t){return D(E(e,t*j))}function w(e){const t=e.split("-");return 3===t.length&&"last"===t[0]&&!Number.isNaN(t[1])&&!Number.isNaN(parseFloat(t[1]))&&"days"===t[2]}function E(e,t){I()(N(e)||(0,s.isDate)(e)&&!isNaN(e),k);const i=N(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}var R=i(69743),L=i(94552),O=i(62540);function G(e,t={}){if(Number.isNaN(Number(e)))return"";const{invertColor:i=!1}=t;return(0,R.Ay)((0,O.jsx)(L.A,{direction:e>0?"up":"down",invertColor:i}))}function P(e,t){return e>0&&t>0?e/t-1:e>0?1:t>0?-1:0}var z=i(8143);function Z(e){const t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function W(e){if("number"==typeof e)return!0;const t=(e||"").toString();return!!t&&!isNaN(t)}function U(e){return Array.isArray(e)?[...e].sort():e}var B=i(2522);function V(e,t){function i(e){return"0"===e||0===e}if(i(e)&&i(t))return 0;if(i(e)||Number.isNaN(e))return null;const s=(t-e)/e;return Number.isNaN(s)||!Number.isFinite(s)?null:s}function H(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}}function F(e){if(!e)return"";const t=e.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t)).replace(/(\\)/g,"");return(0,s.unescape)(t)}},13620:e=>{"use strict";e.exports=googlesitekit.modules},14007:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var s=i(47209),o=i(62688),r=i.n(o),n=i(63696),a=i(78325);function Portal({children:e,slug:t}){const[i]=(0,n.useState)(document.createElement("div"));return(0,s.A)(()=>{t&&i.classList.add(`googlesitekit-portal-${t}`);const e=document.querySelector(".googlesitekit-plugin")||document.body;return e.appendChild(i),()=>e.removeChild(i)}),(0,a.createPortal)(e,i)}Portal.propTypes={slug:r().string,children:r().node},Portal.defaultProps={slug:"",children:null};const l=Portal},14553:(e,t,i)=>{"use strict";var s=i(50539),o=i.n(s),r=i(13620),n=i.n(r),a=i(88176),l=i.n(a),c=i(82871),g=i(45512),d=i(17691),u=i(15167),p=i(62540);function SettingsView(){const e=(0,s.useSelect)(e=>e(g.n).getPropertyID());return(0,p.jsxs)("div",{className:"googlesitekit-settings-module__meta-item",children:[(0,p.jsx)(u.A,{as:"h5",size:"medium",type:"label",className:"googlesitekit-settings-module__meta-item-type",children:(0,c.__)("Connected Property","google-site-kit")}),(0,p.jsx)("p",{className:"googlesitekit-settings-module__meta-item-data",children:(0,p.jsx)(d.A,{value:e})})]})}var m=i(13606),h=i(97398),y=i(37226),f=i(63696),I=i(49383),b=i(89318),v=i(77766);function PropertySelect({hasModuleAccess:e}){const t=(0,v.A)(),i=(0,s.useSelect)(e=>e(g.n).getPropertyID()),o=(0,s.useSelect)(e=>e(g.n).getMatchedProperties()),r=(0,s.useSelect)(e=>e(g.n).hasFinishedResolution("getMatchedProperties")),{setPropertyID:n}=(0,s.useDispatch)(g.n),a=(0,f.useCallback)((e,s)=>{const o=s.dataset.value;i!==o&&(n(o),(0,b.sx)(`${t}_search-console`,"change_property"))},[i,n,t]);return r?!1===e?(0,p.jsx)(I.Select,{className:"googlesitekit-search-console__select-property",label:(0,c.__)("Property","google-site-kit"),value:i,enhanced:!0,outlined:!0,disabled:!0,children:(0,p.jsx)(I.Option,{value:i,children:i})}):(0,p.jsx)(I.Select,{className:"googlesitekit-search-console__select-property",label:(0,c.__)("Property","google-site-kit"),value:i,onEnhancedChange:a,enhanced:!0,outlined:!0,children:(o||[]).map(({siteURL:e})=>(0,p.jsx)(I.Option,{value:e,children:e.startsWith("sc-domain:")?(0,c.sprintf)(/* translators: %s: domain name */ /* translators: %s: domain name */
(0,c.__)("%s (domain property)","google-site-kit"),e.replace(/^sc-domain:/,"")):e},e))}):(0,p.jsx)(I.ProgressBar,{small:!0})}var k=i(62688),A=i.n(k),_=i(93896);function ZeroDataMessage({skipPrefix:e}){const t=(0,s.useSelect)(e=>e(_.O4).getCurrentEntityURL());return e?t?(0,c.__)("Your page hasnt appeared in Search yet","google-site-kit"):(0,c.__)("Your site hasnt appeared in Search yet","google-site-kit"):t?(0,c.__)("No data to display: your page hasnt appeared in Search yet","google-site-kit"):(0,c.__)("No data to display: your site hasnt appeared in Search yet","google-site-kit")}ZeroDataMessage.propTypes={skipPrefix:A().bool};var S,j,M=i(69667);function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},x.apply(null,arguments)}const N=e=>f.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 101 36"},e),S||(S=f.createElement("path",{stroke:"#CCC",d:"M101 35.5H1V0"})),j||(j=f.createElement("path",{stroke:"#CCC",strokeWidth:2,d:"m2 24.685 24.5-7.404L51 25 75.5 8.774 100 2"})));var D=i(46894),T=i(59357);function ActivateAnalyticsCTA_ActivateAnalyticsCTA({title:e}){return(0,p.jsxs)(D.A,{children:[(0,p.jsx)(T.A,{title:(0,c.__)("Unique visitors from Search","google-site-kit"),GraphSVG:M.A}),(0,p.jsx)(T.A,{title:e,GraphSVG:N})]})}ActivateAnalyticsCTA_ActivateAnalyticsCTA.propTypes={title:A().string.isRequired};var C=i(55527),w=i(99872),E=i(54415),R=i(72455),L=i(35323),O=i(12850),G=i(58116);function AnalyticsStats(e){const{data:t,selectedStats:i,dateRangeLength:o,dataLabels:r,tooltipDataFormats:n,chartDataFormats:a,statsColor:l,gatheringData:g,moduleSlug:d}=e,u=(0,L.A)(),m=(0,s.useSelect)(e=>e(y.i).isModuleConnected(d)),h=(0,s.useSelect)(e=>e(y.i).isModuleActive(d)),f=(0,s.useSelect)(e=>e(G.oR).getReferenceDate()),I=(0,s.useSelect)(e=>u?null:e(R.K9).getPropertyCreateTime());let b=[];if(I&&(b=[{date:(0,O.sq)(new Date(I)),text:(0,c.__)("Google Analytics property created","google-site-kit")}]),!h||!m)return null;const v=(0,w.sq)(t,i,o,f,r,n,a),[,...k]=v.slice(1).map(([e])=>e),A={...AnalyticsStats.chartOptions,hAxis:{...AnalyticsStats.chartOptions.hAxis,ticks:k},vAxis:{...AnalyticsStats.chartOptions.vAxis},series:{0:{color:l,targetAxisIndex:0},1:{color:l,targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}};if(!v.slice(1).some(e=>e[2]>0||e[3]>0)){const e={0:1,1:100}[i];A.vAxis.viewWindow.max=e}else A.vAxis.viewWindow.max=void 0;return(0,p.jsx)(C.xA,{className:"googlesitekit-analytics-site-stats",children:(0,p.jsx)(C.fI,{children:(0,p.jsx)(C.fh,{size:12,children:(0,p.jsx)(E.A,{chartType:"LineChart",data:v,dateMarkers:b,loadingHeight:"270px",loadingWidth:"100%",options:A,gatheringData:g})})})})}AnalyticsStats.propTypes={data:A().oneOfType([A().arrayOf(A().object),A().object]).isRequired,dateRangeLength:A().number.isRequired,selectedStats:A().number.isRequired,dataLabels:A().arrayOf(A().string).isRequired,tooltipDataFormats:A().arrayOf(A().func).isRequired,statsColor:A().string.isRequired,gatheringData:A().bool,moduleSlug:A().string.isRequired},AnalyticsStats.chartOptions={chart:{title:""},curveType:"function",height:270,width:"100%",chartArea:{height:"80%",left:60,right:25},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"MMM d",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1},viewWindow:{min:0}},focusTarget:"category",crosshair:{color:"gray",opacity:.1,orientation:"vertical",trigger:"both"},tooltip:{isHtml:!0,trigger:"both"}};var P=i(30679),z=i(16679),Z=i(80035);function SettingsForm({hasModuleAccess:e}){const t=(0,s.useSelect)(e=>e(y.i).getModule(h.Y)),i=t?.owner?.login?`<strong>${t.owner.login}</strong>`:(0,c.__)("Another admin","google-site-kit");return(0,p.jsxs)("div",{className:"googlesitekit-search-console-settings-fields",children:[(0,p.jsx)(P.A,{moduleS
(0,c.__)("%1$s configured %2$s and you dont have access to this Search Console property. Contact them to share access or change the Search Console property.","google-site-kit"),i,t?.name),{strong:(0,p.jsx)("strong",{})})}),e&&(0,p.jsx)(z.A,{slug:"search-console"})]})}function SettingsEdit(){(0,s.useSelect)(e=>e(g.n).getMatchedProperties());const e=(0,s.useSelect)(e=>e(g.n).isDoingSubmitChanges()),t=(0,s.useSelect)(e=>e(g.n).hasFinishedResolution("getMatchedProperties")),i=(0,s.useSelect)(e=>e(y.i).hasModuleOwnershipOrAccess(h.Y));let o;return o=e||!t||void 0===i?(0,p.jsx)(I.ProgressBar,{}):(0,p.jsx)(SettingsForm,{hasModuleAccess:i}),(0,p.jsx)("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console",children:o})}var W=i(63701),U=i(91560),B=i(17243);var V=i(4452),H=i.n(V);var F=i(32091),Y=i.n(F);function Q(e){const{startDate:t,endDate:i}=e;return Y()((0,O.Qr)(t),"A valid startDate is required."),Y()((0,O.Qr)(i),"A valid endDate is required."),{start_date:t.replace(/-/g,""),end_date:i.replace(/-/g,"")}}function J(e){const t=[[{type:"string",label:"Day"},{type:"number",label:"Clicks"},{type:"number",label:"Impressions"},{type:"number",label:"CTR"},{type:"number",label:"Position"}]];let i=0,s=0,o=0,r=0;const n=e.length;(0,B.each)(e,e=>{const n=(0,O.XH)(e.keys[0]);t.push([n.getMonth()+1+"/"+n.getUTCDate(),e.clicks,e.impressions,(0,B.round)(e.ctr,3),(0,B.round)(e.position,3)]),i+=e.clicks,s+=e.impressions,o+=e.ctr,r+=e.position});return{dataMap:t,totalClicks:i,totalImpressions:s,averageCTR:n>0?o/n:0,averagePosition:n>0?r/n:0}}var q=i(63264),X=i(49539),$=i(20898);function DashboardPopularKeywordsWidget(e){const{Widget:t,WidgetReportError:i}=e,o=(0,L.A)(),r=(0,s.useInViewSelect)(e=>e(g.n).isGatheringData()),n=(0,s.useSelect)(e=>e(G.oR).getDateRangeDates({offsetDays:g.f})),a={...n,dimensions:"query",limit:10,reportID:"search-console_dashboard-popular-keywords-widget_widget_reportArgs"},l=(0,s.useSelect)(e=>e(_.O4).getCurrentEntityURL());l&&(a.url=l);const d=(0,s.useInViewSelect)(e=>e(g.n).getReport(a),[a]),u=(0,s.useSelect)(e=>e(g.n).getErrorForSelector("getReport",[a])),m=(0,s.useSelect)(e=>!e(g.n).hasFinishedResolution("getReport",[a])),h=(0,s.useSelect)(e=>o?null:e(g.n).getServiceReportURL({...Q(n),page:l?`!${l}`:void 0}));function Footer(){return(0,p.jsx)(U.A,{className:"googlesitekit-data-block__source",name:(0,c._x)("Search Console","Service name","google-site-kit"),href:h,external:!0})}if(u)return(0,p.jsx)(t,{Footer,children:(0,p.jsx)(i,{moduleSlug:"search-console",error:u})});if(m||void 0===r)return(0,p.jsx)(t,{Footer,noPadding:!0,children:(0,p.jsx)(W.A,{padding:!0})});const y="googlesitekit-typography googlesitekit-typography--title ",f=[{columnHeaderClassName:`${y} googlesitekit-typography--medium`,title:l?(0,c.__)("Top search queries for your page","google-site-kit"):(0,c.__)("Top search queries for your site","google-site-kit"),description:(0,c.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0,field:"keys.0",Component({fieldValue:e}){const t=(0,s.useSelect)(t=>{if(o)return null;const i=t(G.oR).getDateRangeDates({offsetDays:g.f}),s=t(_.O4).getCurrentEntityURL();return t(g.n).getServiceReportURL({...Q(i),query:`!${e}`,page:s?`!${s}`:void 0})});return o?(0,p.jsx)("span",{children:e}):(0,p.jsx)($.A,{href:t,external:!0,hideExternalIndicator:!0,children:e})}},{columnHeaderClassName:`${y} googlesitekit-typography--small`,title:(0,c.__)("Clicks","google-site-kit"),description:(0,c.__)("Number of times users clicked on your content in search results","google-site-kit"),Component:({row:e})=>(0,p.jsx)("span",{children:(0,O.Eo)(e.clicks,{style:"decimal"})})},{columnHeaderClassName:`${y} googlesitekit-typography--small`,title:(0,c.__)("Impressions","google-site-kit"),description:(0,c.__)("Counted each time your content appears in search results","google-site-kit"),Component:({row:e})=>(0,p.jsx)("span",{children:(0,O.Eo)(e.impressions,{style:"decimal"})})}];return(0,p.jsx)(t,{Footer,noPadding:!0,children:(0,p.jsx)(q.A,{children:(0,p.jsx)(X.A,{rows:d,columns:f,z
(0,c._n)("Search traffic over the last %s day","Search traffic over the last %s days",e,"google-site-kit"),e)})};function SourceLinkAnalytics4(){const e=(0,L.A)(),t=(0,s.useSelect)(t=>{if(e)return null;const{getServiceReportURL:i}=t(R.K9),s=t(_.O4).getCurrentEntityURL(),o={dates:t(G.oR).getDateRangeDates({compare:!0,offsetDays:R.f2}),filters:{sessionSource:"google"},otherArgs:{collectionId:"life-cycle"}};return(0,K.m)(s)&&(o.filters.unifiedPagePathScreen=(0,O.pH)(s)),i("lifecycle-traffic-acquisition-v2",o)});return(0,p.jsx)(U.A,{href:t,name:(0,c._x)("Analytics","Service name","google-site-kit"),external:!0})}function SourceLinkSearch({metric:e}){const t=(0,L.A)(),i=(0,s.useSelect)(i=>{if(t)return null;const{getServiceReportURL:s,getPropertyID:o,isDomainProperty:r}=i(g.n),n=(0,O.CZ)(i(_.O4).getReferenceSiteURL()),a=i(_.O4).getCurrentEntityURL(),l=i(G.oR).getDateRangeDates({offsetDays:g.f}),c={resource_id:o(),metrics:e,...Q(l)};return a?c.page=`!${a}`:r()&&n&&(c.page=`*${n}`),s(c)},[e]);return(0,p.jsx)(U.A,{href:i,name:(0,c._x)("Search Console","Service name","google-site-kit"),external:!0})}function Footer({metrics:e,selectedStats:t}){if(!e?.[t])return null;const{service:i,metric:s}=e[t];return i===h.Y?(0,p.jsx)(SourceLinkSearch,{metric:s}):(0,p.jsx)(SourceLinkAnalytics4,{})}Footer.propTypes={metrics:A().arrayOf(A().object).isRequired,selectedStats:A().number.isRequired};const se=Footer;var oe=i(73874),re=i(99897),ne=i(15844);function CreateKeyEventCTA(){const e=`${(0,v.A)()}_search-traffic-widget`,t=(0,s.useSelect)(e=>e(_.O4).getGoogleSupportURL({path:"/analytics/answer/12844695"})),i=(0,f.useCallback)(()=>{(0,O.sx)(e,"click_ga4_keyEvents_cta")},[e]);return(0,ne.A)(()=>{(0,O.sx)(e,"view_ga4_keyEvents_cta")}),(0,p.jsxs)("div",{className:"googlesitekit-analytics-cta googlesitekit-analytics-cta--setup-key-events",children:[(0,p.jsx)("div",{className:"googlesitekit-analytics-cta__preview-graphs",children:(0,p.jsx)(T.A,{title:(0,c.__)("Key Events completed","google-site-kit"),GraphSVG:N})}),(0,p.jsxs)("div",{className:"googlesitekit-analytics-cta__details",children:[(0,p.jsx)("p",{className:"googlesitekit-analytics-cta--description",children:(0,c.__)("Set up key events to track how well your site fulfills your business objectives","google-site-kit")}),(0,p.jsx)(I.Button,{href:t,target:"_blank",onClick:i,children:(0,c.__)("Set up key events","google-site-kit")})]})]})}var ae=i(9652),le=i(32947);function ce(e){return{quarterCellProps:{smSize:2,mdSize:e?4:2,lgSize:3},halfCellProps:{smSize:4,mdSize:4,lgSize:6},oneThirdCellProps:{smSize:2,mdSize:4,lgSize:4},threeQuartersCellProps:{smSize:4,mdSize:4,lgSize:9},fullCellProps:{smSize:4,mdSize:8,lgSize:12}}}function ge(e,t,i=1){return{datapoint:e?.totals?.[0]?.metricValues?.[t]?.value/i,change:(0,O.Zf)(e?.totals?.[1]?.metricValues?.[t]?.value,e?.totals?.[0]?.metricValues?.[t]?.value)}}function OptionalCells({canViewSharedAnalytics4:e,errors:t,showGA4:i,showKeyEventsCTA:o,showRecoverableGA4:r,WidgetReportError:n}){const a=(0,le.dv)(),l=(0,s.useSelect)(e=>e(y.i).isModuleConnected(re.L1)),g=(0,s.useSelect)(e=>e(y.i).isModuleActive(re.L1)),d=g&&l,{quarterCellProps:u,halfCellProps:m}=ce(o);return(0,p.jsxs)(f.Fragment,{children:[e&&(!l||!g)&&(0,p.jsx)(C.fh,{...m,children:le.mp!==a&&(0,p.jsx)(ActivateAnalyticsCTA_ActivateAnalyticsCTA,{title:(0,c.__)("Key Events completed","google-site-kit")})}),!r&&e&&d&&t.length>0&&(0,p.jsx)(C.fh,{...m,children:(0,p.jsx)(n,{moduleSlug:"analytics-4",error:t})}),i&&(0,p.jsx)(C.fh,{...u,smSize:4,children:o&&(0,p.jsx)(CreateKeyEventCTA,{})}),e&&d&&r&&(0,p.jsx)(C.fh,{...m,children:(0,p.jsx)(ae.A,{moduleSlugs:[re.L1]})})]})}OptionalCells.propTypes={canViewSharedAnalytics4:A().bool.isRequired,error:A().arrayOf(A().object),showGA4:A().bool.isRequired,showKeyEventsCTA:A().bool.isRequired,showRecoverableGA4:A().bool,WidgetReportError:A().elementType.isRequired};var de=i(97029),ue=i(91865),pe=i(98652);function DataBlocks({ga4Data:e,ga4VisitorsData:t,searchConsoleData:i,selectedStats:o,handleStatsSelection:r,dateRangeLength:n,showGA4:a,dashboardType:l,showKeyEventsCTA:
(0,c._x)("%1$s vs %2$s","Date range for chart tooltip","google-site-kit"),(0,O.XH)(d).toLocaleDateString(n,a),(0,O.XH)(p).toLocaleDateString(n,a)),h=(0,O.Zf)(u,g),y=(0,O.Cn)(g,u),f=(0,O.vY)(y),I=(0,c.sprintf)(/* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage, %%: percent symbol */ /* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage, %%: percent symbol */
(0,c._x)("%1$s: <strong>%2$s</strong> <em>%3$s %4$s%%</em>","Stat information for chart tooltip","google-site-kit"),i,Math.abs(g).toFixed(2).replace(/(.00|0)$/,""),f,(0,O.Eo)(h));r.push([(0,O.XH)(d),`<div class="${H()("googlesitekit-visualization-tooltip",{"googlesitekit-visualization-tooltip--up":y>0,"googlesitekit-visualization-tooltip--down":y<0})}">\n\t\t\t\t<p>${m}</p>\n\t\t\t\t<p>${I}</p>\n\t\t\t</div>`,g,u])}),r}(a,n,i[s].label,i[s].metric,o),[,...g]=l.slice(1).map(([e])=>e),d={...SearchConsoleStats.chartOptions,hAxis:{format:"MMM d",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12},ticks:g},series:{0:{color:i[s].color,targetAxisIndex:0},1:{color:i[s].color,targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}},u=!l.slice(1).some(e=>e[2]>0||e[3]>0);return d.vAxis.viewWindow.max=u?1:void 0,(0,p.jsx)(C.xA,{className:"googlesitekit-search-console-site-stats",children:(0,p.jsx)(C.fI,{children:(0,p.jsx)(C.fh,{size:12,children:(0,p.jsx)(E.A,{chartType:"LineChart",data:l,loadingHeight:"270px",loadingWidth:"100%",options:d,gatheringData:r})})})})}function Chart({canViewSharedAnalytics4:e,dateRangeLength:t,ga4StatsData:i,ga4VisitorsOverviewAndStatsData:o,isGA4GatheringData:r,isSearchConsoleGatheringData:n,metrics:a,searchConsoleData:l,selectedStats:g}){const d=(0,le.dv)(),u=(0,s.useSelect)(e=>e(y.i).isModuleActive(re.L1)),m=(0,s.useSelect)(e=>e(y.i).isModuleConnected(re.L1));return(0,p.jsxs)(f.Fragment,{children:[(0===g||1===g)&&(0,p.jsx)(SearchConsoleStats,{data:l,dateRangeLength:t,selectedStats:g,metrics:a,gatheringData:n}),e&&(!u||!m)&&le.mp===d&&(0,p.jsx)(C.xA,{children:(0,p.jsx)(C.fI,{children:(0,p.jsx)(C.fh,{children:(0,p.jsx)(ActivateAnalyticsCTA_ActivateAnalyticsCTA,{title:(0,c.__)("Key Events completed","google-site-kit")})})})}),2===g&&(0,p.jsx)(AnalyticsStats,{data:o,dateRangeLength:t,selectedStats:0,metrics:a,dataLabels:[(0,c.__)("Unique Visitors","google-site-kit")],tooltipDataFormats:[e=>parseFloat(e).toLocaleString()],statsColor:a[g].color,gatheringData:r,moduleSlug:"analytics-4"}),e&&(3===g||4===g)&&(0,p.jsx)(AnalyticsStats,{data:i,dateRangeLength:t,selectedStats:g-3,metrics:a,dataLabels:[(0,c.__)("Key Events","google-site-kit"),(0,c.__)("Engagement Rate %","google-site-kit")],tooltipDataFormats:[e=>parseFloat(e).toLocaleString(),e=>(0,O.Eo)(e/100,{style:"percent",signDisplay:"never",maximumFractionDigits:2})],chartDataFormats:[B.identity,e=>100*e],statsColor:a[g].color,gatheringData:r,moduleSlug:"analytics-4"})]})}function SearchFunnelWidgetGA4({Widget:e,WidgetReportError:t}){const[i,o]=(0,f.useState)(0),r=(0,L.A)(),n=(0,s.useSelect)(e=>e(y.i).isModuleAvailable(re.L1)),a=(0,s.useSelect)(e=>!!n&&(!r||e(G.oR).canViewSharedModule(re.L1))),l=(0,s.useSelect)(e=>e(y.i).isModuleConnected(re.L1)),c=(0,s.useSelect)(e=>e(G.oR).getDateRangeNumberOfDays()),d=(0,s.useSelect)(e=>e(_.O4).getCurrentEntityURL()),{endDate:u,compareStartDate:m}=(0,s.useSelect)(e=>e(G.oR).getDateRangeDates({compare:!0,offsetDays:g.f})),h=(0,s.useSelect)(e=>e(G.oR).getDateRangeDates({compare:!0,offsetDays:R.f2})),I=(0,s.useSelect)(e=>{if(!r)return!1;const t=e(y.i).getRecoverableModules();return void 0!==t?Object.keys(t).includes(re.L1):void 0}),b=(0,s.useInViewSelect)(e=>l&&a&&!I?e(R.K9).getKeyEvents():[],[l,a,I]),v={startDate:m,endDate:u,dimensions:"date"},k={...h,metrics:[{name:"keyEvents"},{name:"engagementRate"}],dimensionFilters:{sessionDefaultChannelGrouping:["Organic Search"]},reportID:"search-console_search-funnel-widget-ga4_widget_ga4OverviewArgs"},A={...h,...k,dimensions:[{name:"date"}],orderby:[{dimension:{dimensionName:"date"}}],reportID:"search-console_search-funnel-widget-ga4_widget_ga4StatsArgs"},S={...h,metrics:[{name:"totalUsers"}],dimensions:[{name:"date"}],dimensionFilters:{sessionDefaultChannelGrouping:["Organic Search"]},orderby:[{dimension:{dimensionName:"date"}}],reportID:"search-console_search-funnel-widget-ga4_widget_ga4VisitorsOverviewAndStatsArgs"};(0,K.m)(d)&&(v.url=d,k.url=d,A.url=d,S.url=d);const j=(0,s.useInViewSelect)(e=>e(g.n).getReport(v),[v]),M=(0,s.useSelect)(e=>e(g.n).getErrorForSelector("getR
(0,c.__)("%s CTR","google-site-kit"),(0,O.Eo)(e,"%"))})}],u=[...r||[]].sort(({ctr:e=0},{ctr:t=0})=>t-e);return(0,p.jsx)(je.$,{Widget:e,widgetSlug:G.t7,loading:a,rows:u,columns:d,ZeroState:ZeroDataMessage,limit:3,error:n,moduleSlug:"search-console"})}PopularKeywordsWidget.propTypes={Widget:A().elementType.isRequired};var Me=i(54419),xe=i(47121),Ne=i(22242);const De={selectors:{areSettingsEditDependenciesLoaded:(0,s.createRegistrySelector)(e=>()=>e(g.n).hasFinishedResolution("getMatchedProperties"))}};const Te=n().createModuleStore(h.Y,{ownedSettingsSlugs:["propertyID"],storeName:g.n,settingSlugs:["propertyID","ownerID"],requiresSetup:!1,submitChanges:async function({select:e,dispatch:t}){if(e(g.n).haveSettingsChanged()){const{error:e}=await t(g.n).saveSettings();if(e)return{error:e}}return await(0,Me.invalidateCache)("modules",h.Y),{}},validateCanSubmitChanges:function(e){const t=(0,xe.WI)(e),{getPropertyID:i,haveSettingsChanged:s}=t(g.n);var o;Y()("string"==typeof(o=i())&&o.length>0,"a valid propertyID is required to submit changes"),Y()(s(),Ne.Wq)}});var Ce=i(3687),we=i(40127),Ee=i(44314);const Re=(0,Ce.U)({baseName:"getReport",storeName:g.n,controlCallback:({options:e})=>(0,Me.get)("modules",h.Y,"searchanalytics",e),reducerCallback:(0,s.createReducer)((e,t,{options:i})=>{e.reports[(0,O.Zm)(i)]=t}),argsToParams:e=>({options:e}),validateParams:({options:e}={})=>{Y()((0,B.isPlainObject)(e),"Options for Search Console report must be an object."),Y()((0,we.O5)(e),"Either date range or start/end dates must be provided for Search Console report.");const{dimensions:t}=e;t&&Y()((0,we.cq)(t),"Dimensions for Search Console report must be either a string or an array of strings")}}),Le=(0,Ee.d)(h.Y,{storeName:g.n,dataAvailable:i.g._googlesitekitModulesData?.["data_available_search-console"],selectDataAvailability:(0,s.createRegistrySelector)(e=>()=>{const t=e(g.n).getSampleReportArgs(),i=e(g.n).getReport(t);if(!e(g.n).hasFinishedResolution("getReport",[t]))return;return e(g.n).getErrorForSelector("getReport",[t])||!Array.isArray(i)?null:!!i.length})}),Oe={*getReport(e={}){(yield s.commonActions.getRegistry()).select(g.n).getReport(e)||(yield Re.actions.fetchGetReport(e))}},Ge={getReport(e,t={}){const{reports:i}=e;return i[(0,O.Zm)(t)]},hasZeroData:(0,s.createRegistrySelector)(e=>()=>{const t=e(g.n).isGatheringData();if(void 0===t)return;if(!0===t)return!0;const i=e(g.n).getSampleReportArgs(),s=e(g.n).getReport(i);return e(g.n).hasFinishedResolution("getReport",[i])?!!Array.isArray(s)&&function(e){if(void 0===e)return;return!Array.isArray(e)||!e.length||!e.some(e=>e.clicks>0||e.ctr>0||e.impressions>0||e.position>0)}(s):void 0}),getSampleReportArgs:(0,s.createRegistrySelector)(e=>()=>{const t=e(_.O4).getCurrentEntityURL(),{compareStartDate:i,endDate:s}=e(G.oR).getDateRangeDates({compare:!0,offsetDays:g.f}),o={startDate:i,endDate:s,dimensions:"date"};return t&&(o.url=t),o})},Pe=(0,s.combineStores)(Re,Le,{initialState:{reports:{}},resolvers:Oe,selectors:Ge}),ze=(Pe.initialState,Pe.actions,Pe.controls,Pe.reducer,Pe.resolvers,Pe.selectors,Pe);var Ze=i(51568);const We={getServiceURL:(0,s.createRegistrySelector)(e=>(t,{path:i,query:s}={})=>{let o="https://search.google.com/search-console";if(i){o=`${o}${`/${i.replace(/^\//,"")}`}`}s&&(o=(0,Ze.F)(o,s));const r=e(G.oR).getAccountChooserURL(o);if(void 0!==r)return r}),getServiceReportURL:(0,s.createRegistrySelector)(e=>(t,i={})=>{const s=e(g.n).getPropertyID(),o=We.isDomainProperty(t),r=e(_.O4).getReferenceSiteURL(),{page:n=(o?`*${(0,O.CZ)(r)}`:void 0),...a}=i,l={page:n,...a,resource_id:s};return We.getServiceURL(t,{path:"/performance/search-analytics",query:l})}),getServiceEntityAccessURL:(0,s.createRegistrySelector)(e=>t=>{const i={resource_id:e(g.n).getPropertyID()};return We.getServiceURL(t,{query:i})}),isDomainProperty:(0,s.createRegistrySelector)(e=>()=>{const t=e(g.n).getPropertyID();return t&&t.startsWith("sc-domain:")})},Ue={selectors:We},Be=(0,Ce.U)({baseName:"getMatchedProperties",controlCallback:()=>(0,Me.get)("modules",h.Y,"matched-sites",{},{useCache:!0}),reducerCallback:(0,s.c
(0,r.__)("By clicking confirm changes, youre granting other users view-only access to data from %s via your Google account. You can always manage this later in the dashboard sharing settings.","google-site-kit"),(0,c.K5)(u))}):null}EntityOwnershipChangeNotice.propTypes={slug:o().oneOfType([o().string,o().arrayOf(o().string)]).isRequired}},16834:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(62540);function VisuallyHidden({className:e,children:t,...i}){return t?(0,a.jsx)("span",{...i,className:n()("screen-reader-text",e),children:t}):null}VisuallyHidden.propTypes={className:o().string,children:o().node},VisuallyHidden.defaultProps={className:""};const l=VisuallyHidden},17691:(e,t,i)=>{"use strict";i.d(t,{A:()=>n,G:()=>r});var s=i(62688),o=i.n(s);const r=" ";function DisplaySetting({value:e}){return e||r}DisplaySetting.propTypes={value:o().oneOfType([o().string,o().bool,o().number])};const n=DisplaySetting},19793:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,o=i(63696);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},r.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>o.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),s||(s=o.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1m4.806 8.592.592-.806-1.612-1.184-.592.806-3.89 5.296c-.166.226-.36.296-.512.296s-.346-.07-.512-.296l-1.474-2.007-.592-.806-1.612 1.184.592.806 1.474 2.007C9.191 15.6 9.971 16 10.792 16s1.6-.4 2.124-1.112z",clipRule:"evenodd"})))},20898:(e,t,i)=>{"use strict";i.d(t,{A:()=>N});var s,o=i(4452),r=i.n(o),n=i(62688),a=i.n(n),l=i(39941),c=i(63696),g=i(82871);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},d.apply(null,arguments)}const u=e=>c.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13"},e),s||(s=c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("circle",{cx:6.5,cy:6.5,r:6.5,fill:"currentColor"}),c.createElement("path",{fill:"#FFF",d:"M3.461 6.96h5.15L6.36 9.21a.464.464 0 0 0 .325.79.46.46 0 0 0 .325-.135l3.037-3.038a.46.46 0 0 0 0-.65L7.015 3.135a.46.46 0 0 0-.65.65L8.61 6.039H3.461a.46.46 0 0 0-.461.46c0 .254.207.462.461.462z"}),".")));var p;function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},m.apply(null,arguments)}const h=e=>c.createElement("svg",m({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13"},e),p||(p=c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("circle",{cx:6.5,cy:6.5,r:6.5,fill:"#FFF"}),c.createElement("path",{fill:"currentColor",d:"M3.461 6.96h5.15L6.36 9.21a.464.464 0 0 0 .325.79.46.46 0 0 0 .325-.135l3.037-3.038a.46.46 0 0 0 0-.65L7.015 3.135a.46.46 0 0 0-.65.65L8.61 6.039H3.461a.46.46 0 0 0-.461.46c0 .254.207.462.461.462z"}),".")));var y;function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},f.apply(null,arguments)}const I=e=>c.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},e),y||(y=c.createElement("path",{d:"m12 20-8-8 8-8 1.425 1.4-5.6 5.6H20v2H7.825l5.6 5.6z"})));var b=i(83366),v=i(84385),k=i(62540);const A="BUTTON",_="BUTTON_DISABLED",S="EXTERNAL_LINK",j="LINK",M="ROUTER_LINK",x=(0,c.forwardRef)((e,t)=>{const{"aria-label":i,secondary:s=!1,arrow:o=!1,back:n=!1,caps:a=!1,children:c,className:d="",danger:p=!1,disabled:m=!1,external:y=!1,hideExternalIndicator:f=!1,href:x="",inverse:N=!1,noFlex:D=!1,onClick:T,small:C=!1,standalone:w=!1,linkButton:E=!1,to:R,
(0,c.__)("Trouble getting access? <HelpLink />","google-site-kit"),{HelpLink:(0,p.jsx)(u.A,{href:e,external:!0,hideExternalIndicator:!0,children:(0,c.__)("Get help","google-site-kit")})})}GetHelpLink.propTypes={linkURL:a().string.isRequired};var m=i(23224);function MetricTileLoader(){return(0,p.jsxs)("div",{className:"googlesitekit-km-widget-tile__loading",children:[(0,p.jsx)(m.A,{className:"googlesitekit-km-widget-tile__loading-header",width:"100%",height:"14px"}),(0,p.jsx)(m.A,{className:"googlesitekit-km-widget-tile__loading-body",width:"100%",height:"53px"})]})}var h=i(36148),y=i(92473),f=i(35902),I=i(67150),b=i(12850),v=i(77766);function MetricTileWrapper(e){const{className:t,children:i,error:s,loading:n,moduleSlug:a,Widget:d,widgetSlug:u,title:m=g.G[u]?.title,infoTooltip:k=g.G[u]?.infoTooltip||g.G[u]?.description}=e,A=(0,v.A)(),_=!!s&&(0,r.castArray)(s).some(I.SG),S=(0,l.useCallback)(()=>{(0,b.sx)(`${A}_kmw`,"data_loading_error_retry")},[A]);return(0,l.useEffect)(()=>{s&&(0,b.sx)(`${A}_kmw`,"data_loading_error")},[A,s]),s?(0,p.jsx)(h.A,{title:_?(0,c.__)("Insufficient permissions","google-site-kit"):(0,c.__)("Data loading failed","google-site-kit"),headerText:m,infoTooltip:k,children:(0,p.jsx)(f.A,{moduleSlug:a,error:s,onRetry:S,GetHelpLink:_?GetHelpLink:void 0,getHelpClassName:"googlesitekit-error-retry-text"})}):(0,p.jsx)(d,{noPadding:!0,children:(0,p.jsxs)("div",{className:o()("googlesitekit-km-widget-tile",t),children:[(0,p.jsx)(y.A,{title:m,infoTooltip:k,loading:n}),(0,p.jsxs)("div",{className:"googlesitekit-km-widget-tile__body",children:[n&&(0,p.jsx)(MetricTileLoader,{}),!n&&i]})]})})}MetricTileWrapper.propTypes={Widget:a().elementType.isRequired,loading:a().bool,title:a().string,infoTooltip:a().oneOfType([a().string,a().element]),moduleSlug:a().string.isRequired}},35902:(e,t,i)=>{"use strict";i.d(t,{A:()=>ReportErrorActions});var s=i(62688),o=i.n(s),r=i(63696),n=i(13606),a=i(82871),l=i(50539),c=i(49383),g=i(93896),d=i(37226),u=i(67150),p=i(35323),m=i(20898),h=i(62540);function ReportErrorActions(e){const{moduleSlug:t,error:i,GetHelpLink:s,hideGetHelpLink:o,buttonVariant:y,onRetry:f,onRequestAccess:I,getHelpClassName:b,RequestAccessButton:v,RetryButton:k}=e,A=(0,p.A)(),_=(0,l.useSelect)(e=>e(d.i).getModuleStoreName(t)),S=(0,l.useSelect)(e=>"function"==typeof e(_)?.getServiceEntityAccessURL?e(_).getServiceEntityAccessURL():null),j=Array.isArray(i)?i:[i],M=(0,l.useSelect)(e=>j.map(t=>{const i=e(_)?.getSelectorDataForError(t);return{...t,selectorData:i}})),x=M?.filter(e=>(0,u.vl)(e,e.selectorData)&&"getReport"===e.selectorData.name),N=!!x.length,D=(0,l.useSelect)(e=>{const i={...N?x[0]:j[0]};return(0,u.SG)(i)&&(i.code=`${t}_insufficient_permissions`),e(g.O4).getErrorTroubleshootingLinkURL(i)}),T=(0,l.useDispatch)(),C=j.some(e=>(0,u.SG)(e)),w=(0,r.useCallback)(()=>{x.forEach(e=>{const{selectorData:t}=e;T(t.storeName).invalidateResolution(t.name,t.args)}),f?.()},[T,x,f]),E=S&&C&&!A;return(0,h.jsxs)("div",{className:"googlesitekit-report-error-actions",children:[E&&("function"==typeof v?(0,h.jsx)(v,{requestAccessURL:S}):(0,h.jsx)(c.Button,{onClick:I,href:S,target:"_blank",danger:"danger"===y,tertiary:"tertiary"===y,children:(0,a.__)("Request access","google-site-kit")})),N&&(0,h.jsxs)(r.Fragment,{children:["function"==typeof k?(0,h.jsx)(k,{handleRetry:w}):(0,h.jsx)(c.Button,{onClick:w,danger:"danger"===y,tertiary:"tertiary"===y,children:(0,a.__)("Retry","google-site-kit")}),!o&&(0,h.jsx)("span",{className:"googlesitekit-error-retry-text",children:(0,n.A)((0,a.__)("Retry didnt work? <HelpLink />","google-site-kit"),{HelpLink:(0,h.jsx)(m.A,{href:D,external:!0,hideExternalIndicator:!0,children:(0,a.__)("Get help","google-site-kit")})})})]}),!N&&!o&&(0,h.jsx)("div",{className:b,children:"function"==typeof s?(0,h.jsx)(s,{linkURL:D}):(0,h.jsx)(m.A,{href:D,external:!0,hideExternalIndicator:!0,children:(0,a.__)("Get help","google-site-kit")})})]})}ReportErrorActions.propTypes={moduleSlug:o().string.isRequired,error:o().oneOfType([o().arrayOf(o().object),o().object]).isRequired,GetHelpLink:o().elementType,hideGetHelpLin
(0,q._n)("%s is disconnected, no data to show","%s are disconnected, no data to show",c.length,"google-site-kit"),c.join((0,q.__)(" and ","google-site-kit")))})})}function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},K.apply(null,arguments)}MetricItem.propTypes={slug:I().string.isRequired,title:I().string.isRequired,description:I().string.isRequired,isNewlyDetected:I().bool,savedItemSlugs:I().array};const key_metrics_no_selected_items=e=>s.createElement("svg",K({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 383 238"},e),N||(N=s.createElement("path",{fill:"#B8E6CA",d:"M59.238 58.571c-2.136 20.178 4.272 29.099 20.48 53.216 16.209 24.118-29.092 62.914 5.475 101.268 33.827 37.532 69.419.009 111.314-4.555 29.443-3.208 57.819 12.98 90.86 5.9s46.385-42.599 43.153-68.059c-5.59-44.041-26.24-49.107-34.893-66.461s2.902-52.997-30.287-73.16-76.71 14.42-112.503 12.37c-20.651-1.182-40.932-4.995-59.264.86-18.53 5.918-32.662 22.571-34.335 38.621"})),D||(D=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__a)"},s.createElement("rect",{width:130.621,height:89.651,x:242.455,y:45.266,fill:"#fff",rx:10.957,transform:"rotate(15 242.455 45.266)"}))),T||(T=s.createElement("rect",{width:24.903,height:7.969,x:253.726,y:64.785,fill:"#EBEEF0",rx:3.985,transform:"rotate(15 253.726 64.785)"})),C||(C=s.createElement("rect",{width:49.806,height:19.923,x:249.342,y:81.144,fill:"#FFDED3",rx:9.961,transform:"rotate(15 249.342 81.144)"})),w||(w=s.createElement("rect",{width:99.428,height:8.773,x:240.436,y:114.357,fill:"#EBEEF0",rx:3.985,transform:"rotate(15 240.436 114.357)"})),E||(E=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m256.195 90.198 4.644 8.044m0 0 1.412-4.986m-1.412 4.986-5.023-1.27"})),R||(R=s.createElement("rect",{width:19.923,height:5.977,x:268.706,y:93.551,fill:"#fff",rx:1.992,transform:"rotate(15 268.706 93.55)"})),L||(L=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__b)"},s.createElement("rect",{width:130.621,height:89.68,x:13.887,y:79.094,fill:"#fff",rx:10.957,transform:"rotate(-15 13.887 79.094)"}))),O||(O=s.createElement("rect",{width:62.386,height:7.798,x:32.989,y:90.122,fill:"#EBEEF0",rx:3.899,transform:"rotate(-15 32.99 90.122)"})),G||(G=s.createElement("rect",{width:49.806,height:19.923,x:37.691,y:106.902,fill:"#FFDED3",rx:9.961,transform:"rotate(-15 37.691 106.902)"})),P||(P=s.createElement("rect",{width:99.428,height:7.798,x:46.612,y:140.967,fill:"#EBEEF0",rx:3.899,transform:"rotate(-15 46.612 140.967)"})),z||(z=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m48.152 111.318 8.044 4.645m0 0-1.27-5.024m1.27 5.024-4.986 1.411"})),Z||(Z=s.createElement("rect",{width:19.923,height:5.977,x:60.663,y:107.966,fill:"#fff",rx:1.992,transform:"rotate(-15 60.663 107.966)"})),W||(W=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__c)"},s.createElement("rect",{width:130.621,height:89.68,x:126.251,y:37.4,fill:"#fff",rx:10.957}))),U||(U=s.createElement("rect",{width:98.333,height:7.867,x:143.013,y:53.134,fill:"#EBEEF0",rx:3.933})),B||(B=s.createElement("rect",{width:49.806,height:19.923,x:142.369,y:70.423,fill:"#B8E6CA",rx:9.961})),V||(V=s.createElement("rect",{width:33.04,height:7.867,x:143.013,y:105.84,fill:"#EBEEF0",rx:3.933})),H||(H=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m151.336 84.036 6.568-6.567m0 0-5.182-.073m5.182.073.073 5.18"})),F||(F=s.createElement("rect",{width:19.923,height:5.977,x:164.287,y:77.395,fill:"#fff",rx:1.992})),s.createElement("mask",{id:"key-metrics-no-selected-items_svg__d",width:273,height:230,x:58,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},Y||(Y=s.createElement("path",{fill:"#B8E6CA",d:"M59.237 58.571C57.1 78.75 63.509 87.67 79.717 111.787c16.209 24.118-29.091 62.914 5.475 101.268 33.827 37.532 69.419.009 111.314-4.555 2
(0,s.__)("Your Google account does not have sufficient permissions to access %s data, so you wont be able to see stats from it on the Site Kit dashboard.","google-site-kit"),n)),a&&a.login&&(c=(0,s.sprintf)(/* translators: %s: owner name */ /* translators: %s: owner name */
(0,s.__)('This service was originally connected by the administrator "%s" — you can contact them for more information.',"google-site-kit"),a.login)),c||(c=(0,s.__)("This service was originally connected by an administrator — you can contact them for more information.","google-site-kit")),`${l} ${c}`}},67150:(e,t,i)=>{"use strict";i.d(t,{G:()=>c,HY:()=>d,SG:()=>g,db:()=>o,e4:()=>p,vl:()=>u});i(17243);var s=i(82871);const o="missing_required_scopes",r="insufficientPermissions",n="forbidden",a="internal_server_error",l="invalid_json";function c(e){return e?.code===o}function g(e){return[r,n].includes(e?.data?.reason)}function d(e){return!!e?.data?.reconnectURL}function u(e,t){return!(!t?.storeName||g(e)||c(e)||d(e))}function p(e){return e?.code===a?(0,s.__)("There was a critical error on this website while fetching data","google-site-kit"):e?.code===l?(0,s.__)("The server provided an invalid response","google-site-kit"):e?.message}},68326:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var s=i(50532),o=i.n(s),r=i(17243);const n=o()(({metrics:e,dimensions:t,...i}={})=>({metrics:a(e),dimensions:l(t),...i}));function a(e){return(0,r.castArray)(e).map(e=>"string"==typeof e?{name:e}:e).filter(e=>(0,r.isPlainObject)(e))}function l(e){return(0,r.castArray)(e).map(e=>"string"==typeof e?{name:e}:e).filter(e=>(0,r.isPlainObject)(e))}},68485:(e,t,i)=>{"use strict";i.d(t,{r:()=>AdminScreenTooltip,i:()=>s.i});var s=i(15863),o=i(63696),r=i(50539),n=i(62688),a=i(36703),l=i(40960),c=i(60592),g=i(14007),d=i(39771),u=i(32947),p=i(62540);function JoyrideTooltip(e){const{title:t,content:s,dismissLabel:r,disableOverlay:n=!0,target:m,cta:h=!1,className:y,styles:f={},slug:I="",placement:b="auto",onDismiss:v=()=>{},onView:k=()=>{},onTourStart:A=()=>{},onTourEnd:_=()=>{}}=e;function S(){return!!i.g.document.querySelector(m)}const[j,M]=(0,o.useState)(S),x=(0,u.dv)(),N=x===u.mp||x===u.Lg,[D,T]=(0,o.useState)(!0),C=(0,o.useRef)(N);if((0,l.A)(()=>{S()&&M(!0)},j?null:250),(0,o.useEffect)(()=>{let e=()=>{};if("function"==typeof i.g.ResizeObserver){const t=i.g.document.querySelector(m);if(t){const s=new ResizeObserver(()=>{i.g.dispatchEvent(new Event("resize"))});s.observe(t),e=()=>s.disconnect()}}return e},[m,j]),(0,o.useEffect)(()=>{let e;return C.current!==N&&(T(!1),e=setTimeout(()=>{T(!0)},50),C.current=N),()=>{e&&clearTimeout(e)}},[N]),!j)return null;const w=[{title:t,target:m,content:s,disableBeacon:!0,isFixed:!0,placement:b,cta:h,className:y}],E={close:r,last:r};return(0,p.jsx)(g.A,{slug:I,children:(0,p.jsx)(a.Ay,{callback:function({type:e}){switch(e){case a.qY.TOUR_START:A(),i.g.document.body.classList.add("googlesitekit-showing-tooltip");break;case a.qY.TOUR_END:_(),i.g.document.body.classList.remove("googlesitekit-showing-tooltip");break;case a.qY.STEP_AFTER:v();break;case a.qY.TOOLTIP:k()}},disableOverlay:n,spotlightPadding:0,floaterProps:d.ei,locale:E,steps:w,styles:{...d.R0,...f,options:{...d.R0.options,...f?.options},spotlight:{...d.R0.spotlight,...f?.spotlight}},tooltipComponent:c.A,run:D,disableScrolling:!0})})}JoyrideTooltip.propTypes={title:n.PropTypes.node,content:n.PropTypes.string,disableOverlay:n.PropTypes.bool,dismissLabel:n.PropTypes.string,target:n.PropTypes.string.isRequired,onDismiss:n.PropTypes.func,onShow:n.PropTypes.func,className:n.PropTypes.string,styles:n.PropTypes.object,slug:n.PropTypes.string,placement:n.PropTypes.string,onView:n.PropTypes.func};var m=i(7081),h=i(12850),y=i(77766);function AdminScreenTooltip(){const e=(0,y.A)(),{setValue:t}=(0,r.useDispatch)(m.n),i=(0,u.dv)(),{isTooltipVisible:s=!1,target:n,placement:a,className:l,tooltipSlug:c,title:g,content:d,dismissLabel:f}=(0,r.useSelect)(e=>e(m.n).getValue("admin-screen-tooltip")||{isTooltipVisible:!1});const I=(0,o.useCallback)(()=>{c&&(0,h.sx)(`${e}_${c}`,"tooltip_dismiss"),t("admin-screen-tooltip",void 0)},[t,c,e]);if(!s)return null;const b=i===u.mp||i===u.Lg,v=null!=n?n:'#adminmenu [href*="page=googlesitekit-settings"]',k=null!=a?a:"right";return(0,p.jsx)(JoyrideTooltip,{target:b?"body":v,placement:b?"center":k,className:b?"googlesitekit-tour-tooltip__modal_step"
(0,n._x)("%1$s vs %2$s","Date range for chart tooltip","google-site-kit"),e[0].toLocaleDateString(_,S),A[i][0].toLocaleDateString(_,S)),f=(0,n.sprintf)(/* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage */ /* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage */
(0,n._x)("%1$s: <strong>%2$s</strong> <em>%3$s %4$s</em>","Stat information for chart tooltip","google-site-kit"),c[t],d[t](r),m,(0,l.Eo)(Math.abs(u),"%"));I.push([e[0],`<div class="${o()("googlesitekit-visualization-tooltip",{"googlesitekit-visualization-tooltip--up":u>0,"googlesitekit-visualization-tooltip--down":u<0})}">\n\t\t\t\t<p>${h}</p>\n\t\t\t\t<p>${f}</p>\n\t\t\t</div>`,y?(0,l.vH)(r):r,y?(0,l.vH)(a):a])}),I}},75487:(e,t,i)=>{"use strict";i.d(t,{fh:()=>Cell,xA:()=>u,fI:()=>g});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(62540);function Cell(e){const{className:t,alignTop:i,alignMiddle:s,alignBottom:o,alignRight:r,alignLeft:l,smAlignRight:c,mdAlignRight:g,lgAlignRight:d,smSize:u,smStart:p,smOrder:m,mdSize:h,mdStart:y,mdOrder:f,lgSize:I,lgStart:b,lgOrder:v,size:k,children:A,..._}=e;return(0,a.jsx)("div",{..._,className:n()(t,"mdc-layout-grid__cell",{"mdc-layout-grid__cell--align-top":i,"mdc-layout-grid__cell--align-middle":s,"mdc-layout-grid__cell--align-bottom":o,"mdc-layout-grid__cell--align-right":r,"mdc-layout-grid__cell--align-left":l,"mdc-layout-grid__cell--align-right-phone":c,"mdc-layout-grid__cell--align-right-tablet":g,"mdc-layout-grid__cell--align-right-desktop":d,[`mdc-layout-grid__cell--span-${k}`]:12>=k&&k>0,[`mdc-layout-grid__cell--span-${I}-desktop`]:12>=I&&I>0,[`mdc-layout-grid__cell--start-${b}-desktop`]:12>=b&&b>0,[`mdc-layout-grid__cell--order-${v}-desktop`]:12>=v&&v>0,[`mdc-layout-grid__cell--span-${h}-tablet`]:8>=h&&h>0,[`mdc-layout-grid__cell--start-${y}-tablet`]:8>=y&&y>0,[`mdc-layout-grid__cell--order-${f}-tablet`]:8>=f&&f>0,[`mdc-layout-grid__cell--span-${u}-phone`]:4>=u&&u>0,[`mdc-layout-grid__cell--start-${p}-phone`]:4>=p&&p>0,[`mdc-layout-grid__cell--order-${m}-phone`]:4>=m&&m>0}),children:A})}Cell.propTypes={smSize:o().number,smStart:o().number,smOrder:o().number,mdSize:o().number,mdStart:o().number,mdOrder:o().number,lgSize:o().number,lgStart:o().number,lgOrder:o().number,size:o().number,alignTop:o().bool,alignMiddle:o().bool,alignBottom:o().bool,alignRight:o().bool,alignLeft:o().bool,smAlignRight:o().bool,mdAlignRight:o().bool,lgAlignRight:o().bool,className:o().string,children:o().node},Cell.defaultProps={className:"",size:0,smSize:0,smStart:0,smOrder:0,mdSize:0,mdStart:0,mdOrder:0,lgSize:0,lgStart:0,lgOrder:0};var l=i(63696);const c=(0,l.forwardRef)(({className:e,children:t,...i},s)=>(0,a.jsx)("div",{ref:s,className:n()("mdc-layout-grid__inner",e),...i,children:t}));c.displayName="Row",c.propTypes={className:o().string,children:o().node},c.defaultProps={className:""};const g=c,d=(0,l.forwardRef)(({alignLeft:e,fill:t,className:i,children:s,collapsed:o,...r},l)=>(0,a.jsx)("div",{className:n()("mdc-layout-grid",i,{"mdc-layout-grid--align-left":e,"mdc-layout-grid--collapsed":o,"mdc-layout-grid--fill":t}),...r,ref:l,children:s}));d.displayName="Grid",d.propTypes={alignLeft:o().bool,fill:o().bool,className:o().string,collapsed:o().bool,children:o().node},d.defaultProps={className:""};const u=d},75578:(e,t,i)=>{"use strict";i.d(t,{i$:()=>ChangeMetricsLink,kB:()=>InsufficientPermissionsError,uQ:()=>C,ym:()=>MetricTileNumeric,$:()=>MetricTileTable,mF:()=>MetricTileTablePlainText,sq:()=>G.A,sB:()=>E.A});var s=i(63696),o=i(82871),r=i(50539),n=i(7081),a=i(58116),l=i(50111),c=i(20898),g=i(674),d=i(93896),u=i(12850),p=i(98748),m=i(62540);function SetupCompletedSurveyTrigger(){const e=(0,r.useSelect)(e=>e(d.O4).isKeyMetricsSetupCompleted()),t=(0,r.useSelect)(e=>e(d.O4).getKeyMetricsSetupCompletedBy()),i=(0,r.useSelect)(e=>e(a.oR).getID());return e?(0,m.jsxs)(s.Fragment,{children:[(0,m.jsx)(p.A,{triggerID:"view_kmw",ttl:u.Du}),t===i&&(0,m.jsx)(p.A,{triggerID:"view_kmw_setup_completed",ttl:u.Du})]}):null}var h=i(77766),y=i(24558);const f={slug:"sharedKeyMetrics",contexts:[y.jU,y.Ax,y.f7,y.Is],gaEventCategory:e=>`${e}_shared_key-metrics`,steps:[{target:".googlesitekit-km-change-metrics-cta",title:(0,o.__)("Personalize your key metrics","google-site-kit"),content:(0,o.__)("Another admin has set up these tailored metrics for your site. Click here to personalize them.","google-site-kit"),placement:
(0,n.__)("%s (Please try again.)","google-site-kit"),v)),p||(v=(0,n.sprintf)(/* translators: $%s: Error message */ /* translators: $%s: Error message */
(0,n.__)("Error: %s","google-site-kit"),v));const k=t?.data?.reconnectURL;k&&(0,a.m)(k)&&(v=(0,n.sprintf)(/* translators: 1: Original error message 2: Reconnect URL */ /* translators: 1: Original error message 2: Reconnect URL */
(0,n.__)('%1$s To fix this, <a href="%2$s">redo the plugin setup</a>.',"google-site-kit"),v,k));return(0,u.jsx)(g.A,{className:e,type:g.A.TYPES.ERROR,description:(0,u.jsx)("span",{dangerouslySetInnerHTML:(0,d.p9)(v,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}),ctaButton:b?{label:(0,n.__)("Retry","google-site-kit"),onClick:I}:void 0,hideIcon:h})}ErrorNotice.propTypes={className:o().string,error:o().shape({message:o().string}),hasButton:o().bool,storeName:o().string,message:o().string,noPrefix:o().bool,skipRetryMessage:o().bool,hideIcon:o().bool}},78340:(e,t,i)=>{"use strict";i.d(t,{s:()=>s});const s="core/forms"},79829:(e,t,i)=>{"use strict";i.d(t,{Eo:()=>d,JK:()=>h,K5:()=>m,jq:()=>p,mK:()=>g});var s=i(17243),o=i(50532),r=i.n(o),n=i(82871);function a(e,t={}){const{formatUnit:i,formatDecimal:s}=function(e,t={}){const{hours:i,minutes:s,seconds:o}=l(e);return{hours:i,minutes:s,seconds:o,formatUnit(){const{unitDisplay:r="short",...a}=t,l={unitDisplay:r,...a,style:"unit"};return 0===e?p(o,{...l,unit:"second"}):(0,n.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?p(o,{...l,unit:"second"}):"",s?p(s,{...l,unit:"minute"}):"",i?p(i,{...l,unit:"hour"}):"").trim()},formatDecimal(){const t=(0,n.sprintf)(
// translators: %s: number of seconds with "s" as the abbreviated unit.
// translators: %s: number of seconds with "s" as the abbreviated unit.
(0,n.__)("%ds","google-site-kit"),o);if(0===e)return t;const r=(0,n.sprintf)(
// translators: %s: number of minutes with "m" as the abbreviated unit.
// translators: %s: number of minutes with "m" as the abbreviated unit.
(0,n.__)("%dm","google-site-kit"),s),a=(0,n.sprintf)(
// translators: %s: number of hours with "h" as the abbreviated unit.
// translators: %s: number of hours with "h" as the abbreviated unit.
(0,n.__)("%dh","google-site-kit"),i);return(0,n.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?t:"",s?r:"",i?a:"").trim()}}}(e,t);try{return i()}catch{return s()}}function l(e){e=parseInt(e,10),Number.isNaN(e)&&(e=0);return{hours:Math.floor(e/60/60),minutes:Math.floor(e/60%60),seconds:Math.floor(e%60)}}function c(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e}function g(e){let t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:(0,s.isPlainObject)(e)&&(t={...e}),t}function d(e,t={}){e=(0,s.isFinite)(e)?e:Number(e),(0,s.isFinite)(e)||(console.warn("Invalid number",e,typeof e),e=0);const i=g(t),{style:o="metric"}=i;return"metric"===o?function(e){const t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in millions.
// translators: %s: an abbreviated number in millions.
(0,n.__)("%sM","google-site-kit"),p(c(e),e%10==0?{}:t)):1e4<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in thousands.
// translators: %s: an abbreviated number in thousands.
(0,n.__)("%sK","google-site-kit"),p(c(e))):1e3<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in thousands.
// translators: %s: an abbreviated number in thousands.
(0,n.__)("%sK","google-site-kit"),p(c(e),e%10==0?{}:t)):p(e,{signDisplay:"never",maximumFractionDigits:1})}(e):"duration"===o?a(e,i):"durationISO"===o?function(e){let{hours:t,minutes:i,seconds:s}=l(e);return s=("0"+s).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${s}`:`${t}:${i}:${s}`}(e):p(e,i)}const u=r()(console.warn);function p(e,t={}){const{locale:i=h(),...s}=t;try{return new Intl.NumberFormat(i,s).format(e)}catch(t){u(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(s)} ).format( ${typeof e} )`,t.message)}const o={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},r=["signDisplay","compactDisplay"],n={};for(const[e,t]of Object.entries(s))o[e]&&t===o[e]||r.includes(e)||(n[e]=t);try{return new Intl.NumberFormat(i,n).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function m(e,t={}){const{locale:i=h(),style:s="long",type:o="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:s,type:o}).format(e)}
/* translators: used between list items, there is a space after the comma. */const r=(0,n.__)(", ","google-site-kit");return e.join(r)}function h(e=i.g){const t=(0,s.get)(e,["_googlesitekitLegacyData","locale"]);if(t){const e=t.match(/^(\w{2})?(_)?(\w{2})/);if(e&&e[0])return e[0].replace(/_/g,"-")}return e.navigator.language}},80035:(e,t,i)=>{"use strict";i.d(t,{A:()=>b});var s,o=i(62688),r=i.n(o),n=i(4452),a=i.n(n),l=i(63696),c=i(19793);function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},g.apply(null,arguments)}const warning_notice=e=>l.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),s||(s=l.createElement("path",{fill:"currentColor",d:"M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1m0 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m-1-2h2V6h-2z"})));var d=i(42343),u=i(49655),p=i(62540);const m={[u.Q.NEW]:d.A,[u.Q.SUCCESS]:c.A,[u.Q.INFO]:warning_notice,[u.Q.WARNING]:warning_notice,[u.Q.ERROR]:warning_notice};function Icon({type:e}){const t=m[e]||warning_notice;return(0,p.jsx)(t,{width:24,height:24})}function Title({className:e,children:t}){return(0,p.jsx)("p",{className:a()("googlesitekit-notice__title",e),children:t})}function Description({className:e,children:t}){return(0,p.jsx)("p",{className:a()("googlesitekit-notice__description",e),children:t})}Icon.propTypes={type:r().oneOf(Object.values(u.Q))},Title.propTypes={className:r().string,children:r().node},Description.propTypes={className:r().string,children:r().node};var h=i(49383),y=i(83366);function CTAButton({label:e,disabled:t,inProgress:i,onClick:s,href:o,external:r=!1,hideExternalIndicator:n=!1}){let a;return r&&!n&&(a=(0,p.jsx)(y.A,{width:14,height:14})),(0,p.jsx)(h.SpinnerButton,{className:"googlesitekit-notice__cta",disabled:t,isSaving:i,onClick:s,href:o,target:r?"_blank":void 0,trailingIcon:a,children:e})}CTAButton.propTypes={label:r().string.isRequired,disabled:r().bool,inProgress:r().bool,onClick:r().func,href:r().string,external:r().bool,hideExternalIndicator:r().bool};var f=i(82871);function DismissButton({label:e=(0,f.__)("Got it","google-site-kit"),onClick:t,disabled:i}){return(0,p.jsx)(h.Button,{onClick:t,disabled:i,tertiary:!0,children:e})}DismissButton.propTypes={label:r().string,onClick:r().func.isRequired,disabled:r().bool};const I=(0,l.forwardRef)(({className:e,title:t,description:i,dismissButton:s,ctaButton:o,type:r=u.Q.INFO,children:n,hideIcon:l},c)=>(0,p.jsxs)("div",{ref:c,className:a()("googlesitekit-notice",`googlesitekit-notice--${r}`,e),children:[!l&&(0,p.jsx)("div",{className:"googlesitekit-notice__icon",children:(0,p.jsx)(Icon,{type:r})}),(0,p.jsxs)("div",{className:"googlesitekit-notice__content",children:[t&&(0,p.jsx)(Title,{children:t}),i&&(0,p.jsx)(Description,{children:i})]}),(s?.label||s?.onClick||o?.label&&(o?.onClick||o?.href)||n)&&(0,p.jsxs)("div",{className:"googlesitekit-notice__action",children:[n,(s?.label||s?.onClick)&&(0,p.jsx)(DismissButton,{label:s.label,onClick:s.onClick,disabled:s.disabled}),o?.label&&(o?.onClick||o?.href)&&(0,p.jsx)(CTAButton,{label:o.label,onClick:o.onClick,inProgress:o.inProgress,disabled:o.disabled,href:o.href,external:o.external,hideExternalIndicator:o.hideExternalIndicator})]})]}));I.TYPES=u.Q,I.propTypes={className:r().string,title:r().oneOfType([r().string,r().object]),description:r().node,type:r().oneOf(Object.values(u.Q)),dismissButton:r().shape(DismissButton.propTypes),ctaButton:r().shape({...CTAButton.propTypes,label:r().string}),children:r().node,hideIcon:r().bool};const b=I},80452:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,o=i(63696);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},r.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>o.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0
(0,l.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:(0,d.jsx)(c.A,{href:t,external:s},"link")})})}SourceLink.propTypes={name:o().string,href:o().string,className:o().string,external:o().bool},SourceLink.defaultProps={name:"",href:"",className:"",external:!1};const u=SourceLink},91865:(e,t,i)=>{"use strict";i.d(t,{A:()=>DataBlockGroup});var s=i(31589),o=i(15844),r=i(63696),n=i(50787),a=i(62540);function DataBlockGroup({className:e,children:t}){const l=(0,r.useRef)();function c(e,t){e.forEach(e=>{const i=e?.querySelector(".googlesitekit-data-block__datapoint");i&&(i.style.fontSize=t)})}const g=(0,n.d)(function(){const e=l?.current?.querySelectorAll(".googlesitekit-data-block");if(!e?.length)return;let t=1;if(c(e,""),e.forEach(e=>{const i=e.querySelector(".googlesitekit-data-block__datapoint");if(!i)return;const s=i?.parentElement?.offsetWidth;if(i.scrollWidth>s){const e=s/i.scrollWidth,o=Math.floor(10*e)/10;o<t&&(t=o)}}),t<1&&t>0){const s=parseInt(i.g?.getComputedStyle(e[0].querySelector(".googlesitekit-data-block__datapoint"))?.fontSize,10),o=Math.floor(s*t);c(e,`${Math.max(o,14)}px`)}},50);return(0,s.A)("resize",g),(0,o.A)(()=>{g()}),(0,a.jsx)("div",{ref:l,className:e,children:t})}},92473:(e,t,i)=>{"use strict";i.d(t,{A:()=>MetricTileHeader});var s=i(62688),o=i.n(s),r=i(10953),n=i(16834),a=i(15167),l=i(62540);function MetricTileHeader({title:e,infoTooltip:t,loading:i}){return(0,l.jsxs)("div",{className:"googlesitekit-km-widget-tile__title-container",children:[(0,l.jsx)(a.A,{as:"h3",size:"small",type:"label",className:"googlesitekit-km-widget-tile__title",children:e}),i?(0,l.jsx)(n.A,{children:(0,l.jsx)(r.A,{title:t})}):(0,l.jsx)(r.A,{title:t})]})}MetricTileHeader.propTypes={title:o().string,infoTooltip:o().oneOfType([o().string,o().element]),loading:o().bool}},92698:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var s=i(63696),o=i(50539),r=i(93896),n=i(58116),a=i(37226),l=i(45472),c=i(21134),g=i(89318),d=i(77766);function u(e){const t=(0,d.A)(),i=(0,o.useSelect)(t=>t(a.i).getModule(e)),u=(0,o.useSelect)(e=>e(n.oR).hasCapability(n.HD)),{activateModule:p}=(0,o.useDispatch)(a.i),{navigateTo:m}=(0,o.useDispatch)(l.M),{setInternalServerError:h}=(0,o.useDispatch)(r.O4),y=(0,s.useCallback)(async()=>{const{error:i,response:s}=await p(e);i?h({id:`${e}-setup-error`,description:i.message}):(await(0,g.sx)(`${t}_widget-activation-cta`,"activate_module",e),await(0,c.SO)("module_setup",e,{ttl:300}),m(s.moduleReauthURL))},[p,e,m,h,t]);return i?.name&&u?y:null}},93896:(e,t,i)=>{"use strict";i.d(t,{O4:()=>s,OQ:()=>r,qc:()=>o});const s="core/site",o="primary",r="secondary"},94468:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var s=i(63696),o=i(50539),r=i(58116),n=i(37226),a=i(45472);function l(e){const t=(0,o.useSelect)(e=>e(r.oR).hasCapability(r.HD)),i=(0,o.useSelect)(t=>t(n.i).getModuleStoreName(e)),l=(0,o.useSelect)(e=>e(i)?.getAdminReauthURL()),{navigateTo:c}=(0,o.useDispatch)(a.M),g=(0,s.useCallback)(()=>c(l),[l,c]);return l&&t?g:null}},94552:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(62540);function ChangeArrow({direction:e,invertColor:t,width:i,height:s}){return(0,a.jsx)("svg",{className:n()("googlesitekit-change-arrow",`googlesitekit-change-arrow--${e}`,{"googlesitekit-change-arrow--inverted-color":t}),width:i,height:s,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"})})}ChangeArrow.propTypes={direction:o().string,invertColor:o().bool,width:o().number,height:o().number},ChangeArrow.defaultProps={direction:"up",invertColor:!1,width:9,height:9};const l=ChangeArrow},96820:(e,t,i)=>{"use strict";i.d(t,{A:()=>g,v:()=>c});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(82871),l=i(62540);const c={DEFAULT:"default",OVERLAY:"overlay",SMALL:"small",SMALL_OVERLAY:"small-overlay",LARGE:"large"};function GatheringDataNotice({style:e}){return(0,l.jsx)("div",{className:n()("googlesitekit-gathering-data-notice",{[`googlesitekit-gathe