/*! Dtr - Tue, 12 Mar 2024 16:58:14 GMT */ (self.webpackChunkom_api_js=self.webpackChunkom_api_js||[]).push([[11],{530:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return l}});var r=i(3583),n=i(7624),s=i(7187),o=i.n(s),a=i(2888);function u(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class l{constructor(t){var e=this;u(this,"global",((t,e)=>{(0,a.isFunction)(window[t])&&window[t](e)})),u(this,"replaceCustomVars",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=t.match(/\{\{(.*?)\}\}/g);return i?((0,a.each)(i,((i,r)=>t=e.replace(r,t))),t):t})),u(this,"replace",(function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t;if(!t.length)return;const s=t.replace("{{","").replace("}}","").trim().split("|"),u=void 0!==s[1]?s[1]:"",l=void 0!==s[0]?e.sanitize(s[0]):"";if((0,a.hasQueryArg)(l))i=i.replace(n,o()(decodeURIComponent((0,a.getQueryArg)(l))));else if(r.Z.get(l))i=i.replace(n,o()(r.Z.get(l)));else if(e.getCustomVariable(l))i=i.replace(n,o()(e.getCustomVariable(l)));else{if(""===u)return i=i.replace(n+" ",""),i=i.replace(n,""),i;i=i.replace(n,o()(u))}return i})),u(this,"getCustomVariable",(t=>!!this.hasCustomVariable(t)&&window[n.GLOBAL_OM].custom[t])),u(this,"setCustomVariable",((t,e)=>{window[n.GLOBAL_OM].custom[t]=e})),u(this,"getCustomVariables",(()=>window[n.GLOBAL_OM].custom)),u(this,"hasCustomVariable",(t=>(0,a.hasProp)(window[n.GLOBAL_OM].custom,t))),u(this,"hasCustomVariables",(()=>!(0,a.empty)(this.getCustomVariables()))),u(this,"deleteCustomVariable",(t=>delete window[n.GLOBAL_OM].custom[t])),this.C=t,this.init()}init(){this.global("OMCustomVariables",this.setCustomVariable),this.global("OptinMonsterCustomVariables",this),(0,a.trigger)(document,"Dtr.init",{Dtr:this,Campaign:this.C})}sanitize(t){const e=document.createElement("div");return e.innerHTML=t,e.innerText.trim()}}},8674:function(t){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},9464:function(t,e,i){var r=i(8674)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=r},7187:function(t,e,i){var r=i(9464),n=i(9833),s=/[&<>"']/g,o=RegExp(s.source);t.exports=function(t){return(t=n(t))&&o.test(t)?t.replace(s,r):t}}}]);