kollapsminoriteten/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-datastore-use...

23 lines
82 KiB
JavaScript
Raw Normal View History

2025-12-12 13:13:07 +01:00
"use strict";(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[995],{2522:(e,t,i)=>{i.d(t,{D:()=>o});var s=i(32091),r=i.n(s);function o(e,{dateRangeLength:t}){r()(Array.isArray(e),"report must be an array to partition."),r()(Number.isInteger(t)&&t>0,"dateRangeLength must be a positive integer.");const i=-1*t;return{currentRange:e.slice(i),compareRange:e.slice(2*i,i)}}},3687:(e,t,i)=>{i.d(t,{U:()=>y});var s=i(32091),r=i.n(s),o=i(17243),n=i(21125),a=i(71769),c=i(12850),l=i(50539);function g(e){return e}function u(){return{}}function d(){}const{clearError:p,receiveError:m}=n.o1;function y({baseName:e,controlCallback:t,reducerCallback:i=g,argsToParams:s=u,validateParams:n=d}){let y;r()(e,"baseName is required."),r()("function"==typeof t,"controlCallback is required and must be a function."),r()("function"==typeof i,"reducerCallback must be a function."),r()("function"==typeof s,"argsToParams must be a function."),r()("function"==typeof n,"validateParams must be a function.");try{n(s()),y=!1}catch(e){y=!0}const S=(0,a.m2)(e),v=(0,a.sP)(e),f=`FETCH_${v}`,h=`START_${f}`,_=`FINISH_${f}`,b=`CATCH_${f}`,R=`RECEIVE_${v}`,A=`fetch${S}`,E=`receive${S}`,C=`isFetching${S}`,k={[C]:{}};const T={[A](...t){const i=s(...t);return n(i),function*(t,i){let s,r;yield{payload:{params:t},type:h},yield p(e,i);try{s=yield{payload:{params:t},type:f},yield T[E](s,t),yield{payload:{params:t},type:_}}catch(s){r=s,yield m(r,e,i),yield{payload:{params:t},type:b}}return{response:s,error:r}}(i,t)},[E]:(e,t)=>(r()(void 0!==e,"response is required."),y?(r()((0,o.isPlainObject)(t),"params is required."),n(t)):t={},{payload:{response:e,params:t},type:R})},I={[f]:({payload:e})=>t(e.params)},D=(0,l.createReducer)((e,{type:t,payload:s})=>{switch(t){case h:{const{params:t}=s;return e[C]=e[C]||{},e[C][(0,c.Zm)(t)]=!0,e}case R:{const{response:t,params:r}=s;return i(e,t,r)}case _:{const{params:t}=s;return e[C]=e[C]||{},e[C][(0,c.Zm)(t)]=!1,e}case b:{const{params:t}=s;return e[C]=e[C]||{},e[C][(0,c.Zm)(t)]=!1,e}default:return e}});return{initialState:k,actions:T,controls:I,reducer:D,resolvers:{},selectors:{[C]:(e,...t)=>{if(void 0===e[C])return!1;let i;try{i=s(...t),n(i)}catch(e){return!1}return!!e[C][(0,c.Zm)(i)]}}}}},8143:(e,t,i)=>{i.d(t,{VZ:()=>o,dc:()=>n,pH:()=>r,r0:()=>a});var s=i(84024);function r(e){try{return new URL(e).pathname}catch{}return null}function o(e,t){try{return new URL(t,e).href}catch{}return("string"==typeof e?e:"")+("string"==typeof t?t:"")}function n(e){return"string"!=typeof e?e:e.replace(/^https?:\/\/(www\.)?/i,"").replace(/\/$/,"")}function a(e,t){if(!(0,s.m)(e))return e;if(e.length<=t)return e;const i=new URL(e),r=e.replace(i.origin,"");if(r.length<t)return r;const o=r.length-Math.floor(t)+1;return"…"+r.substr(o)}},11997:(e,t,i)=>{function s(e,...t){return e.reduce((e,i,s)=>e+i+encodeURIComponent(t[s]||""),"")}i.d(t,{U:()=>s})},12315:(e,t,i)=>{i.d(t,{Y:()=>c});var s=i(32091),r=i.n(s),o=i(54419),n=i(50539),a=i(3687);function c(e,t,i,{server:s=!0,storeName:c}={}){r()(e,"type is required."),r()(t,"identifier is required."),r()(i,"datapoint is required.");const l=c||`${e}/${t}`,g={serverNotifications:s?void 0:{}},u=(0,a.U)({baseName:"getNotifications",controlCallback:()=>(0,o.get)(e,t,i),reducerCallback:(0,n.createReducer)((e,t)=>{e.serverNotifications=t.reduce((e,t)=>({...e,[t.id]:t}),{})})});const d={*getNotifications(){(yield n.commonActions.getRegistry()).select(l).getNotifications()||(yield u.actions.fetchGetNotifications())}};s||delete d.getNotifications;const p={getNotifications(e){const{serverNotifications:t}=e;return void 0===t?t:Object.values({...t||{}})}};return{...(0,n.combineStores)(u,{initialState:g,actions:{},controls:{},reducer:function(e=g,{type:t}){return e},resolvers:d,selectors:p}),STORE_NAME:l}}},12850:(e,t,i)=>{i.d(t,{tt:()=>C,Jg:()=>E,Gp:()=>R,GH:()=>b,r0:()=>A,Du:()=>k,Zf:()=>j,Cn:()=>q,G7:()=>S,vH:()=>y,N_:()=>P,zh:()=>H,mK:()=>g.mK,Ql:()=>T,vY:()=>M,sq:()=>D,VZ:()=>F.VZ,JK:()=>g.JK,IS:()=>N,pH:()=>F.pH,kf:()=>V,O5:()=>w,Qr:()=>I,x6:()=>x,K5:()=>g.K5,S_:()=>m,dc:()=>F.dc,Eo:
(0,h._n)("Last %s day","Last %s days",e,"google-site-kit"),e)}return{"last-7-days":{slug:"last-7-days",label:e(7),days:7},"last-14-days":{slug:"last-14-days",label:e(14),days:14},"last-28-days":{slug:"last-28-days",label:e(28),days:28},"last-90-days":{slug:"last-90-days",label:e(90),days:90}}}function I(e=""){if(!(0,s.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,s.isDate)(t)&&!isNaN(t)}function D(e){f()((0,s.isDate)(e)&&!isNaN(e),_);const t=`${e.getMonth()+1}`,i=`${e.getDate()}`;return[e.getFullYear(),t.length<2?`0${t}`:t,i.length<2?`0${i}`:i].join("-")}function U(e){f()(I(e),b);const[t,i,s]=e.split("-");return new Date(t,i-1,s)}function N(e,t){return D(P(e,t*C))}function w(e){const t=e.split("-");return 3===t.length&&"last"===t[0]&&!Number.isNaN(t[1])&&!Number.isNaN(parseFloat(t[1]))&&"days"===t[2]}function P(e,t){f()(I(e)||(0,s.isDate)(e)&&!isNaN(e),b);const i=I(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}var L=i(69743),O=i(94552),G=i(62540);function M(e,t={}){if(Number.isNaN(Number(e)))return"";const{invertColor:i=!1}=t;return(0,L.Ay)((0,G.jsx)(O.A,{direction:e>0?"up":"down",invertColor:i}))}function q(e,t){return e>0&&t>0?e/t-1:e>0?1:t>0?-1:0}var F=i(8143);function x(e){const t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function V(e){if("number"==typeof e)return!0;const t=(e||"").toString();return!!t&&!isNaN(t)}function $(e){return Array.isArray(e)?[...e].sort():e}var K=i(2522);function j(e,t){function i(e){return"0"===e||0===e}if(i(e)&&i(t))return 0;if(i(e)||Number.isNaN(e))return null;const s=(t-e)/e;return Number.isNaN(s)||!Number.isFinite(s)?null:s}function B(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}}function H(e){if(!e)return"";const t=e.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t)).replace(/(\\)/g,"");return(0,s.unescape)(t)}},15210:(e,t,i)=>{i.d(t,{O:()=>r});var s=i(31234);const r=i.n(s)()(i.g)},21125:(e,t,i)=>{i.d(t,{g4:()=>y,o1:()=>m});var s=i(78913),r=i(32091),o=i.n(r),n=i(10523),a=i.n(n),c=i(12850),l=i(50539);const g="RECEIVE_ERROR",u="CLEAR_ERROR",d="CLEAR_ERRORS";function p(e,t){if(t&&Array.isArray(t)){const i=t.map(e=>"object"==typeof e?(0,c.Zm)(e):e);return`${e}::${a()(JSON.stringify(i))}`}return e}const m={receiveError:(e,t,i=[])=>(o()(e,"error is required."),o()(t,"baseName is required."),o()(i&&Array.isArray(i),"args must be an array."),{type:g,payload:{error:e,baseName:t,args:i}}),clearError:(e,t=[])=>(o()(e,"baseName is required."),o()(t&&Array.isArray(t),"args must be an array."),{type:u,payload:{baseName:e,args:t}}),clearErrors:e=>({type:d,payload:{baseName:e}})};function y(e){o()(e,"storeName must be defined.");const t=(0,l.createReducer)((e,{type:t,payload:i})=>{switch(t){case g:{const{baseName:t,args:s,error:r}=i,o=p(t,s);e.errors=e.errors||{},e.errorArgs=e.errorArgs||{},e.errors[o]=r,e.errorArgs[o]=s;break}case u:{const{baseName:t,args:s}=i,r=p(t,s);e.errors=e.errors||{},e.errorArgs=e.errorArgs||{},delete e.errors[r],delete e.errorArgs[r];break}case d:{const{baseName:t}=i;if(t){e.errors=e.errors||{},e.errorArgs=e.errorArgs||{};for(const i in e.errors)(i===t||i.startsWith(`${t}::`))&&(delete e.errors[i],delete e.errorArgs[i])}else e.errors={},e.errorArgs={};break}}}),i={getErrorForSelector:(e,t,s=[])=>(o()(t,"selectorName is required."),i.getError(e,t,s)),getErrorForAction:(e,t,s=[])=>(o()(t,"actionName is required."),i.getError(e,t,s)),getError(e,t,i){const{errors:s}=e;return o()(t,"baseName is required."),s[p(t,i)]},getErrors(e){const t=new Set(Object.values(e.errors));return Array.from(t)},getMetaDataForError(e,t){const i=Object.keys(e.errors).find(i=>e.errors[i]===t);if(i){return{baseName:i.substring(0,i.indexOf("::")),args:e.errorArgs[i]}}return null},getSelectorDataForError:(0,s.N)(t=>function(i,s){const r=t(e).getMetaDataForError(s);if(r){const{baseName:i,args:s}=r;if(!!t(e)[i])return{storeName:e,name:i,args:s}}return null}),hasErrors:e=>i.getErrors(e).length>0};return{initialState:{errors:{},errorArgs:{}},actions:m,controls:{},reducer:t,resolvers:{},selectors:i}}},21134:(e,t,i)=>{i.d(t,{Gq:()=>u,IL:()=>y,LD:()=
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),r?p(r,{...c,unit:"second"}):"",s?p(s,{...c,unit:"minute"}):"",i?p(i,{...c,unit:"hour"}):"").trim()},formatDecimal(){const t=(0,n.sprintf)(
// translators: %s: number of seconds with "s" as the abbreviated unit.
// translators: %s: number of seconds with "s" as the abbreviated unit.
(0,n.__)("%ds","google-site-kit"),r);if(0===e)return t;const o=(0,n.sprintf)(
// translators: %s: number of minutes with "m" as the abbreviated unit.
// translators: %s: number of minutes with "m" as the abbreviated unit.
(0,n.__)("%dm","google-site-kit"),s),a=(0,n.sprintf)(
// translators: %s: number of hours with "h" as the abbreviated unit.
// translators: %s: number of hours with "h" as the abbreviated unit.
(0,n.__)("%dh","google-site-kit"),i);return(0,n.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),r?t:"",s?o:"",i?a:"").trim()}}}(e,t);try{return i()}catch{return s()}}function c(e){e=parseInt(e,10),Number.isNaN(e)&&(e=0);return{hours:Math.floor(e/60/60),minutes:Math.floor(e/60%60),seconds:Math.floor(e%60)}}function l(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e}function g(e){let t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:(0,s.isPlainObject)(e)&&(t={...e}),t}function u(e,t={}){e=(0,s.isFinite)(e)?e:Number(e),(0,s.isFinite)(e)||(console.warn("Invalid number",e,typeof e),e=0);const i=g(t),{style:r="metric"}=i;return"metric"===r?function(e){const t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in millions.
// translators: %s: an abbreviated number in millions.
(0,n.__)("%sM","google-site-kit"),p(l(e),e%10==0?{}:t)):1e4<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in thousands.
// translators: %s: an abbreviated number in thousands.
(0,n.__)("%sK","google-site-kit"),p(l(e))):1e3<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in thousands.
// translators: %s: an abbreviated number in thousands.
(0,n.__)("%sK","google-site-kit"),p(l(e),e%10==0?{}:t)):p(e,{signDisplay:"never",maximumFractionDigits:1})}(e):"duration"===r?a(e,i):"durationISO"===r?function(e){let{hours:t,minutes:i,seconds:s}=c(e);return s=("0"+s).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${s}`:`${t}:${i}:${s}`}(e):p(e,i)}const d=o()(console.warn);function p(e,t={}){const{locale:i=y(),...s}=t;try{return new Intl.NumberFormat(i,s).format(e)}catch(t){d(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(s)} ).format( ${typeof e} )`,t.message)}const r={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},o=["signDisplay","compactDisplay"],n={};for(const[e,t]of Object.entries(s))r[e]&&t===r[e]||o.includes(e)||(n[e]=t);try{return new Intl.NumberFormat(i,n).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function m(e,t={}){const{locale:i=y(),style:s="long",type:r="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:s,type:r}).format(e)}
/* translators: used between list items, there is a space after the comma. */const o=(0,n.__)(", ","google-site-kit");return e.join(o)}function y(e=i.g){const t=(0,s.get)(e,["_googlesitekitLegacyData","locale"]);if(t){const e=t.match(/^(\w{2})?(_)?(\w{2})/);if(e&&e[0])return e[0].replace(/_/g,"-")}return e.navigator.language}},82046:(e,t,i)=>{i.d(t,{C:()=>o,p:()=>r});var s=i(15210);function r(e,t={}){return{__html:s.O.sanitize(e,t)}}function o(e){const t="object"==typeof e?e.toString():e;return t?.replace?.(/\/+$/,"")}},82871:e=>{e.exports=googlesitekit.i18n},86134:(e,t,i)=>{i.d(t,{N$:()=>r,aO:()=>o,qB:()=>s});const s={BOXES:"boxes",COMPOSITE:"composite"},r={QUARTER:"quarter",HALF:"half",FULL:"full"},o="core/widgets"},89318:(e,t,i)=>{i.d(t,{M9:()=>E,sx:()=>R,BI:()=>A});var s=i(17243);const r="_googlesitekitDataLayer",o="data-googlesitekit-gtag";function n(e){return function(){e[r]=e[r]||[],e[r].push(arguments)}}var a=i(65214);const c={activeModules:[],isAuthenticated:!1,referenceSiteURL:"",trackingEnabled:!1,trackingID:"",userIDHash:"",userRoles:[]};const{activeModules:l=[],isSiteKitScreen:g,trackingEnabled:u,trackingID:d,referenceSiteURL:p,userIDHash:m,isAuthenticated:y,userRoles:S}=i.g._googlesitekitTrackingData||{},v={activeModules:l,trackingEnabled:u,trackingID:d,referenceSiteURL:p,userIDHash:m,isSiteKitScreen:g,userRoles:S,isAuthenticated:y,pluginVersion:"1.167.0"},{enableTracking:f,disableTracking:h,isTrackingEnabled:_,initializeSnippet:b,trackEvent:R,trackEventOnce:A}=function(e,t=i.g,l=i.g){const g={...c,...e};g.referenceSiteURL&&(g.referenceSiteURL=g.referenceSiteURL.toString().replace(/\/+$/,""));const u=function(e,t){const s=n(t);let c;const{activeModules:l,referenceSiteURL:g,userIDHash:u,userRoles:d=[],isAuthenticated:p,pluginVersion:m}=e;return function(){const{document:t}=i.g;if(void 0===c&&(c=!!t.querySelector(`script[${o}]`)),c)return!1;c=!0;const n=d?.length?d.join(","):"";s("js",new Date),s("config",e.trackingID,{groups:"site_kit",send_page_view:e.isSiteKitScreen,domain:g,plugin_version:m||"",enabled_features:Array.from(a.t).join(","),active_modules:l.join(","),authenticated:p?"1":"0",user_properties:{user_roles:n,user_identifier:u}});const y=t.createElement("script");return y.setAttribute(o,""),y.async=!0,y.src=`https://www.googletagmanager.com/gtag/js?id=${e.trackingID}&l=${r}`,t.head.appendChild(y),{scriptTagSrc:`https://www.googletagmanager.com/gtag/js?id=${e.trackingID}&l=${r}`}}}(g,t),d=function(e,t,i,s){const r=n(t);return async function(t,o,n,a){const{trackingEnabled:c}=e;if(!c)return null;i();const l={send_to:"site_kit",event_category:t,event_label:n,value:a};return new Promise(e=>{const i=setTimeout(function(){s.console.warn(`Tracking event "${o}" (category "${t}") took too long to fire.`),e()},1e3);function n(){clearTimeout(i),e()}r("event",o,{...l,event_callback:n}),s._gaUserPrefs?.ioo?.()&&n()})}}(g,t,u,l),p={};return{enableTracking:function(){g.trackingEnabled=!0},disableTracking:function(){g.trackingEnabled=!1},initializeSnippet:u,isTrackingEnabled:function(){return!!g.trackingEnabled},trackEvent:d,trackEventOnce:function(...e){const t=JSON.stringify(e);p[t]||(p[t]=(0,s.once)(d)),p[t](...e)}}}(v);function E(e){e?f():h()}g&&u&&b()},93896:(e,t,i)=>{i.d(t,{O4:()=>s,OQ:()=>o,qc:()=>r});const s="core/site",r="primary",o="secondary"},94552:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(62688),r=i.n(s),o=i(4452),n=i.n(o),a=i(62540);function ChangeArrow({direction:e,invertColor:t,width:i,height:s}){return(0,a.jsx)("svg",{className:n()("googlesitekit-change-arrow",`googlesitekit-change-arrow--${e}`,{"googlesitekit-change-arrow--inverted-color":t}),width:i,height:s,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"})})}ChangeArrow.propTypes={direction:r().string,invertColor:r().bool,width:r().number,height:r().number},ChangeArrow.defaultProps={direction:"up",invertColor:!1,width:9,height:9};const c=ChangeArrow}},e=>{e.O(0,[660],()=>{r