14 lines
93 KiB
JavaScript
14 lines
93 KiB
JavaScript
|
|
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[13],{1:function(e,t){e.exports=googlesitekit.i18n},111:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return o}));var n="editing-user-role-select-slug-key",i=["idea-hub","thank-with-google"],a="dashboardSharingDialogOpen",o="resetSharingDialogOpen"},1123:function(e,t,r){"use strict";r.r(t);var n=r(4),i=r.n(n),a=r(53),o=r(5),c=r.n(o),u=r(6),s=r.n(u),l=r(34),f=r.n(l),d=r(12),g=r(41);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=i.a.createRegistrySelector;function m(e){return b((function(t){return function(){return(t(d.a).getAuthentication()||{})[e]}}))}var y=Object(g.a)({baseName:"getAuthentication",controlCallback:function(){return f.a.get("core","user","authentication",void 0,{useCache:!1})},reducerCallback:function(e,t){return v(v({},e),{},{authentication:t})}}),h={authentication:void 0,authError:null},O={setAuthError:function(e){return{payload:{error:e},type:"SET_AUTH_ERROR"}},clearAuthError:function(){return{payload:{},type:"CLEAR_AUTH_ERROR"}}},S={getAuthentication:c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.commonActions.getRegistry();case 2:if(t=e.sent,(0,t.select)(d.a).getAuthentication()){e.next=7;break}return e.next=7,y.actions.fetchGetAuthentication();case 7:case"end":return e.stop()}}),e)}))},_={getAuthentication:function(e){return e.authentication},hasScope:b((function(e){return function(t,r){var n=e(d.a).getGrantedScopes(t);if(void 0!==n)return n.includes(r)}})),isAuthenticated:m("authenticated"),getGrantedScopes:m("grantedScopes"),getRequiredScopes:m("requiredScopes"),getUnsatisfiedScopes:m("unsatisfiedScopes"),needsReauthentication:m("needsReauthentication"),getDisconnectedReason:m("disconnectedReason"),getConnectedProxyURL:m("connectedProxyURL"),getPreviousConnectedProxyURL:m("previousConnectedProxyURL"),getAuthError:function(e){return e.authError}},E=i.a.combineStores(y,{initialState:h,actions:O,reducer:function(e,t){var r=t.type,n=t.payload;switch(r){case"SET_AUTH_ERROR":return v(v({},e),{},{authError:n.error});case"CLEAR_AUTH_ERROR":return v(v({},e),{},{authError:null});default:return e}},resolvers:S,selectors:_}),w=(E.initialState,E.actions,E.controls,E.reducer,E.resolvers,E.selectors,E),j=r(7),k=r.n(j),I=r(68);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x={dateRange:"last-28-days",referenceDate:Object(I.g)(new Date)};var R={getDateRange:function(e){return e.dateRange},getDateRangeDates:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.compare,n=void 0!==r&&r,i=t.offsetDays,a=void 0===i?0:i,o=t.referenceDate,c=void 0===o?e.referenceDate:o,u=R.getDateRange(e),s=Object(I.h)(c,a),l=u.match("-(.*)-"),f=Number(l?l[1]:28),d=Object(I.h)(s,f-1),g={startDate:d,endDate:s};if(n){var p=Object(I.h)(d,1),v=Object(I.h)(p,f-1);g.compareStartDate=v,g.compareEndDate=p}return g},g
|
|||
|
|
/* translators: %s: number of days */
|
|||
|
|
Object(d._n)("Last %s day","Last %s days",e,"google-site-kit"),e)};return{"last-7-days":{slug:"last-7-days",label:e(7),days:7},"last-14-days":{slug:"last-14-days",label:e(14),days:14},"last-28-days":{slug:"last-28-days",label:e(28),days:28},"last-90-days":{slug:"last-90-days",label:e(90),days:90}}}},69:function(e,t,r){"use strict";r.d(t,"a",(function(){return I})),r.d(t,"b",(function(){return T})),r.d(t,"c",(function(){return D})),r.d(t,"d",(function(){return R})),r.d(t,"e",(function(){return A})),r.d(t,"g",(function(){return P})),r.d(t,"f",(function(){return N}));var n,i=r(5),a=r.n(i),o=r(24),c=r.n(o),u=r(6),s=r.n(u),l=r(7),f=r.n(l),d=r(201),g=r.n(d),p=r(71),v=r.n(p),b=r(66);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.reduce((function(e,t){return y(y({},e),t)}),{}),i=t.reduce((function(e,t){return[].concat(c()(e),c()(Object.keys(t)))}),[]),a=x(i);return f()(0===a.length,"collect() cannot accept collections with duplicate keys. Your call to collect() contains the following duplicated functions: ".concat(a.join(", "),". Check your data stores for duplicates.")),n},O=h,S=h,_=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=[].concat(t);return"function"!=typeof i[0]&&(n=i.shift()),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i.reduce((function(e,r){return r(e,t)}),e)}},E=h,w=h,j=h,k=function(e){return e},I=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=j.apply(void 0,c()(t.map((function(e){return e.initialState||{}}))));return{initialState:n,controls:S.apply(void 0,c()(t.map((function(e){return e.controls||{}})))),actions:O.apply(void 0,c()(t.map((function(e){return e.actions||{}})))),reducer:_.apply(void 0,[n].concat(c()(t.map((function(e){return e.reducer||k}))))),resolvers:E.apply(void 0,c()(t.map((function(e){return e.resolvers||{}})))),selectors:w.apply(void 0,c()(t.map((function(e){return e.selectors||{}}))))}},T={getRegistry:function(){return{payload:{},type:"GET_REGISTRY"}},await:a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{payload:{value:t},type:"AWAIT"});case 1:case"end":return e.stop()}}),e)}))},D=(n={},s()(n,"GET_REGISTRY",Object(b.d)((function(e){return function(){return e}}))),s()(n,"AWAIT",(function(e){return e.payload.value})),n),x=function(e){for(var t=[],r={},n=0;n<e.length;n++){var i=e[n];r[i]=r[i]>=1?r[i]+1:1,r[i]>1&&t.push(i)}return t},R={actions:T,controls:D,reducer:k},A=function(e){return function(t){return C(e(t))}},C=v()((function(e){return g()(e,(function(e,t){return function(){var r=e.apply(void 0,arguments);return f()(void 0!==r,"".concat(t,"(...) is not resolved")),r}}))}));function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.negate,n=void 0!==r&&r,i=Object(b.e)((function(t){return function(r){var i=!n,a=!!n;try{for(var o=arguments.length,c=new Array(o>1?o-1:0),u=1;u<o;u++)c[u-1]=arguments[u];return e.apply(void 0,[t,r].concat(c)),i}catch(e){return a}}})),a=Object(b.e)((function(t){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];e.apply(void 0,[t,r].concat(i))}}));return{safeSelector:i,dangerousSelector:a}}function N(e,t){return f()("function"==typeof e,"a validator function is required."),f()("function"==typeof t,"an action creator function is requir
|
|||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
|||
|
|
Object(p._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),i?E(i,b(b({},o),{},{unit:"second"})):"",n?E(n,b(b({},o),{},{unit:"minute"})):"",r?E(r,b(b({},o),{},{unit:"hour"})):"").trim()},formatDecimal:function(){var t=Object(p.sprintf)(// translators: %s: number of seconds with "s" as the abbreviated unit.
|
|||
|
|
Object(p.__)("%ds","google-site-kit"),i);if(0===e)return t;var a=Object(p.sprintf)(// translators: %s: number of minutes with "m" as the abbreviated unit.
|
|||
|
|
Object(p.__)("%dm","google-site-kit"),n),o=Object(p.sprintf)(// translators: %s: number of hours with "h" as the abbreviated unit.
|
|||
|
|
Object(p.__)("%dh","google-site-kit"),r);return Object(p.sprintf)(
|
|||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
|||
|
|
Object(p._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),i?t:"",n?a:"",r?o:"").trim()}}},h=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},O=function(e){var t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in millions.
|
|||
|
|
Object(p.__)("%sM","google-site-kit"),E(h(e),e%10==0?{}:t)):1e4<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
|||
|
|
Object(p.__)("%sK","google-site-kit"),E(h(e))):1e3<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
|||
|
|
Object(p.__)("%sK","google-site-kit"),E(h(e),e%10==0?{}:t)):E(e,{signDisplay:"never",maximumFractionDigits:1})},S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object(f.isFinite)(e)?e:Number(e),Object(f.isFinite)(e)||(console.warn("Invalid number",e,o()(e)),e=0);var r={};if("%"===t)r={style:"percent",maximumFractionDigits:2};else{if("s"===t)return m(e,{unitDisplay:"narrow"});t&&"string"==typeof t?r={style:"currency",currency:t}:Object(f.isPlainObject)(t)&&(r=b({},t))}var n=r,i=n.style,a=void 0===i?"metric":i;return"metric"===a?O(e):"duration"===a?m(e,t):E(e,r)},_=g()(console.warn),E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.locale,n=void 0===r?j():r,a=l()(t,["locale"]);try{return new Intl.NumberFormat(n,a).format(e)}catch(t){_("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(n),", ").concat(JSON.stringify(a)," ).format( ").concat(o()(e)," )"),t.message)}for(var c={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},u=["signDisplay","compactDisplay"],s={},f=0,d=Object.entries(a);f<d.length;f++){var g=i()(d[f],2),p=g[0],v=g[1];c[p]&&v===c[p]||(u.includes(p)||(s[p]=v))}try{return new Intl.NumberFormat(n,s).format(e)}catch(t){return new Intl.NumberFormat(n).format(e)}},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.locale,n=void 0===r?j():r,i=t.style,a=void 0===i?"long":i,o=t.type,c=void 0===o?"conjunction":o;if(Intl.ListFormat){var u=new Intl.ListFormat(n,{style:a,type:c});return u.format(e)}
|
|||
|
|
/* translators: used between list items, there is a space after the comma. */var s=Object(p.__)(", ","google-site-kit");return e.join(s)},j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,r=Object(f.get)(t,["_googlesitekitLegacyData","locale"]);if(r){var n=r.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,r(22))},762:function(e,t,r){"use strict";(function(e){var n,i=r(5),a=r.n(i),o=r(16),c=r.n(o),u=r(25),s=r(1),l=r(23),f=r(17),d=r(39),g={slug:"ideaHubModule",contexts:[l.j,l.k],version:"1.43.0",checkRequirements:(n=c()(a.a.mark((function e(t){var r,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.__experimentalResolveSelect,e.next=3,r(f.a).isModuleConnected("idea-hub");case 3:if(e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:return e.next=8,r(d.t).getNewIdeas();case 8:return n=e.sent,e.abrupt("return",!!n.length);case 10:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)}),steps:[{target:".googlesitekit-widget--ideaHubIdeas",title:Object(s.__)("Get inspiration for new topics to write about!","google-site-kit"),content:Object(s.__)("These ideas are based on unanswered searches related to the content of your site. They are organized by topics and will refresh every 2-3 days.","google-site-kit")},{target:".googlesitekit-idea-hub__actions--create",title:Object(s.__)("Start a draft","google-site-kit"),content:Object(s.__)("Found an interesting idea you want to write about? Create a draft! You can always get back to it later on the Posts page.","google-site-kit")},{target:".googlesitekit-idea-hub__idea--single",title:Object(s.__)("Save for later or dismiss","google-site-kit"),content:Object(s.__)('If you’re not ready to create a draft about an idea just yet, add it to your "Saved" list and revisit later. If you don’t like an idea, you can dismiss it from your list.',"google-site-kit"),placement:"top"}],gaEventCategory:function(e){return"".concat(e,"_idea-hub-widget")},callback:function(t){var r=t.type,n=t.index;if([u.b.STEP_BEFORE,u.b.STEP_AFTER].includes(r)&&2===n){var i="googlesitekit-idea-hub__actions--unhide",a=e.document.querySelector(".googlesitekit-idea-hub__actions--pin"),o=e.document.querySelector(".googlesitekit-idea-hub__actions--delete");a&&o&&(r===u.b.STEP_BEFORE&&(a.classList.add(i),o.classList.add(i)),r===u.b.STEP_AFTER&&(a.classList.remove(i),o.classList.remove(i)))}}};t.a=g}).call(this,r(22))},766:function(e,t,r){"use strict";(function(e){var n=r(25),i=r(1),a=r(23),o={slug:"unifiedDashboard",contexts:[a.j,a.k],version:"1.68.0",gaEventCategory:function(e){return"".concat(e,"_unified-dashboard")},steps:[{target:".googlesitekit-navigation",title:Object(i.__)("New! Navigate your dashboard easily","google-site-kit"),content:Object(i.__)("Jump straight to the relevant section in your dashboard with just one click - no more scrolling.","google-site-kit"),placement:"bottom"},{target:".googlesitekit-entity-search",title:Object(i.__)("Check stats for a specific post","google-site-kit"),content:Object(i.__)("Search by URL or by post title and your dashboard will be filtered to show stats just for that URL.","google-site-kit"),placement:"bottom"},{target:".googlesitekit-widget--searchFunnel",title:Object(i.__)("See trends over time for your site’s Search metrics","google-site-kit"),content:Object(i.__)("The updated Search Funnel shows you a more comprehensive view of how traffic from Search is changing.","google-site-kit"),placement:"top-end"}],callback:function(t){var r=t.type,i=t.index;n.b.TOOLTIP===r&&2===i&&setTimeout((function(){var t=e.document.querySelector(".googlesitekit-tour-tooltip"),r=e.document.querySelector("#wpadminbar");t&&r&&e.scrollTo({top:e.scrollY+t.getBoundingClientRect().top-r.offsetHeight,behavior:"smooth"})}),50)}};t.a=o}).call(this,r(22))},767:function(e,t,r){"use strict";(function(e){var n=r(24),i=r.n(n),a=r(5),o=r.n(a),c=r(6),u=r.n(c),s=r(7),l=r.n(s),f=r(34),d=r.n(f),g=r(4),p=r.n(g),v=r(12),b=r(17),m=r(768),y=r(41);function h(e,t){va
|