!function(window,document){"use strict";function run(){for(var _this=this,getContent=function(){return _this.el.querySelector(".eb-content").innerHTML},setContent=function(n){_this.el.querySelector(".eb-content").innerHTML=n},regex=/{ebExpr (.*?)}/gm,originalContent=getContent(),m,map={};null!==(m=regex.exec(originalContent));){m.index===regex.lastIndex&&regex.lastIndex++;var shortcode=m[0],command=m[1];if(!map.hasOwnProperty(shortcode)){var result=void 0;try{result=eval(command)}catch(error){result=error,console.warn(error)}map[shortcode]=result}}var keys=Object.keys(map),newContent;0!==keys.length&&(newContent=originalContent,keys.forEach(function(n){newContent=newContent.replaceAll(n,map[n])}),originalContent!=newContent)&&(setContent(newContent),this.on("afterClose",function(){setContent(originalContent)}))}EngageBox.onReady(function(){var n=EngageBox.getInstances();n.length&&n.forEach(function(n){n.on("open",function(){run.apply(n)})})})}(window,document);

