rozmova-analytics 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/constants.d.ts +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.esm.js +86 -61
- package/dist/index.js +86 -61
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,9 +91,9 @@ Associates a user with the provided user ID and sets user properties in Mixpanel
|
|
|
91
91
|
|
|
92
92
|
Resets the current user, generating a new user ID and reinitializing the library.
|
|
93
93
|
|
|
94
|
-
### `trackEvent(eventName: string, properties?: EventParams)`
|
|
94
|
+
### `trackEvent(eventName: string, properties?: EventParams, services = {ga: true, mixpanel: true, customerIO: true})`
|
|
95
95
|
|
|
96
|
-
Tracks an event with the specified name and optional properties.
|
|
96
|
+
Tracks an event with the specified name and optional properties, services.
|
|
97
97
|
|
|
98
98
|
## Browser Support
|
|
99
99
|
|
package/dist/constants.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export declare const GA_SERVER_CONTAINER_URL = "https://tagging.clearly.help";
|
|
|
6
6
|
export declare const MIXPANEL_TOKEN = "9d4cb3d213e5aee689ea01dd68ad65ad";
|
|
7
7
|
export declare const CUSTOMER_IO_WRITE_KEY = "e6d009719c77519432c3";
|
|
8
8
|
export declare const SUPPORTED_LANGUAGES: string[];
|
|
9
|
+
export declare const GA_ECOMMERCE_EVENTS: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,11 @@ declare class Analytics {
|
|
|
9
9
|
platform?: string;
|
|
10
10
|
isClearly?: boolean;
|
|
11
11
|
}): void;
|
|
12
|
-
trackEvent(eventName: string, properties?: EventParams
|
|
12
|
+
trackEvent(eventName: string, properties?: EventParams, services?: {
|
|
13
|
+
ga?: boolean;
|
|
14
|
+
mixpanel?: boolean;
|
|
15
|
+
customerIO?: boolean;
|
|
16
|
+
}): void;
|
|
13
17
|
setUser(userId: string, userParams: {
|
|
14
18
|
email: string;
|
|
15
19
|
name: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -11946,6 +11946,13 @@ const GA_SERVER_CONTAINER_URL = "https://tagging.clearly.help";
|
|
|
11946
11946
|
const MIXPANEL_TOKEN = "9d4cb3d213e5aee689ea01dd68ad65ad";
|
|
11947
11947
|
const CUSTOMER_IO_WRITE_KEY = "e6d009719c77519432c3";
|
|
11948
11948
|
const SUPPORTED_LANGUAGES = ["en", "uk", "pl", "es", "ru"];
|
|
11949
|
+
const GA_ECOMMERCE_EVENTS = [
|
|
11950
|
+
"view_item_list",
|
|
11951
|
+
"select_item",
|
|
11952
|
+
"view_item",
|
|
11953
|
+
"begin_checkout",
|
|
11954
|
+
"add_payment_info",
|
|
11955
|
+
];
|
|
11949
11956
|
|
|
11950
11957
|
const setQueryParam = (name, value) => {
|
|
11951
11958
|
const url = new URL(window.location.href);
|
|
@@ -12189,48 +12196,50 @@ const storeGeoParam = () => {
|
|
|
12189
12196
|
*/
|
|
12190
12197
|
const e='opt-in',t='opt-out',o='show--consent',n='show--preferences',a='disable--interaction',s='data-category',c='div',r='button',i='aria-hidden',l='btn-group',d='click',f='data-role',_='consentModal',u='preferencesModal';class p{constructor(){this.t={mode:e,revision:0,autoShow:true,lazyHtmlGeneration:true,autoClearCookies:true,manageScriptTags:true,hideFromBots:true,cookie:{name:'cc_cookie',expiresAfterDays:182,domain:'',path:'/',sameSite:'Lax'}},this.o={i:{},l:'',_:{},u:{},p:{},m:[],v:false,h:null,C:null,S:null,M:'',D:true,T:false,k:false,A:false,N:false,H:[],V:false,I:true,L:[],j:false,F:'',P:false,O:[],R:[],B:[],G:[],J:false,U:false,$:false,q:[],K:[],W:[],X:{},Y:{},Z:{},ee:{},te:{},oe:[]},this.ne={ae:{},se:{}},this.ce={},this.re={ie:'cc:onFirstConsent',le:'cc:onConsent',de:'cc:onChange',fe:'cc:onModalShow',_e:'cc:onModalHide',ue:'cc:onModalReady'};}}const m=new p,g=(e,t)=>e.indexOf(t),b=(e,t)=>-1!==g(e,t),v=e=>Array.isArray(e),y=e=>'string'==typeof e,h=e=>!!e&&'object'==typeof e&&!v(e),C=e=>'function'==typeof e,w=e=>Object.keys(e),S=e=>Array.from(new Set(e)),x=()=>document.activeElement,M=e=>e.preventDefault(),D=(e,t)=>e.querySelectorAll(t),k=e=>{const t=document.createElement(e);return e===r&&(t.type=e),t},E=(e,t,o)=>e.setAttribute(t,o),A=(e,t,o)=>{e.removeAttribute(o?'data-'+t:t);},N=(e,t,o)=>e.getAttribute(o?'data-'+t:t),H=(e,t)=>e.appendChild(t),V=(e,t)=>e.classList.add(t),I=(e,t)=>V(e,'cm__'+t),L=(e,t)=>V(e,'pm__'+t),j=(e,t)=>e.classList.remove(t),F=e=>{if('object'!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());let t=Array.isArray(e)?[]:{};for(let o in e){let n=e[o];t[o]=F(n);}return t},O=(e,t)=>dispatchEvent(new CustomEvent(e,{detail:t})),R=(e,t,o,n)=>{e.addEventListener(t,o),n&&m.o.m.push({pe:e,me:t,ge:o});},B=()=>{const e=m.t.cookie.expiresAfterDays;return C(e)?e(m.o.F):e},G=(e,t)=>{const o=e||[],n=t||[];return o.filter((e=>!b(n,e))).concat(n.filter((e=>!b(o,e))))},J=e=>{m.o.R=S(e),m.o.F=(()=>{let e='custom';const{R:t,O:o,B:n}=m.o,a=t.length;return a===o.length?e='all':a===n.length&&(e='necessary'),e})();},U=(e,t,o,n)=>{const a='accept-',{show:s,showPreferences:c,hide:r,hidePreferences:i,acceptCategory:l}=t,f=e||document,_=e=>D(f,`[data-cc="${e}"]`),u=(e,t)=>{M(e),l(t),i(),r();},p=_('show-preferencesModal'),g=_('show-consentModal'),b=_(a+'all'),v=_(a+'necessary'),y=_(a+'custom'),h=m.t.lazyHtmlGeneration;for(const e of p)E(e,'aria-haspopup','dialog'),R(e,d,(e=>{M(e),c();})),h&&(R(e,'mouseenter',(e=>{M(e),m.o.N||o(t,n);}),true),R(e,'focus',(()=>{m.o.N||o(t,n);})));for(let e of g)E(e,'aria-haspopup','dialog'),R(e,d,(e=>{M(e),s(true);}),true);for(let e of b)R(e,d,(e=>{u(e,'all');}),true);for(let e of y)R(e,d,(e=>{u(e);}),true);for(let e of v)R(e,d,(e=>{u(e,[]);}),true);},$=(e,t)=>{e&&(t&&(e.tabIndex=-1),e.focus(),t&&e.removeAttribute('tabindex'));},z=(e,t)=>{const o=n=>{n.target.removeEventListener('transitionend',o),'opacity'===n.propertyName&&'1'===getComputedStyle(e).opacity&&$((e=>1===e?m.ne.be:m.ne.ve)(t));};R(e,'transitionend',o);};let q;const K=e=>{clearTimeout(q),e?V(m.ne.ye,a):q=setTimeout((()=>{j(m.ne.ye,a);}),500);},Q=['M 19.5 4.5 L 4.5 19.5 M 4.5 4.501 L 19.5 19.5','M 3.572 13.406 L 8.281 18.115 L 20.428 5.885','M 21.999 6.94 L 11.639 17.18 L 2.001 6.82 '],W=(e=0,t=1.5)=>`<svg viewBox="0 0 24 24" stroke-width="${t}"><path d="${Q[e]}"/></svg>`,X=e=>{const t=m.ne,o=m.o;(e=>{const n=e===t.he,a=o.i.disablePageInteraction?t.ye:n?t.Ce:t.ye;R(a,'keydown',(t=>{if('Tab'!==t.key||!(n?o.k&&!o.A:o.A))return;const a=x(),s=n?o.q:o.K;0!==s.length&&(t.shiftKey?a!==s[0]&&e.contains(a)||(M(t),$(s[1])):a!==s[1]&&e.contains(a)||(M(t),$(s[0])));}),true);})(e);},Y=['[href]',r,'input','details','[tabindex]'].map((e=>e+':not([tabindex="-1"])')).join(','),Z=e=>{const{o:t,ne:o}=m,n=(e,t)=>{const o=D(e,Y);t[0]=o[0],t[1]=o[o.length-1];};1===e&&t.T&&n(o.he,t.q),2===e&&t.N&&n(o.we,t.K);},ee=(e,t,o)=>{const{de:n,le:a,ie:s,_e:c,ue:r,fe:i}=m.ce,l=m.re;if(t){const n={modalName:t};return e===l.fe?C(i)&&i(n):e===l._e?C(c)&&c(n):(n.modal=o,C(r)&&r(n)),O(e,n)}const d={cookie:m.o.p};e===l.ie?C(s)&&s(F(d)):e===l.le?C(a)&&a(F(d)):(d.changedCategories=m.o.L,d.changedServices=m.o.ee,C(n)&&n(F(d))),O(e,F(d));},te=(e,t)=>{try{return e()}catch(e){return !t&&console.warn('CookieConsent:',e),false}},oe=e=>{const{Y:t,ee:o,O:n,X:a,oe:c,p:r,L:i}=m.o;for(const e of n){const n=o[e]||t[e]||[];for(const o of n){const n=a[e][o];if(!n)continue;const{onAccept:s,onReject:c}=n;!n.Se&&b(t[e],o)?(n.Se=true,C(s)&&s()):n.Se&&!b(t[e],o)&&(n.Se=false,C(c)&&c());}}if(!m.t.manageScriptTags)return;const l=c,d=e||r.categories||[],f=(e,n)=>{if(n>=e.length)return;const a=c[n];if(a.xe)return f(e,n+1);const r=a.Me,l=a.De,_=a.Te,u=b(d,l),p=!!_&&b(t[l],_);if(!_&&!a.ke&&u||!_&&a.ke&&!u&&b(i,l)||_&&!a.ke&&p||_&&a.ke&&!p&&b(o[l]||[],_)){a.xe=true;const t=N(r,'type',true);A(r,'type',!!t),A(r,s);let o=N(r,'src',true);o&&A(r,'src',true);const c=k('script');c.textContent=r.innerHTML;for(const{nodeName:e}of r.attributes)E(c,e,r[e]||N(r,e));t&&(c.type=t),o?c.src=o:o=r.src;const i=!!o&&(!t||['text/javascript','module'].includes(t));if(i&&(c.onload=c.onerror=()=>{f(e,++n);}),r.replaceWith(c),i)return}f(e,++n);};f(l,0);},ne='bottom',ae='left',se='center',ce='right',re='inline',ie='wide',le='pm--',de=['middle','top',ne],fe=[ae,se,ce],_e={box:{Ee:[ie,re],Ae:de,Ne:fe,He:ne,Ve:ce},cloud:{Ee:[re],Ae:de,Ne:fe,He:ne,Ve:se},bar:{Ee:[re],Ae:de.slice(1),Ne:[],He:ne,Ve:''}},ue={box:{Ee:[],Ae:[],Ne:[],He:'',Ve:''},bar:{Ee:[ie],Ae:[],Ne:[ae,ce],He:'',Ve:ae}},pe=e=>{const t=m.o.i.guiOptions,o=t&&t.consentModal,n=t&&t.preferencesModal;0===e&&me(m.ne.he,_e,o,'cm--','box','cm'),1===e&&me(m.ne.we,ue,n,le,'box','pm');},me=(e,t,o,n,a,s)=>{e.className=s;const c=o&&o.layout,r=o&&o.position,i=o&&o.flipButtons,l=!o||false!==o.equalWeightButtons,d=c&&c.split(' ')||[],f=d[0],_=d[1],u=f in t?f:a,p=t[u],g=b(p.Ee,_)&&_,v=r&&r.split(' ')||[],y=v[0],h=n===le?v[0]:v[1],C=b(p.Ae,y)?y:p.He,w=b(p.Ne,h)?h:p.Ve,S=t=>{t&&V(e,n+t);};S(u),S(g),S(C),S(w),i&&S('flip');const x=s+'__btn--secondary';if('cm'===s){const{Ie:e,Le:t}=m.ne;e&&(l?j(e,x):V(e,x)),t&&(l?j(t,x):V(t,x));}else {const{je:e}=m.ne;e&&(l?j(e,x):V(e,x));}},ge=(e,t)=>{const o=m.o,n=m.ne,{hide:a,hidePreferences:s,acceptCategory:_}=e,p=e=>{_(e),s(),a();},g=o.u&&o.u.preferencesModal;if(!g)return;const b=g.title,v=g.closeIconLabel,C=g.acceptAllBtn,S=g.acceptNecessaryBtn,x=g.savePreferencesBtn,M=g.sections||[],D=C||S||x;if(n.Fe)n.Pe=k(c),L(n.Pe,'body');else {n.Fe=k(c),V(n.Fe,'pm-wrapper');const e=k('div');V(e,'pm-overlay'),H(n.Fe,e),R(e,d,s),n.we=k(c),V(n.we,'pm'),E(n.we,'role','dialog'),E(n.we,i,true),E(n.we,'aria-modal',true),E(n.we,'aria-labelledby','pm__title'),R(n.ye,'keydown',(e=>{27===e.keyCode&&s();}),true),n.Oe=k(c),L(n.Oe,'header'),n.Re=k('h2'),L(n.Re,'title'),n.Re.id='pm__title',n.Be=k(r),L(n.Be,'close-btn'),E(n.Be,'aria-label',g.closeIconLabel||''),R(n.Be,d,s),n.Ge=k('span'),n.Ge.innerHTML=W(),H(n.Be,n.Ge),n.Je=k(c),L(n.Je,'body'),n.Ue=k(c),L(n.Ue,'footer');var T=k(c);V(T,'btns');var A=k(c),N=k(c);L(A,l),L(N,l),H(n.Ue,A),H(n.Ue,N),H(n.Oe,n.Re),H(n.Oe,n.Be),n.ve=k(c),E(n.ve,'tabIndex',-1),H(n.we,n.ve),H(n.we,n.Oe),H(n.we,n.Je),D&&H(n.we,n.Ue),H(n.Fe,n.we);}let I;b&&(n.Re.innerHTML=b,v&&E(n.Be,'aria-label',v)),M.forEach(((e,t)=>{const a=e.title,s=e.description,l=e.linkedCategory,f=l&&o.P[l],_=e.cookieTable,u=_&&_.body,p=_&&_.caption,m=u&&u.length>0,b=!!f,v=b&&o.X[l],C=h(v)&&w(v)||[],S=b&&(!!s||!!m||w(v).length>0);var x=k(c);if(L(x,'section'),S||s){var M=k(c);L(M,'section-desc-wrapper');}let D=C.length;if(S&&D>0){const e=k(c);L(e,'section-services');for(const t of C){const o=v[t],n=o&&o.label||t,a=k(c),s=k(c),r=k(c),i=k(c);L(a,'service'),L(i,'service-title'),L(s,'service-header'),L(r,'service-icon');const d=be(n,t,f,true,l);i.innerHTML=n,H(s,r),H(s,i),H(a,s),H(a,d),H(e,a);}H(M,e);}if(a){var T=k(c),A=k(b?r:c);if(L(T,'section-title-wrapper'),L(A,'section-title'),A.innerHTML=a,H(T,A),b){const e=k('span');e.innerHTML=W(2,3.5),L(e,'section-arrow'),H(T,e),x.className+='--toggle';const t=be(a,l,f);let o=g.serviceCounterLabel;if(D>0&&y(o)){let e=k('span');L(e,'badge'),L(e,'service-counter'),E(e,i,true),E(e,'data-servicecounter',D),o&&(o=o.split('|'),o=o.length>1&&D>1?o[1]:o[0],E(e,'data-counterlabel',o)),e.innerHTML=D+(o?' '+o:''),H(A,e);}if(S){L(x,'section--expandable');var N=l+'-desc';E(A,'aria-expanded',false),E(A,'aria-controls',N);}H(T,t);}else E(A,'role','heading'),E(A,'aria-level','3');H(x,T);}if(s){var F=k('p');L(F,'section-desc'),F.innerHTML=s,H(M,F);}if(S&&(E(M,i,'true'),M.id=N,((e,t,o)=>{R(A,d,(()=>{t.classList.contains('is-expanded')?(j(t,'is-expanded'),E(o,'aria-expanded','false'),E(e,i,'true')):(V(t,'is-expanded'),E(o,'aria-expanded','true'),E(e,i,'false'));}));})(M,x,A),m)){const e=k('table'),o=k('thead'),a=k('tbody');if(p){const t=k('caption');L(t,'table-caption'),t.innerHTML=p,e.appendChild(t);}L(e,'section-table'),L(o,'table-head'),L(a,'table-body');const s=_.headers,r=w(s),i=n.$e.createDocumentFragment(),l=k('tr');for(const e of r){const o=s[e],n=k('th');n.id='cc__row-'+o+t,E(n,'scope','col'),L(n,'table-th'),n.innerHTML=o,H(i,n);}H(l,i),H(o,l);const d=n.$e.createDocumentFragment();for(const e of u){const o=k('tr');L(o,'table-tr');for(const n of r){const a=s[n],r=e[n],i=k('td'),l=k(c);L(i,'table-td'),E(i,'data-column',a),E(i,'headers','cc__row-'+a+t),l.insertAdjacentHTML('beforeend',r),H(i,l),H(o,i);}H(d,o);}H(a,d),H(e,o),H(e,a),H(M,e);}(S||s)&&H(x,M);const P=n.Pe||n.Je;b?(I||(I=k(c),L(I,'section-toggles')),I.appendChild(x)):I=null,H(P,I||x);})),C&&(n.ze||(n.ze=k(r),L(n.ze,'btn'),E(n.ze,f,'all'),H(A,n.ze),R(n.ze,d,(()=>p('all')))),n.ze.innerHTML=C),S&&(n.je||(n.je=k(r),L(n.je,'btn'),E(n.je,f,'necessary'),H(A,n.je),R(n.je,d,(()=>p([])))),n.je.innerHTML=S),x&&(n.qe||(n.qe=k(r),L(n.qe,'btn'),L(n.qe,'btn--secondary'),E(n.qe,f,'save'),H(N,n.qe),R(n.qe,d,(()=>p()))),n.qe.innerHTML=x),n.Pe&&(n.we.replaceChild(n.Pe,n.Je),n.Je=n.Pe),pe(1),o.N||(o.N=true,ee(m.re.ue,u,n.we),t(e),H(n.Ce,n.Fe),X(n.we),setTimeout((()=>V(n.Fe,'cc--anim')),100)),Z(2);};function be(e,t,o,n,a){const c=m.o,r=m.ne,l=k('label'),f=k('input'),_=k('span'),u=k('span'),p=k('span'),g=k('span'),v=k('span');if(g.innerHTML=W(1,3),v.innerHTML=W(0,3),f.type='checkbox',V(l,'section__toggle-wrapper'),V(f,'section__toggle'),V(g,'toggle__icon-on'),V(v,'toggle__icon-off'),V(_,'toggle__icon'),V(u,'toggle__icon-circle'),V(p,'toggle__label'),E(_,i,'true'),n?(V(l,'toggle-service'),E(f,s,a),r.se[a][t]=f):r.ae[t]=f,n?(e=>{R(f,'change',(()=>{const t=r.se[e],o=r.ae[e];c.Z[e]=[];for(let o in t){const n=t[o];n.checked&&c.Z[e].push(n.value);}o.checked=c.Z[e].length>0;}));})(a):(e=>{R(f,d,(()=>{const t=r.se[e],o=f.checked;c.Z[e]=[];for(let n in t)t[n].checked=o,o&&c.Z[e].push(n);}));})(t),f.value=t,p.textContent=e.replace(/<.*>.*<\/.*>/gm,''),H(u,v),H(u,g),H(_,u),c.D)(o.readOnly||o.enabled)&&(f.checked=true);else if(n){const e=c.Y[a];f.checked=o.readOnly||b(e,t);}else b(c.R,t)&&(f.checked=true);return o.readOnly&&(f.disabled=true),H(l,f),H(l,_),H(l,p),l}const ve=()=>{const e=k('span');return m.ne.Ke||(m.ne.Ke=e),e},ye=(e,t)=>{const o=m.o,n=m.ne,{hide:a,showPreferences:s,acceptCategory:u}=e,p=o.u&&o.u.consentModal;if(!p)return;const g=p.acceptAllBtn,b=p.acceptNecessaryBtn,v=p.showPreferencesBtn,y=p.closeIconLabel,h=p.footer,C=p.label,w=p.title,S=e=>{a(),u(e);};if(!n.Qe){n.Qe=k(c),n.he=k(c),n.We=k(c),n.Xe=k(c),n.Ye=k(c),V(n.Qe,'cm-wrapper'),V(n.he,'cm'),I(n.We,'body'),I(n.Xe,'texts'),I(n.Ye,'btns'),E(n.he,'role','dialog'),E(n.he,'aria-modal','true'),E(n.he,i,'false'),E(n.he,'aria-describedby','cm__desc'),C?E(n.he,'aria-label',C):w&&E(n.he,'aria-labelledby','cm__title');const e='box',t=o.i.guiOptions,a=t&&t.consentModal,s=(a&&a.layout||e).split(' ')[0]===e;w&&y&&s&&(n.Le||(n.Le=k(r),n.Le.innerHTML=W(),I(n.Le,'btn'),I(n.Le,'btn--close'),R(n.Le,d,(()=>{S([]);})),H(n.We,n.Le)),E(n.Le,'aria-label',y)),H(n.We,n.Xe),(g||b||v)&&H(n.We,n.Ye),n.be=k(c),E(n.be,'tabIndex',-1),H(n.he,n.be),H(n.he,n.We),H(n.Qe,n.he);}w&&(n.Ze||(n.Ze=k('h2'),n.Ze.className=n.Ze.id='cm__title',H(n.Xe,n.Ze)),n.Ze.innerHTML=w);let x=p.description;if(x&&(o.V&&(x=x.replace('{{revisionMessage}}',o.I?'':p.revisionMessage||'')),n.et||(n.et=k('p'),n.et.className=n.et.id='cm__desc',H(n.Xe,n.et)),n.et.innerHTML=x),g&&(n.tt||(n.tt=k(r),H(n.tt,ve()),I(n.tt,'btn'),E(n.tt,f,'all'),R(n.tt,d,(()=>{S('all');}))),n.tt.firstElementChild.innerHTML=g),b&&(n.Ie||(n.Ie=k(r),H(n.Ie,ve()),I(n.Ie,'btn'),E(n.Ie,f,'necessary'),R(n.Ie,d,(()=>{S([]);}))),n.Ie.firstElementChild.innerHTML=b),v&&(n.ot||(n.ot=k(r),H(n.ot,ve()),I(n.ot,'btn'),I(n.ot,'btn--secondary'),E(n.ot,f,'show'),R(n.ot,'mouseenter',(()=>{o.N||ge(e,t);})),R(n.ot,d,s)),n.ot.firstElementChild.innerHTML=v),n.nt||(n.nt=k(c),I(n.nt,l),g&&H(n.nt,n.tt),b&&H(n.nt,n.Ie),(g||b)&&H(n.We,n.nt),H(n.Ye,n.nt)),n.ot&&!n.st&&(n.st=k(c),n.Ie&&n.tt?(I(n.st,l),H(n.st,n.ot),H(n.Ye,n.st)):(H(n.nt,n.ot),I(n.nt,l+'--uneven'))),h){if(!n.ct){let e=k(c),t=k(c);n.ct=k(c),I(e,'footer'),I(t,'links'),I(n.ct,'link-group'),H(t,n.ct),H(e,t),H(n.he,e);}n.ct.innerHTML=h;}pe(0),o.T||(o.T=true,ee(m.re.ue,_,n.he),t(e),H(n.Ce,n.Qe),X(n.he),setTimeout((()=>V(n.Qe,'cc--anim')),100)),Z(1),U(n.We,e,ge,t);},he=e=>{if(!y(e))return null;if(e in m.o._)return e;let t=e.slice(0,2);return t in m.o._?t:null},Ce=()=>m.o.l||m.o.i.language.default,we=e=>{e&&(m.o.l=e);},Se=async e=>{const t=m.o;let o=he(e)?e:Ce(),n=t._[o];return y(n)?n=await(async e=>{try{const t=await fetch(e);return await t.json()}catch(e){return console.error(e),false}})(n):C(n)&&(n=await n()),!!n&&(t.u=n,we(o),true)},xe=()=>{let e=m.o.i.language.rtl,t=m.ne.Ce;e&&t&&(v(e)||(e=[e]),b(e,m.o.l)?V(t,'cc--rtl'):j(t,'cc--rtl'));},Me=()=>{const e=m.ne;if(e.Ce)return;e.Ce=k(c),e.Ce.id='cc-main',e.Ce.setAttribute('data-nosnippet',''),xe();let t=m.o.i.root;t&&y(t)&&(t=document.querySelector(t)),(t||e.$e.body).appendChild(e.Ce);},De=e=>te((()=>localStorage.removeItem(e))),Te=(e,t)=>{if(t instanceof RegExp)return e.filter((e=>t.test(e)));{const o=g(e,t);return o>-1?[e[o]]:[]}},ke=e=>{const{hostname:t,protocol:o}=location,{name:n,path:a,domain:s,sameSite:c,useLocalStorage:r}=m.t.cookie,i=864e5*B(),l=new Date;l.setTime(l.getTime()+i),m.o.p.expirationTime=l.getTime();const d=JSON.stringify(m.o.p);let f=n+'='+encodeURIComponent(d)+(0!==i?'; expires='+l.toUTCString():'')+'; Path='+a+'; SameSite='+c;b(t,'.')&&(f+='; Domain='+s),'https:'===o&&(f+='; Secure'),r?((e,t)=>{te((()=>localStorage.setItem(e,t)));})(n,d):document.cookie=f,m.o.p;},Ee=(e,t,o)=>{if(0===e.length)return;const n=o||m.t.cookie.domain,a=t||m.t.cookie.path,s='www.'===n.slice(0,4),c=s&&n.substring(4),r=(e,t)=>{document.cookie=e+'=; path='+a+(t?'; domain=.'+t:'')+'; expires=Thu, 01 Jan 1970 00:00:01 GMT;';};for(const t of e)r(t),r(t,n),s&&r(t,c);},Ae=e=>{const t=m.t.cookie.name,o=m.t.cookie.useLocalStorage;return ((e,t)=>{let o;return o=te((()=>JSON.parse(t?e:decodeURIComponent(e))),true)||{},o})(o?(n=t,te((()=>localStorage.getItem(n)))||''):Ne(t),o);var n;},Ne=(e,t)=>{const o=document.cookie.match('(^|;)\\s*'+e+'\\s*=\\s*([^;]+)');return o?o.pop():''},He=e=>{const t=document.cookie.split(/;\s*/),o=[];for(const n of t){let t=n.split('=')[0];o.push(t);}return o},Ve=(o,n=[])=>{((e,t)=>{const{O:o,R:n,B:a,N:s,Z:c,G:r,X:i}=m.o;let l=[];if(e){v(e)?l.push(...e):y(e)&&(l='all'===e?o:[e]);for(const e of o)c[e]=b(l,e)?w(i[e]):[];}else l=[...n,...r],s&&(l=(()=>{const e=m.ne.ae;if(!e)return [];let t=[];for(let o in e)e[o].checked&&t.push(o);return t})());l=l.filter((e=>!b(o,e)||!b(t,e))),l.push(...a),J(l);})(o,n),(e=>{const t=m.o,{Z:o,B:n,Y:a,X:s,O:c}=t,r=c;t.te=F(a);for(const e of r){const c=s[e],r=w(c),i=o[e]&&o[e].length>0,l=b(n,e);if(0!==r.length){if(a[e]=[],l)a[e].push(...r);else if(i){const t=o[e];a[e].push(...t);}else a[e]=t.Z[e];a[e]=S(a[e]);}}})(),(()=>{const o=m.o;o.L=m.t.mode===t&&o.D?G(o.G,o.R):G(o.R,o.p.categories);let n=o.L.length>0,a=false;for(const e of o.O)o.ee[e]=G(o.Y[e],o.te[e]),o.ee[e].length>0&&(a=true);const s=m.ne.ae;for(const e in s)s[e].checked=b(o.R,e);for(const e of o.O){const t=m.ne.se[e],n=o.Y[e];for(const e in t)t[e].checked=b(n,e);}o.C||(o.C=new Date),o.M||(o.M=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))),o.p={categories:F(o.R),revision:m.t.revision,data:o.h,consentTimestamp:o.C.toISOString(),consentId:o.M,services:F(o.Y)};let c=false;const r=n||a;(o.D||r)&&(o.D&&(o.D=false,c=true),o.S=o.S?new Date:o.C,o.p.lastConsentTimestamp=o.S.toISOString(),ke(),m.t.autoClearCookies&&(c||r)&&(e=>{const t=m.o,o=He(),n=(e=>{const t=m.o;return (e?t.O:t.L).filter((e=>{const o=t.P[e];return !!o&&!o.readOnly&&!!o.autoClear}))})(e);for(const e in t.ee)for(const n of t.ee[e]){const a=t.X[e][n].cookies;if(!b(t.Y[e],n)&&a)for(const e of a){const t=Te(o,e.name);Ee(t,e.path,e.domain);}}for(const a of n){const n=t.P[a].autoClear,s=n&&n.cookies||[],c=b(t.L,a),r=!b(t.R,a),i=c&&r;if(e?r:i){n.reloadPage&&i&&(t.j=true);for(const e of s){const t=Te(o,e.name);Ee(t,e.path,e.domain);}}}})(c),oe()),c&&(ee(m.re.ie),ee(m.re.le),m.t.mode===e)||(r&&ee(m.re.de),o.j&&(o.j=false,location.reload()));})();},Ie=e=>{const t=m.o.D?[]:m.o.R;return b(t,e)},je=(e,t)=>{const o=m.o.D?[]:m.o.Y[t]||[];return b(o,e)},Oe=e=>{const{ne:t,o:n}=m;if(!n.k){if(!n.T){if(!e)return;ye(Je,Me);}n.k=true,n.U=x(),n.v&&K(true),z(t.he,1),V(t.ye,o),E(t.he,i,'false'),setTimeout((()=>{$(m.ne.be);}),100),ee(m.re.fe,_);}},Re=()=>{const{ne:e,o:t,re:n}=m;t.k&&(t.k=false,t.v&&K(),$(e.Ke,true),j(e.ye,o),E(e.he,i,'true'),$(t.U),t.U=null,ee(n._e,_));},Be=()=>{const e=m.o;e.A||(e.N||ge(Je,Me),e.A=true,e.k?e.$=x():e.U=x(),z(m.ne.we,2),V(m.ne.ye,n),E(m.ne.we,i,'false'),setTimeout((()=>{$(m.ne.ve);}),100),ee(m.re.fe,u));},Ge=()=>{const e=m.o;e.A&&(e.A=false,(()=>{const e=We(),t=m.o.P,o=m.ne.ae,n=m.ne.se,a=e=>b(m.o.G,e);for(const s in o){const c=!!t[s].readOnly;o[s].checked=c||(e?Ie(s):a(s));for(const t in n[s])n[s][t].checked=c||(e?je(t,s):a(s));}})(),$(m.ne.Ge,true),j(m.ne.ye,n),E(m.ne.we,i,'true'),e.k?($(e.$),e.$=null):($(e.U),e.U=null),ee(m.re._e,u));};var Je={show:Oe,hide:Re,showPreferences:Be,hidePreferences:Ge,acceptCategory:Ve};const We=()=>!m.o.D,Xe=async e=>{const{o:o,t:n,re:a}=m,c=window;if(!c._ccRun){if(c._ccRun=true,(e=>{const{ne:o,t:n,o:a}=m,c=n,r=a,{cookie:i}=c,l=m.ce,d=e.cookie,f=e.categories,_=w(f)||[],u=navigator,p=document;o.$e=p,o.ye=p.documentElement,i.domain=location.hostname,r.i=e,r.P=f,r.O=_,r._=e.language.translations,r.v=!!e.disablePageInteraction,l.ie=e.onFirstConsent,l.le=e.onConsent,l.de=e.onChange,l._e=e.onModalHide,l.fe=e.onModalShow,l.ue=e.onModalReady;const{mode:g,autoShow:v,lazyHtmlGeneration:y,autoClearCookies:C,revision:S,manageScriptTags:x,hideFromBots:M}=e;g===t&&(c.mode=g),'boolean'==typeof C&&(c.autoClearCookies=C),'boolean'==typeof x&&(c.manageScriptTags=x),'number'==typeof S&&S>=0&&(c.revision=S,r.V=true),'boolean'==typeof v&&(c.autoShow=v),'boolean'==typeof y&&(c.lazyHtmlGeneration=y),false===M&&(c.hideFromBots=false),true===c.hideFromBots&&u&&(r.J=u.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(u.userAgent)||u.webdriver),h(d)&&(c.cookie={...i,...d}),c.autoClearCookies,r.V,c.manageScriptTags,(e=>{const{P:t,X:o,Y:n,Z:a,B:s}=m.o;for(let c of e){const e=t[c],r=e.services||{},i=h(r)&&w(r)||[];o[c]={},n[c]=[],a[c]=[],e.readOnly&&(s.push(c),n[c]=i),m.ne.se[c]={};for(let e of i){const t=r[e];t.Se=false,o[c][e]=t;}}})(_),(()=>{if(!m.t.manageScriptTags)return;const e=m.o,t=D(document,'script['+s+']');for(const o of t){let t=N(o,s),n=o.dataset.service||'',a=false;if(t&&'!'===t.charAt(0)&&(t=t.slice(1),a=true),'!'===n.charAt(0)&&(n=n.slice(1),a=true),b(e.O,t)&&(e.oe.push({Me:o,xe:false,ke:a,De:t,Te:n}),n)){const o=e.X[t];o[n]||(o[n]={Se:false});}}})(),we((()=>{const e=m.o.i.language.autoDetect;if(e){const t={browser:navigator.language,document:document.documentElement.lang},o=he(t[e]);if(o)return o}return Ce()})());})(e),o.J)return;(()=>{const e=m.o,o=m.t,n=Ae(),{categories:a,services:s,consentId:c,consentTimestamp:r,lastConsentTimestamp:i,data:l,revision:d}=n,f=v(a);e.p=n,e.M=c;const _=!!c&&y(c);e.C=r,e.C&&(e.C=new Date(r)),e.S=i,e.S&&(e.S=new Date(i)),e.h=undefined!==l?l:null,e.V&&_&&d!==o.revision&&(e.I=false),e.D=!(_&&e.I&&e.C&&e.S&&f),o.cookie.useLocalStorage&&!e.D&&(e.D=(new Date).getTime()>(n.expirationTime||0),e.D&&De(o.cookie.name)),e.D,(()=>{const e=m.o;for(const o of e.O){const n=e.P[o];if(n.readOnly||n.enabled){e.G.push(o);const n=e.X[o]||{};for(let a in n)e.Z[o].push(a),e.i.mode===t&&e.Y[o].push(a);}}})(),e.D?o.mode===t&&(e.R=[...e.G]):(e.Z={...e.Y},e.Y={...e.Y,...s},J([...e.B,...a]));})();const i=We();if(!await Se())return false;if(U(null,r=Je,ge,Me),m.o.D&&ye(r,Me),m.t.lazyHtmlGeneration||ge(r,Me),n.autoShow&&!i&&Oe(true),i)return oe(),ee(a.le);n.mode===t&&oe(o.G);}var r;};
|
|
12191
12198
|
|
|
12192
|
-
const
|
|
12193
|
-
const
|
|
12194
|
-
|
|
12195
|
-
|
|
12196
|
-
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12212
|
-
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12199
|
+
const getCookieBannerConfig = (lng, isClearly) => {
|
|
12200
|
+
const cookieDomain = getDomain();
|
|
12201
|
+
return {
|
|
12202
|
+
language: {
|
|
12203
|
+
default: lng,
|
|
12204
|
+
translations: getTranslations(isClearly),
|
|
12205
|
+
},
|
|
12206
|
+
cookie: {
|
|
12207
|
+
domain: cookieDomain,
|
|
12208
|
+
},
|
|
12209
|
+
guiOptions: {
|
|
12210
|
+
consentModal: { layout: "box wide", position: "bottom left" },
|
|
12211
|
+
preferencesModal: { layout: "bar" },
|
|
12212
|
+
},
|
|
12213
|
+
categories: {
|
|
12214
|
+
necessary: { enabled: true, readOnly: true },
|
|
12215
|
+
analytics: {
|
|
12216
|
+
enabled: true,
|
|
12217
|
+
readOnly: false,
|
|
12218
|
+
services: {
|
|
12219
|
+
ga: {
|
|
12220
|
+
label: "Google Analytics",
|
|
12221
|
+
onAccept: () => {
|
|
12222
|
+
gtag("consent", "update", {
|
|
12223
|
+
ad_storage: "granted",
|
|
12224
|
+
ad_user_data: "granted",
|
|
12225
|
+
ad_personalization: "granted",
|
|
12226
|
+
analytics_storage: "granted",
|
|
12227
|
+
});
|
|
12228
|
+
},
|
|
12229
|
+
onReject: () => {
|
|
12230
|
+
gtag("consent", "update", {
|
|
12231
|
+
ad_storage: "granted",
|
|
12232
|
+
ad_user_data: "granted",
|
|
12233
|
+
ad_personalization: "granted",
|
|
12234
|
+
analytics_storage: "granted",
|
|
12235
|
+
});
|
|
12236
|
+
},
|
|
12228
12237
|
},
|
|
12229
12238
|
},
|
|
12230
12239
|
},
|
|
12231
12240
|
},
|
|
12232
|
-
}
|
|
12233
|
-
}
|
|
12241
|
+
};
|
|
12242
|
+
};
|
|
12234
12243
|
const getTranslations = (isClearly) => ({
|
|
12235
12244
|
en: {
|
|
12236
12245
|
consentModal: {
|
|
@@ -12439,7 +12448,11 @@ class Analytics {
|
|
|
12439
12448
|
this.trackEvent(event?.eventName, event?.eventParams);
|
|
12440
12449
|
}
|
|
12441
12450
|
}
|
|
12442
|
-
trackEvent(eventName, properties
|
|
12451
|
+
trackEvent(eventName, properties, services = {
|
|
12452
|
+
ga: true,
|
|
12453
|
+
mixpanel: true,
|
|
12454
|
+
customerIO: true,
|
|
12455
|
+
}) {
|
|
12443
12456
|
if (!this.initialized) {
|
|
12444
12457
|
this.dataLayer.push({ eventName, eventParams: properties });
|
|
12445
12458
|
return;
|
|
@@ -12447,32 +12460,44 @@ class Analytics {
|
|
|
12447
12460
|
const commonParams = this.getCommonParams();
|
|
12448
12461
|
const allParams = { ...commonParams, ...properties };
|
|
12449
12462
|
// Mixpanel
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12463
|
+
if (services.mixpanel) {
|
|
12464
|
+
try {
|
|
12465
|
+
mixpanel.track(eventName, allParams);
|
|
12466
|
+
}
|
|
12467
|
+
catch (e) {
|
|
12468
|
+
console.log(e);
|
|
12469
|
+
}
|
|
12455
12470
|
}
|
|
12456
12471
|
// GA
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12472
|
+
if (services.ga) {
|
|
12473
|
+
try {
|
|
12474
|
+
const gaParams = {
|
|
12475
|
+
locale: commonParams.locale,
|
|
12476
|
+
platform: commonParams.platform,
|
|
12477
|
+
funnel_name: commonParams.funnel_name,
|
|
12478
|
+
funnel_type: commonParams.funnel_type,
|
|
12479
|
+
...properties,
|
|
12480
|
+
};
|
|
12481
|
+
if (GA_ECOMMERCE_EVENTS.includes(eventName)) {
|
|
12482
|
+
window.dataLayer.push({ ecommerce: null });
|
|
12483
|
+
}
|
|
12484
|
+
window.dataLayer.push({
|
|
12485
|
+
event: eventName,
|
|
12486
|
+
...gaParams,
|
|
12487
|
+
});
|
|
12488
|
+
}
|
|
12489
|
+
catch (e) {
|
|
12490
|
+
console.log(e);
|
|
12491
|
+
}
|
|
12469
12492
|
}
|
|
12470
12493
|
// Customer.io
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12494
|
+
if (services.customerIO) {
|
|
12495
|
+
try {
|
|
12496
|
+
window.analytics.track(eventName, allParams);
|
|
12497
|
+
}
|
|
12498
|
+
catch (e) {
|
|
12499
|
+
console.log(e);
|
|
12500
|
+
}
|
|
12476
12501
|
}
|
|
12477
12502
|
}
|
|
12478
12503
|
setUser(userId, userParams) {
|
package/dist/index.js
CHANGED
|
@@ -11948,6 +11948,13 @@ const GA_SERVER_CONTAINER_URL = "https://tagging.clearly.help";
|
|
|
11948
11948
|
const MIXPANEL_TOKEN = "9d4cb3d213e5aee689ea01dd68ad65ad";
|
|
11949
11949
|
const CUSTOMER_IO_WRITE_KEY = "e6d009719c77519432c3";
|
|
11950
11950
|
const SUPPORTED_LANGUAGES = ["en", "uk", "pl", "es", "ru"];
|
|
11951
|
+
const GA_ECOMMERCE_EVENTS = [
|
|
11952
|
+
"view_item_list",
|
|
11953
|
+
"select_item",
|
|
11954
|
+
"view_item",
|
|
11955
|
+
"begin_checkout",
|
|
11956
|
+
"add_payment_info",
|
|
11957
|
+
];
|
|
11951
11958
|
|
|
11952
11959
|
const setQueryParam = (name, value) => {
|
|
11953
11960
|
const url = new URL(window.location.href);
|
|
@@ -12191,48 +12198,50 @@ const storeGeoParam = () => {
|
|
|
12191
12198
|
*/
|
|
12192
12199
|
const e='opt-in',t='opt-out',o='show--consent',n='show--preferences',a='disable--interaction',s='data-category',c='div',r='button',i='aria-hidden',l='btn-group',d='click',f='data-role',_='consentModal',u='preferencesModal';class p{constructor(){this.t={mode:e,revision:0,autoShow:true,lazyHtmlGeneration:true,autoClearCookies:true,manageScriptTags:true,hideFromBots:true,cookie:{name:'cc_cookie',expiresAfterDays:182,domain:'',path:'/',sameSite:'Lax'}},this.o={i:{},l:'',_:{},u:{},p:{},m:[],v:false,h:null,C:null,S:null,M:'',D:true,T:false,k:false,A:false,N:false,H:[],V:false,I:true,L:[],j:false,F:'',P:false,O:[],R:[],B:[],G:[],J:false,U:false,$:false,q:[],K:[],W:[],X:{},Y:{},Z:{},ee:{},te:{},oe:[]},this.ne={ae:{},se:{}},this.ce={},this.re={ie:'cc:onFirstConsent',le:'cc:onConsent',de:'cc:onChange',fe:'cc:onModalShow',_e:'cc:onModalHide',ue:'cc:onModalReady'};}}const m=new p,g=(e,t)=>e.indexOf(t),b=(e,t)=>-1!==g(e,t),v=e=>Array.isArray(e),y=e=>'string'==typeof e,h=e=>!!e&&'object'==typeof e&&!v(e),C=e=>'function'==typeof e,w=e=>Object.keys(e),S=e=>Array.from(new Set(e)),x=()=>document.activeElement,M=e=>e.preventDefault(),D=(e,t)=>e.querySelectorAll(t),k=e=>{const t=document.createElement(e);return e===r&&(t.type=e),t},E=(e,t,o)=>e.setAttribute(t,o),A=(e,t,o)=>{e.removeAttribute(o?'data-'+t:t);},N=(e,t,o)=>e.getAttribute(o?'data-'+t:t),H=(e,t)=>e.appendChild(t),V=(e,t)=>e.classList.add(t),I=(e,t)=>V(e,'cm__'+t),L=(e,t)=>V(e,'pm__'+t),j=(e,t)=>e.classList.remove(t),F=e=>{if('object'!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());let t=Array.isArray(e)?[]:{};for(let o in e){let n=e[o];t[o]=F(n);}return t},O=(e,t)=>dispatchEvent(new CustomEvent(e,{detail:t})),R=(e,t,o,n)=>{e.addEventListener(t,o),n&&m.o.m.push({pe:e,me:t,ge:o});},B=()=>{const e=m.t.cookie.expiresAfterDays;return C(e)?e(m.o.F):e},G=(e,t)=>{const o=e||[],n=t||[];return o.filter((e=>!b(n,e))).concat(n.filter((e=>!b(o,e))))},J=e=>{m.o.R=S(e),m.o.F=(()=>{let e='custom';const{R:t,O:o,B:n}=m.o,a=t.length;return a===o.length?e='all':a===n.length&&(e='necessary'),e})();},U=(e,t,o,n)=>{const a='accept-',{show:s,showPreferences:c,hide:r,hidePreferences:i,acceptCategory:l}=t,f=e||document,_=e=>D(f,`[data-cc="${e}"]`),u=(e,t)=>{M(e),l(t),i(),r();},p=_('show-preferencesModal'),g=_('show-consentModal'),b=_(a+'all'),v=_(a+'necessary'),y=_(a+'custom'),h=m.t.lazyHtmlGeneration;for(const e of p)E(e,'aria-haspopup','dialog'),R(e,d,(e=>{M(e),c();})),h&&(R(e,'mouseenter',(e=>{M(e),m.o.N||o(t,n);}),true),R(e,'focus',(()=>{m.o.N||o(t,n);})));for(let e of g)E(e,'aria-haspopup','dialog'),R(e,d,(e=>{M(e),s(true);}),true);for(let e of b)R(e,d,(e=>{u(e,'all');}),true);for(let e of y)R(e,d,(e=>{u(e);}),true);for(let e of v)R(e,d,(e=>{u(e,[]);}),true);},$=(e,t)=>{e&&(t&&(e.tabIndex=-1),e.focus(),t&&e.removeAttribute('tabindex'));},z=(e,t)=>{const o=n=>{n.target.removeEventListener('transitionend',o),'opacity'===n.propertyName&&'1'===getComputedStyle(e).opacity&&$((e=>1===e?m.ne.be:m.ne.ve)(t));};R(e,'transitionend',o);};let q;const K=e=>{clearTimeout(q),e?V(m.ne.ye,a):q=setTimeout((()=>{j(m.ne.ye,a);}),500);},Q=['M 19.5 4.5 L 4.5 19.5 M 4.5 4.501 L 19.5 19.5','M 3.572 13.406 L 8.281 18.115 L 20.428 5.885','M 21.999 6.94 L 11.639 17.18 L 2.001 6.82 '],W=(e=0,t=1.5)=>`<svg viewBox="0 0 24 24" stroke-width="${t}"><path d="${Q[e]}"/></svg>`,X=e=>{const t=m.ne,o=m.o;(e=>{const n=e===t.he,a=o.i.disablePageInteraction?t.ye:n?t.Ce:t.ye;R(a,'keydown',(t=>{if('Tab'!==t.key||!(n?o.k&&!o.A:o.A))return;const a=x(),s=n?o.q:o.K;0!==s.length&&(t.shiftKey?a!==s[0]&&e.contains(a)||(M(t),$(s[1])):a!==s[1]&&e.contains(a)||(M(t),$(s[0])));}),true);})(e);},Y=['[href]',r,'input','details','[tabindex]'].map((e=>e+':not([tabindex="-1"])')).join(','),Z=e=>{const{o:t,ne:o}=m,n=(e,t)=>{const o=D(e,Y);t[0]=o[0],t[1]=o[o.length-1];};1===e&&t.T&&n(o.he,t.q),2===e&&t.N&&n(o.we,t.K);},ee=(e,t,o)=>{const{de:n,le:a,ie:s,_e:c,ue:r,fe:i}=m.ce,l=m.re;if(t){const n={modalName:t};return e===l.fe?C(i)&&i(n):e===l._e?C(c)&&c(n):(n.modal=o,C(r)&&r(n)),O(e,n)}const d={cookie:m.o.p};e===l.ie?C(s)&&s(F(d)):e===l.le?C(a)&&a(F(d)):(d.changedCategories=m.o.L,d.changedServices=m.o.ee,C(n)&&n(F(d))),O(e,F(d));},te=(e,t)=>{try{return e()}catch(e){return !t&&console.warn('CookieConsent:',e),false}},oe=e=>{const{Y:t,ee:o,O:n,X:a,oe:c,p:r,L:i}=m.o;for(const e of n){const n=o[e]||t[e]||[];for(const o of n){const n=a[e][o];if(!n)continue;const{onAccept:s,onReject:c}=n;!n.Se&&b(t[e],o)?(n.Se=true,C(s)&&s()):n.Se&&!b(t[e],o)&&(n.Se=false,C(c)&&c());}}if(!m.t.manageScriptTags)return;const l=c,d=e||r.categories||[],f=(e,n)=>{if(n>=e.length)return;const a=c[n];if(a.xe)return f(e,n+1);const r=a.Me,l=a.De,_=a.Te,u=b(d,l),p=!!_&&b(t[l],_);if(!_&&!a.ke&&u||!_&&a.ke&&!u&&b(i,l)||_&&!a.ke&&p||_&&a.ke&&!p&&b(o[l]||[],_)){a.xe=true;const t=N(r,'type',true);A(r,'type',!!t),A(r,s);let o=N(r,'src',true);o&&A(r,'src',true);const c=k('script');c.textContent=r.innerHTML;for(const{nodeName:e}of r.attributes)E(c,e,r[e]||N(r,e));t&&(c.type=t),o?c.src=o:o=r.src;const i=!!o&&(!t||['text/javascript','module'].includes(t));if(i&&(c.onload=c.onerror=()=>{f(e,++n);}),r.replaceWith(c),i)return}f(e,++n);};f(l,0);},ne='bottom',ae='left',se='center',ce='right',re='inline',ie='wide',le='pm--',de=['middle','top',ne],fe=[ae,se,ce],_e={box:{Ee:[ie,re],Ae:de,Ne:fe,He:ne,Ve:ce},cloud:{Ee:[re],Ae:de,Ne:fe,He:ne,Ve:se},bar:{Ee:[re],Ae:de.slice(1),Ne:[],He:ne,Ve:''}},ue={box:{Ee:[],Ae:[],Ne:[],He:'',Ve:''},bar:{Ee:[ie],Ae:[],Ne:[ae,ce],He:'',Ve:ae}},pe=e=>{const t=m.o.i.guiOptions,o=t&&t.consentModal,n=t&&t.preferencesModal;0===e&&me(m.ne.he,_e,o,'cm--','box','cm'),1===e&&me(m.ne.we,ue,n,le,'box','pm');},me=(e,t,o,n,a,s)=>{e.className=s;const c=o&&o.layout,r=o&&o.position,i=o&&o.flipButtons,l=!o||false!==o.equalWeightButtons,d=c&&c.split(' ')||[],f=d[0],_=d[1],u=f in t?f:a,p=t[u],g=b(p.Ee,_)&&_,v=r&&r.split(' ')||[],y=v[0],h=n===le?v[0]:v[1],C=b(p.Ae,y)?y:p.He,w=b(p.Ne,h)?h:p.Ve,S=t=>{t&&V(e,n+t);};S(u),S(g),S(C),S(w),i&&S('flip');const x=s+'__btn--secondary';if('cm'===s){const{Ie:e,Le:t}=m.ne;e&&(l?j(e,x):V(e,x)),t&&(l?j(t,x):V(t,x));}else {const{je:e}=m.ne;e&&(l?j(e,x):V(e,x));}},ge=(e,t)=>{const o=m.o,n=m.ne,{hide:a,hidePreferences:s,acceptCategory:_}=e,p=e=>{_(e),s(),a();},g=o.u&&o.u.preferencesModal;if(!g)return;const b=g.title,v=g.closeIconLabel,C=g.acceptAllBtn,S=g.acceptNecessaryBtn,x=g.savePreferencesBtn,M=g.sections||[],D=C||S||x;if(n.Fe)n.Pe=k(c),L(n.Pe,'body');else {n.Fe=k(c),V(n.Fe,'pm-wrapper');const e=k('div');V(e,'pm-overlay'),H(n.Fe,e),R(e,d,s),n.we=k(c),V(n.we,'pm'),E(n.we,'role','dialog'),E(n.we,i,true),E(n.we,'aria-modal',true),E(n.we,'aria-labelledby','pm__title'),R(n.ye,'keydown',(e=>{27===e.keyCode&&s();}),true),n.Oe=k(c),L(n.Oe,'header'),n.Re=k('h2'),L(n.Re,'title'),n.Re.id='pm__title',n.Be=k(r),L(n.Be,'close-btn'),E(n.Be,'aria-label',g.closeIconLabel||''),R(n.Be,d,s),n.Ge=k('span'),n.Ge.innerHTML=W(),H(n.Be,n.Ge),n.Je=k(c),L(n.Je,'body'),n.Ue=k(c),L(n.Ue,'footer');var T=k(c);V(T,'btns');var A=k(c),N=k(c);L(A,l),L(N,l),H(n.Ue,A),H(n.Ue,N),H(n.Oe,n.Re),H(n.Oe,n.Be),n.ve=k(c),E(n.ve,'tabIndex',-1),H(n.we,n.ve),H(n.we,n.Oe),H(n.we,n.Je),D&&H(n.we,n.Ue),H(n.Fe,n.we);}let I;b&&(n.Re.innerHTML=b,v&&E(n.Be,'aria-label',v)),M.forEach(((e,t)=>{const a=e.title,s=e.description,l=e.linkedCategory,f=l&&o.P[l],_=e.cookieTable,u=_&&_.body,p=_&&_.caption,m=u&&u.length>0,b=!!f,v=b&&o.X[l],C=h(v)&&w(v)||[],S=b&&(!!s||!!m||w(v).length>0);var x=k(c);if(L(x,'section'),S||s){var M=k(c);L(M,'section-desc-wrapper');}let D=C.length;if(S&&D>0){const e=k(c);L(e,'section-services');for(const t of C){const o=v[t],n=o&&o.label||t,a=k(c),s=k(c),r=k(c),i=k(c);L(a,'service'),L(i,'service-title'),L(s,'service-header'),L(r,'service-icon');const d=be(n,t,f,true,l);i.innerHTML=n,H(s,r),H(s,i),H(a,s),H(a,d),H(e,a);}H(M,e);}if(a){var T=k(c),A=k(b?r:c);if(L(T,'section-title-wrapper'),L(A,'section-title'),A.innerHTML=a,H(T,A),b){const e=k('span');e.innerHTML=W(2,3.5),L(e,'section-arrow'),H(T,e),x.className+='--toggle';const t=be(a,l,f);let o=g.serviceCounterLabel;if(D>0&&y(o)){let e=k('span');L(e,'badge'),L(e,'service-counter'),E(e,i,true),E(e,'data-servicecounter',D),o&&(o=o.split('|'),o=o.length>1&&D>1?o[1]:o[0],E(e,'data-counterlabel',o)),e.innerHTML=D+(o?' '+o:''),H(A,e);}if(S){L(x,'section--expandable');var N=l+'-desc';E(A,'aria-expanded',false),E(A,'aria-controls',N);}H(T,t);}else E(A,'role','heading'),E(A,'aria-level','3');H(x,T);}if(s){var F=k('p');L(F,'section-desc'),F.innerHTML=s,H(M,F);}if(S&&(E(M,i,'true'),M.id=N,((e,t,o)=>{R(A,d,(()=>{t.classList.contains('is-expanded')?(j(t,'is-expanded'),E(o,'aria-expanded','false'),E(e,i,'true')):(V(t,'is-expanded'),E(o,'aria-expanded','true'),E(e,i,'false'));}));})(M,x,A),m)){const e=k('table'),o=k('thead'),a=k('tbody');if(p){const t=k('caption');L(t,'table-caption'),t.innerHTML=p,e.appendChild(t);}L(e,'section-table'),L(o,'table-head'),L(a,'table-body');const s=_.headers,r=w(s),i=n.$e.createDocumentFragment(),l=k('tr');for(const e of r){const o=s[e],n=k('th');n.id='cc__row-'+o+t,E(n,'scope','col'),L(n,'table-th'),n.innerHTML=o,H(i,n);}H(l,i),H(o,l);const d=n.$e.createDocumentFragment();for(const e of u){const o=k('tr');L(o,'table-tr');for(const n of r){const a=s[n],r=e[n],i=k('td'),l=k(c);L(i,'table-td'),E(i,'data-column',a),E(i,'headers','cc__row-'+a+t),l.insertAdjacentHTML('beforeend',r),H(i,l),H(o,i);}H(d,o);}H(a,d),H(e,o),H(e,a),H(M,e);}(S||s)&&H(x,M);const P=n.Pe||n.Je;b?(I||(I=k(c),L(I,'section-toggles')),I.appendChild(x)):I=null,H(P,I||x);})),C&&(n.ze||(n.ze=k(r),L(n.ze,'btn'),E(n.ze,f,'all'),H(A,n.ze),R(n.ze,d,(()=>p('all')))),n.ze.innerHTML=C),S&&(n.je||(n.je=k(r),L(n.je,'btn'),E(n.je,f,'necessary'),H(A,n.je),R(n.je,d,(()=>p([])))),n.je.innerHTML=S),x&&(n.qe||(n.qe=k(r),L(n.qe,'btn'),L(n.qe,'btn--secondary'),E(n.qe,f,'save'),H(N,n.qe),R(n.qe,d,(()=>p()))),n.qe.innerHTML=x),n.Pe&&(n.we.replaceChild(n.Pe,n.Je),n.Je=n.Pe),pe(1),o.N||(o.N=true,ee(m.re.ue,u,n.we),t(e),H(n.Ce,n.Fe),X(n.we),setTimeout((()=>V(n.Fe,'cc--anim')),100)),Z(2);};function be(e,t,o,n,a){const c=m.o,r=m.ne,l=k('label'),f=k('input'),_=k('span'),u=k('span'),p=k('span'),g=k('span'),v=k('span');if(g.innerHTML=W(1,3),v.innerHTML=W(0,3),f.type='checkbox',V(l,'section__toggle-wrapper'),V(f,'section__toggle'),V(g,'toggle__icon-on'),V(v,'toggle__icon-off'),V(_,'toggle__icon'),V(u,'toggle__icon-circle'),V(p,'toggle__label'),E(_,i,'true'),n?(V(l,'toggle-service'),E(f,s,a),r.se[a][t]=f):r.ae[t]=f,n?(e=>{R(f,'change',(()=>{const t=r.se[e],o=r.ae[e];c.Z[e]=[];for(let o in t){const n=t[o];n.checked&&c.Z[e].push(n.value);}o.checked=c.Z[e].length>0;}));})(a):(e=>{R(f,d,(()=>{const t=r.se[e],o=f.checked;c.Z[e]=[];for(let n in t)t[n].checked=o,o&&c.Z[e].push(n);}));})(t),f.value=t,p.textContent=e.replace(/<.*>.*<\/.*>/gm,''),H(u,v),H(u,g),H(_,u),c.D)(o.readOnly||o.enabled)&&(f.checked=true);else if(n){const e=c.Y[a];f.checked=o.readOnly||b(e,t);}else b(c.R,t)&&(f.checked=true);return o.readOnly&&(f.disabled=true),H(l,f),H(l,_),H(l,p),l}const ve=()=>{const e=k('span');return m.ne.Ke||(m.ne.Ke=e),e},ye=(e,t)=>{const o=m.o,n=m.ne,{hide:a,showPreferences:s,acceptCategory:u}=e,p=o.u&&o.u.consentModal;if(!p)return;const g=p.acceptAllBtn,b=p.acceptNecessaryBtn,v=p.showPreferencesBtn,y=p.closeIconLabel,h=p.footer,C=p.label,w=p.title,S=e=>{a(),u(e);};if(!n.Qe){n.Qe=k(c),n.he=k(c),n.We=k(c),n.Xe=k(c),n.Ye=k(c),V(n.Qe,'cm-wrapper'),V(n.he,'cm'),I(n.We,'body'),I(n.Xe,'texts'),I(n.Ye,'btns'),E(n.he,'role','dialog'),E(n.he,'aria-modal','true'),E(n.he,i,'false'),E(n.he,'aria-describedby','cm__desc'),C?E(n.he,'aria-label',C):w&&E(n.he,'aria-labelledby','cm__title');const e='box',t=o.i.guiOptions,a=t&&t.consentModal,s=(a&&a.layout||e).split(' ')[0]===e;w&&y&&s&&(n.Le||(n.Le=k(r),n.Le.innerHTML=W(),I(n.Le,'btn'),I(n.Le,'btn--close'),R(n.Le,d,(()=>{S([]);})),H(n.We,n.Le)),E(n.Le,'aria-label',y)),H(n.We,n.Xe),(g||b||v)&&H(n.We,n.Ye),n.be=k(c),E(n.be,'tabIndex',-1),H(n.he,n.be),H(n.he,n.We),H(n.Qe,n.he);}w&&(n.Ze||(n.Ze=k('h2'),n.Ze.className=n.Ze.id='cm__title',H(n.Xe,n.Ze)),n.Ze.innerHTML=w);let x=p.description;if(x&&(o.V&&(x=x.replace('{{revisionMessage}}',o.I?'':p.revisionMessage||'')),n.et||(n.et=k('p'),n.et.className=n.et.id='cm__desc',H(n.Xe,n.et)),n.et.innerHTML=x),g&&(n.tt||(n.tt=k(r),H(n.tt,ve()),I(n.tt,'btn'),E(n.tt,f,'all'),R(n.tt,d,(()=>{S('all');}))),n.tt.firstElementChild.innerHTML=g),b&&(n.Ie||(n.Ie=k(r),H(n.Ie,ve()),I(n.Ie,'btn'),E(n.Ie,f,'necessary'),R(n.Ie,d,(()=>{S([]);}))),n.Ie.firstElementChild.innerHTML=b),v&&(n.ot||(n.ot=k(r),H(n.ot,ve()),I(n.ot,'btn'),I(n.ot,'btn--secondary'),E(n.ot,f,'show'),R(n.ot,'mouseenter',(()=>{o.N||ge(e,t);})),R(n.ot,d,s)),n.ot.firstElementChild.innerHTML=v),n.nt||(n.nt=k(c),I(n.nt,l),g&&H(n.nt,n.tt),b&&H(n.nt,n.Ie),(g||b)&&H(n.We,n.nt),H(n.Ye,n.nt)),n.ot&&!n.st&&(n.st=k(c),n.Ie&&n.tt?(I(n.st,l),H(n.st,n.ot),H(n.Ye,n.st)):(H(n.nt,n.ot),I(n.nt,l+'--uneven'))),h){if(!n.ct){let e=k(c),t=k(c);n.ct=k(c),I(e,'footer'),I(t,'links'),I(n.ct,'link-group'),H(t,n.ct),H(e,t),H(n.he,e);}n.ct.innerHTML=h;}pe(0),o.T||(o.T=true,ee(m.re.ue,_,n.he),t(e),H(n.Ce,n.Qe),X(n.he),setTimeout((()=>V(n.Qe,'cc--anim')),100)),Z(1),U(n.We,e,ge,t);},he=e=>{if(!y(e))return null;if(e in m.o._)return e;let t=e.slice(0,2);return t in m.o._?t:null},Ce=()=>m.o.l||m.o.i.language.default,we=e=>{e&&(m.o.l=e);},Se=async e=>{const t=m.o;let o=he(e)?e:Ce(),n=t._[o];return y(n)?n=await(async e=>{try{const t=await fetch(e);return await t.json()}catch(e){return console.error(e),false}})(n):C(n)&&(n=await n()),!!n&&(t.u=n,we(o),true)},xe=()=>{let e=m.o.i.language.rtl,t=m.ne.Ce;e&&t&&(v(e)||(e=[e]),b(e,m.o.l)?V(t,'cc--rtl'):j(t,'cc--rtl'));},Me=()=>{const e=m.ne;if(e.Ce)return;e.Ce=k(c),e.Ce.id='cc-main',e.Ce.setAttribute('data-nosnippet',''),xe();let t=m.o.i.root;t&&y(t)&&(t=document.querySelector(t)),(t||e.$e.body).appendChild(e.Ce);},De=e=>te((()=>localStorage.removeItem(e))),Te=(e,t)=>{if(t instanceof RegExp)return e.filter((e=>t.test(e)));{const o=g(e,t);return o>-1?[e[o]]:[]}},ke=e=>{const{hostname:t,protocol:o}=location,{name:n,path:a,domain:s,sameSite:c,useLocalStorage:r}=m.t.cookie,i=864e5*B(),l=new Date;l.setTime(l.getTime()+i),m.o.p.expirationTime=l.getTime();const d=JSON.stringify(m.o.p);let f=n+'='+encodeURIComponent(d)+(0!==i?'; expires='+l.toUTCString():'')+'; Path='+a+'; SameSite='+c;b(t,'.')&&(f+='; Domain='+s),'https:'===o&&(f+='; Secure'),r?((e,t)=>{te((()=>localStorage.setItem(e,t)));})(n,d):document.cookie=f,m.o.p;},Ee=(e,t,o)=>{if(0===e.length)return;const n=o||m.t.cookie.domain,a=t||m.t.cookie.path,s='www.'===n.slice(0,4),c=s&&n.substring(4),r=(e,t)=>{document.cookie=e+'=; path='+a+(t?'; domain=.'+t:'')+'; expires=Thu, 01 Jan 1970 00:00:01 GMT;';};for(const t of e)r(t),r(t,n),s&&r(t,c);},Ae=e=>{const t=m.t.cookie.name,o=m.t.cookie.useLocalStorage;return ((e,t)=>{let o;return o=te((()=>JSON.parse(t?e:decodeURIComponent(e))),true)||{},o})(o?(n=t,te((()=>localStorage.getItem(n)))||''):Ne(t),o);var n;},Ne=(e,t)=>{const o=document.cookie.match('(^|;)\\s*'+e+'\\s*=\\s*([^;]+)');return o?o.pop():''},He=e=>{const t=document.cookie.split(/;\s*/),o=[];for(const n of t){let t=n.split('=')[0];o.push(t);}return o},Ve=(o,n=[])=>{((e,t)=>{const{O:o,R:n,B:a,N:s,Z:c,G:r,X:i}=m.o;let l=[];if(e){v(e)?l.push(...e):y(e)&&(l='all'===e?o:[e]);for(const e of o)c[e]=b(l,e)?w(i[e]):[];}else l=[...n,...r],s&&(l=(()=>{const e=m.ne.ae;if(!e)return [];let t=[];for(let o in e)e[o].checked&&t.push(o);return t})());l=l.filter((e=>!b(o,e)||!b(t,e))),l.push(...a),J(l);})(o,n),(e=>{const t=m.o,{Z:o,B:n,Y:a,X:s,O:c}=t,r=c;t.te=F(a);for(const e of r){const c=s[e],r=w(c),i=o[e]&&o[e].length>0,l=b(n,e);if(0!==r.length){if(a[e]=[],l)a[e].push(...r);else if(i){const t=o[e];a[e].push(...t);}else a[e]=t.Z[e];a[e]=S(a[e]);}}})(),(()=>{const o=m.o;o.L=m.t.mode===t&&o.D?G(o.G,o.R):G(o.R,o.p.categories);let n=o.L.length>0,a=false;for(const e of o.O)o.ee[e]=G(o.Y[e],o.te[e]),o.ee[e].length>0&&(a=true);const s=m.ne.ae;for(const e in s)s[e].checked=b(o.R,e);for(const e of o.O){const t=m.ne.se[e],n=o.Y[e];for(const e in t)t[e].checked=b(n,e);}o.C||(o.C=new Date),o.M||(o.M=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))),o.p={categories:F(o.R),revision:m.t.revision,data:o.h,consentTimestamp:o.C.toISOString(),consentId:o.M,services:F(o.Y)};let c=false;const r=n||a;(o.D||r)&&(o.D&&(o.D=false,c=true),o.S=o.S?new Date:o.C,o.p.lastConsentTimestamp=o.S.toISOString(),ke(),m.t.autoClearCookies&&(c||r)&&(e=>{const t=m.o,o=He(),n=(e=>{const t=m.o;return (e?t.O:t.L).filter((e=>{const o=t.P[e];return !!o&&!o.readOnly&&!!o.autoClear}))})(e);for(const e in t.ee)for(const n of t.ee[e]){const a=t.X[e][n].cookies;if(!b(t.Y[e],n)&&a)for(const e of a){const t=Te(o,e.name);Ee(t,e.path,e.domain);}}for(const a of n){const n=t.P[a].autoClear,s=n&&n.cookies||[],c=b(t.L,a),r=!b(t.R,a),i=c&&r;if(e?r:i){n.reloadPage&&i&&(t.j=true);for(const e of s){const t=Te(o,e.name);Ee(t,e.path,e.domain);}}}})(c),oe()),c&&(ee(m.re.ie),ee(m.re.le),m.t.mode===e)||(r&&ee(m.re.de),o.j&&(o.j=false,location.reload()));})();},Ie=e=>{const t=m.o.D?[]:m.o.R;return b(t,e)},je=(e,t)=>{const o=m.o.D?[]:m.o.Y[t]||[];return b(o,e)},Oe=e=>{const{ne:t,o:n}=m;if(!n.k){if(!n.T){if(!e)return;ye(Je,Me);}n.k=true,n.U=x(),n.v&&K(true),z(t.he,1),V(t.ye,o),E(t.he,i,'false'),setTimeout((()=>{$(m.ne.be);}),100),ee(m.re.fe,_);}},Re=()=>{const{ne:e,o:t,re:n}=m;t.k&&(t.k=false,t.v&&K(),$(e.Ke,true),j(e.ye,o),E(e.he,i,'true'),$(t.U),t.U=null,ee(n._e,_));},Be=()=>{const e=m.o;e.A||(e.N||ge(Je,Me),e.A=true,e.k?e.$=x():e.U=x(),z(m.ne.we,2),V(m.ne.ye,n),E(m.ne.we,i,'false'),setTimeout((()=>{$(m.ne.ve);}),100),ee(m.re.fe,u));},Ge=()=>{const e=m.o;e.A&&(e.A=false,(()=>{const e=We(),t=m.o.P,o=m.ne.ae,n=m.ne.se,a=e=>b(m.o.G,e);for(const s in o){const c=!!t[s].readOnly;o[s].checked=c||(e?Ie(s):a(s));for(const t in n[s])n[s][t].checked=c||(e?je(t,s):a(s));}})(),$(m.ne.Ge,true),j(m.ne.ye,n),E(m.ne.we,i,'true'),e.k?($(e.$),e.$=null):($(e.U),e.U=null),ee(m.re._e,u));};var Je={show:Oe,hide:Re,showPreferences:Be,hidePreferences:Ge,acceptCategory:Ve};const We=()=>!m.o.D,Xe=async e=>{const{o:o,t:n,re:a}=m,c=window;if(!c._ccRun){if(c._ccRun=true,(e=>{const{ne:o,t:n,o:a}=m,c=n,r=a,{cookie:i}=c,l=m.ce,d=e.cookie,f=e.categories,_=w(f)||[],u=navigator,p=document;o.$e=p,o.ye=p.documentElement,i.domain=location.hostname,r.i=e,r.P=f,r.O=_,r._=e.language.translations,r.v=!!e.disablePageInteraction,l.ie=e.onFirstConsent,l.le=e.onConsent,l.de=e.onChange,l._e=e.onModalHide,l.fe=e.onModalShow,l.ue=e.onModalReady;const{mode:g,autoShow:v,lazyHtmlGeneration:y,autoClearCookies:C,revision:S,manageScriptTags:x,hideFromBots:M}=e;g===t&&(c.mode=g),'boolean'==typeof C&&(c.autoClearCookies=C),'boolean'==typeof x&&(c.manageScriptTags=x),'number'==typeof S&&S>=0&&(c.revision=S,r.V=true),'boolean'==typeof v&&(c.autoShow=v),'boolean'==typeof y&&(c.lazyHtmlGeneration=y),false===M&&(c.hideFromBots=false),true===c.hideFromBots&&u&&(r.J=u.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(u.userAgent)||u.webdriver),h(d)&&(c.cookie={...i,...d}),c.autoClearCookies,r.V,c.manageScriptTags,(e=>{const{P:t,X:o,Y:n,Z:a,B:s}=m.o;for(let c of e){const e=t[c],r=e.services||{},i=h(r)&&w(r)||[];o[c]={},n[c]=[],a[c]=[],e.readOnly&&(s.push(c),n[c]=i),m.ne.se[c]={};for(let e of i){const t=r[e];t.Se=false,o[c][e]=t;}}})(_),(()=>{if(!m.t.manageScriptTags)return;const e=m.o,t=D(document,'script['+s+']');for(const o of t){let t=N(o,s),n=o.dataset.service||'',a=false;if(t&&'!'===t.charAt(0)&&(t=t.slice(1),a=true),'!'===n.charAt(0)&&(n=n.slice(1),a=true),b(e.O,t)&&(e.oe.push({Me:o,xe:false,ke:a,De:t,Te:n}),n)){const o=e.X[t];o[n]||(o[n]={Se:false});}}})(),we((()=>{const e=m.o.i.language.autoDetect;if(e){const t={browser:navigator.language,document:document.documentElement.lang},o=he(t[e]);if(o)return o}return Ce()})());})(e),o.J)return;(()=>{const e=m.o,o=m.t,n=Ae(),{categories:a,services:s,consentId:c,consentTimestamp:r,lastConsentTimestamp:i,data:l,revision:d}=n,f=v(a);e.p=n,e.M=c;const _=!!c&&y(c);e.C=r,e.C&&(e.C=new Date(r)),e.S=i,e.S&&(e.S=new Date(i)),e.h=undefined!==l?l:null,e.V&&_&&d!==o.revision&&(e.I=false),e.D=!(_&&e.I&&e.C&&e.S&&f),o.cookie.useLocalStorage&&!e.D&&(e.D=(new Date).getTime()>(n.expirationTime||0),e.D&&De(o.cookie.name)),e.D,(()=>{const e=m.o;for(const o of e.O){const n=e.P[o];if(n.readOnly||n.enabled){e.G.push(o);const n=e.X[o]||{};for(let a in n)e.Z[o].push(a),e.i.mode===t&&e.Y[o].push(a);}}})(),e.D?o.mode===t&&(e.R=[...e.G]):(e.Z={...e.Y},e.Y={...e.Y,...s},J([...e.B,...a]));})();const i=We();if(!await Se())return false;if(U(null,r=Je,ge,Me),m.o.D&&ye(r,Me),m.t.lazyHtmlGeneration||ge(r,Me),n.autoShow&&!i&&Oe(true),i)return oe(),ee(a.le);n.mode===t&&oe(o.G);}var r;};
|
|
12193
12200
|
|
|
12194
|
-
const
|
|
12195
|
-
const
|
|
12196
|
-
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12212
|
-
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
|
|
12201
|
+
const getCookieBannerConfig = (lng, isClearly) => {
|
|
12202
|
+
const cookieDomain = getDomain();
|
|
12203
|
+
return {
|
|
12204
|
+
language: {
|
|
12205
|
+
default: lng,
|
|
12206
|
+
translations: getTranslations(isClearly),
|
|
12207
|
+
},
|
|
12208
|
+
cookie: {
|
|
12209
|
+
domain: cookieDomain,
|
|
12210
|
+
},
|
|
12211
|
+
guiOptions: {
|
|
12212
|
+
consentModal: { layout: "box wide", position: "bottom left" },
|
|
12213
|
+
preferencesModal: { layout: "bar" },
|
|
12214
|
+
},
|
|
12215
|
+
categories: {
|
|
12216
|
+
necessary: { enabled: true, readOnly: true },
|
|
12217
|
+
analytics: {
|
|
12218
|
+
enabled: true,
|
|
12219
|
+
readOnly: false,
|
|
12220
|
+
services: {
|
|
12221
|
+
ga: {
|
|
12222
|
+
label: "Google Analytics",
|
|
12223
|
+
onAccept: () => {
|
|
12224
|
+
gtag("consent", "update", {
|
|
12225
|
+
ad_storage: "granted",
|
|
12226
|
+
ad_user_data: "granted",
|
|
12227
|
+
ad_personalization: "granted",
|
|
12228
|
+
analytics_storage: "granted",
|
|
12229
|
+
});
|
|
12230
|
+
},
|
|
12231
|
+
onReject: () => {
|
|
12232
|
+
gtag("consent", "update", {
|
|
12233
|
+
ad_storage: "granted",
|
|
12234
|
+
ad_user_data: "granted",
|
|
12235
|
+
ad_personalization: "granted",
|
|
12236
|
+
analytics_storage: "granted",
|
|
12237
|
+
});
|
|
12238
|
+
},
|
|
12230
12239
|
},
|
|
12231
12240
|
},
|
|
12232
12241
|
},
|
|
12233
12242
|
},
|
|
12234
|
-
}
|
|
12235
|
-
}
|
|
12243
|
+
};
|
|
12244
|
+
};
|
|
12236
12245
|
const getTranslations = (isClearly) => ({
|
|
12237
12246
|
en: {
|
|
12238
12247
|
consentModal: {
|
|
@@ -12441,7 +12450,11 @@ class Analytics {
|
|
|
12441
12450
|
this.trackEvent(event?.eventName, event?.eventParams);
|
|
12442
12451
|
}
|
|
12443
12452
|
}
|
|
12444
|
-
trackEvent(eventName, properties
|
|
12453
|
+
trackEvent(eventName, properties, services = {
|
|
12454
|
+
ga: true,
|
|
12455
|
+
mixpanel: true,
|
|
12456
|
+
customerIO: true,
|
|
12457
|
+
}) {
|
|
12445
12458
|
if (!this.initialized) {
|
|
12446
12459
|
this.dataLayer.push({ eventName, eventParams: properties });
|
|
12447
12460
|
return;
|
|
@@ -12449,32 +12462,44 @@ class Analytics {
|
|
|
12449
12462
|
const commonParams = this.getCommonParams();
|
|
12450
12463
|
const allParams = { ...commonParams, ...properties };
|
|
12451
12464
|
// Mixpanel
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12465
|
+
if (services.mixpanel) {
|
|
12466
|
+
try {
|
|
12467
|
+
mixpanel.track(eventName, allParams);
|
|
12468
|
+
}
|
|
12469
|
+
catch (e) {
|
|
12470
|
+
console.log(e);
|
|
12471
|
+
}
|
|
12457
12472
|
}
|
|
12458
12473
|
// GA
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12470
|
-
|
|
12474
|
+
if (services.ga) {
|
|
12475
|
+
try {
|
|
12476
|
+
const gaParams = {
|
|
12477
|
+
locale: commonParams.locale,
|
|
12478
|
+
platform: commonParams.platform,
|
|
12479
|
+
funnel_name: commonParams.funnel_name,
|
|
12480
|
+
funnel_type: commonParams.funnel_type,
|
|
12481
|
+
...properties,
|
|
12482
|
+
};
|
|
12483
|
+
if (GA_ECOMMERCE_EVENTS.includes(eventName)) {
|
|
12484
|
+
window.dataLayer.push({ ecommerce: null });
|
|
12485
|
+
}
|
|
12486
|
+
window.dataLayer.push({
|
|
12487
|
+
event: eventName,
|
|
12488
|
+
...gaParams,
|
|
12489
|
+
});
|
|
12490
|
+
}
|
|
12491
|
+
catch (e) {
|
|
12492
|
+
console.log(e);
|
|
12493
|
+
}
|
|
12471
12494
|
}
|
|
12472
12495
|
// Customer.io
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12496
|
+
if (services.customerIO) {
|
|
12497
|
+
try {
|
|
12498
|
+
window.analytics.track(eventName, allParams);
|
|
12499
|
+
}
|
|
12500
|
+
catch (e) {
|
|
12501
|
+
console.log(e);
|
|
12502
|
+
}
|
|
12478
12503
|
}
|
|
12479
12504
|
}
|
|
12480
12505
|
setUser(userId, userParams) {
|