kollapsminoriteten/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-adminbar-7cf0...

40 lines
110 KiB
JavaScript
Raw Normal View History

2026-03-31 11:30:59 +02:00
"use strict";(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[182],{80:(e,t,i)=>{i.d(t,{CV:()=>S,Cu:()=>j,K9:()=>n,Kr:()=>h,Lf:()=>p,Oh:()=>s,PW:()=>A,Rx:()=>C,S9:()=>y,TQ:()=>d,Vt:()=>T,Wl:()=>N,ZC:()=>o,ZY:()=>a,_p:()=>w,ag:()=>m,aj:()=>u,bz:()=>_,dq:()=>D,f2:()=>c,fB:()=>M,fV:()=>x,iB:()=>g,kc:()=>l,mo:()=>I,nc:()=>v,rm:()=>b,to:()=>r,wo:()=>f,yn:()=>k});const n="modules/analytics-4",o="account_create",r="property_create",s="webdatastream_create",a="analyticsSetup",l=10,c=0,g="https://www.googleapis.com/auth/tagmanager.readonly",d="enhanced-measurement-form",u="enhanced-measurement-enabled",p="enhanced-measurement-should-dismiss-activation-banner",m="analyticsAccountCreate",h="analyticsCustomDimensionsCreate",y="https://www.googleapis.com/auth/analytics.edit",f="dashboardAllTrafficWidgetDimensionName",I="dashboardAllTrafficWidgetDimensionColor",k="dashboardAllTrafficWidgetDimensionValue",N="dashboardAllTrafficWidgetActiveRowIndex",b="dashboardAllTrafficWidgetLoaded",j={googlesitekit_post_date:{parameterName:"googlesitekit_post_date",displayName:"WordPress Post Date",description:"Created by Site Kit: Date when a post was published",scope:"EVENT"},googlesitekit_post_author:{parameterName:"googlesitekit_post_author",displayName:"WordPress Post Author",description:"Created by Site Kit: WordPress name of the post author",scope:"EVENT"},googlesitekit_post_categories:{parameterName:"googlesitekit_post_categories",displayName:"WordPress Post Categories",description:"Created by Site Kit: Names of categories assigned to a post",scope:"EVENT"},googlesitekit_post_type:{parameterName:"googlesitekit_post_type",displayName:"WordPress Post Type",description:"Created by Site Kit: Content type of a post",scope:"EVENT"}},v={ADD_TO_CART:"add_to_cart",PURCHASE:"purchase",SUBMIT_LEAD_FORM:"submit_lead_form",GENERATE_LEAD:"generate_lead",CONTACT:"contact"},x=[v.CONTACT,v.GENERATE_LEAD,v.SUBMIT_LEAD_FORM],M={"new-visitors":{description:"People who visited the site for the first time",displayName:"New visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"new"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:new_visitors"}}}}]}}]}}}}]},"returning-visitors":{description:"People who have visited your site at least once before",displayName:"Returning visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"returning"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:returning_visitors"}}}}]}}]}}}}]}},A="audiencePermissionsSetup",S="audienceTileCustomDimensionCreate",_="audience-selection-panel-expirable-new-badge-",D="audience",T="customDimension",w="property",C=[D,T,w]},1641:(e,t,i)=>{i.d(t,{A:()=>ReportErrorActions});var n=i(62688),o=i.n(n),r=i(63696),s=i(13606),a=i(82871),l=i(50539),c=i(49383),g=i(29785),d=i(88273),u=i(13137),p=i(4124),m=i(38432),h=i(62540);function ReportErrorActions(e){const{moduleSlug:t,error:i,GetHelpLink:n,hideGetHelpLink:o,buttonVariant:y,onRetry:f,onRequestAccess:I,getHelpClassName:k,RequestAccessButton:N,RetryButton:b}=e,j=(0,p.A)(),v=(0,l.useSelect)(e=>e(d.i).getModuleStoreName(t)),x=(0,l.useSelect)(e=>"function"==typeof e(v)?.getServiceEntityAccessURL?e(v).getServiceEntityAccessURL():null),M=Array.isArray(i)?i:[i],A=(0,l.useSelect)(e=>M.map(t=>{const i=e(v)?.getSelectorDataForError(t);return{...t,selectorData:i}})),S=A?.filter(e=>(0,u.vl)(e,e.selectorData)&&"getRepor
(0,r.__)("%s Gathering Data","google-site-kit"),t?.name),description:(0,r.sprintf)(/* translators: %s: Module name */ /* translators: %s: Module name */
(0,r.__)("%s data is not yet available, please check back later","google-site-kit"),t?.name)})}ReportZero.propTypes={moduleSlug:o().string.isRequired}},16312:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(17243);function o(e,t){return(0,n.sumBy)(e,t)||0}},19793:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n,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 n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}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),n||(n=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"})))},19826:(e,t,i)=>{i.d(t,{Ay:()=>s,Kq:()=>r});const n=(0,i(63696).createContext)(""),{Consumer:o,Provider:r}=n,s=n},20697:(e,t,i)=>{i.d(t,{Ax:()=>r,CZ:()=>g,Ej:()=>v,Gw:()=>x,Is:()=>s,KK:()=>u,Nn:()=>A,OT:()=>b,SH:()=>N,Y$:()=>p,ZS:()=>a,bg:()=>y,en:()=>j,ep:()=>h,f7:()=>o,hi:()=>m,jU:()=>n,k$:()=>I,kz:()=>M,ly:()=>l,mo:()=>f,s3:()=>k,uR:()=>c,zx:()=>d});const n="mainDashboard",o="entityDashboard",r="mainDashboardViewOnly",s="entityDashboardViewOnly",a="userInput",l="activation",c="splash",g="adminBar",d="adminBarViewOnly",u="settings",p="adBlockingRecovery",m="wpDashboard",h="wpDashboardViewOnly",y="moduleSetup",f="metricSelection",I="wpBlockEditor",k="keyMetricsSetup",N="key-metrics",b="traffic",j="content",v="speed",x="monetization",M=[n,o,r,s,a,c,u,y,f],A=[r,s,d,h]},20762:(e,t,i)=>{i.d(t,{Ay:()=>s});var n=i(52735);const{Consumer:o,Provider:r}=n.A,s=r},21213:(e,t,i)=>{i.d(t,{c1:()=>k,V8:()=>j,WP:()=>b});var n=i(50532),o=i.n(n),r=i(73963),s=i(62688),a=i.n(s),l=i(63696),c=i(96820),g=i(15118),d=i(62540);function WidgetReportZero({widgetSlug:e,moduleSlug:t,...i}){const n=(0,l.useMemo)(()=>({moduleSlug:t}),[t]);return(0,c.A)(e,g.A,n),(0,d.jsx)(g.A,{moduleSlug:t,...i})}WidgetReportZero.propTypes={widgetSlug:a().string.isRequired,...g.A.propTypes};var u=i(44192);function WidgetReportError({widgetSlug:e,...t}){return(0,d.jsx)(u.A,{...t})}WidgetReportError.propTypes={widgetSlug:a().string.isRequired,...u.A.propTypes};var p=i(79754),m=i(79266),h=i(17064),y=i(52684),f=i(50539),I=i(7972);function WPDashboardReportError({moduleSlug:e,error:t}){const i=(0,y.A)(WPDashboardReportError,"WPDashboardReportError"),{setValue:n}=(0,f.useDispatch)(I.n),o=t.message,r=(0,f.useSelect)(t=>t(I.n).getValue(`WPDashboardReportError-${e}-${o}`));return(0,h.A)(()=>{n(`WPDashboardReportError-${e}-${o}`,i)},()=>{n(`WPDashboardReportError-${e}-${o}`,void 0)}),r!==i?null:(0,d.jsx)(u.A,{moduleSlug:e,error:t})}WPDashboardReportError.propTypes={moduleSlug:a().string.isRequired,error:a().object.isRequired};const k=o()(e=>({widgetSlug:e,Widget:N(e)(r.A),WidgetRecoverableModules:N(e)(m.A),WidgetReportZero:N(e)(WidgetReportZero),WidgetReportError:N(e)(WidgetReportError),WidgetNull:N(e)(p.A)}));function N(e){return t=>{const i=(0,l.forwardRef)((i,n)=>(0,d.jsx)(t,{...i,ref:n,widgetSlug:e}));return i.displayName="WithWidgetSlug",(t.displayName||t.name)&&(i.displayName+=`(${t.displayName||t.name})`),i}}function b(e){const t=k(e);return e=>{function DecoratedComponent(i){return(0,d.jsx)(e,{...i,...t})}return DecoratedComponent.displayName="WithWidgetComponentProps",(e.displayName||e.name)&&(DecoratedComponent.displayName+=`(${e.displayName||e.name})`),DecoratedComponent}}function j(e){return t=>{function DecoratedComponent(i){return(0,d.jsx)(t,{...i,WPDashboardReportError:N(e)(WPDashboardReportError)})}return DecoratedComponent.displayName="WithWPDashboardWidgetComponentProps",(t.displayName||t.name)&&(DecoratedComponent.displayName+=`(${t.displayName||t.name})`),DecoratedComponent}}},22942:(e,t,i)=>{i.d(t,{A_:()=>g,DF:()=>u,L1:()=>p,M0:()=>s,Mc:()
(0,n.__)("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"),s)),a&&a.login&&(c=(0,n.sprintf)(/* translators: %s: owner name */ /* translators: %s: owner name */
(0,n.__)('This service was originally connected by the administrator "%s" — you can contact them for more information.',"google-site-kit"),a.login)),c||(c=(0,n.__)("This service was originally connected by an administrator — you can contact them for more information.","google-site-kit")),`${l} ${c}`}},32803:(e,t,i)=>{i.d(t,{Y:()=>n});const n="search-console"},33052:(e,t,i)=>{i.d(t,{A:()=>Typography});var n=i(62688),o=i.n(n),r=i(4452),s=i.n(r),a=i(8513),l=i(62540);function Typography({className:e,type:t,size:i,as:n="span",children:o,...r}){return(0,l.jsx)(n,{className:s()("googlesitekit-typography",e,{[`googlesitekit-typography--${t}`]:t&&a.tT.includes(t),[`googlesitekit-typography--${i}`]:i&&a.oJ.includes(i)}),...r,children:o})}Typography.propTypes={className:o().string,type:o().oneOf(a.tT),size:o().oneOf(a.oJ),as:o().oneOfType([o().string,o().elementType])}},37316:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n,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 n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>o.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 53"},e),n||(n=o.createElement("g",{fill:"none",fillRule:"evenodd"},o.createElement("path",{fill:"#F9AB00",d:"M48 46.376a6.63 6.63 0 0 1-2.18 4.952 6.47 6.47 0 0 1-5.11 1.625c-3.339-.495-5.789-3.433-5.708-6.848V6.891C34.925 3.475 37.379.537 40.72.045a6.47 6.47 0 0 1 5.102 1.631A6.63 6.63 0 0 1 48 6.622z"}),o.createElement("path",{fill:"#E37400",fillRule:"nonzero",d:"M6.5 40.002a6.5 6.5 0 0 1 4.594 1.901 6.5 6.5 0 0 1 1.906 4.6 6.5 6.5 0 0 1-1.906 4.596A6.5 6.5 0 0 1 6.5 53a6.5 6.5 0 0 1-4.594-1.9A6.5 6.5 0 0 1 0 46.501a6.5 6.5 0 0 1 1.905-4.6A6.5 6.5 0 0 1 6.5 40zM24.348 20.002c-3.62.197-6.429 3.256-6.346 6.908v17.644c0 4.79 2.092 7.696 5.16 8.314a6.5 6.5 0 0 0 5.442-1.358A6.61 6.61 0 0 0 31 46.4V26.605a6.62 6.62 0 0 0-1.912-4.668A6.52 6.52 0 0 0 24.459 20z"}))))},38017:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(62688),o=i.n(n),r=i(4452),s=i.n(r),a=i(62540);function ChangeArrow({direction:e,invertColor:t,width:i,height:n}){return(0,a.jsx)("svg",{className:s()("googlesitekit-change-arrow",`googlesitekit-change-arrow--${e}`,{"googlesitekit-change-arrow--inverted-color":t}),width:i,height:n,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},38432:(e,t,i)=>{i.d(t,{A:()=>_});var n,o=i(4452),r=i.n(o),s=i(62688),a=i.n(s),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 n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}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),n||(n=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 n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}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
(0,c.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:h.createElement(g.A,{key:"link",href:t,external:n,onClick:f})}))}SourceLink.propTypes={name:o().string,href:o().string,className:o().string,external:o().bool};const y=SourceLink},44192:(e,t,i)=>{i.d(t,{A:()=>ReportError});var n=i(62688),o=i.n(n),r=i(17243),s=i(63696),a=i(82871),l=i(81375),c=i(50539),g=i(88273),d=i(13137),u=i(31012),p=i(55465),m=i(12317),h=i(1641),y=i(4124),f=i(73198),I=i(62540);function ReportError({moduleSlug:e,error:t}){const i=(0,y.A)(),n=(0,c.useSelect)(t=>t(g.i).getModule(e)),o=Array.isArray(t)?t:[t];let k;function N(e){return(0,d.SG)(e)?i?(k=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
(0,a.__)("Access lost to %s","google-site-kit"),n?.name),(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
(0,a.__)("The administrator sharing this module with you has lost access to the %s service, so you wont be able to see stats from it on the Site Kit dashboard. You can contact them or another administrator to restore access.","google-site-kit"),n?.name)):(k=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
(0,a.__)("Insufficient permissions in %s","google-site-kit"),n?.name),(0,u.c)(e.message,n)):(0,d.e4)(e)}const b=(0,r.uniqWith)(o.map(e=>({...e,message:N(e),reconnectURL:e.data?.reconnectURL?(0,l.m)(e.data.reconnectURL,"code"):void 0})),(e,t)=>e.message===t.message&&e.reconnectURL===t.reconnectURL),j=o.some(e=>(0,d.SG)(e));j||1!==b.length?!j&&b.length>1&&(k=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
(0,a.__)("Data errors in %s","google-site-kit"),n?.name)):k=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
(0,a.__)("Data error in %s","google-site-kit"),n?.name);const v=(0,I.jsx)(s.Fragment,{children:b.map(e=>{const t=e?.data?.reconnectURL;return t?(0,I.jsx)(f.A,{error:e,message:e.message},e.message):(0,I.jsx)("p",{children:p.O.sanitize(e.message,{ALLOWED_TAGS:[]})},e.message)})});return(0,I.jsx)(m.A,{title:k,description:v,error:!0,children:(0,I.jsx)(h.A,{moduleSlug:e,error:t})})}ReportError.propTypes={moduleSlug:o().string.isRequired,error:o().oneOfType([o().arrayOf(o().object),o().object]).isRequired}},48276:(e,t,i)=>{i.d(t,{VZ:()=>r,dc:()=>s,pH:()=>o,r0:()=>a});var n=i(84024);function o(e){try{return new URL(e).pathname}catch{}return null}function r(e,t){try{return new URL(t,e).href}catch{}return("string"==typeof e?e:"")+("string"==typeof t?t:"")}function s(e){return"string"!=typeof e?e:e.replace(/^https?:\/\/(www\.)?/i,"").replace(/\/$/,"")}function a(e,t){if(!(0,n.m)(e))return e;if(e.length<=t)return e;const i=new URL(e),o=e.replace(i.origin,"");if(o.length<t)return o;const r=o.length-Math.floor(t)+1;return"…"+o.substr(r)}},49383:e=>{e.exports=googlesitekit.components},49481:(e,t,i)=>{i.d(t,{f:()=>o,n:()=>n});const n="modules/search-console",o=0},49746:(e,t,i)=>{i.d(t,{Eo:()=>d,JK:()=>h,K5:()=>m,jq:()=>p,mK:()=>g});var n=i(17243),o=i(50532),r=i.n(o),s=i(82871);function a(e,t={}){const{formatUnit:i,formatDecimal:n}=function(e,t={}){const{hours:i,minutes:n,seconds:o}=l(e);return{hours:i,minutes:n,seconds:o,formatUnit(){const{unitDisplay:r="short",...a}=t,l={unitDisplay:r,...a,style:"unit"};return 0===e?p(o,{...l,unit:"second"}):(0,s.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
(0,s._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?p(o,{...l,unit:"second"}):"",n?p(n,{...l,unit:"minute"}):"",i?p(i,{...l,unit:"hour"}):"").trim()},formatDecimal(){const t=(0,s.sprintf)(
// translators: %s: number of seconds with "s" as the abbreviated unit.
// translators: %s: number of seconds with "s" as the abbreviated unit.
(0,s.__)("%ds","google-site-kit"),o);if(0===e)return t;const r=(0,s.sprintf)(
// translators: %s: number of minutes with "m" as the abbreviated unit.
// translators: %s: number of minutes with "m" as the abbreviated unit.
(0,s.__)("%dm","google-site-kit"),n),a=(0,s.sprintf)(
// translators: %s: number of hours with "h" as the abbreviated unit.
// translators: %s: number of hours with "h" as the abbreviated unit.
(0,s.__)("%dh","google-site-kit"),i);return(0,s.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
(0,s._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?t:"",n?r:"",i?a:"").trim()}}}(e,t);try{return i()}catch{return n()}}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,n.isPlainObject)(e)&&(t={...e}),t}function d(e,t={}){e=(0,n.isFinite)(e)?e:Number(e),(0,n.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,s.sprintf)(
// translators: %s: an abbreviated number in millions.
// translators: %s: an abbreviated number in millions.
(0,s.__)("%sM","google-site-kit"),p(c(e),e%10==0?{}:t)):1e4<=e?(0,s.sprintf)(
// translators: %s: an abbreviated number in thousands.
// translators: %s: an abbreviated number in thousands.
(0,s.__)("%sK","google-site-kit"),p(c(e))):1e3<=e?(0,s.sprintf)(
// translators: %s: an abbreviated number in thousands.
// translators: %s: an abbreviated number in thousands.
(0,s.__)("%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:n}=l(e);return n=("0"+n).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${n}`:`${t}:${i}:${n}`}(e):p(e,i)}const u=r()(console.warn);function p(e,t={}){const{locale:i=h(),...n}=t;try{return new Intl.NumberFormat(i,n).format(e)}catch(t){u(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(n)} ).format( ${typeof e} )`,t.message)}const o={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},r=["signDisplay","compactDisplay"],s={};for(const[e,t]of Object.entries(n))o[e]&&t===o[e]||r.includes(e)||(s[e]=t);try{return new Intl.NumberFormat(i,s).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function m(e,t={}){const{locale:i=h(),style:n="long",type:o="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:n,type:o}).format(e)}
/* translators: used between list items, there is a space after the comma. */const r=(0,s.__)(", ","google-site-kit");return e.join(r)}function h(e=i.g){const t=(0,n.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}},49993:(e,t,i)=>{i.d(t,{Gq:()=>d,IL:()=>h,LD:()=>p,SO:()=>u,a2:()=>o,xD:()=>m});var n=i(13047);const o="googlesitekit_",r=`${o}1.175.0_${i.g._googlesitekitBaseData.storagePrefix}_`,s=["sessionStorage","localStorage"];let a,l=[...s];async function c(e){const t=i.g[e];if(!t)return!1;try{const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}}async function g(){if(void 0!==a)return a;for(const e of l)a||await c(e)&&(a=i.g[e]);return void 0===a&&(a=null),a}async function d(e){const t=await g();if(t){const i=t.getItem(`${r}${e}`);if(i){const e=JSON.parse(i),{timestamp:t,ttl:n,value:o,isError:r}=e;if(t&&(!n||Math.round(Date.now()/1e3)-t<n))return{cacheHit:!0,value:o,isError:r}}}return{cacheHit:!1,value:void 0}}async function u(e,t,{ttl:o=n.Jg,timestamp:s=Math.round(Date.now()/1e3),isError:a=!1}={}){const l=await g();if(l)try{return l.setItem(`${r}${e}`,JSON.stringify({timestamp:s,ttl:o,value:t,isError:a})),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function p(e){const t=await g();if(t)try{const i=e.startsWith(o)?e:`${r}${e}`;return t.removeItem(i),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function m(){const e=await g();if(e)try{const t=[];for(let i=0;i<e.length;i++){const n=e.key(i);0===n.indexOf(o)&&t.push(n)}return t}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),[]}return[]}async function h(){if(await g()){const e=await m();for(const t of e)await p(t);return!0}return!1}},50304:(e,t,i)=>{i.d(t,{A:()=>IconWrapper});var n=i(62688),o=i.n(n),r=i(62540);function IconWrapper({children:e,marginLeft:t,marginRight:i}){return(0,r.jsx)("span",{className:"googlesitekit-icon-wrapper",style:{marginLeft:t,marginRight:i},children:e})}IconWrapper.propTypes={children:o().node.isRequired,marginLeft:o().number,marginRight:o().number}},50477:(e,t,i)=>{i.d(t,{C:()=>r,p:()=>o});var n=i(55465);function o(e,t={}){return{__html:n.O.sanitize(e,t)}}function r(e){const t="object"==typeof e?e.toString():e;return t?.replace?.(/\/+$/,"")}},50539:e=>{e.exports=googlesitekit.data},51193:(e,t,i)=>{i.d(t,{Du:()=>p,GH:()=>l,Gp:()=>c,IS:()=>I,Jg:()=>d,N_:()=>N,O5:()=>k,Ql:()=>m,Qr:()=>h,XH:()=>f,r0:()=>g,sq:()=>y,tt:()=>u});var n=i(32091),o=i.n(n),r=i(17243),s=i(82871);const a="Date param must construct to a valid date instance or be a valid date instance itself.",l="Invalid dateString parameter, it must be a string.",c='Invalid date range, it must be a string with the format "last-x-days".',g=60,d=60*g,u=24*d,p=7*u;function m(){function e(e){return(0,s.sprintf)(/* translators: %s: number of days */ /* translators: %s: number of days */
(0,s._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 h(e=""){if(!(0,r.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,r.isDate)(t)&&!isNaN(t)}function y(e){o()((0,r.isDate)(e)&&!isNaN(e),a);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 f(e){o()(h(e),l);const[t,i,n]=e.split("-");return new Date(t,i-1,n)}function I(e,t){return y(N(e,t*u))}function k(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 N(e,t){o()(h(e)||(0,r.isDate)(e)&&!isNaN(e),l);const i=h(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}},52735:(e,t,i)=>{i.d(t,{A:()=>n});const n=(0,i(63696).createContext)(!1)},55465:(e,t,i)=>{i.d(t,{O:()=>o});var n=i(31234);const o=i.n(n)()(i.g)},59865:(e,t,i)=>{i.d(t,{A:()=>p});var n=i(62688),o=i.n(n),r=i(4452),s=i.n(r),a=i(52684),l=i(13606),c=i(82871),g=i(49383),d=i(85149),u=i(62540);function ModalDialog({className:e="",dialogActive:t=!1,handleCancel:i=null,onOpen:n=null,onClose:o=null,title:r=null,provides:p,handleConfirm:m,subtitle:h,confirmButton:y=null,notes:f=[],danger:I=!1,inProgress:k=!1,small:N=!1,medium:b=!1,buttonLink:j=null}){const v=`googlesitekit-dialog-description-${(0,a.A)(ModalDialog)}`,x=!(!p||!p.length);return(0,u.jsxs)(g.Dialog,{open:t,onOpen:n,onClose:o,"aria-describedby":x?v:void 0,tabIndex:"-1",className:s()(e,{"googlesitekit-dialog-sm":N,"googlesitekit-dialog-md":b}),children:[(0,u.jsxs)(g.DialogTitle,{children:[I&&(0,u.jsx)(d.A,{width:28,height:28}),r]}),h?(0,u.jsx)("p",{className:"mdc-dialog__lead",children:h}):[],(0,u.jsxs)(g.DialogContent,{children:[x&&(0,u.jsx)("section",{id:v,className:"mdc-dialog__provides",children:(0,u.jsx)("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive",children:p.map(e=>(0,u.jsx)("li",{className:"mdc-list-item",children:(0,u.jsx)("span",{className:"mdc-list-item__text",children:e})},e))})}),f.length>0&&(0,u.jsx)("section",{className:"mdc-dialog__notes",children:f.map((e,t)=>(0,u.jsxs)("p",{className:"mdc-dialog__note",children:["string"==typeof e&&(0,l.A)((0,c.sprintf)(/* translators: %s is replaced with some sub-note text. */ /* translators: %s is replaced with some sub-note text. */
(0,c.__)("<strong>Note:</strong> %s","google-site-kit"),e),{strong:(0,u.jsx)("strong",{})}),"function"==typeof e&&(0,u.jsx)(e,{})]},`note-${t}`))})]}),(0,u.jsxs)(g.DialogFooter,{children:[(0,u.jsx)(g.Button,{className:"mdc-dialog__cancel-button",onClick:i,disabled:k,tertiary:!0,children:(0,c.__)("Cancel","google-site-kit")}),j?(0,u.jsx)(g.Button,{href:j,onClick:m,target:"_blank",danger:I,children:y}):(0,u.jsx)(g.SpinnerButton,{onClick:m,danger:I,disabled:k,isSaving:k,children:y||(0,c.__)("Disconnect","google-site-kit")})]})]})}ModalDialog.displayName="Dialog",ModalDialog.propTypes={className:o().string,dialogActive:o().bool,handleDialog:o().func,handleConfirm:o().func.isRequired,onOpen:o().func,onClose:o().func,title:o().string,provides:o().arrayOf(o().string),confirmButton:o().string,notes:o().arrayOf(o().oneOfType([o().string,o().elementType])),danger:o().bool,small:o().bool,medium:o().bool,buttonLink:o().string};const p=ModalDialog},61983:(e,t,i)=>{i.d(t,{A:()=>DismissButton});var n=i(62688),o=i.n(n),r=i(82871),s=i(49383),a=i(62540);function DismissButton({className:e,label:t=(0,r.__)("Maybe later","google-site-kit"),onClick:i,disabled:n,tertiary:o=!0}){return i?(0,a.jsx)(s.Button,{className:e,onClick:i,disabled:n,tertiary:o,children:t}):null}DismissButton.propTypes={className:o().string,label:o().string,onClick:o().func,disabled:o().bool,tertiary:o().bool,dismissOptions:o().shape({expiresInSeconds:o().number,skipHidingFromQueue:o().bool})}},62659:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=i(63696),o=i(19826);const __WEBPACK_DEFAULT_EXPORT__=function(){return(0,n.useContext)(o.Ay)}},63081:(e,t,i)=>{i.d(t,{A:()=>Root});var n=i(62688),o=i.n(n),r=i(44010),s=i(77105),a=i(63696),l=i(50539),c=i.n(l),g=i(82871),d=i(6730),u=i(19826),p=i(67510),m=i(13047),h=i(62540);class ErrorHandler extends a.Component{constructor(e){super(e),this.state={error:null,info:null,copied:!1}}componentDidCatch(e,t){i.g.console.error("Caught an error:",e,t),this.setState({error:e,info:t}),(0,m.sx)("react_error",`handle_${this.context||"unknown"}_error`,`${e?.message}\n${t?.componentStack}`.slice(0,500))}render(){const{children:e}=this.props,{error:t,info:i}=this.state;return t?(0,h.jsx)(p.A,{notificationID:"googlesitekit-error",className:"googlesitekit-error-handler",type:"error",title:(0,g.__)("Site Kit encountered an error","google-site-kit"),description:(0,h.jsxs)(a.Fragment,{children:[(0,h.jsx)(d.A,{message:t.message,componentStack:i.componentStack}),(0,h.jsxs)("pre",{className:"googlesitekit-overflow-auto",children:[t.message,i.componentStack]})]})}):e}}ErrorHandler.contextType=u.Ay,ErrorHandler.propTypes={children:o().node.isRequired};const y=ErrorHandler;var f=i(79961);const{Consumer:I,Provider:k}=f.A,N=k;var b=i(84895),j=i(82246),v=i(11999),x=i(70301),M=i(97345),A=i(78990),S=i(94656);const _=function AuthenticatedPermissionsModal(){const e=(0,l.useRegistry)(),t=(0,l.useSelect)(e=>e(M.oR).getPermissionScopeError()),n=(0,l.useSelect)(e=>e(M.oR).getUnsatisfiedScopes()),o=(0,l.useSelect)(e=>e(M.oR).getConnectURL({additionalScopes:t?.data?.scopes,redirectURL:t?.data?.redirectURL||i.g.location.href,errorRedirectURL:t?.data?.errorRedirectURL})),{clearPermissionScopeError:r}=(0,l.useDispatch)(M.oR),{navigateTo:s}=(0,l.useDispatch)(x.M),{setValues:c}=(0,l.useDispatch)(v.s),d=(0,a.useCallback)(()=>{r()},[r]),u=(0,a.useCallback)(async()=>{c(M.$8,{permissionsError:t}),await(0,A.mR)(e),s(o)},[e,o,s,t,c]);return(0,a.useEffect)(()=>{!async function(){t?.data?.skipModal&&t?.data?.scopes?.length&&await u()}()},[u,t]),t?t?.data?.scopes?.length?t?.data?.skipModal||n&&t?.data?.scopes.every(e=>n.includes(e))?null:(0,h.jsx)(S.A,{children:(0,h.jsx)(j.A,{title:(0,g.__)("Additional Permissions Required","google-site-kit"),subtitle:t.message,confirmButton:(0,g.__)("Proceed","google-site-kit"),handleConfirm:u,handleCancel:d,onClose:d,dialogActive:!0,medium:!0})}):(i.g.console.warn("permissionsError lacks scopes array to use for redirect, so not showing the PermissionsModal. permissionsError was:",t),null):null};const D=function PermissionsModal(){retur
(0,s.__)("%s (Please try again.)","google-site-kit"),N)),p||(N=(0,s.sprintf)(/* translators: $%s: Error message */ /* translators: $%s: Error message */
(0,s.__)("Error: %s","google-site-kit"),N));const b=t?.data?.reconnectURL;b&&(0,a.m)(b)&&(N=(0,s.sprintf)(/* translators: 1: Original error message 2: Reconnect URL */ /* translators: 1: Original error message 2: Reconnect URL */
(0,s.__)('%1$s To fix this, <a href="%2$s">redo the plugin setup</a>.',"google-site-kit"),N,b));return(0,u.jsx)(g.A,{className:e,type:g.A.TYPES.ERROR,description:(0,u.jsx)("span",{dangerouslySetInnerHTML:(0,d.p9)(N,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}),ctaButton:k?{label:(0,s.__)("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}},73963:(e,t,i)=>{i.d(t,{A:()=>g});var n=i(4452),o=i.n(n),r=i(62688),s=i.n(r),a=i(63696),l=i(62540);const c=(0,a.forwardRef)(({children:e,className:t,widgetSlug:i,noPadding:n,Header:r,Footer:s},a)=>(0,l.jsxs)("div",{className:o()("googlesitekit-widget",`googlesitekit-widget--${i}`,{"googlesitekit-widget--no-padding":n},{"googlesitekit-widget--with-header":r},t),ref:a,children:[r&&(0,l.jsx)("div",{className:"googlesitekit-widget__header",children:(0,l.jsx)(r,{})}),(0,l.jsx)("div",{className:"googlesitekit-widget__body",children:e}),s&&(0,l.jsx)("div",{className:"googlesitekit-widget__footer",children:(0,l.jsx)(s,{})})]}));c.defaultProps={children:void 0,noPadding:!1},c.propTypes={children:s().node,widgetSlug:s().string.isRequired,noPadding:s().bool,Header:s().elementType,Footer:s().elementType};const g=c},75110:(e,t,i)=>{i.d(t,{A:()=>PreviewGraph});var n,o=i(62688),r=i.n(o),s=i(63696);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}const l=e=>s.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 6"},e),n||(n=s.createElement("path",{fill:"currentColor",d:"m0 3.01.443.387 1.755-1.534v3.344h.628V1.863L4.578 3.4l.446-.39L2.512.811z"})));var c=i(33052),g=i(62540);function PreviewGraph({title:e,GraphSVG:t,showIcons:i}){return(0,g.jsxs)("div",{className:"googlesitekit-analytics-cta__preview-graph",children:[(0,g.jsx)(c.A,{as:"h3",size:"small",type:"body",className:"googlesitekit-analytics-cta__preview-graph--title",children:e}),(0,g.jsx)("div",{children:(0,g.jsx)(t,{})}),i&&(0,g.jsxs)("div",{className:"googlesitekit-analytics-cta__preview-graph--icons",children:[(0,g.jsx)(l,{className:"googlesitekit-analytics-cta__preview-graph--up-arrow"}),(0,g.jsx)("span",{className:"googlesitekit-analytics-cta__preview-graph--bar"})]})]})}PreviewGraph.propTypes={title:r().string.isRequired,GraphSVG:r().elementType.isRequired,showIcons:r().bool},PreviewGraph.defaultProps={showIcons:!0}},76984:(e,t,i)=>{i.d(t,{Q:()=>n});const n={NEW:"new",SUCCESS:"success",WARNING:"warning",INFO:"info",INFO_ALT:"info-alt",INFO_ALT_2:"info-alt-2",ERROR:"error"}},78990:(e,t,i)=>{i.d(t,{P9:()=>f,k:()=>m,mR:()=>y});var n=i(32091),o=i.n(n),r=i(17243),s=i(50539),a=i.n(s),l=i(49993),c=i(13047);const g="CREATE_SNAPSHOT",d="DELETE_SNAPSHOT",u="RESTORE_SNAPSHOT",p="SET_STATE_FROM_SNAPSHOT";function m(e,{keysToSnapshot:t}={}){o()(e,"storeName is required to create a snapshot store.");const i={},n={*deleteSnapshot(){return yield{payload:{},type:d}},*restoreSnapshot(e={}){const{clearAfterRestore:t=!0}=e,{cacheHit:i,value:n}=yield{payload:{},type:u};return i&&(yield{payload:{snapshot:n},type:p},t&&(yield{payload:{},type:d})),i},*createSnapshot(){return yield{payload:{},type:g}}},a={[d]:()=>(0,l.LD)(`datastore::cache::${e}`),[g]:(0,s.createRegistryControl)(i=>()=>{const n=i.stores[e].store.getState(),o=t?.length>0?(0,r.pick)(n,t):n;return(0,l.SO)(`datastore::cache::${e}`,o)}),[u]:()=>(0,l.Gq)(`datastore::cache::${e}`,c.Jg)};return{initialState:i,actions:n,controls:a,reducer:function(e=i,{type:n,payload:o}){if(n===p){const{snapshot:i}=o,{error:n,...r}=i;return t?.length>0?{...e,...r}:r}return e}}}function h(e=a()){return Object.values(e.stores).filter(e=>Object.keys(e.getActions()).includes("restoreSnapshot"))}function y(e=a()){return Promise.all(h(e).map(e=>e.getActions().createSnapshot()))}function f(e=a()){return Promise.all(h(e).map(e=
(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}},99680:(e,t,i)=>{var n=i(17243),o=i(131),r=i(78325),s=i(13047),a=i(63081),l=i(63696),c=i(82871),g=i(50539),d=i(38432),u=i(10740),p=i(29785),m=i(97345),h=i(63505),y=i(4751),f=i(13113),I=i(49481),k=i(16312),N=i(11193),b=i(62540);const j=function AdminBarImpressions({WidgetReportError:e}){const t=(0,g.useSelect)(e=>e(I.n).isGatheringData()),i=(0,g.useSelect)(e=>e(p.O4).getCurrentEntityURL()),{compareStartDate:n,endDate:o}=(0,g.useSelect)(e=>e(m.oR).getDateRangeDates({compare:!0,offsetDays:I.f})),r=(0,g.useSelect)(e=>e(m.oR).getDateRangeNumberOfDays()),a={startDate:n,endDate:o,dimensions:"date",url:i,reportID:"adminbar_admin-bar-impressions_component_reportArgs"},l=(0,g.useSelect)(e=>e(I.n).getReport(a)),d=(0,g.useSelect)(e=>e(I.n).hasFinishedResolution("getReport",[a])),u=(0,g.useSelect)(e=>e(I.n).getErrorForSelector("getReport",[a]));if(!d||void 0===t)return(0,b.jsx)(y.A,{width:"auto",height:"59px"});if(u)return(0,b.jsx)(e,{moduleSlug:"search-console",error:u});const{compareRange:j,currentRange:v}=(0,N.D)(l,{dateRangeLength:r}),x=(0,k.A)(v,"impressions"),M=(0,k.A)(j,"impressions"),A=(0,s.Zf)(M,x),S={gatheringData:t,gatheringDataNoticeStyle:f.v.SMALL};return(0,b.jsx)(h.A,{className:"overview-total-impressions",title:(0,c.__)("Total Impressions","google-site-kit"),datapoint:x,change:A,changeDataUnit:"%",...S})};const v=function AdminBarClicks({WidgetReportError:e}){const t=(0,g.useSelect)(e=>e(I.n).isGatheringData()),i=(0,g.useSelect)(e=>e(p.O4).getCurrentEntityURL()),{compareStartDate:n,endDate:o}=(0,g.useSelect)(e=>e(m.oR).getDateRangeDates({compare:!0,offsetDays:I.f})),r=(0,g.useSelect)(e=>e(m.oR).getDateRangeNumberOfDays()),a={startDate:n,endDate:o,dimensions:"date",url:i,reportID:"adminbar_admin-bar-clicks_component_reportArgs"},l=(0,g.useSelect)(e=>e(I.n).getReport(a)),d=(0,g.useSelect)(e=>e(I.n).hasFinishedResolution("getReport",[a])),u=(0,g.useSelect)(e=>e(I.n).getErrorForSelector("getReport",[a]));if(!d||void 0===t)return(0,b.jsx)(y.A,{width:"auto",height:"59px"});if(u)return(0,b.jsx)(e,{moduleSlug:"search-console",error:u});const{compareRange:j,currentRange:v}=(0,N.D)(l,{dateRangeLength:r}),x=(0,k.A)(v,"clicks"),M=(0,k.A)(j,"clicks"),A=(0,s.Zf)(M,x),S={gatheringData:t,gatheringDataNoticeStyle:f.v.SMALL};return(0,b.jsx)(h.A,{className:"overview-total-clicks",title:(0,c.__)("Total Clicks","google-site-kit"),datapoint:x,change:A,changeDataUnit:"%",...S})};var x=i(80);const M=function AdminBarUniqueVisitorsGA4({WidgetReportError:e}){const t=(0,g.useSelect)(e=>e(x.K9).isGatheringData()),i=(0,g.useSelect)(e=>e(p.O4).getCurrentEntityURL()),n={...(0,g.useSelect)(e=>e(m.oR).getDateRangeDates({compare:!0,offsetDays:x.f2})),metrics:[{name:"totalUsers"}],url:i,reportID:"adminbar_admin-bar-unique-visitors-ga4_component_reportArgs"},o=(0,g.useSelect)(e=>e(x.K9).getReport(n)),r=(0,g.useSelect)(e=>e(x.K9).hasFinishedResolution("getReport",[n])),a=(0,g.useSelect)(e=>e(x.K9).getErrorForSelector("getReport",[n]));if(!r||void 0===t)return(0,b.jsx)(y.A,{width:"auto",height:"59px"});if(a)return(0,b.jsx)(e,{moduleSlug:"analytics-4",error:a});const l=o?.totals?.[0]?.metricValues?.[0]?.value,d=o?.totals?.[1]?.metricValues?.[0]?.value,u={gatheringData:t,gatheringDataNoticeStyle:f.v.SMALL};return(0,b.jsx)(h.A,{className:"overview-total-users",title:(0,c.__)("Total Users","google-site-kit"),datapoint:l,change:(0,s.Zf)(d,l),changeDataUnit:"%",...u})};const A=function AdminBarSessionsGA4({WidgetReportError:e}){const t=(0,g.useSelect)(e=>e(x.K9).isGatheringData()),i=(0,g.useSelect)(e=>e(p.O4).getCurrentEntityURL()),n={...(0,g.useSelect)(e=>e(m.oR).getDateRangeDates({compare:!0,offsetDays:x.f2})),dimensions:[{name:"date"}],limit:10,metrics:[{name:"
(0,c._n)("over the last %s day","over the last %s days",o,"google-site-kit"),o)})]})]}),(0,b.jsx)(u.fh,{mdSize:8,lgSize:7,alignMiddle:!0,children:(0,b.jsx)(AdminBarWidgets,{})}),(0,b.jsx)(u.fh,{size:2,alignMiddle:!0,children:(0,b.jsx)(d.A,{className:"googlesitekit-adminbar__link",href:"#",onClick:r,children:(0,c.__)("More details","google-site-kit")})})]})}),(0,b.jsx)(d.A,{className:"googlesitekit-adminbar__link googlesitekit-adminbar__link--mobile",href:"#",onClick:r,children:(0,c.__)("More details","google-site-kit")})]}):null}var U=i(20697);const Z=(0,n.once)(()=>{const e=document.getElementById("js-googlesitekit-adminbar-modules");if(e){const{viewOnly:t}=e.dataset,i=t?U.zx:U.CZ;(0,r.render)((0,b.jsx)(a.A,{viewContext:i,children:(0,b.jsx)(AdminBarApp,{})}),e),(0,s.sx)(i,"view_urlsummary")}});(0,o.A)(()=>{const e=document.getElementById("wp-admin-bar-google-site-kit");e&&(e.addEventListener("mouseover",Z,{once:!0}),e.addEventListener("focusin",Z,{once:!0}))})}},e=>{e.O(0,[660],()=>{return t=99680,e(e.s=t);var t});e.O()}]);