(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[30],{10:function(e,t){e.exports=googlesitekit.components},100:function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var i=n(243),r=n(86),a=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isNaN(Number(t)))return"";var a=n.invertColor,o=void 0!==a&&a;return Object(i.a)(e.createElement(r.a,{direction:t>0?"up":"down",invertColor:o}))},o=function(e,t){return e>0&&t>0?e/t-1:e>0?1:t>0?-1:0}}).call(this,n(4))},101:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var i=n(5),r=n.n(i),a=n(14),o=n(102),c=n(103);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=s(s({},u),t);r.referenceSiteURL&&(r.referenceSiteURL=r.referenceSiteURL.toString().replace(/\/+$/,""));var l=Object(o.a)(r,n),d=Object(c.a)(r,n,l,i),g={},f=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.priority,i=void 0===n?10:n,r=t.style,a=void 0===r?l.b.BOXES:r,c=t.title,s=t.subtitle,u=t.Icon,d=t.hasNewBadge,g=void 0!==d&&d,m=t.CTA,p=t.Footer,h=t.filterActiveWidgets;return o()(e,"slug is required."),o()(Object.values(l.b).includes(a),"settings.style must be one of: ".concat(f,".")),{payload:{slug:e,settings:{priority:i,style:a,title:c,subtitle:s,Icon:u,hasNewBadge:g,CTA:m,Footer:p,filterActiveWidgets:h}},type:"REGISTER_WIDGET_AREA"}}},p=Object(u.a)((function(t,n){var i=n.type,r=n.payload;switch(i){case"ASSIGN_WIDGET_AREA":var a=r.slug;return r.contextSlugs.forEach((function(e){void 0===t.contextAssignments[e]&&(t.contextAssignments[e]=[]),t.contextAssignments[e].includes(a)||t.contextAssignments[e].push(a)})),t;case"REGISTER_WIDGET_AREA":var o=r.slug,c=r.settings;return void 0!==t.areas[o]?(e.console.warn('Could not register widget area with slug "'.concat(o,'". Widget area "').concat(o,'" is already registered.')),t):(t.areas[o]=g(g({},c),{},{slug:o}),t);default:return t}})),h={isWidgetAreaActive:Object(c.createRegistrySelector)((function(e){return function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o()(n,"widgetAreaSlug is required to check a widget area is active.");var r=i.modules,a=e(l.a).getWidgetArea(n),c=e(l.a).getWidgets(n,{modules:r});return a.filterActiveWidgets&&(c=a.filterActiveWidgets(e,c)),c.some((function(t){return e(l.a).isWidgetActive(t.slug)}))}})),isWidgetAreaRegistered:function(e,t){return void 0!==e.areas[t]},getWidgetAreas:function(e,t){o()(t,"contextSlug is required.");var n=e.areas,i=e.contextAssignments;return Object(s.a)(Object.values(n).filter((function(e){return i[t]&&i[t].includes(e.slug)})),"priority")},getWidgetArea:function(e,t){return o()(t,"slug is required."),e.areas[t]||null}};t.a={initialState:{areas:{},contextAssignments:{}},actions:m,controls:{},reducer:p,resolvers:{},selectors:h}}).call(this,n(28))},1027:function(e,t,n){"use strict";function i(e,t){return e.sort((function(e,n){return e[t]>n[t]?1:e[t]1&&void 0!==arguments[1]?arguments[1]:{},n=t.Component,i=t.priority,r=void 0===i?10:i,a=t.width,c=void 0===a?d.c.QUARTER:a,l=t.wrapWidget,s=void 0===l||l,g=t.modules,f=t.isActive,m=t.isPreloaded,h=t.hideOnBreakpoints,v=Object.values(d.c);return o()(n,"component is required to register a widget."),o()(Array.isArray(c)&&c.some(v.includes,v)||!Array.isArray(c)&&v.includes(c),"Widget width should be one of: ".concat(p,', but "').concat(c,'" was provided.')),{payload:{slug:e,settings:{Component:n,priority:r,width:c,wrapWidget:s,modules:Object(u.f)(g),isActive:f,isPreloaded:m,hideOnBreakpoints:h}},type:"REGISTER_WIDGET"}},setWidgetState:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{payload:{slug:e,Component:t,metadata:n},type:"SET_WIDGET_STATE"}},unsetWidgetState:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{payload:{slug:e,Component:t,metadata:n},type:"UNSET_WIDGET_STATE"}}},v=Object(g.a)((function(t,n){var i=n.type,r=n.payload;switch(i){case"ASSIGN_WIDGET":var a=r.slug;return r.areaSlugs.forEach((function(e){void 0===t.areaAssignments[e]&&(t.areaAssignments[e]=[]),t.areaAssignments[e].includes(a)||t.areaAssignments[e].push(a)})),t;case"REGISTER_WIDGET":var o=r.slug,c=r.settings;return void 0!==t.widgets[o]?(e.console.warn('Could not register widget with slug "'.concat(o,'". Widget "').concat(o,'" is already registered.')),t):(t.widgets[o]=m(m({},c),{},{slug:o}),t);case"SET_WIDGET_STATE":var s=r.slug,u=r.Component,d=r.metadata;return t.widgetStates[s]={Component:u,metadata:d},t;case"UNSET_WIDGET_STATE":var g,f,p,h,v=r.slug,b=r.Component,E=r.metadata;return(null===(g=t.widgetStates)||void 0===g||null===(f=g[v])||void 0===f?void 0:f.Component)===b&&Object(l.b)(null===(p=t.widgetStates)||void 0===p||null===(h=p[v])||void 0===h?void 0:h.metadata)===E&&delete t.widgetStates[v],t;default:return t}})),b={isWidgetActive:Object(s.createRegistrySelector)((function(e){return function(t,n){return o()(n,"slug is required to check a widget is active."),!Object(u.e)(e(d.a).getWidgetState(n))}})),isWidgetRegistered:function(e,t){return void 0!==e.widgets[t]},isWidgetPreloaded:Object(s.createRegistrySelector)((function(e){return function(t,n){var i,r;return!!(null===(i=t.widgets[n])||void 0===i||null===(r=i.isPreloaded)||void 0===r?void 0:r.call(i,e))}})),getWidgets:Object(s.createRegistrySelector)((function(e){return function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i.modules;o()(n,"widgetAreaSlug is required.");var a=t.areaAssignments,l=Object.values(t.widgets).filter((function(e){var t;return null===(t=a[n])||void 0===t?void 0:t.includes(e.slug)})).filter((function(t){return"function"!=typeof t.isActive||(!!t.isActive(e)||"function"==typeof t.isPreloaded&&t.isPreloaded(e))}));if(r){var s=Object(u.f)(r);l=l.filter((function(e){var t;return!(null===(t=e.modules)||void 0===t?void 0:t.length)||Object(c.intersection)(e.modules,s).length===e.modules.length}))}return l.sort((function(e,t){return e.priority-t.priority}))}})),getWidget:function(e,t){return o()(t,"slug is required to get a widget."),e.widgets[t]||null},getWidgetState:function(e,t){return e.widgetStates[t]||null},getWidgetStates:function(e){return e.widgetStates}};t.a={initialState:{areaAssignments:{},widgets:{},widgetStates:{}},actions:h,controls:{},reducer:v,resolvers:{},selectors:b}}).call(this,n(28))},103:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n(6),r=n.n(i),a=n(5),o=n.n(a),c=n(16),l=n.n(c),s=n(60);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function d(e){for(var t=1;t1?Object(f.a)(u):[],b=function(e){return l()("googlesitekit-tooltip-indicator",{active:e===c})};return e.createElement("div",r()({className:l()("googlesitekit-tour-tooltip",p.className)},h),e.createElement(o.a,{className:"googlesitekit-tooltip-card"},e.createElement("div",{className:"googlesitekit-tooltip-body"},e.createElement("h2",{className:"googlesitekit-tooltip-title"},p.title),e.createElement("div",{className:"googlesitekit-tooltip-content"},p.content)),e.createElement(a.CardActions,{className:"googlesitekit-tooltip-actions"},e.createElement("ul",{className:"googlesitekit-tooltip-indicators"},v.map((function(t){return e.createElement("li",{key:"indicator-".concat(t),className:b(t)})}))),e.createElement("div",{className:"googlesitekit-tooltip-buttons"},0!==c&&e.createElement(g.Button,r()({className:"googlesitekit-tooltip-button",text:!0},n),n.title),p.cta,s.title&&e.createElement(g.Button,r()({className:"googlesitekit-tooltip-button",text:!0},s),s.title))),e.createElement(g.Button,{className:"googlesitekit-tooltip-close",text:!0,hideTooltipTitle:!0,icon:e.createElement(m.a,{width:"14",height:"14"}),onClick:i.onClick,"aria-label":Object(d.__)("Close","google-site-kit")})))}TourTooltip.propTypes={backProps:u.a.object.isRequired,closeProps:u.a.object.isRequired,index:u.a.number.isRequired,isLastStep:u.a.bool.isRequired,primaryProps:u.a.object.isRequired,size:u.a.number.isRequired,step:u.a.shape({content:u.a.node,title:u.a.node,cta:u.a.oneOfType([u.a.element,u.a.bool]),className:u.a.string}).isRequired,tooltipProps:u.a.object.isRequired}}).call(this,n(4))},110:function(e,t,n){"use strict";var i=n(439);n.d(t,"a",(function(){return i.a}));var r=n(440);n.d(t,"b",(function(){return r.a}));var a=n(441);n.d(t,"c",(function(){return a.a}));var o=n(442);n.d(t,"d",(function(){return o.a}));var c=n(443);n.d(t,"e",(function(){return c.a}));var l=n(444);n.d(t,"f",(function(){return l.a}));var s=n(273);n.d(t,"g",(function(){return s.a}));var u=n(207);n.d(t,"h",(function(){return u.a}));n(363)},111:function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),a=n(11),o=n.n(a),c=n(211),l=n(39),s=n(2),u=n(10),d=n(76);function ModalDialog(t){var n=t.className,i=void 0===n?"":n,r=t.dialogActive,a=void 0!==r&&r,g=t.handleDialog,f=void 0===g?null:g,m=t.onOpen,p=void 0===m?null:m,h=t.onClose,v=void 0===h?null:h,b=t.title,E=void 0===b?null:b,_=t.provides,O=t.handleConfirm,y=t.subtitle,k=t.confirmButton,j=void 0===k?null:k,S=t.dependentModules,A=t.danger,w=void 0!==A&&A,T=t.inProgress,C=void 0!==T&&T,N=t.small,D=void 0!==N&&N,R=t.medium,x=void 0!==R&&R,I=t.buttonLink,M=void 0===I?null:I,P=Object(c.a)(ModalDialog),B="googlesitekit-dialog-description-".concat(P),L=!(!_||!_.length);return e.createElement(u.Dialog,{open:a,onOpen:p,onClose:v,"aria-describedby":L?B:void 0,tabIndex:"-1",className:o()(i,{"googlesitekit-dialog-sm":D,"googlesitekit-dialog-md":x})},e.createElement(u.DialogTitle,null,w&&e.createElement(d.a,{width:28,height:28}),E),y?e.createElement("p",{className:"mdc-dialog__lead"},y):[],e.createElement(u.DialogContent,null,L&&e.createElement("section",{id:B,className:"mdc-dialog__provides"},e.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},_.map((function(t){return e.createElement("li",{className:"mdc-list-item",key:t},e.createElement("span",{className:"mdc-list-item__text"},t))})))),S&&e.createElement("p",{className:"mdc-dialog__dependencies"},Object(l.a)(Object(s.sprintf)(/* translators: %s is replaced with the dependent modules. */ Object(s.__)("Note: %s","google-site-kit"),S),{strong:e.createElement("strong",null)}))),e.createElement(u.DialogFooter,null,e.createElement(u.Button,{className:"mdc-dialog__cancel-button",tertiary:!0,onClick:f,disabled:C},Object(s.__)("Cancel","google-site-kit")),M?e.createElement(u.Button,{href:M,onClick:O,target:"_blank",danger:w},j):e.createElement(u.SpinnerButton,{onClick:O,danger:w,disabled:C,isSaving:C},j||Object(s.__)("Disconnect","google-site-kit"))))}ModalDialog.displayName="Dialog",ModalDialog.propTypes={className:r.a.string,dialogActive:r.a.bool,handleDialog:r.a.func,handleConfirm:r.a.func.isRequired,onOpen:r.a.func,onClose:r.a.func,title:r.a.string,confirmButton:r.a.string,danger:r.a.bool,small:r.a.bool,medium:r.a.bool,buttonLink:r.a.string},t.a=ModalDialog}).call(this,n(4))},118:function(e,t,n){"use strict";var i=n(324),r=n(312);n.d(t,"b",(function(){return r.a}));var a=n(313);n.d(t,"c",(function(){return a.a}));var o=n(314);n.d(t,"d",(function(){return o.a}));var c=n(315);n.d(t,"a",(function(){return c.a})),t.e=i.a},119:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var i=n(5),r=n.n(i),a=n(22),o=n.n(a),c=n(15),l=n.n(c),s=n(25),u=n.n(s),d=n(244),g=n(0),f=n.n(g),m=n(1);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function h(t){function WithIntersectionObserverComponent(n){var i=n.onInView,r=u()(n,["onInView"]),a=Object(m.useRef)(),c=Object(d.a)(a,{root:null,threshold:.45}),s=Object(m.useState)(!1),g=l()(s,2),f=g[0],p=g[1],h=!!(null==c?void 0:c.isIntersecting)&&!!(null==c?void 0:c.intersectionRatio);return Object(m.useEffect)((function(){c&&h&&!f&&(i(),p(!0))}),[f,h,c,i]),e.createElement(t,o()({ref:a},r))}return WithIntersectionObserverComponent.displayName="WithIntersectionObserverComponent",(t.displayName||t.name)&&(WithIntersectionObserverComponent.displayName+="(".concat(t.displayName||t.name,")")),WithIntersectionObserverComponent.propTypes=function(e){for(var t=1;t=S&&S>0),o()(n,"mdc-layout-grid__cell--span-".concat(y,"-desktop"),12>=y&&y>0),o()(n,"mdc-layout-grid__cell--start-".concat(k,"-desktop"),12>=k&&k>0),o()(n,"mdc-layout-grid__cell--order-".concat(j,"-desktop"),12>=j&&j>0),o()(n,"mdc-layout-grid__cell--span-".concat(E,"-tablet"),8>=E&&E>0),o()(n,"mdc-layout-grid__cell--start-".concat(_,"-tablet"),8>=_&&_>0),o()(n,"mdc-layout-grid__cell--order-".concat(O,"-tablet"),8>=O&&O>0),o()(n,"mdc-layout-grid__cell--span-".concat(h,"-phone"),4>=h&&h>0),o()(n,"mdc-layout-grid__cell--start-".concat(v,"-phone"),4>=v&&v>0),o()(n,"mdc-layout-grid__cell--order-".concat(b,"-phone"),4>=b&&b>0),n))}),A)}Cell.propTypes={smSize:u.a.number,smStart:u.a.number,smOrder:u.a.number,mdSize:u.a.number,mdStart:u.a.number,mdOrder:u.a.number,lgSize:u.a.number,lgStart:u.a.number,lgOrder:u.a.number,size:u.a.number,alignTop:u.a.bool,alignMiddle:u.a.bool,alignBottom:u.a.bool,alignRight:u.a.bool,alignLeft:u.a.bool,smAlignRight:u.a.bool,mdAlignRight:u.a.bool,lgAlignRight:u.a.bool,className:u.a.string,children:u.a.node},Cell.defaultProps={className:"",size:0,smSize:0,smStart:0,smOrder:0,mdSize:0,mdStart:0,mdOrder:0,lgSize:0,lgStart:0,lgOrder:0}}).call(this,n(4))},126:function(e,t,n){"use strict";(function(e){var i=n(22),r=n.n(i),a=n(25),o=n.n(a),c=n(0),l=n.n(c),s=n(11),u=n.n(s),d=n(1),g=Object(d.forwardRef)((function(t,n){var i=t.className,a=t.children,c=o()(t,["className","children"]);return e.createElement("div",r()({ref:n,className:u()("mdc-layout-grid__inner",i)},c),a)}));g.displayName="Row",g.propTypes={className:l.a.string,children:l.a.node},g.defaultProps={className:""},t.a=g}).call(this,n(4))},127:function(e,t,n){"use strict";(function(e){var i=n(22),r=n.n(i),a=n(25),o=n.n(a),c=n(0),l=n.n(c),s=n(11),u=n.n(s),d=n(1),g=Object(d.forwardRef)((function(t,n){var i=t.alignLeft,a=t.fill,c=t.className,l=t.children,s=t.collapsed,d=o()(t,["alignLeft","fill","className","children","collapsed"]);return e.createElement("div",r()({className:u()("mdc-layout-grid",c,{"mdc-layout-grid--align-left":i,"mdc-layout-grid--collapsed":s,"mdc-layout-grid--fill":a})},d,{ref:n}),l)}));g.displayName="Grid",g.propTypes={alignLeft:l.a.bool,fill:l.a.bool,className:l.a.string,collapsed:l.a.bool,children:l.a.node},g.defaultProps={className:""},t.a=g}).call(this,n(4))},128:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t".concat(n,"")),{a:e.createElement(s.a,{key:"link",href:i,external:a})}))}SourceLink.propTypes={name:r.a.string,href:r.a.string,className:r.a.string,external:r.a.bool},SourceLink.defaultProps={name:"",href:"",className:"",external:!1},t.a=SourceLink}).call(this,n(4))},136:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ReportErrorActions}));var i=n(5),r=n.n(i),a=n(0),o=n.n(a),c=n(1),l=n(39),s=n(2),u=n(3),d=n(10),g=n(13),f=n(19),m=n(36),p=n(34),h=n(21);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t=1;t","google-site-kit"),{HelpLink:e.createElement(h.a,{href:N,external:!0,hideExternalIndicator:!0},Object(s.__)("Get help","google-site-kit"))}))),!C&&!a&&e.createElement("div",{className:_},"function"==typeof r?e.createElement(r,{linkURL:N}):e.createElement(h.a,{href:N,external:!0,hideExternalIndicator:!0},Object(s.__)("Get help","google-site-kit"))))}ReportErrorActions.propTypes={moduleSlug:o.a.string.isRequired,error:o.a.oneOfType([o.a.arrayOf(o.a.object),o.a.object]).isRequired,GetHelpLink:o.a.elementType,hideGetHelpLink:o.a.bool,buttonVariant:o.a.string,onRetry:o.a.func,onRequestAccess:o.a.func,getHelpClassName:o.a.string,RequestAccessButton:o.a.elementType,RetryButton:o.a.elementType}}).call(this,n(4))},137:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return CTAButton}));var i=n(0),r=n.n(i),a=n(10),o=n(68);function CTAButton(t){var n,i=t.label,r=t.disabled,c=t.inProgress,l=t.onClick,s=t.href,u=t.external,d=t.hideExternalIndicator;return u&&!d&&(n=e.createElement(o.a,{width:14,height:14})),e.createElement(a.SpinnerButton,{className:"googlesitekit-notice__cta",disabled:r,isSaving:c,onClick:l,href:s,target:u?"_blank":"_self",trailingIcon:n},i)}CTAButton.propTypes={label:r.a.string.isRequired,disabled:r.a.bool,inProgress:r.a.bool,onClick:r.a.func,href:r.a.string,external:r.a.bool,hideExternalIndicator:r.a.bool}}).call(this,n(4))},138:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return DismissButton}));var i=n(0),r=n.n(i),a=n(2),o=n(10);function DismissButton(t){var n=t.label,i=void 0===n?Object(a.__)("Got it","google-site-kit"):n,r=t.onClick,c=t.disabled;return e.createElement(o.Button,{onClick:r,tertiary:!0,disabled:c},i)}DismissButton.propTypes={label:r.a.string,onClick:r.a.func.isRequired,disabled:r.a.bool}}).call(this,n(4))},142:function(e,t,n){"use strict";var i=n(1),r=Object(i.createContext)(!1);t.a=r},145:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(1),r=n(3),a=n(48);function o(e,t,n){var o=Object(r.useDispatch)(a.a),c=o.setWidgetState,l=o.unsetWidgetState;Object(i.useEffect)((function(){return c(e,t,n),function(){l(e,t,n)}}),[e,t,n,c,l])}},147:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var i=n(5),r=n.n(i),a=n(2),o=n(7),c=n(13),l=n(8);function s(e,t,n){return e(l.r).hasConversionReportingEvents(this.requiredConversionEventName)||e(o.a).isKeyMetricActive(n)}var u,d=n(26);function g(e,t){return!t||!(!t||!e(l.r).getAdSenseLinked())}function f(e,t){return!t||e(l.r).hasCustomDimensions(this.requiredCustomDimensions)}var m=(u={},r()(u,o.f,{title:Object(a.__)("Top earning pages","google-site-kit"),description:Object(a.__)("Pages that generated the most AdSense revenue","google-site-kit"),infoTooltip:Object(a.__)("Pages that generated the most AdSense revenue","google-site-kit"),displayInSelectionPanel:g,displayInList:g,metadata:{group:d.b.SLUG}}),r()(u,o.y,{title:Object(a.__)("Top recent trending pages","google-site-kit"),description:Object(a.__)("Pages with the most pageviews published in the last 3 days","google-site-kit"),infoTooltip:Object(a.__)("Pages with the most pageviews published in the last 3 days","google-site-kit"),requiredCustomDimensions:["googlesitekit_post_date"],displayInSelectionPanel:f,displayInWidgetArea:f,displayInList:f,metadata:{group:d.b.SLUG}}),r()(u,o.l,{title:Object(a.__)("Most popular authors by pageviews","google-site-kit"),description:Object(a.__)("Authors whose posts got the most visits","google-site-kit"),infoTooltip:Object(a.__)("Authors whose posts got the most visits","google-site-kit"),requiredCustomDimensions:["googlesitekit_post_author"],displayInSelectionPanel:f,displayInWidgetArea:f,displayInList:f,metadata:{group:d.b.SLUG}}),r()(u,o.p,{title:Object(a.__)("Top categories by pageviews","google-site-kit"),description:Object(a.__)("Categories that your site visitors viewed the most","google-site-kit"),infoTooltip:Object(a.__)("Categories that your site visitors viewed the most","google-site-kit"),requiredCustomDimensions:["googlesitekit_post_categories"],displayInSelectionPanel:f,displayInWidgetArea:f,displayInList:f,metadata:{group:d.b.SLUG}}),r()(u,o.m,{title:Object(a.__)("Most popular content by pageviews","google-site-kit"),description:Object(a.__)("Pages that brought in the most visitors","google-site-kit"),infoTooltip:Object(a.__)("Pages your visitors read the most","google-site-kit"),metadata:{group:d.b.SLUG}}),r()(u,o.n,{title:Object(a.__)("Most popular products by pageviews","google-site-kit"),description:Object(a.__)("Products that brought in the most visitors","google-site-kit"),requiredCustomDimensions:["googlesitekit_post_type"],displayInSelectionPanel:function(e){return e(o.a).isKeyMetricActive(o.n)||e(c.c).getProductPostType()},displayInWidgetArea:f,metadata:{group:d.f.SLUG}}),r()(u,o.k,{title:Object(a.__)("Pages per visit","google-site-kit"),description:Object(a.__)("Number of pages visitors viewed per session on average","google-site-kit"),infoTooltip:Object(a.__)("Number of pages visitors viewed per session on average","google-site-kit"),metadata:{group:d.h.SLUG}}),r()(u,o.F,{title:Object(a.__)("Visit length","google-site-kit"),description:Object(a.__)("Average duration of engaged visits","google-site-kit"),infoTooltip:Object(a.__)("Average duration of engaged visits","google-site-kit"),metadata:{group:d.h.SLUG}}),r()(u,o.E,{title:Object(a.__)("Visits per visitor","google-site-kit"),description:Object(a.__)("Average number of sessions per site visitor","google-site-kit"),infoTooltip:Object(a.__)("Average number of sessions per site visitor","google-site-kit"),metadata:{group:d.h.SLUG}}),r()(u,o.i,{title:Object(a.__)("Most engaging pages","google-site-kit"),description:Object(a.__)("Pages with the highest engagement rate","google-site-kit"),infoTooltip:Object(a.__)("Pages with the highest engagement rate","google-site-kit"),metadata:{group:d.b.SLUG}}),r()(u,o.h,{title:Object(a.__)("Least engaging pages","google-site-kit"),description:Object(a.__)("Pages with the highest percentage of visitors that left without engagement with your site","google-site-kit"),infoTooltip:Object(a.__)("Percentage of visitors that left without engagement with your site","google-site-kit"),metadata:{group:d.b.SLUG}}),r()(u,o.z,{title:Object(a.__)("Top pages by returning visitors","google-site-kit"),description:Object(a.__)("Pages that attracted the most returning visitors","google-site-kit"),infoTooltip:Object(a.__)("Pages that attracted the most returning visitors","google-site-kit"),metadata:{group:d.h.SLUG}}),r()(u,o.j,{title:Object(a.__)("New visitors","google-site-kit"),description:Object(a.__)("How many new visitors you got and how the overall audience changed","google-site-kit"),infoTooltip:Object(a.__)("Portion of visitors who visited your site for the first time in this timeframe","google-site-kit"),metadata:{group:d.h.SLUG}}),r()(u,o.o,{title:Object(a.__)("Returning visitors","google-site-kit"),description:Object(a.__)("Portion of people who visited your site more than once","google-site-kit"),infoTooltip:Object(a.__)("Portion of your site’s visitors that returned at least once in this timeframe","google-site-kit"),metadata:{group:d.h.SLUG}}),r()(u,o.A,{title:Object(a.__)("Top traffic source","google-site-kit"),description:Object(a.__)("Channel which brought in the most visitors to your site","google-site-kit"),infoTooltip:Object(a.__)("Channel (e.g. social, paid, search) that brought in the most visitors to your site","google-site-kit"),metadata:{group:d.d.SLUG}}),r()(u,o.B,{title:Object(a.__)("Top traffic source driving add to cart","google-site-kit"),description:Object(a.__)("Channel which brought in the most add to cart events to your site","google-site-kit"),infoTooltip:Object(a.__)("Channel (e.g. social, paid, search) that brought in the most add to cart events to your site","google-site-kit"),requiredConversionEventName:[l.l.ADD_TO_CART],displayInSelectionPanel:s,displayInList:s,metadata:{group:d.f.SLUG}}),r()(u,o.C,{title:Object(a.__)("Top traffic source driving leads","google-site-kit"),description:Object(a.__)("Channel which brought in the most leads to your site","google-site-kit"),infoTooltip:Object(a.__)("Channel (e.g. social, paid, search) that brought in the most leads to your site","google-site-kit"),requiredConversionEventName:[l.l.SUBMIT_LEAD_FORM,l.l.CONTACT,l.l.GENERATE_LEAD],displayInSelectionPanel:s,displayInList:s,metadata:{group:d.e.SLUG}}),r()(u,o.D,{title:Object(a.__)("Top traffic source driving purchases","google-site-kit"),description:Object(a.__)("Channel which brought in the most purchases to your site","google-site-kit"),infoTooltip:Object(a.__)("Channel (e.g. social, paid, search) that brought in the most purchases to your site","google-site-kit"),requiredConversionEventName:[l.l.PURCHASE],displayInSelectionPanel:s,displayInList:s,metadata:{group:d.f.SLUG}}),r()(u,o.g,{title:Object(a.__)("Most engaged traffic source","google-site-kit"),description:Object(a.__)("Visitors coming via this channel spent the most time on your site","google-site-kit"),infoTooltip:Object(a.__)("Channel (e.g. social, paid, search) that brought in the most visitors who had a meaningful engagement with your site","google-site-kit"),metadata:{group:d.d.SLUG}}),r()(u,o.u,{title:Object(a.__)("Top converting traffic source","google-site-kit"),description:Object(a.__)("Channel which brought in the most visits that resulted in conversions","google-site-kit"),infoTooltip:Object(a.__)("Channel (e.g. social, paid, search) that brought in visitors who generated the most conversions","google-site-kit"),metadata:{group:d.d.SLUG}}),r()(u,o.q,{title:Object(a.__)("Top cities driving traffic","google-site-kit"),description:Object(a.__)("Which cities you get the most visitors from","google-site-kit"),infoTooltip:Object(a.__)("The cities where most of your visitors came from","google-site-kit"),metadata:{group:d.d.SLUG}}),r()(u,o.s,{title:Object(a.__)("Top cities driving leads","google-site-kit"),description:Object(a.__)("Cities driving the most contact form submissions","google-site-kit"),infoTooltip:Object(a.__)("Cities driving the most contact form submissions","google-site-kit"),requiredConversionEventName:[l.l.SUBMIT_LEAD_FORM,l.l.CONTACT,l.l.GENERATE_LEAD],displayInSelectionPanel:s,displayInList:s,metadata:{group:d.e.SLUG}}),r()(u,o.r,{title:Object(a.__)("Top cities driving add to cart","google-site-kit"),description:Object(a.__)("Cities where visitors most frequently add products to their carts","google-site-kit"),infoTooltip:Object(a.__)("Cities where visitors most frequently add products to their carts","google-site-kit"),requiredConversionEventName:[l.l.ADD_TO_CART],displayInSelectionPanel:s,displayInList:s,metadata:{group:d.f.SLUG}}),r()(u,o.t,{title:Object(a.__)("Top cities driving purchases","google-site-kit"),description:Object(a.__)("Cities driving the most purchases","google-site-kit"),infoTooltip:Object(a.__)("Cities driving the most purchases","google-site-kit"),requiredConversionEventName:[l.l.PURCHASE],displayInSelectionPanel:s,displayInList:s,metadata:{group:d.f.SLUG}}),r()(u,o.w,{title:Object(a.__)("Top device driving purchases","google-site-kit"),description:Object(a.__)("Top device driving the most purchases","google-site-kit"),infoTooltip:Object(a.__)("Top device driving the most purchases","google-site-kit"),requiredConversionEventName:[l.l.PURCHASE],displayInSelectionPanel:s,displayInList:s,metadata:{group:d.f.SLUG}}),r()(u,o.v,{title:Object(a.__)("Top countries driving traffic","google-site-kit"),description:Object(a.__)("Which countries you get the most visitors from","google-site-kit"),infoTooltip:Object(a.__)("The countries where most of your visitors came from","google-site-kit"),metadata:{group:d.d.SLUG}}),r()(u,o.G,{title:Object(a.__)("Top performing keywords","google-site-kit"),description:Object(a.__)("What people searched for before they came to your site","google-site-kit"),infoTooltip:Object(a.__)("The top search queries for your site by highest clickthrough rate","google-site-kit"),metadata:{group:d.d.SLUG}}),r()(u,o.x,{title:Object(a.__)("Top pages driving leads","google-site-kit"),description:Object(a.__)("Pages on which forms are most frequently submitted","google-site-kit"),requiredConversionEventName:[l.l.SUBMIT_LEAD_FORM,l.l.CONTACT,l.l.GENERATE_LEAD],displayInSelectionPanel:s,displayInList:s,metadata:{group:d.e.SLUG}}),u)},152:function(e,t,n){"use strict";(function(e,i){var r=n(54),a=n.n(r),o=n(55),c=n.n(o),l=n(72),s=n.n(l),u=n(73),d=n.n(u),g=n(56),f=n.n(g),m=n(0),p=n.n(m),h=n(1),v=n(2),b=n(53);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=f()(e);if(t){var r=f()(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return d()(this,n)}}var _=function(t){s()(MediaErrorHandler,t);var n=E(MediaErrorHandler);function MediaErrorHandler(e){var t;return a()(this,MediaErrorHandler),(t=n.call(this,e)).state={error:null},t}return c()(MediaErrorHandler,[{key:"componentDidCatch",value:function(t,n){e.console.error("Caught an error:",t,n),this.setState({error:t})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.errorMessage;return this.state.error?i.createElement(b.a,{message:n}):t}}]),MediaErrorHandler}(h.Component);_.defaultProps={errorMessage:Object(v.__)("Failed to load media","google-site-kit")},_.propTypes={children:p.a.node.isRequired,errorMessage:p.a.string.isRequired},t.a=_}).call(this,n(28),n(4))},155:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return new Array(null!=e?e:0).fill().map((function(e,t){return t}))}},160:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n(6),r=n.n(i),a=n(16),o=n.n(a),c=n(1),l=n(3),s=n(13),u=n(7),d=n(19),g=n(32),f=n(38),m=n(37),p=n(18);function h(e){var t=Object(p.a)(),n=Object(l.useSelect)((function(t){return t(d.a).getModule(e)})),i=Object(l.useSelect)((function(e){return e(u.a).hasCapability(u.K)})),a=Object(l.useDispatch)(d.a).activateModule,h=Object(l.useDispatch)(g.a).navigateTo,v=Object(l.useDispatch)(s.c).setInternalServerError,b=Object(c.useCallback)(o()(r.a.mark((function n(){var i,o,c;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,a(e);case 2:if(i=n.sent,o=i.error,c=i.response,o){n.next=13;break}return n.next=8,Object(m.b)("".concat(t,"_widget-activation-cta"),"activate_module",e);case 8:return n.next=10,Object(f.f)("module_setup",e,{ttl:300});case 10:h(c.moduleReauthURL),n.next=14;break;case 13:v({id:"".concat(e,"-setup-error"),description:o.message});case 14:case"end":return n.stop()}}),n)}))),[a,e,h,v,t]);return(null==n?void 0:n.name)&&i?b:null}},161:function(e,t,n){"use strict";var i=n(142),r=(i.a.Consumer,i.a.Provider);t.a=r},165:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return RecoverableModules}));var i=n(0),r=n.n(i),a=n(2),o=n(3),c=n(19),l=n(97);function RecoverableModules(t){var n=t.moduleSlugs,i=Object(o.useSelect)((function(e){var t=e(c.a).getModules();if(void 0!==t)return n.map((function(e){return t[e].name}))}));if(void 0===i)return null;var r=1===i.length?Object(a.sprintf)(/* translators: %s: Module name */ Object(a.__)("%s data was previously shared by an admin who no longer has access. Please contact another admin to restore it.","google-site-kit"),i[0]):Object(a.sprintf)(/* translators: %s: List of module names */ Object(a.__)("The data for the following modules was previously shared by an admin who no longer has access: %s. Please contact another admin to restore it.","google-site-kit"),i.join(Object(a._x)(", ","Recoverable modules","google-site-kit")));return e.createElement(l.a,{title:Object(a.__)("Data Unavailable","google-site-kit"),description:r})}RecoverableModules.propTypes={moduleSlugs:r.a.arrayOf(r.a.string).isRequired}}).call(this,n(4))},167:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var i=n(2),r="audience-segmentation-info-notice-ui",a="audience-segmentation-info-notice",o=[{slug:"new-visitors",content:Object(i.__)("The higher the portion of new visitors you have, the more your audience is growing. Looking at what content brings them to your site may give you insights on how to reach even more people.","google-site-kit")},{slug:"compare-metrics",content:Object(i.__)("Select up to three visitor groups to display on the dashboard and easily compare metrics between them.","google-site-kit")},{slug:"custom-audiences",content:Object(i.__)("Configure your own custom audiences in Analytics to gain deeper insights into visitor behavior, for example consider creating an “Existing customers” or “Subscribers” segment, depending on what goals you have for your site.","google-site-kit")},{slug:"purchasers",content:Object(i.__)("Select the Purchasers visitor group to gain insights into which visitors bring the most revenue to your site.","google-site-kit")},{slug:"returning-visitors",content:Object(i.__)("The more returning visitors your site has, the stronger and more loyal an audience you’re building. Check which content brings people back to your site - it might help you create a strategy to build a community.","google-site-kit")},{slug:"compare-new-returning",content:Object(i.__)("Compare the ratio of “new” to “returning” visitors – this can give you insights on whether you have more people stopping by as a one-off, or more loyal visitors.","google-site-kit")},{slug:"compare-cities",content:Object(i.__)("Check the cities which bring you more new vs more returning visitors – there might be new audiences you could engage with in locations you hadn’t thought about.","google-site-kit")}]},168:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(2);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t||{},r=n.slug,a=void 0===r?"":r,o=n.name,c=void 0===o?"":o,l=n.owner,s=void 0===l?{}:l;if(!a||!c)return e;var u="",d="";return"analytics-4"===a?e.match(/account/i)?u=Object(i.__)("Your Google account does not have sufficient permissions for this Analytics account, so you won’t be able to see stats from it on the Site Kit dashboard.","google-site-kit"):e.match(/property/i)?u=Object(i.__)("Your Google account does not have sufficient permissions for this Analytics property, so you won’t be able to see stats from it on the Site Kit dashboard.","google-site-kit"):e.match(/view/i)&&(u=Object(i.__)("Your Google account does not have sufficient permissions for this Analytics view, so you won’t be able to see stats from it on the Site Kit dashboard.","google-site-kit")):"search-console"===a&&(u=Object(i.__)("Your Google account does not have sufficient permissions for this Search Console property, so you won’t be able to see stats from it on the Site Kit dashboard.","google-site-kit")),u||(u=Object(i.sprintf)(/* translators: %s: module name */ Object(i.__)("Your Google account does not have sufficient permissions to access %s data, so you won’t be able to see stats from it on the Site Kit dashboard.","google-site-kit"),c)),s&&s.login&&(d=Object(i.sprintf)(/* translators: %s: owner name */ Object(i.__)('This service was originally connected by the administrator "%s" — you can contact them for more information.',"google-site-kit"),s.login)),d||(d=Object(i.__)("This service was originally connected by an administrator — you can contact them for more information.","google-site-kit")),"".concat(u," ").concat(d)}},169:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ReportError}));var i=n(5),r=n.n(i),a=n(0),o=n.n(a),c=n(14),l=n(1),s=n(2),u=n(3),d=n(19),g=n(36),f=n(168),m=n(85),p=n(53),h=n(97),v=n(136),b=n(34);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _(e){for(var t=1;t1&&(n=Object(s.sprintf)(/* translators: %s: module name */ Object(s.__)("Data errors in %s","google-site-kit"),null==o?void 0:o.name)):n=Object(s.sprintf)(/* translators: %s: module name */ Object(s.__)("Data error in %s","google-site-kit"),null==o?void 0:o.name);var j=e.createElement(l.Fragment,null,y.map((function(t){var n,i=null==r||null===(n=r.data)||void 0===n?void 0:n.reconnectURL;return i?e.createElement(p.a,{key:t.message,message:t.message,reconnectURL:i}):e.createElement("p",{key:t.message},m.a.sanitize(t.message,{ALLOWED_TAGS:[]}))})));return e.createElement(h.a,{title:n,description:j,error:!0},e.createElement(v.a,{moduleSlug:i,error:r}))}ReportError.propTypes={moduleSlug:o.a.string.isRequired,error:o.a.oneOfType([o.a.arrayOf(o.a.object),o.a.object]).isRequired}}).call(this,n(4))},17:function(e,t,n){"use strict";var i=n(256);n.d(t,"i",(function(){return i.a}));var r=n(317);n.d(t,"f",(function(){return r.a}));var a=n(318);n.d(t,"h",(function(){return a.a}));var o=n(319);n.d(t,"j",(function(){return o.a}));var c=n(316);n.d(t,"g",(function(){return c.a}));var l=n(93),s=n.n(l);n.d(t,"b",(function(){return s.a})),n.d(t,"c",(function(){return l.DialogContent})),n.d(t,"d",(function(){return l.DialogFooter}));var u=n(104);n.d(t,"a",(function(){return u.a})),n.d(t,"e",(function(){return u.b})),n.d(t,"k",(function(){return u.c}))},171:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Icon}));var i,r=n(5),a=n.n(r),o=n(0),c=n.n(o),l=n(132),s=n(88),u=n(106),d=n(47),g=(i={},a()(i,d.a.NEW,u.a),a()(i,d.a.SUCCESS,l.a),a()(i,d.a.INFO,s.a),a()(i,d.a.WARNING,s.a),a()(i,d.a.ERROR,s.a),i);function Icon(t){var n=t.type,i=g[n]||s.a;return e.createElement(i,{width:24,height:24})}Icon.propTypes={type:c.a.oneOf(Object.values(d.a))}}).call(this,n(4))},172:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Title}));var i=n(11),r=n.n(i),a=n(0),o=n.n(a);function Title(t){var n=t.className,i=t.children;return e.createElement("p",{className:r()("googlesitekit-notice__title",n)},i)}Title.propTypes={className:o.a.string,children:o.a.node}}).call(this,n(4))},173:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Description}));var i=n(11),r=n.n(i),a=n(0),o=n.n(a);function Description(t){var n=t.className,i=t.children;return e.createElement("p",{className:r()("googlesitekit-notice__description",n)},i)}Description.propTypes={className:o.a.string,children:o.a.node}}).call(this,n(4))},177:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ReportZero}));var i=n(0),r=n.n(i),a=n(2),o=n(3),c=n(19),l=n(97);function ReportZero(t){var n=t.moduleSlug,i=Object(o.useSelect)((function(e){return e(c.a).getModule(n)}));return e.createElement(l.a,{title:Object(a.sprintf)(/* translators: %s: Module name */ Object(a.__)("%s Gathering Data","google-site-kit"),null==i?void 0:i.name),description:Object(a.sprintf)(/* translators: %s: Module name */ Object(a.__)("%s data is not yet available, please check back later","google-site-kit"),null==i?void 0:i.name)})}ReportZero.propTypes={moduleSlug:r.a.string.isRequired}}).call(this,n(4))},178:function(e,t,n){"use strict";var i=n(220);n.d(t,"b",(function(){return i.a}));var r=n(224);n.d(t,"a",(function(){return r.a}))},179:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(380);function r(e){return Object(i.a)(e)}},18:function(e,t,n){"use strict";var i=n(1),r=n(63);t.a=function(){return Object(i.useContext)(r.b)}},180:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceTileLoading}));var i=n(43);function AudienceTileLoading(){return e.createElement("div",{className:"googlesitekit-audience-segmentation-tile-loading"},e.createElement(i.a,{width:"100%",height:"20px"}),e.createElement(i.a,{width:"100%",height:"52px"}),e.createElement(i.a,{width:"100%",height:"52px"}),e.createElement(i.a,{width:"100%",height:"52px"}),e.createElement(i.a,{width:"100%",height:"52px"}),e.createElement(i.a,{width:"100%",height:"52px"}),e.createElement(i.a,{width:"100%",height:"52px"}))}}).call(this,n(4))},182:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ActionsCTALinkDismiss}));var i=n(0),r=n.n(i),a=n(2),o=n(1),c=n(3),l=n(32),s=n(210),u=n(189);function ActionsCTALinkDismiss(t){var n=t.id,i=t.className,r=void 0===i?"googlesitekit-publisher-win__actions":i,d=t.ctaLink,g=t.ctaLabel,f=t.ctaDisabled,m=void 0!==f&&f,p=t.onCTAClick,h=t.ctaDismissOptions,v=t.isSaving,b=void 0!==v&&v,E=t.onDismiss,_=void 0===E?function(){}:E,O=t.dismissLabel,y=void 0===O?Object(a.__)("OK, Got it!","google-site-kit"):O,k=t.dismissOnCTAClick,j=void 0===k||k,S=t.dismissExpires,A=void 0===S?0:S,w=t.dismissOptions,T=void 0===w?{}:w,C=t.gaTrackingEventArgs,N=void 0===C?{}:C,D=Object(c.useSelect)((function(e){return!!d&&e(l.a).isNavigatingTo(d)}));return e.createElement(o.Fragment,null,e.createElement("div",{className:r},e.createElement(u.a,{id:n,ctaLink:d,ctaLabel:g,onCTAClick:p,dismissOnCTAClick:j,dismissExpires:A,dismissOptions:h,gaTrackingEventArgs:N,isSaving:b,isDisabled:m}),e.createElement(s.a,{id:n,primary:!1,dismissLabel:y,dismissExpires:A,disabled:D,onDismiss:_,dismissOptions:T,gaTrackingEventArgs:N})))}ActionsCTALinkDismiss.propTypes={id:r.a.string,className:r.a.string,ctaDisabled:r.a.bool,ctaLink:r.a.string,ctaLabel:r.a.string,onCTAClick:r.a.func,isSaving:r.a.bool,onDismiss:r.a.func,ctaDismissOptions:r.a.object,dismissLabel:r.a.string,dismissOnCTAClick:r.a.bool,dismissExpires:r.a.number,dismissOptions:r.a.object,gaTrackingEventArgs:r.a.object}}).call(this,n(4))},187:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ChangeBadge}));var i=n(0),r=n.n(i),a=n(11),o=n.n(a),c=n(9);function ChangeBadge(t){var n=t.previousValue,i=t.currentValue,r=t.isAbsolute?i-n:Object(c.g)(n,i),a=r<0,l=0===r;return null===r?null:e.createElement("div",{className:o()("googlesitekit-change-badge",{"googlesitekit-change-badge--negative":a,"googlesitekit-change-badge--zero":l})},Object(c.B)(r,{style:"percent",signDisplay:"exceptZero",maximumFractionDigits:1}))}ChangeBadge.propTypes={isAbsolute:r.a.bool,previousValue:r.a.number.isRequired,currentValue:r.a.number.isRequired}}).call(this,n(4))},189:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return CTALink}));var i=n(6),r=n.n(i),a=n(5),o=n.n(a),c=n(16),l=n.n(c),s=n(15),u=n.n(s),d=n(0),g=n.n(d),f=n(209),m=n(1),p=n(3),h=n(33),v=n(32),b=n(13),E=n(71),_=n(10);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function y(e){for(var t=1;t1280?r:e>960?a:e>600?o:c}},207:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return MetricTileWrapper}));var i=n(11),r=n.n(i),a=n(14),o=n(0),c=n.n(o),l=n(1),s=n(2),u=n(147),d=n(461),g=n(462),f=n(304),m=n(387),p=n(136),h=n(36),v=n(9),b=n(18);function MetricTileWrapper(t){var n,i,o,c=t.className,E=t.children,_=t.error,O=t.loading,y=t.moduleSlug,k=t.Widget,j=t.widgetSlug,S=t.title,A=void 0===S?null===(n=u.a[j])||void 0===n?void 0:n.title:S,w=t.infoTooltip,T=void 0===w?(null===(i=u.a[j])||void 0===i?void 0:i.infoTooltip)||(null===(o=u.a[j])||void 0===o?void 0:o.description):w,C=Object(b.a)(),N=!!_&&Object(a.castArray)(_).some(h.e),D=Object(l.useCallback)((function(){Object(v.I)("".concat(C,"_kmw"),"data_loading_error_retry")}),[C]);return Object(l.useEffect)((function(){_&&Object(v.I)("".concat(C,"_kmw"),"data_loading_error")}),[C,_]),_?e.createElement(f.a,{title:N?Object(s.__)("Insufficient permissions","google-site-kit"):Object(s.__)("Data loading failed","google-site-kit"),headerText:A,infoTooltip:T},e.createElement(p.a,{moduleSlug:y,error:_,onRetry:D,GetHelpLink:N?d.a:void 0,getHelpClassName:"googlesitekit-error-retry-text"})):e.createElement(k,{noPadding:!0},e.createElement("div",{className:r()("googlesitekit-km-widget-tile",c)},e.createElement(m.a,{title:A,infoTooltip:T,loading:O}),e.createElement("div",{className:"googlesitekit-km-widget-tile__body"},O&&e.createElement(g.a,null),!O&&E)))}MetricTileWrapper.propTypes={Widget:c.a.elementType.isRequired,loading:c.a.bool,title:c.a.string,infoTooltip:c.a.oneOfType([c.a.string,c.a.element]),moduleSlug:c.a.string.isRequired}}).call(this,n(4))},208:function(e,t,n){"use strict";(function(e){var i=n(14),r=n(0),a=n.n(r),o=n(1),c=n(50),l=n(3),s=n(36),u=n(24),d=n(167),g=n(463),f=n(119),m=n(9),p=n(18),h=Object(f.a)(g.a);function AudienceSegmentationErrorWidget(t){var n=t.Widget,r=t.errors,a=t.onRetry,c=t.showRetryButton,g=Object(p.a)(),f=Object(l.useDispatch)(u.b).setValue,v=r?Object(i.castArray)(r):[],b=v.some(s.e);return Object(o.useEffect)((function(){f(d.b,!0)}),[f]),e.createElement(h,{Widget:n,errors:v,onRetry:function(){Object(m.I)("".concat(g,"_audiences-all-tiles"),"data_loading_error_retry").finally((function(){f(d.b,!1),null==a||a()}))},onRequestAccess:function(){Object(m.I)("".concat(g,"_audiences-all-tiles"),"insufficient_permissions_error_request_access")},showRetryButton:c,onInView:function(){var e=b?"insufficient_permissions_error":"data_loading_error";Object(m.I)("".concat(g,"_audiences-all-tiles"),e)}})}AudienceSegmentationErrorWidget.propTypes={Widget:a.a.elementType.isRequired,errors:a.a.oneOfType([a.a.object,a.a.arrayOf(a.a.object)]).isRequired,onRetry:a.a.func,showRetryButton:a.a.bool},t.a=Object(c.a)({moduleName:"analytics-4"})(AudienceSegmentationErrorWidget)}).call(this,n(4))},21:function(e,t,n){"use strict";(function(e){var i=n(22),r=n.n(i),a=n(25),o=n.n(a),c=n(11),l=n.n(c),s=n(0),u=n.n(s),d=n(148),g=n(1),f=n(2),m=n(128),p=n(129),h=n(130),v=n(68),b=n(77),E=Object(g.forwardRef)((function(t,n){var i,a=t["aria-label"],c=t.secondary,s=void 0!==c&&c,u=t.arrow,g=void 0!==u&&u,E=t.back,_=void 0!==E&&E,O=t.caps,y=void 0!==O&&O,k=t.children,j=t.className,S=void 0===j?"":j,A=t.danger,w=void 0!==A&&A,T=t.disabled,C=void 0!==T&&T,N=t.external,D=void 0!==N&&N,R=t.hideExternalIndicator,x=void 0!==R&&R,I=t.href,M=void 0===I?"":I,P=t.inverse,B=void 0!==P&&P,L=t.noFlex,F=void 0!==L&&L,z=t.onClick,W=t.small,V=void 0!==W&&W,U=t.standalone,G=void 0!==U&&U,H=t.linkButton,q=void 0!==H&&H,K=t.to,Y=t.leadingIcon,X=t.trailingIcon,Z=o()(t,["aria-label","secondary","arrow","back","caps","children","className","danger","disabled","external","hideExternalIndicator","href","inverse","noFlex","onClick","small","standalone","linkButton","to","leadingIcon","trailingIcon"]),$=M||K||!z?K?"ROUTER_LINK":D?"EXTERNAL_LINK":"LINK":C?"BUTTON_DISABLED":"BUTTON",J="BUTTON"===$||"BUTTON_DISABLED"===$?"button":"ROUTER_LINK"===$?d.b:"a",Q=("EXTERNAL_LINK"===$&&(i=Object(f._x)("(opens in a new tab)","screen reader text","google-site-kit")),"BUTTON_DISABLED"===$&&(i=Object(f._x)("(disabled)","screen reader text","google-site-kit")),i?a?"".concat(a," ").concat(i):"string"==typeof k?"".concat(k," ").concat(i):void 0:a),ee=Y,te=X;return _&&(ee=e.createElement(h.a,{width:14,height:14})),D&&!x&&(te=e.createElement(v.a,{width:14,height:14})),g&&!B&&(te=e.createElement(m.a,{width:14,height:14})),g&&B&&(te=e.createElement(p.a,{width:14,height:14})),e.createElement(J,r()({"aria-label":Q,className:l()("googlesitekit-cta-link",S,{"googlesitekit-cta-link--secondary":s,"googlesitekit-cta-link--inverse":B,"googlesitekit-cta-link--small":V,"googlesitekit-cta-link--caps":y,"googlesitekit-cta-link--danger":w,"googlesitekit-cta-link--disabled":C,"googlesitekit-cta-link--standalone":G,"googlesitekit-cta-link--link-button":q,"googlesitekit-cta-link--no-flex":!!F}),disabled:C,href:"LINK"!==$&&"EXTERNAL_LINK"!==$||C?void 0:M,onClick:z,rel:"EXTERNAL_LINK"===$?"noopener noreferrer":void 0,ref:n,target:"EXTERNAL_LINK"===$?"_blank":void 0,to:K},Z),!!ee&&e.createElement(b.a,{marginRight:5},ee),e.createElement("span",{className:"googlesitekit-cta-link__contents"},k),!!te&&e.createElement(b.a,{marginLeft:5},te))}));E.propTypes={arrow:u.a.bool,back:u.a.bool,caps:u.a.bool,children:u.a.node,className:u.a.string,danger:u.a.bool,disabled:u.a.bool,external:u.a.bool,hideExternalIndicator:u.a.bool,href:u.a.string,inverse:u.a.bool,leadingIcon:u.a.node,linkButton:u.a.bool,noFlex:u.a.bool,onClick:u.a.func,small:u.a.bool,standalone:u.a.bool,to:u.a.string,trailingIcon:u.a.node},t.a=E}).call(this,n(4))},210:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Dismiss}));var i=n(6),r=n.n(i),a=n(5),o=n.n(a),c=n(16),l=n.n(c),s=n(0),u=n.n(s),d=n(2),g=n(3),f=n(71),m=n(33),p=n(10);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function v(e){for(var t=1;t=0;)3===e[n]?(t-=3,e[n]=4):6===e[n]&&(t-=6,e[n]=8),n--;return[e,t]}function d(e,t){return(Array.isArray(t.width)?t.width:[t.width]).map((function(t){return{counter:e+c.c[t],width:t}}))}function g(e,t){var n=[],i=[];if(!(null==e?void 0:e.length))return{columnWidths:n,rowIndexes:i};var a=0,o=0,l=function(e,t){return e.counter-t.counter},g=function(e,t){var n=e.counter;return t.counter-n},f=function(e){return e.counter<=12};if(e.forEach((function(m,p){if(s(t[m.slug]))return n.push(0),void i.push(o);var h=d(a,m),v=function(e,t,n){for(;++e12){if(a-=c.c[b],i[p]++,9===a){var E=u(n,a),_=r()(E,2);n=_[0],a=_[1]}a=c.c[b],o++}else 12===a&&(a=0,o++);n.push(c.c[b])})),9===a){var m=u(n,a),p=r()(m,2);n=p[0],a=p[1]}return{columnWidths:n,rowIndexes:i}}var f=n(14);function m(e,t,n){var i=n.columnWidths,r=n.rowIndexes,a=[],l=o()(i);if(!(null==e?void 0:e.length))return{gridColumnWidths:l,overrideComponents:a};var s=null,u=-1,d=[];if(function(e,t){for(var n={},i=0;i1)}(e,t)){var g=Array.from({length:e.length-1}).fill(0);return{overrideComponents:[t[e[0].slug]],gridColumnWidths:[12].concat(o()(g))}}return e.forEach((function(n,o){var c,g,m,p,h;if(a.push(null),s=t[n.slug],u=r[o],s)if(g=s,m=t[null===(c=e[o+1])||void 0===c?void 0:c.slug],p=u,h=r[o+1],p===h&&Object(f.isEqual)(g,m))d.push(i[o]),l[o]=0;else if(d.length>0){d.push(i[o]);var v=d.reduce((function(e,t){return e+t}),0);a[o]=s,l[o]=v,d=[]}})),{gridColumnWidths:l,overrideComponents:a}}var p=n(246);function h(e){return(Array.isArray(e)?e:[e]).filter((function(e){return"string"==typeof e&&e.length>0}))}},250:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n(8);function i(e){var t;return 400===(null==e?void 0:e.code)&&(null==e||null===(t=e.message)||void 0===t?void 0:t.includes("is not a valid dimension"))}},251:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceErrorModal}));var i=n(0),r=n.n(i),a=n(39),o=n(2),c=n(3),l=n(21),s=n(111),u=n(70),d=n(13),g=n(8),f=n(36),m=n(9);function AudienceErrorModal(t){var n=t.apiErrors,i=t.hasOAuthError,r=t.inProgress,p=t.title,h=t.description,v=t.trackEventCategory,b=t.onCancel,E=void 0===b?function(){}:b,_=t.onRetry,O=void 0===_?function(){}:_,y=Array.isArray(n)?n:[n],k=Object(c.useSelect)((function(e){return e(d.c).getErrorTroubleshootingLinkURL({code:"analytics-4_insufficient_permissions"})})),j=Object(c.useSelect)((function(e){return e(g.r).getServiceEntityAccessURL()})),S=Object(c.useSelect)((function(e){return e(d.c).getErrorTroubleshootingLinkURL({code:"access_denied"})}));if(!y.length&&!i)return null;var A,w,T,C,N=y.some((function(e){return Object(f.e)(e)}));return i?(A=Object(o.__)("Analytics update failed","google-site-kit"),w=Object(a.a)(Object(o.__)("Setup was interrupted because you did not grant the necessary permissions. ","google-site-kit"),{HelpLink:e.createElement(l.a,{href:S,external:!0,hideExternalIndicator:!0},Object(o.__)("Get help","google-site-kit"))}),T=Object(o.__)("Retry","google-site-kit")):N?(A=Object(o.__)("Insufficient permissions","google-site-kit"),w=Object(a.a)(Object(o.__)("You’ll need to contact your administrator. Trouble getting access? ","google-site-kit"),{HelpLink:e.createElement(l.a,{href:k,external:!0,hideExternalIndicator:!0},Object(o.__)("Get help","google-site-kit"))}),T=Object(o.__)("Request access","google-site-kit"),C=j):(A=p||Object(o.__)("Failed to set up visitor groups","google-site-kit"),w=h||Object(o.__)("Oops! Something went wrong. Retry enabling groups.","google-site-kit"),T=Object(o.__)("Retry","google-site-kit")),e.createElement(u.a,null,e.createElement(s.a,{dialogActive:!0,buttonLink:C,title:A,subtitle:w,handleConfirm:function(){var e;e=i?"auth_error_retry":N?"insufficient_permissions_error_request_access":"setup_error_retry",Object(m.I)(v,e).finally((function(){N||O()}))},confirmButton:T,handleDialog:function(){var e;e=i?"auth_error_cancel":N?"insufficient_permissions_error_cancel":"setup_error_cancel",Object(m.I)(v,e).finally(E)},onOpen:function(){var e;e=i?"auth_error":N?"insufficient_permissions_error":"setup_error",Object(m.I)(v,e)},onClose:E,danger:!0,inProgress:r}))}AudienceErrorModal.propTypes={apiErrors:r.a.oneOfType([r.a.arrayOf(r.a.object),r.a.object,r.a.array]),hasOAuthError:r.a.bool,inProgress:r.a.bool,title:r.a.string,description:r.a.string,trackEventCategory:r.a.string,onCancel:r.a.func,onRetry:r.a.func}}).call(this,n(4))},252:function(e,t,n){"use strict";(function(e){var i=n(11),r=n.n(i),a=n(0),o=n.n(a),c=n(1),l=n(10),s=n(500),u=Object(c.forwardRef)((function(t,n){var i=t.className,a=t.content,o=t.dismissLabel,c=t.Icon,u=void 0===c?s.a:c,d=t.onDismiss;return e.createElement("div",{ref:n,className:r()("googlesitekit-audience-segmentation-info-notice",i)},e.createElement(u,{width:"20",height:"20"}),e.createElement("div",{className:"googlesitekit-audience-segmentation-info-notice__body"},e.createElement("p",null,a),o&&e.createElement(l.Button,{tertiary:!0,onClick:d,className:"googlesitekit-audience-segmentation-info-notice__dismiss"},o)))}));u.propTypes={className:o.a.string,content:o.a.string.isRequired,dismissLabel:o.a.string,Icon:o.a.elementType,onDismiss:o.a.func},t.a=u}).call(this,n(4))},254:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return BadgeWithTooltip}));var i=n(0),r=n.n(i),a=n(11),o=n.n(a),c=n(133);function BadgeWithTooltip(t){var n=t.className,i=void 0===n?"":n,r=t.label,a=t.onTooltipOpen,l=t.tooltipTitle;return e.createElement("span",{className:o()("googlesitekit-badge-with-tooltip","googlesitekit-badge",i)},r,l&&e.createElement(c.a,{onOpen:a,title:l}))}BadgeWithTooltip.propTypes={onTooltipOpen:r.a.func,tooltipTitle:r.a.node,className:r.a.string,label:r.a.node.isRequired}}).call(this,n(4))},255:function(e,t,n){"use strict";n.d(t,"a",(function(){return SurveyViewTrigger}));var i=n(1),r=n(0),a=n.n(r),o=n(3),c=n(13),l=n(7);function SurveyViewTrigger(e){var t=e.triggerID,n=e.ttl,r=void 0===n?0:n,a=Object(o.useSelect)((function(e){return e(c.c).isUsingProxy()})),s=Object(o.useDispatch)(l.a).triggerSurvey;return Object(i.useEffect)((function(){a&&s(t,{ttl:r})}),[a,t,r,s]),null}SurveyViewTrigger.propTypes={triggerID:a.a.string.isRequired,ttl:a.a.number}},257:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Error}));var i=n(0),r=n.n(i),a=n(1),o=n(3),c=n(13),l=n(53);function Error(t){var n=t.id,i=Object(o.useSelect)((function(e){return e(c.c).getError("notificationAction",[n])})),r=Object(o.useDispatch)(c.c).clearError;return Object(a.useEffect)((function(){return function(){r("notificationAction",[n])}}),[r,n]),i?e.createElement(l.a,{message:i.message}):null}Error.propTypes={id:r.a.string}}).call(this,n(4))},26:function(e,t,n){"use strict";n.d(t,"l",(function(){return r})),n.d(t,"k",(function(){return a})),n.d(t,"j",(function(){return o})),n.d(t,"i",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"o",(function(){return s})),n.d(t,"n",(function(){return u})),n.d(t,"m",(function(){return d})),n.d(t,"c",(function(){return g})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return m})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return v})),n.d(t,"b",(function(){return b}));var i=n(2),r="key-metrics-setup-cta-widget",a="googlesitekit-key-metrics-selection-panel-opened",o="key-metrics-selection-form",c="key-metrics-selected",l="key-metrics-effective-selection",s="key-metrics-unstaged-selection",u=2,d=8,g={SLUG:"current-selection",LABEL:Object(i.__)("Current selection","google-site-kit")},f={SLUG:"suggested",LABEL:Object(i.__)("Suggested","google-site-kit")},m={SLUG:"visitors",LABEL:Object(i.__)("Visitors","google-site-kit")},p={SLUG:"driving-traffic",LABEL:Object(i.__)("Driving traffic","google-site-kit")},h={SLUG:"generating-leads",LABEL:Object(i.__)("Generating leads","google-site-kit")},v={SLUG:"selling-products",LABEL:Object(i.__)("Selling products","google-site-kit")},b={SLUG:"content-performance",LABEL:Object(i.__)("Content performance","google-site-kit")}},261:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return SpinnerButton}));var i=n(22),r=n.n(i),a=n(25),o=n.n(a),c=n(0),l=n.n(c),s=n(11),u=n.n(s),d=n(343),g=n(262),f={BEFORE:"before",AFTER:"after"};function SpinnerButton(t){var n=t.className,i=t.onClick,a=void 0===i?function(){}:i,c=t.isSaving,l=void 0!==c&&c,s=t.spinnerPosition,m=void 0===s?f.AFTER:s,p=o()(t,["className","onClick","isSaving","spinnerPosition"]);return e.createElement(d.a,r()({className:u()(n,"googlesitekit-button-icon--spinner",{"googlesitekit-button-icon--spinner__running":l,"googlesitekit-button-icon--spinner__before":m===f.BEFORE,"googlesitekit-button-icon--spinner__after":m===f.AFTER}),icon:l&&m===f.BEFORE?e.createElement(g.a,{size:14}):void 0,trailingIcon:l&&m===f.AFTER?e.createElement(g.a,{size:14}):void 0,onClick:a},p))}SpinnerButton.propTypes={className:l.a.string,onClick:l.a.func,isSaving:l.a.bool,spinnerPosition:l.a.oneOf(Object.values(f))}}).call(this,n(4))},262:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return CircularProgress}));var i=n(644);function CircularProgress(t){return e.createElement(i.a,t)}}).call(this,n(4))},268:function(e,t,n){"use strict";(function(e){var i=n(11),r=n.n(i),a=n(0),o=n.n(a),c=n(1),l=Object(c.forwardRef)((function(t,n){var i=t.children,a=t.className,o=t.widgetSlug,c=t.noPadding,l=t.Header,s=t.Footer;return e.createElement("div",{className:r()("googlesitekit-widget","googlesitekit-widget--".concat(o),{"googlesitekit-widget--no-padding":c},{"googlesitekit-widget--with-header":l},a),ref:n},l&&e.createElement("div",{className:"googlesitekit-widget__header"},e.createElement(l,null)),e.createElement("div",{className:"googlesitekit-widget__body"},i),s&&e.createElement("div",{className:"googlesitekit-widget__footer"},e.createElement(s,null)))}));l.defaultProps={children:void 0,noPadding:!1},l.propTypes={children:o.a.node,widgetSlug:o.a.string.isRequired,noPadding:o.a.bool,Header:o.a.elementType,Footer:o.a.elementType},t.a=l}).call(this,n(4))},269:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return WidgetRecoverableModules}));var i=n(5),r=n.n(i),a=n(22),o=n.n(a),c=n(27),l=n.n(c),s=n(25),u=n.n(s),d=n(0),g=n.n(d),f=n(1),m=n(145),p=n(165);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function WidgetRecoverableModules(t){var n=t.widgetSlug,i=t.moduleSlugs,r=u()(t,["widgetSlug","moduleSlugs"]),a=Object(f.useMemo)((function(){return{moduleSlug:l()(i).sort().join(","),moduleSlugs:i}}),[i]);return Object(m.a)(n,p.a,a),e.createElement(p.a,o()({moduleSlugs:i},r))}WidgetRecoverableModules.propTypes=function(e){for(var t=1;t0&&e.createElement("p",{className:"googlesitekit-selection-panel-items__subheading"},o)),b>0&&e.createElement("div",{className:"googlesitekit-selection-panel-items__subsection"},v(m)),h)}SelectionPanelItems.propTypes={currentSelectionTitle:o.a.string,availableItemsTitle:o.a.string,savedItemSlugs:o.a.array,availableSavedItems:o.a.object,availableUnsavedItems:o.a.object,ItemComponent:o.a.elementType,notice:o.a.node}}).call(this,n(4))},315:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return SelectionPanelFooter}));var i=n(6),r=n.n(i),a=n(16),o=n.n(a),c=n(15),l=n.n(c),s=n(14),u=n(0),d=n.n(u),g=n(1),f=n(39),m=n(2),p=n(3),h=n(10),v=n(122),b=n(9),E=n(8),_=n(43),O=n(53);function SelectionPanelFooter(t){var n=t.savedItemSlugs,i=void 0===n?[]:n,a=t.selectedItemSlugs,c=void 0===a?[]:a,u=t.saveSettings,d=void 0===u?function(){}:u,y=t.saveError,k=t.itemLimitError,j=t.minSelectedItemCount,S=void 0===j?0:j,A=t.maxSelectedItemCount,w=void 0===A?0:A,T=t.isBusy,C=t.onSaveSuccess,N=void 0===C?function(){}:C,D=t.onCancel,R=void 0===D?function(){}:D,x=t.isOpen,I=t.closePanel,M=void 0===I?function(){}:I,P=Object(g.useState)(null),B=l()(P,2),L=B[0],F=B[1],z=Object(g.useState)(!1),W=l()(z,2),V=W[0],U=W[1],G=Object(p.useSelect)((function(e){return e(E.r).isFetchingSyncAvailableAudiences()})),H=Object(g.useMemo)((function(){return!Object(s.isEqual)(Object(b.E)(c),Object(b.E)(i))}),[i,c]),q=(null==i?void 0:i.length)>0&&H?Object(m.__)("Apply changes","google-site-kit"):Object(m.__)("Save selection","google-site-kit"),K=Object(g.useCallback)(o()(r.a.mark((function e(){var t;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(c);case 2:t=e.sent,t.error||(N(),M(),F(q),U(!0));case 5:case"end":return e.stop()}}),e)}))),[d,c,N,M,q]),Y=Object(g.useCallback)((function(){M(),R()}),[M,R]),X=Object(g.useState)(null),Z=l()(X,2),$=Z[0],J=Z[1];Object(g.useEffect)((function(){null!==$&&$!==x&&x&&(F(null),U(!1)),J(x)}),[x,$]);var Q=(null==c?void 0:c.length)||0,ee=G?e.createElement(_.a,{width:"89px",height:"20px"}):e.createElement("p",{className:"googlesitekit-selection-panel-footer__item-count"},Object(f.a)(Object(m.sprintf)(/* translators: 1: Number of selected items. 2: Maximum number of items that can be selected. */ Object(m.__)("%1$d selected (up to %2$d)","google-site-kit"),Q,w),{MaxCount:e.createElement("span",{className:"googlesitekit-selection-panel-footer__item-count--max-count"})}));return e.createElement("footer",{className:"googlesitekit-selection-panel-footer"},y&&e.createElement(v.a,{error:y}),e.createElement("div",{className:"googlesitekit-selection-panel-footer__content"},H&&k?e.createElement(O.a,{noPrefix:!0,message:k}):ee,e.createElement("div",{className:"googlesitekit-selection-panel-footer__actions"},e.createElement(h.Button,{tertiary:!0,onClick:Y,disabled:T},Object(m.__)("Cancel","google-site-kit")),e.createElement(h.SpinnerButton,{onClick:K,isSaving:T,disabled:Qw||T||!x&&V},L||q))))}SelectionPanelFooter.propTypes={savedItemSlugs:d.a.array,selectedItemSlugs:d.a.array,saveSettings:d.a.func,saveError:d.a.object,itemLimitError:d.a.string,minSelectedItemCount:d.a.number,maxSelectedItemCount:d.a.number,isBusy:d.a.bool,onSaveSuccess:d.a.func,onCancel:d.a.func,isOpen:d.a.bool,closePanel:d.a.func}}).call(this,n(4))},32:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i="core/location"},320:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return WidgetReportZero}));var i=n(5),r=n.n(i),a=n(22),o=n.n(a),c=n(25),l=n.n(c),s=n(0),u=n.n(s),d=n(1),g=n(145),f=n(177);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function WidgetReportZero(t){var n=t.widgetSlug,i=t.moduleSlug,r=l()(t,["widgetSlug","moduleSlug"]),a=Object(d.useMemo)((function(){return{moduleSlug:i}}),[i]);return Object(g.a)(n,f.a,a),e.createElement(f.a,o()({moduleSlug:i},r))}WidgetReportZero.propTypes=function(e){for(var t=1;t","google-site-kit"),{HelpLink:e.createElement(c.a,{href:n,external:!0,hideExternalIndicator:!0},Object(o.__)("Get help","google-site-kit"))})}GetHelpLink.propTypes={linkURL:r.a.string.isRequired}}).call(this,n(4))},346:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n(5),r=n.n(i),a=n(3),o=n(7),c=n(8);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t0||!1===l,_=g.length>0&&l,O=s(s({},h),{},{dimensions:[{name:"audienceResourceName"}],dimensionFilters:p,metrics:[{name:"totalUsers"},{name:"sessionsPerUser"},{name:"screenPageViewsPerSession"},{name:"screenPageViews"}]}),y=Object(a.useInViewSelect)((function(e){if(void 0!==E)return E?e(c.r).getReport(O):null}),[E,O]),k=Object(a.useSelect)((function(e){if(void 0!==E)return!E||e(c.r).hasFinishedResolution("getReport",[O])})),j=Object(a.useSelect)((function(e){if(void 0!==E)return E?e(c.r).getErrorForSelector("getReport",[O]):null})),S=s(s({},h),{},{dimensions:[{name:"newVsReturning"}],dimensionFilters:{newVsReturning:["new","returning"]},metrics:[{name:"totalUsers"},{name:"sessionsPerUser"},{name:"screenPageViewsPerSession"},{name:"screenPageViews"}]}),A=Object(a.useInViewSelect)((function(e){if(void 0!==_)return _?e(c.r).getReport(S):null}),[_,S]),w=Object(a.useSelect)((function(e){if(void 0!==_)return!_||e(c.r).hasFinishedResolution("getReport",[S])})),T=Object(a.useSelect)((function(e){if(void 0!==_)return _?e(c.r).getErrorForSelector("getReport",[S]):null})),C={startDate:v,endDate:b,metrics:[{name:"screenPageViews"}]},N=Object(a.useInViewSelect)((function(e){return e(c.r).getReport(C)})),D=Object(a.useSelect)((function(e){return e(c.r).hasFinishedResolution("getReport",[C])})),R=Object(a.useSelect)((function(e){return e(c.r).getErrorForSelector("getReport",[C])})),x=Number(null==N||null===(t=N.totals)||void 0===t||null===(n=t[0])||void 0===n||null===(i=n.metricValues)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.value)||0,I={startDate:v,endDate:b,dimensions:["city"],metrics:[{name:"totalUsers"}],orderby:[{metric:{metricName:"totalUsers"},desc:!0}],limit:4},M=Object(a.useInViewSelect)((function(e){return e(c.r).getReportForAllAudiences(I,m)})),P=u(I,m),B=d(I,m),L={startDate:v,endDate:b,dimensions:["pagePath"],metrics:[{name:"screenPageViews"}],dimensionFilters:{"customEvent:googlesitekit_post_type":{filterType:"stringFilter",matchType:"EXACT",value:"post"}},orderby:[{metric:{metricName:"screenPageViews"},desc:!0}],limit:3},F=Object(a.useInViewSelect)((function(e){return e(c.r).getReportForAllAudiences(L,m)})),z=u(L,m),W=d(L,m),V={startDate:v,endDate:b,dimensions:["pagePath","pageTitle"],metrics:[{name:"screenPageViews"}],dimensionFilters:{"customEvent:googlesitekit_post_type":{filterType:"stringFilter",matchType:"EXACT",value:"post"}},orderby:[{metric:{metricName:"screenPageViews"},desc:!0}],limit:15};return{report:y,reportLoaded:k,reportError:j,siteKitAudiencesReport:A,siteKitAudiencesReportLoaded:w,siteKitAudiencesReportError:T,totalPageviews:x,totalPageviewsReportLoaded:D,totalPageviewsReportError:R,topCitiesReport:M,topCitiesReportLoaded:P,topCitiesReportErrors:B,topContentReport:F,topContentReportLoaded:z,topContentReportErrors:W,topContentPageTitlesReport:Object(a.useInViewSelect)((function(e){return e(c.r).getReportForAllAudiences(V,m)})),topContentPageTitlesReportLoaded:u(V,m),topContentPageTitlesReportErrors:d(V,m)}}},347:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceTileNoData}));var i=n(2);function AudienceTileNoData(){return e.createElement("div",{className:"googlesitekit-audience-segmentation-tile__no-data"},Object(i.__)("No data to show yet","google-site-kit"))}}).call(this,n(4))},348:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return PartialDataNotice}));var i=n(0),r=n.n(i);function PartialDataNotice(t){var n=t.content;return e.createElement("span",{className:"googlesitekit-audience-segmentation-partial-data-notice"},n)}PartialDataNotice.propTypes={content:r.a.node}}).call(this,n(4))},349:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceTooltipMessage}));var i=n(0),r=n.n(i),a=n(1),o=n(39),c=n(2),l=n(3),s=n(21),u=n(13);function AudienceTooltipMessage(t){var n=t.audienceSlug,i=t.audienceName,r=Object(l.useSelect)((function(e){return e(u.c).getDocumentationLinkURL("visitor-group-insights")}));return Object(a.useMemo)((function(){switch(n){case"new-visitors":return Object(o.a)(Object(c.sprintf)(/* translators: %s: is the audience name */ Object(c.__)('%s are people who visited your site for the first time. Note that under some circumstances it\'s possible for a visitor to be counted in both the "new" and "returning" groups. Learn more',"google-site-kit"),"New visitors"),{strong:e.createElement("strong",null),link:e.createElement(s.a,{href:r,external:!0,hideExternalIndicator:!0})});case"returning-visitors":return Object(o.a)(Object(c.sprintf)(/* translators: %s: is the audience name */ Object(c.__)('%s are people who have visited your site at least once before. Note that under some circumstances it\'s possible for a visitor to be counted in both the "new" and "returning" groups. Learn more',"google-site-kit"),"Returning visitors"),{strong:e.createElement("strong",null),link:e.createElement(s.a,{href:r,external:!0,hideExternalIndicator:!0})});default:return Object(o.a)(Object(c.sprintf)(/* translators: %s: is the audience name */ Object(c.__)("%s is an audience that already exists in your Analytics property. Note that it's possible for a visitor to be counted in more than one group. Learn more","google-site-kit"),"".concat(i,"")),{strong:e.createElement("strong",null),link:e.createElement(s.a,{href:r,external:!0,hideExternalIndicator:!0})})}}),[n,i,r])}AudienceTooltipMessage.propTypes={audienceSlug:r.a.string.isRequired}}).call(this,n(4))},350:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t1&&i.length>0)return r}return t})),Q=Object(b.useSelect)((function(e){return G?e(y.r).getKeyMetricsConversionEventWidgets():[]})),ee=Object(p.useCallback)((function(){var e,t,n,i=null===(e=a.current)||void 0===e?void 0:e.querySelector(".mdc-tab-scroller__scroll-content");if(L){var r=null===(t=a.current)||void 0===t?void 0:t.querySelectorAll(".googlesitekit-chip-tab-group__tab-items .mdc-tab");if((null==r?void 0:r.length)&&i){var o=null===(n=a.current)||void 0===n?void 0:n.getBoundingClientRect(),c=[];r.forEach((function(e,t){var n=e.getBoundingClientRect();n.left>=o.left&&n.right<=o.right&&c.push(t)}));var l=r[c.length];if(l){var s=l.getBoundingClientRect();(s.left>=o.right||s.left-o.right<0&&-(s.left-o.right)<=20)&&("2px"===i.style.columnGap?i.style.columnGap="20px":i.style.columnGap="2px",ee())}}}}),[L]),te=g()({},_.c.SLUG,0),ne={},ie={},re=function(e){var t,i=n[e].group;if((i===d||d===_.c.SLUG&&z.includes(e))&&(ne[e]=n[e]),d===_.g.SLUG&&q.includes(e)&&q.includes(e)&&(ne[e]=n[e]),!te[i]){var r=Object.keys(n).filter((function(e){return!(n[e].group!==i||!(null==F?void 0:F.includes(e)))})).length;te[i]=r}(null==J?void 0:J.length)&&(J.some((function(t){return Q[t].includes(e)}))&&(ie[i]=[].concat(l()(null!==(t=ie[i])&&void 0!==t?t:[]),[e])))};for(var ae in n)re(ae);var oe=Object(b.useDispatch)(O.a).setValues,ce=Object(p.useCallback)((function(){var e;oe(_.j,(e={},g()(e,_.i,F),g()(e,_.a,[].concat(l()(z),l()(W))),g()(e,_.o,[]),e))}),[F,z,W,oe]),le=Object(p.useCallback)((function(e,t){if(e)D(e);else{var n=$[t];B(t),D(n.SLUG)}W.length&&ce()}),[$,W,D,ce]),se=Object(b.useSelect)((function(e){return e(k.b).getValue(_.k)})),ue=Object(h.a)(se),de=Object.keys(ie);Object(p.useEffect)((function(){if(!ue&&se)if(D(_.c.SLUG),B(0),de.length&&L){var e=$.find((function(e){return e.SLUG===de[0]}));B($.indexOf(e)),D(e.SLUG)}else B(0),D(_.c.SLUG);ue&&!se&&ce(),!ue&&se&&ee()}),[se,ue,W,$,L,de,ce,ee]);var ge=Object(N.a)(ee,50);Object(f.a)((function(){e.addEventListener("resize",ge)})),Object(m.a)((function(){return e.removeEventListener("resize",ge)}));var fe=[[].concat(l()(Z),l()(X.slice(0,2))),l()(X.slice(2))];return i.createElement("div",{className:"googlesitekit-chip-tab-group"},i.createElement("div",{className:"googlesitekit-chip-tab-group__tab-items",ref:a},!L&&fe.map((function(e){return i.createElement("div",{key:"row-".concat(e[0].SLUG),className:"googlesitekit-chip-tab-group__tab-items-row"},e.map((function(e){return i.createElement(A.a,{key:e.SLUG,slug:e.SLUG,label:e.LABEL,hasNewBadge:!!(null==ie?void 0:ie[e.SLUG]),isActive:e.SLUG===d,onClick:le,selectedCount:te[e.SLUG]})})))})),L&&i.createElement(E.TabBar,{activeIndex:P,handleActiveIndexUpdate:function(e){return le(null,e)}},$.map((function(e,t){var n=I[e.SLUG]||x.a;return i.createElement(E.Tab,{key:t,"aria-label":e.LABEL},i.createElement(n,{width:12,height:12,className:"googlesitekit-chip-tab-group__chip-item-svg googlesitekit-chip-tab-group__tab-item-mobile-svg googlesitekit-chip-tab-group__chip-item-svg__".concat(e.SLUG)}),e.LABEL,te[e.SLUG]>0&&i.createElement("span",{className:"googlesitekit-chip-tab-group__chip-item-count"},"(",te[e.SLUG],")"),!!(null==ie?void 0:ie[e.SLUG])&&i.createElement("span",{className:"googlesitekit-chip-tab-group__chip-item-new-dot"}))})))),i.createElement("div",{className:"googlesitekit-chip-tab-group__tab-item"},Object.keys(ne).map((function(e){var t,n=ne[e].group,a=null==ie||null===(t=ie[n])||void 0===t?void 0:t.includes(e);return i.createElement(w.a,o()({key:e,slug:e,savedItemSlugs:r,isNewlyDetected:a},ne[e]))})),!Object.keys(ne).length&&i.createElement("div",{className:"googlesitekit-chip-tab-group__graphic"},i.createElement(T.a,{height:250}),i.createElement("p",null,Object(v.__)("No metrics were selected yet","google-site-kit")))))}}).call(this,n(28),n(4))},364:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Chip}));var i,r=n(5),a=n.n(r),o=n(0),c=n.n(o),l=n(11),s=n.n(l),u=n(10),d=n(26),g=n(216),f=n(106),m=n(94),p=(i={},a()(i,d.c.SLUG,g.a),a()(i,d.g.SLUG,f.a),i);function Chip(t){var n=t.slug,i=t.label,r=t.isActive,a=t.onClick,o=t.hasNewBadge,c=void 0!==o&&o,l=t.selectedCount,d=void 0===l?0:l,g=p[n]||m.a;return e.createElement(u.Button,{className:s()("googlesitekit-chip-tab-group__chip-item",{"googlesitekit-chip-tab-group__chip-item--active":r}),icon:e.createElement(g,{width:12,height:12,className:"googlesitekit-chip-tab-group__chip-item-svg googlesitekit-chip-tab-group__chip-item-svg__".concat(n)}),trailingIcon:d>0?e.createElement("span",{className:"googlesitekit-chip-tab-group__chip-item-count"},"(",d,")"):null,onClick:function(){return a(n)}},i,c&&e.createElement("span",{className:"googlesitekit-chip-tab-group__chip-item-new-dot"}))}Chip.propTypes={slug:c.a.string.isRequired,label:c.a.string.isRequired,isActive:c.a.bool,hasNewBadge:c.a.bool,selectedCount:c.a.number,onClick:c.a.func.isRequired}}).call(this,n(4))},365:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return MetricItem}));var i=n(5),r=n.n(i),a=n(27),o=n.n(a),c=n(0),l=n.n(c),s=n(1),u=n(2),d=n(3),g=n(29),f=n(48),m=n(19),p=n(26),h=n(118);function MetricItem(t){var n=t.slug,i=t.title,a=t.description,c=t.isNewlyDetected,l=t.savedItemSlugs,v=void 0===l?[]:l,b=Object(d.useSelect)((function(e){var t=e(m.a).getModule,i=e(f.a).getWidget(n);return null==i?void 0:i.modules.reduce((function(e,n){var i=t(n);return(null==i?void 0:i.connected)||!(null==i?void 0:i.name)?e:[].concat(o()(e),[i.name])}),[])})),E=Object(d.useSelect)((function(e){return e(g.a).getValue(p.j,p.i)})),_=Object(d.useSelect)((function(e){return e(g.a)})).getValue,O=Object(d.useDispatch)(g.a).setValues,y=Object(s.useCallback)((function(e){var t,i=_(p.j,p.i),a=e.target.checked?i.concat([n]):i.filter((function(e){return e!==n}));O(p.j,(t={},r()(t,p.i,a),r()(t,p.o,a),t))}),[_,O,n]),k=null==E?void 0:E.includes(n),j=!v.includes(n)&&b.length>0,S="key-metric-selection-checkbox-".concat(n);return e.createElement(h.c,{id:S,slug:n,title:i,description:a,isNewlyDetected:c,isItemSelected:k,isItemDisabled:j,onCheckboxChange:y},b.length>0&&e.createElement("div",{className:"googlesitekit-selection-panel-item-error"},Object(u.sprintf)(/* translators: %s: module names. */ Object(u._n)("%s is disconnected, no data to show","%s are disconnected, no data to show",b.length,"google-site-kit"),b.join(Object(u.__)(" and ","google-site-kit")))))}MetricItem.propTypes={slug:l.a.string.isRequired,title:l.a.string.isRequired,description:l.a.string.isRequired,isNewlyDetected:l.a.bool,savedItemSlugs:l.a.array}}).call(this,n(4))},366:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){c=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(c)throw a}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n2&&void 0!==p[2]?p[2]:{},o=a.ttl,l=void 0===o?c.b:o,s=a.timestamp,u=void 0===s?Math.round(Date.now()/1e3):s,d=a.isError,f=void 0!==d&&d,t.next=3,h();case 3:if(!(m=t.sent)){t.next=14;break}return t.prev=5,m.setItem("".concat(g).concat(n),JSON.stringify({timestamp:u,ttl:l,value:i,isError:f})),t.abrupt("return",!0);case 10:return t.prev=10,t.t0=t.catch(5),e.console.warn("Encountered an unexpected storage error:",t.t0),t.abrupt("return",!1);case 14:return t.abrupt("return",!1);case 15:case"end":return t.stop()}}),t,null,[[5,10]])})));return function(e,n){return t.apply(this,arguments)}}(),_=function(){var t=o()(r.a.mark((function t(n){var i,a;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h();case 2:if(!(i=t.sent)){t.next=14;break}return t.prev=4,a=n.startsWith(d)?n:"".concat(g).concat(n),i.removeItem(a),t.abrupt("return",!0);case 10:return t.prev=10,t.t0=t.catch(4),e.console.warn("Encountered an unexpected storage error:",t.t0),t.abrupt("return",!1);case 14:return t.abrupt("return",!1);case 15:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e){return t.apply(this,arguments)}}(),O=function(){var t=o()(r.a.mark((function t(){var n,i,a,o;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h();case 2:if(!(n=t.sent)){t.next=14;break}for(t.prev=4,i=[],a=0;a=1280,N=S>=960&&S<1280;l||(T=j===m.c&&S<800,N=S>=800&&S<1280);var D=Object(s.a)(k,{threshold:.25}),R=Object(u.useState)(!1),x=r()(R,2),I=x[0],M=x[1],P=!!(null==D?void 0:D.intersectionRatio),B=Object(d.useDispatch)(f.a).triggerSurvey,L=Object(d.useSelect)((function(e){return e(g.c).isUsingProxy()}));return Object(u.useEffect)((function(){P&&!I&&(l&&Object(p.I)("".concat(A,"_kmw-cta-notification"),"view_notification"),L&&B("view_kmw_setup_cta",{ttl:p.f}),M(!0))}),[P,A,l,I,L,B]),e.createElement("section",{ref:k,className:o()("googlesitekit-setup__wrapper","googlesitekit-setup__wrapper--key-metrics-setup-cta",n)},e.createElement(v.e,null,e.createElement(v.k,null,e.createElement(v.a,{smSize:5,mdSize:6,lgSize:5,className:"googlesitekit-widget-key-metrics-content__wrapper"},e.createElement("div",{className:"googlesitekit-widget-key-metrics-text__wrapper"},e.createElement("h3",{className:"googlesitekit-publisher-win__title"},i),e.createElement("p",null,a)),e.createElement("div",{className:"googlesitekit-widget-key-metrics-actions__wrapper"},c),T&&e.createElement(v.a,{className:"googlesitekit-widget-key-metrics-svg__wrapper"},e.createElement(_.a,null)),w&&e.createElement(v.a,{className:"googlesitekit-widget-key-metrics-svg__wrapper"},e.createElement(O.a,null))),N&&e.createElement(v.a,{className:"googlesitekit-widget-key-metrics-svg__wrapper"},e.createElement(E.a,null)),C&&e.createElement(v.a,{className:"googlesitekit-widget-key-metrics-svg__wrapper",smSize:6,mdSize:3,lgSize:6},e.createElement(b.a,null)))))}KeyMetricsCTAContent.propTypes={title:l.a.string,description:l.a.string,actions:l.a.node}}).call(this,n(4))},386:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return KeyMetricsCTAFooter}));var i=n(0),r=n.n(i),a=n(2),o=n(17),c=n(21);function KeyMetricsCTAFooter(t){var n=t.onActionClick,i=void 0===n?function(){}:n,r=t.showDismiss;return e.createElement(o.k,{className:"googlesitekit-widget-key-metrics-footer"},e.createElement(o.a,{size:12,className:"googlesitekit-widget-key-metrics-footer__cta-wrapper"},!r&&e.createElement("span",null,Object(a.__)("Interested in specific metrics?","google-site-kit")),e.createElement(c.a,{onClick:i},r?Object(a.__)("Maybe later","google-site-kit"):Object(a.__)("Select your own metrics","google-site-kit"))))}KeyMetricsCTAFooter.propTypes={onActionClick:r.a.func}}).call(this,n(4))},387:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return MetricTileHeader}));var i=n(0),r=n.n(i),a=n(133),o=n(107);function MetricTileHeader(t){var n=t.title,i=t.infoTooltip,r=t.loading;return e.createElement("div",{className:"googlesitekit-km-widget-tile__title-container"},e.createElement("h3",{className:"googlesitekit-km-widget-tile__title"},n),r?e.createElement(o.a,null,e.createElement(a.a,{title:i})):e.createElement(a.a,{title:i}))}MetricTileHeader.propTypes={title:r.a.string,infoTooltip:r.a.oneOfType([r.a.string,r.a.element]),loading:r.a.bool}}).call(this,n(4))},388:function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=e.filter((function(e){var t=e.dimensionValues;return"(not set)"!==t[0].value&&""!==t[0].value}));return n.slice(0,t)}n.d(t,"a",(function(){return i}))},390:function(e,t,n){"use strict";var i=n(251);n.d(t,"b",(function(){return i.a}));n(208),n(377),n(384);var r=n(445);n.d(t,"d",(function(){return r.a}));var a=n(446);n.d(t,"c",(function(){return a.a}));var o=n(447);n.d(t,"a",(function(){return o.a}));var c=n(448);n.d(t,"e",(function(){return c.a}));var l=n(449);n.d(t,"f",(function(){return l.a}));var s=n(450);n.d(t,"g",(function(){return s.a}));n(252),n(342);var u=n(451);n.d(t,"h",(function(){return u.a}))},391:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return RetryButton}));var i=n(0),r=n.n(i),a=n(2),o=n(10),c=n(9),l=n(18);function RetryButton(t){var n=t.handleRetry,i=Object(l.a)();return e.createElement(o.Button,{className:"googlesitekit-audience-selection-panel__error-notice-action",onClick:function(){n(),Object(c.I)("".concat(i,"_audiences-sidebar"),"data_loading_error_retry")},tertiary:!0},Object(a.__)("Retry","google-site-kit"))}RetryButton.propTypes={handleRetry:r.a.func.isRequired}}).call(this,n(4))},40:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));var i="_googlesitekitDataLayer",r="data-googlesitekit-gtag"},400:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(3),r=n(19),a=n(7),o=n(26),c=n(8),l=n(66);function s(){return Object(i.useSelect)((function(e){var t=e(a.a).isItemDismissed(o.l),n=e(a.a).isDismissingItem(o.l),i=u(e,"search-console",l.b),r=u(e,"analytics-4",c.r);return!1===t&&!1===n&&i&&r}),[])}function u(e,t,n){if(e(r.a).isModuleConnected(t)){var i=e(n),a=i.isGatheringData,o=i.isDataAvailableOnLoad;return a(),o()}}},401:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n(1),r=n(3),a=n(7),o=n(19),c=n(32);function l(e){var t=Object(r.useSelect)((function(e){return e(a.a).hasCapability(a.K)})),n=Object(r.useSelect)((function(t){return t(o.a).getModuleStoreName(e)})),l=Object(r.useSelect)((function(e){var t;return null===(t=e(n))||void 0===t?void 0:t.getAdminReauthURL()})),s=Object(r.useDispatch)(c.a).navigateTo,u=Object(i.useCallback)((function(){return s(l)}),[l,s]);return l&&t?u:null}},402:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=t.redirectURL,i=t.onSuccess,a=t.onError,c=Object(s.a)(),b=Object(d.useState)([]),E=l()(b,2),_=E[0],O=E[1],y=Object(d.useState)([]),k=l()(y,2),j=k[0],S=k[1],A=Object(d.useState)(!1),w=l()(A,2),T=w[0],C=w[1],N=Object(f.useSelect)((function(e){return e(p.a).hasScope(v.h)})),D=Object(f.useSelect)((function(e){return e(m.a).getValue(v.c,"autoSubmit")})),R=Object(f.useDispatch)(m.a),x=R.setValues,I=Object(f.useDispatch)(p.a),M=I.setPermissionScopeError,P=Object(f.useDispatch)(v.r),B=P.enableAudienceGroup,L=P.fetchSyncAvailableCustomDimensions,F=P.determineNeedForAnalytics4EditScope,z=P.syncAvailableAudiences;n||(n=Object(g.a)(e.location.href,{notification:"audience_segmentation"}));var W=Object(d.useCallback)(o()(r.a.mark((function e(){var t,n,i,a,o,c,l,s,u,d;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:if(t=e.sent,!(n=t.error)){e.next=6;break}return e.abrupt("return",{error:n});case 6:return e.next=8,L();case 8:if(i=e.sent,!(a=i.error)){e.next=12;break}return e.abrupt("return",{error:a});case 12:if(N){e.next=24;break}return e.next=15,F();case 15:if(o=e.sent,c=o.error,l=o.needsScope,!c){e.next=22;break}return e.abrupt("return",{error:c});case 22:if(!l){e.next=24;break}return e.abrupt("return",{needsScope:!0});case 24:return x(v.c,{autoSubmit:!1}),e.next=27,B(j);case 27:if(e.t0=e.sent,e.t0){e.next=30;break}e.t0={};case 30:return s=e.t0,u=s.error,d=s.failedSiteKitAudienceSlugs,e.abrupt("return",{error:u,failedSiteKitAudienceSlugs:d});case 34:case"end":return e.stop()}}),e)}))),[B,j,L,N,F,x,z]),V=Object(d.useCallback)(o()(r.a.mark((function t(){var o,l,s,d,g;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return C(!0),t.next=3,W();case 3:if(o=t.sent,l=o.error,s=o.needsScope,d=o.failedSiteKitAudienceSlugs,!s){t.next=11;break}return x(v.c,{autoSubmit:!0}),M({code:h.a,message:Object(u.__)("Additional permissions are required to create new audiences in Analytics.","google-site-kit"),data:{status:403,scopes:[v.h],skipModal:!0,skipDefaultErrorNotifications:!0,redirectURL:n,errorRedirectURL:e.location.href}}),t.abrupt("return");case 11:l||d?null==a||a():null==i||i(),c()&&(g=function _newArrayIfNotEmpty(e){return e.length?[]:e},l?(O([l]),S(g)):Array.isArray(d)?(S(d),O(g)):(O(g),S(g)),C(!1));case 13:case"end":return t.stop()}}),t)}))),[W,c,x,M,n,a,i]);return Object(d.useEffect)((function(){N&&D&&V()}),[N,D,V]),{apiErrors:_,failedAudiences:j,isSaving:T,onEnableGroups:V}}}).call(this,n(28))},43:function(e,t,n){"use strict";(function(e){var i=n(5),r=n.n(i),a=n(0),o=n.n(a),c=n(11),l=n.n(c),s=n(20);function PreviewBlock(t){var n,i,a=t.className,o=t.width,c=t.height,u=t.shape,d=t.padding,g=t.smallWidth,f=t.smallHeight,m=t.tabletWidth,p=t.tabletHeight,h=t.desktopWidth,v=t.desktopHeight,b=Object(s.e)(),E={width:(n={},r()(n,s.b,g),r()(n,s.c,m),r()(n,s.a,h),r()(n,s.d,h),n),height:(i={},r()(i,s.b,f),r()(i,s.c,p),r()(i,s.a,v),r()(i,s.d,h),i)};return e.createElement("div",{className:l()("googlesitekit-preview-block",a,{"googlesitekit-preview-block--padding":d}),style:{width:E.width[b]||o,height:E.height[b]||c}},e.createElement("div",{className:l()("googlesitekit-preview-block__wrapper",{"googlesitekit-preview-block__wrapper--circle":"circular"===u})}))}PreviewBlock.propTypes={className:o.a.string,width:o.a.string,height:o.a.string,shape:o.a.string,padding:o.a.bool,smallWidth:o.a.string,smallHeight:o.a.string,tabletWidth:o.a.string,tabletHeight:o.a.string,desktopWidth:o.a.string,desktopHeight:o.a.string},PreviewBlock.defaultProps={className:void 0,width:"100px",height:"100px",shape:"square",padding:!1,smallWidth:void 0,smallHeight:void 0,tabletWidth:void 0,tabletHeight:void 0,desktopWidth:void 0,desktopHeight:void 0},t.a=PreviewBlock}).call(this,n(4))},439:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ChangeMetricsLink}));var i=n(1),r=n(2),a=n(3),o=n(24),c=n(7),l=n(26),s=n(21),u=n(309),d=n(455),g=n(9),f=n(18),m=n(518);function ChangeMetricsLink(){var t=Object(a.useSelect)((function(e){return e(c.a).getKeyMetrics()})),n=Object(f.a)(),p=Object(a.useDispatch)(o.b).setValue,h=Object(i.useCallback)((function(){p(l.k,!0),Object(g.I)("".concat(n,"_kmw"),"change_metrics")}),[p,n]),v=Array.isArray(t)&&(null==t?void 0:t.length)>0;return Object(m.a)(v),v?e.createElement(i.Fragment,null,e.createElement(s.a,{secondary:!0,linkButton:!0,className:"googlesitekit-widget-area__cta-link googlesitekit-km-change-metrics-cta",onClick:h,leadingIcon:e.createElement(u.a,{width:22,height:22})},Object(r.__)("Change metrics","google-site-kit")),e.createElement(d.a,null)):null}}).call(this,n(4))},440:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return InsufficientPermissionsError}));var i=n(0),r=n.n(i),a=n(1),o=n(39),c=n(2),l=n(3),s=n(13),u=n(21),d=n(304),g=n(9),f=n(18);function InsufficientPermissionsError(t){var n=t.moduleSlug,i=t.onRetry,r=t.infoTooltip,m=t.headerText,p=Object(f.a)(),h=Object(l.useSelect)((function(e){return e(s.c).getErrorTroubleshootingLinkURL({code:"".concat(n,"_insufficient_permissions")})}));Object(a.useEffect)((function(){Object(g.J)("".concat(p,"_kmw"),"insufficient_permissions_error")}),[p]);var v=Object(a.useCallback)((function(){Object(g.I)("".concat(p,"_kmw"),"insufficient_permissions_error_retry"),null==i||i()}),[i,p]);return e.createElement(d.a,{title:Object(c.__)("Insufficient permissions","google-site-kit"),headerText:m,infoTooltip:r},e.createElement("div",{className:"googlesitekit-report-error-actions"},e.createElement("span",{className:"googlesitekit-error-retry-text"},Object(o.a)(Object(c.__)("Permissions updated? Retry","google-site-kit"),{a:e.createElement(u.a,{onClick:v})})),e.createElement("span",{className:"googlesitekit-error-retry-text"},Object(o.a)(Object(c.__)("You’ll need to contact your administrator. Learn more","google-site-kit"),{a:e.createElement(u.a,{href:h,external:!0,hideExternalIndicator:!0})}))))}InsufficientPermissionsError.propTypes={moduleSlug:r.a.string.isRequired,onRetry:r.a.func.isRequired,headerText:r.a.string,infoTooltip:r.a.string}}).call(this,n(4))},441:function(e,t,n){"use strict";(function(e){var i=n(6),r=n.n(i),a=n(16),o=n.n(a),c=n(0),l=n.n(c),s=n(2),u=n(1),d=n(3),g=n(10),f=n(385),m=n(386),p=n(7),h=n(13),v=n(26),b=n(50),E=n(178),_=n(9),O=n(18),y=n(400),k=n(460),j=n(32);function KeyMetricsSetupCTAWidget(t){var n=t.Widget,i=t.WidgetNull,a=Object(O.a)(),c=Object(y.a)(),l=Object(d.useSelect)((function(e){return e(h.c).getAdminURL("googlesitekit-user-input")})),b=Object(d.useSelect)((function(e){return e(h.c).getAdminURL("googlesitekit-metric-selection")})),S={tooltipSlug:v.l,title:Object(s.__)("You can always set up goals in Settings later","google-site-kit"),content:Object(s.__)("The Key Metrics section will be added back to your dashboard once you set your goals in Settings","google-site-kit"),dismissLabel:Object(s.__)("Got it","google-site-kit")},A=Object(E.b)(S),w=Object(d.useDispatch)(p.a).dismissItem,T=function(){var e=o()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(_.I)("".concat(a,"_kmw-cta-notification"),"dismiss_notification");case 2:return A(),e.next=5,w(v.l);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=Object(d.useDispatch)(j.a).navigateTo,N=Object(u.useCallback)(o()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(_.I)("".concat(a,"_kmw-cta-notification"),"confirm_pick_own_metrics");case 2:C(b);case 3:case"end":return e.stop()}}),e)}))),[C,b,a]),D=Object(u.useCallback)((function(){Object(_.I)("".concat(a,"_kmw-cta-notification"),"confirm_get_tailored_metrics")}),[a]);return c?e.createElement(n,{noPadding:!0,Footer:function Footer(){return e.createElement(m.a,{onActionClick:N})}},e.createElement(f.a,{title:Object(s.__)("Get personalized suggestions for user interaction metrics based on your goals","google-site-kit"),description:Object(s.__)("Answer 3 questions and we’ll suggest relevant metrics for your dashboard. These metrics will help you track how users interact with your site.","google-site-kit"),actions:e.createElement(u.Fragment,null,e.createElement(k.a,null),e.createElement(g.Button,{className:"googlesitekit-key-metrics-cta-button",href:l,onClick:D},Object(s.__)("Get tailored metrics","google-site-kit")),e.createElement(g.Button,{tertiary:!0,onClick:T},Object(s.__)("Maybe later","google-site-kit"))),ga4Connected:!0})):e.createElement(i,null)}KeyMetricsSetupCTAWidget.propTypes={Widget:l.a.elementType.isRequired,WidgetNull:l.a.elementType},t.a=Object(b.a)({moduleName:"analytics-4"})(KeyMetricsSetupCTAWidget)}).call(this,n(4))},442:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return MetricTileNumeric}));var i=n(22),r=n.n(i),a=n(25),o=n.n(a),c=n(0),l=n.n(c),s=n(9),u=n(187),d=n(207);function MetricTileNumeric(t){var n=t.metricValue,i=t.metricValueFormat,a=t.subText,c=t.previousValue,l=t.currentValue,g=o()(t,["metricValue","metricValueFormat","subText","previousValue","currentValue"]),f=Object(s.m)(i);return e.createElement(d.a,r()({className:"googlesitekit-km-widget-tile--numeric"},g),e.createElement("div",{className:"googlesitekit-km-widget-tile__metric-container"},e.createElement("div",{className:"googlesitekit-km-widget-tile__metric"},Object(s.B)(n,f)),e.createElement("p",{className:"googlesitekit-km-widget-tile__subtext"},a)),e.createElement("div",{className:"googlesitekit-km-widget-tile__metric-change-container"},e.createElement(u.a,{previousValue:c,currentValue:l,isAbsolute:"percent"===(null==f?void 0:f.style)})))}MetricTileNumeric.propTypes={metricValue:l.a.oneOfType([l.a.string,l.a.number]),metricValueFormat:l.a.oneOfType([l.a.string,l.a.object]),subtext:l.a.string,previousValue:l.a.number,currentValue:l.a.number}}).call(this,n(4))},443:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return MetricTileTable}));var i=n(22),r=n.n(i),a=n(25),o=n.n(a),c=n(0),l=n.n(c),s=n(14),u=n(11),d=n.n(u),g=n(207);function MetricTileTable(t){var n=t.rows,i=void 0===n?[]:n,a=t.columns,c=void 0===a?[]:a,l=t.limit,u=t.ZeroState,f=o()(t,["rows","columns","limit","ZeroState"]),m=null;return(null==i?void 0:i.length)>0?m=i.slice(0,l||i.length).map((function(t,n){return e.createElement("div",{key:n,className:"googlesitekit-table__body-row"},c.map((function(n,i){var r=n.Component,a=n.field,o=n.className,c=void 0!==a?Object(s.get)(t,a):void 0;return e.createElement("div",{key:i,className:d()("googlesitekit-table__body-item",o)},r&&e.createElement(r,{row:t,fieldValue:c}),!r&&c)})))})):u&&(m=e.createElement("div",{className:"googlesitekit-table__body-row googlesitekit-table__body-row--no-data"},e.createElement("div",{className:"googlesitekit-table__body-zero-data"},e.createElement(u,null)))),e.createElement(g.a,r()({className:"googlesitekit-km-widget-tile--table"},f),e.createElement("div",{className:"googlesitekit-km-widget-tile__table"},m))}MetricTileTable.propTypes={rows:l.a.array,columns:l.a.array,limit:l.a.number,ZeroState:l.a.elementType}}).call(this,n(4))},444:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return MetricTileTablePlainText}));var i=n(0),r=n.n(i);function MetricTileTablePlainText(t){var n=t.content;return e.createElement("p",{className:"googlesitekit-km-widget-tile__table-plain-text"},n)}MetricTileTablePlainText.propTypes={content:r.a.string.isRequired}}).call(this,n(4))},445:function(e,t,n){"use strict";(function(e){var i=n(6),r=n.n(i),a=n(16),o=n.n(a),c=n(15),l=n.n(c),s=n(0),u=n.n(s),d=n(1),g=n(3),f=n(50),m=n(8),p=n(7),h=n(468),v=n(180),b=n(208),E=n(342),_=n(247),O=n(36);function AudienceTilesWidget(t){var n=t.Widget,i=Object(g.useSelect)((function(e){var t=e(m.r).getOrSyncAvailableAudiences();return null==t?void 0:t.map((function(e){return e.name}))})),a=Object(g.useSelect)((function(e){return e(p.a).getConfiguredAudiences()})),c=Object(d.useState)(!1),s=l()(c,2),u=s[0],f=s[1],y=Object(g.useDispatch)(m.r),k=y.clearErrors,j=y.maybeSyncAvailableAudiences,S=y.syncAvailableAudiences,A=Object(g.useSelect)((function(e){return e(m.r).isSettingUpAudiences()})),w=Object(g.useSelect)((function(e){return e(m.r).getErrorForAction("syncAvailableAudiences")}));if(Object(d.useEffect)((function(){u||A||function(){var e=o()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:f(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[u,A,j]),w){var T=Object(O.e)(w);return e.createElement(b.a,{errors:w,Widget:n,onRetry:T?void 0:o()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k("syncAvailableAudiences");case 2:return e.next=4,S();case 4:case"end":return e.stop()}}),e)}))),showRetryButton:!T})}return(null==a?void 0:a.some((function(e){return null==i?void 0:i.includes(e)})))?e.createElement(h.a,{Widget:n,widgetLoading:!u||!i||!a}):u?e.createElement(E.a,{Widget:n,WidgetNull:_.a}):e.createElement(n,{className:"googlesitekit-widget-audience-tiles",noPadding:!0},e.createElement("div",{className:"googlesitekit-widget-audience-tiles__body"},e.createElement(n,{noPadding:!0},e.createElement(v.a,null)),e.createElement(n,{noPadding:!0},e.createElement(v.a,null))))}AudienceTilesWidget.propTypes={Widget:u.a.elementType.isRequired,WidgetNull:u.a.elementType.isRequired},t.a=Object(f.a)({moduleName:"analytics-4"})(AudienceTilesWidget)}).call(this,n(4))},446:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceSelectionPanel}));var i=n(3),r=n(41),a=n(24),o=n(161),c=n(494);function AudienceSelectionPanel(){var t=Object(i.useSelect)((function(e){return e(a.b).getValue(r.i)}));return e.createElement(o.a,{value:{key:"AudienceSelectionPanel",value:!!t}},e.createElement(c.a,null))}}).call(this,n(4))},447:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceAreaFooter}));var i=n(2),r=n(3),a=n(7),o=n(8),c=n(19),l=n(135),s=n(34);function AudienceAreaFooter(){var t=Object(s.a)(),n=Object(r.useSelect)((function(e){return e(a.a).getDateRangeDates({offsetDays:o.g})})),u=Object(r.useSelect)((function(e){return t?null:e(o.r).getServiceReportURL("audiences",{dates:n})}));return Object(r.useSelect)((function(e){return e(c.a).isModuleConnected("analytics-4")}))?e.createElement(l.a,{className:"googlesitekit-audience-widget__source",name:Object(i._x)("Analytics","Service name","google-site-kit"),href:u,external:!0}):null}}).call(this,n(4))},448:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ChangeGroupsLink}));var i=n(1),r=n(2),a=n(3),o=n(18),c=n(9),l=n(41),s=n(24),u=n(8),d=n(21),g=n(309);function ChangeGroupsLink(){var t=Object(o.a)(),n=Object(a.useInViewSelect)((function(e){return e(u.r).getConfigurableAudiences()}),[]),f=Object(a.useDispatch)(s.b).setValue,m=Object(i.useCallback)((function(){f(l.i,!0),Object(c.I)("".concat(t,"_audiences-sidebar"),"change_groups")}),[f,t]);return Array.isArray(n)&&(null==n?void 0:n.length)>0?e.createElement(i.Fragment,null,e.createElement(d.a,{secondary:!0,linkButton:!0,className:"googlesitekit-widget-area__cta-link",onClick:m,leadingIcon:e.createElement(g.a,{width:22,height:22})},Object(r.__)("Change groups","google-site-kit"))):null}}).call(this,n(4))},449:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ConnectAnalyticsCTAWidget}));var i=n(0),r=n.n(i),a=n(39),o=n(1),c=n(2),l=n(3),s=n(509),u=n(510),d=n(21),g=n(19),f=n(160),m=n(20),p=n(351);function ConnectAnalyticsCTAWidget(t){var n=t.Widget,i=Object(m.e)()===m.c,r=Object(f.a)("analytics-4"),h=Object(l.useSelect)((function(e){return e(g.a).getModuleIcon("analytics-4")})),v=i?e.createElement("p",null,Object(a.a)(Object(c.__)("Google Analytics is disconnected, your audience metrics can’t be displayed. Connect Google Analytics","google-site-kit"),{a:e.createElement(d.a,{secondary:!0,onClick:r})})):e.createElement(o.Fragment,null,e.createElement("p",null,Object(c.__)("Google Analytics is disconnected, your audience metrics can’t be displayed","google-site-kit")),e.createElement(d.a,{secondary:!0,onClick:r},Object(c.__)("Connect Google Analytics","google-site-kit")));return e.createElement(n,{noPadding:!0},e.createElement(p.a,{Icon:h,SVGGraphic:i?u.a:s.a},v))}ConnectAnalyticsCTAWidget.propTypes={Widget:r.a.elementType.isRequired}}).call(this,n(4))},450:function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),a=n(1),o=n(2),c=n(3),l=n(7),s=n(9),u=n(50),d=n(252),g=n(167),f=n(8),m=n(24),p=n(119),h=n(18),v=Object(p.a)(d.a);function InfoNoticeWidget(t){var n=t.Widget,i=t.WidgetNull,r=Object(h.a)(),u=Object(c.useInViewSelect)((function(e){var t=e(f.r).getOrSyncAvailableAudiences();return null==t?void 0:t.map((function(e){return e.name}))}),[]),d=Object(c.useInViewSelect)((function(e){return e(l.a).getConfiguredAudiences()}),[]),p=null==d?void 0:d.some((function(e){return null==u?void 0:u.includes(e)})),b=g.a.length,E=Object(c.useInViewSelect)((function(e){return e(l.a).isPromptDismissed(g.c)}),[]),_=Object(c.useSelect)((function(e){return e(m.b).getValue(g.b)})),O=Object(c.useInViewSelect)((function(e){return e(l.a).getPromptDismissCount(g.c)}),[]),y=Object(c.useDispatch)(l.a).dismissPrompt,k=Object(a.useCallback)((function(){void 0!==O&&Object(s.I)("".concat(r,"_audiences-info-notice"),"dismiss_notice",g.a[O].slug).finally((function(){var e=2*s.f,t=O+1=b||!0===_)return e.createElement(i,null);var j=g.a[O],S=j.slug,A=j.content;return e.createElement(n,{noPadding:!0},e.createElement(v,{content:A,dismissLabel:Object(o.__)("Got it","google-site-kit"),onDismiss:k,onInView:function(){Object(s.I)("".concat(r,"_audiences-info-notice"),"view_notice",S)}}))}InfoNoticeWidget.propTypes={Widget:r.a.elementType.isRequired,WidgetNull:r.a.elementType.isRequired},t.a=Object(u.a)({moduleName:"analytics-4"})(InfoNoticeWidget)}).call(this,n(4))},451:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return SecondaryUserSetupWidget}));var i=n(6),r=n.n(i),a=n(16),o=n.n(a),c=n(15),l=n.n(c),s=n(0),u=n.n(s),d=n(82),g=n(1),f=n(3),m=n(180),p=n(8),h=n(208),v=n(36);function SecondaryUserSetupWidget(t){var n=t.Widget,i=Object(g.useState)(null),a=l()(i,2),c=a[0],s=a[1],u=Object(f.useSelect)((function(e){return e(p.r).isSettingUpAudiences()})),b=Object(f.useDispatch)(p.r).enableSecondaryUserAudienceGroup,E=function(){var e=o()(r.a.mark((function e(){var t,n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(null),e.next=3,b();case 3:t=e.sent,(n=t.error)&&s(n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(d.a)((function(){u||o()(r.a.mark((function e(){var t,n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b();case 2:t=e.sent,(n=t.error)&&s(n);case 5:case"end":return e.stop()}}),e)})))()})),c?e.createElement(h.a,{Widget:n,errors:c,onRetry:E,showRetryButton:!Object(v.e)(c)}):e.createElement(n,{className:"googlesitekit-widget-audience-tiles",noPadding:!0},e.createElement("div",{className:"googlesitekit-widget-audience-tiles__body"},e.createElement(n,{noPadding:!0},e.createElement(m.a,null)),e.createElement(n,{noPadding:!0},e.createElement(m.a,null))))}SecondaryUserSetupWidget.propTypes={Widget:u.a.elementType.isRequired}}).call(this,n(4))},455:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return SetupCompletedSurveyTrigger}));var i=n(1),r=n(3),a=n(13),o=n(7),c=n(9),l=n(255);function SetupCompletedSurveyTrigger(){var t=Object(r.useSelect)((function(e){return e(a.c).isKeyMetricsSetupCompleted()})),n=Object(r.useSelect)((function(e){return e(a.c).getKeyMetricsSetupCompletedBy()})),s=Object(r.useSelect)((function(e){return e(o.a).getID()}));return t?e.createElement(i.Fragment,null,e.createElement(l.a,{triggerID:"view_kmw",ttl:c.f}),n===s&&e.createElement(l.a,{triggerID:"view_kmw_setup_completed",ttl:c.f})):null}}).call(this,n(4))},456:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return KeyMetricsSetupDesktopSVG}));var i=n(1),r=n(2),a=n(43),o=n(152),c=Object(i.lazy)((function(){return n.e(37).then(n.bind(null,819))}));function KeyMetricsSetupDesktopSVG(){return e.createElement(i.Suspense,{fallback:e.createElement(a.a,{width:"100%",height:"235px"})},e.createElement(o.a,{errorMessage:Object(r.__)("Failed to load graphic","google-site-kit")},e.createElement(c,null)))}}).call(this,n(4))},457:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return KeyMetricsSetupSmallDesktopSVG}));var i=n(1),r=n(2),a=n(43),o=n(152),c=Object(i.lazy)((function(){return n.e(39).then(n.bind(null,820))}));function KeyMetricsSetupSmallDesktopSVG(){return e.createElement(i.Suspense,{fallback:e.createElement(a.a,{width:"100%",height:"235px"})},e.createElement(o.a,{errorMessage:Object(r.__)("Failed to load graphic","google-site-kit")},e.createElement(c,null)))}}).call(this,n(4))},458:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return KeyMetricsSetupTabletSVG}));var i=n(1),r=n(2),a=n(43),o=n(152),c=Object(i.lazy)((function(){return n.e(40).then(n.bind(null,821))}));function KeyMetricsSetupTabletSVG(){return e.createElement(i.Suspense,{fallback:e.createElement(a.a,{width:"100%",height:"235px"})},e.createElement(o.a,{errorMessage:Object(r.__)("Failed to load graphic","google-site-kit")},e.createElement(c,null)))}}).call(this,n(4))},459:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return KeyMetricsSetupMobileSVG}));var i=n(1),r=n(2),a=n(43),o=n(152),c=Object(i.lazy)((function(){return n.e(38).then(n.bind(null,822))}));function KeyMetricsSetupMobileSVG(){return e.createElement(i.Suspense,{fallback:e.createElement(a.a,{width:"100%",height:"235px"})},e.createElement(o.a,{errorMessage:Object(r.__)("Failed to load graphic","google-site-kit")},e.createElement(c,null)))}}).call(this,n(4))},460:function(e,t,n){"use strict";n.d(t,"a",(function(){return KeyMetricsSetupCTARenderedEffect}));var i=n(266),r=n(3),a=n(24);function KeyMetricsSetupCTARenderedEffect(){var e=Object(r.useDispatch)(a.b).setValue;return Object(i.a)((function(){e("KEY_METRICS_SETUP_CTA_RENDERED",!0)})),null}},461:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return GetHelpLink}));var i=n(0),r=n.n(i),a=n(39),o=n(2),c=n(21);function GetHelpLink(t){var n=t.linkURL;return Object(a.a)(/* translators: %s: get help text. */ Object(o.__)("Trouble getting access? ","google-site-kit"),{HelpLink:e.createElement(c.a,{href:n,external:!0,hideExternalIndicator:!0},Object(o.__)("Get help","google-site-kit"))})}GetHelpLink.propTypes={linkURL:r.a.string.isRequired}}).call(this,n(4))},462:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return MetricTileLoader}));var i=n(43);function MetricTileLoader(){return e.createElement("div",{className:"googlesitekit-km-widget-tile__loading"},e.createElement(i.a,{className:"googlesitekit-km-widget-tile__loading-header",width:"100%",height:"14px"}),e.createElement(i.a,{className:"googlesitekit-km-widget-tile__loading-body",width:"100%",height:"53px"}))}}).call(this,n(4))},463:function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),a=n(1),o=n(2),c=n(10),l=n(17),s=n(20),u=n(352),d=n(36),g=n(136),f=n(345),m=Object(a.forwardRef)((function(t,n){var i=t.Widget,r=t.errors,a=t.onRetry,m=t.onRequestAccess,p=t.showRetryButton,h=Object(s.e)(),v=h===s.b,b=h===s.c,E=r.some(d.e);return e.createElement(i,{ref:n,noPadding:!0,className:"googlesitekit-audience-segmentation-error-widget"},e.createElement(l.e,{collapsed:!0,className:"googlesitekit-audience-segmentation-error__widget-primary-cell"},e.createElement(l.k,null,e.createElement(l.a,{smSize:6,mdSize:8,lgSize:7},e.createElement("h3",{className:"googlesitekit-publisher-win__title"},E?Object(o.__)("Insufficient permissions","google-site-kit"):Object(o.__)("Your visitor groups data loading failed","google-site-kit")),e.createElement("div",{className:"googlesitekit-widget-audience-segmentation-error__actions"},p&&a?e.createElement(c.Button,{onClick:a,danger:!0},Object(o.__)("Retry","google-site-kit")):e.createElement(g.a,{moduleSlug:"analytics-4",error:r,GetHelpLink:E?f.a:void 0,hideGetHelpLink:!E,buttonVariant:"danger",getHelpClassName:"googlesitekit-error-retry-text",onRetry:a,onRequestAccess:m}))),!v&&!b&&e.createElement(l.a,{className:"googlesitekit-widget-audience-segmentation-error__svg-wrapper",smSize:6,mdSize:3,lgSize:5},e.createElement(u.a,{width:"233px"})),b&&e.createElement(l.a,{className:"googlesitekit-widget-audience-segmentation-error__svg-wrapper",mdSize:8},e.createElement(u.a,{width:"233px"})),v&&e.createElement(l.a,{className:"googlesitekit-widget-audience-segmentation-error__svg-wrapper",smSize:8},e.createElement(u.a,{width:"233px"})))))}));m.propTypes={Widget:r.a.elementType.isRequired,errors:r.a.arrayOf(r.a.object).isRequired,onRetry:r.a.func.isRequired,onRequestAccess:r.a.func.isRequired,showRetryButton:r.a.bool},t.a=m}).call(this,n(4))},464:function(e,t,n){"use strict";(function(e){var i=n(6),r=n.n(i),a=n(16),o=n.n(a),c=n(1),l=n(2),s=n(159),u=n(89),d=n(32),g=n(13),f=n(7),m=n(9),p=n(18),h=n(3),v=n(10),b=n(132),E=Object(c.forwardRef)((function(t,n){var i=Object(p.a)(),a=Object(h.useSelect)((function(e){var t=e(g.c).getAdminURL("googlesitekit-dashboard");return Object(s.a)(t,{widgetArea:u.AREA_MAIN_DASHBOARD_TRAFFIC_AUDIENCE_SEGMENTATION})})),c=Object(h.useDispatch)(d.a).navigateTo,E=Object(h.useDispatch)(f.a).dismissItem;function _(){return E("settings_visitor_groups_setup_success_notification")}return e.createElement("div",{ref:n,className:"googlesitekit-settings-visitor-groups__setup-success googlesitekit-subtle-notification"},e.createElement("div",{className:"googlesitekit-subtle-notification__icon"},e.createElement(b.a,{width:24,height:24})),e.createElement("div",{className:"googlesitekit-subtle-notification__content"},e.createElement("p",null,Object(l.__)("We’ve added the visitor groups section to your dashboard!","google-site-kit"))),e.createElement("div",{className:"googlesitekit-subtle-notification__action"},e.createElement(v.Button,{tertiary:!0,onClick:function(){Object(m.I)("".concat(i,"_audiences-setup-cta-settings-success"),"dismiss_notification").finally(_)}},Object(l.__)("Got it","google-site-kit")),e.createElement(v.Button,{onClick:function(){Object(m.I)("".concat(i,"_audiences-setup-cta-settings-success"),"confirm_notification").finally(o()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_();case 2:c(a);case 3:case"end":return e.stop()}}),e)}))))}},Object(l.__)("Show me","google-site-kit"))))}));t.a=E}).call(this,n(4))},465:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t0;if(a&&s&&u)return"continue";a&&!s&&e.push(r),t.push(r)};(null==n?void 0:n.length)>0;)i();return[e,t]}),[v,h,F,y,j,_,w]),G=r()(U,2),H=G[0],q=G[1];var K,Y=(K=[],j&&K.push(A),w&&K.push(C),!(!K.every(Boolean)&&!D)||(null==h?void 0:h.every((function(e){return L[e].length>0}))));Object(c.useEffect)((function(){H.forEach((function(e){var t="audience-tile-".concat(e);V.current[t]||(W(t,{expiresInSeconds:1}),V.current[t]=!0)}))}),[H,W,z]);var X=Object(l.useSelect)((function(e){return e(d.r).isFetchingSyncAvailableCustomDimensions()})),Z=Object(c.useState)(q[0]),$=r()(Z,2),J=$[0],Q=$[1],ee=Object(c.useCallback)((function(e){var t=q.indexOf(e);return-1===t?0:t}),[q]);Object(c.useEffect)((function(){q.includes(J)||Q(q[0])}),[J,q]);var te=ee(J),ne=i||!S||!T||!N||!R||!I||!P||X;return e.createElement(n,{className:"googlesitekit-widget-audience-tiles",noPadding:!0},!1===Y&&!ne&&o&&q.length>0&&e.createElement(f.a,{activeTileIndex:te,setActiveTile:Q,visibleAudiences:q}),e.createElement(g.a,{activeTileIndex:te,allTilesError:Y,individualTileErrors:L,loading:ne,visibleAudiences:q,Widget:n}))}AudienceTiles.propTypes={Widget:o.a.elementType.isRequired,widgetLoading:o.a.bool.isRequired}}).call(this,n(4))},469:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Body}));var i=n(27),r=n.n(i),a=n(15),o=n.n(a),c=n(1),l=n(3),s=n(7),u=n(8),d=n(250),g=n(388),f=n(346),m=n(20),p=n(34),h=n(208),v=n(180),b=n(470),E=n(473),_=n(349),O=n(490);function Body(t){var n=t.activeTileIndex,i=t.allTilesError,a=t.individualTileErrors,y=t.loading,k=t.visibleAudiences,j=t.Widget,S=Object(m.e)(),A=Object(p.a)(),w=S===m.b||S===m.c,T=Object(l.useInViewSelect)((function(e){return e(u.r).getOrSyncAvailableAudiences()}),[]),C=Object(l.useInViewSelect)((function(e){return e(s.a).getConfiguredAudiences()}),[]),N=Object(l.useSelect)((function(e){return e(u.r).getConfiguredSiteKitAndOtherAudiences()}))||[[],[]],D=o()(N,2),R=D[0],x=D[1],I=Object(l.useSelect)((function(e){return e(u.r).hasAudiencePartialData(R)})),M=Object(l.useInViewSelect)((function(e){return null==C?void 0:C.reduce((function(t,n){return t[n]=e(u.r).isAudiencePartialData(n),t}),{})}),[C]),P=Object(f.a)({isSiteKitAudiencePartialData:I,siteKitAudiences:R,otherAudiences:x}),B=P.report,L=P.reportError,F=P.siteKitAudiencesReport,z=P.totalPageviews,W=P.totalPageviewsReportError,V=P.topCitiesReport,U=P.topContentReport,G=P.topContentReportErrors,H=P.topContentPageTitlesReport,q=P.topContentPageTitlesReportErrors,K=function(e,t){var n,i,r,a,o,c,l=(null==T||null===(n=T.filter((function(t){return t.name===e})))||void 0===n||null===(i=n[0])||void 0===i?void 0:i.displayName)||"",s=(null==T||null===(r=T.filter((function(t){return t.name===e})))||void 0===r||null===(a=r[0])||void 0===a?void 0:a.audienceSlug)||"",u=function(e){var t,n=R.some((function(t){return t.name===e})),i=null===(t=R.find((function(t){return t.name===e})))||void 0===t?void 0:t.audienceSlug,r=function(t){var r,a,o,c,l,s,u,d,g,f,m,p,h;if(n&&I){var v,b="new-visitors"===i?"new":"returning";h=null==F||null===(v=F.rows)||void 0===v?void 0:v.find((function(e){var n,i,r=e.dimensionValues;return(null==r||null===(n=r[0])||void 0===n?void 0:n.value)===b&&(null==r||null===(i=r[1])||void 0===i?void 0:i.value)===t}))}else{var E;h=null==B||null===(E=B.rows)||void 0===E?void 0:E.find((function(n){var i,r,a=n.dimensionValues;return(null==a||null===(i=a[0])||void 0===i?void 0:i.value)===e&&(null==a||null===(r=a[1])||void 0===r?void 0:r.value)===t}))}return[Number((null===(r=h)||void 0===r||null===(a=r.metricValues)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.value)||0),Number((null===(c=h)||void 0===c||null===(l=c.metricValues)||void 0===l||null===(s=l[1])||void 0===s?void 0:s.value)||0),Number((null===(u=h)||void 0===u||null===(d=u.metricValues)||void 0===d||null===(g=d[2])||void 0===g?void 0:g.value)||0),Number((null===(f=h)||void 0===f||null===(m=f.metricValues)||void 0===m||null===(p=m[3])||void 0===p?void 0:p.value)||0)]};return{current:r("date_range_0"),previous:r("date_range_1")}}(e),d=u.current,g=u.previous,f=d[0],m=g[0],p=d[1],h=g[1],v=d[2],b=g[2],E=d[3],_=g[3],O=null==V?void 0:V[t],y=null==U?void 0:U[t],k=(null==H||null===(o=H[t])||void 0===o||null===(c=o.rows)||void 0===c?void 0:c.reduce((function(e,t){return e[t.dimensionValues[0].value]=t.dimensionValues[1].value,e}),{}))||{},j=R.some((function(t){return t.name===e})),S=B,A=e;return j&&I&&(S=F,A="new-visitors"===s?"new":"returning"),{audienceName:l,audienceSlug:s,visitors:f,prevVisitors:m,visitsPerVisitors:p,prevVisitsPerVisitors:h,pagesPerVisit:v,prevPagesPerVisit:b,pageviews:E,prevPageviews:_,topCities:O,topContent:y,topContentTitles:k,isZeroData:function(e,t){var n,i,r,a=null==e||null===(n=e.rows)||void 0===n?void 0:n.find((function(e){var n,i;return(null===(n=e.dimensionValues)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.value)===t}));return 0===((null==a||null===(i=a.metricValues)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.value)||0)}(S,A),isPartialData:!j&&M[e]}},Y=Object.values(G).some(d.a)||Object.values(q).some(d.a),X=Object(l.useDispatch)(s.a).dismissItem,Z=Object(l.useDispatch)(u.r).fetchSyncAvailableCustomDimensions,$=Object(c.useCallback)((function(e){X("audience-tile-".concat(e))}),[X]);Object(c.useEffect)((function(){!A&&Y&&Z()}),[Z,Y,A]);var J=0;return e.createElement("div",{className:"googlesitekit-widget-audience-tiles__body"},i&&!y&&e.createElement(h.a,{Widget:j,errors:[].concat(r()(Object.values(a).flat(2)),[L,W])}),(!1===i||y)&&k.map((function(t,i){var r,o,c,l,s,u,d,f,m,p,h,O,S,A,T,C,N,D,R,x,I,M,P,B,L,F,W,V,U,G;if(w&&i!==n)return null;var H=K(t,i),q=H.audienceName,X=H.audienceSlug,Z=H.visitors,Q=H.prevVisitors,ee=H.visitsPerVisitors,te=H.prevVisitsPerVisitors,ne=H.pagesPerVisit,ie=H.prevPagesPerVisit,re=H.pageviews,ae=H.prevPageviews,oe=H.topCities,ce=H.topContent,le=H.topContentTitles,se=H.isZeroData,ue=H.isPartialData,de=(null==oe?void 0:oe.rows)?Object(g.a)(oe.rows):[];return y||void 0===se||void 0===ue?e.createElement(j,{key:t,noPadding:!0},e.createElement(v.a,null)):a[t].length>0?e.createElement(b.a,{key:t,audienceSlug:X,errors:a[t]}):e.createElement(E.a,{key:t,audienceTileNumber:J++,audienceSlug:X,title:q,infoTooltip:e.createElement(_.a,{audienceName:q,audienceSlug:X}),visitors:{currentValue:Z,previousValue:Q},visitsPerVisitor:{currentValue:ee,previousValue:te},pagesPerVisit:{currentValue:ne,previousValue:ie},pageviews:{currentValue:re,previousValue:ae},percentageOfTotalPageViews:0!==z?re/z:0,topCities:{dimensionValues:[null==de||null===(r=de[0])||void 0===r||null===(o=r.dimensionValues)||void 0===o?void 0:o[0],null==de||null===(c=de[1])||void 0===c||null===(l=c.dimensionValues)||void 0===l?void 0:l[0],null==de||null===(s=de[2])||void 0===s||null===(u=s.dimensionValues)||void 0===u?void 0:u[0]],metricValues:[null==de||null===(d=de[0])||void 0===d||null===(f=d.metricValues)||void 0===f?void 0:f[0],null==de||null===(m=de[1])||void 0===m||null===(p=m.metricValues)||void 0===p?void 0:p[0],null==de||null===(h=de[2])||void 0===h||null===(O=h.metricValues)||void 0===O?void 0:O[0]],total:Z},topContent:{dimensionValues:[null==ce||null===(S=ce.rows)||void 0===S||null===(A=S[0])||void 0===A||null===(T=A.dimensionValues)||void 0===T?void 0:T[0],null==ce||null===(C=ce.rows)||void 0===C||null===(N=C[1])||void 0===N||null===(D=N.dimensionValues)||void 0===D?void 0:D[0],null==ce||null===(R=ce.rows)||void 0===R||null===(x=R[2])||void 0===x||null===(I=x.dimensionValues)||void 0===I?void 0:I[0]],metricValues:[null==ce||null===(M=ce.rows)||void 0===M||null===(P=M[0])||void 0===P||null===(B=P.metricValues)||void 0===B?void 0:B[0],null==ce||null===(L=ce.rows)||void 0===L||null===(F=L[1])||void 0===F||null===(W=F.metricValues)||void 0===W?void 0:W[0],null==ce||null===(V=ce.rows)||void 0===V||null===(U=V[2])||void 0===U||null===(G=U.metricValues)||void 0===G?void 0:G[0]]},topContentTitles:le,hasInvalidCustomDimensionError:Y,Widget:j,audienceResourceName:t,isZeroData:se,isPartialData:ue,isTileHideable:k.length>1,onHideTile:function(){return $(t)}})})),!w&&e.createElement(O.a,{Widget:j,loading:y,allTilesError:i,visibleAudienceCount:k.length}))}}).call(this,n(4))},47:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i={NEW:"new",SUCCESS:"success",WARNING:"warning",INFO:"info",ERROR:"error"}},470:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceTileError}));var i=n(0),r=n.n(i),a=n(36),o=n(471),c=n(119),l=n(18),s=n(9),u=Object(c.a)(o.a);function AudienceTileError(t){var n=t.audienceSlug,i=t.errors,r=Object(l.a)(),o=i.some((function(e){return Object(a.e)(e)}));return e.createElement(u,{errors:i,onInView:function(){var e=o?"insufficient_permissions_error":"data_loading_error";Object(s.I)("".concat(r,"_audiences-tile"),e,n)},onRetry:function(){Object(s.I)("".concat(r,"_audiences-tile"),"data_loading_error_retry",n)},onRequestAccess:function(){Object(s.I)("".concat(r,"_audiences-tile"),"insufficient_permissions_error_request_access",n)}})}AudienceTileError.propTypes={audienceSlug:r.a.string.isRequired,errors:r.a.array.isRequired}}).call(this,n(4))},471:function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),a=n(1),o=n(2),c=n(36),l=n(472),s=n(136),u=n(345),d=Object(a.forwardRef)((function(t,n){var i=t.errors,r=t.onRetry,a=t.onRequestAccess,d=i.some((function(e){return Object(c.e)(e)}));return e.createElement("div",{className:"googlesitekit-audience-segmentation-tile-error",ref:n},e.createElement("div",{className:"googlesitekit-audience-segmentation-tile-error__container"},e.createElement(l.a,{className:"googlesitekit-audience-segmentation-tile-error__image"}),e.createElement("div",{className:"googlesitekit-audience-segmentation-tile-error__body"},e.createElement("div",{className:"googlesitekit-audience-segmentation-tile-error__message"},e.createElement("h3",{className:"googlesitekit-audience-segmentation-tile-error__title"},d?Object(o.__)("Insufficient permissions","google-site-kit"):Object(o.__)("Data loading failed","google-site-kit"))),e.createElement("div",{className:"googlesitekit-audience-segmentation-tile-error__actions"},e.createElement(s.a,{moduleSlug:"analytics-4",error:i,GetHelpLink:d?u.a:void 0,hideGetHelpLink:!d,buttonVariant:"danger",onRetry:r,onRequestAccess:a})))))}));d.propTypes={errors:r.a.array.isRequired,onRetry:r.a.func.isRequired,onRequestAccess:r.a.func.isRequired},t.a=d}).call(this,n(4))},472:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.isRetrying;F(m.d,{autoSubmit:!0,isRetrying:t}),N||W({code:p.a,message:Object(l.__)("Additional permissions are required to create new audiences in Analytics.","google-site-kit"),data:{status:403,scopes:[m.h],skipModal:!0,skipDefaultErrorNotifications:!0,redirectURL:D,errorRedirectURL:R}})}),[N,D,R,W,F]),X=Object(o.useCallback)((function(){F(m.d,{autoSubmit:!1,isRetrying:!1}),q(null),V(),L("createCustomDimension",[B,m.f.googlesitekit_post_type])}),[L,V,B,q,F]),Z=[u.b,u.c].includes(A),$=x||I||M;return i.createElement("div",{className:"googlesitekit-audience-segmentation-tile-metric googlesitekit-audience-segmentation-tile-metric--top-content"},i.createElement("div",{className:"googlesitekit-audience-segmentation-tile-metric__icon"},i.createElement(a,null)),i.createElement("div",{className:"googlesitekit-audience-segmentation-tile-metric__container"},i.createElement("div",{className:"googlesitekit-audience-segmentation-tile-metric__title"},y,!Z&&S&&i.createElement(h.a,{className:"googlesitekit-audience-segmentation-partial-data-badge",label:Object(l.__)("Partial data","google-site-kit"),onTooltipOpen:function(){Object(O.I)("".concat(w,"_audiences-tile"),"view_top_content_partial_data_tooltip",r)},tooltipTitle:Object(l.__)("Still collecting full data for this timeframe, partial data is displayed for this metric","google-site-kit")})),i.createElement(v.a,{topContentTitles:j,topContent:k,isTopContentPartialData:S,hasCustomDimension:!C,onCreateCustomDimension:Y,isSaving:$}),0===n&&(P&&!$||U&&!x||K)&&i.createElement(b.a,{apiErrors:[P],title:Object(l.__)("Failed to enable metric","google-site-kit"),description:Object(l.__)("Oops! Something went wrong. Retry enabling the metric.","google-site-kit"),onRetry:function(){return Y({isRetrying:!0})},onCancel:X,inProgress:$,hasOAuthError:K,trackEventCategory:"".concat(w,"_audiences-top-content-cta")})))}AudienceTilePagesMetric.propTypes={audienceTileNumber:a.a.number,audienceSlug:a.a.string.isRequired,TileIcon:a.a.elementType.isRequired,title:a.a.string.isRequired,topContent:a.a.object,topContentTitles:a.a.object,isTopContentPartialData:a.a.bool}}).call(this,n(28),n(4))},482:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceTilePagesMetricContent}));var i=n(0),r=n.n(i),a=n(2),o=n(3),c=n(20),l=n(7),s=n(8),u=n(347),d=n(21),g=n(348),f=n(9),m=n(119),p=n(18),h=n(34),v=n(483),b=Object(m.a)(v.a);function AudienceTilePagesMetricContent(t){var n,i=t.topContentTitles,r=t.topContent,m=t.isTopContentPartialData,v=t.hasCustomDimension,E=t.onCreateCustomDimension,_=t.isSaving,O=Object(p.a)(),y=Object(h.a)(),k=Object(c.e)(),j=[c.b,c.c].includes(k),S=(null==r||null===(n=r.dimensionValues)||void 0===n?void 0:n.filter(Boolean))||[],A=!!S.length,w=Object(o.useSelect)((function(e){return e(l.a).getDateRangeDates({offsetDays:s.g})}));function ContentLinkComponent(t){var n=t.content,r=i[null==n?void 0:n.value],a=null==n?void 0:n.value,c=Object(o.useSelect)((function(e){return y?null:e(s.r).getServiceReportURL("all-pages-and-screens",{filters:{unifiedPagePathScreen:a},dates:w})}));return y?e.createElement("div",{className:"googlesitekit-audience-segmentation-tile__top-content-metric-name"},r):e.createElement(d.a,{href:c,title:r,external:!0,hideExternalIndicator:!0},r)}return e.createElement("div",{className:"googlesitekit-audience-segmentation-tile-metric__content"},!v&&e.createElement(b,{onClick:function(){Object(f.I)("".concat(O,"_audiences-top-content-cta"),"create_custom_dimension").finally(E)},isSaving:_,onInView:function(){Object(f.I)("".concat(O,"_audiences-top-content-cta"),"view_cta")}}),v&&!A&&e.createElement(u.a,null),v&&A&&S.map((function(t,n){var i;return e.createElement("div",{key:null==t?void 0:t.value,className:"googlesitekit-audience-segmentation-tile-metric__page-metric-container"},e.createElement(ContentLinkComponent,{content:t}),e.createElement("div",{className:"googlesitekit-audience-segmentation-tile-metric__page-metric-value"},Object(f.B)(null==r||null===(i=r.metricValues[n])||void 0===i?void 0:i.value)))})),j&&m&&e.createElement(g.a,{content:Object(a.__)("Still collecting full data for this timeframe, partial data is displayed for this metric","google-site-kit")}))}AudienceTilePagesMetricContent.propTypes={topContentTitles:r.a.object,topContent:r.a.object,isTopContentPartialData:r.a.bool,hasCustomDimension:r.a.bool,onCreateCustomDimension:r.a.func,isSaving:r.a.bool}}).call(this,n(4))},483:function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),a=n(1),o=n(2),c=n(10),l=Object(a.forwardRef)((function(t,n){var i=t.onClick,r=t.isSaving;return e.createElement("div",{ref:n,className:"googlesitekit-audience-segmentation-tile-metric__no-data"},Object(o.__)("No data to show","google-site-kit"),e.createElement("p",null,Object(o.__)("Update Analytics to track metric","google-site-kit")),e.createElement(c.SpinnerButton,{danger:!0,onClick:i,isSaving:r,disabled:r},Object(o.__)("Update","google-site-kit")))}));l.propTypes={onClick:r.a.func.isRequired,isSaving:r.a.bool},t.a=l}).call(this,n(4))},484:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceTileZeroData}));var i=n(0),r=n.n(i),a=n(18),o=n(119),c=n(9),l=n(485),s=Object(o.a)(l.a);function AudienceTileZeroData(t){var n=t.Widget,i=t.audienceSlug,r=t.title,o=t.infoTooltip,l=t.isMobileBreakpoint,u=t.isTileHideable,d=t.onHideTile,g=Object(a.a)();return e.createElement(s,{Widget:n,audienceSlug:i,title:r,infoTooltip:o,isMobileBreakpoint:l,isTileHideable:u,onHideTile:function(){Object(c.I)("".concat(g,"_audiences-tile"),"temporarily_hide",i).finally(d)},onInView:function(){Object(c.I)("".concat(g,"_audiences-tile"),"view_tile_collecting_data",i)}})}AudienceTileZeroData.propTypes={Widget:r.a.elementType.isRequired,audienceSlug:r.a.string.isRequired,title:r.a.string.isRequired,infoTooltip:r.a.oneOfType([r.a.string,r.a.element]),isMobileBreakpoint:r.a.bool,isTileHideable:r.a.bool,onHideTile:r.a.func}}).call(this,n(4))},485:function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),a=n(1),o=n(18),c=n(9),l=n(133),s=n(486),u=n(488),d=Object(a.forwardRef)((function(t,n){var i=t.Widget,r=t.audienceSlug,a=t.title,d=t.infoTooltip,g=t.isMobileBreakpoint,f=t.isTileHideable,m=t.onHideTile,p=Object(o.a)();return e.createElement(i,{ref:n,noPadding:!0},e.createElement("div",{className:"googlesitekit-audience-segmentation-tile"},e.createElement("div",{className:"googlesitekit-audience-segmentation-tile__zero-data-container"},!g&&e.createElement("div",{className:"googlesitekit-audience-segmentation-tile__header"},e.createElement("div",{className:"googlesitekit-audience-segmentation-tile__header-title"},a,d&&e.createElement(l.a,{title:d,tooltipClassName:"googlesitekit-info-tooltip__content--audience",onOpen:function(){return Object(c.I)("".concat(p,"_audiences-tile"),"view_tile_tooltip",r)}}))),e.createElement("div",{className:"googlesitekit-audience-segmentation-tile__zero-data-content"},e.createElement(s.a,null),f&&e.createElement(u.a,{onHideTile:m})))))}));d.propTypes={Widget:r.a.elementType.isRequired,audienceSlug:r.a.string.isRequired,title:r.a.string.isRequired,infoTooltip:r.a.oneOfType([r.a.string,r.a.element]),isMobileBreakpoint:r.a.bool,isTileHideable:r.a.bool,onHideTile:r.a.func},t.a=d}).call(this,n(4))},486:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceTileCollectingData}));var i=n(1),r=n(2),a=n(487);function AudienceTileCollectingData(){return e.createElement(i.Fragment,null,e.createElement(a.a,{className:"googlesitekit-audience-segmentation-tile__zero-data-image"}),e.createElement("p",{className:"googlesitekit-audience-segmentation-tile__zero-data-description"},Object(r.__)("Site Kit is collecting data for this group.","google-site-kit")))}}).call(this,n(4))},487:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;tSelect another group to compare with your current group or learn more about how to group site visitors in Analytics","google-site-kit"),{AnalyticsLink:v,SelectGroupLink:e.createElement(g.a,{secondary:!0,onClick:function(){return h(m.i,!0)}})}):Object(a.a)(Object(o.__)("Learn more about how to group site visitors in Analytics","google-site-kit"),{AnalyticsLink:v})))))}}).call(this,n(4))},492:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Header}));var i=n(10),r=n(3),a=n(8),o=n(9),c=n(18),l=n(349),s=n(133);function Header(t){var n=t.activeTileIndex,u=t.setActiveTile,d=t.visibleAudiences,g=Object(c.a)(),f=Object(r.useInViewSelect)((function(e){return e(a.r).getOrSyncAvailableAudiences()}),[]);return e.createElement(i.TabBar,{key:d.length,className:"googlesitekit-widget-audience-tiles__tabs googlesitekit-tab-bar--start-aligned-high-contrast",activeIndex:n,handleActiveIndexUpdate:function(e){return u(d[e])}},d.map((function(t,n){var r,a,c,u,d=(null==f||null===(r=f.filter((function(e){return e.name===t})))||void 0===r||null===(a=r[0])||void 0===a?void 0:a.displayName)||"",m=(null==f||null===(c=f.filter((function(e){return e.name===t})))||void 0===c||null===(u=c[0])||void 0===u?void 0:u.audienceSlug)||"",p=e.createElement(l.a,{audienceName:d,audienceSlug:m});return e.createElement(i.Tab,{key:n,"aria-label":d},d,e.createElement(s.a,{title:p,tooltipClassName:"googlesitekit-info-tooltip__content--audience",onOpen:function(){Object(o.I)("".concat(g,"_audiences-tile"),"view_tile_tooltip",m)}}))})))}}).call(this,n(4))},493:function(e,t,n){"use strict";(function(e){var i=n(1),r=n(39),a=n(2),o=n(3),c=n(350),l=n(21),s=n(19),u=n(351),d=n(32),g=n(13),f=n(24),m=n(7),p=n(41),h=n(18),v=n(34),b=n(9),E=Object(i.forwardRef)((function(t,n){var i=Object(h.a)(),E=Object(v.a)(),_=Object(o.useSelect)((function(e){return e(m.a).didSetAudiences()})),O=Object(o.useSelect)((function(e){return e(s.a).getModuleIcon("analytics-4")})),y=Object(o.useSelect)((function(e){return e(g.c).getAdminURL("googlesitekit-settings")})),k=Object(o.useDispatch)(f.b).setValue,j=Object(o.useDispatch)(d.a).navigateTo,S=_?"no-longer-available":"none-selected";function A(){Object(b.I)("".concat(i,"_audiences-no-audiences"),"select_groups",S).finally((function(){k(p.i,!0)}))}return e.createElement(u.a,{ref:n,className:"googlesitekit-no-audience-banner",Icon:O,SVGGraphic:c.a},e.createElement("p",null,_&&Object(r.a)(Object(a.__)("It looks like your visitor groups aren’t available anymore. Select other groups.","google-site-kit"),{a:e.createElement(l.a,{secondary:!0,onClick:A})}),!_&&Object(r.a)(Object(a.__)("You don’t have any visitor groups selected. Select groups.","google-site-kit"),{a:e.createElement(l.a,{secondary:!0,onClick:A})})),!E&&e.createElement("p",null,Object(r.a)(Object(a.__)("You can deactivate this widget in Settings.","google-site-kit"),{a:e.createElement(l.a,{secondary:!0,onClick:function(){Object(b.I)("".concat(i,"_audiences-no-audiences"),"change_settings",S).finally((function(){j("".concat(y,"#/admin-settings"))}))}})})))}));t.a=E}).call(this,n(4))},494:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Panel}));var i=n(5),r=n.n(i),a=n(1),o=n(3),c=n(18),l=n(9),s=n(41),u=n(29),d=n(24),g=n(7),f=n(8),m=n(495),p=n(503),h=n(505),v=n(506),b=n(507),E=n(118),_=n(508);function Panel(){var t=Object(c.a)(),n=Object(o.useSelect)((function(e){return e(d.b).getValue(s.i)})),i=Object(o.useSelect)((function(e){return e(f.r).isFetchingSyncAvailableAudiences()})),O=Object(o.useInViewSelect)((function(e){var t=e(f.r).getConfigurableAudiences,n=(0,e(g.a).getConfiguredAudiences)()||[],i=t()||[];return i.length&&n.length?i.filter((function(e){var t=e.name;return n.includes(t)})).map((function(e){return e.name})):[]})),y=Object(o.useSelect)((function(e){return e(u.a).getValue(s.c,"autoSubmit")})),k=Object(o.useDispatch)(u.a).setValues,j=Object(o.useDispatch)(d.b).setValue,S=Object(a.useCallback)((function(){var e;k(s.h,(e={},r()(e,s.f,O),r()(e,s.g,!1),e)),Object(l.I)("".concat(t,"_audiences-sidebar"),"audiences_sidebar_view")}),[O,k,t]),A=Object(a.useCallback)((function(){n&&(j(s.i,!1),j(s.e,!1))}),[j,n]);return e.createElement(E.e,{className:"googlesitekit-audience-selection-panel",closePanel:A,isOpen:n||y,isLoading:i,onOpen:S},e.createElement(v.a,{closePanel:A}),e.createElement(m.a,{savedItemSlugs:O}),e.createElement(b.a,null),e.createElement(p.a,null),e.createElement(_.a,null),e.createElement(h.a,{closePanel:A,isOpen:n,savedItemSlugs:O}))}}).call(this,n(4))},495:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceItems}));var i=n(5),r=n.n(i),a=n(6),o=n.n(a),c=n(16),l=n.n(c),s=n(15),u=n.n(s),d=n(0),g=n.n(d),f=n(817),m=n(2),p=n(1),h=n(3),v=n(41),b=n(24),E=n(7),_=n(8),O=n(9),y=n(496),k=n(118),j=n(497),S=n(498),A=n(34),w=n(501);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function C(e){for(var t=1;t0?i(r(f?g:c)):{},v=(p||{}).rows,b=void 0===v?[]:v,O=(h||{}).rows,y=void 0===O?[]:O;return c.map((function(e){var t,n,i,r;return r="SITE_KIT_AUDIENCE"===e.audienceType&&f?k(b,"new-visitors"===e.audienceSlug?"new":"returning"):k(y,e.name),C(C({},e),{},{userCount:Number(null===(t=r)||void 0===t||null===(n=t.metricValues)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.value)||0})}))}function k(e,t){return e.find((function(e){var n,i;return(null==e||null===(n=e.dimensionValues)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.value)===t}))}})),I=function(e,t){var n=t.audienceType,i=t.description,a=t.displayName,o=t.name,c=t.userCount,l="";switch(n){case"DEFAULT_AUDIENCE":l=Object(m.__)("Created by default by Google Analytics","google-site-kit"),i="";break;case"SITE_KIT_AUDIENCE":l=Object(m.__)("Created by Site Kit","google-site-kit");break;case"USER_AUDIENCE":l=Object(m.__)("Already exists in your Analytics property","google-site-kit")}return C(C({},e),{},r()({},o,{title:a,subtitle:i,description:l,userCount:c,audienceType:n}))},M=null==x?void 0:x.filter((function(e){var t=e.name;return i.includes(t)})).reduce(I,{}),P=null==x?void 0:x.filter((function(e){var t=e.name;return!i.includes(t)})).reduce(I,{}),B=Object(h.useSelect)((function(e){if(void 0!==x){var t=e(E.a),n=t.hasFinishedResolution,i=t.hasExpirableItem;if(n("getExpirableItems"))return x.filter((function(e){var t=e.audienceType,n=e.name;return"DEFAULT_AUDIENCE"!==t&&!i("".concat(_.b).concat(n))})).map((function(e){var t=e.name;return"".concat(_.b).concat(t)}))}}));return Object(f.a)((function(){D&&void 0!==B&&B.length&&g(B.map((function(e){return{slug:e,expiresInSeconds:4*O.f}})))}),[D,g,B]),e.createElement(k.d,{availableItemsTitle:Object(m.__)("Additional groups","google-site-kit"),availableSavedItems:M,availableUnsavedItems:P,ItemComponent:R?j.a:y.a,savedItemSlugs:i,notice:e.createElement(p.Fragment,null,e.createElement(S.a,null),!N&&e.createElement(w.a,null))})}AudienceItems.propTypes={savedItemSlugs:g.a.array}}).call(this,n(4))},496:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceItem}));var i=n(5),r=n.n(i),a=n(15),o=n.n(a),c=n(0),l=n.n(c),s=n(1),u=n(2),d=n(3),g=n(41),f=n(29),m=n(7),p=n(8),h=n(9),v=n(303),b=n(118),E=n(254);function AudienceItem(t){var n=t.slug,i=t.title,a=t.description,c=t.subtitle,l=t.userCount,_=t.audienceType,O="".concat(p.b).concat(n),y=Object(d.useSelect)((function(e){return e(f.a).getValue(g.h,g.f)})),k=Object(d.useSelect)((function(e){return e(m.a).hasExpirableItem(O)})),j=Object(d.useSelect)((function(e){return e(m.a).isExpirableItemActive(O)})),S=Object(d.useSelect)((function(e){return e(p.r).getAudienceUserCountReportErrors()}))||[],A=o()(S,2),w=A[0],T=A[1],C=[];T&&C.push(T),w&&C.push(w);var N=Object(d.useDispatch)(f.a).setValues,D=Object(d.useSelect)((function(e){return e(m.a).isItemDismissed("audience-tile-".concat(n))})),R=Object(s.useCallback)((function(e){var t;N(g.h,(t={},r()(t,g.f,e.target.checked?y.concat([n]):y.filter((function(e){return e!==n}))),r()(t,g.g,!0),t))}),[y,N,n]),x="DEFAULT_AUDIENCE"!==_&&(!1===k||j),I=null==y?void 0:y.includes(n),M="audience-selection-checkbox-".concat(n);function ItemBadge(){return D?e.createElement(E.a,{label:Object(u.__)("Temporarily hidden","google-site-kit"),tooltipTitle:Object(u.__)("Site Kit is collecting data for this group. Once data is available the group will be added to your dashboard.","google-site-kit")}):x?e.createElement(v.a,null):null}return e.createElement(b.c,{id:M,slug:n,title:i,subtitle:c,description:a,isItemSelected:I,onCheckboxChange:R,suffix:C.length?"-":Object(h.B)(l),badge:(D||x)&&e.createElement(ItemBadge,null)})}AudienceItem.propTypes={slug:l.a.string.isRequired,title:l.a.string.isRequired,description:l.a.string.isRequired,subtitle:l.a.string,userCount:l.a.number.isRequired,audienceType:l.a.string.isRequired}}).call(this,n(4))},497:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceItemPreviewBlock}));var i=n(43);function AudienceItemPreviewBlock(){return e.createElement("div",{className:"googlesitekit-selection-panel__loading"},e.createElement("div",{className:"googlesitekit-selection-panel__loading-left"},e.createElement(i.a,{width:"90px",height:"20px",className:"googlesitekit-selection-panel__loading-item"}),e.createElement(i.a,{width:"293px",height:"15px",className:"googlesitekit-selection-panel__loading-item"})),e.createElement("div",{className:"googlesitekit-selection-panel__loading-right"},e.createElement(i.a,{width:"43px",height:"20px",className:"googlesitekit-selection-panel__loading-item"})))}}).call(this,n(4))},498:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AddGroupNotice}));var i=n(6),r=n.n(i),a=n(16),o=n.n(a),c=n(15),l=n.n(c),s=n(0),u=n.n(s),d=n(1),g=n(2),f=n(3),m=n(41),p=n(29),h=n(7),v=n(499),b=n(252),E=n(24),_=n(8);function AddGroupNotice(){var t=Object(d.useState)(!1),n=l()(t,2),i=n[0],a=n[1],c=Object(f.useInViewSelect)((function(e){return e(h.a).isItemDismissed(m.a)})),s=Object(f.useSelect)((function(e){return e(E.b).getValue(m.i)})),u=Object(f.useSelect)((function(e){return e(_.r).isFetchingSyncAvailableAudiences()})),O=Object(f.useSelect)((function(e){return e(p.a).getValue(m.h,m.f)})),y=Object(f.useDispatch)(h.a).dismissItem,k=Object(d.useCallback)(o()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y(m.a);case 2:case"end":return e.stop()}}),e)}))),[y]);return Object(d.useEffect)((function(){Array.isArray(O)&&(O.length>1&&a(!0),s||1!==(null==O?void 0:O.length)||a(!1))}),[O,s,a]),c||i||u||!(null==O?void 0:O.length)?null:e.createElement(b.a,{className:"googlesitekit-audience-selection-panel__add-group-notice",content:Object(g.__)("By adding another group to your dashboard, you will be able to compare them and understand which content brings back users from each group","google-site-kit"),dismissLabel:Object(g.__)("Got it","google-site-kit"),Icon:v.a,onDismiss:k})}AddGroupNotice.propTypes={savedItemSlugs:u.a.array}}).call(this,n(4))},499:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t0||X)&&i.createElement(A.a,{apiErrors:H,hasOAuthError:X}))}}).call(this,n(28),n(4))},502:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceCreationErrorNotice}));var i=n(0),r=n.n(i),a=n(1),o=n(39),c=n(2),l=n(3),s=n(18),u=n(36),d=n(9),g=n(41),f=n(13),m=n(24),p=n(8),h=n(10),v=n(21),b=n(76);function AudienceCreationErrorNotice(t){var n,i,r=t.apiErrors,E=t.hasOAuthError,_=Object(s.a)(),O=Array.isArray(r)?r:[r],y=Object(l.useSelect)((function(e){return e(f.c).getErrorTroubleshootingLinkURL({code:"analytics-4_insufficient_permissions"})})),k=Object(l.useSelect)((function(e){return e(p.r).getServiceEntityAccessURL()})),j=Object(l.useSelect)((function(e){return e(f.c).getErrorTroubleshootingLinkURL({code:"access_denied"})})),S=Object(l.useSelect)((function(e){return e(m.b).getValue(g.i)})),A=O.length>0,w=O.some((function(e){return Object(u.e)(e)}));return Object(a.useEffect)((function(){if(S&&(A||E)){var e="setup_error";E?e="auth_error":w&&(e="insufficient_permissions_error"),Object(d.I)("".concat(_,"_audiences-sidebar-create-audiences"),e)}}),[A,w,E,S,_]),O.length||E?(E?i=Object(o.a)(Object(c.__)("Setup was interrupted because you didn’t grant the necessary permissions. Click on Create again to retry. If that doesn’t work, ","google-site-kit"),{HelpLink:e.createElement(v.a,{href:j,external:!0,hideExternalIndicator:!0},Object(c.__)("get help","google-site-kit"))}):w?(n=Object(c.__)("Insufficient permissions","google-site-kit"),i=Object(o.a)(Object(c.__)("Contact your administrator. Trouble getting access? ","google-site-kit"),{HelpLink:e.createElement(v.a,{href:y,external:!0,hideExternalIndicator:!0},Object(c.__)("Get help","google-site-kit"))})):(n=Object(c.__)("Analytics update failed","google-site-kit"),i=Object(c.__)("Click on Create to try again.","google-site-kit")),e.createElement("div",{className:"googlesitekit-audience-creation-error-notice"},e.createElement(b.a,{width:24,height:24}),e.createElement("div",{className:"googlesitekit-audience-creation-error-notice__content"},n&&e.createElement("p",{className:"googlesitekit-audience-creation-error-notice__title"},n),e.createElement("p",{className:"googlesitekit-audience-creation-error-notice__description"},i)),w&&e.createElement("div",{className:"googlesitekit-audience-creation-error-notice__actions"},e.createElement(h.Button,{href:k,target:"_blank",danger:!0,onClick:function(){Object(d.I)("".concat(_,"_audiences-sidebar-create-audiences"),"insufficient_permissions_error_request_access")}},Object(c.__)("Request access","google-site-kit"))))):null}AudienceCreationErrorNotice.propTypes={apiErrors:r.a.oneOfType([r.a.arrayOf(r.a.object),r.a.object,r.a.array]),hasOAuthError:r.a.bool}}).call(this,n(4))},503:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ErrorNotice}));var i=n(6),r=n.n(i),a=n(16),o=n.n(a),c=n(15),l=n.n(c),s=n(1),u=n(39),d=n(2),g=n(3),f=n(18),m=n(9),p=n(41),h=n(13),v=n(24),b=n(8),E=n(36),_=n(21),O=n(136),y=n(504),k=n(391);function ErrorNotice(){var t=Object(f.a)(),n=Object(g.useSelect)((function(e){return e(b.r).getErrorForAction("syncAvailableAudiences")})),i=Object(g.useInViewSelect)((function(e){return e(b.r).getAudienceUserCountReportErrors()}))||[],a=l()(i,2),c=a[0],j=a[1],S=Object(g.useSelect)((function(e){return e(h.c).getErrorTroubleshootingLinkURL({code:"analytics-4_insufficient_permissions"})})),A=Object(g.useSelect)((function(e){return e(v.b).getValue(p.i)})),w=Object(g.useDispatch)(b.r),T=w.clearError,C=w.syncAvailableAudiences,N=Object(s.useCallback)(o()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T("syncAvailableAudiences");case 2:C();case 3:case"end":return e.stop()}}),e)}))),[T,C]),D=[];n&&D.push(n),j&&D.push(j),c&&D.push(c);var R=D.length>0,x=D.some((function(e){return Object(E.e)(e)}));if(Object(s.useEffect)((function(){A&&R&&Object(m.I)("".concat(t,"_audiences-sidebar"),x?"insufficient_permissions_error":"data_loading_error")}),[R,x,A,t]),!D.length)return null;var I=[j,c].some((function(e){return!!e}));return e.createElement("div",{className:"googlesitekit-audience-selection-panel__error-notice"},e.createElement("p",null,x?Object(u.a)(Object(d.__)("Insufficient permissions, contact your administrator. Trouble getting access? ","google-site-kit"),{HelpLink:e.createElement(_.a,{href:S,external:!0,hideExternalIndicator:!0},Object(d.__)("Get help","google-site-kit"))}):Object(d.__)("Data loading failed","google-site-kit")),e.createElement("div",{className:"googlesitekit-audience-selection-panel__error-notice-actions"},x||I?e.createElement(O.a,{moduleSlug:"analytics-4",error:D,hideGetHelpLink:!0,buttonVariant:"danger",RequestAccessButton:y.a,RetryButton:k.a}):e.createElement(k.a,{handleRetry:N})))}}).call(this,n(4))},504:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return RequestAccessButton}));var i=n(0),r=n.n(i),a=n(2),o=n(10),c=n(9),l=n(18);function RequestAccessButton(t){var n=t.requestAccessURL,i=Object(l.a)();return e.createElement(o.Button,{className:"googlesitekit-audience-selection-panel__error-notice-action",tertiary:!0,href:n,target:"_blank",onClick:function(){Object(c.I)("".concat(i,"_audiences-sidebar"),"insufficient_permissions_error_request_access")}},Object(a.__)("Request access","google-site-kit"))}RequestAccessButton.propTypes={requestAccessURL:r.a.string.isRequired}}).call(this,n(4))},505:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Footer}));var i=n(6),r=n.n(i),a=n(27),o=n.n(a),c=n(16),l=n.n(c),s=n(15),u=n.n(s),d=n(5),g=n.n(d),f=n(0),m=n.n(f),p=n(1),h=n(2),v=n(3),b=n(18),E=n(9),_=n(41),O=n(29),y=n(7),k=n(8),j=n(118);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function A(e){for(var t=1;t_.j&&(n=Object(h.sprintf)(/* translators: 1: Maximum number of groups that can be selected. 2: Number of selected groups. */ Object(h.__)("Select up to %1$d groups (%2$d selected)","google-site-kit"),_.j,R));var x=Object(p.useState)(null),I=u()(x,2),M=I[0],P=I[1],B=Object(p.useCallback)(function(){var e=l()(r.a.mark((function e(t){var n,i,a,c;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P(null),e.next=3,C({configuredAudiences:t});case 3:if(n=e.sent,i=n.error){e.next=14;break}if(a=(null==S?void 0:S.filter((function(e){var n=e.replace("audience-tile-","");return!t.includes(n)})))||[],t.every((function(e){return null==S?void 0:S.includes("audience-tile-".concat(e))}))&&a.push("audience-tile-".concat(t[0])),!((null==a?void 0:a.length)>0)){e.next=14;break}return e.next=11,N.apply(void 0,o()(a));case 11:c=e.sent,(i=c.error)&&P(i);case 14:return e.abrupt("return",{error:i});case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[S,N,C]),L=Object(p.useCallback)((function(){var e={USER_AUDIENCE:"user",SITE_KIT_AUDIENCE:"site-kit",DEFAULT_AUDIENCE:"default"},t=D(),n=Object.keys(e).map((function(n){var i=t.filter((function(e){var t=null==w?void 0:w.find((function(t){var n=t.name;return e===n}));return(null==t?void 0:t.audienceType)===n}));return"".concat(e[n],":").concat(i.length)})).join(",");Object(E.I)("".concat(s,"_audiences-sidebar"),"audiences_sidebar_save",n)}),[w,D,s]),F=Object(p.useCallback)((function(){Object(E.I)("".concat(s,"_audiences-sidebar"),"audiences_sidebar_cancel")}),[s]);return e.createElement(j.a,{savedItemSlugs:c,selectedItemSlugs:d,saveSettings:B,saveError:f||M,itemLimitError:n,minSelectedItemCount:_.k,maxSelectedItemCount:_.j,isBusy:m,isOpen:i,closePanel:a,onSaveSuccess:L,onCancel:F})}Footer.propTypes={isOpen:m.a.bool,closePanel:m.a.func.isRequired,savedItemSlugs:m.a.array}}).call(this,n(4))},506:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Header}));var i=n(0),r=n.n(i),a=n(1),o=n(39),c=n(2),l=n(3),s=n(32),u=n(13),d=n(7),g=n(34),f=n(21),m=n(118);function Header(t){var n=t.closePanel,i=Object(g.a)(),r=Object(l.useSelect)((function(e){return e(u.c).getAdminURL("googlesitekit-settings")})),p=Object(l.useSelect)((function(e){return e(d.a).isSavingUserAudienceSettings()})),h=Object(l.useDispatch)(s.a).navigateTo,v=Object(a.useCallback)((function(){return h("".concat(r,"#/admin-settings"))}),[h,r]);return e.createElement(m.b,{title:Object(c.__)("Select visitor groups","google-site-kit"),onCloseClick:n},!i&&e.createElement("p",null,Object(o.a)(Object(c.__)("You can deactivate this widget in Settings","google-site-kit"),{link:e.createElement(f.a,{secondary:!0,onClick:v,disabled:p}),strong:e.createElement("strong",null)})))}Header.propTypes={closePanel:r.a.func.isRequired}}).call(this,n(4))},507:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return LearnMoreLink}));var i=n(2),r=n(39),a=n(3),o=n(13),c=n(21);function LearnMoreLink(){var t=Object(a.useSelect)((function(e){return e(o.c).getGoogleSupportURL({path:"/analytics/answer/12799087"})}));return e.createElement("div",{className:"googlesitekit-audience-selection-panel__learn-more"},Object(r.a)(Object(i.__)("Learn more about grouping site visitors and audiences in Analytics","google-site-kit"),{link:e.createElement(c.a,{secondary:!0,href:t,external:!0}),strong:e.createElement("strong",null)}))}}).call(this,n(4))},508:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AudienceCreationSuccessNotice}));var i=n(1),r=n(2),a=n(3),o=n(18),c=n(9),l=n(41),s=n(24),u=n(10),d=n(132);function AudienceCreationSuccessNotice(){var t=Object(o.a)(),n=Object(a.useDispatch)(s.b).setValue,g=Object(a.useSelect)((function(e){return e(s.b).getValue(l.e)})),f=Object(a.useSelect)((function(e){return e(s.b).getValue(l.i)}));return Object(i.useEffect)((function(){f&&g&&Object(c.I)("".concat(t,"_audiences-sidebar-create-audiences-success"),"view_notification")}),[f,g,t]),g?e.createElement("div",{className:"googlesitekit-audience-selection-panel__success-notice"},e.createElement("div",{className:"googlesitekit-audience-selection-panel__success-notice-icon"},e.createElement(d.a,{width:24,height:24})),e.createElement("p",{className:"googlesitekit-audience-selection-panel__success-notice-message"},Object(r.__)("Visitor group created successfully!","google-site-kit")),e.createElement("div",{className:"googlesitekit-audience-selection-panel__success-notice-actions"},e.createElement(u.Button,{tertiary:!0,onClick:function(){Object(c.I)("".concat(t,"_audiences-sidebar-create-audiences-success"),"dismiss_notification").finally((function(){n(l.e,!1)}))}},Object(r.__)("Got it","google-site-kit")))):null}}).call(this,n(4))},509:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t0&&n!==t;Object(i.useEffect)((function(){e&&l&&c(s)}),[e,l,c])}},52:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return c}));var i=n(23),r=n(18),a=i.n,o=i.l;function c(){var e=Object(r.a)();return e===i.n||e===i.o?a:e===i.l||e===i.m?o:null}},53:function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),a=n(108),o=n(2),c=n(9);function ErrorText(t){var n=t.message,i=t.reconnectURL,r=t.noPrefix;if(!n)return null;var l=n;void 0!==r&&r||(l=Object(o.sprintf)(/* translators: %s: Error message */ Object(o.__)("Error: %s","google-site-kit"),n)),i&&Object(a.a)(i)&&(l=l+" "+Object(o.sprintf)(/* translators: %s: Reconnect URL */ Object(o.__)('To fix this, redo the plugin setup.',"google-site-kit"),i));return e.createElement("div",{className:"googlesitekit-error-text"},e.createElement("p",{dangerouslySetInnerHTML:Object(c.F)(l,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}))}ErrorText.propTypes={message:r.a.string.isRequired,reconnectURL:r.a.string,noPrefix:r.a.bool},ErrorText.defaultProps={reconnectURL:"",noPrefix:!1},t.a=ErrorText}).call(this,n(4))},59:function(e,t,n){"use strict";(function(e){var i,r;n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o}));var a=new Set((null===(i=e)||void 0===i||null===(r=i._googlesitekitBaseData)||void 0===r?void 0:r.enabledFeatures)||[]),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return t instanceof Set&&t.has(e)}}).call(this,n(28))},60:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(40);function r(e){return function(){e[i.a]=e[i.a]||[],e[i.a].push(arguments)}}},63:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n(1),r=Object(i.createContext)(""),a=(r.Consumer,r.Provider);t.b=r},642:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return AddMetricCTATile}));var i=n(15),r=n.n(i),a=n(0),o=n.n(a),c=n(1),l=n(244),s=n(2),u=n(58),d=n(3),g=n(24),f=n(26),m=n(1030),p=n(9),h=n(18);function AddMetricCTATile(t){var n=t.Widget,i=Object(c.useRef)(),a=Object(d.useDispatch)(g.b).setValue,o=Object(h.a)(),v="".concat(o,"_kmw"),b=Object(c.useCallback)((function(e){("keydown"!==e.type||[u.b,u.e].includes(e.keyCode))&&(e.preventDefault(),a(f.k,!0),Object(p.I)(v,"add_metric_click"))}),[a,v]),E=Object(l.a)(i,{threshold:.25}),_=Object(c.useState)(!1),O=r()(_,2),y=O[0],k=O[1],j=!!(null==E?void 0:E.intersectionRatio);return Object(c.useEffect)((function(){j&&!y&&(Object(p.I)(v,"add_metric_view"),k(!0))}),[j,v,y]),e.createElement(n,{className:"googlesitekit-widget--addMetricCTATile",noPadding:!0},e.createElement("div",{ref:i,className:"googlesitekit-km-add-metric-cta-tile",onClick:b,onKeyDown:b,tabIndex:0,role:"button"},e.createElement("div",{className:"googlesitekit-km-add-metric-cta-tile__icon"},e.createElement(m.a,{width:16,height:16})),e.createElement("p",{className:"googlesitekit-km-add-metric-cta-tile__text"},Object(s.__)("Add a metric","google-site-kit"))))}AddMetricCTATile.propTypes={Widget:o.a.elementType.isRequired}}).call(this,n(4))},65:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return v}));var i=n(5),r=n.n(i),a=n(35),o=n.n(a),c=n(117),l=n(12),s=n.n(l),u=n(98),d=n.n(u),g=n(9);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:[];return s()(e,"error is required."),s()(t,"baseName is required."),s()(n&&Array.isArray(n),"args must be an array."),{type:"RECEIVE_ERROR",payload:{error:e,baseName:t,args:n}}},clearError:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return s()(e,"baseName is required."),s()(t&&Array.isArray(t),"args must be an array."),{type:"CLEAR_ERROR",payload:{baseName:e,args:t}}},clearErrors:function(e){return{type:"CLEAR_ERRORS",payload:{baseName:e}}}};function v(e){s()(e,"storeName must be defined.");var t={getErrorForSelector:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return s()(n,"selectorName is required."),t.getError(e,n,i)},getErrorForAction:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return s()(n,"actionName is required."),t.getError(e,n,i)},getError:function(e,t,n){var i=e.errors;return s()(t,"baseName is required."),i[p(t,n)]},getErrors:function(e){var t=new Set(Object.values(e.errors));return Array.from(t)},getMetaDataForError:function(e,t){var n=Object.keys(e.errors).find((function(n){return e.errors[n]===t}));return n?{baseName:n.substring(0,n.indexOf("::")),args:e.errorArgs[n]}:null},getSelectorDataForError:Object(c.b)((function(t){return function(n,i){var r=t(e).getMetaDataForError(i);if(r){var a=r.baseName,o=r.args;if(!!t(e)[a])return{storeName:e,name:a,args:o}}return null}})),hasErrors:function(e){return t.getErrors(e).length>0}};return{initialState:{errors:{},errorArgs:{}},actions:h,controls:{},reducer:function(e,t){var n=t.type,i=t.payload;switch(n){case"RECEIVE_ERROR":var a=i.baseName,o=i.args,c=i.error,l=p(a,o);return m(m({},e),{},{errors:m(m({},e.errors||{}),{},r()({},l,c)),errorArgs:m(m({},e.errorArgs||{}),{},r()({},l,o))});case"CLEAR_ERROR":var s=i.baseName,u=i.args,d=m({},e),g=p(s,u);return d.errors=m({},e.errors||{}),d.errorArgs=m({},e.errorArgs||{}),delete d.errors[g],delete d.errorArgs[g],d;case"CLEAR_ERRORS":var f=i.baseName,h=m({},e);if(f)for(var v in h.errors=m({},e.errors||{}),h.errorArgs=m({},e.errorArgs||{}),h.errors)(v===f||v.startsWith("".concat(f,"::")))&&(delete h.errors[v],delete h.errorArgs[v]);else h.errors={},h.errorArgs={};return h;default:return e}},resolvers:{},selectors:t}}},656:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ConnectGA4CTAWidget}));var i=n(15),r=n.n(i),a=n(2),o=n(1),c=n(3),l=n(10),s=n(385),u=n(386),d=n(19),g=n(7),f=n(48),m=n(89),p=n(8),h=n(32),v=n(13),b=n(270),E=n(160),_=n(401),O=n(123);function ConnectGA4CTAWidget(t){var n=t.Widget,i=t.WidgetNull,y=Object(c.useSelect)((function(e){var t=e(g.a).getKeyMetrics(),n=e(f.a).getWidgets(m.AREA_MAIN_DASHBOARD_KEY_METRICS_PRIMARY);return t&&n?n.filter((function(e){var n=e.slug,i=e.modules;return t.includes(n)&&i.includes("analytics-4")})):[]})),k=Object(c.useSelect)((function(e){return e(d.a).isModuleActive("analytics-4")})),j=Object(c.useSelect)((function(e){var t=e(p.r).getAdminReauthURL();return!!t&&e(h.a).isNavigatingTo(t)})),S=Object(c.useSelect)((function(e){return e(d.a).isFetchingSetModuleActivation("analytics-4",!0)})),A=Object(c.useSelect)((function(e){var t=e(v.c).getAdminURL("googlesitekit-settings");return"".concat(t,"#connected-services/analytics-4/edit")})),w=Object(c.useSelect)((function(e){return e(h.a).isNavigatingTo(A)})),T=Object(c.useDispatch)(g.a).dismissItem,C=Object(E.a)("analytics-4"),N=Object(_.a)("analytics-4"),D=Object(o.useCallback)((function(){if(k)return N();C()}),[C,N,k]),R=Object(o.useState)(!1),x=r()(R,2),I=x[0],M=x[1],P=Object(O.a)(M,3e3);return Object(o.useEffect)((function(){S||j||w?M(!0):P(!1)}),[S,j,P,w]),!1!==Object(c.useSelect)((function(e){return e(g.a).isItemDismissed(b.e)}))||y.length<4?e.createElement(i,null):e.createElement(n,{noPadding:!0,Footer:function Footer(){return e.createElement(u.a,{onActionClick:function(){return T(b.e)},showDismiss:!0})}},e.createElement(s.a,{className:"googlesitekit-km-connect-ga4-cta",title:Object(a.__)("Analytics is disconnected","google-site-kit"),description:Object(a.__)("Metrics cannot be displayed without Analytics","google-site-kit"),actions:e.createElement(l.SpinnerButton,{onClick:D,isSaving:I,disabled:I},Object(a.__)("Connect Analytics","google-site-kit"))}))}}).call(this,n(4))},66:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));var i="modules/search-console",r=1},68:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return{__html:a.a.sanitize(e,t)}};function c(e){var t,n="object"===r()(e)?e.toString():e;return null==n||null===(t=n.replace)||void 0===t?void 0:t.call(n,/\/+$/,"")}},76:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=e.fps,n=e.leading,i=e.initialWidth,u=void 0===i?0:i,d=e.initialHeight,g=void 0===d?0:d,f=Object(a.a)("undefined"==typeof document?[u,g]:s,t,n),m=r()(f,2),p=m[0],h=m[1],v=function(){return h(s)};return Object(o.a)(l,"resize",v),Object(o.a)(l,"orientationchange",v),p},d=function(e){return u(e)[0]}}).call(this,n(28))},8:function(e,t,n){"use strict";n.d(t,"r",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"s",(function(){return a})),n.d(t,"z",(function(){return o})),n.d(t,"o",(function(){return c})),n.d(t,"q",(function(){return l})),n.d(t,"g",(function(){return s})),n.d(t,"p",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"i",(function(){return g})),n.d(t,"k",(function(){return f})),n.d(t,"m",(function(){return m})),n.d(t,"n",(function(){return p})),n.d(t,"h",(function(){return h})),n.d(t,"x",(function(){return v})),n.d(t,"w",(function(){return b})),n.d(t,"y",(function(){return E})),n.d(t,"u",(function(){return _})),n.d(t,"v",(function(){return O})),n.d(t,"f",(function(){return y})),n.d(t,"l",(function(){return k})),n.d(t,"e",(function(){return j})),n.d(t,"t",(function(){return S})),n.d(t,"c",(function(){return A})),n.d(t,"d",(function(){return w})),n.d(t,"b",(function(){return T}));var i="modules/analytics-4",r="account_create",a="property_create",o="webdatastream_create",c="analyticsSetup",l=10,s=1,u="https://www.googleapis.com/auth/tagmanager.readonly",d="enhanced-measurement-form",g="enhanced-measurement-enabled",f="enhanced-measurement-should-dismiss-activation-banner",m="analyticsAccountCreate",p="analyticsCustomDimensionsCreate",h="https://www.googleapis.com/auth/analytics.edit",v="dashboardAllTrafficWidgetDimensionName",b="dashboardAllTrafficWidgetDimensionColor",E="dashboardAllTrafficWidgetDimensionValue",_="dashboardAllTrafficWidgetActiveRowIndex",O="dashboardAllTrafficWidgetLoaded",y={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"}},k={ADD_TO_CART:"add_to_cart",PURCHASE:"purchase",SUBMIT_LEAD_FORM:"submit_lead_form",GENERATE_LEAD:"generate_lead",CONTACT:"contact"},j=[k.CONTACT,k.GENERATE_LEAD,k.SUBMIT_LEAD_FORM],S={"new-visitors":{description:"People who visited the site for the first time",displayName:"New visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"new"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:new_visitors"}}}}]}}]}}}}]},"returning-visitors":{description:"People who have visited your site at least once before",displayName:"Returning visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"returning"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:returning_visitors"}}}}]}}]}}}}]}},A="audiencePermissionsSetup",w="audienceTileCustomDimensionCreate",T="audience-selection-panel-expirable-new-badge-"},81:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return c}));var i=n(108);function r(e){try{return new URL(e).pathname}catch(e){}return null}function a(e,t){try{return new URL(t,e).href}catch(e){}return("string"==typeof e?e:"")+("string"==typeof t?t:"")}function o(e){return"string"!=typeof e?e:e.replace(/^https?:\/\/(www\.)?/i,"").replace(/\/$/,"")}function c(e,t){if(!Object(i.a)(e))return e;if(e.length<=t)return e;var n=new URL(e),r=e.replace(n.origin,"");if(r.length2&&void 0!==arguments[2]?arguments[2]:{};l()(n,"contextSlug is required to check a widget context is active.");var a=r.modules;return e(i.a).getWidgetAreas(n).some((function(t){return e(i.a).isWidgetAreaActive(t.slug,{modules:a})}))}}))}},u=n(65),d=Object(r.combineStores)(r.commonStore,a.a,o.a,s,Object(u.b)(i.a)),g=function(e){e.registerStore(i.a,d)},f=n(859);function m(e){var t=e.dispatch,n=e.select,r={WIDGET_AREA_STYLES:i.b,WIDGET_WIDTHS:i.c,registerWidgetArea:function(e,n,a){t(i.a).registerWidgetArea(e,n),a&&r.assignWidgetArea(e,a)},registerWidget:function(e,n,a){t(i.a).registerWidget(e,n),a&&r.assignWidget(e,a)},assignWidgetArea:function(e,n){t(i.a).assignWidgetArea(e,n)},assignWidget:function(e,n){t(i.a).assignWidget(e,n)},isWidgetAreaRegistered:function(e){return n(i.a).isWidgetAreaRegistered(e)},isWidgetRegistered:function(e){return n(i.a).isWidgetRegistered(e)}};return r}},83:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a}));var i=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},r=function(e){return e.replace(/([a-z0-9]{1})([A-Z]{1})/g,"$1_$2").toUpperCase()};function a(e){return e.split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join("")}},84:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return k})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return A})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return T}));var i=n(15),r=n.n(i),a=n(35),o=n.n(a),c=n(5),l=n.n(c),s=n(25),u=n.n(s),d=n(14),g=n(64),f=n.n(g),m=n(2);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function h(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=_(e,t),i=n.formatUnit,r=n.formatDecimal;try{return i()}catch(e){return r()}},b=function(e){var t=E(e),n=t.hours,i=t.minutes,r=t.seconds;return r=("0"+r).slice(-2),i=("0"+i).slice(-2),"00"===(n=("0"+n).slice(-2))?"".concat(i,":").concat(r):"".concat(n,":").concat(i,":").concat(r)},E=function(e){return e=parseInt(e,10),Number.isNaN(e)&&(e=0),{hours:Math.floor(e/60/60),minutes:Math.floor(e/60%60),seconds:Math.floor(e%60)}},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=E(e),i=n.hours,r=n.minutes,a=n.seconds;return{hours:i,minutes:r,seconds:a,formatUnit:function(){var n=t.unitDisplay,o=h(h({unitDisplay:void 0===n?"short":n},u()(t,["unitDisplay"])),{},{style:"unit"});return 0===e?A(a,h(h({},o),{},{unit:"second"})):Object(m.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ Object(m._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),a?A(a,h(h({},o),{},{unit:"second"})):"",r?A(r,h(h({},o),{},{unit:"minute"})):"",i?A(i,h(h({},o),{},{unit:"hour"})):"").trim()},formatDecimal:function(){var t=Object(m.sprintf)( // translators: %s: number of seconds with "s" as the abbreviated unit. Object(m.__)("%ds","google-site-kit"),a);if(0===e)return t;var n=Object(m.sprintf)( // translators: %s: number of minutes with "m" as the abbreviated unit. Object(m.__)("%dm","google-site-kit"),r),o=Object(m.sprintf)( // translators: %s: number of hours with "h" as the abbreviated unit. Object(m.__)("%dh","google-site-kit"),i);return Object(m.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ Object(m._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),a?t:"",r?n:"",i?o:"").trim()}}},O=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},y=function(e){var t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(m.sprintf)( // translators: %s: an abbreviated number in millions. Object(m.__)("%sM","google-site-kit"),A(O(e),e%10==0?{}:t)):1e4<=e?Object(m.sprintf)( // translators: %s: an abbreviated number in thousands. Object(m.__)("%sK","google-site-kit"),A(O(e))):1e3<=e?Object(m.sprintf)( // translators: %s: an abbreviated number in thousands. Object(m.__)("%sK","google-site-kit"),A(O(e),e%10==0?{}:t)):A(e,{signDisplay:"never",maximumFractionDigits:1})};function k(e){var t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:Object(d.isPlainObject)(e)&&(t=h({},e)),t}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object(d.isFinite)(e)?e:Number(e),Object(d.isFinite)(e)||(console.warn("Invalid number",e,o()(e)),e=0);var n=k(t),i=n.style,r=void 0===i?"metric":i;return"metric"===r?y(e):"duration"===r?v(e,n):"durationISO"===r?b(e):A(e,n)}var S=f()(console.warn),A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,i=void 0===n?T():n,a=u()(t,["locale"]);try{return new Intl.NumberFormat(i,a).format(e)}catch(t){S("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(i),", ").concat(JSON.stringify(a)," ).format( ").concat(o()(e)," )"),t.message)}for(var c={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},l=["signDisplay","compactDisplay"],s={},d=0,g=Object.entries(a);d1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,i=void 0===n?T():n,r=t.style,a=void 0===r?"long":r,o=t.type,c=void 0===o?"conjunction":o;if(Intl.ListFormat){var l=new Intl.ListFormat(i,{style:a,type:c});return l.format(e)} /* translators: used between list items, there is a space after the comma. */var s=Object(m.__)(", ","google-site-kit");return e.join(s)},T=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(d.get)(t,["_googlesitekitLegacyData","locale"]);if(n){var i=n.match(/^(\w{2})?(_)?(\w{2})/);if(i&&i[0])return i[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,n(28))},85:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var i=n(150),r=n.n(i)()(e)}).call(this,n(28))},859:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return y}));var i=n(22),r=n.n(i),a=n(1),o=n(2),c=n(69),l=n(89),s=n(7),u=n(48),d=n(19),g=n(13),f=n(110),m=n(642),p=n(1031),h=n(1032),v=n(656),b=n(390),E=n(20),_=r()({},c),O=r()({},l);function y(t){var n=_.CONTEXT_MAIN_DASHBOARD_KEY_METRICS,i=_.CONTEXT_MAIN_DASHBOARD_TRAFFIC,r=_.CONTEXT_MAIN_DASHBOARD_CONTENT,c=_.CONTEXT_MAIN_DASHBOARD_SPEED,l=_.CONTEXT_MAIN_DASHBOARD_MONETIZATION,y=_.CONTEXT_ENTITY_DASHBOARD_TRAFFIC,k=_.CONTEXT_ENTITY_DASHBOARD_CONTENT,j=_.CONTEXT_ENTITY_DASHBOARD_SPEED,S=_.CONTEXT_ENTITY_DASHBOARD_MONETIZATION,A=O.AREA_MAIN_DASHBOARD_KEY_METRICS_PRIMARY,w=O.AREA_MAIN_DASHBOARD_TRAFFIC_PRIMARY,T=O.AREA_MAIN_DASHBOARD_TRAFFIC_AUDIENCE_SEGMENTATION,C=O.AREA_MAIN_DASHBOARD_CONTENT_PRIMARY,N=O.AREA_MAIN_DASHBOARD_SPEED_PRIMARY,D=O.AREA_MAIN_DASHBOARD_MONETIZATION_PRIMARY,R=O.AREA_ENTITY_DASHBOARD_TRAFFIC_PRIMARY,x=O.AREA_ENTITY_DASHBOARD_CONTENT_PRIMARY,I=O.AREA_ENTITY_DASHBOARD_SPEED_PRIMARY,M=O.AREA_ENTITY_DASHBOARD_MONETIZATION_PRIMARY;t.registerWidgetArea(A,{title:e.createElement(a.Fragment,null,Object(o.__)("Key metrics","google-site-kit"),e.createElement(p.a,null)),subtitle:h.a,style:u.b.BOXES,priority:1,CTA:f.a,filterActiveWidgets:function(e,t){return 1===t.length&&s.P.includes(t[0].slug)?[]:t}},n),t.registerWidgetArea(w,{title:Object(o.__)("Find out how your audience is growing","google-site-kit"),subtitle:Object(o.__)("Track your site’s traffic over time","google-site-kit"),style:u.b.BOXES,priority:1},i),t.registerWidgetArea(T,{subtitle:Object(o.__)("Understand how different visitor groups interact with your site","google-site-kit"),hasNewBadge:!0,style:u.b.BOXES,priority:2,CTA:b.e,Footer:b.a,filterActiveWidgets:function(e,t){var n=e(s.a).isAudienceSegmentationWidgetHidden();return void 0===n||n?[]:t}},i),t.registerWidgetArea(C,{title:Object(o.__)("See how your content is doing","google-site-kit"),subtitle:Object(o.__)("Keep track of your most popular pages and how people found them from Search","google-site-kit"),style:u.b.BOXES,priority:1},r),t.registerWidgetArea(N,{title:Object(o.__)("Find out how visitors experience your site","google-site-kit"),subtitle:Object(o.__)("Keep track of how fast your pages are and get specific recommendations on what to improve","google-site-kit"),style:u.b.BOXES,priority:1},c),t.registerWidgetArea(D,{title:Object(o.__)("Find out how much you’re earning from your content","google-site-kit"),subtitle:Object(o.__)("Track your AdSense revenue over time","google-site-kit"),style:u.b.BOXES,priority:1},l),t.registerWidgetArea(R,{title:Object(o.__)("Find out how your audience is growing","google-site-kit"),subtitle:Object(o.__)("Track traffic to this page over time","google-site-kit"),style:u.b.BOXES,priority:1},y),t.registerWidgetArea(x,{title:Object(o.__)("See how your content is doing","google-site-kit"),subtitle:Object(o.__)("Understand how people found this page from Search","google-site-kit"),style:u.b.BOXES,priority:1},k),t.registerWidgetArea(I,{title:Object(o.__)("Find out how visitors experience this page","google-site-kit"),subtitle:Object(o.__)("Keep track of how fast your page is and get specific recommendations on what to improve","google-site-kit"),style:u.b.BOXES,priority:1},j),t.registerWidgetArea(M,{title:Object(o.__)("Find out how much you’re earning from your content","google-site-kit"),subtitle:Object(o.__)("Track your AdSense revenue over time","google-site-kit"),style:u.b.BOXES,priority:1},S),t.registerWidget("keyMetricsSetupCTA",{Component:f.c,width:[t.WIDGET_WIDTHS.FULL],priority:1,wrapWidget:!1,isActive:function(e){return e(s.a).isAuthenticated()&&!1===e(g.c).isKeyMetricsSetupCompleted()}},[A]),t.registerWidget("keyMetricsConnectGA4All",{Component:v.a,width:[t.WIDGET_WIDTHS.FULL],priority:1,wrapWidget:!1,isActive:function(e){var t=e(s.a).getKeyMetrics();return!(e(d.a).isModuleConnected("analytics-4")||!Array.isArray(t))&&t.filter((function(e){return s.Q.includes(e)})).length>3}},[A]),t.registerWidget("keyMetricsAddMetricFirst",{Component:m.a,width:[t.WIDGET_WIDTHS.QUARTER],priority:3,wrapWidget:!1,isActive:function(e){var t=e(s.a).getKeyMetrics();return!(!Array.isArray(t)||t.length<2)&&t.length<4}},[A]),t.registerWidget("keyMetricsAddMetricSecond",{Component:m.a,width:[t.WIDGET_WIDTHS.QUARTER],priority:3,wrapWidget:!1,isActive:function(e){var t=e(s.a).getKeyMetrics();return!(!Array.isArray(t)||t.length<2)&&t.length<3}},[A]),t.registerWidget("keyMetricsAddMetricThird",{Component:m.a,width:[t.WIDGET_WIDTHS.QUARTER],priority:3,wrapWidget:!1,isActive:function(e){var t=e(s.a).getKeyMetrics();return!(!Array.isArray(t)||t.length<5)&&t.length<8}},[A]),t.registerWidget("keyMetricsAddMetricFourth",{Component:m.a,width:[t.WIDGET_WIDTHS.QUARTER],priority:3,wrapWidget:!1,hideOnBreakpoints:[E.b],isActive:function(e){var t=e(s.a).getKeyMetrics();return!(!Array.isArray(t)||t.length<5)&&t.length<7}},[A]),t.registerWidget("keyMetricsAddMetricFifth",{Component:m.a,width:[t.WIDGET_WIDTHS.QUARTER],priority:3,wrapWidget:!1,hideOnBreakpoints:[E.b],isActive:function(e){var t=e(s.a).getKeyMetrics();return!(!Array.isArray(t)||t.length<5)&&t.length<6}},[A])}}).call(this,n(4))},86:function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),a=n(11),o=n.n(a);function ChangeArrow(t){var n=t.direction,i=t.invertColor,r=t.width,a=t.height;return e.createElement("svg",{className:o()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(n),{"googlesitekit-change-arrow--inverted-color":i}),width:r,height:a,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"}))}ChangeArrow.propTypes={direction:r.a.string,invertColor:r.a.bool,width:r.a.number,height:r.a.number},ChangeArrow.defaultProps={direction:"up",invertColor:!1,width:9,height:9},t.a=ChangeArrow}).call(this,n(4))},88:function(e,t,n){"use strict";var i=n(1);function r(){return(r=Object.assign||function(e){for(var t=1;t$1')}function f(e){return"

".concat(e.replace(/\n{2,}/g,"

"),"

")}function m(e){return e.replace(/\n/gi,"
")}function p(e){for(var t=e,n=0,i=[g,f,m];n0&&void 0!==arguments[0]?arguments[0]:"";if(!Object(i.isString)(e))return!1;var t=e.split("-");if(3!==t.length)return!1;var n=new Date(e);return Object(i.isDate)(n)&&!isNaN(n)}function D(e){O()(Object(i.isDate)(e)&&!isNaN(e),"Date param must construct to a valid date instance or be a valid date instance itself.");var t="".concat(e.getMonth()+1),n="".concat(e.getDate());return[e.getFullYear(),t.length<2?"0".concat(t):t,n.length<2?"0".concat(n):n].join("-")}function R(e){O()(N(e),k);var t=e.split("-"),n=E()(t,3),i=n[0],r=n[1],a=n[2];return new Date(i,r-1,a)}function x(e,t){return D(M(e,t*w))}function I(e){var t=e.split("-");return 3===t.length&&"last"===t[0]&&!Number.isNaN(t[1])&&!Number.isNaN(parseFloat(t[1]))&&"days"===t[2]}function M(e,t){O()(N(e)||Object(i.isDate)(e)&&!isNaN(e),k);var n=N(e)?Date.parse(e):e.getTime();return new Date(n-1e3*t)}var P=n(100),B=n(81);function L(e){var t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function F(e){if("number"==typeof e)return!0;var t=(e||"").toString();return!!t&&!isNaN(t)}var z=n(27),W=n.n(z),V=function(e){return Array.isArray(e)?W()(e).sort():e},U=n(90);function G(e,t){var n=function(e){return"0"===e||0===e};if(n(e)&&n(t))return 0;if(n(e)||Number.isNaN(e))return null;var i=(t-e)/e;return Number.isNaN(i)||!Number.isFinite(i)?null:i}var H=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},q=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(i.unescape)(t)}},90:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n(12),r=n.n(i),a=function(e,t){var n=t.dateRangeLength;r()(Array.isArray(e),"report must be an array to partition."),r()(Number.isInteger(n)&&n>0,"dateRangeLength must be a positive integer.");var i=-1*n;return{currentRange:e.slice(i),compareRange:e.slice(2*i,i)}}},91:function(e,t,n){"use strict";(function(e,i){n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return TourTooltips}));var r=n(5),a=n.n(r),o=n(82),c=n(30),l=n(0),s=n.n(l),u=n(2),d=n(3),g=n(24),f=n(7),m=n(37),p=n(109),h=n(18);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var b={options:{arrowColor:"#3c7251",backgroundColor:"#3c7251",overlayColor:"rgba(0, 0, 0, 0.6)",textColor:"#fff",zIndex:2e4},spotlight:{border:"2px solid #3c7251",backgroundColor:"#fff"}},E={back:Object(u.__)("Back","google-site-kit"),close:Object(u.__)("Close","google-site-kit"),last:Object(u.__)("Got it","google-site-kit"),next:Object(u.__)("Next","google-site-kit")},_={disableAnimation:!0,styles:{arrow:{length:8,margin:56,spread:16},floater:{filter:"drop-shadow(rgba(60, 64, 67, 0.3) 0px 1px 2px) drop-shadow(rgba(60, 64, 67, 0.15) 0px 2px 6px)"}}},O="feature_tooltip_view",y="feature_tooltip_advance",k="feature_tooltip_return",j="feature_tooltip_dismiss",S="feature_tooltip_complete";function TourTooltips(t){var n=t.steps,r=t.tourID,l=t.gaEventCategory,s=t.callback,u="".concat(r,"-step"),A="".concat(r,"-run"),w=Object(d.useDispatch)(g.b).setValue,T=Object(d.useDispatch)(f.a).dismissTour,C=Object(d.useRegistry)(),N=Object(h.a)(),D=Object(d.useSelect)((function(e){return e(g.b).getValue(u)||0})),R=Object(d.useSelect)((function(e){return e(g.b).getValue(A)&&!1===e(f.a).isTourDismissed(r)}));Object(o.a)((function(){e.document.body.classList.add("googlesitekit-showing-feature-tour","googlesitekit-showing-feature-tour--".concat(r)),w(A,!0)}));var x=n.map((function(e){return function(e){for(var t=1;t