!function(c,s){"use strict";function e(n){var t=this,e="Box #"+n.id+" - "+n.options.name;n.on("afterOpen",function(){t.track("open",e)}).on("afterClose",function(){t.track("close",e)}),this.track=function(t,e){this.gaLoad("event","send",{event_category:"FireBox",event_action:t,event_label:e,event_callback:function(){n.log("Google Analytics Event Tracked. Action: "+t+", Label: "+e)}})},this.getGA4TrackingID=function(){var t=Object.keys(c.google_tag_manager||[]).filter(function(t){return"G-"===t.substring(0,2)});return!!t.length&&t[0]},this.gaLoad=function(t,e,n){if(void 0!==r&&void 0!==c.dataLayer){var a=this.getGA4TrackingID();if(!a)return;return r("config",n.send_to=a),void r(t,e,n)}var o,i=this.getGA4TrackingID();function r(){dataLayer.push(arguments)}i&&(n.send_to=i,(o=s.createElement("script")).async=!0,o.src="https://www.googletagmanager.com/gtag/js?id="+i,s.getElementsByTagName("head")[0].appendChild(o),c.dataLayer=c.dataLayer||[],r("js",new Date),r("config",i),r(t,e,n))}}FireBox&&FireBox.onReady(function(){FireBox.getInstances().forEach(function(t){new e(t)})})}(window,document);

