(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),((e,i,t)=>{!function(e,i){var t=e.amplitudeGTM||{_q:[],_iq:{}};if(t.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,i){e.prototype[i]=function(){return this._q.push({name:i,args:Array.prototype.slice.call(arguments,0)}),this}},r=function(e,i,t){return function(n){e._q.push({name:i,args:Array.prototype.slice.call(t,0),resolve:n})}},o=function(e,i,t){e._q.push({name:i,args:Array.prototype.slice.call(t,0)})},a=function(e,i,t){e[i]=function(){if(t)return{promise:new Promise(r(e,i,Array.prototype.slice.call(arguments)))};o(e,i,Array.prototype.slice.call(arguments))}},s=function(e){for(var i=0;i0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]0?2===u.length?typeof u[1]==r?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==r||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):n:this[u[0]]=c?u[1].call(this,c,u[2]):n:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):n):this[u]=c||n;d+=2}},F=function(e,i){for(var t in i)if(typeof i[t]===a&&i[t].length>0){for(var r=0;r350?L(e,350):e,this},this.setUA(r),this};Z.VERSION="0.7.33",Z.BROWSER=C([l,p,"major"]),Z.CPU=C([b]),Z.DEVICE=C([u,d,c,w,f,v,m,h,g]),Z.ENGINE=Z.OS=C([l,p]),e.exports&&(i=e.exports=Z),i.UAParser=Z;var Q=typeof t!==o&&(t.jQuery||t.Zepto);if(Q&&!Q.ua){var X=new Z;Q.ua=X.getResult(),Q.ua.get=function(){return X.getUA()},Q.ua.set=function(e){X.setUA(e);var i=X.getResult();for(var t in i)Q.ua[t]=i[t]}}}("object"==typeof window?window:o)}(a,a.exports);var s=a.exports,u=function(e){var t=this;void 0===e&&(e={});var o,a=e.osName,u=void 0===a||a,l=e.osVersion,c=void 0===l||l,d=e.deviceManufacturer,p=void 0===d||d,b=e.deviceModel,w=void 0===b||b;return{name:"@amplitude/plugin-user-agent-enrichment-browser",type:"enrichment",setup:function(e){return n(this,void 0,void 0,(function(){var i;return r(this,(function(t){return"undefined"!=typeof navigator&&(i=navigator.userAgent),o=new s(i).getResult(),e.loggerProvider.log("Installing @amplitude/plugin-user-agent-enrichment-browser."),[2]}))}))},execute:function(e){return n(t,void 0,void 0,(function(){var t,n,a,s;return r(this,(function(r){return t=o.browser.name,n=o.browser.version,a=o.device.model||o.os.name,s=o.device.vendor,[2,i(i(i(i(i({},e),u&&{os_name:t}),c&&{os_version:n}),p&&{device_manufacturer:s}),w&&{device_model:a})]}))}))}}};return e.plugin=u,e.userAgentEnrichmentPlugin=u,Object.defineProperty(e,"__esModule",{value:!0}),e}({});!function(e,i){const t=e.amplitudeGTM;if(t&&"function"==typeof t.init){var o=["init","track","identify","setGroup","groupIdentify","revenue","flush","getUserId","setUserId","getSessionId","setSessionId","setDeviceId","getDeviceId","reset","setOptOut","setTransport"],a=["add","append","clearAll","prepend","set","setOnce","remove","preInsert","postInsert"],s=function(e,i,n){if(i=i.shift(),Array.isArray(i)&&0!==i.length){var r=new t.Identify;if(i.forEach((function(e){if(Array.isArray(e)){var i=e.shift();-1!==a.indexOf(i)&&r[i].apply(r,e)}})),!0===n)return r;e.identify(r)}},u=function(e,i){if(!(i.length<3)&&"string"==typeof i[0]&&"string"==typeof i[1]&&Array.isArray(i[2])&&0!==i[2].length){var t=s(e,[i[2]],!0);e.groupIdentify(i[0],i[1],t)}},l=function(e,i){if((i=i.shift()).price&&i.productId){var n=(new t.Revenue).setProductId(i.productId).setQuantity(i.quantity||1).setPrice(i.price).setRevenueType(i.revenueType||"").setEventProperties(i.eventProperties||{}).setRevenue(i.revenue||i.price*(i.quantity||1));e.revenue(n)}},c=function(e,i){const t=i[i.length-1],o=t.userAgentEnrichmentOptions,a=t.pageViewLegacy;o&&e.add(r.userAgentEnrichmentPlugin(o)),a&&e.add(n.pageViewV1EnrichmentPlugin());let s=e.init(...i).promise;return s.then((()=>e.add({name:"gtm-library-enrichment",type:"enrichment",setup:async()=>{},execute:async e=>(e.library="amplitude-ts-gtm/3.7.3",e)}))),s};e[i]=e[i]||function(){var e=[].slice.call(arguments,0),i=e.shift(),n=i?t._iq[i]:t;n||(n=t.createInstance(i));var r=e.shift();if(-1!==o.indexOf(r))return"revenue"===r?l(n,e):"identify"===r?s(n,e):"groupIdentify"===r?u(n,e):"init"===r?c(n,e):n[r].apply(this,e)}}}(window,"_amplitude")})(0,0,e)})();