PageSourceSearch

https://aim-marseille.com/assets/integrations-CqceqF4F.js

js aim-marseille.com collected 2026-10-07 19:58:49 UTC 53,300 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c967b098-d6b9-58fb-97de-0aa792d10946")}catch(e){}}();
3(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`957799e333d598017a2d2d4ed92bf005b56442cc`}}catch{}})();import{r as e,t}from"./rolldown-runtime-Fiwq2WwH.js";import{St as n,l as r,t as i,w as a}from"./jsx-runtime-dmi5BDXN.js";import{O as o,R as s,X as c,s as l}from"./button-CLyrfXdv.js";import{i as u,v as d}from"./schemas-Cg17vaMl.js";import{t as f}from"./input-CnS53fBy.js";import{i as p,n as m}from"./zod-kpNn6x4G.js";import{n as h}from"./nonce-provider-BpIGkqxx.js";import{t as g}from"./user-BxCpkdsP.js";import{t as _}from"./v7-CjWzYQlD.js";import{t as v}from"./repeatable-BJX7LOEX.js";var y=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=function(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}:typeof define==`function`&&define.amd?define(function(){return function(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}}):n.dlv=function(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}})(e)})),b=e(n(),1),x=i(),ee=e(y(),1),te=`function`,ne=`string`,S=`undefined`,C=`boolean`,re=`array`,ie=`symbol`,ae=`null`,oe=`form`,w=`input`,T=`button`,se=`select`,E=typeof process<`u`?process:{};E.env&&E.env.NODE_ENV;var D=typeof document!==S;D&&window.location.hostname,E.versions!=null&&E.versions.node,typeof Deno<`u`&&Deno.core,typeof self==`object`&&self.constructor&&self.constructor.name,D&&window.name===`nodejs`||typeof navigator<`u`&&navigator.userAgent!==void 0&&(navigator.userAgent.includes(`Node.js`)||navigator.userAgent.includes(`jsdom`));function ce(e,t){return t.charAt(0)[e]()+t.slice(1)}var le=ce.bind(null,`toUpperCase`),ue=ce.bind(null,`toLowerCase`);function de(e){return me(e)?le(ae):typeof e==`object`?ve(e):Object.prototype.toString.call(e).slice(8,-1)}function fe(e,t){t===void 0&&(t=!0);var n=de(e);return t?ue(n):n}function O(e,t){return typeof t===e}var k=O.bind(null,te),A=O.bind(null,ne),j=O.bind(null,S),pe=O.bind(null,C);O.bind(null,ie);function me(e){return e===null}function he(e){return fe(e)===`number`&&!isNaN(e)}function ge(e){return fe(e)===re}function M(e){if(!_e(e))return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _e(e){return e&&(typeof e==`object`||e!==null)}function ve(e){return k(e.constructor)?e.constructor.name:null}function ye(e){return e instanceof Error||A(e.message)&&e.constructor&&he(e.constructor.stackTraceLimit)}function be(e,t){if(typeof t!=`object`||me(t))return!1;if(t instanceof e)return!0;var n=fe(new e(``));if(ye(t))for(;t;){if(fe(t)===n)return!0;t=Object.getPrototypeOf(t)}return!1}be.bind(null,TypeError),be.bind(null,SyntaxError);function xe(e,t){var n=e instanceof Element||e instanceof HTMLDocument;return n&&t?Se(e,t):n}function Se(e,t){return t===void 0&&(t=``),e&&e.nodeName===t.toUpperCase()}function Ce(e){var t=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(t))}}Ce(xe,oe),Ce(xe,T),Ce(xe,w),Ce(xe,se);function we(e){try{return decodeURIComponent(e.replace(/\+/g,` `))}catch{return null}}function Te(){if(D){var e=navigator,t=e.languages;return e.userLanguage||(t&&t.length?t[0]:e.language)}}function Ee(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function De(e){return function(e){for(var t,n=Object.create(null),r=/([^&=]+)=?([^&]*)/g;t=r.exec(e);){var i=we(t[1]),a=we(t[2]);if(i){if(i.substring(i.length-2)===`[]`){var o=n[i=i.substring(0,i.length-2)]||(n[i]=[]);n[i]=Array.isArray(o)?o:[],n[i].push(a)}else n[i]=a===``||a}}for(var s in n){var c=s.split(`[`);c.length>1&&(Oe(n,c.map(function(e){return e.replace(/[?[\]\\ ]/g,``)}),n[s]),delete n[s])}return n}(function(e){if(e){var t=e.match(/\?(.*)/);return t&&t[1]?t[1].split(`#`)[0]:``}return D&&window.location.search.substring(1)}(e))}function Oe(e,t,n){for(var r=t.length-1,i=0;i<r;++i){var a=t[i];if(a===`__proto__`||a===`constructor`)break;a in e||(e[a]={}),e=e[a]}e[t[r]]=n}function ke(){for(var e=``,t=0,n=4294967295*Math.random()|0;t++<36;){var r=`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`[t-1],i=15&n;e+=r==`-`||r==`4`?r:(r==`x`?i:3&i|8).toString(16),n=t%8==0?4294967295*Math.random()|0:n>>4}return e}var Ae=`global`,N=`__`+Ae+`__`,P=typeof self==`object`&&self.self===self&&self||typeof global==`object`&&global.global===global&&global||void 0;function F(e){return P[N][e]}function I(e,t){return P[N][e]=t}function L(e){delete P[N][e]}function R(e,t,n){var r;try{if(Me(e)){var i=window[e];r=i[t].bind(i)}}catch{}return r||n}P[N]||(P[N]={});var je={};function Me(e){if(je[e]!==void 0)return je[e];try{var t=window[e];t.setItem(S,S),t.removeItem(S)}catch{return je[e]=!1}return je[e]=!0}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(null,arguments)}var B=`function`,V=`undefined`,H=`reducer`,Ne=`@@redux/`,Pe=Ne+`INIT`,Fe=Ne+Math.random().toString(36),Ie=function(){return typeof Symbol===B&&Symbol.observable||`@@observable`}(),Le=` != `+B;function Re(e,t,n){var r;if(typeof t===B&&typeof n===V&&(n=t,t=void 0),typeof n!==V){if(typeof n!==B)throw Error(`enhancer`+Le);return n(Re)(e,t)}if(typeof e!==B)throw Error(H+Le);var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){return a}function d(e){if(typeof e!==B)throw Error(`Listener`+Le);var t=!0;return l(),s.push(e),function(){if(t){t=!1,l();var n=s.indexOf(e);s.splice(n,1)}}}function f(e){if(!M(e))throw Error(`Act != obj`);if(typeof e.type===V)throw Error(`ActType `+V);if(c)throw Error(`Dispatch in `+H);try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++)(0,t[n])();return e}return f({type:Pe}),(r={dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if(typeof e!==B)throw Error(`next `+H+Le);i=e,f({type:Pe})}})[Ie]=function(){var e,t=d;return(e={subscribe:function(e){if(typeof e!=`object`)throw TypeError(`Observer != obj`);function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[Ie]=function(){return this},e},r}function ze(e,t){var n=t&&t.type;return`action `+(n&&n.toString()||`?`)+H+` `+e+` returns `+V}function U(){var e=[].slice.call(arguments);return e.length===0?function(e){return e}:e.length===1?e[0]:e.reduce(function(e,t){return function(){return e(t.apply(void 0,[].slice.call(arguments)))}})}function Be(){var e=arguments;return function(t){return function(n,r,i){var a,o=t(n,r,i),s=o.dispatch,c={getState:o.getState,dispatch:function(e){return s(e)}};return a=[].slice.call(e).map(function(e){return e(c)}),z({},o,{dispatch:s=U.apply(void 0,a)(o.dispatch)})}}}var W=`__anon_id`,G=`__user_id`,K=`__user_traits`,Ve=`analytics`,q=`userId`,J=`anonymousId`,He=`bootstrap.params.campaign.initializeStart.initialize.initializeEnd.ready.resetStart.reset.resetEnd.pageStart.page.pageEnd.pageAborted.trackStart.track.trackEnd.trackAborted.identifyStart.identify.identifyEnd.identifyAborted.userIdChanged.registerPlugins.enablePlugin.disablePlugin.online.offline.setItemStart.setItem.setItemEnd.setItemAborted.removeItemStart.removeItem.removeItemEnd.removeItemAborted`.split(`.`),Ue=[`name`,`EVENTS`,`config`,`loaded`],Y=He.reduce(function(e,t){return e[t]=t,e},{registerPluginType:function(e){return`registerPlugin:`+e},pluginReadyType:function(e){return`ready:`+e}}),We=/^utm_/,Ge=/^an_prop_/,Ke=/^an_trait_/;function qe(e){var t=e.storage.setItem;return function(n){return function(r){return function(i){if(i.type===Y.bootstrap){var a=i.params,o=i.user,s=i.persistedUser,c=i.initialUser,l=s.userId===o.userId;s.anonymousId!==o.anonymousId&&t(W,o.anonymousId),l||t(G,o.userId),c.traits&&t(K,z({},l&&s.traits?s.traits:{},c.traits));var u=Object.keys(i.params);if(u.length){var d=a.an_uid,f=a.an_event,p=u.reduce(function(e,t){if(t.match(We)||t.match(/^(d|g)clid/)){var n=t.replace(We,``);e.campaign[n===`campaign`?`name`:n]=a[t]}return t.match(Ge)&&(e.props[t.replace(Ge,``)]=a[t]),t.match(Ke)&&(e.traits[t.replace(Ke,``)]=a[t]),e},{campaign:{},props:{},traits:{}});n.dispatch(z({type:Y.params,raw:a},p,d?{userId:d}:{})),d&&setTimeout(function(){return e.identify(d,p.traits)},0),f&&setTimeout(function(){return e.track(f,p.props)},0),Object.keys(p.campaign).length&&n.dispatch({type:Y.campaign,campaign:p.campaign})}}return r(i)}}}}function Je(e){return function(t,n){if(t===void 0&&(t={}),n===void 0&&(n={}
3),n.type===Y.setItemEnd){if(n.key===W)return z({},t,{anonymousId:n.value});if(n.key===G)return z({},t,{userId:n.value})}switch(n.type){case Y.identify:return Object.assign({},t,{userId:n.userId,traits:z({},t.traits,n.traits)});case Y.reset:return[G,W,K].forEach(function(t){e.removeItem(t)}),Object.assign({},t,{userId:null,anonymousId:null,traits:{}});default:return t}}}function Ye(e){return{userId:e.getItem(G),anonymousId:e.getItem(W),traits:e.getItem(K)}}var Xe=function(e){return`__TEMP__`+e};function Ze(e){var t=e.storage,n=t.setItem,r=t.removeItem,i=t.getItem;return function(e){return function(t){return function(a){var o=a.userId,s=a.traits,c=a.options;if(a.type===Y.reset&&([G,K,W].forEach(function(e){r(e)}),[q,J,`traits`].forEach(function(e){L(Xe(e))})),a.type===Y.identify){i(W)||n(W,ke());var l=i(G),u=i(K)||{};l&&l!==o&&e.dispatch({type:Y.userIdChanged,old:{userId:l,traits:u},new:{userId:o,traits:s},options:c}),o&&n(G,o),s&&n(K,z({},u,s))}return t(a)}}}}var Qe={};function $e(e,t){Qe[e]&&k(Qe[e])&&(Qe[e](t),delete Qe[e])}function et(e,t,n){return new Promise(function(r,i){return t()?r(e):n<1?i(z({},e,{queue:!0})):new Promise(function(e){return setTimeout(e,10)}).then(function(a){return et(e,t,n-10).then(r,i)})})}function tt(e){return{abort:e}}function nt(e,t,n){var r={},i=t(),a=e.getState(),o=a.plugins,s=a.queue,c=a.user;if(!a.context.offline&&s&&s.actions&&s.actions.length){var l=s.actions.reduce(function(e,t,n){return o[t.plugin].loaded?(e.process.push(t),e.processIndex.push(n)):(e.requeue.push(t),e.requeueIndex.push(n)),e},{processIndex:[],process:[],requeue:[],requeueIndex:[]});l.processIndex&&l.processIndex.length&&(l.processIndex.forEach(function(t){var a=s.actions[t],l=a.plugin,u=a.payload.type,d=i[l][u];if(d&&k(d)){var f,p=function(e,t){return e===void 0&&(e={}),t===void 0&&(t={}),[q,J].reduce(function(n,r){return e.hasOwnProperty(r)&&t[r]&&t[r]!==e[r]&&(n[r]=t[r]),n},e)}(a.payload,c),m=r[p.meta.rid];if(!m&&(f=d({payload:p,config:o[l].config,instance:n,abort:tt}))&&M(f)&&f.abort)return void(r[p.meta.rid]=!0);if(!m){var h=u+`:`+l;e.dispatch(z({},p,{type:h,_:{called:h,from:`queueDrain`}}))}}}),s.actions=s.actions.filter(function(e,t){return!~l.processIndex.indexOf(t)}))}}var rt=function(e){var t=e.data,n=e.action,r=e.instance,i=e.state,a=e.allPlugins,o=e.allMatches,s=e.store,c=e.EVENTS;try{var l=i.plugins,u=i.context,d=n.type,f=d.match(X),p=t.exact.map(function(e){return e.pluginName});f&&(p=o.during.map(function(e){return e.pluginName}));var m=function(e,t){return function(n,r,i){var a=r.config,o=r.name,s=o+`.`+n.type;i&&(s=i.event);var c=n.type.match(X)?function(e,t,n,r,i){return function(a,o){var s=r?r.name:e,c=o&&ft(o)?o:n;if(r&&(!(c=o&&ft(o)?o:[e]).includes(e)||c.length!==1))throw Error(`Method `+t+` can only abort `+e+` plugin. `+JSON.stringify(c)+` input valid`);return z({},i,{abort:{reason:a,plugins:c,caller:t,_:s}})}}(o,s,t,i,n):function(e,t){return function(){throw Error(e.type+` action not cancellable. Remove abort in `+t)}}(n,s);return{payload:ht(n),instance:e,config:a||{},abort:c}}}(r,p),h=t.exact.reduce(function(e,t){var n=t.pluginName,r=t.methodName,i=!1;return r.match(/^initialize/)||r.match(/^reset/)||(i=!l[n].loaded),u.offline&&r.match(/^(page|track|identify)/)&&(i=!0),e[``+n]=i,e},{});return Promise.resolve(t.exact.reduce(function(e,i,o){var s=i.pluginName;return Promise.resolve(e).then(function(e){function i(){return Promise.resolve(e)}var o=function(){if(t.namespaced&&t.namespaced[s])return Promise.resolve(t.namespaced[s].reduce(function(e,t,n){return Promise.resolve(e).then(function(e){return t.method&&k(t.method)?(function(e,t){var n=mt(e);if(n&&n.name===t){var r=mt(n.method);throw Error([t+` plugin is calling method `+e,`Plugins cant call self`,`Use `+n.method+` `+(r?`or `+r.method:``)+` in `+t+` plugin insteadof `+e].join(`
4`))}}(t.methodName,t.pluginName),Promise.resolve(t.method({payload:e,instance:r,abort:(n=e,i=s,o=t.pluginName,function(e,t){return z({},n,{abort:{reason:e,plugins:t||[i],caller:d,from:o||i}})}),config:st(t.pluginName,l,a),plugins:l})).then(function(t){var n=M(t)?t:{};return Promise.resolve(z({},e,n))}
4)):e;var n,i,o})},Promise.resolve(n))).then(function(t){e[s]=t});e[s]=n}();return o&&o.then?o.then(i):i()})},Promise.resolve({}))).then(function(e){return Promise.resolve(t.exact.reduce(function(n,i,o){try{var c=t.exact.length===o+1,u=i.pluginName,p=a[u];return Promise.resolve(n).then(function(t){var n=e[u]?e[u]:{};if(f&&(n=t),ut(n,u))return ot({data:n,method:d,instance:r,pluginName:u,store:s}),Promise.resolve(t);if(ut(t,u))return c&&ot({data:t,method:d,instance:r,store:s}),Promise.resolve(t);if(h.hasOwnProperty(u)&&!0===h[u])return s.dispatch({type:`queue`,plugin:u,payload:n,_:{called:`queue`,from:`queueMechanism`}}),Promise.resolve(t);var i=m(e[u],a[u]);return Promise.resolve(p[d]({abort:i.abort,payload:n,instance:r,config:st(u,l,a),plugins:l})).then(function(i){var a=M(i)?i:{},o=z({},t,a),c=e[u];if(ut(c,u))ot({data:c,method:d,instance:r,pluginName:u,store:s});else{var l=d+`:`+u;(l.match(/:/g)||[]).length<2&&!d.match(it)&&!d.match(at)&&r.dispatch(z({},f?o:n,{type:l,_:{called:l,from:`submethod`}}))}return Promise.resolve(o)})})}catch(e){return Promise.reject(e)}},Promise.resolve(n))).then(function(e){if(!(d.match(X)||d.match(/^registerPlugin/)||d.match(at)||d.match(it)||d.match(/^params/)||d.match(/^userIdChanged/))){if(c.plugins.includes(d),e._&&e._.originalAction===d)return e;var n=z({},e,{_:{originalAction:e.type,called:e.type,from:`engineEnd`}});dt(e,t.exact.length)&&!d.match(/End$/)&&(n=z({},n,{type:e.type+`Aborted`})),s.dispatch(n)}return e})})}catch(e){return Promise.reject(e)}},X=/Start$/,it=/^bootstrap/,at=/^ready/;function ot(e){var t=e.pluginName,n=e.method+`Aborted`+(t?`:`+t:``);e.store.dispatch(z({},e.data,{type:n,_:{called:n,from:`abort`}}))}function st(e,t,n){var r=t[e]||n[e];return r&&r.config?r.config:{}}function ct(e,t){return t.reduce(function(t,n){return n[e]?t.concat({methodName:e,pluginName:n.name,method:n[e]}):t},[])}function lt(e,t){var n=e.replace(X,``),r=t?`:`+t:``;return[``+e+r,``+n+r,n+`End`+r]}function ut(e,t){var n=e.abort;return!!n&&(!0===n||pt(n,t)||n&&pt(n.plugins,t))}function dt(e,t){var n=e.abort;if(!n)return!1;if(!0===n||A(n))return!0;var r=n.plugins;return ft(n)&&n.length===t||ft(r)&&r.length===t}function ft(e){return Array.isArray(e)}function pt(e,t){return!(!e||!ft(e))&&e.includes(t)}function mt(e){var t=e.match(/(.*):(.*)/);return!!t&&{method:t[1],name:t[2]}}function ht(e){return Object.keys(e).reduce(function(t,n){return n===`type`||(t[n]=M(e[n])?Object.assign({},e[n]):e[n]),t},{})}function gt(e,t,n){var r={};return function(i){return function(a){return function(o){try{var s,c=function(e){return s?e:a(d)},l=o.type,u=o.plugins,d=o;if(o.abort)return Promise.resolve(a(o));if(l===Y.enablePlugin&&i.dispatch({type:Y.initializeStart,plugins:u,disabled:[],fromEnable:!0,meta:o.meta}),l===Y.disablePlugin&&setTimeout(function(){return $e(o.meta.rid,{payload:o})},0),l===Y.initializeEnd){var f=t(),p=Object.keys(f),m=p.filter(function(e){return u.includes(e)}).map(function(e){return f[e]}),h=[],g=[],_=o.disabled,v=m.map(function(e){var t=e.loaded,n=e.name,a=e.config;return et(e,function(){return t({config:a})},1e4).then(function(t){return r[n]||(i.dispatch({type:Y.pluginReadyType(n),name:n,events:Object.keys(e).filter(function(e){return!Ue.includes(e)})}),r[n]=!0),h=h.concat(n),e}).catch(function(e){if(e instanceof Error)throw Error(e);return g=g.concat(e.name),e})});Promise.all(v).then(function(e){var t={plugins:h,failed:g,disabled:_};setTimeout(function(){p.length===v.length+_.length&&i.dispatch(z({},{type:Y.ready},t))},0)})}var y=function(){if(l!==Y.bootstrap)return/^ready:([^:]*)$/.test(l)&&setTimeout(function(){return nt(i,t,e)},0),Promise.resolve(function(e,t,n,r,i){try{var a=k(t)?t():t,o=e.type,s=o.replace(X,``);if(e._&&e._.called)return Promise.resolve(e);var c=n.getState(),l=(f=a,(p=c.plugins)===void 0&&(p={}),(m=e.options)===void 0&&(m={}),Object.keys(f).filter(function(e){var t=m.plugins||{};return pe(t[e])?t[e]:!1!==t.all&&(!p[e]||!1!==p[e].enabled)}).map(function(e){return f[e]}));o===Y.initializeStart&&e.fromEnable&&(l=Object.keys(c.plugins).filter(function(t){var n=c.plugins[t];return e.plugins.includes(t)&&!n.initialized}).map(function(e){return a[e]}));var u=l.map(function(e){return e.name}),d=function(e,t){var n=lt(e).map(function(e){return ct(e,t)});
4return t.reduce(function(n,r){var i=r.name,a=lt(e,i).map(function(e){return ct(e,t)}),o=a[0],s=a[1],c=a[2];return o.length&&(n.beforeNS[i]=o),s.length&&(n.duringNS[i]=s),c.length&&(n.afterNS[i]=c),n},{before:n[0],beforeNS:{},during:n[1],duringNS:{},after:n[2],afterNS:{}})}(o,l);return Promise.resolve(rt({action:e,data:{exact:d.before,namespaced:d.beforeNS},state:c,allPlugins:a,allMatches:d,instance:n,store:r,EVENTS:i})).then(function(e){function t(){var t=function(){if(o.match(X))return Promise.resolve(rt({action:z({},l,{type:s+`End`}),data:{exact:d.after,namespaced:d.afterNS},state:c,allPlugins:a,allMatches:d,instance:n,store:r,EVENTS:i})).then(function(e){e.meta&&e.meta.hasCallback&&$e(e.meta.rid,{payload:e})})}();return t&&t.then?t.then(function(){return e}):e}if(dt(e,u.length))return e;var l,f=function(){if(o!==s)return Promise.resolve(rt({action:z({},e,{type:s}),data:{exact:d.during,namespaced:d.duringNS},state:c,allPlugins:a,allMatches:d,instance:n,store:r,EVENTS:i})).then(function(e){l=e});l=e}();return f&&f.then?f.then(t):t()})}catch(e){return Promise.reject(e)}var f,p,m}(o,t,e,i,n)).then(function(e){var t=a(e);return s=1,t})}();return Promise.resolve(y&&y.then?y.then(c):c(y))}catch(e){return Promise.reject(e)}}}}}function _t(e){return function(t){return function(t){return function(n){var r=n.type,i=n.key,a=n.value,o=n.options;if(r===Y.setItem||r===Y.removeItem){if(n.abort)return t(n);r===Y.setItem?e.setItem(i,a,o):e.removeItem(i,o)}return t(n)}}}}var vt=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(t,n){e[n]=e[n].concat(t)},this.removeMiddleware=function(t,n){var r=e[n].findIndex(function(e){return e===t});r!==-1&&(e[n]=[].concat(e[n].slice(0,r),e[n].slice(r+1)))},this.dynamicMiddlewares=function(t){return function(n){return function(r){return function(i){var a={getState:n.getState,dispatch:function(e){return n.dispatch(e)}},o=e[t].map(function(e){return e(a)});return U.apply(void 0,o)(r)(i)}}}}};function yt(e){return function(t,n){t===void 0&&(t={});var r={};if(n.type===`initialize:aborted`)return t;if(/^registerPlugin:([^:]*)$/.test(n.type)){var i=bt(n.type,`registerPlugin`),a=e()[i];if(!a||!i)return t;var o=n.enabled,s=a.config;return r[i]={enabled:o,initialized:!!o&&!a.initialize,loaded:!!o&&!!a.loaded({config:s}),config:s},z({},t,r)}if(/^initialize:([^:]*)$/.test(n.type)){var c=bt(n.type,Y.initialize),l=e()[c];return l&&c?(r[c]=z({},t[c],{initialized:!0,loaded:!!l.loaded({config:l.config})}),z({},t,r)):t}if(/^ready:([^:]*)$/.test(n.type))return r[n.name]=z({},t[n.name],{loaded:!0}),z({},t,r);switch(n.type){case Y.disablePlugin:return z({},t,xt(n.plugins,!1,t));case Y.enablePlugin:return z({},t,xt(n.plugins,!0,t));default:return t}}}function bt(e,t){return e.substring(t.length+1,e.length)}function xt(e,t,n){return e.reduce(function(e,r){return e[r]=z({},n[r],{enabled:t}),e},n)}function St(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var Ct={last:{},history:[]};function wt(e,t){e===void 0&&(e=Ct);var n=t.options,r=t.meta;if(t.type===Y.track){var i=St(z({event:t.event,properties:t.properties},Object.keys(n).length&&{options:n},{meta:r}));return z({},e,{last:i,history:e.history.concat(i)})}return e}var Tt={actions:[]};function Et(e,t){e===void 0&&(e=Tt);var n=t.payload;switch(t.type){case`queue`:var r;return r=n&&n.type&&n.type===Y.identify?[t].concat(e.actions):e.actions.concat(t),z({},e,{actions:r});case`dequeue`:return[];default:return e}}var Dt=/#.*$/;function Ot(e){var t=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return`/`+(t&&t[3]?t[3].split(`?`)[0].replace(Dt,``):``)}var kt,At,jt,Mt,Nt=function(e){if(e===void 0&&(e={}),!D)return e;var t=document,n=t.title,r=t.referrer,i=window,a=i.location,o=i.innerWidth,s=i.innerHeight,c=a.hash,l=a.search,u=function(e){var t=function(){if(D){for(var e,t=document.getElementsByTagName(`link`),n=0;e=t[n];n++)if(e.getAttribute(`rel`)===`canonical`)return e.getAttribute(`href`)}}();return t?t.match(/\?/)?t:t+e:window.location.href.replace(Dt,``)}(l),d={title:n,url:u,path:Ot(u),hash:c,search:l,width:o,height:s};return r&&r!==``&&(d.referrer=r),z({},d,e)},Pt={last:{},history:[]};function Ft(e,t){e===void 0&&(e=Pt);var n=t.options;if(t.type===Y.page){var r=St(z({properties:t.properties,meta:t.meta},Object.keys(n).length&&{options:n}));return z({},e,{last:r,history:e.history.concat(r)})}return e}kt=function(){if(!D)return!1;var e=navigator.appVersion;return~e.indexOf(`Win`)?`Windows`:~e.indexOf(`Mac`)?`MacOS`:~e.indexOf(`X11`)?`UNIX`:~e.indexOf(`Linux`)?`Linux`:`Unknown OS`}(),At=D?document.referrer:null,jt=Te(),Mt=Ee();var It={initialized:!1,sessionId:ke(),app:null,version:null,debug:!1,offline:!!D&&!navigator.onLine,os:{name:kt},userAgent:D?navigator.userAgent:`node`,library:{name:Ve,version:`0.13.1`},timezone:Mt,locale:jt,campaign:{},referrer:At};function Lt(e,t){e===void 0&&(e=It);var n=e.initialized,r=t.campaign;switch(t.type){case Y.campaign:return z({},e,{campaign:r});case Y.offline:return z({},e,{offline:!0});case Y.online:return z({},e,{offline:!1});default:return n?e:z({},It,e,{initialized:!0})}}var Rt=[`plugins`,`reducers`,`storage`];function zt(e,t,n){if(D){var r=window[(n?`add`:`remove`)+`EventListener`];e.split(` `).forEach(function(e){r(e,t)})}}function Bt(e){var t=zt.bind(null,`online offline`,function(t){return Promise.resolve(!navigator.onLine).then(e)});return t(!0),function(e){return t(!1)}}function Vt(){return I(Ve,[]),function(e){return function(t,n,r){var i=e(t,n,r),a=i.dispatch;return Object.assign(i,{dispatch:function(e){return P[N][Ve].push(e.action||e),a(e)}})}}}function Ht(e){return function(){return U(U.apply(null,arguments),Vt())}}function Ut(e){return e?ge(e)?e:[e]:[]}function Wt(e,t,n){e===void 0&&(e={});var r,i,a=ke();return t&&(Qe[a]=(r=t,i=function(e){for(var t,n=e||Array.prototype.slice.call(arguments),r=0;r<n.length;r++)if(k(n[r])){t=n[r];break}return t}(n),function(e){i&&i(e),r(e)})),z({},e,{rid:a,ts:new Date().getTime()},t?{hasCallback:!0}:{})}function Gt(e){e===void 0&&(e={});var t=e.reducers||{},n=e.initialUser||{},r=(e.plugins||[]).reduce(function(e,t){if(k(t))return e.middlewares=e.middlewares.concat(t),e;if(t.NAMESPACE&&(t.name=t.NAMESPACE),!t.name)throw Error(`https://lytics.dev/errors/1`);t.config||={};var n=t.EVENTS?Object.keys(t.EVENTS).map(function(e){return t.EVENTS[e]}):[];e.pluginEnabled[t.name]=!1!==t.enabled&&!1!==t.config.enabled,delete t.enabled,t.methods&&(e.methods[t.name]=Object.keys(t.methods).reduce(function(e,n){var r;return e[n]=(r=t.methods[n],function(){for(var e=Array.prototype.slice.call(arguments),t=Array(r.length),n=0;n<e.length;n++)t[n]=e[n];return t[t.length]=x,r.apply({instance:x},t)}),e},{}),delete t.methods);var r=Object.keys(t).concat(n),i=new Set(e.events.concat(r));if(e.events=Array.from(i),e.pluginsArray=e.pluginsArray.concat(t),e.plugins[t.name])throw Error(t.name+`AlreadyLoaded`);return e.plugins[t.name]=t,e.plugins[t.name].loaded||(e.plugins[t.name].loaded=function(){return!0}),e},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),i=e.storage?e.storage:{getItem:F,setItem:I,removeItem:L},a=function(e){return function(t,n,r){return n.getState(`user`)[t]||(r&&M(r)&&r[t]?r[t]:Ye(e)[t]||F(Xe(t))||null)}}(i),o=r.plugins,s=r.events.filter(function(e){return!Ue.includes(e)}).sort(),c=new Set(s.concat(He).filter(function(e){return!Ue.includes(e)})),l=Array.from(c).sort(),u=function(){return o},d=new vt,f=d.addMiddleware,p=d.removeMiddleware,m=d.dynamicMiddlewares,h=function(){throw Error(`Abort disabled inListener`)},g=De(),_=Ye(i),v=z({},_,n,g.an_uid?{userId:g.an_uid}:{},g.an_aid?{anonymousId:g.an_aid}:{});v.anonymousId||=ke();var y=z({enable:function(e,t){return new Promise(function(n){w.dispatch({type:Y.enablePlugin,plugins:Ut(e),_:{originalAction:Y.enablePlugin}},n,[t])})},disable:function(e,t){return new Promise(function(n){w.dispatch({type:Y.disablePlugin,plugins:Ut(e),_:{originalAction:Y.disablePlugin}},n,[t])})}},r.methods),b=!1,x={identify:function(e,t,n,r){try{var i=A(e)?e:null,o=M(e)?e:t,s=n||{},c=x.user();I(Xe(q),i);var l=i||o.userId||a(q,x,o);return Promise.resolve(new Promise(function(e){w.dispatch(z({type:Y.identifyStart,userId:l,traits:o||{},options:s,anonymousId:c.anonymousId},c.id&&c.id!==i&&{previousId:c.id}),e,[t,n,r])}))}catch(e){return Promise.reject(e)}},track:function(e,t,n,r){try{var i=M(e)?e.event:e;if(!i||!A(i))throw Error(`EventMissing`);var o=M(e)?e:t||{},s=M(n)?n:{};return Promise.resolve(new Promise(function(e){w.dispatch({type:Y.trackStart,event:i,properties:o,options:s,userId:a(q,x,t),anonymousId:a(J,x,t)},e,[t,n,r])}))}catch(e){return Promise.reject(e)}},page:function(e,t,n){try{var r=M(e)?e:{},i=M(t)?t:{};return Promise.resolve(new Promise(function(o){w.dispatch({type:Y.pageStart,properties:Nt(r),options:i,userId:a(q,x,r),anonymousId:a(J,x,r)},o,[e,t,n])}))}catch(e){return Promise.reject(e)}},user:function(e){if(e===q||e===`id`)return a(q,x);if(e===J||e===`anonId`)return a(J,x);var t=x.getState(`user`);return e?(0,ee.default)(t,e):t},reset:function(e){return new Promise(function(t){w.dispatch({type:Y.resetStart},t,e)})},ready:function(e){return b&&e({plugins:y,instance:x}),x.on(Y.ready,function(t){e&&e(t),b=!0})},on:function(e,t){if(!e||!k(t))return!1;if(e===Y.bootstrap)throw Error(`.on disabled for `+e);var n=/Start$|Start:/;if(e===`*`){var r=function(e){return function(e){return function(r){return r.type.match(n)&&t({payload:r,instance:x,plugins:o}),e(r)}}},i=function(e){return function(e){return function(r){return r.type.match(n)||t({payload:r,instance:x,plugins:o}),e(r)}}};return f(r,Kt),f(i,qt),function(){p(r,Kt),p(i,qt)}}var a=e.match(n)?Kt:qt,s=function(n){return function(n){return function(r){return r.type===e&&t({payload:r,instance:x,plugins:o,abort:h}),n(r)}}};return f(s,a),function(){return p(s,a)}},once:function(e,t){if(!e||!k(t))return!1;if(e===Y.bootstrap)throw Error(`.once disabled for `+e);var n=x.on(e,function(e){t({payload:e.payload,instance:x,plugins:o,abort:h}),n()});return n},getState:function(e){var t=w.getState();return e?(0,ee.default)(t,e):Object.assign({},t)},dispatch:function(e){var t=A(e)?{type:e}:e;if(He.includes(t.type))throw Error(`reserved action `+t.type);var n=z({},t,{_:z({originalAction:t.type},e._||{})});w.dispatch(n)},enablePlugin:y.enable,disablePlugin:y.disable,plugins:y,storage:{getItem:i.getItem,setItem:function(e,t,n){w.dispatch({type:Y.setItemStart,key:e,value:t,options:n})},removeItem:function(e,t){w.dispatch({type:Y.removeItemStart,key:e,options:t})}},setAnonymousId:function(e,t){x.storage.setItem(W,e,t)},events:{core:He,plugins:s}},te=r.middlewares.concat([function(e){return function(e){return function(t){return t.meta||=Wt(),e(t)}
4}},m(Kt),gt(x,u,{all:l,plugins:s}),_t(i),qe(x),Ze(x),m(qt)]),ne={context:Lt,user:Je(i),page:Ft,track:wt,plugins:yt(u),queue:Et},S=U,C=U;if(D&&e.debug){var re=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;re&&(S=re({trace:!0,traceLimit:25})),C=function(){return arguments.length===0?Vt():M(typeof arguments[0])?Ht():Ht().apply(null,arguments)}}var ie,ae=function(e){return Object.keys(e).reduce(function(t,n){return Rt.includes(n)||(t[n]=e[n]),t},{})}(e),oe={context:ae,user:v,plugins:r.pluginsArray.reduce(function(e,t){var n=t.name,i=t.config,a=t.loaded,o=r.pluginEnabled[n];return e[n]={enabled:o,initialized:!!o&&!t.initialize,loaded:!!a({config:i}),config:i},e},{})},w=Re(function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]===B&&(n[i]=e[i])}var a,o=Object.keys(n);try{(function(e){Object.keys(e).forEach(function(t){var n=e[t];if(typeof n(void 0,{type:Pe})===V||typeof n(void 0,{type:Fe})===V)throw Error(H+` `+t+` `+V)})})(n)}catch(e){a=e}return function(e,t){if(e===void 0&&(e={}),a)throw a;for(var r=!1,i={},s=0;s<o.length;s++){var c=o[s],l=e[c],u=(0,n[c])(l,t);if(typeof u===V){var d=ze(c,t);throw Error(d)}i[c]=u,r||=u!==l}return r?i:e}}(z({},ne,t)),oe,C(S(Be.apply(void 0,te))));w.dispatch=(ie=w.dispatch,function(e,t,n){var r=z({},e,{meta:Wt(e.meta,t,Ut(n))});return ie.apply(null,[r])});var T=Object.keys(o);w.dispatch({type:Y.bootstrap,plugins:T,config:ae,params:g,user:v,initialUser:n,persistedUser:_});var se=T.filter(function(e){return r.pluginEnabled[e]}),E=T.filter(function(e){return!r.pluginEnabled[e]});return w.dispatch({type:Y.registerPlugins,plugins:T,enabled:r.pluginEnabled}),r.pluginsArray.map(function(e,t){var n=e.bootstrap,i=e.config,a=e.name;
4n&&k(n)&&n({instance:x,config:i,payload:e}),w.dispatch({type:Y.registerPluginType(a),name:a,enabled:r.pluginEnabled[a],plugin:e}),r.pluginsArray.length===t+1&&w.dispatch({type:Y.initializeStart,plugins:se,disabled:E})}),Bt(function(e){w.dispatch({type:e?Y.offline:Y.online})}),function(e,t,n){setInterval(function(){return nt(e,t,n)},3e3)}(w,u,x),x}var Kt=`before`,qt=`after`,Jt=`cookie`,Z=Qt(),Yt=$t,Xt=$t;function Zt(e){return Z?$t(e,``,-1):L(e)}function Qt(){if(Z!==void 0)return Z;var e=Jt+Jt;try{$t(e,e),Z=document.cookie.indexOf(e)!==-1,Zt(e)}catch{Z=!1}return Z}function $t(e,t,n,r,i,a){if(typeof window<`u`){var o=arguments.length>1;return!1===Z&&(o?I(e,t):F(e)),o?document.cookie=e+`=`+encodeURIComponent(t)+(n?`; expires=`+new Date(+new Date+1e3*n).toUTCString()+(r?`; path=`+r:``)+(i?`; domain=`+i:``)+(a?`; secure`:``):``):decodeURIComponent(((`; `+document.cookie).split(`; `+e+`=`)[1]||``).split(`;`)[0])}}var en=`localStorage`,tn=Me.bind(null,en);R(en,`getItem`,F),R(en,`setItem`,I),R(en,`removeItem`,L);var nn=`sessionStorage`,rn=Me.bind(null,nn);R(nn,`getItem`,F),R(nn,`setItem`,I),R(nn,`removeItem`,L);function Q(e){var t=e;try{if((t=JSON.parse(e))===`true`)return!0;if(t===`false`)return!1;if(M(t))return t;parseFloat(t)===t&&(t=parseFloat(t))}catch{}if(t!==null&&t!==``)return t}var an=tn(),on=rn(),sn=Qt();function cn(e,t){if(e){var n=dn(t),r=!hn(n),i=fn(n)?Q(localStorage.getItem(e)):void 0;if(r&&!j(i))return i;var a=pn(n)?Q(Yt(e)):void 0;if(r&&a)return a;var o=mn(n)?Q(sessionStorage.getItem(e)):void 0;if(r&&o)return o;var s=F(e);return r?s:{localStorage:i,sessionStorage:o,cookie:a,global:s}}}
4function ln(e,t,n){if(e&&!j(t)){var r={},i=dn(n),a=JSON.stringify(t),o=!hn(i);return fn(i)&&(r.localStorage=_n(`localStorage`,t,Q(localStorage.getItem(e))),localStorage.setItem(e,a),o)?r[en]:pn(i)&&(r.cookie=_n(`cookie`,t,Q(Yt(e))),Xt(e,a),o)?r[Jt]:mn(i)&&(r.sessionStorage=_n(`sessionStorage`,t,Q(sessionStorage.getItem(e))),sessionStorage.setItem(e,a),o)?r[nn]:(r[Ae]=_n(Ae,t,F(e)),I(e,t),o?r[Ae]:r)}}function un(e,t){if(e){var n=dn(t),r=cn(e,`*`),i={};return!j(r.localStorage)&&fn(n)&&(localStorage.removeItem(e),i.localStorage=r.localStorage),!j(r.cookie)&&pn(n)&&(Zt(e),i.cookie=r.cookie),!j(r.sessionStorage)&&mn(n)&&(sessionStorage.removeItem(e),i.sessionStorage=r.sessionStorage),!j(r.global)&&gn(n,`global`)&&(L(e),i.global=r.global),i}}function dn(e){return e?A(e)?e:e.storage:`any`}function fn(e){return an&&gn(e,`localStorage`)}function pn(e){return sn&&gn(e,`cookie`)}function mn(e){return on&&gn(e,`sessionStorage`)}function hn(e){return e===`*`||e===`all`}function gn(e,t){return e===`any`||e===t||hn(e)}function _n(e,t,n
4){return{location:e,current:t,previous:n}}var vn={setItem:ln,getItem:cn,removeItem:un};function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bn(Object(n),!0).forEach(function(t){yn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Gt(xn(xn({},{storage:vn}),e))}var Cn=(0,b.createContext)(null);function wn(){return(0,b.useContext)(Cn)}function Tn(e){if(typeof e!=`object`||!e)return!1;let t=`enabled`in e?e.enabled:void 0,n=`loaded`in e?e.loaded:void 0;return t===!1||n===!0}function En(e){let t=e.getState(`plugins`);if(typeof t!=`object`||!t)return!1;let n=Object.values(t);return n.length>0&&n.every(Tn)}function Dn(e){let t=(0,b.useRef)(void 0),n=(0,b.useRef)(!1);(0,b.useEffect)(()=>{if(n.current)return;t.current={path:window.location.pathname,referrer:document.referrer,search:window.location.search,url:window.location.href,title:document.title};let e=new MutationObserver(async()=>{if(!t.current){s.error(`Page properties should be defined at this point (MutationObserver)`);return}document.location.href!==t.current.url&&(t.current.path=window.location.pathname,t.current.referrer=t.current.url,t.current.search=window.location.search,t.current.url=window.location.href,t.current),document.title!==t.current.title&&(`${t.current.title}${document.title}`,t.current.title=document.title)}),r=document.documentElement;e.observe(r,{childList:!0,subtree:!0}),n.current=!0},[]);function r(){return o(t.current,`Cannot track event without page properties`),{eventId:_(),context:{environment:`production`,siteHost:e,userAgent:window.navigator.userAgent,page:t.current,originalDate:new Date().toISOString()}}}return{name:`analytics-plugin-enrich`,pageStart:({abort:e,payload:t})=>n.current?Object.assign({},t,r()):e(`Cannot track pageViewed event before enrichPlugin is loaded`),trackStart:({abort:e,payload:t})=>n.current?Object.assign({},t,r()):e(`Cannot track event before enrichPlugin is loaded`),loaded:()=>!0}}function On(e){let t=e.trim().toLowerCase();if(!t)return t;if(t.includes(`://`))try{return new URL(t).hostname}catch{return t}return t.split(`/`)[0].split(`:`)[0]}var kn=d({error:m(`admin`,`integration_form__didomi__imgSrcHosts__required`)}).transform(On).pipe(d().min(1,{error:m(`admin`,`integration_form__didomi__imgSrcHosts__required`)}).max(253,{error:m(`admin`,`integration_form__didomi__imgSrcHosts__invalid`)}).regex(/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/,{error:m(`admin`,`integration_form__didomi__imgSrcHosts__invalid`)}).refine(e=>!e.includes(`*`),{error:m(`admin`,`integration_form__didomi__imgSrcHosts__no_wildcard`)}));function An(){return u(kn).max(10,{error:m(`admin`,`integration_form__didomi__imgSrcHosts__max`,{max:10})}).optional()}r({integration_form__didomi__imgSrcHosts__required:`Veuillez renseigner un nom d'hôte.`,integration_form__didomi__imgSrcHosts__invalid:`Nom d'hôte invalide (ex. assets.exemple.com). Pas de chemin ni de wildcard.`,integration_form__didomi__imgSrcHosts__no_wildcard:`Les wildcards (*, *.exemple.com) ne sont pas autorisés.`,integration_form__didomi__imgSrcHosts__max:`Maximum {{max}} hôtes.`});function jn({meta:e}){let{t}=c(`admin`),n=e.getFieldset(),r=n.settings.getFieldset();return(0,x.jsxs)(`div`,{className:`grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6`,children:[(0,x.jsx)(f,{meta:n.type,type:`hidden`}),(0,x.jsx)(p,{className:`sm:col-span-full`,label:t(`integration_form__piano_analytics__site__label`),required:r.site.required,id:r.site.id,errors:r.site.errors,children:(0,x.jsx)(f,{meta:r.site,type:`text`})}),(0,x.jsx)(p,{className:`sm:col-span-full`,label:t(`integration_form__piano_analytics__collectDomain__label`),required:r.collectDomain.required,id:r.collectDomain.id,errors:r.collectDomain.errors,children:(0,x.jsx)(f,{meta:r.collectDomain,type:`text`,placeholder:`https://<xxxxxxx>.pa-cd.com`})})]})}r({integration_form__piano_analytics__site__label:`ID du site`,integration_form__piano_analytics__collectDomain__label:`Domaine de collecte`});function Mn(e){return e?.page?e:typeof window>`u`?null:{environment:`production`,siteHost:e?.siteHost??window.location.hostname,userAgent:e?.userAgent??window.navigator.userAgent,page:{path:window.location.pathname,referrer:document.referrer,search:window.location.search,url:window.location.href,title:document.title},originalDate:e?.originalDate??new Date().toISOString()}}var Nn=`analytics-plugin-piano-analytics`;function Pn(e){switch(e){case!0:return`optin`;case!1:return`optout`;default:return`no-consent`}}function Fn(e){(0,b.useEffect)(()=>{window.pa&&window.pa.privacy.setMode(Pn(e))},[e]);function t(t){return typeof window>`u`?{name:Nn,loaded:()=>!1}:{name:Nn,config:t,initialize:async({config:t})=>{try{await a(()=>import(`./piano-analytics-pgE2bvEr.js`),[])}catch{return}if(!window.pa)return;let n={...t,privacyDefaultMode:Pn(e)};window.pa.setConfigurations(n)},identify:({payload:{userId:e}})=>{if(e){if(!window.pa)return;window.pa.setUser(e)}},page:({payload:e})=>
4{if(!window.pa)return;let t=Mn(e.context);if(!t)return;let{title:n,referrer:r,url:i}=t.page,a={site_level2:t.siteHost,page:n,previous_url:r,event_url_full:i};window.pa.sendEvent(`page.display`,a)},track:({payload:e})=>{if(!window.pa)return;let{event:t,properties:n}=e,r=Mn(e.context);if(!r)return;let i={};switch(t){case`buttonClicked`:i={button_label:n.label,button_path:n.path,button_tracking_id:n.trackingId};break;default:l(t,`Piano Analytics unhandled event name: ${t}`)}let a={...i,site_level2:r.siteHost,previous_url:r.page.referrer,event_url_full:r.page.url};window.pa.sendEvent(`click.action`,a)},reset:()=>{window.pa&&window.pa.getUser(e=>{window.pa&&e&&window.pa.deleteUser()})},loaded:()=>!0}}return t}var In=`piano_analytics`,Ln={type:In,settings:{site:void 0,collectDomain:void 0}},Rn=`didomi`,zn={type:Rn,settings:{apiKey:void 0,noticeId:void 0,imgSrcHosts:[]}},Bn={},Vn={[In]:`pianohybr-R3VKC2r4`},Hn={...Bn,...Vn},Un=(0,b.createContext)(null);function Wn(){return(0,b.useContext)(Un)}function Gn({meta:e,form:t,enabledIntegrations:n}){let{t:r}=c(`admin`),i=e.getFieldset(),a=i.settings.getFieldset(),o=n.map(e=>{let t=e.getFieldset().type.value;return Vn.hasOwnProperty(t)?t:null}).filter(Boolean),s=[...Object.keys(Bn),...o];return(0,x.jsxs)(`div`,{className:`grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6`,children:[(0,x.jsx)(f,{meta:i.type,type:`hidden`}),(0,x.jsx)(p,{className:`sm:col-span-full`,label:r(`integration_form__didomi__apiKey__label`),required:a.apiKey.required,id:a.apiKey.id,errors:a.apiKey.errors,children:(0,x.jsx)(f,{meta:a.apiKey,type:`text`})}),(0,x.jsx)(p,{className:`sm:col-span-full`,label:r(`integration_form__didomi__noticeId__label`),required:a.noticeId.required,id:a.noticeId.id,errors:a.noticeId.errors,children:(0,x.jsx)(f,{meta:a.noticeId,type:`text`})}),(0,x.jsx)(p,{className:`sm:col-span-full`,label:r(`integration_form__didomi__imgSrcHosts__label`),required:!!a.imgSrcHosts.required,id:a.imgSrcHosts.id,errors:a.imgSrcHosts.errors,helps:[r(`integration_form__didomi__imgSrcHosts__help`)],children:(0,x.jsx)(v,{meta:a.imgSrcHosts,form:t,variant:`compact`,maxCount:10,defaultValue:``,children:({meta:e})=>(0,x.jsx)(p,{className:`sm:col-span-full`,required:e.required,id:e.id,errors:e.errors,children:(0,x.jsx)(f,{meta:e,type:`text`,placeholder:r(`integration_form__didomi__imgSrcHosts__placeholder`),autoComplete:`off`,spellCheck:!1})})})}),s.length===0?null:(0,x.jsx)(p,{className:`space-y-2 sm:col-span-full`,label:r(`integration_form__didomi__vendorsMapping__label`),required:a.vendorsMapping.required,id:a.vendorsMapping.id,errors:a.vendorsMapping.errors,helps:[r(`integration_form__didomi__vendorsMapping__help`),r(`integration_form__didomi__vendorsMapping__help_vendor_not_found`)],children:s.map((e,t)=>{let n=a.vendorsMapping.getFieldset()[e];return n?(0,x.jsxs)(`div`,{className:`flex w-full items-center space-x-2`,children:[(0,x.jsx)(`p`,{className:`text-sm leading-none font-medium`,children:r(`integration__${e}`)}),(0,x.jsx)(p,{className:`flex-1`,required:n.required,id:n.id,errors:n.errors,children:(0,x.jsx)(f,{meta:n,type:`text`,placeholder:Hn[e]})})]},t):null})})]})}r({integration_form__didomi__apiKey__label:`Clé d'API`,integration_form__didomi__noticeId__label:`ID de notice`,integration_form__didomi__imgSrcHosts__label:`Hôtes d'images`,integration_form__didomi__imgSrcHosts__placeholder:`assets.exemple.com`,integration_form__didomi__imgSrcHosts__help:`Hostname exact du CDN qui sert le logo / branding de votre notice Didomi (hors *.privacy-center.org). Requis pour que la CSP autorise ces images. Ex. assets.exemple.com.`,integration_form__didomi__vendorsMapping__label:`Correspondance des intégrations avec les "vendors" de la Consent Notice (champ "API ID")`,integration_form__didomi__vendorsMapping__help:`Si vous laissez la valeur d'une intégration vide, vérifiez que la valeur par défaut affichée ici correspond bien à l'API ID du vendor correspondant dans votre Consent Notice Didomi.`,integration_form__didomi__vendorsMapping__help_vendor_not_found:`Attention, si un des champs n'a pas d'API ID ou si l'API ID ne correspond pas à un vendor de votre Consent Notice Didomi, l'intégration pourrait ne pas fonctionner correctement.`});var Kn=t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),qn=t(((e,t)=>{var n=Kn();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
4:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),$=e(t(((e,t)=>{t.exports=qn()()}))()),Jn=function(e){var t=e.apiKey,n=t===void 0?null:t,r=e.noticeId,i=r===void 0?null:r,a=e.platform,o=a===void 0?null:a,s=e.config,c=s===void 0?{}:s,l=e.gdprAppliesGlobally,u=l===void 0||l,d=e.onReady,f=e.onConsentChanged,p=e.onNoticeShown,m=e.onNoticeHidden,h=e.onNoticeBackdropclick,g=e.onNoticeClickAgree,_=e.onNoticeClickMoreInfo,v=e.onPreferencesClickAgreeToAll,y=e.onPreferencesClickDisagreeToAll,x=e.onPreferencesClickPurposeAgree,ee=e.onPreferencesClickPurposeDisagree,te=e.onPreferencesClickViewVendors,ne=e.onPreferencesClickSaveChoices,S=e.onPreferencesClickVendorAgree,C=e.onPreferencesClickVendorDisagree,re=e.onPreferencesClickVendorSaveChoices,ie=e.sdkPath,ae=ie===void 0?`https://sdk.privacy-center.org/`:ie,oe=e.embedTCFStub,w=oe===void 0||oe,T=e.embedGPPStub,se=T!==void 0&&T,E=e.country,D=E===void 0?null:E,ce=e.region,le=ce===void 0?null:ce,ue=function(){d&&(window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(d)),window.didomiEventListeners=window.didomiEventListeners||[],f&&window.didomiEventListeners.push({event:`consent.changed`,listener:function(e){f(e.consentToken)}}),p&&window.didomiEventListeners.push({event:`notice.shown`,listener:function(){return p()}}),m&&window.didomiEventListeners.push({event:`notice.hidden`,listener:function(){return m()}}),h&&window.didomiEventListeners.push({event:`notice.backdropclick`,listener:function(){return h()}}),g&&window.didomiEventListeners.push({event:`notice.clickagree`,listener:function(){return g()}}),_&&window.didomiEventListeners.push({event:`notice.clickmoreinfo`,listener:function(){return _()}}),v&&window.didomiEventListeners.push({event:`preferences.clickagreetoall`,listener:function(){return v()}}),y&&window.didomiEventListeners.push({event:`preferences.clickdisagreetoall`,listener:function(){return y()}}),x&&window.didomiEventListeners.push({event:`preferences.clickpurposeagree`,listener:function(){return x()}}),ee&&window.didomiEventListeners.push({event:`preferences.clickpurposedisagree`,listener:function(){return ee()}}),te&&window.didomiEventListeners.push({event:`preferences.clickviewvendors`,listener:function(){return te()}}),ne&&window.didomiEventListeners.push({event:`preferences.clicksavechoices`,listener:function(){return ne()}}),S&&window.didomiEventListeners.push({event:`preferences.clickvendoragree`,listener:function(){return S()}}),C&&window.didomiEventListeners.push({event:`preferences.clickvendordisagree`,listener:function(){return C()}}),re&&window.didomiEventListeners.push({event:`preferences.clickvendorsavechoices`,listener:function(){return re()}})},de=function(){var e;return c.app&&c.app.apiKey&&(e=c.app.apiKey),n||e},fe=function(){var e,t=de(),n=u!==!1;window.didomiConfig=c||{},window.didomiConfig.sdkPath=ae,window.gdprAppliesGlobally=n,i?(e=`target_type=notice&target=`+i,o&&(e=`platform=`+o+`&`+e)):e=`target=`+document.location.hostname,D&&(e=e+`&country=`+D),le&&(e=e+`&region=`+le),w&&(function(){function e(t){if(!window.frames[t]){if(document.body&&document.body.firstChild){var n=document.body,r=document.createElement(`iframe`);r.style.display=`none`,r.name=t,r.title=t,r.setAttribute(`aria-hidden`,`true`),r.tabIndex=-1,n.insertBefore(r,n.firstChild);try{r.contentDocument.documentElement.setAttribute(`aria-hidden`,`true`)}catch{}}else setTimeout(function(){e(t)},5)}}function t(e,t,n,r,i){function a(e,n,r,a){if(typeof r==`function`){window[t]||(window[t]=[]);var o=!1;i&&(o=i(e,n,r)),o||window[t].push({command:e,parameter:n,callback:r,version:a})}}a.stub=!0;function o(t){if(!(!window[e]||window[e].stub!==!0)&&t.data){var i=typeof t.data==`string`,a;try{a=i?JSON.parse(t.data):t.data}catch{return}if(a[n]){var o=a[n];window[e](o.command,o.parameter,function(e,n){var a={};a[r]={returnValue:e,success:n,callId:o.callId},t.source.postMessage(i?JSON.stringify(a):a,`*`)},o.version)}}}typeof window[e]!=`function`&&(window[e]=a,window.addEventListener?window.addEventListener(`message`,o,!1):window.attachEvent(`onmessage`,o))}t(`__tcfapi`,`__tcfapiBuffer`,`__tcfapiCall`,`__tcfapiReturn`),e(`__tcfapiLocator`)})(),se&&(function(){window.__gpp_addFrame=function(e){if(!window.frames[e]){if(document.body){var t=document.createElement(`iframe`);t.style.cssText=`display:none`,t.name=e,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,document.body.appendChild(t);try{t.contentDocument.documentElement.setAttribute(`aria-hidden`,`true`)}catch{}}else window.setTimeout(function(){window.__gpp_addFrame&&window.__gpp_addFrame(e)},10)}},window.__gpp_stub=function(){var e=arguments;if(window.__gpp.queue=window.__gpp.queue||[],window.__gpp.events=window.__gpp.events||[],!e.length||e.length==1&&e[0]==`queue`)return window.__gpp.queue;if(e.length==1&&e[0]==`events`)return window.__gpp.events;var t=e[0],n=e.length>1?e[1]:null,r=e.length>2?e[2]:null;if(t===`ping`)n({gppVersion:`1.1`,cmpStatus:`stub`,cmpDisplayStatus:`hidden`,signalStatus:`not ready`,supportedAPIs:[`2:tcfeuv2`,`5:tcfcav1`,`6:uspv1`,`7:usnatv1`,`8:uscav1`,`9:usvav1`,`10:uscov1`,`11:usutv1`,`12:usctv1`],
4cmpId:0,sectionList:[],applicableSections:[],gppString:``,parsedSections:{}},!0);else if(t===`addEventListener`){`lastId`in window.__gpp||(window.__gpp.lastId=0),window.__gpp.lastId++;var i=window.__gpp.lastId;window.__gpp.events.push({id:i,callback:n,parameter:r}),n({eventName:`listenerRegistered`,listenerId:i,data:!0,pingData:{gppVersion:`1.1`,cmpStatus:`stub`,cmpDisplayStatus:`hidden`,signalStatus:`not ready`,supportedAPIs:[`2:tcfeuv2`,`5:tcfcav1`,`6:uspv1`,`7:usnatv1`,`8:uscav1`,`9:usvav1`,`10:uscov1`,`11:usutv1`,`12:usctv1`],cmpId:0,sectionList:[],applicableSections:[],gppString:``,parsedSections:{}}},!0)}else if(t===`removeEventListener`){for(var a=!1,o=0;o<window.__gpp.events.length;o++)if(window.__gpp.events[o].id==r){window.__gpp.events.splice(o,1),a=!0;break}n({eventName:`listenerRemoved`,listenerId:r,data:a,pingData:{gppVersion:`1.1`,cmpStatus:`stub`,cmpDisplayStatus:`hidden`,signalStatus:`not ready`,supportedAPIs:[`2:tcfeuv2`,`5:tcfcav1`,`6:uspv1`,`7:usnatv1`,`8:uscav1`,`9:usvav1`,`10:uscov1`,`11:usutv1`,`12:usctv1`],cmpId:0,sectionList:[],applicableSections:[],gppString:``,parsedSections:{}}},!0)}else t===`hasSection`?n(!1,!0):t===`getSection`||t===`getField`?n(null,!0):window.__gpp.queue.push([].slice.apply(e))},window.__gpp_msghandler=function(e){var t=typeof e.data==`string`;try{var n=t?JSON.parse(e.data):e.data}catch{n=null}if(typeof n==`object`&&n&&`__gppCall`in n){var r=n.__gppCall;window.__gpp&&window.__gpp(r.command,function(n,i){var a={__gppReturn:{returnValue:n,success:i,callId:r.callId}};e.source.postMessage(t?JSON.stringify(a):a,`*`)},`parameter`in r?r.parameter:null,`version`in r?r.version:`1.1`)}},(!(`__gpp`in window)||typeof window.__gpp!=`function`)&&(window.__gpp=window.__gpp_stub,window.addEventListener(`message`,window.__gpp_msghandler,!1),window.__gpp_addFrame(`__gppLocator`))})();var r=`spcloader`;if(document.getElementById(r))return null;var a=document.createElement(`script`);a.id=r,a.type=`text/javascript`,a.async=!0,a.src=ae+t+`/loader.js?`+e,a.charset=`utf-8`;var s=document.getElementsByTagName(`script`)[0];s.parentNode.insertBefore(a,s)};return b.useEffect(function(){ue(),fe()},[]),null};Jn.propTypes={apiKey:$.default.string,noticeId:$.default.string,platform:$.default.string,config:$.default.object,gdprAppliesGlobally:$.default.bool,onReady:$.default.func,onConsentChanged:$.default.func,onNoticeShown:$.default.func,onNoticeHidden:$.default.func,onNoticeBackdropclick:$.default.func,onNoticeClickAgree:$.default.func,onNoticeClickMoreInfo:$.default.func,onPreferencesClickAgreeToAll:$.default.func,onPreferencesClickDisagreeToAll:$.default.func,onPreferencesClickPurposeAgree:$.default.func,onPreferencesClickPurposeDisagree:$.default.func,onPreferencesClickViewVendors:$.default.func,onPreferencesClickSaveChoices:$.default.func,onPreferencesClickVendorAgree:$.default.func,onPreferencesClickVendorDisagree:$.default.func,onPreferencesClickVendorSaveChoices:$.default.func,sdkPath:$.default.string,embedTCFStub:$.default.bool,embedGPPStub:$.default.bool,country:$.default.string,region:$.default.string};function Yn({settings:e,children:t}){let n=h(),[r,i]=(0,b.useState)(()=>()=>{}),[a,o]=(0,b.useState)({}),s={user:{},notice:{enable:!0},...n?{app:{nonce:n}}:{}};if(!e)return t;let c={showConsentModal:r,vendorsConsent:a};return(0,x.jsxs)(Un.Provider,{value:c,children:[t,(0,x.jsx)(Jn,{config:s,apiKey:e.apiKey,noticeId:e.noticeId,gdprAppliesGlobally:!0,sdkPath:`https://sdk.privacy-center.org/`,embedTCFStub:!0,onReady:t=>{i(()=>t.preferences.show);let n=t.getCurrentUserStatus();for(let r in e.vendorsMapping){let i=r,a=e.vendorsMapping[i];a||=Hn[i],a&&n.vendors.hasOwnProperty(a)&&n.vendors[a]&&t.getObservableOnUserConsentStatusForVendor(`c:${a}`).subscribe(function(e){o(t=>({...t,[i]:e===!1||e===!0?e:void 0}))})}}})]})}function Xn({organizationUuid:e,siteHost:t,userId:n,configurations:r,children:i}){let a=Wn(),o=Dn(t),s=Fn(a?.vendorsConsent[In]),c=JSON.stringify({configurations:r,organizationUuid:e}),l=(0,b.useMemo)(()=>Sn({app:`${e}-analytics`,debug:!1,plugins:[o,...r.pianoAnalytics?[s(r.pianoAnalytics)]:[]]}),[c]),u=(0,b.useCallback)(e=>{let t=l.on(`ready`,e);return()=>{typeof t==`function`&&t()}},[l]),d=(0,b.useCallback)(()=>En(l),[l]),f=(0,b.useSyncExternalStore)(u,d,()=>!1);(0,b.useEffect)(()=>{},[f]),(0,b.useEffect)(()=>
4{if(f){if(!n){l.user(`userId`)&&l.reset();return}l.identify(n)}},[n,f]);let p=(0,b.useMemo)(()=>({page:()=>{l.page()},track:(e,t)=>{l.track(e,t)},isReady:f}),[l,f]);return(0,x.jsx)(Cn.Provider,{value:p,children:i})}function Zn({organizationUuid:e,siteHost:t,configurations:n,children:r}){let i=g();if(!n||n.length===0)return r;let a={didomi:n.find(e=>e.type===Rn)?.settings,pianoAnalytics:n.find(e=>e.type===In)?.settings};return(0,x.jsx)(Yn,{settings:a.didomi,children:(0,x.jsx)(Xn,{organizationUuid:e,siteHost:t,userId:i?.id??null,configurations:{pianoAnalytics:a.pianoAnalytics},children:r})})}function Qn({meta:e,form:t,enabledIntegrations:n}){let r=e.getFieldset().type.value;if(!r)throw Error(`Missing third party configuration type in admin form`);switch(r){case`didomi`:return(0,x.jsx)(Gn,{meta:e,form:t,enabledIntegrations:n});case`piano_analytics`:return(0,x.jsx)(jn,{meta:e});default:l(r,`Unhandled third party configuration type in admin form.`)}}export{Wn as a,In as c,Rn as i,An as l,Zn as n,Hn as o,zn as r,Ln as s,Qn as t,wn as u};
5//# debugId=c967b098-d6b9-58fb-97de-0aa792d10946

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.