nicoandmee
4/14/2019 - 5:31 AM

upwork browser fingerprint (v1)

upwork browser fingerprint (v1)

"use strict";
void 0 === window.console && (window.console = {
    log: function() {},
    debug: function() {}
});
void 0 === window.localStorage && (window.localStorage = {
    getItem: function() {},
    setItem: function() {}
});
"undefined" == typeof JSON && (JSON = {
    stringify: function() {},
    parse: function() {}
});
Array.prototype.indexOf || (Array.prototype.indexOf = function(e) {
    var t = this.length >>> 0,
        n = Number(arguments[1]) || 0;
    n = n < 0 ? Math.ceil(n) : Math.floor(n);
    n < 0 && (n += t);
    for (; n < t; n++)
        if (n in this && this[n] === e) return n;
    return -1
});
Array.isArray || (Array.isArray = function(e) {
    return "[object Array]" === Object.prototype.toString.call(e)
});
"function" != typeof Object.assign && (Object.assign = function(e, t) {
    if (null == e) throw new TypeError("Cannot convert undefined or null to object");
    for (var n = Object(e), i = 1; i < arguments.length; i++) {
        var o = arguments[i];
        if (null != o)
            for (var a in o) Object.prototype.hasOwnProperty.call(o, a) && (n[a] = o[a])
    }
    return n
});
Object.keys || (Object.keys = function() {
    var e = Object.prototype.hasOwnProperty,
        t = !{
            toString: null
        }.propertyIsEnumerable("toString"),
        n = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"],
        i = n.length;
    return function(o) {
        if ("object" != typeof o && ("function" != typeof o || null === o)) throw new TypeError("Object.keys called on non-object");
        var a, r, s = [];
        for (a in o) e.call(o, a) && s.push(a);
        if (t)
            for (r = 0; i > r; r++) e.call(o, n[r]) && s.push(n[r]);
        return s
    }
}());
Array.prototype.some || (Array.prototype.some = function(e) {
    if (null == this) throw new TypeError("Array.prototype.some called on null or undefined");
    if ("function" != typeof e) throw new TypeError;
    for (var t = Object(this), n = t.length >>> 0, i = arguments.length >= 2 ? arguments[1] : void 0, o = 0; o < n; o++)
        if (o in t && e.call(i, t[o], o, t)) return !0;
    return !1
});
var __extends = this && this.__extends || function() {
    var e = Object.setPrototypeOf || {
        __proto__: []
    }
    instanceof Array && function(e, t) {
        e.__proto__ = t
    } || function(e, t) {
        for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n])
    };
    return function(t, n) {
        function i() {
            this.constructor = t
        }
        e(t, n);
        t.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i)
    }
}();
String.prototype.includes || (String.prototype.includes = function(e, t) {
    "number" != typeof t && (t = 0);
    return !(t + e.length > this.length) && -1 !== this.indexOf(e, t)
});
window.Demandbase = window.Demandbase || {};
window.Demandbase.Config = window.Demandbase.Config || {};
window.Demandbase.Config.hooks = window.Demandbase.Config.hooks || {};
window.Demandbase.Config.ads = window.Demandbase.Config.ads || {};
window.Demandbase.Config.analytics = window.Demandbase.Config.analytics || {};
window.Demandbase.Config.tokens = window.Demandbase.Config.tokens || {};
window.Demandbase.Config.forms = window.Demandbase.Config.forms || {};
window.Demandbase.Config.SiteOptimization = window.Demandbase.Config.SiteOptimization || {};
window.Demandbase.Connectors = window.Demandbase.Connectors || {};
var Demandbase;
! function(e) {
    ! function(t) {
        t.ads = window.Demandbase.Config.ads || {};
        t.analytics = window.Demandbase.Config.analytics || {};
        t.conditions = window.Demandbase.Config.conditions || {};
        t.content = window.Demandbase.Config.content || {};
        t.forms = window.Demandbase.Config.forms || {};
        t.segments = window.Demandbase.Config.segments || {};
        t.emptyWatchDefault = window.Demandbase.Config.emptyWatchDefault || null;
        t.hooks = window.Demandbase.Config.hooks || {};
        t.isInIFrame = window.Demandbase.Config.isInIFrame || null;
        t.key = window.Demandbase.Config.key || null;
        t.logging = window.Demandbase.Config.logging || null;
        t.nonCompanyDefault = window.Demandbase.Config.nonCompanyDefault || null;
        t.nonWatchDefault = window.Demandbase.Config.nonWatchDefault || null;
        t.testDomain = window.Demandbase.Config.testDomain || void 0;
        t.testIp = window.Demandbase.Config.testIp || void 0;
        t.tokens = window.Demandbase.Config.tokens || {};
        t.useTestDomain = window.Demandbase.Config.useTestDomain || !1;
        t.useTestIp = window.Demandbase.Config.useTestIp || !1;
        t.Advertising = window.Demandbase.Config.Advertising || {};
        t.AssetReporter = window.Demandbase.Config.AssetReporter || {};
        t.Content = window.Demandbase.Config.Content || {};
        t.ErrorReporter = window.Demandbase.Config.ErrorReporter || {};
        t.Forms = window.Demandbase.Config.Forms || {};
        t.Google_Analytics = window.Demandbase.Config.Google_Analytics || {};
        t.Google_TagManager = window.Demandbase.Config.Google_TagManager || {};
        t.IpApiModule = e.Config.IpApiModule || {};
        t.SiteOptimization = window.Demandbase.Config.SiteOptimization || {};
        t.EmailDomainReporter = window.Demandbase.Config.EmailDomainReporter || {}
    }(e.Config || (e.Config = {}));
    e.Connectors || (e.Connectors = {})
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    e.version = "7.0.47"
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    ! function(e) {
        ! function(e) {
            function t(e) {
                return void 0 !== e.stacktrace || void 0 !== e["opera#sourceloc"] ? this.parseOpera(e) : e.stack && e.stack.match(u) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : void 0
            }

            function n(e) {
                if (-1 === e.indexOf(":")) return [e];
                var t = /(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,
                    n = t.exec(e.replace(/[\(\)]/g, ""));
                return [n[1], n[2] || void 0, n[3] || void 0]
            }

            function i(e, t) {
                void 0 === t && (t = 10);
                if (e) return parseInt(e, t)
            }

            function o(e) {
                return e.stack.split("\n").filter(function(e) {
                    return !!e.match(u)
                }, this).map(function(e) {
                    e.indexOf("(eval ") > -1 && (e = e.replace(/eval code/g, "eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g, ""));
                    var t = e.replace(/^\s+/, "").replace(/\(eval code/g, "(").split(/\s+/).slice(1),
                        n = this.extractLocation(t.pop());
                    return {
                        function: t.join(" ") || void 0,
                        file: ["eval", "<anonymous>"].indexOf(n[0]) > -1 ? void 0 : n[0],
                        line: this._parseInt(n[1]),
                        column: this._parseInt(n[2])
                    }
                }, this)
            }

            function a(e) {
                return e.stack.split("\n").filter(function(e) {
                    return !e.match(g)
                }, this).map(function(e) {
                    e.indexOf(" > eval") > -1 && (e = e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g, ":$1"));
                    if (-1 === e.indexOf("@") && -1 === e.indexOf(":")) return {
                        function: e
                    };
                    var t = e.split("@"),
                        n = this.extractLocation(t.pop());
                    return {
                        function: t.join("@") || void 0,
                        file: n[0],
                        line: this._parseInt(n[1]),
                        column: this._parseInt(n[2])
                    }
                }, this)
            }

            function r(e) {
                return !e.stacktrace || e.message.indexOf("\n") > -1 && e.message.split("\n").length > e.stacktrace.split("\n").length ? this.parseOpera9(e) : e.stack ? this.parseOpera11(e) : this.parseOpera10(e)
            }

            function s(e) {
                for (var t = /Line (\d+).*script (?:in )?(\S+)/i, n = e.message.split("\n"), i = [], o = 2, a = n.length; o < a; o += 2) {
                    var r = t.exec(n[o]);
                    r && i.push({
                        file: r[2],
                        line: this._parseInt(r[1])
                    })
                }
                return i
            }

            function l(e) {
                for (var t = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, n = e.stacktrace.split("\n"), i = [], o = 0, a = n.length; o < a; o += 2) {
                    var r = t.exec(n[o]);
                    r && i.push({
                        function: r[3] || void 0,
                        file: r[2],
                        line: this._parseInt(r[1])
                    })
                }
                return i
            }

            function d(e) {
                return e.stack.split("\n").filter(function(e) {
                    return !!e.match(c) && !e.match(/^Error created at/)
                }, this).map(function(e) {
                    var t, n = e.split("@"),
                        i = this.extractLocation(n.pop()),
                        o = n.shift() || "",
                        a = o.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^\)]*\)/g, "") || void 0;
                    o.match(/\(([^\)]*)\)/) && (t = o.replace(/^[^\(]+\(([^\)]*)\)$/, "$1"));
                    void 0 === t || "[arguments not available]" === t || t.split(",");
                    return {
                        function: a,
                        file: i[0],
                        line: this._parseInt(i[1]),
                        column: this._parseInt(i[2])
                    }
                }, this)
            }
            var c = /(^|@)\S+\:\d+/,
                u = /^\s*at .*(\S+\:\d+|\(native\))/m,
                g = /^(eval@)?(\[native code\])?$/;
            e.parse = t;
            e.extractLocation = n;
            e._parseInt = i;
            e.parseV8OrIE = o;
            e.parseFFOrSafari = a;
            e.parseOpera = r;
            e.parseOpera9 = s;
            e.parseOpera10 = l;
            e.parseOpera11 = d
        }(e.ErrorStackParser || (e.ErrorStackParser = {}))
    }(e.Utilities || (e.Utilities = {}))
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    ! function(t) {
        ! function(n) {
            function i(t) {
                var n = {
                    referrer: document.referrer,
                    page: document.URL,
                    page_title: document.title
                };
                if (e.Config.isInIFrame) try {
                    n.page = window.top.document.URL;
                    n.referrer = window.top.document.referrer;
                    n.page_title = window.top.document.title
                } catch (e) {
                    n.page = document.referrer;
                    n.referrer = null;
                    n.page_title = "3rd Party iFrame"
                }
                n = Object.assign(n, t);
                return a(n)
            }

            function o(e, n) {
                var o = e || t.Constants.URL_IP_API;
                o += i(n);
                return o
            }

            function a(e) {
                var t = "?";
                for (var n in e) e.hasOwnProperty(n) && void 0 !== e[n] && (t += n + "=" + encodeURIComponent(e[n]) + "&");
                t = t.substring(0, t.length - 1);
                return t
            }
            n.buildApiParamString = i;
            n.buildApiUrl = o;
            n.buildQueryString = a
        }(t.Api || (t.Api = {}))
    }(e.Utilities || (e.Utilities = {}))
}(Demandbase || (Demandbase = {}));
! function(e) {
    e.Demandbase.utils = e.Demandbase.utils || {};
    Object.assign(e.Demandbase.utils, e.Demandbase.utils, {
        buildApiParamString: Demandbase.Utilities.Api.buildApiParamString,
        buildApiUrl: Demandbase.Utilities.Api.buildApiUrl,
        buildQueryString: Demandbase.Utilities.Api.buildQueryString
    })
}(window);
var Demandbase;
! function(e) {
    ! function(t) {
        ! function(t) {
            function n(n) {
                for (var i = 0; i < t.callbackStack.length; i++) ! function(i) {
                    var o = t.callbackStack[i];
                    e.ErrorReporter.wrap(function() {
                        o.call(e, n)
                    })()
                }(i)
            }

            function i(t) {
                e.IpApi.CompanyProfile = e.Utilities.flatten(t);
                this.callback(t)
            }

            function o(n) {
                if (-1 === t.callbackStack.indexOf(n)) {
                    t.callbackStack.push(n);
                    e.IpApi.CompanyProfile && e.ErrorReporter.wrap(function() {
                        n.call(e, e.IpApi.CompanyProfile)
                    })()
                }
            }
            t.callbackStack = [];
            t.callback = n;
            t.domScriptCallback = i;
            t.registerCallback = o
        }(t.Callbacks || (t.Callbacks = {}))
    }(e.Utilities || (e.Utilities = {}))
}(Demandbase || (Demandbase = {}));
! function(e) {
    e.Demandbase.utils = e.Demandbase.utils || {};
    Object.assign(e.Demandbase.utils, e.Demandbase.utils, {
        callback: Demandbase.Utilities.Callbacks.callback.bind(Demandbase.Utilities.Callbacks),
        registerCallback: Demandbase.Utilities.Callbacks.registerCallback.bind(Demandbase.Utilities.Callbacks)
    })
}(window);
var Demandbase;
! function(e) {
    ! function(t) {
        ! function(t) {
            t.QS_USE_TEST_DOMAIN = "db_useTestDomain";
            t.QS_QUERY_DOMAIN = "db_domain";
            t.QS_ENABLE_LOG = "db_logging";
            t.DFLT_NON_COMPANY = "(Non-Company Visitor)";
            t.DFLT_AW_EMPTY = "(AccountWatch Empty)";
            t.DFLT_NON_AW = "(Non-AccountWatch Visitor)";
            t.DFLT_EVENT_TYPE = "click";
            t.URL_IP_API = "api.company-target.com/api/v2/ip.json";
            t.URL_DOMAIN_API = "api.demandbase.com/api/v1/domain.json";
            t.URL_AD_PIXEL = e.Config.tokens.URL_AD_PIXEL || "d.company-target.com/pixel?type=js&id=";
            t.URL_BW_AD_PIXEL = e.Config.tokens.URL_BW_AD_PIXEL || "match.prod.bidr.io/cookie-sync/demandbase";
            t.URL_LR_AD_PIXEL = e.Config.tokens.URL_LR_AD_PIXEL || "id.rlcdn.com/464526.gif";
            t.PARDOT_VISITOR_COOKIE_REGEX = /^visitor_id[\d]+$/;
            t.NON_HUMAN_DEVICES = [/adsbot-google/i, /googlebot/i];
            t.URL_CURRENT = function() {
                var t = document.URL;
                e.Config.isInIFrame && (t = document.referrer);
                t = encodeURIComponent(t);
                return t
            }();
            t.PROTOCOL = function() {
                return "https:" == document.location.protocol ? "https://" : "http://"
            }()
        }(t.Constants || (t.Constants = {}))
    }(e.Utilities || (e.Utilities = {}))
}(Demandbase || (Demandbase = {}));
! function(e) {
    e.Demandbase.utils = e.Demandbase.utils || {};
    Object.assign(e.Demandbase.utils, e.Demandbase.utils, {
        tokens: Demandbase.Utilities.Constants
    })
}(window);
var Demandbase;
! function(e) {
    var t = function() {
        function t(t) {
            void 0 === t && (t = {});
            this.name = t.name || "";
            this.modify = t.modify || null;
            this.segments = t.segments || [];
            this.url = t.url || [];
            this.modify || (this.modify = function() {
                e.Utilities.Logging.log("DBContent: modify function not defined")
            });
            "string" == typeof this.segments && (this.segments = [this.segments]);
            "string" == typeof this.url && (this.url = [this.url])
        }
        t.prototype.run = function() {
            var t = !1;
            for (var n in this.url)
                if (this.url.hasOwnProperty(n)) {
                    var i = this.url[n];
                    e.Utilities.isCurrentPage(i) && (t = !0)
                } if (t) {
                var o = !1;
                for (var n in this.segments)
                    if (this.segments.hasOwnProperty(n)) {
                        var a = this.segments[n],
                            r = window.Demandbase.Segments[a];
                        void 0 !== r && r && (o = !0)
                    } if (!o) {
                    e.Utilities.Logging.log("DBContent modify " + this.name + " not fired.  Segment " + a);
                    return !1
                }
                e.Utilities.Logging.log("DBContent: running modify function for: " + this.name);
                this.modify.call(document);
                return !0
            }
            e.Utilities.Logging.log("DBContent modify " + this.name + " not fired. no URL match with: " + this.url);
            return !1
        };
        return t
    }();
    e.DBContent = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    ! function(t) {
        function n(t) {
            if (!t) return !1;
            var n = ["name", "segments", "pages", "modify"];
            if ("function" != typeof t.modify) {
                e.Utilities.Logging.log("DBContentBuilder: invalid type in config.");
                return !1
            }
            for (var i = 0; i < n.length; i++)
                if (void 0 === t[n[i]]) {
                    e.Utilities.Logging.log("DBContentBuilder: invalid config missing: " + n[i]);
                    return !1
                } return !0
        }

        function i(t) {
            if (n(t)) {
                "string" == typeof t.pages ? t.url = [t.pages] : t.url = t.pages;
                "string" == typeof t.segments && (t.segments = [t.segments]);
                return new e.DBContent(t)
            }
            return null
        }
        t.isValid = n;
        t.build = i
    }(e.DBContentBuilder || (e.DBContentBuilder = {}))
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    ! function(t) {
        ! function(t) {
            function n(t) {
                var n = !0;
                if (!o(t)) {
                    e.Utilities.Logging.log("Event not added.");
                    return !1
                }
                var a = t.type || e.Utilities.Constants.DFLT_EVENT_TYPE,
                    r = t.elements,
                    s = r.constructor;
                if (s !== HTMLCollection && s !== NodeList) return i(t.elements, a, t.listener);
                for (var l in r) {
                    var d = !1;
                    if (r.hasOwnProperty(l)) {
                        d = i(r[l], a, t.listener);
                        if (!d) {
                            n = !1;
                            e.Utilities.Logging.log("Event not added to" + r[l])
                        }
                    }
                }
                return n
            }

            function i(t, n, i) {
                if (!t) {
                    e.Utilities.Logging.log("Event not registered - invalid element/s.");
                    return null
                }
                t.jquery && (t = t[0]);
                e.Utilities.addEventListener(t, n, i);
                e.Utilities.Logging.log("Event Listener bind to: " + t + " on event " + n);
                return !0
            }

            function o(t) {
                for (var n = !1, i = ["elements", "listener"], o = t.elements || null, a = t.listener || null, r = 0; r < i.length; r++)
                    if (void 0 === t[i[r]] || !t[i[r]]) {
                        e.Utilities.Logging.log("Invalid Event object. Missing: " + i[r]);
                        return !1
                    } if ("function" != typeof a) {
                    e.Utilities.Logging.log('Invalid Event: "listener" must be a function. Got (' + a + ")");
                    return !1
                }
                o instanceof Node || o instanceof NodeList || o instanceof HTMLElement || o instanceof HTMLCollection || o instanceof Window || o instanceof Document || "function" == typeof o || void 0 !== window.Demandbase.jQuery && o instanceof window.Demandbase.jQuery ? n = !0 : e.Utilities.Logging.log("Invalid Event:  element: " + o + ' has type: "' + o.constructor + '" which is not proper instance type.');
                return n
            }
            t.add = n;
            t._attachListener = i;
            t.isValid = o
        }(t.Events || (t.Events = {}))
    }(e.Utilities || (e.Utilities = {}))
}(Demandbase || (Demandbase = {}));
! function(e) {
    e.Demandbase.utils = e.Demandbase.utils || {};
    Object.assign(e.Demandbase.utils, e.Demandbase.utils, {
        events: Demandbase.Utilities.Events
    })
}(window);
var Demandbase;
! function(e) {
    ! function(t) {
        ! function(t) {
            function n(e) {
                i(e)
            }

            function i(t) {
                (e.Config.logging || "true" === e.Utilities.getQueryParam(e.Utilities.Constants.QS_ENABLE_LOG)) && console.log("DB: " + t)
            }
            t.logging = !1;
            t.debug = !1;
            t.alert = n;
            t.log = i
        }(t.Logging || (t.Logging = {}))
    }(e.Utilities || (e.Utilities = {}))
}(Demandbase || (Demandbase = {}));
! function(e) {
    e.Demandbase.utils = e.Demandbase.utils || {};
    Object.assign(e.Demandbase.utils, e.Demandbase.utils, {
        logging: Demandbase.Utilities.Logging.logging,
        debug: Demandbase.Utilities.Logging.debug,
        alert: Demandbase.Utilities.Logging.alert.bind(Demandbase.Utilities.Logging),
        log: Demandbase.Utilities.Logging.log.bind(Demandbase.Utilities.Logging)
    })
}(window);
var Demandbase;
! function(e) {
    ! function(t) {
        function n(e, t) {
            var n = {};
            t.cookie.split(";").forEach(function(t) {
                var i = t.split("="),
                    o = i[0].trim();
                e.test(o) && i.length > 1 && (n[o] = i[1].trim())
            });
            return n
        }

        function i(e, t, n) {
            e.addEventListener ? e.addEventListener(t, n) : e.attachEvent && e.attachEvent(t, n)
        }

        function o() {
            return window.top !== window.self
        }

        function a(e) {
            for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
            for (var i = e, o = 0, a = t; o < a.length; o++) {
                var r = a[o];
                if (void 0 === i) return;
                i = "function" == typeof r ? r(i) : i[r]
            }
            return i
        }

        function r(e) {
            for (var t in e) {
                var n = e[t];
                if ("object" == typeof n && null !== n && e.hasOwnProperty(t)) {
                    for (var i in n) e[t + "_" + i] = n[i];
                    delete e[t]
                }
            }
            return e
        }

        function s(t, n) {
            var i = {
                    city: "registry_city",
                    state: "registry_state",
                    zip: "registry_zip_code",
                    country: "registry_country_code",
                    country_name: "registry_country",
                    latitude: "registry_latitude",
                    longitude: "registry_longitude"
                },
                o = e.Config.nonCompanyDefault || e.Utilities.Constants.DFLT_NON_COMPANY,
                a = e.Config.emptyWatchDefault || e.Utilities.Constants.DFLT_AW_EMPTY,
                r = i[n] || "",
                s = t[n] || t[r] || o,
                l = (t.company_name || o) !== o,
                d = Object.keys(t).some(function(e) {
                    return 0 === e.indexOf("watch_list_")
                });
            if (!1 === t[n]) return "false";
            if (-1 !== n.indexOf("watch_list_") && l) {
                d || (a = e.Config.nonWatchDefault || e.Utilities.Constants.DFLT_NON_AW);
                s = t[n] || a
            }
            return s
        }

        function l() {
            return document.readyState
        }

        function d(e) {
            return document.getElementById(e) || document.getElementsByName(e)[0] || null
        }

        function c(e, t) {
            var t = t || window || {
                    location: {
                        search: "",
                        hash: ""
                    }
                },
                n = {},
                i = t.location.search.substring(1) || t.location.hash && t.location.hash.split("?")[1];
            if (!i) return "";
            for (var o = i.split("&"), a = 0; a < o.length; a++) {
                var r = o[a].split("="),
                    s = r[0],
                    l = r[1];
                n[s] = l
            }
            return n[e] || ""
        }

        function u(t, n) {
            if (t) {
                e._loadedScripts = e._loadedScripts || {};
                if (!e._loadedScripts[t]) {
                    e._loadedScripts[t] = !0;
                    var i = document.createElement("script"),
                        o = document.getElementsByTagName("script")[0];
                    i.async = !0;
                    i.id = n || "";
                    i.src = "https://" + t.replace(/(^\/\/)|(^http:\/\/)|(^https:\/\/)/, "");
                    o.parentNode.insertBefore(i, o)
                }
            }
        }

        function g() {
            try {
                if (window.navigator.cookieEnabled) {
                    document.cookie = "COOKIE_TEST=TEST";
                    if (-1 !== document.cookie.indexOf("COOKIE_TEST=TEST")) {
                        document.cookie = "COOKIE_TEST=PASSED_TEST";
                        return !0
                    }
                }
                return !1
            } catch (e) {
                return !1
            }
        }

        function f(t) {
            var n = document.location.href;
            e.Config.isInIFrame && (n = document.referrer);
            t && (n = t);
            return n
        }

        function m(e, t) {
            function n(e) {
                return 0 === e.indexOf("//") ? e.substring("//".length, e.length) : e.replace(/^.*?:\/\//g, "")
            }

            function i(e) {
                return e.replace(/^(www\.)/g, "")
            }

            function o(e) {
                -1 !== e.indexOf(a, e.length - a.length) && (e = e.substring(0, e.length - 1)); - 1 !== e.indexOf("/", e.length - "/".length) && (e = e.substring(0, e.length - 1));
                return e
            }
            var a = "#",
                r = document.location.hash,
                s = document.location.search,
                l = f(t);
            if (t) {
                var d = t.indexOf(a); - 1 === d && (d = t.length);
                r = t.substring(t.indexOf(a), t.length);
                s = t.substring(t.indexOf("?"), d);
                l = t
            }
            e = n(e);
            e = i(e);
            e = o(e);
            l = n(l);
            l = i(l);
            l = o(l); - 1 === e.indexOf(a) && -1 !== l.indexOf(a) && (l = l.substring(0, l.length - r.length)); - 1 === e.indexOf("?") && -1 !== l.indexOf("?") && (l = l.substring(0, l.length - s.length));
            l = o(l);
            return l === e
        }

        function p(e, t) {
            if (!e) return !1;
            if (e.length <= 0) return !1;
            "^" !== e[0] && (e = "^" + e);
            "$" !== e[e.length - 1] && (e += "$");
            var n = f(t);
            return new RegExp(e).test(n)
        }

        function h(e) {
            try {
                var t = window[e.toString()];
                t.setItem("STORAGE_CHECK", "STORAGE_CHECK");
                t.getItem("STORAGE_CHECK");
                t.removeItem("STORAGE_CHECK");
                return !0
            } catch (e) {
                return !1
            }
        }

        function b() {
            try {
                return window.navigator.userAgent.indexOf("MSIE ") > 0
            } catch (e) {
                return !0
            }
        }

        function y(e) {
            return e ? "#" + e.replace(/(:|\.|\[|\]|,)/g, "\\$1") : null
        }

        function _(e, t) {
            for (var n = 0; n < t.length; n++)
                if (e.includes(t[n])) return !0;
            return !1
        }

        function v(e) {
            return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)
        }

        function D(e) {
            return e.replace(/[.*+?^${}()|[\]\\\/]/g, "\\$&")
        }

        function C(e) {
            for (var t = [], n = 0; n < e.length; n++) t.push(e[n]);
            return t
        }

        function w(e) {
            return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g, function(e, t) {
                return String.fromCharCode(parseInt("0x" + t, 16))
            }))
        }
        t.getCookiesByRegex = n;
        t.addEventListener = i;
        t.detectIFrame = o;
        t.dig = a;
        t.flatten = r;
        t.getAttributeValue = s;
        t.getDocumentReadyState = l;
        t.getElementByIdOrName = d;
        t.getQueryParam = c;
        t.insertScript = u;
        t.isCookieEnabled = g;
        t.isCurrentPage = m;
        t.isCurrentPageRegex = p;
        t.isStorageEnabled = h;
        t.isOldBrowserOrUserAgentUnavailable = b;
        t.jqid = y;
        t.includesAny = _;
        t.isValidEmail = v;
        t.escapeRegExp = D;
        t.nodeListToArray = C;
        t.b64EncodeUnicode = w
    }(e.Utilities || (e.Utilities = {}))
}(Demandbase || (Demandbase = {}));
! function(e) {
    e.Demandbase.utils = e.Demandbase.utils || {};
    Object.assign(e.Demandbase.utils, e.Demandbase.utils, Demandbase.Utilities);
    Object.assign(e.Demandbase.utils, Demandbase.utils, {
        loadScript: Demandbase.Utilities.insertScript,
        flattenData: Demandbase.Utilities.flatten,
        getAttrValue: Demandbase.Utilities.getAttributeValue
    })
}(window);
var Demandbase;
! function(e) {
    var t = function() {
        function t(e, t, n) {
            this.config = e;
            this.moduleNameToConstructorMap = t;
            this.nameSpace = n
        }
        t.prototype.build = function() {
            this._parseConfig()
        };
        t.prototype._parseConfig = function() {
            var t = this;
            Object.keys(this.config).forEach(function(n) {
                var i = t._testConfigForKey(n);
                if (i && 3 === i.length) {
                    var o = i[1],
                        a = t.moduleNameToConstructorMap[o];
                    if (t.nameSpace[n]) {
                        e.ErrorReporter.send(new Error("Failed to dynamically create configuration for " + n + " due to previously existing configuration with the same name."));
                        return
                    }
                    if (!a) {
                        e.ErrorReporter.send(new Error("No constructor available in moduleNameToConstructor map for module: " + o));
                        return
                    }
                    t.nameSpace[n] = new a(t.config[n]);
                    t.nameSpace[n].isEnabled() && t.nameSpace[n].initialize()
                }
            })
        };
        t.prototype._testConfigForKey = function(e) {
            return t.REGEX_CUSTOM_MODULE_NAME.exec(e)
        };
        t.REGEX_CUSTOM_MODULE_NAME = /(.*)__(.*)/;
        return t
    }();
    e.ModuleFactory = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function() {
        function e() {
            this.configuration = {}
        }
        e.prototype.isEnabled = function() {
            return this.configuration.enabled
        };
        e.prototype.mergeConfigs = function() {
            for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
            Object.assign.apply(Object, [this.configuration].concat(e))
        };
        return e
    }();
    e.BaseModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.ADVERTISING_PIXEL_ID = "ad";
            i.CONVERSION_PIXEL_ID = "cn";
            i.RETARGETING_PIXEL_ID = "rt";
            i.DEFAULT_CONFIGURATION = {
                enabled: !0,
                key: null,
                reportingOnly: !1,
                campaigns: [],
                enableBW: !0,
                enableLR: !0,
                enableIPONWEB: !0,
                pixels: {
                    ad: null,
                    rt: null,
                    cn: null
                },
                conversionTriggers: {
                    pages: [],
                    pagesRegex: [],
                    events: {}
                }
            };
            i.configuration = {};
            i.trackConversion = i.trackConversionListener;
            i.load = i.initialize;
            i.loadPixels = i.insertPixels;
            i._loadPixel = i.insertPixel;
            i._setCampaign = i.loadCampaign;
            i._setEvents = i.registerEvents;
            t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, n || e.Config.Advertising);
            t.prototype.mergeConfigs.call(i, n || e.Config.ads);
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            this.loadCampaign();
            this.insertPixels();
            this.registerEvents();
            !0 === this.configuration.reportingOnly && this.configuration.key && this.configuration.key !== e.Config.key && e.IpApiReportingOnly.get(this.configuration.key, !1)
        };
        n.prototype.isConversionPage = function() {
            var t = this.configuration.conversionTriggers.pages;
            t || (t = []);
            for (var n = 0; n < t.length; n++) {
                var i = t[n];
                if (e.Utilities.isCurrentPage(i)) return !0
            }
            var o = this.configuration.conversionTriggers.pagesRegex;
            o || (o = []);
            for (var n = 0; n < o.length; n++) {
                var a = o[n];
                if (e.Utilities.isCurrentPageRegex(a)) return !0
            }
            return !1
        };
        n.prototype.insertPixels = function() {
            if (this.configuration.enableIPONWEB) {
                this.insertPixel(this.ADVERTISING_PIXEL_ID);
                this.isConversionPage() ? this.insertPixel(this.CONVERSION_PIXEL_ID) : this.insertPixel(this.RETARGETING_PIXEL_ID)
            }
            this.configuration.enableBW && this.insertBWPixel(this.ADVERTISING_PIXEL_ID);
            this.configuration.enableLR && this.insertLRPixel(this.ADVERTISING_PIXEL_ID)
        };
        n.prototype.createAndAppendPixel = function(e, t) {
            var n = document.getElementsByTagName("body")[0] || document.getElementsByTagName("head")[0],
                i = document.createElement("img");
            i.setAttribute("style", "display:none");
            i.setAttribute("alt", "");
            i.setAttribute("aria-hidden", "true");
            i.id = e;
            i.src = t;
            n.appendChild(i)
        };
        n.prototype.insertLRPixel = function(t) {
            if (this.configuration.pixels[t]) {
                var n = "db_lr_pixel_" + t,
                    i = e.Utilities.Constants.PROTOCOL + e.Utilities.Constants.URL_LR_AD_PIXEL;
                this.createAndAppendPixel(n, i)
            }
        };
        n.prototype.insertBWPixel = function(t) {
            if (this.configuration.pixels[t]) {
                var n = "db_bw_pixel_" + t,
                    i = e.Utilities.Constants.PROTOCOL + e.Utilities.Constants.URL_BW_AD_PIXEL;
                this.createAndAppendPixel(n, i)
            }
        };
        n.prototype.insertPixel = function(t) {
            var n = this.configuration.pixels[t];
            if (n) {
                var i = "db_pixel_" + t,
                    o = e.Utilities.Constants.PROTOCOL + e.Utilities.Constants.URL_AD_PIXEL + n + "&page=" + e.Utilities.Constants.URL_CURRENT;
                this.createAndAppendPixel(i, o)
            }
        };
        n.prototype.loadCampaign = function() {
            for (var t = this.configuration.campaigns, n = 0; n < t.length; n++) {
                for (var i = t[n], o = 0; i.pages && o < i.pages.length; o++) {
                    var a = i.pages[o];
                    if (e.Utilities.isCurrentPage(a)) {
                        this.configuration.pixels = i.pixels;
                        this.configuration.conversionTriggers = i.conversionTriggers;
                        return
                    }
                }
                for (var o = 0; i.pagesRegex && o < i.pagesRegex.length; o++) {
                    var r = i.pagesRegex[o];
                    if (e.Utilities.isCurrentPageRegex(r)) {
                        this.configuration.pixels = i.pixels;
                        this.configuration.conversionTriggers = i.conversionTriggers;
                        return
                    }
                }
            }
        };
        n.prototype.registerEvents = function() {
            var t = this.configuration.conversionTriggers.events;
            for (var n in t)
                if (t.hasOwnProperty(n)) {
                    var i = t[n];
                    i.listener || (i.trackConversion ? i.listener = this.trackConversionListener : i.virtualPageview && (i.listener = this.virtualPageViewListener));
                    e.Utilities.Events.add(i)
                }
        };
        n.prototype.trackConversionListener = function() {
            e.Advertising.insertPixel(e.Advertising.CONVERSION_PIXEL_ID)
        };
        n.prototype.virtualPageViewListener = function() {
            e.Advertising.insertPixels();
            e.IpApi.get(void 0, !1)
        };
        return n
    }(e.BaseModule);
    e.AdvertisingModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.DEFAULT_CONFIGURATION = {
                enabled: !0,
                assetList: ["api.demandbase.com/autocomplete/widget.js", "api.demandbase.com/autocomplete/widget.min.js", "autocomplete.demandbase.com/autocomplete/widget.js", "autocomplete.demandbase.com/autocomplete/widget.min.js", "scripts.demandbase.com/formWidget.js", "scripts.demandbase.com/formWidgetDebug.js", "scripts.demandbase.com/demandbase-sdk.js", "scripts.demandbase.com/demandbase-sdk-debug.js", "scripts.demandbase.com/forms.js", "scripts.demandbase.com/forms.min.js"]
            };
            i.ERROR_MESSAGE_PREFIX = "Legacy Asset Detected: ";
            i.configuration = {};
            i.values = {};
            t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, n || e.Config.AssetReporter);
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            "complete" === e.Utilities.getDocumentReadyState() ? this.read() : e.Utilities.addEventListener(window, "load", e.ErrorReporter.wrap(this.read.bind(this)))
        };
        n.prototype.read = function() {
            for (var t = this.configuration.assetList.length, n = 0; n < t; n++) {
                var i = this.configuration.assetList[n];
                if (document.querySelector("script[src='" + e.Utilities.Constants.PROTOCOL + i + "']")) {
                    this.values[i] = !0;
                    this.send(i)
                } else this.values[i] = !1
            }
        };
        n.prototype.send = function(t) {
            var n = new Error(this.ERROR_MESSAGE_PREFIX + t);
            e.ErrorReporter.send(n)
        };
        return n
    }(e.BaseModule);
    e.AssetReporterModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.DEFAULT_CONFIGURATION = {
                enabled: !0
            };
            i.configuration = {};
            i.mods = {};
            t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, n || e.Config.Content);
            Object.assign(i.configuration, n || e.Config.content);
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            e.Utilities.Callbacks.registerCallback(this.callback.bind(this));
            this.setup()
        };
        n.prototype.callback = function() {
            this.setup();
            this.modify()
        };
        n.prototype.setup = function() {
            if (void 0 !== e.Config.content)
                for (var t in e.Config.content) {
                    var n = e.Config.content[t],
                        i = window.Demandbase.DBContentBuilder.build(n);
                    i && (this.mods[i.name] = i)
                }
        };
        n.prototype.modify = function() {
            var t = this;
            return e.ErrorReporter.wrap(function() {
                for (var e in t.mods)
                    if (t.mods.hasOwnProperty(e)) {
                        var n = t.mods[e],
                            i = n.run();
                        i && !0
                    }
            })()
        };
        return n
    }(e.BaseModule);
    e.ContentModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.DEFAULT_CONFIGURATION = {
                enabled: !1,
                formInputSelectors: ['input[type="text"]', 'input[type="email"]'],
                inputSearchTerms: ["email", "user", "login"]
            };
            i.configuration = {};
            i.baseUrl = "https://segments.company-target.com";
            i.activeSetTimeout = 0;
            t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, n || e.Config.EmailDomainReporter);
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            this.sendDataIfAlreadyPresent();
            this.attachListenersIfDocumentReady()
        };
        n.prototype.sendDataIfAlreadyPresent = function() {
            var t = this,
                n = this.suspectedEmailInputs();
            n.length < 1 || n.forEach(function(n) {
                var i = n.value;
                if (e.Utilities.isValidEmail(i)) {
                    var o = i.split("@")[1].toLowerCase();
                    t.send(o)
                }
            })
        };
        n.prototype.attachListenersIfDocumentReady = function() {
            var t = this;
            "loading" !== e.Utilities.getDocumentReadyState() ? this.suspectedEmailInputs().forEach(function(n) {
                n.addEventListener("input", function() {
                    var i = n.value;
                    if (e.Utilities.isValidEmail(i)) {
                        var o = i.split("@")[1].toLowerCase();
                        window.clearTimeout(t.activeSetTimeout);
                        t.activeSetTimeout = window.setTimeout(function() {
                            t.send(o)
                        }, 400)
                    }
                })
            }) : document.addEventListener("DOMContentLoaded", this.attachListenersIfDocumentReady.bind(this))
        };
        n.prototype.suspectedEmailInputs = function() {
            var t = this;
            return e.Utilities.nodeListToArray(document.querySelectorAll(this.configuration.formInputSelectors.join(","))).map(function(e) {
                return e
            }).filter(function(n) {
                var i = n.name.toLowerCase(),
                    o = n.id.toLowerCase(),
                    a = t.configuration.inputSearchTerms;
                return !!e.Utilities.includesAny(i, a) || !!e.Utilities.includesAny(o, a)
            })
        };
        n.prototype.send = function(t) {
            var n;
            window.XMLHttpRequest ? n = new XMLHttpRequest : window.ActiveXObject && (n = new ActiveXObject("Microsoft.XMLHTTP"));
            var i = e.Config.key || e.Utilities.dig(e.Config, "analytics", "key") || e.Utilities.dig(e.Config, "ads", "key") || e.Utilities.dig(e.Config, "forms", "key") || "",
                o = e.Utilities.b64EncodeUnicode("vendor=mariposa&p1=" + t + "&token=" + i),
                a = this.baseUrl + "/l/" + o;
            try {
                n.open("GET", a);
                n.withCredentials = !0;
                n.setRequestHeader("Content-type", "application/json");
                n.send()
            } catch (e) {
                throw e
            }
        };
        n.prototype.responseHandler = function(e) {};
        return n
    }(e.BaseModule);
    e.EmailDomainReporterModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.VERSION = "0.0.0";
            i.PROJECT_ID = "141580";
            i.PROJECT_KEY = "9a0a3519e930259f5886a7af53b0ccaa";
            i.SENTRY_PROJECT_ID = "1190150";
            i.SENTRY_PUBLIC_KEY = "3c9d467f8a9d4295b0f8320ae852091d";
            i.DEFAULT_CONFIGURATION = {
                environment: "production",
                ignorableErrors: []
            };
            i.configuration = {};
            t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, n || e.Config.ErrorReporter);
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {};
        n.prototype.send = function(e) {
            if (!(this.configuration.ignorableErrors.indexOf(e.name) > -1 || this.configuration.ignorableErrors.indexOf(e.message) > -1)) {
                var t;
                window.XMLHttpRequest ? t = new XMLHttpRequest : window.ActiveXObject && (t = new ActiveXObject("Microsoft.XMLHTTP"));
                var n = "https://sentry.io/api/" + this.SENTRY_PROJECT_ID + "/store/?sentry_version=7&sentry_key=" + this.SENTRY_PUBLIC_KEY;
                try {
                    t.open("POST", n, !0);
                    t.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
                    t.send(this.formatMessage(e, !0))
                } catch (e) {}
            }
        };
        n.prototype.wrap = function(t) {
            var n = this;
            if ("function" != typeof t) throw new Error("Invalid Function: " + t);
            return function() {
                for (var i = [], o = 0; o < arguments.length; o++) i[o] = arguments[o];
                try {
                    if (void 0 !== t && "function" == typeof t.apply) return t.apply(n, i)
                } catch (t) {
                    n.send(t);
                    e.Utilities.Logging.alert("Error: " + t + "\n" + t.stack)
                }
            }
        };
        n.prototype.formatMessage = function(e, t) {
            void 0 === t && (t = !1);
            var n = this.parseError(e),
                i = this.parseContext(),
                o = this.parseEnviroment(),
                a = this.parseSession(),
                r = this.parseParams();
            if (t) {
                var s = this.formatErrorForSentry(n);
                return JSON.stringify({
                    logger: i.notifier.name,
                    platform: "javascript",
                    release: i.version,
                    environment: i.environment,
                    request: {
                        url: i.url
                    },
                    contexts: {
                        browser: {
                            userAgent: i.userAgent
                        }
                    },
                    tags: {
                        clientId: o.config.clientId
                    },
                    extra: {
                        readyState: i.readyState,
                        config: o.config,
                        companyProfile: a
                    },
                    exception: {
                        values: [s]
                    }
                })
            }
            return JSON.stringify({
                errors: [n],
                context: i,
                environment: o,
                session: a,
                params: r
            })
        };
        n.prototype.formatErrorForSentry = function(e) {
            for (var t = [], n = 0, i = e.backtrace; n < i.length; n++) {
                var o = i[n];
                t.push({
                    function: o.function,
                    filename: o.file,
                    lineno: o.line,
                    colno: o.column
                })
            }
            return {
                type: e.type,
                value: e.message,
                stacktrace: {
                    frames: t
                }
            }
        };
        n.prototype.parseError = function(t) {
            return {
                type: t.name,
                message: t.message,
                backtrace: e.Utilities.ErrorStackParser.parse(t)
            }
        };
        n.prototype.parseContext = function() {
            return {
                notifier: {
                    name: "ErrorReporterModule",
                    version: this.VERSION
                },
                environment: this.configuration.environment,
                version: e.version,
                url: window.location.href,
                userAgent: navigator.userAgent,
                rootDirectory: window.location.origin,
                readyState: document.readyState
            }
        };
        n.prototype.parseEnviroment = function() {
            return {
                config: e.Utilities.dig(e, "Config")
            }
        };
        n.prototype.parseSession = function() {
            return {
                companyProfile: e.Utilities.dig(e, "IP", "CompanyProfile")
            }
        };
        n.prototype.parseParams = function() {
            return {}
        };
        return n
    }(e.BaseModule);
    e.ErrorReporterModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(e) {
            var n = t.call(this) || this;
            n.REMOTE_MODULE_URL = "tag.demandbase.com/shared/forms.min.js";
            n.DEFAULT_CONFIGURATION = {
                enabled: void 0,
                emailID: null,
                emailFields: []
            };
            n.configuration = {};
            n.inserted = !1;
            n.setConfiguration(e);
            return n
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            e.Utilities.Callbacks.registerCallback(this.whenReady.bind(this))
        };
        n.prototype.whenReady = function() {
            this.isMktoForms2Installed() ? window.MktoForms2.whenReady(e.ErrorReporter.wrap(this.load.bind(this))) : this.load()
        };
        n.prototype.load = function() {
            var t = !1;
            if ("function" == typeof e.Config.isFormPage) {
                t = e.Config.isFormPage();
                this.setConfiguration();
                t = e.Config.isFormPage()
            } else t = this.isFormPage();
            t && !this.inserted && this.insertForms()
        };
        n.prototype.isFormPage = function() {
            var t = this.configuration.emailFields;
            this.configuration.emailID && t.push(this.configuration.emailID);
            for (var n = 0; n < t.length; n++)
                if (e.Utilities.getElementByIdOrName(t[n])) return !0;
            return !1
        };
        n.prototype.isMktoForms2Installed = function() {
            return void 0 !== window.MktoForms2 && void 0 !== window.MktoForms2.whenReady
        };
        n.prototype.insertForms = function() {
            this.inserted = !0;
            e.Connectors.initWebForm = this.initializeWebForm;
            e.Utilities.insertScript(e.FormsLoader.REMOTE_MODULE_URL, "db_form_module")
        };
        n.prototype.initializeWebForm = function(t) {
            t = t || e.Config.forms || e.Config.Forms || {};
            window.Demandbase.Connectors.WebForm.connect(t)
        };
        n.prototype.setConfiguration = function(n) {
            t.prototype.mergeConfigs.call(this, this.DEFAULT_CONFIGURATION, n || e.Config.Forms);
            void 0 === this.configuration.enabled && void 0 !== e.Config.Forms && (this.configuration.enabled = !0);
            t.prototype.mergeConfigs.call(this, this.DEFAULT_CONFIGURATION, n || e.Config.forms);
            void 0 === this.configuration.enabled && void 0 !== e.Config.forms && (this.configuration.enabled = !0)
        };
        return n
    }(e.BaseModule);
    e.FormsLoaderModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.REMOTE_MODULE_URL = "https://tag.demandbase.com/shared/siteOptimization.min.js";
            i.REMOTE_STYLESHEET_URL = "https://tag.demandbase.com/shared/siteOptimization.css";
            i.DEFAULT_CONFIGURATION = {
                additionalClass: null,
                backgroundColorClass: null,
                closedTitle: "Recommended Content",
                companyProfile: null,
                cssFileURL: i.REMOTE_STYLESHEET_URL,
                delay: 0,
                enabled: void 0,
                fadeIn: 0,
                fontColor: null,
                fontName: null,
                googleAnalyticsTrackerName: null,
                isGoogleAnalyticsEnabled: !1,
                isRippleAnimation: !0,
                isSwitchersDots: !0,
                isSwitchersArrows: !1,
                itemBackgroundColor: null,
                mainClass: "defaultBlock",
                openByDefault: !1,
                openTitle: null,
                recommendationApiURL: "https://site-optimization-api.company-target.com/recommend/",
                recommendationCompanyName: null,
                recommendationCompanyId: null,
                recommendationKey: null,
                recommendationsProtocol: "forceHTTPS",
                recommendationUrl: window.location.href,
                showCloseButton: !0,
                showCompanyName: !0,
                showFeedbackLink: !1,
                showIndicatorArrows: !0,
                showLogo: !0,
                showLogoWhenClosed: !0,
                showLogoWhenOpen: !1,
                showOnlyOnScroll: !1,
                showTitleWhenClosed: !0,
                showTitleWhenOpen: !0,
                switcherArrowsColor: "#444",
                state: {
                    openedRecommendationBlock: null
                },
                widgetBackgroundColor: null,
                widgetContainerId: null
            };
            i.configuration = {};
            i.inserted = !1;
            t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, n || e.Config.SiteOptimization);
            i.configuration.recommendationKey = e.Config.key;
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            e.Utilities.Callbacks.registerCallback(this.callback.bind(this))
        };
        n.prototype.callback = function(e) {
            this.configuration.companyProfile = e;
            this.insertSiteOptimization()
        };
        n.prototype.insertSiteOptimization = function() {
            this.inserted = !0;
            e.Utilities.insertScript(e.SiteOptimizationLoader.REMOTE_MODULE_URL, "db_site_optimization_module")
        };
        return n
    }(e.BaseModule);
    e.SiteOptimizationLoaderModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.DEFAULT_CONFIGURATION = {
                enabled: !0,
                events: null,
                fieldMap: null,
                googleAnalyticsClassicScope: 2,
                trackerName: null,
                trackerId: null
            };
            i.configuration = {};
            i.gType = "";
            i._cEvent = i.sendEvent;
            t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, n || e.Config.Google_Analytics);
            t.prototype.mergeConfigs.call(i, n || e.Config.analytics);
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            this._detectG();
            this._setTrackerName();
            this.configuration.fieldMap && "{}" !== JSON.stringify(this.configuration.fieldMap) && e.Utilities.Callbacks.registerCallback(this.callback.bind(this));
            this._setEvents()
        };
        n.prototype.sendEvent = function(t, n, i) {
            "ga" === this.gType ? this._trackEvent(t, n, i) : window.ga(function() {
                e.Connectors.Google_Analytics._sendEvent(t, n, i)
            });
            e.Utilities.Logging.log("Sent Custom Event:" + t + "/" + n + "/" + i)
        };
        n.prototype.getTrackerInfo = function() {
            var e = [],
                t = [];
            if (void 0 !== window._gaq && void 0 !== window._gat && "function" == typeof window._gat._getTrackers) {
                window._gat._getTrackers().forEach(function(t) {
                    t._getName().length > 0 && e.push({
                        type: "classic",
                        trackerId: t._getAccount(),
                        name: t._getName()
                    })
                })
            }
            if (void 0 !== window.ga && void 0 !== window.ga.getAll) {
                window.ga.getAll().forEach(function(e) {
                    t.push({
                        type: "universal",
                        trackerId: e.get("trackingId"),
                        name: e.get("name")
                    })
                })
            }
            return t.concat(e)
        };
        n.prototype._setTrackerName = function() {
            var e = this;
            if (!this.configuration.trackerName) {
                var t = void 0 !== window.ga;
                if (void 0 !== window._gat && "function" == typeof window._gat._getTrackers) {
                    var n = _gat._getTrackers();
                    if (void 0 !== n.length && n.length > 0) {
                        if (this.configuration.trackerId)
                            for (var i = 0; i < n.length; i++)
                                if (n[i]._getName().length > 0) {
                                    var o = n[i]._getName();
                                    if (n[i]._getAccount() === this.configuration.trackerId && !this.configuration.trackerName) {
                                        this.configuration.trackerName = o;
                                        return
                                    }
                                } var a = n[0] || null;
                        if (a && "function" == typeof a._getName) {
                            var r = a._getName() || null;
                            this.configuration.trackerName || (this.configuration.trackerName = r)
                        }
                    }
                }
                t && window.ga(function() {
                    var t = window.ga.getAll() || [];
                    if (e.configuration.trackerId)
                        for (var n = 0; n < t.length; n++) {
                            var i = t[n],
                                o = i.get("name");
                            if (i.get("trackingId") === e.configuration.trackerId) {
                                e.configuration.trackerName = o;
                                return
                            }
                        }
                    if (void 0 !== t.length && t.length > 0) {
                        var i = t[0] || null;
                        if (i && "function" == typeof i.get) {
                            var a = i.get("name") || null;
                            e.configuration.trackerName = a
                        }
                    }
                })
            }
        };
        n.prototype.callback = function(t) {
            try {
                if (!t) throw new Error("Error - no data passed to callback");
                var n = e.Connectors.Google_Analytics;
                n._detectG();
                n._setTrackerName();
                for (var i in n.configuration.fieldMap)
                    if (n.configuration.fieldMap.hasOwnProperty(i)) {
                        var o = +i,
                            a = n.configuration.fieldMap[i],
                            r = e.Utilities.getAttributeValue(t, a);
                        n._var(o, a, r.toString())
                    } n.sendEvent("Demandbase", "API Resolution", "IP API")
            } catch (t) {
                e.Utilities.Logging.log("GA Error: " + t + "\n" + t.stack);
                e.Connectors.Google_Analytics.sendEvent("Demandbase", "API Resolution", "Callback Error")
            }
        };
        n.prototype._detectG = function() {
            if (window._gaq) {
                this.gType = "ga";
                _gaq.push(["_addDevId", "NE7T9"])
            } else this.gType = null;
            this._setGaObject();
            try {
                window.ga(function() {
                    e.Connectors.Google_Analytics.gType = "ua"
                })
            } catch (t) {
                e.Connectors.Google_Analytics.gType = "ua"
            }
            e.Utilities.Logging.log("Detected Google version: " + this.gType)
        };
        n.prototype._sendEvent = function(e, t, n) {
            var i = this.configuration.trackerName ? this.configuration.trackerName + ".send" : "send";
            window.ga(i, "event", {
                eventCategory: e,
                eventAction: t,
                eventLabel: n,
                nonInteraction: !0
            })
        };
        n.prototype._setCustomDimension = function(e, t) {
            var n = this.configuration.trackerName ? this.configuration.trackerName + ".set" : "set";
            window.ga(n, "dimension" + e, t)
        };
        n.prototype._setCustomVariable = function(e, t, n) {
            var i = this.configuration.trackerName ? this.configuration.trackerName + "._setCustomVar" : "_setCustomVar",
                o = this.configuration.googleAnalyticsClassicScope || 2;
            window._gaq.push([i, e >> 0, t, n, o])
        };
        n.prototype._setEvents = function() {
            var t = this.configuration.events || [];
            if (t)
                for (var n in t)
                    if (t.hasOwnProperty(n)) {
                        var i = t[n];
                        if (i.data) {
                            var o = i.data.category || "",
                                a = i.data.action || "",
                                r = i.data.label || "";
                            void 0 === i.listener && o && a && r ? i.listener = function() {
                                e.Connectors.Google_Analytics.sendEvent(o, a, r);
                                e.Utilities.Logging.log("Event listener ran")
                            } : o && a && r || e.Utilities.Logging.log("Need to define a custom listener function or set data with category/action/label")
                        }
                        e.Utilities.Events.add(i)
                    }
        };
        n.prototype._setGaObject = function() {
            if (void 0 === window.ga) {
                window.ga = window.ga || function() {
                    (window.ga.q = window.ga.q || []).push(arguments)
                };
                window.ga.l = +new Date
            }
        };
        n.prototype._trackEvent = function(e, t, n) {
            var i = this.configuration.trackerName ? this.configuration.trackerName + "._trackEvent" : "_trackEvent";
            window._gaq.push([i, e, t, n, 0, 1])
        };
        n.prototype._var = function(t, n, i) {
            "ga" === this.gType ? this._setCustomVariable(t, n, i) : window.ga(function() {
                e.Connectors.Google_Analytics._setCustomDimension(t, i)
            });
            e.Utilities.Logging.log(t + " " + n + " : " + i)
        };
        return n
    }(e.BaseModule);
    e.Google_AnalyticsModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.DEFAULT_CONFIGURATION = {
                enabled: !0
            };
            i.configuration = {};
            t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, n || e.Config.Google_TagManager);
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            e.Utilities.Callbacks.registerCallback(this.callback.bind(this))
        };
        n.prototype.callback = function(t) {
            e.Connectors.Google_TagManager.pushToDataLayer(t)
        };
        n.prototype.pushToDataLayer = function(t, n) {
            if (!window.google_tag_manager || !window.dataLayer || "function" != typeof dataLayer.push) return !1;
            var i = n ? "_" + n : "";
            dataLayer.push(t);
            dataLayer.push({
                event: "Demandbase_Loaded" + i
            });
            e.Utilities.Logging.log("Pushed to GTM dataLayer");
            return !0
        };
        return n
    }(e.BaseModule);
    e.Google_TagManagerModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function(t) {
        function n(n) {
            var i = t.call(this) || this;
            i.TEST_MODE_ENABLED = "db_useTestIp";
            i.TEST_MODE_VALUE = "db_ip";
            i.API_ENDPOINT = "api.company-target.com/api/v2/ip.json";
            i.DEFAULT_CONFIGURATION = {
                apiKey: null,
                baseUrl: i.API_ENDPOINT,
                testModeEnabled: !1,
                testModeValue: null,
                masIntegrations: {
                    pardot: !1
                }
            };
            i.configuration = {};
            i.initialized = !1;
            i.key = i.configuration.apiKey;
            i.useTestValue = i.configuration.testModeEnabled;
            i.testValue = i.configuration.testModeValue;
            i.load = i.get;
            i._loadOnce = i.getOnce;
            i.CompanyProfile = void 0;
            i.isCalled = !1;
            try {
                t.prototype.mergeConfigs.call(i, i.DEFAULT_CONFIGURATION, {
                    apiKey: e.Config.key || e.Utilities.dig(e.Config, "analytics", "key") || e.Utilities.dig(e.Config, "ads", "key") || e.Utilities.dig(e.Config, "forms", "key"),
                    testModeEnabled: e.Utilities.getQueryParam(i.TEST_MODE_ENABLED) || e.Config.useTestIp,
                    testModeValue: e.Utilities.getQueryParam(i.TEST_MODE_VALUE) || e.Config.testIp
                }, n || e.Config.IpApiModule);
                i.initialized = !0
            } catch (e) {
                i.initialized = !1
            }
            return i
        }
        __extends(n, t);
        n.prototype.initialize = function() {
            try {
                Object.assign(this.configuration, this.configuration, {
                    apiKey: e.Config.key || e.Utilities.dig(e.Config, "analytics", "key") || e.Utilities.dig(e.Config, "ads", "key") || e.Utilities.dig(e.Config, "forms", "key"),
                    testModeEnabled: e.Utilities.getQueryParam(this.TEST_MODE_ENABLED) || e.Config.useTestIp,
                    testModeValue: e.Utilities.getQueryParam(this.TEST_MODE_VALUE) || e.Config.testIp
                });
                this.initialized = !0
            } catch (t) {
                this.initialized = !1;
                e.ErrorReporter.send(t)
            }
        };
        n.prototype.get = function(t, n) {
            var i = this;
            void 0 === t && (t = void 0);
            void 0 === n && (n = !0);
            this.initialized || this.initialize();
            var o;
            window.XMLHttpRequest ? o = new XMLHttpRequest : window.ActiveXObject && (o = new ActiveXObject("Microsoft.XMLHTTP"));
            if (!o || e.Utilities.isOldBrowserOrUserAgentUnavailable()) {
                this.getByDomScript(t, n);
                return e.Utilities.Logging.log("IP API query via DOM tag")
            }
            var a = {
                key: t || this.configuration.apiKey,
                query: this.fetchIpAddress(),
                mas_integrations: void 0,
                src: "tag"
            };
            if (!a.key) return e.Utilities.Logging.log("IP API query cancelled - check auth key.");
            var r = {
                pardot: void 0
            };
            this.configuration.masIntegrations.pardot && (r.pardot = e.Utilities.getCookiesByRegex(e.Utilities.Constants.PARDOT_VISITOR_COOKIE_REGEX, document));
            void 0 !== r.pardot && (a.mas_integrations = e.Utilities.b64EncodeUnicode(JSON.stringify(r)));
            n && (o.onreadystatechange = e.ErrorReporter.wrap(function() {
                i.responseHandler(o)
            }));
            try {
                o.open("GET", "https://" + e.Utilities.Api.buildApiUrl(this.configuration.baseUrl, a));
                void 0 !== o.withCredentials && (o.withCredentials = !0);
                o.send()
            } catch (e) {
                if (0 !== o.status) throw e;
                if (!this.isIgnorableDevice()) throw new Error("IP API Request Blocked")
            }
        };
        n.prototype.isIgnorableDevice = function() {
            for (var t = 0; t < e.Utilities.Constants.NON_HUMAN_DEVICES.length; t++)
                if (e.Utilities.Constants.NON_HUMAN_DEVICES[t].test(window.navigator.userAgent)) return !0;
            return !1
        };
        n.prototype.getByDomScript = function(t, n) {
            void 0 === t && (t = void 0);
            void 0 === n && (n = !0);
            var i = {
                key: t || this.configuration.apiKey,
                query: this.fetchIpAddress(),
                callback: n ? "Demandbase.Utilities.Callbacks.domScriptCallback" : ""
            };
            if (!i.key) return e.Utilities.Logging.log("IP API query cancelled - check auth key.");
            e.Utilities.insertScript(e.Utilities.Api.buildApiUrl(this.configuration.baseUrl, i), "db_ip_api")
        };
        n.prototype.getOnce = function() {
            if (this.isCalled) e.Utilities.Logging.log("IP API call halted. Already called.");
            else {
                this.isCalled = !0;
                this.get()
            }
        };
        n.prototype.fetchIpAddress = function() {
            if (this.configuration.testModeEnabled) return this.configuration.testModeValue
        };
        n.prototype.responseHandler = function(t) {
            if (4 === t.readyState && 200 === t.status) {
                var n = JSON.parse(t.responseText);
                this.CompanyProfile = e.Utilities.flatten(n);
                e.Utilities.Callbacks.callback(this.CompanyProfile)
            }
        };
        return n
    }(e.BaseModule);
    e.IpApiModule = t
}(Demandbase || (Demandbase = {}));
var Demandbase;
! function(e) {
    var t = function() {
        function t() {}
        t._callback = function(t) {
            if (t.domain || t.person) {
                t = t.domain || t.person;
                e.Utilities.flatten(t);
                this.CompanyProfile = t
            } else e.Utilities.Logging.log("Demandbase.Domain: No company profile available for domain: " + this.getDomain())
        };
        t.load = function() {
            if ("function" == typeof e.Config.getDomain && void 0 !== this.key) {
                var t = "",
                    n = {};
                t = this.useTestValue ? this.testValue : this.getDomain();
                n = {
                    key: this.key,
                    callback: "Demandbase.Domain._callback",
                    query: t
                };
                e.Utilities.Logging.log("Calling Domain API...");
                e.Utilities.insertScript(e.Utilities.Api.buildApiUrl(e.Utilities.Constants.URL_DOMAIN_API, n), "db_domain_api")
            } else e.Utilities.Logging.log("Domain API query cancelled - check auth key or Config.getDomain")
        };
        t.getDomain = function() {
            if (this.useTestValue) return this.testValue;
            if ("function" == typeof e.Config.getDomain) return e.Config.getDomain.call(e.Config);
            e.Utilities.Logging.log("Warning: Config.getDomain fcn not defined.");
            return "getDomain function is not defined"
        };
        t.key = e.Utilities.dig(e, "Config", "key") || e.Utilities.dig(e, "Config", "analytics", "key") || e.Utilities.dig(e, "Config", "ads", "key") || e.Utilities.dig(e, "Config", "forms", "key") || "ERR_NO_AUTH_KEY";
        t.CompanyProfile = null;
        t.useTestValue = "true" === e.Utilities.getQueryParam(e.Utilities.Constants.QS_USE_TEST_DOMAIN) || e.Config.useTestDomain || !1;
        t.testValue = e.Utilities.getQueryParam(e.Utilities.Constants.QS_QUERY_DOMAIN) || e.Config.testDomain || "No Test Domain Set";
        return t
    }();
    e.Domain = t
}(Demandbase || (Demandbase = {}));
if (void 0 === window.__db) var __db = {
    segments: null,
    conditions: null
};
window.Demandbase.DBCondition = function(e, t, n, i, o) {
    this.name = e;
    this.attributeValue = t;
    this.operator = n;
    this.value = i;
    this.attributeName = o;
    this._checkValue = function(e) {
        switch (n) {
            case "equals":
                return this.attributeValue == e;
            case "not equals":
                return this.attributeValue !== e;
            case "contains":
                return -1 !== this.attributeValue.indexOf(e);
            default:
                return !1
        }
    };
    this.evaluate = function() {
        n = this.operator.toLowerCase();
        n = window.Demandbase.DBCondition.prototype.supportedOperators[n];
        if ("object" == typeof this.value) {
            for (var e in this.value)
                if (!0 === this._checkValue(this.value[e])) return !0;
            return !1
        }
        return this._checkValue(this.value)
    }
};
window.Demandbase.DBCondition.prototype.name = "DBCondition";
window.Demandbase.DBCondition.prototype.supportedOperators = {
    "=": "equals",
    "==": "equals",
    equal: "equals",
    equals: "equals",
    "!=": "not equals",
    "!==": "not equals",
    "not equal": "not equals",
    "not equals": "not equals",
    contains: "contains",
    contain: "contains"
};
window.Demandbase.DBConditionBuilder = {
    isValid: function(e) {
        for (var t = ["name", "attributeValue", "operator", "value", "attributeName"], n = 0; n < t.length; n++)
            if (void 0 === e[t[n]]) return !1;
        return !0
    },
    build: function(e, t) {
        if (void 0 !== e.constructor.prototype.name && "DBCondition" === e.constructor.prototype.name) return e;
        e.attributeName || (e.attributeName = e.attribute || "NO_ATTR_SET");
        e.attributeValue = t[e.attribute] || "";
        if (!this.isValid(e)) return null;
        var n = e.name,
            i = e.attributeValue,
            o = e.operator,
            a = e.value,
            r = e.attributeName;
        return new window.Demandbase.DBCondition(n, i, o, a, r)
    }
};
var DBSegment = function(e, t) {
    this.name = e;
    this.rules = [];
    this.operator = "";
    this.addCondition = function(e) {
        if (!(e && e.evaluate || void 0 !== e.constructor.prototype.name && "DBCondition" === e.constructor.prototype.name)) {
            var e = window.Demandbase.DBConditionBuilder.build(e, window.Demandbase.Segments.CompanyProfile);
            if (!e) throw new Error("Invalid Condition: " + e.name);
            Demandbase.Utilities.Logging.log("DBSegmentBuilder converted condition successfully...")
        }
        this.rules.push(e);
        switch (this.operator || DBSegment.prototype.supportedOperators.any) {
            case "and":
                return this.value = this.value && e.evaluate();
            case "or":
                return this.value = this.value || e.evaluate();
            default:
                return e.evaluate()
        }
    };
    this.value = this.addCondition(t)
};
DBSegment.prototype.name = "DBSegment";
DBSegment.prototype.supportedOperators = {
    "&&": "and",
    "&": "and",
    and: "and",
    "||": "or",
    "|": "or",
    or: "or",
    any: "or",
    all: "and"
};
window.Demandbase.DBSegmentBuilder = {
    isValid: function(e) {
        for (var t = ["name", "operator", "rules"], n = 0; n < t.length; n++)
            if (void 0 === e[t[n]]) return !1;
        return !!Array.isArray(e.rules)
    },
    build: function(e) {
        if (!this.isValid(e)) return null;
        var t, n = e.name,
            i = e.rules[0],
            o = e.operator;
        if (i) {
            t = new DBSegment(n, i);
            t.operator = DBSegment.prototype.supportedOperators[o] || DBSegment.prototype.supportedOperators.any;
            if (e.rules.length > 1)
                for (var a = 1; a < e.rules.length; a += 1) {
                    var i = e.rules[a];
                    if (void 0 === i.constructor.prototype.name || "DBCondition" !== i.constructor.prototype.name) {
                        var r = window.Demandbase.DBConditionBuilder.build(i, void 0);
                        r && (i = r)
                    }
                    t.addCondition(i)
                }
            return t
        }
    }
};
window.Demandbase.Segments = window.Demandbase.Segments || {
    name: "Demandbase Segments",
    CompanyProfile: null,
    AccountWatchVisitor: !1,
    IsCompany: !1,
    version: "1.2.2",
    _debug: !1,
    _allConditions: [],
    _allSegments: [],
    _isInitialized: !1,
    _setup: function() {
        this._isInitialized && this._reset();
        this.CompanyProfile || !window.Demandbase.IP && !window.Demandbase.Domain || (this.CompanyProfile = window.Demandbase.IP.CompanyProfile || window.Demandbase.Domain.CompanyProfile || {});
        "Detailed" === this.CompanyProfile.information_level && (this.IsCompany = !0);
        for (var e in this.CompanyProfile) this.CompanyProfile.hasOwnProperty(e) && 0 === e.indexOf("watch_list_") && (this.AccountWatchVisitor = !0);
        for (var t in this._allConditions) this._allConditions.hasOwnProperty(t) && this._allConditions[t] && (void 0 === this._allConditions[t].constructor.prototype.name || "DBCondition" !== this._allConditions[t].constructor.prototype.name) && this.add("condition", this._allConditions[t]);
        for (var n in this._allSegments) this._allSegments.hasOwnProperty(n) && this._allSegments[n].name && (void 0 === this._allSegments[n].constructor.prototype.name || "DBSegment" !== this._allSegments[n].constructor.prototype.name) && this.add("segment", this._allSegments[n])
    },
    _reset: function() {
        this._allConditions = Demandbase.Config.conditions || __db.conditions || [];
        this._allSegments = Demandbase.Config.segments || __db.segments || []
    },
    load: function() {
        Demandbase.Utilities.Callbacks.registerCallback(this.init.bind(this))
    },
    init: function(e) {
        window.Demandbase.Segments._debug = Demandbase.Utilities.Logging.debug || !1;
        window.Demandbase.Segments._allConditions = Demandbase.Config.conditions || __db.conditions || [];
        window.Demandbase.Segments._allSegments = Demandbase.Config.segments || __db.segments || [];
        var t = window.Demandbase.Segments;
        t.CompanyProfile = e;
        t._setup();
        t._isInitialized = !0
    },
    getActiveSegments: function() {
        var e = [];
        for (var t in this._allSegments) this._allSegments.hasOwnProperty(t) && this._allSegments[t].value && e.push(this._allSegments[t]);
        return e
    },
    getInactiveSegments: function() {
        var e = [];
        for (var t in this._allSegments) this._allSegments.hasOwnProperty(t) && (this._allSegments[t].value || e.push(this._allSegments[t]));
        return e
    },
    add: function(e, t) {
        if (!e || !t || t == {}) {
            Demandbase.Utilities.Logging.log("Demandbase.Segments.add operation failed due to invalid/empty parameters.");
            return null
        }
        if ("condition" === e) {
            for (var n, i = this._allConditions.length, o = 0; o < this._allConditions.length; o++)
                if (this._allConditions[o].name === t.name) {
                    i = o;
                    break
                } n = window.Demandbase.DBConditionBuilder.build(t, this.CompanyProfile);
            n ? this._allConditions[i] = n : Demandbase.Utilities.Logging.log("Invalid Condition (not created) from: " + JSON.stringify(t));
            if (void 0 === t.standalone || !1 !== t.standalone) {
                var a = t.name;
                this.add("segment", {
                    name: a,
                    rules: [a],
                    operator: DBSegment.prototype.supportedOperators.any
                })
            }
        } else if ("segment" === e) {
            if ("segment" !== this.isValid(t)) return null;
            for (var r, s, l = (t.name, this._allSegments.length), d = t.rules || [], c = 0; c < this._allSegments.length; c++)
                if (this._allSegments[c].name === t.name) {
                    l = c;
                    break
                } for (var u = 0; u < d.length; u++) {
                var g = d[u];
                if (!DBSegment.prototype.supportedOperators[g]) {
                    DBSegment.prototype.supportedOperators[g] || (s = this.get("condition", g));
                    s ? d[u] = s : Demandbase.Utilities.Logging.log("Segment: " + t + " uses a Condition (" + d[u] + ") that is not defined.")
                }
            }
            t.rules = d;
            r = window.Demandbase.DBSegmentBuilder.build(t);
            if (r) {
                this._allSegments[l] = r;
                if (this.hasOwnProperty(r.name)) this[r.name] = r;
                else try {
                    Object.defineProperty(this, r.name, {
                        value: r.value,
                        writable: !0
                    })
                } catch (e) {
                    window.Demandbase.Segments[r.name] = r.value
                }
            } else Demandbase.Utilities.Logging.log("Invalid Segment (not created) from: " + JSON.stringify(t))
        } else Demandbase.Utilities.Logging.log('Invalid "type" parameter (' + e + ') passed to "add" function.  Must be "segment" or "condition".')
    },
    get: function(e, t) {
        var n = [];
        1 === arguments.length && (t = e);
        if ("condition" === e) {
            if (void 0 !== t.constructor.prototype.name && "DBCondition" === t.constructor.prototype.name) return t;
            n = this._allConditions
        } else {
            if (void 0 !== t.constructor.prototype.name && "DBSegment" === t.constructor.prototype.name) return t;
            n = this._allSegments
        }
        for (var i in n)
            if (this._allConditions[i].name === t) return this._allConditions[i];
        DBSegment.prototype.supportedOperators[t] || Demandbase.Utilities.Logging.log('No item with type: "' + e + '" found with name: ' + t);
        return null
    },
    isValid: function(e) {
        var t, n = ["name", "rules"],
            i = ["name", "attribute", "operator", "value"];
        if (!e) return !1;
        if (void 0 !== e.constructor.prototype.name && "DBSegment" === e.constructor.prototype.name) return "segment";
        if (void 0 !== e.constructor.prototype.name && "DBCondition" === e.constructor.prototype.name) return "condition";
        try {
            if (e.hasOwnProperty("name") && e.hasOwnProperty("rules")) {
                if ("object" == typeof e.rules) return "segment"
            } else
                for (var o in n)
                    if (!e.hasOwnProperty(n[o])) {
                        Demandbase.Utilities.Logging.log('Invalid DBSegment definition.  Missing property:"' + n[o] + '"');
                        return !1
                    } if (t) return t;
            for (var o in i) {
                if (!e.hasOwnProperty(i[o])) {
                    Demandbase.Utilities.Logging.log('Invalid DBCondition definition.  Missing property:"' + i[o] + '"');
                    return !1
                }
                t = "condition"
            }
            return t
        } catch (e) {
            Demandbase.ErrorReporter.send(e);
            return !1
        }
    }
};
var Demandbase;
! function(e) {
    function t(t) {
        if (!e._isInitialized || t) {
            e._isInitialized = !0;
            null == e.Config.isInIFrame && (e.Config.isInIFrame = e.Utilities.detectIFrame());
            e.AssetReporter = new e.AssetReporterModule;
            e.AssetReporter.isEnabled() && e.AssetReporter.initialize();
            e.Advertising = new e.AdvertisingModule;
            e.Ads = e.Advertising;
            if (e.Advertising.isEnabled()) {
                e.IpApiReportingOnly = new e.IpApiModule;
                e.Advertising.initialize()
            }
            e.IpApi = new e.IpApiModule;
            e.IP = e.IpApi;
            e.IpApi.getOnce();
            window.Demandbase.Segments.load();
            e.Config.callback && e.Utilities.Callbacks.registerCallback(e.Config.callback);
            e.FormsLoader = new e.FormsLoaderModule;
            if (e.FormsLoader.isEnabled()) {
                e.FormsLoader.initialize();
                window.Demandbase.utils.loadFormModule = e.FormsLoader.load.bind(e.FormsLoader);
                window.Demandbase.utils.isFormPage = e.FormsLoader.isFormPage.bind(e.FormsLoader)
            }
            e.SiteOptimizationLoader = new e.SiteOptimizationLoaderModule;
            e.SiteOptimizationLoader.isEnabled() && e.SiteOptimizationLoader.initialize();
            e.Connectors.Google_Analytics = new e.Google_AnalyticsModule;
            e.Connectors.Google_Analytics.isEnabled() && e.Connectors.Google_Analytics.initialize();
            e.Connectors.Google_TagManager = new e.Google_TagManagerModule;
            e.Connectors.Google_TagManager.isEnabled() && e.Connectors.Google_TagManager.initialize();
            e.Content = new e.ContentModule;
            e.Content.isEnabled() && e.Content.initialize();
            if ("function" == typeof e.Config.getDomain) {
                e.Config.getDomain() && e.Domain.load()
            }
            e.EmailDomainReporter = new e.EmailDomainReporterModule;
            e.EmailDomainReporter.isEnabled() && e.EmailDomainReporter.initialize();
            var n = {
                Advertising: e.AdvertisingModule,
                AssetReporter: e.AssetReporterModule,
                Content: e.ContentModule,
                ErrorReporter: e.ErrorReporterModule,
                Google_Analytics: e.Google_AnalyticsModule
            };
            new e.ModuleFactory(e.Config, n, e).build();
            "function" == typeof e.Config.onLoad && e.Config.onLoad.call(e)
        }
    }
    e.initialize = t
}(Demandbase || (Demandbase = {}));
window.Demandbase.Config.clientId = "B3KhiJdo";
window.Demandbase.Config.key = "f1ab3cf6914985004050e4efd27e6b1c";
window.Demandbase.Config.ads = {
    pixels: {
        ad: "1485984431",
        rt: "1485984517",
        cn: null
    }
};
window.Demandbase.Config.analytics = {
    fieldMap: {
        42: "demandbase_sid",
        43: "audience",
        44: "audience_segment",
        45: "company_name",
        46: "marketing_alias",
        47: "industry",
        48: "sub_industry",
        49: "revenue_range",
        50: "employee_range",
        51: "city",
        52: "state",
        53: "country_name",
        54: "watch_list_account_type",
        55: "watch_list_account_owner",
        56: "watch_list_campaign_code",
        57: "watch_list_account_group",
        58: "fortune_1000",
        59: "forbes_2000",
        60: "b2b",
        61: "b2c",
        62: "primary_naics",
        63: "web_site",
        64: "stock_ticker",
        65: "traffic",
        66: "employee_count",
        67: "annual_sales",
        68: "primary_sic"
    }
};
window.Demandbase.Config.isFormPage = function() {
    if (document.getElementsByName("db_demandbase_sid").length > 0) return Demandbase.utils.isFormPage()
};
window.Demandbase.Config.forms = {
    ignoreIpResult: !0,
    companyID: "Company",
    emailID: "Email",
    priorityMap: {
        domain: 2,
        ip: 1,
        company: 3
    },
    fieldMap: {
        demandbase_sid: "db_demandbase_sid",
        company_name: "dB_CompanyName",
        marketing_alias: "dBCommonOrgName",
        industry: "RF_inferredIndustry__c",
        street_address: "RF_DHQ_Addr1__c",
        city: "RF_DHQ_City__c",
        state: "RF_DHQ_StateCode__c",
        zip: "RF_DHQ_Zip__c",
        country_name: "RF_DHQ_Country__c",
        employee_count: "RF_DHQ_EmplyeesTotal__c",
        annual_sales: "RF_DHQ_AnnualRev__c",
        fortune_1000: "dBFortune1000",
        b2b: "dBB2B",
        b2c: "dBB2C",
        web_site: "Website",
        data_source: "dB_data_source",
        phone: "RF_DHQ_Phone__c",
        watch_list_campaign_code: "watchlistcampaigncode"
    }
};
window.Demandbase.Config.callback = function(e) {
    e.employee_count >= 200 && function(e) {
        try {
            $("body > div.off-canvas-wrap.ng-scope > div > main > div.subnavigation.hidden-xs > div").html('Want help finding the right freelancers? <a href="http://www.upwork.com/enterprise">Learn about Upwork Enterprise</a>')
        } catch (e) {}
    }(e.marketing_alias)
};
Demandbase.ErrorReporter = new Demandbase.ErrorReporterModule;
Demandbase.ErrorReporter.initialize();
Demandbase.ErrorReporter.wrap(Demandbase.initialize.bind(Demandbase))();
//# sourceMappingURL=B3KhiJdo.min.js.map