(()=>{"use strict";var e,t,n={},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.m=n,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,n)=>(o.f[n](e,t),t)),[])),o.u=e=>e+"/bfba63ca3870acbc5783.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="[name]Destination:",o.l=(n,r,i,a)=>{if(e[n])e[n].push(r);else{var s,d;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var c=u[l];if(c.getAttribute("src")==n||c.getAttribute("data-webpack")==t+i){s=c;break}}s||(d=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",t+i),s.src=n),e[n]=[r];var p=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);var o=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(r))),t)return t(r)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),d&&document.head.appendChild(s)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e+"../"})(),(()=>{var e={935:0};o.f.j=(t,n)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=i);var a=o.p+o.u(t),s=new Error;o.l(a,(n=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[a,s,d]=n,u=0;if(a.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(d)d(o)}for(t&&t(n);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[a[u]]=0},n=self.webpackChunk_name_Destination=self.webpackChunk_name_Destination||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i={};o.d(i,{default:()=>s});let a={id:void 0,anonymousId:void 0,traits:null};const s=(d={name:"Braze Cloud Mode (Actions)",mode:"device",settings:{},initialize:async()=>({}),actions:{debouncePlugin:{title:"Debounce Middleware",description:"When enabled, it ensures that only events where at least one changed trait value are sent to Braze, and events with duplicate traits are not sent.",platform:"web",defaultSubscription:'type = "identify" or type = "group"',fields:{},lifecycleHook:"before",perform:(e,t)=>{const n=t.context.event,r=t.analytics.user(),o=t.context,i=function(e){if(e.userId&&e.userId!==a.id)return!0;if(e.anonymousId&&e.anonymousId!==a.anonymousId)return!0;const t=e.traits??{};return JSON.stringify(a.traits)!==JSON.stringify(t)}(n);o.updateEvent("integrations.Braze Web Mode (Actions)",i),o.updateEvent("integrations.Braze Cloud Mode (Actions)",i),o.updateEvent("integrations.Appboy",i),a.id=r.id(),a.anonymousId=r.anonymousId(),a.traits=r.traits()}}}},async e=>(await o.e(688).then(o.bind(o,8688))).generatePlugins(d,e,e.subscriptions||[]));var d;window["braze-cloud-pluginsDestination"]=i.default})();
//# sourceMappingURL=dde6c07859da9be386e7.js.map