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

60 lines
487 KiB
JavaScript
Raw Permalink Normal View History

2026-03-31 11:30:59 +02:00
(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[290,505],{80:(e,t,i)=>{"use strict";i.d(t,{CV:()=>_,Cu:()=>k,K9:()=>a,Kr:()=>h,Lf:()=>m,Oh:()=>n,PW:()=>j,Rx:()=>E,S9:()=>I,TQ:()=>g,Vt:()=>C,Wl:()=>N,ZC:()=>s,ZY:()=>r,_p:()=>D,ag:()=>p,aj:()=>u,bz:()=>b,dq:()=>x,f2:()=>c,fB:()=>v,fV:()=>T,iB:()=>d,kc:()=>l,mo:()=>A,nc:()=>S,rm:()=>f,to:()=>o,wo:()=>y,yn:()=>M});const a="modules/analytics-4",s="account_create",o="property_create",n="webdatastream_create",r="analyticsSetup",l=10,c=0,d="https://www.googleapis.com/auth/tagmanager.readonly",g="enhanced-measurement-form",u="enhanced-measurement-enabled",m="enhanced-measurement-should-dismiss-activation-banner",p="analyticsAccountCreate",h="analyticsCustomDimensionsCreate",I="https://www.googleapis.com/auth/analytics.edit",y="dashboardAllTrafficWidgetDimensionName",A="dashboardAllTrafficWidgetDimensionColor",M="dashboardAllTrafficWidgetDimensionValue",N="dashboardAllTrafficWidgetActiveRowIndex",f="dashboardAllTrafficWidgetLoaded",k={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"}},S={ADD_TO_CART:"add_to_cart",PURCHASE:"purchase",SUBMIT_LEAD_FORM:"submit_lead_form",GENERATE_LEAD:"generate_lead",CONTACT:"contact"},T=[S.CONTACT,S.GENERATE_LEAD,S.SUBMIT_LEAD_FORM],v={"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"}}}}]}}]}}}}]}},j="audiencePermissionsSetup",_="audienceTileCustomDimensionCreate",b="audience-selection-panel-expirable-new-badge-",x="audience",C="customDimension",D="property",E=[x,C,D]},674:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var a,s,o=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 a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},n.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 22"},e),a||(a=o.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.213
(0,A.__)("%1$d selected <MaxCount>(up to %2$d)</MaxCount>","google-site-kit"),D,s),{MaxCount:(0,p.jsx)("span",{className:"googlesitekit-selection-panel-footer__item-count--max-count"})})});return(0,p.jsx)("footer",{className:"googlesitekit-selection-panel-footer",children:(0,p.jsxs)("div",{className:"googlesitekit-selection-panel-footer__content",children:[E,(0,p.jsxs)("div",{className:"googlesitekit-selection-panel-footer__actions",children:[(0,p.jsx)(M.Button,{onClick:b,disabled:o,tertiary:!0,children:(0,A.__)("Cancel","google-site-kit")}),(0,p.jsx)(M.SpinnerButton,{onClick:_,isSaving:o,disabled:D<a||D>s||o||!l&&m,children:d||N})]})]})})}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 _=SelectionPanel},6730:(e,t,i)=>{"use strict";i.d(t,{A:()=>GenericErrorHandlerActions});var a=i(62688),s=i.n(a),o=i(82871),n=i(38432),r=i(38021),l=i.n(r),c=i(63696),d=i(12417),g=i(1027),u=i(65123),m=i(49383),p=i(62540);function ReportErrorButton({message:e,componentStack:t}){const[i,a]=(0,c.useState)(!1);return(0,p.jsx)(m.Button,{"aria-label":i?(0,o.__)("Error message copied to clipboard. Click to copy the error message again.","google-site-kit"):void 0,onClick:function(){l()(`\`\`\`\n${e}\n${t}\n\`\`\``),a(!0)},trailingIcon:(0,p.jsx)(d.A,{className:"mdc-button__icon",icon:i?g.A:u.A}),children:i?(0,o.__)("Copied to clipboard","google-site-kit"):(0,o.__)("Copy error contents","google-site-kit")})}ReportErrorButton.propTypes={message:s().string,componentStack:s().string};const h=ReportErrorButton;function GenericErrorHandlerActions({message:e,componentStack:t}){return(0,p.jsxs)("div",{className:"googlesitekit-generic-error-handler-actions",children:[(0,p.jsx)(h,{message:e,componentStack:t}),(0,p.jsx)(n.A,{href:"https://wordpress.org/support/plugin/google-site-kit/",external:!0,children:(0,o.__)("Report this problem","google-site-kit")})]})}GenericErrorHandlerActions.propTypes={message:s().string,componentStack:s().string}},7076:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});var a=i(18117),s=i(17243),o=i(63696);function n(...e){const t=(0,a.MA)(()=>(0,s.debounce)(...e),e);return(0,o.useEffect)(()=>()=>t.cancel(),[t]),t}},7144:(e,t,i)=>{"use strict";i.d(t,{EA:()=>o,GF:()=>y,Hl:()=>g,IX:()=>p,Is:()=>n,KD:()=>m,LO:()=>d,NO:()=>c,Nl:()=>l,QJ:()=>u,Uf:()=>s,XU:()=>I,Y0:()=>r,hs:()=>A,wb:()=>h});var a=i(82871);const s="key-metrics-setup-cta-widget",o="googlesitekit-key-metrics-selection-panel-opened",n="key-metrics-selection-form",r="key-metrics-selected",l="key-metrics-effective-selection",c="key-metrics-unstaged-selection",d=2,g=8,u={SLUG:"current-selection",LABEL:(0,a.__)("Current selection","google-site-kit")},m={SLUG:"suggested",LABEL:(0,a.__)("Suggested","google-site-kit")},p={SLUG:"visitors",LABEL:(0,a.__)("Visitors","google-site-kit")},h={SLUG:"driving-traffic",LABEL:(0,a.__)("Driving traffic","google-site-kit")},I={SLUG:"generating-leads",LABEL:(0,a.__)("Generating leads","google-site-kit")},y={SLUG:"selling-products",LABEL:(0,a.__)("Selling products","google-site-kit")},A={SLUG:"content-performance",LABEL:(0,a.__)("Content performance","google-site-kit")}},7551:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>r,Oo:()=>o,oE:()=>n});var a=i(20697),s=i(62659);const o=a.jU,n=a.f7;function r(){const e=(0,s.A)();return e===a.jU||e===a.Ax?o:e===a.f7||e===a.Is?n:null}},7972:(e,t,i)=>{"use strict";i.d(t,{F:()=>s,n:()=>a});const a="core/ui",s="activeContextID"},8084:(e,t,i)=>{"use strict";i.d(t,{$C:()=>_,RF:()=>j,WI:()=>T,_5:()=>f,jU:()=>N,o3:()=>M,x0:()=>S});var a=i(32091),s=i.n(a),o=i(50532),n=i.n(o),r=i(17243),l=i(78913);const c="GET_REGISTRY",d="AWAIT";function g(...e){const t=e.reduce((e,t)=>({...e,...t}),{}),i=k(e.reduce((e,t)=>[...e,...Object.keys(t)],[]));return s()(0===i.length,`collect() cannot accept collections with duplicate keys. Your call to collect() contains the following duplicated functions: ${i.join(", ")}. Check your data sto
(0,X._n)("%s is disconnected, no data to show","%s are disconnected, no data to show",c.length,"google-site-kit"),c.join((0,X.__)(" and ","google-site-kit")))})})}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},$.apply(null,arguments)}MetricItem.propTypes={slug:A().string.isRequired,title:A().string.isRequired,description:A().string.isRequired,isNewlyDetected:A().bool,savedItemSlugs:A().array};const key_metrics_no_selected_items=e=>a.createElement("svg",$({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 383 238"},e),b||(b=a.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"})),x||(x=a.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__a)"},a.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)"}))),C||(C=a.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)"})),D||(D=a.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)"})),E||(E=a.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)"})),w||(w=a.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"})),Z||(Z=a.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)"})),R||(R=a.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__b)"},a.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)"}))),L||(L=a.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=a.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)"})),z||(z=a.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)"})),O||(O=a.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"})),P||(P=a.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)"})),B||(B=a.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__c)"},a.createElement("rect",{width:130.621,height:89.68,x:126.251,y:37.4,fill:"#fff",rx:10.957}))),U||(U=a.createElement("rect",{width:98.333,height:7.867,x:143.013,y:53.134,fill:"#EBEEF0",rx:3.933})),W||(W=a.createElement("rect",{width:49.806,height:19.923,x:142.369,y:70.423,fill:"#B8E6CA",rx:9.961})),H||(H=a.createElement("rect",{width:33.04,height:7.867,x:143.013,y:105.84,fill:"#EBEEF0",rx:3.933})),V||(V=a.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"})),Y||(Y=a.createElement("rect",{width:19.923,height:5.977,x:164.287,y:77.395,fill:"#fff",rx:1.992})),a.createElement("mask",{id:"key-metrics-no-selected-items_svg__d",width:273,height:230,x:58,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},F||(F=a.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,o.__)("%s is disconnected, some of your metrics cant be displayed","google-site-kit"),i.name):(0,o.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
(0,o.__)("%s is disconnected, metric cant be displayed","google-site-kit"),i.name)}),(0,h.jsx)(u.A,{onClick:t,secondary:!0,children:(0,o.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
(0,o.__)("Connect %s","google-site-kit"),i.name)})]})]})}),p&&(0,h.jsxs)(n.Fragment,{children:[(0,h.jsx)("div",{className:"googlesitekit-km-connect-module-cta-tile__ghost-card",children:(0,h.jsx)(GhostCardGreenSVG,{})}),(0,h.jsx)("div",{className:"googlesitekit-km-connect-module-cta-tile__ghost-card",children:(0,h.jsx)(GhostCardGreenSVG,{})}),(0,h.jsx)("div",{className:"googlesitekit-km-connect-module-cta-tile__ghost-card",children:(0,h.jsx)(GhostCardRedSVG,{})})]})]}):null}ConnectModuleCTATile.propTypes={moduleSlug:s().string.isRequired}},17443:(e,t,i)=>{"use strict";i.d(t,{r:()=>AdminScreenTooltip,i:()=>a.i});var a=i(52274),s=i(63696),o=i(50539),n=i(62688),r=i(36703),l=i(40960),c=i(83202),d=i(94656),g=i(71264),u=i(97513),m=i(62540);function JoyrideTooltip(e){const{title:t,content:a,dismissLabel:o,disableOverlay:n=!0,target:p,cta:h=!1,className:I,styles:y={},slug:A="",placement:M="auto",onDismiss:N=()=>{},onView:f=()=>{},onTourStart:k=()=>{},onTourEnd:S=()=>{}}=e;function T(){return!!i.g.document.querySelector(p)}const[v,j]=(0,s.useState)(T),_=(0,u.dv)(),b=_===u.mp||_===u.Lg,[x,C]=(0,s.useState)(!0),D=(0,s.useRef)(b);if((0,l.A)(()=>{T()&&j(!0)},v?null:250),(0,s.useEffect)(()=>{let e=()=>{};if("function"==typeof i.g.ResizeObserver){const t=i.g.document.querySelector(p);if(t){const a=new ResizeObserver(()=>{i.g.dispatchEvent(new Event("resize"))});a.observe(t),e=()=>a.disconnect()}}return e},[p,v]),(0,s.useEffect)(()=>{let e;return D.current!==b&&(C(!1),e=setTimeout(()=>{C(!0)},50),D.current=b),()=>{e&&clearTimeout(e)}},[b]),!v)return null;const E=[{title:t,target:p,content:a,disableBeacon:!0,isFixed:!0,placement:M,cta:h,className:I}],w={close:o,last:o};return(0,m.jsx)(d.A,{slug:A,children:(0,m.jsx)(r.Ay,{callback:function({type:e}){switch(e){case r.qY.TOUR_START:k(),i.g.document.body.classList.add("googlesitekit-showing-tooltip");break;case r.qY.TOUR_END:S(),i.g.document.body.classList.remove("googlesitekit-showing-tooltip");break;case r.qY.STEP_AFTER:N();break;case r.qY.TOOLTIP:f()}},disableOverlay:n,spotlightPadding:0,floaterProps:g.ei,locale:w,steps:E,styles:{...g.R0,...y,options:{...g.R0.options,...y?.options},spotlight:{...g.R0.spotlight,...y?.spotlight}},tooltipComponent:c.A,run:x,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 p=i(7972),h=i(13047),I=i(62659);function AdminScreenTooltip(){const e=(0,I.A)(),{setValue:t}=(0,o.useDispatch)(p.n),i=(0,u.dv)(),{isTooltipVisible:a=!1,target:n,placement:r,className:l,tooltipSlug:c,title:d,content:g,dismissLabel:y,gaTrackingEventLabel:A}=(0,o.useSelect)(e=>e(p.n).getValue("admin-screen-tooltip")||{isTooltipVisible:!1});const M=(0,s.useCallback)(()=>{c&&(0,h.sx)(`${e}_${c}`,"tooltip_dismiss",A),t("admin-screen-tooltip",void 0)},[t,c,e,A]);if(!a)return null;const N=i===u.mp||i===u.Lg,f=null!=n?n:'#adminmenu [href*="page=googlesitekit-settings"]',k=null!=r?r:"right";return(0,m.jsx)(JoyrideTooltip,{target:N?"body":f,placement:N?"center":k,className:N?"googlesitekit-tour-tooltip__modal_step":l||(n?void 0:"googlesitekit-tour-tooltip__fixed-settings-tooltip"),disableOverlay:!N,slug:"admin-screen-tooltip",title:d,content:g,dismissLabel:y,onView:function(){(0,h.sx)(`${e}_${c}`,"tooltip_view",A)},onDismiss:M})}},18418:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var a,s=i(63696);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},o.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>s.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2 12"},e),a||(a=s.createElement("g",{fill:"currentColor",fillRule:"evenodd"},s.createElement("path",{d:"M0 0h2v7H0zM0 10h2v2H0z"}))))
(0,g.__)("%1$s. <Link><Strong>%2$s</Strong></Link>","google-site-kit"),i,(0,g.__)("Get help","google-site-kit")),{Link:(0,A.jsx)(m.A,{href:t,trailingIcon:(0,A.jsx)(I,{width:15,height:15}),external:!0,hideExternalIndicator:!0}),Strong:(0,A.jsx)("strong",{})}),hideIcon:!0}):null}function AdBlockerWarning({moduleSlug:e,className:t}){const i=(0,n.useSelect)(t=>t(l.i).getModuleStoreName(e)),a=(0,n.useSelect)(e=>e(i)?.getAdBlockerWarningMessage()),s=(0,n.useSelect)(t=>t(r.O4).getDocumentationLinkURL(`${e}-ad-blocker-detected`));return(0,A.jsx)(AdBlockerWarningMessage,{className:t,getHelpLink:s,warningMessage:a})}AdBlockerWarningMessage.propTypes={className:o().string,getHelpLink:o().string,warningMessage:o().string},AdBlockerWarning.propTypes={className:o().string,moduleSlug:o().string.isRequired}},24355:(e,t,i)=>{"use strict";i.d(t,{SO:()=>r});var a=i(55620),s=i(99123);function o(){return[i.g.innerWidth,i.g.innerHeight]}function n({fps:e=60,leading:t=!1,initialWidth:i=0,initialHeight:n=0}={}){const[r,l]=(0,a._)("undefined"==typeof document?[i,n]:o,e,t);function c(){return l(o)}return(0,s.A)(window,"resize",c),(0,s.A)(window,"orientationchange",c),r}function r(e={}){return n(e)[0]}},24560:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var a,s=i(63696);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},o.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>s.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 12"},e),a||(a=s.createElement("g",{fill:"currentColor",fillRule:"evenodd"},s.createElement("path",{d:"M0 6.414 1.415 5l5.292 5.292-1.414 1.415z"}),s.createElement("path",{d:"m14.146.146 1.415 1.414L5.414 11.707 4 10.292z"}))))},25064:(e,t,i)=>{"use strict";i.d(t,{A:()=>MetricTileHeader});var a=i(62688),s=i.n(a),o=i(82267),n=i(55989),r=i(33052),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)(r.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)(o.A,{title:t})}):(0,l.jsx)(o.A,{title:t})]})}MetricTileHeader.propTypes={title:s().string,infoTooltip:s().oneOfType([s().string,s().element]),loading:s().bool}},25427:(e,t,i)=>{"use strict";i.d(t,{G4:()=>c,Ig:()=>o,Q3:()=>l,a2:()=>n,wA:()=>r});var a=i(17243),s=i(73730);function o(e){function t(e){return"string"==typeof e&&/^[a-zA-Z0-9_]+$/.test(e)}if("string"==typeof e){return e.split(",").every(t)}return(0,s.cX)(e,e=>{const i=e.hasOwnProperty("name")&&t(e.name);if(!e.hasOwnProperty("expression"))return i;const a="string"==typeof e.expression;return i&&a},t)}function n(e){return(0,s.cX)(e,e=>e.hasOwnProperty("name")&&"string"==typeof e.name)}function r(e){const t=["string"];return Object.keys(e).every(i=>{if(t.includes(typeof e[i]))return!0;if(Array.isArray(e[i]))return e[i].every(e=>t.includes(typeof e));if((0,a.isPlainObject)(e[i])){const t=Object.keys(e[i]);return!!t.includes("filterType")&&!("emptyFilter"!==e[i].filterType&&!t.includes("value"))}return!1})}function l(e){const t=["string"],i=["numericFilter","betweenFilter"];return Object.values(e).every(e=>{if(t.includes(typeof e))return!0;if(Array.isArray(e))return e.every(e=>t.includes(typeof e));if(!(0,a.isPlainObject)(e))return!1;const{filterType:s,value:o,fromValue:n,toValue:r}=e;if(s&&!i.includes(s))return!1;const l=Object.keys(e);return s&&"numericFilter"!==s?"betweenFilter"===s&&(l.includes("fromValue")&&l.includes("toValue")&&[n,r].every(e=>!(0,a.isPlainObject)(e)||"int64Value"in e)):l.includes("operation")&&l.includes("value")&&(!(0,a.isPlainObject)(o)||"int64Value"in o)})}function c(e){return!!Array.isArray(e)&&e.every(e=>!!(0,a.isPlainObject)(e)&&((!e.hasOwnProperty("desc")||"boolean"==typeof e.desc)&&(e.metric?!e.dimension&&"string"==typeof e.metric?.metricName:!!e.dimension&&"string"==typeof e.dimension?.dimensionName)))}},25797
(0,g.__)("Site Kit detected Ad Blocking Recovery code for a different account %s on your site. For a better ad blocking recovery experience, you should remove Ad Blocking Recovery code thats not linked to this AdSense account.","google-site-kit"),(0,T.v)(o))),s?(0,Z.jsxs)("fieldset",{className:"googlesitekit-settings-module__ad-blocking-recovery-toggles",children:[(0,Z.jsx)("legend",{className:"googlesitekit-setup-module__text",children:(0,g.__)("Ad blocking recovery","google-site-kit")}),(0,Z.jsxs)("div",{className:"googlesitekit-settings-module__meta-items",children:[(0,Z.jsxs)("div",{className:"googlesitekit-settings-module__meta-item",children:[(0,Z.jsx)(L.Switch,{label:(0,g.__)("Enable ad blocking recovery message","google-site-kit"),checked:c,onClick:function(){const t=!c;u(f.RR,{adBlockingRecoveryToggle:t}),m(t),(0,N.sx)(`${e}_adsense-abr`,t?"enable_tag":"disable_tag","abr_tag")},hideLabel:!1}),(0,Z.jsx)(z.A,{children:(0,p.A)((0,g.__)("Identify site visitors that have an ad blocker browser extension installed. These site visitors will see the ad blocking recovery message created in AdSense. <a>Configure your message</a>","google-site-kit"),{a:(0,Z.jsx)(G.A,{href:r,external:!0})})})]}),(c||t)&&(0,Z.jsxs)("div",{className:"googlesitekit-settings-module__meta-item",children:[(0,Z.jsx)(L.Switch,{label:(0,g.__)("Place error protection code","google-site-kit"),checked:d,onClick:function(){const t=!d;u(f.RR,{adBlockingRecoveryErrorToggle:t}),h(t),(0,N.sx)(`${e}_adsense-abr`,t?"enable_tag":"disable_tag","error_protection_tag")},hideLabel:!1}),(0,Z.jsx)(z.A,{children:(0,p.A)((0,g.__)("If a site visitors ad blocker browser extension blocks the message you create in AdSense, a default, non-customizable ad blocking recovery message will display instead. <a>Learn more</a>","google-site-kit"),{a:(0,Z.jsx)(G.A,{href:l,external:!0})})})]})]}),o&&(0,Z.jsx)(w.A,{type:w.A.TYPES.INFO,description:I})]}):null}var B=i(58240),U=i(10626);function SettingsForm(){const e=(0,a.useSelect)(e=>e(y.O4).isWebStoriesActive()),t=(0,a.useSelect)(e=>e(f.wl).getClientID()),i=(0,a.useSelect)(e=>e(f.wl).getExistingTag()),s=(0,a.useSelect)(e=>e(f.wl).hasFinishedResolution("getExistingTag"));(0,a.useSelect)(e=>e(f.wl).getExistingAdBlockingRecoveryTag());const o=(0,a.useSelect)(e=>e(f.wl).hasFinishedResolution("getExistingAdBlockingRecoveryTag"));if(!s||!o)return(0,Z.jsx)(L.ProgressBar,{});let n,r;i&&i===t?(n=(0,g.__)("Youve already got an AdSense code on your site for this account, we recommend you use Site Kit to place code to get the most out of AdSense","google-site-kit"),r=n):i?(n=(0,g.sprintf)(/* translators: %s: account ID */ /* translators: %s: account ID */
(0,g.__)("Site Kit detected AdSense code for a different account %s on your site. For a better ads experience, you should remove AdSense code thats not linked to this AdSense account.","google-site-kit"),(0,T.c)(i)),r=(0,g.__)("Please note that AdSense will not show ads on your website unless youve already placed the code","google-site-kit")):r=(0,g.__)("Please note that AdSense will not show ads on your website unless youve already placed the code","google-site-kit");return(0,Z.jsxs)("div",{className:"googlesitekit-adsense-settings-fields",children:[(0,Z.jsx)(B.kg,{}),(0,Z.jsx)(B.TZ,{checkedMessage:n,uncheckedMessage:r}),e&&(0,Z.jsxs)(m.Fragment,{children:[(0,Z.jsx)(U.A,{}),(0,Z.jsx)(z.A,{children:(0,p.A)((0,g.__)("This ad unit will be used for your Web Stories. <LearnMoreLink />","google-site-kit"),{LearnMoreLink:(0,Z.jsx)(G.A,{href:"https://support.google.com/adsense/answer/10175505#create-an-ad-unit-for-web-stories","aria-label":(0,g.__)("Learn more about Ad Sense Web Stories.","google-site-kit"),external:!0,children:(0,g.__)("Learn more","google-site-kit")})})})]}),(0,Z.jsx)(B.Ve,{}),(0,Z.jsx)(AdBlockingRecoverySetupCTANotice,{}),(0,Z.jsx)(AdBlockingRecoveryToggle,{})]})}function SettingsEdit(){let e;return e=(0,a.useSelect)(e=>e(f.wl).isDoingSubmitChanges())?(0,Z.jsx)(L.ProgressBar,{}):(0,Z.jsx)(SettingsForm,{}),(0,Z.jsx)("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense",children:e})}var W=i(88273),H=i(58718),V=i(42340);function SettingsSetupIncomplete(){const e=(0,a.useSelect)(e=>e(f.wl).getAccountStatus()),t=(0,b.DZ)(e),i=(0,a.useSelect)(e=>e(f.wl).getAdminReauthURL()),s=(0,a.useSelect)(e=>e(W.i)?.getCheckRequirementsError(H.Py));let o,n;return t?(
/* translators: %s: link with next step */
o=(0,g.__)("Site Kit has placed AdSense code on your site: %s","google-site-kit"),n=(0,g.__)("check module page","google-site-kit")):(
/* translators: %s: link with next step */
o=(0,g.__)("Setup incomplete: %s","google-site-kit"),n=(0,g.__)("continue module setup","google-site-kit")),(0,Z.jsxs)(m.Fragment,{children:[(0,Z.jsx)("div",{className:"googlesitekit-settings-module__fields-group googlesitekit-settings-module__fields-group--no-border",children:(0,Z.jsx)(V.A,{slug:"adsense"})}),(0,Z.jsx)("div",{className:"googlesitekit-settings-module__fields-group-title",children:(0,p.A)((0,g.sprintf)(o,`<a>${n}</a>`),{a:(0,Z.jsx)(G.A,{className:"googlesitekit-settings-module__edit-button",href:i,disabled:!!s})})})]})}var Y=i(50464),F=i(45454);var Q=i(55989),J=i(33052);function SettingsView(){const e=(0,a.useSelect)(e=>e(f.wl).getAccountID()),t=(0,a.useSelect)(e=>e(f.wl).getServiceAccountManageSitesURL()),i=(0,a.useSelect)(e=>e(y.O4).isWebStoriesActive()),s=(0,a.useSelect)(e=>e(f.wl).getWebStoriesAdUnit()),o=(0,a.useSelect)(e=>e(f.wl).getAccountStatus()),n=(0,a.useSelect)(e=>e(f.wl).getUseAdBlockingRecoverySnippet()),r=(0,a.useSelect)(e=>e(f.wl).getUseAdBlockingRecoveryErrorSnippet()),l=(0,a.useSelect)(e=>e(f.wl).getSiteStatus()),c=(0,a.useSelect)(e=>e(f.wl).getUseSnippet()),d=(0,a.useSelect)(e=>e(f.wl).getAdBlockingRecoverySetupStatus()),u=(0,a.useSelect)(e=>e(f.wl).getExistingTag()),h=(0,a.useSelect)(e=>e(f.wl).getClientID()),I=(0,a.useSelect)(e=>e(f.wl).getAutoAdsDisabled()||[]),A=(0,a.useSelect)(t=>t(f.wl).getServiceURL({path:`/${e}/privacymessaging/ad_blocking`})),M=function(e){let t=(0,g.__)("Your site isnt ready to show ads yet","google-site-kit");switch(e){case b.ZT:t=(0,g.__)("Your account has been approved","google-site-kit");break;case b.pJ:t=(0,g.__)("Your site is ready for ads","google-site-kit");break;case b.X_:case b.iP:t=(0,g.__)("Were getting your site ready for ads. This usually takes less than a day, but it can sometimes take a bit longer","google-site-kit");break;case b.ze:case b.f8:case b.gV:case b.bF:case b.Yb:t=(0,g.__)("You need to fix some issues before your account is approved. Go to AdSense to find out how to fix it","google-site-kit")}return t}(o),N=function(e){let t="";switch(e){case b.k:case b.dL:t=(0,g.__)("You need to fix some things before your site is ready.","google-site-kit");break;case b.oC:t=(0,g.__)("Your site is getting ready.","google-site-kit");break;case b.TF:t=(0,g.__)("Your site is ready for ads.","google-site-kit");break;case b.um:t=(0,g.__)("Your site is ready, with auto-ads disabled.","google-site-kit")}return t}(l),k=(0,p.A)((0,g.__)("View <VisuallyHidden>site </VisuallyHidden>in AdSense","google-site-kit"),{VisuallyHidden:(0,Z.jsx)(Q.A,{})}),S=function(e,t,i){let a=(0,g.__)("The AdSense code has not been placed on your site","google-site-kit");return e?a=(0,g.__)("The AdSense code has been placed on your site","google-site-kit"):t&&t===i&&(a=(0,g.__)("The AdSense code has been placed by another plugin or theme","google-site-kit")),a}(c,u,h),T=function(e){let t=(0,g.__)("Ads are currently displayed for all visitors","google-site-kit");return e.includes(F.nk)&&e.includes(F.ru)?t=(0,g.__)("All logged-in users and users who can write posts","google-site-kit"):e.includes(F.nk)?t=F.BN[F.nk]:e.includes(F.ru)&&(t=F.BN[F.ru]),t}(I),v=(0,a.useSelect)(e=>void 0===e(f.wl).getSettings()||void 0===e(f.wl).hasExistingAdBlockingRecoveryTag());return(0,Z.jsxs)("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense",children:[(0,Z.jsx)(B.kg,{}),(0,Z.jsxs)("div",{className:"googlesitekit-settings-module__meta-items",children:[(0,Z.jsxs)("div",{className:"googlesitekit-settings-module__meta-item",children:[(0,Z.jsx)(J.A,{as:"h5",size:"medium",type:"label",className:"googlesitekit-settings-module__meta-item-type",children:(0,g.__)("Publisher ID","google-site-kit")}),(0,Z.jsx)("p",{className:"googlesitekit-settings-module__meta-item-data",children:(0,Z.jsx)(Y.A,{value:e})})]}),(0,Z.jsxs)("div",{className:"googlesitekit-settings-module__meta-item",children:[(0,Z.jsx)(J.A,{as:"h5",size:"medium",type:"label",className:"googlesitekit-settings-module__meta-item-type",children:(0,g.__)("Site Status","google-site-kit")}),(0,Z.jsxs)("p",{className:"goo
(0,g._n)("Performance over the last %s day","Performance over the last %s days",e,"google-site-kit"),e)})};const oi=function Footer(){const e=(0,Gt.A)(),t=(0,a.useSelect)(e=>e(te.oR).getDateRangeDates({offsetDays:f.f2})),i=(0,a.useSelect)(i=>e?null:i(f.wl).getServiceReportURL(function(e){le()(e,"A dates object is required.");const{startDate:t,endDate:i}=e;return le()((0,N.Qr)(t),"A valid startDate is required."),le()((0,N.Qr)(i),"A valid endDate is required."),{d:`${t.replace(/-/g,"/")}-${i.replace(/-/g,"/")}`}}(t)));return(0,Z.jsx)(Xt.A,{href:i,name:(0,g._x)("AdSense","Service name","google-site-kit"),external:!0})};var ni=i(10740),ri=i(63505),li=i(94406);function Overview({metrics:e,currentRangeData:t,previousRangeData:i,selectedStats:a,handleStatsSelection:s}){const{totals:o,headers:n}=t,{totals:r}=i,l={smSize:2,mdSize:2,lgSize:3};return(0,Z.jsx)(ni.xA,{children:(0,Z.jsxs)(li.A,{className:"mdc-layout-grid__inner",children:[(0,Z.jsx)(ni.fh,{...l,children:(0,Z.jsx)(ri.A,{stat:0,className:"googlesitekit-data-block--page-rpm googlesitekit-data-block--button-1",title:e[n[0].name],datapoint:o?.cells[0].value||0,datapointUnit:n[0]?.currencyCode,change:(0,N.Zf)(r?.cells[0].value||0,o?.cells[0].value||0),changeDataUnit:"%",context:"button",selected:0===a,handleStatSelection:s})}),(0,Z.jsx)(ni.fh,{...l,children:(0,Z.jsx)(ri.A,{stat:1,className:"googlesitekit-data-block--page-rpm googlesitekit-data-block--button-2",title:e[n[1].name],datapoint:o?.cells[1].value||0,datapointUnit:n[1]?.currencyCode,change:(0,N.Zf)(r?.cells[1].value||0,o?.cells[1].value||0),changeDataUnit:"%",context:"button",selected:1===a,handleStatSelection:s})}),(0,Z.jsx)(ni.fh,{...l,children:(0,Z.jsx)(ri.A,{stat:2,className:"googlesitekit-data-block--page-rpm googlesitekit-data-block--button-3",title:e[n[2].name],datapoint:o?.cells[2].value||0,change:(0,N.Zf)(r?.cells[2].value||0,o?.cells[2].value||0),changeDataUnit:"%",context:"button",selected:2===a,handleStatSelection:s})}),(0,Z.jsx)(ni.fh,{...l,children:(0,Z.jsx)(ri.A,{stat:3,className:"googlesitekit-data-block--impression googlesitekit-data-block--button-4",title:e[n[3].name],datapoint:o?.cells[3].value||0,datapointUnit:"%",change:(0,N.Zf)(r?.cells[3].value||0,o?.cells[3].value||0),changeDataUnit:"%",context:"button",selected:3===a,handleStatSelection:s})})]})})}Overview.propTypes={metrics:Et().object,currentRangeData:Et().object,previousRangeData:Et().object,selectedStats:Et().number.isRequired,handleStatsSelection:Et().func.isRequired};const ci=Overview;var di=i(28975),gi=i(44161);function Stats(e){const{metrics:t,currentRangeData:i,previousRangeData:a,selectedStats:s}=e,o=function(e,t,i,a,s){const o=[[{type:"date",label:(0,g.__)("Day","google-site-kit")},{type:"string",role:"tooltip",p:{html:!0}},{type:"number",label:i},{type:"number",label:(0,g.__)("Previous period","google-site-kit")}]];function n(e){const t=new Date(e);return t.setDate(e.getDate()+1),t}function r(e){return t=>e.getTime()===(0,N.XH)(t.cells[0].value).getTime()}let l=_(e.startDate),c=_(t.startDate);const d=_(e.endDate),u=(0,N.JK)(),m={weekday:"short",month:"short",day:"numeric"};for(;l<=d;){const d=parseFloat((e?.rows||[]).find(r(l))?.cells?.[a]?.value||0),p=parseFloat((t?.rows||[]).find(r(c))?.cells?.[a]?.value||0),h=(0,N.Cn)(d,p),I=(0,N.vY)(h),y=(0,g.sprintf)(/* translators: 1: date for user stats, 2: previous date for user stats comparison */ /* translators: 1: date for user stats, 2: previous date for user stats comparison */
(0,g._x)("%1$s vs %2$s","Date range for chart tooltip","google-site-kit"),l.toLocaleDateString(u,m),c.toLocaleDateString(u,m));let A=(0,N.Eo)(d,s?.currencyCode);"METRIC_RATIO"===s?.type&&(A=(0,N.Eo)(d,"%"));const M=(0,g.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,g._x)("%1$s: <strong>%2$s</strong> <em>%3$s %4$s%%</em>","Stat information for chart tooltip","google-site-kit"),i,A,I,Math.abs(h).toFixed(2).replace(/(.00|0)$/,""));o.push([l,`<div class="${j()("googlesitekit-visualization-tooltip",{"googlesitekit-visualization-tooltip--up":h>0,"googlesitekit-visualization-tooltip--down":h<0})}">\n\t\t\t\t<p>${y}</p>\n\t\t\t\t<p>${M}</p>\n\t\t\t</div>`,d,p]),l=n(l),c=n(c)}return o}(i,a,Object.values(t)[s],s+1,i.headers[s+1]),n=["#6380b8","#4bbbbb","#3c7251","#8e68cb"];const[,...r]=o.slice(1).map(([e])=>e),l={curveType:"function",height:270,width:"100%",chartArea:{height:"80%",width:"100%",left:60},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"MMM d",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12},ticks:r},vAxis:{format:function({type:e,currencyCode:t}={}){return"METRIC_CURRENCY"===e?(0,di.Od)(t):{METRIC_TALLY:void 0,METRIC_RATIO:"percent",METRIC_DECIMAL:"decimal",METRIC_MILLISECONDS:void 0}[e]}(i.headers[s+1]),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"},series:{0:{color:n[s],targetAxisIndex:0},1:{color:n[s],targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}};return S(i,s+1)&&S(a,s+1)?l.vAxis.viewWindow.max=100:l.vAxis.viewWindow.max=void 0,(0,Z.jsx)(ni.xA,{className:"googlesitekit-adsense-site-stats",children:(0,Z.jsx)(ni.fI,{children:(0,Z.jsx)(ni.fh,{size:12,children:(0,Z.jsx)(gi.A,{chartType:"LineChart",data:o,loadingHeight:"270px",loadingWidth:"100%",options:l})})})})}Stats.propTypes={metrics:Et().object,currentRangeData:Et().object,previousRangeData:Et().object,selectedStats:Et().number.isRequired};var ui=i(84984);function StatusMigration(){const e=(0,a.useSelect)(e=>e(f.wl).getAccountID()),t=(0,a.useSelect)(t=>t(f.wl).getAFCClient(e)),i=(0,a.useSelect)(t=>t(f.wl).getCurrentSite(e)),s=(0,a.useSelect)(e=>e(f.wl).getAdminReauthURL()),o=(0,a.useSelect)(e=>e(I.M).isNavigating()),{setAccountStatus:n,setSiteStatus:r,setAccountSetupComplete:l,setSiteSetupComplete:c,saveSettings:d}=(0,a.useDispatch)(f.wl),{navigateTo:u}=(0,a.useDispatch)(I.M);let p;return t&&i&&(p=!(t.state!==f.jb||i.state!==f.jb||!i.autoAdsEnabled)),(0,m.useEffect)(()=>{p&&(async()=>{await n(b.pJ),await r(b.TF),await d()})()},[p,d,n,r]),!0===p?null:(0,Z.jsx)(ui.xA,{children:(0,Z.jsx)(ui.fI,{children:(0,Z.jsxs)(ui.fh,{size:12,children:[void 0===p&&(0,Z.jsx)(L.ProgressBar,{}),!1===p&&(0,Z.jsx)(w.A,{type:w.A.TYPES.WARNING,description:(0,g.__)("You need to redo setup to complete AdSense configuration","google-site-kit"),ctaButton:{label:(0,g.__)("Redo setup","google-site-kit"),onClick:async function(){await l(!1),await c(!1),await d(),u(s)},disabled:o,inProgress:o}})]})})})}function ModuleOverviewWidget({Widget:e,WidgetReportError:t}){const i=(0,Gt.A)(),[s,o]=(0,m.useState)(0),n=(0,a.useSelect)(e=>i?null:e(f.wl).getAccountStatus()),r=(0,a.useSelect)(e=>i?null:e(f.wl).getSiteStatus()),l=b.RL.includes(n)||r===b.Uv,{startDate:c,endDate:d,compareStartDate:g,compareEndDate:u}=(0,a.useSelect)(e=>e(te.oR).getDateRangeDates({compare:!0,offsetDays:f.f2})),p={metrics:Object.keys(ModuleOverviewWidget.metrics),startDate:c,endDate:d,reportID:"adsense_module-overview-widget_widget_currentRangeArgs"},h={metrics:Object.keys(ModuleOverviewWidget.metrics),startDate:g,endDate:u,reportID:"adsense_module-overview-widget_widget_previousRangeArgs"},I={...p,dimensions:["DATE"],reportID:"adsense_module-overview-widget_widget_currentRangeChartArgs"},y={...h,dimensions:["DATE"],reportID:"adsense_module-overview-widget_widget_previousRangeChartArgs"},A=(0,a.useInViewSelect)(e=>e(f.wl).getReport(p),[p]),M=(0,a.useInViewSelect)(e=>e(f.wl).getReport(h),[h]),N=(0,a.useInViewSelect)(e=>e(f.wl).getReport(I),[I]),k=(0,a.useInViewSelect)(e=>e(f.wl).getReport(y),[y]),S=(0,a.useSelect)(e=>!(e(f.wl).hasFinishedResolution("getReport",[p])&&e(f.wl).hasFinished
(0,a.__)("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)),r&&r.login&&(c=(0,a.sprintf)(/* translators: %s: owner name */ /* translators: %s: owner name */
(0,a.__)('This service was originally connected by the administrator "%s" — you can contact them for more information.',"google-site-kit"),r.login)),c||(c=(0,a.__)("This service was originally connected by an administrator — you can contact them for more information.","google-site-kit")),`${l} ${c}`}},32600:(e,t,i)=>{"use strict";i.d(t,{A:()=>NoticeNotification});var a=i(25797),s=i(68761),o=i(50539),n=i(8732),r=i(10740),l=i(62688),c=i.n(l),d=i(62540);function NoticeNotification({notificationID:e,children:t,dismissButton:i,ctaButton:l,gaTrackingEventArgs:c,...g}){const u=(0,s.A)(e,c?.category),{dismissNotification:m}=(0,o.useDispatch)(n.D);return(0,d.jsx)(r.xA,{children:(0,d.jsx)(r.fI,{children:(0,d.jsx)(r.fh,{size:12,alignMiddle:!0,children:(0,d.jsx)(a.A,{dismissButton:{...i,onClick:async function(t){await(i?.onClick?.(t)),u.dismiss(c?.label,c?.value),m(e,{...i?.dismissOptions||{}})}},ctaButton:{...l,onClick:async function(t){u.confirm(c?.label,c?.value),await(l?.onClick?.(t)),l?.dismissOnClick&&m(e,{...l?.dismissOptions})}},...g,children:t})})})})}NoticeNotification.propTypes={notificationID:c().string.isRequired,children:c().node,dismissButton:c().oneOfType([c().bool,c().object]),ctaButton:c().object,gaTrackingEventArgs:c().object}},32803:(e,t,i)=>{"use strict";i.d(t,{Y:()=>a});const a="search-console"},32981:(e,t,i)=>{"use strict";i.d(t,{Ii:()=>d,sq:()=>c.s,ph:()=>s,Hb:()=>o,H5:()=>r,Aj:()=>l.A,JN:()=>g});var a=i(82871);function s(e,t={}){const{keyColumnIndex:i=0,maxSlices:s,withOthers:o=!1,tooltipCallback:n}=t,{rows:r=[]}=e||{},l="function"==typeof n,c=["Source","Percent"];l&&c.push({type:"string",role:"tooltip",p:{html:!0}});const d=[c],g=r.filter(({dimensionValues:e})=>"date_range_0"===e[1].value),u=g.reduce((e,t)=>e+parseInt(t.metricValues[0].value,10),0),m=r.filter(({dimensionValues:e})=>"date_range_1"===e[1].value),p=m.reduce((e,t)=>e+parseInt(t.metricValues[0].value,10),0);let h=o,I=g.length,y=u,A=p;s>0?(h=o&&g.length>s,I=Math.min(g.length,h?s-1:s)):(h=!1,I=g.length);for(let e=0;e<I;e++){const t=g[e],a=t.metricValues[i].value,s=m.find(({dimensionValues:e})=>e[0].value===t.dimensionValues[0].value);y-=a,A-=s?s.metricValues[i].value:0;const o=u>0?a/u:0,c=[t.dimensionValues[0].value,o];if(l){const e=r.find(({dimensionValues:e})=>"date_range_1"===e[1].value&&e[0].value===t.dimensionValues[0].value);c.push(n(t,e,c))}d.push(c)}if(h&&y>0){const e=[(0,a.__)("Others","google-site-kit"),y/u];l&&e.push(n({metricValues:[{value:y}]},{metricValues:[{value:A}]},e)),d.push(e)}return d}function o(e){if(void 0===e)return;const t=(e?.rows||[]).filter(({dimensionValues:e})=>"date_range_0"===e[1].value);return 1===t?.length||t?.[0]?.metricValues?.[0]?.value===e?.totals?.[0]?.metricValues?.[0]?.value}var n=i(17243);function r(e){if(void 0!==e)return!(e?.rows&&e?.totals&&!e?.totals?.every(n.isEmpty))||!e.totals.some(e=>!!e.metricValues&&e.metricValues.some(({value:e})=>e>0))}var l=i(65379),c=(i(25427),i(74508));function d(e){return e.replace(/&amp;/gi,"&")}function g(e){return d(e).split("; ")}},33052:(e,t,i)=>{"use strict";i.d(t,{A:()=>Typography});var a=i(62688),s=i.n(a),o=i(4452),n=i.n(o),r=i(8513),l=i(62540);function Typography({className:e,type:t,size:i,as:a="span",children:s,...o}){return(0,l.jsx)(a,{className:n()("googlesitekit-typography",e,{[`googlesitekit-typography--${t}`]:t&&r.tT.includes(t),[`googlesitekit-typography--${i}`]:i&&r.oJ.includes(i)}),...o,children:s})}Typography.propTypes={className:s().string,type:s().oneOf(r.tT),size:s().oneOf(r.oJ),as:s().oneOfType([s().string,s().elementType])}},33610:(e,t,i)=>{"use strict";i.d(t,{i$:()=>ChangeMetricsLink,kB:()=>InsufficientPermissionsError,uQ:()=>w,ym:()=>MetricTileNumeric,$:()=>MetricTileTable,mF:()=>MetricTileTablePlainText,sq:()=>O.A,sB:()=>R.A});var a=i(63696),s=i(82871),o=i(50539),n=i(7972),r=i(97345),l=i(7144),c=i(38432),d=i(674),g=i(29785),u=i(13047),m=i(89065),p=i(62540);function SetupCompletedSurveyTrigger(){const e=(0,o.useSelect)(e=>e(g.O4).isKeyMetricsSetupCompleted()),t=(0,o.useSelect)(e=>e(g.O4).getKeyMetricsSetupCompletedBy()),i=(0,o.useSelect)(e=>e(
(0,c.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:h.createElement(d.A,{key:"link",href:t,external:a,onClick:y})}))}SourceLink.propTypes={name:s().string,href:s().string,className:s().string,external:s().bool};const I=SourceLink},44161:(e,t,i)=>{"use strict";i.d(t,{A:()=>GoogleChart});i(39368);var a=i(4452),s=i.n(a),o=i(32091),n=i.n(o),r=i(62688),l=i.n(r),c=i(89054),d=i(15844),g=i(52684),u=i(63696),m=i(4751),p=i(97345),h=i(13113),I=i(50539),y=i(38021),A=i.n(y),M=i(82871),N=i(12317),f=i(6730),k=i(19826),S=i(13047),T=i(83880),v=i(62540);class GoogleChartErrorHandler extends u.Component{constructor(e){super(e),this.state={error:null,info:null},this.onErrorClick=this.onErrorClick.bind(this)}componentDidCatch(e,t){i.g.console.error("Google Charts error:",e,t),this.setState({error:e,info:t}),(0,S.sx)("google_chart_error",`handle_${this.context||"unknown"}_error`,`${e?.message}\n${t?.componentStack}`.slice(0,500))}onErrorClick(){const{error:e,info:t}=this.state;A()(`\`${e?.message}\n${t?.componentStack}\``)}render(){const{children:e}=this.props,{error:t,info:i}=this.state;return t?(0,v.jsx)("div",{className:"googlesitekit-googlechart-error-handler",children:(0,v.jsx)(N.A,{description:(0,v.jsxs)(u.Fragment,{children:[(0,v.jsx)(T.A,{children:(0,M.__)("An error prevented this Google chart from being displayed properly. Report the exact contents of the error on the support forum to find out what caused it.","google-site-kit")}),(0,v.jsx)(f.A,{message:t.message,componentStack:i.componentStack})]}),onErrorClick:this.onErrorClick,onClick:this.onErrorClick,title:(0,M.__)("Error in Google Chart","google-site-kit"),error:!0})}):e}}GoogleChartErrorHandler.contextType=k.Ay,GoogleChartErrorHandler.propTypes={children:l().node.isRequired};const j=GoogleChartErrorHandler;var _=i(12417),b=i(51135),x=i(49383),C=i(62659),D=i(7076);function DateMarker({id:e,text:t}){const i=`${(0,C.A)()}_ga4-data-collection-line`;(0,u.useEffect)(()=>{(0,S.sx)(i,"chart_line_view")},[i]);const a=(0,u.useCallback)(()=>{(0,S.sx)(i,"chart_tooltip_view")},[i]),s=(0,D.d)(a,5e3,{leading:!0,trailing:!1});return(0,v.jsxs)(u.Fragment,{children:[(0,v.jsx)("div",{id:`googlesitekit-chart__date-marker-line--${e}`,className:"googlesitekit-chart__date-marker-line"}),t&&(0,v.jsx)("div",{id:`googlesitekit-chart__date-marker-tooltip--${e}`,className:"googlesitekit-chart__date-marker-tooltip",children:(0,v.jsx)(x.Tooltip,{title:t,onOpen:s,children:(0,v.jsx)("span",{children:(0,v.jsx)(_.A,{fill:"currentColor",icon:b.A,size:18})})})})]})}var E=i(7972),w=i(86582),Z=i(28975),R=i(97513);function GoogleChart(e){const{chartEvents:t,chartType:a,children:o,className:r,data:l,dateMarkers:y,getChartWrapper:A,height:M,loaded:N,loadingHeight:f,loadingWidth:k,onMouseOver:T,onMouseOut:_,onReady:b,onSelect:x,selectedStats:D,width:L,options:G,gatheringData:z,...O}=e,P=(0,g.A)(GoogleChart),B=(0,R.dv)(),{startDate:U,endDate:W}=(0,I.useSelect)(e=>e(p.oR).getDateRangeDates({offsetDays:0})),H=(0,C.A)(),V=(0,I.useSelect)(e=>e(E.n).getValue("googleChartsCollisionError")),[Y,F]=(0,u.useState)(!1),{setValue:Q}=(0,I.useDispatch)(E.n),J=(0,Z.gZ)(l,D),X="PieChart"===a?"circular":"square",q=(0,Z._8)(f,M,k,L),K=(0,v.jsx)("div",{className:"googlesitekit-chart-loading",children:(0,v.jsx)(m.A,{className:"googlesitekit-chart-loading__wrapper",shape:X,...q})}),$=(0,u.useRef)(),ee=(0,u.useRef)();(0,d.A)(()=>{void 0===V&&((0,w.A)(H)&&i.g?.google?.charts&&(i.g.google.charts=void 0),!(0,w.A)(H)&&i.g?.google?.charts?Q("googleChartsCollisionError",!0):Q("googleChartsCollisionError",!1))}),(0,u.useEffect)(()=>()=>{if(ee.current&&$.current){const{events:e}=ee.current.visualization;e.removeAllListeners($.current.getChart()),e.removeAllListeners($.current)}},[]),(0,u.useLayoutEffect)(()=>{T&&ee.current?.visualization.events.addListener($.current.getChart(),"onmouseover",e=>{T(e,{chartWrapper:$.current,google:ee.current})}),_&&ee.current?.visualization.events.addListener($.current.getChart(),"onmouseout",e=>{_(e,{chartWrapper:$.current,google:ee.current})})},[T,_]);const te=y.filter(e=>{return!!((t=new Date(e.date))&&U&&
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),s?m(s,{...l,unit:"second"}):"",a?m(a,{...l,unit:"minute"}):"",i?m(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"),s);if(0===e)return t;const o=(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"),a),r=(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"),s?t:"",a?o:"",i?r:"").trim()}}}(e,t);try{return i()}catch{return a()}}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 d(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,a.isPlainObject)(e)&&(t={...e}),t}function g(e,t={}){e=(0,a.isFinite)(e)?e:Number(e),(0,a.isFinite)(e)||(console.warn("Invalid number",e,typeof e),e=0);const i=d(t),{style:s="metric"}=i;return"metric"===s?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"),m(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"),m(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"),m(c(e),e%10==0?{}:t)):m(e,{signDisplay:"never",maximumFractionDigits:1})}(e):"duration"===s?r(e,i):"durationISO"===s?function(e){let{hours:t,minutes:i,seconds:a}=l(e);return a=("0"+a).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${a}`:`${t}:${i}:${a}`}(e):m(e,i)}const u=o()(console.warn);function m(e,t={}){const{locale:i=h(),...a}=t;try{return new Intl.NumberFormat(i,a).format(e)}catch(t){u(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(a)} ).format( ${typeof e} )`,t.message)}const s={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},o=["signDisplay","compactDisplay"],n={};for(const[e,t]of Object.entries(a))s[e]&&t===s[e]||o.includes(e)||(n[e]=t);try{return new Intl.NumberFormat(i,n).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function p(e,t={}){const{locale:i=h(),style:a="long",type:s="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:a,type:s}).format(e)}
/* translators: used between list items, there is a space after the comma. */const o=(0,n.__)(", ","google-site-kit");return e.join(o)}function h(e=i.g){const t=(0,a.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)=>{"use strict";i.d(t,{Gq:()=>g,IL:()=>h,LD:()=>m,SO:()=>u,a2:()=>s,xD:()=>p});var a=i(13047);const s="googlesitekit_",o=`${s}1.175.0_${i.g._googlesitekitBaseData.storagePrefix}_`,n=["sessionStorage","localStorage"];let r,l=[...n];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 d(){if(void 0!==r)return r;for(const e of l)r||await c(e)&&(r=i.g[e]);return void 0===r&&(r=null),r}async function g(e){const t=await d();if(t){const i=t.getItem(`${o}${e}`);if(i){const e=JSON.parse(i),{timestamp:t,ttl:a,value:s,isError:o}=e;if(t&&(!a||Math.round(Date.now()/1e3)-t<a))return{cacheHit:!0,value:s,isError:o}}}return{cacheHit:!1,value:void 0}}async function u(e,t,{ttl:s=a.Jg,timestamp:n=Math.round(Date.now()/1e3),isError:r=!1}={}){const l=await d();if(l)try{return l.setItem(`${o}${e}`,JSON.stringify({timestamp:n,ttl:s,value:t,isError:r})),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function m(e){const t=await d();if(t)try{const i=e.startsWith(s)?e:`${o}${e}`;return t.removeItem(i),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function p(){const e=await d();if(e)try{const t=[];for(let i=0;i<e.length;i++){const a=e.key(i);0===a.indexOf(s)&&t.push(a)}return t}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),[]}return[]}async function h(){if(await d()){const e=await p();for(const t of e)await m(t);return!0}return!1}},50231:(e,t,i)=>{"use strict";i.d(t,{A:()=>g});var a=i(62688),s=i.n(a),o=i(17243),n=i(4452),r=i.n(n),l=i(31589),c=i(63696),d=i(62540);function TableOverflowContainer({children:e}){const[t,i]=(0,c.useState)(!1),a=(0,c.useRef)(),s=(0,o.debounce)(n,100);function n(){if(!a.current)return;const{scrollLeft:e,scrollWidth:t,offsetWidth:s}=a.current,o=t-s;i(e<o-16&&0<o-16)}return(0,l.A)("resize",s),(0,c.useEffect)(()=>{n()},[]),(0,d.jsx)("div",{onScroll:(0,o.debounce)(n,100),className:r()("googlesitekit-table-overflow",{"googlesitekit-table-overflow--gradient":t}),children:(0,d.jsx)("div",{ref:a,className:"googlesitekit-table-overflow__container",children:e})})}TableOverflowContainer.propTypes={children:s().element};const g=TableOverflowContainer},50304:(e,t,i)=>{"use strict";i.d(t,{A:()=>IconWrapper});var a=i(62688),s=i.n(a),o=i(62540);function IconWrapper({children:e,marginLeft:t,marginRight:i}){return(0,o.jsx)("span",{className:"googlesitekit-icon-wrapper",style:{marginLeft:t,marginRight:i},children:e})}IconWrapper.propTypes={children:s().node.isRequired,marginLeft:s().number,marginRight:s().number}},50454:(e,t,i)=>{"use strict";i.d(t,{G:()=>g});var a=i(82871),s=i(97345),o=i(29785),n=i(80);function r({select:e,slug:t}){return e(n.K9).hasConversionReportingEvents(this.requiredConversionEventName)||e(s.oR).isKeyMetricActive(t)}var l=i(7144);function c({select:e,isViewOnlyDashboard:t}){return!t||!(!t||!e(n.K9).getAdSenseLinked())}function d({select:e,isViewOnlyDashboard:t}){return!t||e(n.K9).hasCustomDimensions(this.requiredCustomDimensions)}const g={[s.p3]:{title:(0,a.__)("Top earning pages","google-site-kit"),description:(0,a.__)("Pages that generated the most AdSense revenue","google-site-kit"),infoTooltip:(0,a.__)("Pages that generated the most AdSense revenue","google-site-kit"),displayInSelectionPanel:c,displayInList:c,metadata:{group:l.hs.SLUG}},[s.BT]:{title:(0,a.__)("Top recent trending pages","google-site-kit"),description:(0,a.__)("Pages with the most pageviews published in the last 3 days","google-site-kit"),i
(0,n._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,o.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,o.isDate)(t)&&!isNaN(t)}function I(e){s()((0,o.isDate)(e)&&!isNaN(e),r);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 y(e){s()(h(e),l);const[t,i,a]=e.split("-");return new Date(t,i-1,a)}function A(e,t){return I(N(e,t*u))}function M(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){s()(h(e)||(0,o.isDate)(e)&&!isNaN(e),l);const i=h(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}},51858:(e,t,i)=>{"use strict";i.d(t,{cN:()=>l,yD:()=>d});var a=i(32091),s=i.n(a),o=i(84024),n=i(30511),r=i(80);function l({siteName:e,siteURL:t,timezone:i},a=Intl.DateTimeFormat().resolvedOptions().timeZone){s()((0,o.m)(t),"A valid siteURL is required.");const{hostname:l,pathname:c}=new URL(t);return{accountName:e||l,propertyName:`${l}${c}`.replace(/\/$/,""),dataStreamName:l,countryCode:n.hd[i]||n.hd[a],timezone:n.hd[i]?i:a,[r.aj]:!0}}function c(e){const t=e.account?.match(/accounts\/([^/]+)/),i=t?.[1];return{...e,_id:i}}function d(e){return Array.isArray(e)?e.map(e=>({...c(e),propertySummaries:(e.propertySummaries||[]).map(e=>function(e){const t=e.property?.match(/properties\/([^/]+)/),i=t?.[1],a=e.parent?.match(/accounts\/([^/]+)/),s=a?.[1];return{...e,_id:i,_accountID:s}}(e))})):e}},52274:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});var a=i(63696),s=i(50539),o=i(7972);function n(e){const{setValue:t}=(0,s.useDispatch)(o.n);return(0,a.useCallback)(()=>{t("admin-screen-tooltip",{isTooltipVisible:!0,...e})},[t,e])}},52696:(e,t,i)=>{"use strict";i.d(t,{WM:()=>a.WM,wA:()=>a.wA,ws:()=>a.ws});var a=i(49057);void 0===i.g.googlesitekit&&(i.g.googlesitekit={}),i.g.googlesitekit.data=a.Ay},52721:(e,t,i)=>{"use strict";i.d(t,{w:()=>r});var a=i(35470),s=i(63696),o=i(85097);function n(){}function r(e,t){const i=(0,o.W)({sticky:!0}),r=(0,s.useRef)(),l=(0,s.useCallback)(e,t),c=(0,a.A)(i?l:n);return i&&(r.current=c),r.current}},52735:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});const a=(0,i(63696).createContext)(!1)},54286:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var a=i(62688),s=i.n(a),o=i(33052),n=i(62540);function WidgetHeaderTitle({title:e}){return(0,n.jsx)(o.A,{className:"googlesitekit-widget__header-title",as:"h3",type:"title",size:"small",children:e})}WidgetHeaderTitle.propTypes={title:s().string.isRequired};const r=WidgetHeaderTitle},54419:e=>{"use strict";e.exports=googlesitekit.api},54519:(e,t,i)=>{"use strict";function a(e,t){for(const[i,a]of Object.entries(t))e.registerNotification(i,a)}i.d(t,{U:()=>a})},55103:(e,t,i)=>{"use strict";i.d(t,{A:()=>SupportLink});var a=i(62688),s=i.n(a),o=i(50539),n=i(29785),r=i(38432),l=i(62540);function SupportLink(e){const{path:t,query:i,hash:a,...s}=e,c=(0,o.useSelect)(e=>e(n.O4).getGoogleSupportURL({path:t,query:i,hash:a}));return(0,l.jsx)(r.A,{...s,href:c})}SupportLink.propTypes={path:s().string.isRequired,query:s().object,hash:s().string}},55465:(e,t,i)=>{"use strict";i.d(t,{O:()=>s});var a=i(31234);const s=i.n(a)()(i.g)},55989:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var a=i(62688),s=i.n(a),o=i(4452),n=i.n(o),r=i(62540);function VisuallyHidden({className:e,children:t,...i}){return t?(0,r.jsx)("span",{...i,className:n()("screen-reader-text",e),children:t}):null}VisuallyHidden.propTypes={className:s().string,children:s().node},VisuallyHidden.defaultProps={className:""};const l=VisuallyHidden},56768:(e,t,i)=>{"use strict";i.d(t,{N:()=>d,g:()=>g});var a=i(32091),s=i.n(a),o=i(17243),n=i(90187),r=i(84024),l=i(51568),c=i(29785);function d(e,t){const i=t.find(t=>t.test(e));return!!i&&i.exec(e)[1]}const g=(0,o.memoize)(async({homeURL:e,ampMode:t})=>{s
(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)(d.DialogFooter,{children:[(0,u.jsx)(d.Button,{className:"mdc-dialog__cancel-button",onClick:i,disabled:M,tertiary:!0,children:(0,c.__)("Cancel","google-site-kit")}),k?(0,u.jsx)(d.Button,{href:k,onClick:p,target:"_blank",danger:A,children:I}):(0,u.jsx)(d.SpinnerButton,{onClick:p,danger:A,disabled:M,isSaving:M,children:I||(0,c.__)("Disconnect","google-site-kit")})]})]})}ModalDialog.displayName="Dialog",ModalDialog.propTypes={className:s().string,dialogActive:s().bool,handleDialog:s().func,handleConfirm:s().func.isRequired,onOpen:s().func,onClose:s().func,title:s().string,provides:s().arrayOf(s().string),confirmButton:s().string,notes:s().arrayOf(s().oneOfType([s().string,s().elementType])),danger:s().bool,small:s().bool,medium:s().bool,buttonLink:s().string};const m=ModalDialog},60515:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});var a=i(62688),s=i.n(a),o=i(4452),n=i.n(o),r=i(63696),l=i(82871),c=i(49383),d=i(5855),g=i(38432),u=i(62540);function NewBadge({tooltipTitle:e,learnMoreLink:t,forceOpen:i,hasLeftSpacing:a,hasNoSpacing:s,onLearnMoreClick:o=()=>{}}){const m=(0,u.jsx)(d.A,{className:n()("googlesitekit-new-badge",{"googlesitekit-new-badge--has-no-spacing":s}),label:(0,l.__)("New","google-site-kit"),hasLeftSpacing:a});return e?(0,u.jsx)(c.Tooltip,{tooltipClassName:"googlesitekit-new-badge__tooltip",title:(0,u.jsxs)(r.Fragment,{children:[e,(0,u.jsx)("br",{}),(0,u.jsx)(g.A,{href:t,onClick:o,external:!0,hideExternalIndicator:!0,children:(0,l.__)("Learn more","google-site-kit")})]}),placement:"top",enterTouchDelay:0,leaveTouchDelay:5e3,open:i,interactive:!0,children:m}):m}NewBadge.propTypes={tooltipTitle:s().string,learnMoreLink:s().string,forceOpen:s().bool,onLearnMoreClick:s().func,hasLeftSpacing:s().bool,hasNoSpacing:s().bool};const m=NewBadge},60947:(e,t,i)=>{"use strict";i.d(t,{A:()=>MetricTileError});var a=i(12317),s=i(82267),o=i(62540);function MetricTileError(e){const{children:t,headerText:i,infoTooltip:n,title:r}=e;return(0,o.jsx)("div",{className:"googlesitekit-km-widget-tile--error",children:(0,o.jsx)(a.A,{title:r,headerText:i,headerContent:n&&(0,o.jsx)(s.A,{title:n}),description:"",error:!0,children:t})})}},61983:(e,t,i)=>{"use strict";i.d(t,{A:()=>DismissButton});var a=i(62688),s=i.n(a),o=i(82871),n=i(49383),r=i(62540);function DismissButton({className:e,label:t=(0,o.__)("Maybe later","google-site-kit"),onClick:i,disabled:a,tertiary:s=!0}){return i?(0,r.jsx)(n.Button,{className:e,onClick:i,disabled:a,tertiary:s,children:t}):null}DismissButton.propTypes={className:s().string,label:s().string,onClick:s().func,disabled:s().bool,tertiary:s().bool,dismissOptions:s().shape({expiresInSeconds:s().number,skipHidingFromQueue:s().bool})}},62659:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var a=i(63696),s=i(19826);const __WEBPACK_DEFAULT_EXPORT__=function(){return(0,a.useContext)(s.Ay)}},63505:(e,t,i)=>{"use strict";i.d(t,{A:()=>A});var a=i(62688),s=i.n(a),o=i(4452),n=i.n(o),r=i(63696),l=i(13113),c=i(13047),d=i(62540);function Sparkline({sparkline:e,invertChangeColor:t}){let i=e;return i&&t&&(i=(0,r.cloneElement)(e,{invertChangeColor:t})),(0,d.jsx)("div",{className:"googlesitekit-data-block__sparkline",children:i})}Sparkline.propTypes={sparkline:s().element,invertChangeColor:s().bool};const g=Sparkline;var u=i(5855),m=i(82871),p=i(38017);function Change({change:e,changeDataUnit:t,period:i,invertChangeColor:a}){let s=e;return t&&(s="%"===t?(0,c.Eo)(e,{style:"percent",signDisplay:"never",maximumFractionDigits:1}):(0,c.Eo)(e,t)),i&&(s=(0,m.sprintf)(i,s)),(0,d.jsxs)("div",{className:n()("googlesitekit-data-block__change",{"googlesitekit-data-block__change--no-change":!e}),children:[!!e&&(0,d.jsx)("span",{className:"googlesitekit-data-block__arrow",children:(0,d.jsx)(p.A,{direction:0<parseFloat(e)?"up":"down",invertColor:a})}),(0,d.jsx)("span",{className:"googlesitekit-data-block__value",children:s})]})}Change.propTypes={change:s().oneOfType([s().string
(0,n.__)("%s (Please try again.)","google-site-kit"),N)),m||(N=(0,n.sprintf)(/* translators: $%s: Error message */ /* translators: $%s: Error message */
(0,n.__)("Error: %s","google-site-kit"),N));const f=t?.data?.reconnectURL;f&&(0,r.m)(f)&&(N=(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"),N,f));return(0,u.jsx)(d.A,{className:e,type:d.A.TYPES.ERROR,description:(0,u.jsx)("span",{dangerouslySetInnerHTML:(0,g.p9)(N,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}),ctaButton:M?{label:(0,n.__)("Retry","google-site-kit"),onClick:A}:void 0,hideIcon:h})}ErrorNotice.propTypes={className:s().string,error:s().shape({message:s().string}),hasButton:s().bool,storeName:s().string,message:s().string,noPrefix:s().bool,skipRetryMessage:s().bool,hideIcon:s().bool}},73730:(e,t,i)=>{"use strict";function a(e,t,i=()=>!0){return"string"==typeof e?i(e):!("object"!=typeof e||!t(e))||!!Array.isArray(e)&&e.every(e=>"string"==typeof e?i(e):"object"==typeof e&&t(e))}function s({startDate:e,endDate:t}){const i=e&&e.match(/^\d{4}-\d{2}-\d{2}$/),a=t&&t.match(/^\d{4}-\d{2}-\d{2}$/);return i&&a}function o(e){function t(e){const t=e.hasOwnProperty("fieldName")&&!!e.fieldName,i=e.hasOwnProperty("sortOrder")&&/(ASCENDING|DESCENDING)/i.test(e.sortOrder.toString());return t&&i}return Array.isArray(e)?e.every(e=>"object"==typeof e&&t(e)):"object"==typeof e&&t(e)}function n(e){return"string"==typeof e||!!Array.isArray(e)&&e.every(e=>"string"==typeof e)}i.d(t,{G4:()=>o,O5:()=>s,cX:()=>a,cq:()=>n})},73866:(e,t,i)=>{"use strict";i.d(t,{g4:()=>h,o1:()=>p});var a=i(78913),s=i(32091),o=i.n(s),n=i(10523),r=i.n(n),l=i(13047),c=i(50539);const d="RECEIVE_ERROR",g="CLEAR_ERROR",u="CLEAR_ERRORS";function m(e,t){if(t&&Array.isArray(t)){const i=t.map(e=>"object"==typeof e?(0,l.Zm)(e):e);return`${e}::${r()(JSON.stringify(i))}`}return e}const p={receiveError:(e,t,i=[])=>(o()(e,"error is required."),o()(t,"baseName is required."),o()(i&&Array.isArray(i),"args must be an array."),{type:d,payload:{error:e,baseName:t,args:i}}),clearError:(e,t=[])=>(o()(e,"baseName is required."),o()(t&&Array.isArray(t),"args must be an array."),{type:g,payload:{baseName:e,args:t}}),clearErrors:e=>({type:u,payload:{baseName:e}})};function h(e){o()(e,"storeName must be defined.");const t=(0,c.createReducer)((e,{type:t,payload:i})=>{switch(t){case d:{const{baseName:t,args:a,error:s}=i,o=m(t,a);e.errors=e.errors||{},e.errorArgs=e.errorArgs||{},e.errors[o]=s,e.errorArgs[o]=a;break}case g:{const{baseName:t,args:a}=i,s=m(t,a);e.errors=e.errors||{},e.errorArgs=e.errorArgs||{},delete e.errors[s],delete e.errorArgs[s];break}case u:{const{baseName:t}=i;if(t){e.errors=e.errors||{},e.errorArgs=e.errorArgs||{};for(const i in e.errors)(i===t||i.startsWith(`${t}::`))&&(delete e.errors[i],delete e.errorArgs[i])}else e.errors={},e.errorArgs={};break}}}),i={getErrorForSelector:(e,t,a=[])=>(o()(t,"selectorName is required."),i.getError(e,t,a)),getErrorForAction:(e,t,a=[])=>(o()(t,"actionName is required."),i.getError(e,t,a)),getError(e,t,i){const{errors:a}=e;return o()(t,"baseName is required."),a[m(t,i)]},getErrors(e){const t=new Set(Object.values(e.errors));return Array.from(t)},getMetaDataForError(e,t){const i=Object.keys(e.errors).find(i=>e.errors[i]===t);if(i){return{baseName:i.substring(0,i.indexOf("::")),args:e.errorArgs[i]}}return null},getSelectorDataForError:(0,a.N)(t=>function(i,a){const s=t(e).getMetaDataForError(a);if(s){const{baseName:i,args:a}=s;if(!!t(e)[i])return{storeName:e,name:i,args:a}}return null}),hasErrors:e=>i.getErrors(e).length>0};return{initialState:{errors:{},errorArgs:{}},actions:p,controls:{},reducer:t,resolvers:{},selectors:i}}},73881:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});const a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA4IiBoZWlnaHQ9IjI2NyIgdmlld0JveD0iMCAwIDUwOCAyNjciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xNDYxXzEwNTc2KSI+CjxwYXRoIGQ9Ik01MzMuOTg5IDIxNi4yNDNDNTA4LjI4MSAyNjkuOTc4IDQzOS41ODcgMjcwLjU1NiA0MDEuNDQyIDI2Mi4zNzFDMzUxLjY3OCAyNTEuNjkzIDMxOC42NDcgMjEyLjYzNCAyNzUuMiAyMTAuMTZDMjMxLjc1NCAyMDcuNjg1IDIwNy41MzIgMjMwLjI4OCAxNjAuNzE0IDIzNS45MzdDMTEzLjg5NSAyNDEuNTg1IDU2LjQ3NDcgMjM2LjQ1IDI2LjY5MjIgMTc4LjQyNUMtMy4wOTAyOCAxMjAuNDAxIDE3LjQ0OTMgNTguOTc2MyA3MC4zMzkgMjguMTkyM0MxMjMuMjI5IC0yLjU5MTc4IDE1NS4zMTcgMjguMzQ4MyAyMDcuNTMy
(0,n._x)("%1$s vs %2$s","Date range for chart tooltip","google-site-kit"),e[0].toLocaleDateString(S,T),k[i][0].toLocaleDateString(S,T)),y=(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],g[t](o),p,(0,l.Eo)(Math.abs(u),"%"));A.push([e[0],`<div class="${s()("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>${y}</p>\n\t\t\t</div>`,I?(0,l.vH)(o):o,I?(0,l.vH)(r):r])}),A}},74655:(e,t,i)=>{"use strict";i.d(t,{A:()=>ChangeBadge});var a=i(62688),s=i.n(a),o=i(4452),n=i.n(o),r=i(13047),l=i(62540);function ChangeBadge(e){const{previousValue:t,currentValue:i,isAbsolute:a}=e,s=a?i-t:(0,r.Zf)(t,i),o=s<0,c=0===s;return null===s?null:(0,l.jsx)("div",{className:n()("googlesitekit-change-badge",{"googlesitekit-change-badge--negative":o,"googlesitekit-change-badge--zero":c}),children:(0,r.Eo)(s,{style:"percent",signDisplay:"exceptZero",maximumFractionDigits:1})})}ChangeBadge.propTypes={isAbsolute:s().bool,previousValue:s().number.isRequired,currentValue:s().number.isRequired}},75498:(e,t,i)=>{"use strict";i.d(t,{d:()=>d});var a=i(32091),s=i.n(a),o=i(50539),n=i(29785),r=i(56768);const l="FETCH_GET_EXISTING_TAG",c="RECEIVE_GET_EXISTING_TAG";function d({storeName:e,isValidTag:t,tagMatchers:i}={}){s()("string"==typeof e&&e,"storeName is required."),s()("function"==typeof t,"isValidTag must be a function."),s()(Array.isArray(i),"tagMatchers must be an Array.");const a={existingTag:void 0},d={fetchGetExistingTag:()=>({payload:{},type:l}),receiveGetExistingTag:e=>(s()(null===e||"string"==typeof e,"existingTag must be a tag string or null."),{payload:{existingTag:t(e)?e:null},type:c})},g={[l]:(0,o.createRegistryControl)(e=>async()=>{const t=e.select(n.O4).getHomeURL(),a=e.select(n.O4).getAMPMode(),s=await(0,r.g)({homeURL:t,ampMode:a}),{getHTMLForURL:o}=e.resolveSelect(n.O4);for(const e of s){const t=await o(e),a=(0,r.N)(t,i);if(a)return a}return null})},u=(0,o.createReducer)((e,{type:t,payload:i})=>{switch(t){case c:{const{existingTag:t}=i;e.existingTag=t;break}}}),m={*getExistingTag(){const t=yield o.commonActions.getRegistry();if(void 0===t.select(e).getExistingTag()){const i=yield d.fetchGetExistingTag();t.dispatch(e).receiveGetExistingTag(i)}}},p={getExistingTag:e=>e.existingTag,hasExistingTag:(0,o.createRegistrySelector)(t=>()=>{const i=t(e).getExistingTag();if(void 0!==i)return!!i})};return{...{initialState:a,actions:d,controls:g,reducer:u,resolvers:m,selectors:p},STORE_NAME:e}}},75662:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var a=i(62688),s=i.n(a),o=i(4452),n=i.n(o),r=i(63696),l=i(10740),c=i(38432),d=i(33052),g=i(62540);class LayoutHeader extends r.Component{render(){const{title:e,badge:t,ctaLabel:i,ctaLink:a}=this.props,s=a?{alignMiddle:!0,smSize:4,lgSize:6}:{alignMiddle:!0,smSize:4,mdSize:8,lgSize:12};return(0,g.jsx)("header",{className:"googlesitekit-layout__header",children:(0,g.jsx)(l.xA,{children:(0,g.jsxs)(l.fI,{children:[e&&(0,g.jsx)(l.fh,{...s,children:(0,g.jsxs)(d.A,{as:"h3",size:"small",type:"title",className:"googlesitekit-subheading-1 googlesitekit-layout__header-title",children:[e,t]})}),a&&(0,g.jsx)(l.fh,{smSize:4,lgSize:6,alignMiddle:!0,mdAlignRight:!0,children:(0,g.jsx)(c.A,{href:a,external:!0,children:i})})]})})})}}LayoutHeader.propTypes={title:s().string,badge:s().node,ctaLabel:s().string,ctaLink:s().string},LayoutHeader.defaultProps={title:"",badge:null,ctaLabel:"",ctaLink:""};const u=LayoutHeader;var m=i(44148);class LayoutFooter extends r.Component{render(){const{ctaLabel:e,ctaLink:t,footerContent:i}=this.props;return(0,g.jsx)("footer",{className:"googlesitekit-layout__footer",children:(0,g.jsx)(l.xA,{children:(0,g.jsx)(l.fI,{children:(0,g.jsxs)(l.fh,{size:12,children:[t&&e&&(0,g.jsx)(m.A,{className:"googlesitekit-data-block__source",name:e,href:t,external:!0}),i]})})})})}}LayoutFooter.propTypes={ctaLabel:s().string,ctaLink:s().string};const p=LayoutFooter;class Layout extends r.Component{render(){const{header:e,footer:t,children:i,title:a,badge:s,headerCTALabel:o,headerCTALink:r,footerCTALabel:l,footerCTALink:c,footerContent:d,className:m,fill:h,relative:I,rounded:y
(0,l.__)("Google Account for %1$s (Email: %2$s)","google-site-kit"),s,i)),s&&!i&&(F=(0,l.sprintf)(/* translators: Account info text. 1: User's (full) name. */ /* translators: Account info text. 1: User's (full) name. */
(0,l.__)("Google Account for %1$s","google-site-kit"),s)),!s&&i&&(F=(0,l.sprintf)(/* translators: Account info text. 1: User's email address. */ /* translators: Account info text. 1: User's email address. */
(0,l.__)("Google Account (Email: %1$s)","google-site-kit"),i)),(0,I.jsxs)(c.Fragment,{children:[(0,I.jsxs)("div",{ref:j,className:"googlesitekit-user-selector googlesitekit-dropdown-menu googlesitekit-dropdown-menu__icon-menu mdc-menu-surface--anchor",children:[(0,I.jsx)(p.Button,{disabled:n,ref:_,className:"googlesitekit-header__dropdown mdc-button--dropdown googlesitekit-border-radius-round--tablet googlesitekit-border-radius-round--phone googlesitekit-border-radius-round googlesitekit-button-icon",onClick:W,icon:!!a&&(0,I.jsx)("i",{className:"mdc-button__icon mdc-button__account","aria-hidden":"true",children:(0,I.jsx)("img",{className:"mdc-button__icon--image",src:a,alt:(0,l.__)("User Avatar","google-site-kit")})}),"aria-haspopup":"menu","aria-expanded":S,"aria-controls":"user-menu","aria-label":n?void 0:(0,l.__)("Account","google-site-kit"),tooltipEnterDelayInMS:500,customizedTooltip:n?null:(0,I.jsxs)("span",{"aria-label":F,children:[(0,I.jsx)("strong",{children:(0,l.__)("Google Account","google-site-kit")}),(0,I.jsx)("br",{}),(0,I.jsx)("br",{}),s,s&&(0,I.jsx)("br",{}),i]}),text:!0,tooltip:!0}),(0,I.jsxs)(p.Menu,{className:"googlesitekit-user-menu",menuOpen:S,onSelected:V,id:"user-menu",children:[(0,I.jsx)(MenuSection,{children:(0,I.jsx)(Details,{})}),e&&(0,I.jsx)(MenuItem,{id:"manage-email-reports",icon:(0,I.jsx)(E.A,{width:"24"}),label:(0,l.__)("Manage email reports","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"}),!!t&&(0,I.jsx)(MenuItem,{id:"manage-sites",icon:(0,I.jsx)(D,{width:"24"}),label:(0,l.__)("Manage Sites","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"}),(0,I.jsx)(MenuItem,{id:"disconnect",icon:(0,I.jsx)(T,{width:"24"}),label:(0,l.__)("Disconnect","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"})]})]}),(0,I.jsx)(f.A,{children:(0,I.jsx)(h.A,{dialogActive:y,handleConfirm:Y,handleCancel:C,onClose:C,title:(0,l.__)("Disconnect","google-site-kit"),subtitle:(0,l.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:(0,l.__)("Disconnect","google-site-kit"),danger:!0,small:!0})})]})}var U=i(10740),W=i(4124),H=i(45257),V=i(15844),Y=i(31589),F=i(39525),Q=i(30521),J=i(20697),X=i(7551),q=i(11883),K=i(97513);var $=i(59352),ee=i(4169);const te={[X.Oo]:{[J.SH]:$.CONTEXT_MAIN_DASHBOARD_KEY_METRICS,[J.OT]:$.CONTEXT_MAIN_DASHBOARD_TRAFFIC,[J.en]:$.CONTEXT_MAIN_DASHBOARD_CONTENT,[J.Ej]:$.CONTEXT_MAIN_DASHBOARD_SPEED,[J.Gw]:$.CONTEXT_MAIN_DASHBOARD_MONETIZATION},[X.oE]:{[J.OT]:$.CONTEXT_ENTITY_DASHBOARD_TRAFFIC,[J.en]:$.CONTEXT_ENTITY_DASHBOARD_CONTENT,[J.Ej]:$.CONTEXT_ENTITY_DASHBOARD_SPEED,[J.Gw]:$.CONTEXT_ENTITY_DASHBOARD_MONETIZATION}};var ie;function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},ae.apply(null,arguments)}const se=e=>c.createElement("svg",ae({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18"},e),ie||(ie=c.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M18 16V2c0-1.1-1-2-2.222-2H2.222C1 0 0 .9 0 2v14c0 1.1 1 2 2.222 2h13.556C17 18 18 17.1 18 16M9 7h5V5H9zm7-5H2v14h14zM4 4h4v4H4zm10 7H9v2h5zM4 10h4v4H4z",clipRule:"evenodd"})));var oe,ne,re,le;function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},ce.apply(null,arguments)}const de=e=>c.createElement("svg",ce({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 13 12"},e),oe||(oe=c.createElement("rect",{width:5,height:5,x:.5,fill:"currentColor",rx:1})),ne||(
(0,r._x)("%1$s (%2$s)","Analytics property name and ID","google-site-kit"),t,e)},e))})}PropertySelect.propTypes={isDisabled:s().bool,hasModuleAccess:s().bool,className:s().string,onChange:s().func};var B=i(9279);function WebDataStreamHint(){const e=(0,u.useSelect)(e=>e(y.O4).getDocumentationLinkURL("ga4-data-stream"));return(0,b.jsx)(O.A,{leadingText:(0,r.__)("What is a web data stream?","google-site-kit"),tooltipText:(0,c.A)((0,r.__)("A data stream is a flow of data from your visitors to Analytics. When a data stream is created, Analytics generates a snippet of code that is added to your site to collect that data. <a>Learn more</a>","google-site-kit"),{a:(0,b.jsx)(Z.A,{href:e,external:!0,hideExternalIndicator:!0})})})}var U=i(15844),W=i(84024),H=i(14307);function WebDataStreamNameInput(){const e=(0,u.useSelect)(e=>e(h.K9).getPropertyID()),t=(0,u.useSelect)(e=>e(h.K9).getWebDataStreamID()),i=(0,_.A)(h.ZY,"webDataStreamName"),a=(0,u.useSelect)(t=>!!(0,P.Hl)(e)&&t(h.K9).doesWebDataStreamExist(e,i)),s=(0,u.useSelect)(e=>e(y.O4).getReferenceSiteURL()),{setValues:o}=(0,u.useDispatch)(M.s),c=(0,l.useCallback)(({currentTarget:e})=>{o(h.ZY,{webDataStreamName:e.value})},[o]);if((0,U.A)(()=>{if(!i&&(0,W.m)(s)){const{hostname:e}=new URL(s);o(h.ZY,{webDataStreamName:e})}}),t!==h.Oh)return null;const d=a||!i||!(0,P.uv)(i);let g=!1;return a?g=(0,r.__)("A web data stream with this name already exists.","google-site-kit"):i?(0,P.uv)(i)||(g=(0,r.__)("This is not a valid web data stream name.","google-site-kit")):g=(0,r.__)("A web data stream name is required.","google-site-kit"),(0,b.jsx)("div",{className:"googlesitekit-analytics-webdatastreamname",children:(0,b.jsx)(m.TextField,{className:n()({"mdc-text-field--error":d}),label:(0,r.__)("Web data stream name","google-site-kit"),helperText:g,trailingIcon:d&&(0,b.jsx)("span",{className:"googlesitekit-text-field-icon--error",children:(0,b.jsx)(H.A,{})}),value:i,onChange:c,outlined:!0})})}function WebDataStreamSelect(e){const{hasModuleAccess:t,isDisabled:i,className:a,onChange:s}=e,o=(0,u.useSelect)(e=>e(h.K9).getAccountID()),{propertyID:c,webDataStreamID:d,measurementID:g}=(0,u.useSelect)(e=>e(h.K9).getSettings()||{}),p=(0,u.useSelect)(e=>(0,P.Hl)(c)&&t?e(h.K9).getWebDataStreams(c):[]),I=(0,u.useSelect)(e=>!i&&e(h.K9).isLoadingWebDataStreams({hasModuleAccess:t})),y=(0,C.A)(),{setWebDataStreamID:A,updateSettingsForMeasurementID:M}=(0,u.useDispatch)(h.K9),N=(0,l.useCallback)((e,{dataset:t})=>{const i=t.value;d!==i&&(A(i),M(p.find(({_id:e})=>e===i)?.webStreamData?.measurementId||""),(0,k.sx)(`${y}_analytics`,i===h.Oh?"change_webdatastream_new":"change_webdatastream","ga4"),s&&s())},[p,d,A,M,y,s]);if(!(0,P.HX)(o))return null;if(I)return(0,b.jsx)(m.ProgressBar,{mobileVerticalSpacing:76,desktopVerticalSpacing:84,small:!0});const f=void 0===d||""===d||(0,P.dQ)(d);return!1===t?(0,b.jsx)(m.Select,{className:n()("googlesitekit-analytics-4__select-webdatastream",a),label:(0,r.__)("Web data stream","google-site-kit"),value:g,enhanced:!0,outlined:!0,disabled:!0,children:(0,b.jsx)(m.Option,{value:g,children:g})}):(0,b.jsx)(m.Select,{className:n()("googlesitekit-analytics-4__select-webdatastream",a,{"mdc-select--invalid":!f}),label:(0,r.__)("Web data stream","google-site-kit"),value:d,onEnhancedChange:N,disabled:i||!(0,P.mh)(c),enhanced:!0,outlined:!0,children:(p||[]).concat({_id:h.Oh,displayName:(0,r.__)("Set up a new web data stream","google-site-kit")}).map(({_id:e,displayName:t,webStreamData:i={}},a)=>(0,b.jsx)(m.Option,{value:e,children:e!==h.Oh&&i?.measurementId?(0,r.sprintf)(/* translators: 1: Data stream name. 2: Measurement ID. */ /* translators: 1: Data stream name. 2: Measurement ID. */
(0,r._x)("%1$s (%2$s)","Analytics data stream name and measurement ID","google-site-kit"),t,i.measurementId):t},a))})}WebDataStreamSelect.propTypes={hasModuleAccess:s().bool,isDisabled:s().bool,className:s().string};i(67526);function ZeroDataMessage({skipPrefix:e}){const t=(0,u.useSelect)(e=>e(y.O4).getCurrentEntityURL());return e?t?(0,b.jsx)("span",{children:(0,r.__)("Your page hasnt received any visitors yet","google-site-kit")}):(0,b.jsx)("span",{children:(0,r.__)("Your site hasnt received any visitors yet","google-site-kit")}):t?(0,b.jsx)("span",{children:(0,r.__)("No data to display: your page hasnt received any visitors yet","google-site-kit")}):(0,b.jsx)("span",{children:(0,r.__)("No data to display: your site hasnt received any visitors yet","google-site-kit")})}ZeroDataMessage.propTypes={skipPrefix:s().bool}},88176:e=>{"use strict";e.exports=googlesitekit.widgets},88273:(e,t,i)=>{"use strict";i.d(t,{U:()=>s,i:()=>a});const a="core/modules",s="insufficient_module_dependencies"},88933:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var a,s=i(63696);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},o.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>s.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 44"},e),a||(a=s.createElement("g",{fill:"none",fillRule:"evenodd"},s.createElement("path",{fill:"#FBBC05",d:"m2.253 12.252 7.399 5.658A13 13 0 0 0 9 22c0 1.43.229 2.805.652 4.09l-7.4 5.658A22 22 0 0 1 0 22c0-3.506.81-6.814 2.253-9.748"}),s.createElement("path",{fill:"#EA4335",d:"m9.652 17.91-7.4-5.658A21.94 21.94 0 0 1 22 0c5.6 0 10.6 2.1 14.5 5.5l-6.4 6.4C27.9 10.1 25.1 9 22 9c-5.77 0-10.64 3.725-12.348 8.91"}),s.createElement("path",{fill:"#34A853",d:"m2.25 31.742 7.396-5.67A12.975 12.975 0 0 0 22 35c6.1 0 10.7-3.1 11.8-8.5H22V18h20.5c.3 1.3.5 2.7.5 4 0 14-10 22-21 22A21.94 21.94 0 0 1 2.25 31.742"}),s.createElement("path",{fill:"#4285F4",d:"m36.34 38.52-7.025-5.437c2.297-1.45 3.895-3.685 4.485-6.583H22V18h20.5c.3 1.3.5 2.7.5 4 0 7.17-2.623 12.767-6.66 16.52"}))))},89065:(e,t,i)=>{"use strict";i.d(t,{A:()=>SurveyViewTrigger});var a=i(63696),s=i(62688),o=i.n(s),n=i(50539),r=i(97345);function SurveyViewTrigger({triggerID:e,ttl:t=0}){const{triggerSurvey:i}=(0,n.useDispatch)(r.oR);return(0,a.useEffect)(()=>{i(e,{ttl:t})},[e,t,i]),null}SurveyViewTrigger.propTypes={triggerID:o().string.isRequired,ttl:o().number}},89766:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var a=i(62688),s=i.n(a),o=i(67510),n=i(13047),r=i(62540);function NotificationFromServer({id:e,titleIcon:t,title:i,content:a,ctaLabel:s,ctaTarget:l,ctaURL:c,dismissible:d,dismissLabel:g,learnMoreLabel:u,learnMoreURL:m,onCTAClick:p,onDismissClick:h,gaTrackingEventArgs:I}){const y={expiresInSeconds:n.Jg};return(0,r.jsx)(o.A,{notificationID:e,type:o.Q.WARNING,titleIcon:t||void 0,title:i,description:a,learnMoreLink:m?{label:u,href:m}:void 0,ctaButton:{label:s,href:c,onClick:p,dismissOptions:y,external:"_blank"===l},dismissButton:d?{label:g,onClick:h,dismissOptions:y}:void 0,gaTrackingEventArgs:I})}NotificationFromServer.propTypes={id:s().string.isRequired,title:s().string.isRequired,content:s().node,ctaLabel:s().string,ctaTarget:s().string,ctaURL:s().string,dismissible:s().bool,dismissLabel:s().string,learnMoreLabel:s().string,learnMoreURL:s().string,onCTAClick:s().func,onDismissClick:s().func,gaTrackingEventArgs:s().object};const l=NotificationFromServer},89998:(e,t,i)=>{"use strict";i.d(t,{A:()=>ConnectGA4CTATileWidget});var a=i(62688),s=i.n(a),o=i(50539),n=i(15345),r=i(96820),l=i(97345),c=i(22942),d=i(64515),g=i(62540);const u={moduleSlug:c.L1};function ConnectGA4CTATileWidget({Widget:e,widgetSlug:t}){const i=(0,o.useSelect)(e=>{const t=e(l.oR).getKeyMetrics();return t?t.filter(e=>l.W6.includes(e)).length:[]})>3?d.A:n.A;return(0,r.A)(t,i,u),(0,g.jsx)(e,{children:(0,g.jsx)(n.A,{...u})})}ConnectGA4CTATileWidget.propTypes={Widget:s().elementType.isRequired,widgetSlug:s().s
(0,c.__)("Trouble getting access? <HelpLink />","google-site-kit"),{HelpLink:(0,m.jsx)(u.A,{href:e,external:!0,hideExternalIndicator:!0,children:(0,c.__)("Get help","google-site-kit")})})}GetHelpLink.propTypes={linkURL:r().string.isRequired};var p=i(4751);function MetricTileLoader(){return(0,m.jsxs)("div",{className:"googlesitekit-km-widget-tile__loading",children:[(0,m.jsx)(p.A,{className:"googlesitekit-km-widget-tile__loading-header",width:"100%",height:"14px"}),(0,m.jsx)(p.A,{className:"googlesitekit-km-widget-tile__loading-body",width:"100%",height:"53px"})]})}var h=i(60947),I=i(25064),y=i(1641),A=i(13137),M=i(13047),N=i(62659);function MetricTileWrapper(e){const{className:t,children:i,error:a,loading:n,moduleSlug:r,Widget:g,widgetSlug:u,title:p=d.G[u]?.title,infoTooltip:f=d.G[u]?.infoTooltip||d.G[u]?.description}=e,k=(0,N.A)(),S=!!a&&(0,o.castArray)(a).some(A.SG),T=(0,l.useCallback)(()=>{(0,M.sx)(`${k}_kmw`,"data_loading_error_retry")},[k]);return(0,l.useEffect)(()=>{a&&(0,M.sx)(`${k}_kmw`,"data_loading_error")},[k,a]),a?(0,m.jsx)(h.A,{title:S?(0,c.__)("Insufficient permissions","google-site-kit"):(0,c.__)("Data loading failed","google-site-kit"),headerText:p,infoTooltip:f,children:(0,m.jsx)(y.A,{moduleSlug:r,error:a,onRetry:T,GetHelpLink:S?GetHelpLink:void 0,getHelpClassName:"googlesitekit-error-retry-text"})}):(0,m.jsx)(g,{noPadding:!0,children:(0,m.jsxs)("div",{className:s()("googlesitekit-km-widget-tile",t),children:[(0,m.jsx)(I.A,{title:p,infoTooltip:f,loading:n}),(0,m.jsxs)("div",{className:"googlesitekit-km-widget-tile__body",children:[n&&(0,m.jsx)(MetricTileLoader,{}),!n&&i]})]})})}MetricTileWrapper.propTypes={Widget:r().elementType.isRequired,loading:r().bool,title:r().string,infoTooltip:r().oneOfType([r().string,r().element]),moduleSlug:r().string.isRequired}},96574:(e,t,i)=>{"use strict";i.d(t,{A:()=>ReportTable});var a=i(4452),s=i.n(a),o=i(32091),n=i.n(o),r=i(62688),l=i.n(r),c=i(17243),d=i(63696),g=i(49383),u=i(13113),m=i(62540);function ReportTable(e){const{rows:t,columns:i,className:a,limit:o,zeroState:r,gatheringData:l=!1,tabbedLayout:p=!1}=e;n()(Array.isArray(t),"rows must be an array."),n()(Array.isArray(i),"columns must be an array."),i.forEach(({Component:e,field:t=null})=>{n()(e||null!==t,"each column must define a Component and/or a field.")}),n()(Number.isInteger(o)||void 0===o,"limit must be an integer, if provided.");const h=i.some(({badge:e})=>!!e),[I,y]=(0,d.useState)(0),A=p&&i.slice(1),M=p?[i[0],A[I]]:i;return(0,m.jsxs)("div",{className:a,children:[p&&(0,m.jsx)(g.TabBar,{className:"googlesitekit-tab-bar--start-aligned-high-contrast",activeIndex:I,handleActiveIndexUpdate:y,children:A.map(({title:e,badge:t})=>(0,m.jsxs)(g.Tab,{"aria-label":e,children:[e,t]},e))}),(0,m.jsx)("div",{className:s()("googlesitekit-table","googlesitekit-table--with-list",{"googlesitekit-table--gathering-data":l}),children:(0,m.jsxs)("table",{className:s()("googlesitekit-table__wrapper",`googlesitekit-table__wrapper--${M.length}-col`,{"googlesitekit-table__wrapper--tabbed-layout":p}),children:[!p&&(0,m.jsxs)("thead",{className:"googlesitekit-table__head",children:[h&&(0,m.jsx)("tr",{className:"googlesitekit-table__head-badges",children:i.map(({badge:e,primary:t,className:i,columnHeaderClassName:a},o)=>(0,m.jsx)("th",{className:s()("googlesitekit-table__head-item","googlesitekit-table__head-item--badge",{"googlesitekit-table__head-item--primary":t},i,a),children:e},`googlesitekit-table__head-row-badge-${o}`))}),(0,m.jsx)("tr",{className:"googlesitekit-table__head-row",children:i.map(({title:e,description:t,primary:i,className:a,columnHeaderClassName:o},n)=>(0,m.jsx)("th",{className:s()("googlesitekit-table__head-item",{"googlesitekit-table__head-item--primary":i},a,o),"data-tooltip":t,children:(0,m.jsx)("span",{className:"googlesitekit-table__head-item-title",children:e})},`googlesitekit-table__head-row-${n}`))})]}),(0,m.jsxs)("tbody",{className:"googlesitekit-table__body",children:[l&&(0,m.jsx)("tr",{className:"googlesitekit-table__body-row googlesitekit-table__body-row--no-data",children:(0,m.jsx)("td",{className:
(0,l.__)("Step %1$s of %2$s (upcoming).","google-site-kit"),e,s);case M.ACTIVE:return(0,l.sprintf)(/* translators: 1: The number of the current step. 2: The total number of steps. */ /* translators: 1: The number of the current step. 2: The total number of steps. */
(0,l.__)("Step %1$s of %2$s (active).","google-site-kit"),e,s);case M.COMPLETED:return(0,l.sprintf)(/* translators: 1: The number of the current step. 2: The total number of steps. */ /* translators: 1: The number of the current step. 2: The total number of steps. */
(0,l.__)("Step %1$s of %2$s (completed).","google-site-kit"),e,s);default:return""}}return(0,N.jsx)("ol",{className:y()("googlesitekit-stepper",i),children:a.Children.map(e,(e,i)=>{const n=function(e=-1){return e<t?M.COMPLETED:e===t?M.ACTIVE:M.UPCOMING}(i),r=i+1;return(0,N.jsxs)("li",{className:y()("googlesitekit-stepper__step",`googlesitekit-stepper__step--${n}`,e.props.className),children:[(0,N.jsxs)("div",{className:"googlesitekit-stepper__step-progress",children:[(0,N.jsx)("span",{className:"googlesitekit-stepper__step-number",title:o(r,n),children:n===M.COMPLETED?(0,N.jsx)(A.A,{}):r}),r<s&&(0,N.jsx)("div",{className:"googlesitekit-stepper__step-progress-line"})]}),(0,a.cloneElement)(e,{stepStatus:n})]})})})}Stepper.propTypes={children:h().node.isRequired,activeStep:h().number,className:h().string};var f=i(33052);function Step({children:e,title:t,stepStatus:i}){return(0,N.jsxs)("div",{className:"googlesitekit-stepper__step-info",children:[(0,N.jsx)(f.A,{as:"h2",className:"googlesitekit-stepper__step-title",size:"medium",type:"title",children:t}),(0,N.jsx)("div",{className:"googlesitekit-stepper__step-content-container",children:i===M.ACTIVE&&(0,N.jsx)("div",{className:"googlesitekit-stepper__step-content",children:e})})]})}Step.propTypes={children:h().node.isRequired,title:h().string.isRequired,stepStatus:h().oneOf(Object.values(M))};var k,S,T,v,j,_,b,x,C,D,E,w,Z,R,L,G,z,O,P,B,U=i(75662),W=i(70301),H=i(29785),V=i(7972),Y=i(62659),F=i(13047),Q=i(35952);function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},J.apply(null,arguments)}const X=e=>a.createElement("svg",J({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 390 273"},e),k||(k=a.createElement("path",{fill:"#F3F5F7",d:"M22.56 28.885a85 85 0 0 1 8.606-7.899C60.044-2.097 83.903-2.06 116.934 2.153 139.265 5 158.642 18.5 182.13 17.185 205.617 15.871 238.088 7.743 264 9.5c29.5 2 37 5.5 63.227 19.385 24.273 12.85 46.312 35.426 57.388 65.284 18.985 51.177-14.865 143.285-60.259 147.628-32.893 3.148-60.039-33.973-93.239-25.376-20.452 5.297-32.583 27.515-48.362 42.177-18.409 17.107-48.199 16.032-69.755 6.902-20.542-8.699-35.63-25.926-42.338-51.32-5.107-19.338-4.595-38.709-16.86-53.857C36.497 138.947 9.432 134 1.281 94.168c-5.16-25.213 5.942-49.13 21.279-65.283"})),S||(S=a.createElement("g",{filter:"url(#ad-blocking-recovery-setup_svg__a)"},a.createElement("rect",{width:257.906,height:176.087,x:50.837,y:42.913,fill:"#fff",rx:14.086}),a.createElement("rect",{width:259.302,height:177.484,x:50.139,y:42.214,stroke:"#CBD0D3",strokeWidth:1.396,rx:14.785}))),T||(T=a.createElement("rect",{width:78,height:126.285,x:65,y:78.486,fill:"#EE92DA",rx:5.282})),v||(v=a.createElement("circle",{cx:104.5,cy:139.528,r:11,stroke:"#fff",strokeWidth:3})),j||(j=a.createElement("path",{stroke:"#fff",strokeWidth:3,d:"m112 132.028-15.5 15.5"})),_||(_=a.createElement("path",{fill:"#EBEEF0",d:"M50.837 56.999c0-7.78 6.307-14.086 14.087-14.086h229.733c7.78 0 14.086 6.306 14.086 14.086v7.258H50.837z"})),b||(b=a.createElement("rect",{width:7.115,height:7.115,x:61.509,y:50.027,fill:"#CBD0D3",rx:3.557})),x||(x=a.createElement("rect",{width:7.115,height:7.115,x:72.181,y:50.027,fill:"#CBD0D3",rx:3.557})),C||(C=a.createElement("rect",{width:125.396,height:42.688,x:164,y:78.486,fill:"#EBEEF0",rx:5.585})),D||(D=a.createElement("rect",{width:92.49,height:14.229,x:164,y:129,fill:"#EBEEF0",rx:7.115})),E||(E=a.createElement("rect",{width:108.498,height:5.585,x:164,y:151,fill:"#EBEEF0",rx:2.793})),w||(w=a.createElement("rect",{width:92.49,height:5.585,x:164,y:165,fill:"#EBEEF0",rx:2.793})),Z||(Z=a.createElement("rect",{width:125.396,height:5.585,x:164,y:179,fill:"#EBEEF0",rx:2.793})),R||(R=a.createElement("g",{filter:"url(#ad-blocking-recovery-setup_svg__b)"},a.createElement("path",{fill:"#fff",d:"M199 163c0-6.075 4.925-11 11-11h126c6.075 0 11 4.925 11 11v83.038c0 6.076-4.925 11-11 11H210c-6.075 0-11-4.924-11-11z"}),a.createElement("path",{stroke:"#CBD0D3",d:"M199.5 163c0-5
(0,l.__)("Site Kit detected AdSense code for a different account %1$s on your site. In order to configure AdSense for your current account %2$s, we recommend you use Site Kit to place the code instead.","google-site-kit"),(0,ie.c)(t),(0,ie.c)(i)),r=`${d} ${g}`):r=g,(0,N.jsx)(ae.TZ,{checkedMessage:r,uncheckedMessage:d,saveOnChange:!0})}var se=i(79257),oe=i(93431),ne=i(68728),re=i(19826);function SetupAccountSiteUI({heading:e,description:t,primaryButton:i,secondaryButton:s}){const o=(0,c.useSelect)(e=>e(Q.wl).isDoingSubmitChanges()||e(W.M).isNavigating());return(0,N.jsxs)(a.Fragment,{children:[(0,N.jsx)(f.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:e}),(0,N.jsx)(ae.kg,{}),(0,N.jsx)(m.A,{children:t}),(0,N.jsx)(SetupUseSnippetSwitch,{}),(0,N.jsxs)("div",{className:"googlesitekit-setup-module__action",children:[(0,N.jsx)(d.SpinnerButton,{onClick:i.onClick,href:i.href,disabled:o,isSaving:o,children:i.label}),s&&(0,N.jsx)("div",{className:"googlesitekit-setup-module__sub-action",children:(0,N.jsx)(d.Button,{onClick:s.onClick,tertiary:!0,children:s.label})})]})]})}function NeedsAttention(){const e=(0,a.useContext)(re.Ay),t=(0,c.useSelect)(e=>e(Q.wl).getServiceAccountManageSitesURL()),s=(0,a.useCallback)(a=>{a.preventDefault(),(0,F.sx)(`${e}_adsense`,"review_site_state","needs_attention"),i.g.open(t,"_blank")},[t,e]),o=(0,l.__)("Your site isnt ready to show ads yet","google-site-kit"),n=(0,l.__)("You need to fix some things with this site before we can connect Site Kit to your AdSense account","google-site-kit"),r={label:(0,l.__)("Review site in AdSense","google-site-kit"),href:t,onClick:s};return(0,N.jsx)(SetupAccountSiteUI,{heading:o,description:n,primaryButton:r})}function GettingReady(){const e=(0,a.useContext)(re.Ay),t=(0,c.useSelect)(e=>e(Q.wl).getServiceAccountManageSitesURL()),s=(0,a.useCallback)(a=>{a.preventDefault(),(0,F.sx)(`${e}_adsense`,"review_site_state","getting_ready"),i.g.open(t,"_blank")},[t,e]),o=(0,l.__)("Your site is getting ready","google-site-kit"),n=(0,l.__)("This usually takes a few days, but in some cases can take a few weeks. Youll get an email from AdSense as soon as they have run some checks on your site.","google-site-kit"),r={label:(0,l.__)("Review site in AdSense","google-site-kit"),href:t,onClick:s};return(0,N.jsx)(SetupAccountSiteUI,{heading:o,description:n,primaryButton:r})}function RequiresReview(){const e=(0,a.useContext)(re.Ay),t=(0,c.useSelect)(e=>e(Q.wl).getServiceAccountManageSitesURL()),s=(0,a.useCallback)(a=>{a.preventDefault(),(0,F.sx)(`${e}_adsense`,"review_site_state","requires_review"),i.g.open(t,"_blank")},[t,e]),o=(0,l.__)("Your site requires review","google-site-kit"),n=(0,l.__)("To start serving ads, your site needs to be approved first. Go to AdSense to request the review.","google-site-kit"),r={label:(0,l.__)("Request review in AdSense","google-site-kit"),href:t,onClick:s};return(0,N.jsx)(SetupAccountSiteUI,{heading:o,description:n,primaryButton:r})}function Ready({site:e,finishSetup:t}){const[s,o]=(0,a.useState)(!1),n=(0,a.useContext)(re.Ay),r=(0,c.useSelect)(e=>e(Q.wl).getExistingTag()),d=(0,c.useSelect)(e=>e(Q.wl).getServiceAccountSiteAdsPreviewURL()),g=(0,c.useSelect)(e=>e(Q.wl).isDoingSubmitChanges()),{completeSiteSetup:u,completeAccountSetup:m}=(0,c.useDispatch)(Q.wl),{setValue:p}=(0,c.useDispatch)(V.n),h=(0,a.useCallback)(e=>{e.preventDefault(),(0,F.sx)(`${n}_adsense`,"enable_auto_ads"),i.g.open(d,"_blank")},[d,n]),I=(0,a.useCallback)(e=>{e.preventDefault(),(0,F.sx)(`${n}_adsense`,"disable_auto_ads"),o(!0)},[n]),y=(0,a.useCallback)(async()=>{if(g)return;p(Q.O0,!0);const e=await u(),i=await m();p(Q.O0,!1),e&&i&&"function"==typeof t&&t()},[g,p,u,m,t]),A={};return e.autoAdsEnabled||s?(A.heading=r?(0,l.__)("Your AdSense account is ready to connect to Site Kit","google-site-kit"):(0,l.__)("Your site is ready to use AdSense","google-site-kit"),A.description=r?(0,l.__)("Connect your AdSense account to see stats on your overall earnings, page CTR, and top earning pages","google-site-kit"):(0,l.__)("Site Kit has placed AdSe
(0,l.__)("Invalid site state %s","google-site-kit"),s),skipRetryMessage:!0})}}SetupAccountSiteUI.propTypes={heading:h().string.isRequired,description:h().string.isRequired,primaryButton:h().shape({label:h().string,href:h().string,onClick:h().func}).isRequired,secondaryButton:h().shape({label:h().string,onClick:h().func})},SetupAccountSite.propTypes={site:h().shape({autoAdsEnabled:h().bool,state:h().string}).isRequired,finishSetup:h().func};var le=i(55103);function SetupAccountNoClient(){const e=(0,Y.A)(),t=(0,a.useCallback)(()=>{(0,F.sx)(`${e}_adsense`,"apply_afc")},[e]);return(0,N.jsxs)(a.Fragment,{children:[(0,N.jsx)(f.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:(0,l.__)("Looks like you need to upgrade your AdSense account","google-site-kit")}),(0,N.jsx)(ae.kg,{}),(0,N.jsx)(m.A,{children:(0,ee.A)((0,l.__)("To start using AdSense on your website, you need to upgrade your account to add “AdSense for content”. <a>Learn more</a>","google-site-kit"),{a:(0,N.jsx)(le.A,{path:"/adsense/answer/6023158","aria-label":(0,l.__)("Learn more about updating your AdSense account","google-site-kit"),external:!0})})}),(0,N.jsx)("div",{className:"googlesitekit-setup-module__action",children:(0,N.jsx)(d.Button,{href:"https://www.google.com/adsense",target:"_blank","aria-label":(0,l.__)("Learn more about updating your AdSense account","google-site-kit"),onClick:t,children:(0,l.__)("Apply now","google-site-kit")})})]})}function SetupAccountCreateSite(){const e=(0,Y.A)(),t=(0,c.useSelect)(e=>e(Q.wl).getServiceAccountManageSiteURL()),s=(0,a.useCallback)(a=>{a.preventDefault(),(0,F.sx)(`${e}_adsense`,"create_site"),i.g.open(t,"_blank")},[t,e]);return(0,N.jsxs)(a.Fragment,{children:[(0,N.jsx)(f.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:(0,l.__)("Add this site to your AdSense account","google-site-kit")}),(0,N.jsx)(ae.kg,{}),(0,N.jsx)(m.A,{children:(0,l.__)("Weve detected that you havent added this site to your AdSense account yet","google-site-kit")}),(0,N.jsx)("div",{className:"googlesitekit-setup-module__action",children:(0,N.jsx)(d.Button,{onClick:s,href:t,children:(0,l.__)("Add site to AdSense","google-site-kit")})})]})}function SetupAccountPendingTasks(){const e=(0,Y.A)(),t=(0,a.useCallback)(()=>{(0,F.sx)(`${e}_adsense`,"review_tasks")},[e]),i=(0,c.useSelect)(e=>e(Q.wl).getServiceAccountURL());return(0,N.jsxs)(a.Fragment,{children:[(0,N.jsx)(f.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:(0,l.__)("Your account isnt ready to show ads yet","google-site-kit")}),(0,N.jsx)(ae.kg,{}),(0,N.jsx)(m.A,{children:(0,l.__)("You need to fix some things before we can connect Site Kit to your AdSense account","google-site-kit")}),(0,N.jsx)(SetupUseSnippetSwitch,{}),(0,N.jsx)("div",{className:"googlesitekit-setup-module__action",children:(0,N.jsx)(d.Button,{onClick:t,href:i,children:(0,l.__)("Review AdSense account","google-site-kit")})})]})}function SetupAccount({account:e,finishSetup:t}){const{_id:i,state:s}=e,o=(0,c.useSelect)(e=>e(Q.wl).getClientID()),n=(0,c.useSelect)(e=>e(Q.wl).getCurrentSite(i)),r=(0,c.useSelect)(e=>e(Q.wl).getAFCClient(i)),{setClientID:l,setAccountStatus:g,setSiteStatus:u}=(0,c.useDispatch)(Q.wl);return(0,a.useEffect)(()=>{r?._id&&o!==r._id?l(r._id):null===r&&o&&l("")},[r,o,l]),(0,a.useEffect)(()=>{null===n&&u(ne.SG)},[u,n]),(0,a.useEffect)(()=>{void 0!==n&&(o?s===Q._L?g(ne.gV):r?.state===Q.LE?g(ne.bF):r?.state===Q.IY?g(ne.Yb):g(ne.pJ):g(ne.ze))},[s,r,o,g,n]),void 0===n?(0,N.jsx)(d.ProgressBar,{}):o?null===n?(0,N.jsx)(SetupAccountCreateSite,{}):s===Q._L||r?.state===Q.LE||r?.state===Q.IY?(0,N.jsx)(SetupAccountPendingTasks,{}):(0,N.jsx)(SetupAccountSite,{site:n,finishSetup:t}):(0,N.jsx)(SetupAccountNoClient,{})}SetupAccount.propTypes={account:h().shape({_id:h().string,state:h().string}),finishSetup:h().func};var ce=i(97345);function SetupCreateAccount(){const e=`${(0,Y.A)()}_adsense`,t=(0,c.useSelect)(e=>e(ce.oR).getEmail()),s=(0,c.useSelect)(e=>e(Q.wl).getExistingTag()),o=(0,c.
(0,l.__)("Site Kit detected AdSense code %1$s on your page. We recommend you remove that code or add %2$s as a user to the AdSense account %3$s.","google-site-kit"),s,t,(0,ie.c)(s)),!s&&(0,ee.A)((0,l.sprintf)(/* translators: %s: user email address */ /* translators: %s: user email address */
(0,l.__)("Already use AdSense? Add %s as a user to an existing AdSense account. <a>Learn more</a>","google-site-kit"),t),{a:(0,N.jsx)(le.A,{path:"/adsense/answer/2659101","aria-label":(0,l.__)("Learn more about adding a user to an existing AdSense account","google-site-kit"),external:!0})})]})]})}function SetupSelectAccount(){return(0,N.jsxs)(a.Fragment,{children:[(0,N.jsx)(f.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:(0,l.__)("Select your AdSense account","google-site-kit")}),(0,N.jsx)(ae.kg,{}),(0,N.jsx)(m.A,{children:(0,l.__)("Looks like you have multiple AdSense accounts associated with your Google account. Select the account to use with Site Kit below.","google-site-kit")}),(0,N.jsx)("div",{className:"googlesitekit-setup-module__inputs",children:(0,N.jsx)(ae.QB,{})})]})}var de=i(23955),ge=i(5664);function SetupMain_SetupMain({finishSetup:e}){const t=`${(0,Y.A)()}_adsense`,{resetAccounts:i,resetClients:s,resetSites:o,setAccountID:n,setAccountStatus:r,submitChanges:g}=(0,c.useDispatch)(Q.wl),[u,m]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!1),I=(0,c.useSelect)(e=>!!e(V.n).getValue(Q.O0)),y=(0,c.useSelect)(e=>e(ce.oR).isAdBlockerActive()),A=(0,c.useSelect)(e=>e(Q.wl).getAccounts()),M=(0,c.useSelect)(e=>e(Q.wl).getAccountID()),k=(0,c.useSelect)(e=>e(Q.wl).hasSettingChanged("accountID")),S=(0,c.useSelect)(e=>e(Q.wl).hasSettingChanged("clientID")),T=(0,c.useSelect)(e=>e(Q.wl).canSubmitChanges()),v=(0,c.useSelect)(e=>e(Q.wl).getClientID()),j=(0,c.useSelect)(e=>e(Q.wl).getAccountStatus()),_=(0,c.useSelect)(e=>e(Q.wl).hasSettingChanged("accountStatus")),b=(0,c.useSelect)(e=>e(Q.wl).getSiteStatus()),x=(0,c.useSelect)(e=>e(Q.wl).hasSettingChanged("siteStatus")),C=(0,c.useSelect)(e=>e(Q.wl).hasErrors()),D=(0,c.useSelect)(e=>e(Q.wl).hasFinishedResolution("getAccounts")),E=(0,c.useSelect)(e=>e(ce.oR).getEmail()),w=(0,c.useSelect)(e=>e(H.O4).getReferenceSiteURL()),Z=(0,c.useSelect)(e=>e(Q.wl).getExistingTag()),R=A?.find(({_id:e})=>e===M);(0,se.A)(()=>{(k&&void 0!==M||S&&void 0!==v||_&&void 0!==j||x&&void 0!==b)&&m(!0)},[M,k,v,S,j,_,b,x]),(0,a.useEffect)(()=>{if(!Array.isArray(A))return;let e;1!==A.length||M&&A[0]._id===M?0===A.length&&M&&(e=""):e=A[0]._id,void 0!==e&&(n(e),m(!0))},[A,M,n]),(0,a.useEffect)(()=>{0===A?.length?r(ne.uP):A?.length>1&&!M&&r(ne.Sw)},[r,M,A]),(0,a.useEffect)(()=>{u&&!p&&T&&!I&&(m(!1),(async()=>{h(!0),await g(),h(!1)})())},[u,p,T,g,I]);const L=(0,a.useCallback)(()=>{void 0!==j&&ne.pJ!==j&&(i(),s(),o())},[j,i,s,o]);let G;return(0,ge.$)(L,15e3),(0,a.useEffect)(()=>{void 0!==j&&(0,F.sx)(t,"receive_account_state",j)},[t,j]),(0,a.useEffect)(()=>{void 0!==b&&(0,F.sx)(t,"receive_site_state",b)},[t,b]),G=D&&void 0!==M&&void 0!==E&&void 0!==w&&void 0!==Z?C?(0,N.jsx)(ae.kg,{hasButton:!0}):A?.length?M?(0,N.jsx)(SetupAccount,{account:R,finishSetup:e}):(0,N.jsx)(SetupSelectAccount,{}):(0,N.jsx)(SetupCreateAccount,{}):(0,N.jsx)(d.ProgressBar,{}),(0,N.jsxs)("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense",children:[(0,N.jsxs)("div",{className:"googlesitekit-setup-module__step",children:[(0,N.jsx)("div",{className:"googlesitekit-setup-module__logo",children:(0,N.jsx)(oe.A,{width:"40",height:"40"})}),(0,N.jsx)(f.A,{as:"h3",className:"googlesitekit-setup-module__title",size:"small",type:"headline",children:(0,l._x)("AdSense","Service name","google-site-kit")})]}),(0,N.jsxs)("div",{className:"googlesitekit-setup-module__step",children:[(0,N.jsx)(de.A,{moduleSlug:"adsense"}),!y&&G]})]})}SetupMain_SetupMain.propTypes={finishSetup:h().func}}},e=>{e.O(0,[660],()=>{return t=27885,e(e.s=t);var t});e.O()}]);