40 lines
105 KiB
JavaScript
40 lines
105 KiB
JavaScript
|
|
"use strict";(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[182],{2362:(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)(({label:e,className:t,hasLeftSpacing:i=!1,...n},r)=>(0,l.jsx)("span",{ref:r,...n,className:o()("googlesitekit-badge",t,{"googlesitekit-badge--has-left-spacing":i}),children:e}));c.displayName="Badge",c.propTypes={label:s().string.isRequired,hasLeftSpacing:s().bool};const g=c},2522:(e,t,i)=>{i.d(t,{D:()=>r});var n=i(32091),o=i.n(n);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)}}},3714:(e,t,i)=>{i.d(t,{Kk:()=>r,SZ:()=>n,Yw:()=>s,oJ:()=>a,tT:()=>o});const n="body",o=[n,"display","headline","label","title"],r="small",s="medium",a=[r,s,"large"]},3782:(e,t,i)=>{i.d(t,{A:()=>CTAButton});var n=i(62688),o=i.n(n),r=i(49383),s=i(83366),a=i(62540);function CTAButton({label:e,ariaLabel:t,disabled:i,inProgress:n,onClick:o,href:l,external:c=!1,hideExternalIndicator:g=!1}){if(!e||!o&&!l)return null;let d;return c&&!g&&(d=(0,a.jsx)(s.A,{width:14,height:14})),(0,a.jsx)(r.SpinnerButton,{className:"googlesitekit-banner__cta","aria-label":t,disabled:i||n,isSaving:n,onClick:o,href:l,target:c?"_blank":void 0,trailingIcon:d,children:e})}CTAButton.propTypes={label:o().string,ariaLabel:o().string,disabled:o().bool,inProgress:o().bool,onClick:o().func,href:o().string,dismissOnClick:o().bool,dismissOptions:o().shape({expiresInSeconds:o().number,skipHidingFromQueue:o().bool})}},4445:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(62688),o=i.n(n),r=i(63696),s=i(81276),a=i(49383),l=i(8420),c=i(62540);let g=null;function RefocusableModalDialog({dialogActive:e=!1,refocusQuerySelector:t=null,...i}){const n=(0,r.useCallback)(()=>{setTimeout(()=>{const e=t?document.querySelector(t):g;e&&document.body.contains(e)&&e.focus(),t||(g=null)})},[t]),o=(0,s.A)(e);return(0,r.useEffect)(()=>(!0===o&&!1===e&&n(),()=>{n()}),[o,e,n]),(0,c.jsx)(l.A,{dialogActive:e,...i})}!function(){function e(e){const t=e.target.closest("button, a, input");t&&!t.classList.contains("mdc-dialog__cancel-button")&&(g=t)}void 0!==i.g&&i.g.document&&!i.g._googlesitekitModalFocusTrackerInitialized&&(i.g.document.addEventListener("mousedown",e),i.g.document.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key||e(t)}),i.g._googlesitekitModalFocusTrackerInitialized=!0)}(),RefocusableModalDialog.propTypes={dialogActive:o().bool,refocusQuerySelector:o().string,...a.Dialog.propTypes};const d=RefocusableModalDialog},4884:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(62688),o=i.n(n),r=i(4452),s=i.n(r),a=i(49383),l=i(20898),c=i(15167),g=i(62540);function CTA({title:e,headerText:t,headerContent:i,description:n,ctaLink:o,ctaLabel:r,ctaLinkExternal:d,ctaType:u,error:p,onClick:m,"aria-label":h,children:y}){return(0,g.jsxs)("div",{className:s()("googlesitekit-cta",{"googlesitekit-cta--error":p}),children:[(t||i)&&(0,g.jsxs)("div",{className:"googlesitekit-cta__header",children:[t&&(0,g.jsx)(c.A,{as:"h2",size:"small",type:"label",className:"googlesitekit-cta__header_text",children:t}),i]}),(0,g.jsxs)("div",{className:"googlesitekit-cta__body",children:[e&&(0,g.jsx)(c.A,{as:"h3",size:"small",type:"title",className:"googlesitekit-cta__title",children:e}),n&&"string"==typeof n&&(0,g.jsx)("p",{className:"googlesitekit-cta__description",children:n}),n&&"string"!=typeof n&&(0,g.jsx)("div",{className:"googlesitekit-cta__description",children:n}),r&&"button"===u&&(0,g.jsx)(a.Button,{"aria-label":h,href:o,onClick:m,children:r}),r&&"link"===u&&(0,g.jsx)(l.A,{href:o,onClick:m,"aria-label":h,external:d,hideExternalIndicator:d,arrow:!0,children:r}),y]})]})}CTA.propTypes={title:o().string.isRequired,headerText:o().string,description:o().oneOfType([o().string,o().node]),ctaLink:o().string,ctaLinkExternal:o().bool,ctaLabel:o().string,ctaType:o().string,"aria-label":o().string,error:o().bool,onClick:o().func,childre
|
|||
|
|
(0,c.__)("<strong>Note:</strong> %s","google-site-kit"),f),{strong:(0,u.jsx)("strong",{})})})]}),(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,confirmButton:o().string,danger:o().bool,small:o().bool,medium:o().bool,buttonLink:o().string};const p=ModalDialog},9652:(e,t,i)=>{i.d(t,{A:()=>RecoverableModules});var n=i(62688),o=i.n(n),r=i(82871),s=i(50539),a=i(37226),l=i(4884),c=i(62540);function RecoverableModules({moduleSlugs:e}){const t=(0,s.useSelect)(t=>{const i=t(a.i).getModules();if(void 0!==i)return e.map(e=>i[e].name)});if(void 0===t)return null;const i=1===t.length?(0,r.sprintf)(/* translators: %s: Module name */ /* translators: %s: Module name */
|
|||
|
|
(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}},11106:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(63696),o=i(65214);const r=(0,n.createContext)(o.t)},11345:(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(37226),d=i(67150),u=i(65311),p=i(15210),m=i(4884),h=i(35902),y=i(35323),f=i(77967),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 won’t 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 M=(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:M,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}},12701:(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(54312),u=i(61991),p=i(90007),m=i(12850),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(11106);const{Consumer:I,Provider:k}=f.A,N=k;var b=i(65214),j=i(4445),M=i(78340),v=i(45472),x=i(58116),A=i(64067),S=i(14007);const D=function AuthenticatedPermissionsModal(){const e=(0,l.useRegistry)(),t=(0,l.useSelect)(e=>e(x.oR).getPermissionScopeError()),n=(0,l.useSelect)(e=>e(x.oR).getUnsatisfiedScopes()),o=(0,l.useSelect)(e=>e(x.oR).getConnectURL({additionalScopes:t?.data?.scopes,redirectURL:t?.data?.redirectURL||i.g.location.href,errorRedirectURL:t?.data?.errorRedirectURL})),{clearPermissionScopeError:r}=(0,l.useDispatch)(x.oR),{navigateTo:s}=(0,l.useDispatch)(v.M),{setValues:c}=(0,l.useDispatch)(M.s),d=(0,a.useCallback)(()=>{r()},[r]),u=(0,a.useCallback)(async()=>{c(x.$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 T=function PermissionsModal(){return(0,l.useSelect)(e=>e(x.oR).isAuthenticated())?(0,h.jsx)(D,{}):null};const _=function RestoreSnapshots({children:e}){const t=(0,l.useRegistry)(),[i,n]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{i||(async()=>{await(0,A.P9)(t),n(!0)})()},[t,i]),i?e:null};var C=i(15844),w=i(77766),E=i(39771);function FeatureTours(){const e=(0,w.A)(),{triggerTourForView:t}=(0,l.useDispatch)(x.oR);(0,C.A)(()=>{t(e)});const n=(0,l.useSelect)(e=>e(x.oR).getCurrentTour());return(0,a.useEffect)(()=>{if(!n)return()=>{};const e=document.getElementById("js-googlesitekit-main-dashboard");if(!e)return()=>{};const t=new ResizeObserver(()=>{i.g.dispatchEvent(new Event("resize"))});return t.observe(e),()=>{t.disconnect()}},[n]),n?(0,h.jsx)(E.Ay,{tourID:n.slug,steps:n.steps,gaEventCategory:n.gaEventCategory,callback:n.callback}):null}var R=i(68869),L=i(22821);function Root({children:e,registry:t,viewContext:i=null}){const n=r.D,[o]=(0,a.useState)({key:"Root",value:!0});return(0,h.jsx)(a.StrictMode,{children:(0,h.jsx)(R.Ay,{value:o,children:(0,h.jsx)(l.RegistryProvider,{value:t,children:(0,h.jsx)(N,{value:b.t,children:(0,h.jsx)(u.Kq,{va
|
|||
|
|
(0,k._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 D(e=""){if(!(0,n.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,n.isDate)(t)&&!isNaN(t)}function T(e){I()((0,n.isDate)(e)&&!isNaN(e),N);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 _(e){I()(D(e),b);const[t,i,n]=e.split("-");return new Date(t,i-1,n)}function C(e,t){return T(E(e,t*x))}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()(D(e)||(0,n.isDate)(e)&&!isNaN(e),b);const i=D(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}var R=i(69743),L=i(94552),z=i(62540);function O(e,t={}){if(Number.isNaN(Number(e)))return"";const{invertColor:i=!1}=t;return(0,R.Ay)((0,z.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 B=i(8143);function G(e){const t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function U(e){if("number"==typeof e)return!0;const t=(e||"").toString();return!!t&&!isNaN(t)}function Z(e){return Array.isArray(e)?[...e].sort():e}var W=i(2522);function Y(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 n=(t-e)/e;return Number.isNaN(n)||!Number.isFinite(n)?null:n}function H(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}}function V(e){if(!e)return"";const t=e.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t)).replace(/(\\)/g,"");return(0,n.unescape)(t)}},14007:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(47209),o=i(62688),r=i.n(o),s=i(63696),a=i(78325);function Portal({children:e,slug:t}){const[i]=(0,s.useState)(document.createElement("div"));return(0,n.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},15167:(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(3714),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])}},15210:(e,t,i)=>{i.d(t,{O:()=>o});var n=i(31234);const o=i.n(n)()(i.g)},15577:(e,t,i)=>{i.d(t,{SO:()=>c});var n=i(55620),o=i(99123);const r={},s=void 0===i.g?null:i.g;function a(){return[i.g.innerWidth,i.g.innerHeight]}function l(e=r){const{fps:t,leading:i,initialWidth:l=0,initialHeight:c=0}=e,[g,d]=(0,n._)("undefined"==typeof document?[l,c]:a,t,i);function u(){return d(a)}return(0,o.A)(s,"resize",u),(0,o.A)(s,"orientationchange",u),g}function c(e){return l(e)[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"
|
|||
|
|
(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 G=i(24558);const U=(0,n.once)(()=>{const e=document.getElementById("js-googlesitekit-adminbar-modules");if(e){const{viewOnly:t}=e.dataset,i=t?G.zx:G.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",U,{once:!0}),e.addEventListener("focusin",U,{once:!0}))})},39771:(e,t,i)=>{i.d(t,{Ay:()=>TourTooltips,R0:()=>h,ei:()=>f});var n=i(15844),o=i(36703),r=i(62688),s=i.n(r),a=i(82871),l=i(50539),c=i(7081),g=i(58116),d=i(89318),u=i(60592),p=i(77766),m=i(62540);const h={options:{arrowColor:"#3c7251",backgroundColor:"#3c7251",overlayColor:"rgba(0, 0, 0, 0.6)",textColor:"#fff",zIndex:2e4},spotlight:{border:"2px solid #3c7251",backgroundColor:"#fff"}},y={back:(0,a.__)("Back","google-site-kit"),close:(0,a.__)("Close","google-site-kit"),last:(0,a.__)("Got it","google-site-kit"),next:(0,a.__)("Next","google-site-kit")},f={disableAnimation:!0,styles:{arrow:{length:8,margin:56,spread:16},floater:{filter:"drop-shadow(rgba(60, 64, 67, 0.3) 0px 1px 2px) drop-shadow(rgba(60, 64, 67, 0.15) 0px 2px 6px)"}}},I={VIEW:"feature_tooltip_view",NEXT:"feature_tooltip_advance",PREV:"feature_tooltip_return",DISMISS:"feature_tooltip_dismiss",COMPLETE:"feature_tooltip_complete"};function TourTooltips({steps:e,tourID:t,gaEventCategory:r,callback:s}){const a=`${t}-step`,k=`${t}-run`,{setValue:N}=(0,l.useDispatch)(c.n),{dismissTour:b}=(0,l.useDispatch)(g.oR),j=(0,l.useRegistry)(),M=(0,p.A)(),v=(0,l.useSelect)(e=>e(c.n).getValue(a)||0),x=(0,l.useSelect)(e=>e(c.n).getValue(k)&&!1===e(g.oR).isTourDismissed(t));(0,n.A)(function(){i.g.document.body.classList.add("googlesitekit-showing-feature-tour",`googlesitekit-showing-feature-tour--${t}`),N(k,!0)});const A=e.map(e=>({disableBeacon:!0,isFixed:!0,placement:"auto",...e}));return(0,m.jsx)(o.Ay,{callback:function(e){!function({index:e,action:t,lifecycle:i,size:n,status:s,type:a}){const l=e+1,c="function"==typeof r?r(M):r;a===o.qY.TOOLTIP&&i===o.VD.TOOLTIP?(0,d.sx)(c,I.VIEW,l):t===o.kl.CLOSE&&i===o.VD.COMPLETE?(0,d.sx)(c,I.DISMISS,l):t===o.kl.NEXT&&s===o.XQ.FINISHED&&a===o.qY.TOUR_END&&n===l&&(0,d.sx)(c,I.COMPLETE,l),i===o.VD.COMPLETE&&s!==o.XQ.FINISHED&&(t===o.kl.PREV&&(0,d.sx)(c,I.PREV,l),t===o.kl.NEXT&&(0,d.sx)(c,I.NEXT,l))}(e);const{action:n,index:l,status:c,step:g,type:u}=e,p=n===o.kl.CLOSE,m=!p&&[o.qY.STEP_AFTER,o.qY.TARGET_NOT_FOUND].includes(u),h=[o.XQ.FINISHED,o.XQ.SKIPPED].includes(c),y=p&&u===o.qY.STEP_AFTER,f=h||y;if(o.qY.STEP_BEFORE===u){let e=g.target;"string"==typeof g.target&&(e=i.g.document.querySelector(g.target)),e?.scrollIntoView?.({block:"center"})}m?function(e,t){N(a,e+(t===o.kl.PREV?-1:1))}(l,n):f&&(i.g.document.body.classList.remove("googlesitekit-showing-feature-tour",`googlesitekit-showing-feature-tour--${t}`),b(t)),s&&s(e,j)},floaterProps:f,locale:y,run:x,stepIndex:v,steps:A,styles:h,tooltipComponent:u.A,continuous:!0,disableOverlayClose:!0,disableScrolling:!0,showProgress:!0})}TourTooltips.propTypes={steps:s().arrayOf(s().object).isRequired,tourID:s().string.isRequired,gaEventCategory:s().oneOfType([s().string,s().func]).isRequired,callback:s().func}},39828:(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-widge
|
|||
|
|
(0,n.__)("Your Google account does not have sufficient permissions to access %s data, so you won’t 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}`}},67150:(e,t,i)=>{i.d(t,{G:()=>c,HY:()=>d,SG:()=>g,db:()=>o,e4:()=>p,vl:()=>u});i(17243);var n=i(82871);const o="missing_required_scopes",r="insufficientPermissions",s="forbidden",a="internal_server_error",l="invalid_json";function c(e){return e?.code===o}function g(e){return[r,s].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,n.__)("There was a critical error on this website while fetching data","google-site-kit"):e?.code===l?(0,n.__)("The server provided an invalid response","google-site-kit"):e?.message}},68869:(e,t,i)=>{i.d(t,{Ay:()=>s});var n=i(6732);const{Consumer:o,Provider:r}=n.A,s=r},69667:(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 102 30"},e),n||(n=o.createElement("path",{stroke:"#CCC",strokeWidth:2,d:"m1 24.053 5-4.825 4 2.193 5.333-2.193 7.334 6.579 6-1.754 3-4.825 4.666 6.579 3.334-1.754L47.333 28 55 19.228l4.333 2.193 5.334-3.509 2 1.316h6L81.333 3 84 9.579l2.333-1.754L89 13.088l12-5.263"})))},71423:(e,t,i)=>{i.d(t,{$:()=>r,D:()=>o});var n=i(24558);const o="core/notifications",r=[n.uR,n.jU,n.f7,n.Ax,n.Is]},72455:(e,t,i)=>{i.d(t,{CV:()=>S,Cu:()=>j,K9:()=>n,Kr:()=>h,Lf:()=>p,Oh:()=>s,PW:()=>A,Rx:()=>w,S9:()=>y,TQ:()=>d,Vt:()=>_,Wl:()=>N,ZC:()=>o,ZY:()=>a,_p:()=>C,ag:()=>m,aj:()=>u,bz:()=>D,dq:()=>T,f2:()=>c,fB:()=>x,fV:()=>v,iB:()=>g,kc:()=>l,mo:()=>I,nc:()=>M,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=1,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"}},M={ADD_TO_CART:"add_to_cart",PURCHASE:"purchase",SUBMIT_LEAD_FORM:"submit_lead_form",GENERATE_LEAD:"generate_lead",CONTACT:"contact"},v=[M.CONTACT,M.GENERATE_LEAD,M.SUBMIT_LEAD_FORM],x={"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:
|
|||
|
|
(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}},75487:(e,t,i)=>{i.d(t,{fh:()=>Cell,xA:()=>u,fI:()=>g});var n=i(62688),o=i.n(n),r=i(4452),s=i.n(r),a=i(62540);function Cell(e){const{className:t,alignTop:i,alignMiddle:n,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:k,lgOrder:N,size:b,children:j,...M}=e;return(0,a.jsx)("div",{...M,className:s()(t,"mdc-layout-grid__cell",{"mdc-layout-grid__cell--align-top":i,"mdc-layout-grid__cell--align-middle":n,"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-${b}`]:12>=b&&b>0,[`mdc-layout-grid__cell--span-${I}-desktop`]:12>=I&&I>0,[`mdc-layout-grid__cell--start-${k}-desktop`]:12>=k&&k>0,[`mdc-layout-grid__cell--order-${N}-desktop`]:12>=N&&N>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:j})}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},n)=>(0,a.jsx)("div",{ref:n,className:s()("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:n,collapsed:o,...r},l)=>(0,a.jsx)("div",{className:s()("mdc-layout-grid",i,{"mdc-layout-grid--align-left":e,"mdc-layout-grid--collapsed":o,"mdc-layout-grid--fill":t}),...r,ref:l,children:n}));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},77766:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=i(63696),o=i(61991);const __WEBPACK_DEFAULT_EXPORT__=function(){return(0,n.useContext)(o.Ay)}},77967:(e,t,i)=>{i.d(t,{A:()=>ErrorNotice});var n=i(62688),o=i.n(n),r=i(63696),s=i(82871),a=i(84024),l=i(50539),c=i(67150),g=i(80035),d=i(12850),u=i(62540);function ErrorNotice({className:e,error:t,hasButton:i=!1,storeName:n,message:o=t.message,noPrefix:p=!1,skipRetryMessage:m,hideIcon:h=!1}){const y=(0,l.useDispatch)(),f=(0,l.useSelect)(e=>n?e(n).getSelectorDataForError(t):null),I=(0,r.useCallback)(()=>{y(f.storeName).invalidateResolution(f.name,f.args)},[y,f]);if(!o||(0,c.G)(t))return null;const k=i&&(0,c.vl)(t,f);let N=o;i||m||(N=(0,s.sprintf)(/* translators: %s: Error message from Google API. */ /* translators: %s: Error message from Google API. */
|
|||
|
|
(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}},78340:(e,t,i)=>{i.d(t,{s:()=>n});const n="core/forms"},79829:(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}},80035:(e,t,i)=>{i.d(t,{A:()=>k});var n,o=i(62688),r=i.n(o),s=i(4452),a=i.n(s),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 n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}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),n||(n=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:n,href:o,external:r=!1,hideExternalIndicator:s=!1}){let a;return r&&!s&&(a=(0,p.jsx)(y.A,{width:14,height:14})),(0,p.jsx)(h.SpinnerButton,{className:"googlesitekit-notice__cta",disabled:t,isSaving:i,onClick:n,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:n,ctaButton:o,type:r=u.Q.INFO,children:s,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})]}),(n?.label||n?.onClick||o?.label&&(o?.onClick||o?.href)||s)&&(0,p.jsxs)("div",{className:"googlesitekit-notice__action",children:[s,(n?.label||n?.onClick)&&(0,p.jsx)(DismissButton,{label:n.label,onClick:n.onClick,disabled:n.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 k=I},81520:(e,t,i)=>{function Null(){return null}i.d(t,{A:()=>Null})},82046:(e,t,i)=>{i.d(t,{C:()=>r,p:()=>o});var n=i(15210);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?.(/\/+$/,"")}},82871:e=>{e.exports=googlesitekit.i18n},83366:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n,o=i(63696);function r(){return r=Object.assign?Object.assign.bind():fun
|
|||
|
|
(0,l.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:(0,d.jsx)(c.A,{href:t,external:n},"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},92698:(e,t,i)=>{i.d(t,{A:()=>u});var n=i(63696),o=i(50539),r=i(93896),s=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(s.oR).hasCapability(s.HD)),{activateModule:p}=(0,o.useDispatch)(a.i),{navigateTo:m}=(0,o.useDispatch)(l.M),{setInternalServerError:h}=(0,o.useDispatch)(r.O4),y=(0,n.useCallback)(async()=>{const{error:i,response:n}=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(n.moduleReauthURL))},[p,e,m,h,t]);return i?.name&&u?y:null}},93896:(e,t,i)=>{i.d(t,{O4:()=>n,OQ:()=>r,qc:()=>o});const n="core/site",o="primary",r="secondary"},94468:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(63696),o=i(50539),r=i(58116),s=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(s.i).getModuleStoreName(e)),l=(0,o.useSelect)(e=>e(i)?.getAdminReauthURL()),{navigateTo:c}=(0,o.useDispatch)(a.M),g=(0,n.useCallback)(()=>c(l),[l,c]);return l&&t?g:null}},94552:(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},96820:(e,t,i)=>{i.d(t,{A:()=>g,v:()=>c});var n=i(62688),o=i.n(n),r=i(4452),s=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:s()("googlesitekit-gathering-data-notice",{[`googlesitekit-gathering-data-notice--has-style-${e}`]:!!e}),children:(0,l.jsx)("span",{children:(0,a.__)("Gathering data…","google-site-kit")})})}GatheringDataNotice.propTypes={style:o().oneOf(Object.values(c))};const g=GatheringDataNotice},97029:(e,t,i)=>{i.d(t,{A:()=>I});var n=i(62688),o=i.n(n),r=i(4452),s=i.n(r),a=i(63696),l=i(96820),c=i(12850),g=i(62540);function Sparkline({sparkline:e,invertChangeColor:t}){let i=e;return i&&t&&(i=(0,a.cloneElement)(e,{invertChangeColor:t})),(0,g.jsx)("div",{className:"googlesitekit-data-block__sparkline",children:i})}Sparkline.propTypes={sparkline:o().element,invertChangeColor:o().bool};const d=Sparkline;var u=i(2362),p=i(82871),m=i(94552);function Change({change:e,changeDataUnit:t,period:i,invertChangeColor:n}){let o=e;return t&&(o="%"===t?(0,c.Eo)(e,{style:"percent",signDisplay:"never",maximumFractionDigits:1}):(0,c.Eo)(e,t)),i&&(o=(0,p.sprintf)(i,o)),(0,g.jsxs)("div",{className:s()("googlesitekit-data-block__change",{"googlesitekit-data-block__change--no-change":!e}),children:[!!e&&(0,g.jsx)("span",{className:"googlesitekit-data-block__arrow",children:(0,g.jsx)(m.A,{direction:0<parseFloat(e)?"up":"down",invertColor:n})}),(0,g.jsx)("span",{className:"googlesitekit-data-block__value",children:o})]})}Change.propTypes={change:o().oneOfType([o().string,o().number]),changeDataUnit:o().oneOfType([o().string,o().bool]),period:o().string,invertChangeColor:o().bool};const h=Change;var y=i(91560),f=i(15167);function Content({title:e="",datapoint:t=null,datapointUnit:i="",change:n=null,changeDataUnit:o="",period:r="",source:s,sparkline:l,
|