var C=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.wnd,s=n===void 0?window:n;(function(u,d,m,p,h,w,c,I){var q=function(i){return i in u?(u.console&&u.console.log&&u.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'),!1):!0}(m);if(!q)return;function V(y){var i=[],a;function g(){a&&(i.forEach(function(r){var o;try{o=r[a[0]]&&r[a[0]](a[1])}catch(l){r[3]&&r[3](l);return}o&&o.then?o.then(r[2],r[3]):r[2]&&r[2](o)}),i.length=0)}function f(r){return function(o){a||(a=[r,o],g())}}y(f(0),f(1));function v(r,o){return V(function(l,S){i.push([r,o,l,S]),g()})}return{then:v}}c=u[m]=function(){var i=function(f,v,r,o){o=o||2;function l(E,z){a(f,v,r,E,z,o)}var S=/Async$/;if(S.test(f))return f=f.replace(S,""),typeof Promise=="function"?new Promise(l):V(l);var k;return a(f,v,r,k,k,o)};function a(g,f,v,r,o,l){return i._api?i._api(g,f,v,r,o,l):(i.q&&i.q.push([g,f,v,r,o,l]),null)}return i.q=[],i}(),I=function(){return function(i){function a(v){typeof v[4]=="function"&&v[4](new Error(i))}var g=c.q;if(g){for(var f=0;f<g.length;f++)a(g[f]);g.length=0,g.push=a}}}(),function(){w=d.createElement(p),w.async=!0,w.crossOrigin="anonymous",w.src="https://"+h,w.onerror=function(){I("Error loading "+h)};var i=d.getElementsByTagName(p)[0];i&&i.parentNode?i.parentNode.insertBefore(w,i):d.head.appendChild(w)}(),function(){function i(){}function a(r,o,l){c(r,o,l,1)}function g(r,o,l){a("setProperties",{type:r,properties:o},l)}function f(r,o){g("user",r,o)}function v(r,o,l){f({uid:r},l),o&&f(o,l)}c.identify=v,c.setUserVars=f,c.identifyAccount=i,c.clearUserCookie=i,c.setVars=g,c.event=function(r,o,l){a("trackEvent",{name:r,properties:o},l)},c.anonymize=function(){v(!1)},c.shutdown=function(){a("shutdown")},c.restart=function(){a("restart")},c.log=function(r,o){a("log",{level:r,msg:o})},c.consent=function(r){a("setIdentity",{consent:!arguments.length||r})}}(),function(){var i="fetch",a="XMLHttpRequest";c._w={},c._w[a]=u[a],c._w[i]=u[i],u[i]&&(u[i]=function(){return c._w[i].apply(this,arguments)})}(),c._v="2.0.0"})(s,s.document,s._fs_namespace,"script",s._fs_script)},U=function(t){return t==="window"?"document":"".concat(t,".document")},M=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.shouldInsertScript,s=n===void 0?!0:n,u=t.globalVar,d=u===void 0?"window":u,m=t.apiVersion,p=m===void 0?"1.3.0":m;return`(function(m,n,e,t,l,o,g,y){
    if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');} return;}
    g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];`.concat(s?`
    o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;
    y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);`:"",`
    g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};
    g.anonymize=function(){g.identify(!!0)};
    g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};
    g.log = function(a,b){g("log",[a,b])};
    g.consent=function(a){g("consent",!arguments.length||a)};
    g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
    g.clearUserCookie=function(){};
    g.setVars=function(n, p){g('setVars',[n,p]);};
    g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];
    if(m[y])m[y]=function(){return g._w[y].apply(this,arguments)};
    g._v="`).concat(p,`";
})(`).concat(d,",").concat(U(d),",").concat(d,"['_fs_namespace'],'script','user');")},A=function(t){var n=t.orgId,s=t.namespace,u=s===void 0?"FS":s,d=t.host,m=d===void 0?"fullstory.com":d,p=t.script,h=p===void 0?"edge.fullstory.com/s/fs.js":p;if(!n)throw new Error("FullStory orgId is a required parameter");window._fs_host=m,window._fs_script=h,window._fs_org=n,window._fs_namespace=u,C()};M();var b=function(){return b=Object.assign||function(t){for(var n,s=1,u=arguments.length;s<u;s++){n=arguments[s];for(var d in n)Object.prototype.hasOwnProperty.call(n,d)&&(t[d]=n[d])}return t},b.apply(this,arguments)},F=function(){if(window._fs_namespace)return window[window._fs_namespace]},P=function(){var e=F();if(!e)throw Error("FullStory is not loaded, please ensure the init function is invoked before calling FullStory API functions");return e},O=function(e,t){var n=b({},e);if(F()){console.warn("The FullStory snippet has already been defined elsewhere (likely in the <head> element)");return}n.recordCrossDomainIFrames&&(window._fs_run_in_iframe=!0),n.appHost&&(window._fs_app_host=n.appHost),n.assetMapId&&(window._fs_asset_map_id=n.assetMapId),n.startCaptureManually&&(window._fs_capture_on_startup=!1),n.recordOnlyThisIFrame&&(window._fs_is_outer_script=!0),n.cookieDomain&&(window._fs_cookie_domain=n.cookieDomain),n.debug===!0&&(n.script?console.warn("Ignoring `debug = true` because `script` is set"):n.script="edge.fullstory.com/s/fs-debug.js"),A(n);var s=F();if(!s){console.warn("Failed to initialize FS snippet");return}if(t&&s("observe",{type:"start",callback:t}),n.devMode===!0){var u="FullStory was initialized in devMode and will stop recording";s("trackEvent",{name:"FullStory Dev Mode",properties:{message:u}}),s("shutdown"),window._fs_dev_mode=!0,console.warn(u)}},R=function(e){return function(t,n){if(window._fs_initialized){e&&console.warn(e);return}O(t,n),window._fs_initialized=!0}},H=R("FullStory init has already been called once, additional invocations are ignored"),L=function(){return!!window._fs_initialized},x=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=P();return e.every(function(s){return n[s]})},_=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(window._fs_dev_mode){var s="FullStory is in dev mode and is not capturing: ".concat(e," method not executed");return console.warn(s),s}var u=F();return x(e)&&u?u[e].apply(u,t):(console.warn("FS.".concat(e," not ready")),null)}},D=function(){var e=function(t,n,s){var u=P();if(window._fs_dev_mode){var d="FullStory is in dev mode and is not capturing: ".concat(t," not executed");console.warn(d);return}return u(t,n,s)};return e.anonymize=_("anonymize"),e.consent=_("consent"),e.disableConsole=_("disableConsole"),e.enableConsole=_("enableConsole"),e.event=_("event"),e.getCurrentSessionURL=_("getCurrentSessionURL"),e.identify=_("identify"),e.log=_("log"),e.restart=_("restart"),e.setUserVars=_("setUserVars"),e.setVars=_("setVars"),e.shutdown=_("shutdown"),e},N=D();export{N as FullStory,H as init,L as isInitialized};
