/*! @version: ad237d6 */ "use strict";(self.webpackChunk_spark_front_templates=self.webpackChunk_spark_front_templates||[]).push([[374],{374:(e,t,o)=>{o.r(t),o.d(t,{PianoCustomVariablesE2PModule:()=>i});var n=o(2958);const i=e=>{const t=JSON.parse(window.atob(e.dataset.pianoCustomVariables||""));if(t)for(const e in t)(0,n.f0)(e,`${t[e]}`)}},2958:(e,t,o)=>{o.d(t,{T9:()=>u,f0:()=>r,pn:()=>s});var n=o(2193),i=(e,t,o)=>new Promise(((n,i)=>{var a=e=>{try{r(o.next(e))}catch(e){i(e)}},s=e=>{try{r(o.throw(e))}catch(e){i(e)}},r=e=>e.done?n(e.value):Promise.resolve(e.value).then(a,s);r((o=o.apply(e,t)).next())}));const a=(0,n.A)("PianoUtils"),s=e=>i(void 0,null,(function*(){return new Promise(((t,o)=>{let n,i=!1;n=setInterval((()=>{switch(e){case"tp":i=void 0!==window.tp;break;case"cX":i=void 0!==window.cX&&void 0!==window.cX.CCE&&"function"==typeof window.cX.createDelegate;break;default:i=!1}i&&(clearInterval(n),t())}),100);setTimeout((()=>{clearInterval(n),o(new Error(`Timeout: window.${e} did not become available within 10000ms`))}),1e4)}))})),r=(e,t,o=!1)=>i(void 0,null,(function*(){yield s("tp");const n="undefined"!=typeof window&&window.tp||void 0;n&&(n.push(["setCustomVariable",e,t]),o&&n.experience.execute(),a.info(`setPianoCustomVariable: ${e}=${t}, execute=${o}`))})),c=(e,t,o,n="")=>{e.push(["setCustomParam",t,o,n]),a.info(`setPianoCustomParam: ${t}=${o}`)},u=(e,t,o=!1)=>i(void 0,null,(function*(){yield s("tp");const n="undefined"!=typeof window&&window.tp||void 0;if(n){for(const i in e){const s=e[i];s&&"userDetails"!==i&&c(n,i,s.toString(),t),a.info(`setPianoCustomParams: ${i}=${s}, scope=${t} execute=${o}`)}o&&n.experience.execute()}}))}}]);