1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-DgC41OCD.js","assets/vendor-BptJrGwX.js","assets/rolldown-runtime-CHaGdZdU.js","assets/vendor-C2zUuChh.css","assets/observers-BtOizljl.js","assets/middleware-iGyjunrs.js","assets/ajs-destination-D1sSgatq.js","assets/legacy-video-plugins-CDxqzb_Q.js","assets/schema-filter-BXgPCGcP.js","assets/remote-middleware-Bt9oQ57U.js"])))=>i.map(i=>d[i]); 2(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`c81612d9aab6c64e7c7d2870282ec968194353cd`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`6234d859-c807-4f89-a3e5-297204c24500`,e._sentryDebugIdIdentifier=`sentry-dbid-6234d859-c807-4f89-a3e5-297204c24500`)}catch{}})();import{a as e,r as t,t as n}from"./rolldown-runtime-CHaGdZdU.js";import{Aa as r,Ca as i,Da as a,Ea as o,Fa as s,Ia as c,La as l,Ma as u,Na as d,Oa as f,Pa as p,Sa as m,Ta as h,_a as g,ba as _,ga as v,ha as y,ja as b,ka as x,va as S,wa as C,xa as w,ya as T}from"./vendor-BptJrGwX.js";var E=`modulepreload`,D=function(e){return`/`+e},O={},k=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=D(t,n),t in O)return;O[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:E,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},A;(function(e){e.SET=`$set`,e.SET_ONCE=`$setOnce`,e.ADD=`$add`,e.APPEND=`$append`,e.PREPEND=`$prepend`,e.REMOVE=`$remove`,e.PREINSERT=`$preInsert`,e.POSTINSERT=`$postInsert`,e.UNSET=`$unset`,e.CLEAR_ALL=`$clearAll`})(A||={});var j;(function(e){e.IDENTIFY=`$identify`,e.GROUP_IDENTIFY=`$groupidentify`,e.REVENUE=`revenue_amount`})(j||={});var ee=`AMP_unsent`,M=`$default_instance`,te=`https://api2.amplitude.com/2/httpapi`,ne=`https://api.eu.amplitude.com/2/httpapi`,re=`https://api2.amplitude.com/batch`,ie=`https://api.eu.amplitude.com/batch`,ae=`utm_campaign`,oe=`utm_content`,se=`utm_id`,N=`utm_medium`,ce=`utm_source`,le=`utm_term`,ue=`dclid`,de=`fbclid`,fe=`gbraid`,pe=`gclid`,me=`ko_click_id`,he=`li_fat_id`,ge=`msclkid`,_e=`rdt_cid`,ve=`ttclid`,ye=`twclid`,be=`wbraid`,xe={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},Se=`access-control-allow-origin.access-control-allow-credentials.access-control-expose-headers.access-control-max-age.access-control-allow-methods.access-control-allow-headers.accept-patch.accept-ranges.age.allow.alt-svc.cache-control.connection.content-disposition.content-encoding.content-language.content-length.content-location.content-md5.content-range.content-type.date.delta-base.etag.expires.im.last-modified.link.location.permanent.p3p.pragma.proxy-authenticate.public-key-pins.retry-after.server.status.strict-transport-security.trailer.transfer-encoding.tk.upgrade.vary.via.warning.www-authenticate.x-b3-traceid.x-frame-options`.split(`.`),Ce=[`authorization`,`cookie`,`set-cookie`],we=1e3,Te=function(e){if(Object.keys(e).length>we)return!1;for(var t in e){var n=e[t];if(!Ee(t,n))return!1}return!0},Ee=function(e,t){var n,r;if(typeof e!=`string`)return!1;if(Array.isArray(t)){var i=!0;try{for(var a=l(t),o=a.next();!o.done;o=a.next()){var s=o.value;if(Array.isArray(s))return!1;if(typeof s==`object`)i&&=Te(s);else if(![`number`,`string`].includes(typeof s))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}else if(t==null)return!1;else if(typeof t==`object`)return Te(t);else if(![`number`,`string`,`boolean`].includes(typeof t))return!1;return!0},De=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return r({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(P.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(P.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(P.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(P.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(P.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(P.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(P.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(P.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(P.UNSET,e,`-`),this},e.prototype.clearAll=function(){return this._properties={},this._properties[P.CLEAR_ALL]=`-`,this}
2,e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return r===void 0&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return this._properties[P.CLEAR_ALL]!==void 0||this._propertySet.has(t)?!1:e===P.ADD?typeof n==`number`:e!==P.UNSET&&e!==P.REMOVE?Ee(t,n):!0},e}(),P;(function(e){e.SET=`$set`,e.SET_ONCE=`$setOnce`,e.ADD=`$add`,e.APPEND=`$append`,e.PREPEND=`$prepend`,e.REMOVE=`$remove`,e.PREINSERT=`$preInsert`,e.POSTINSERT=`$postInsert`,e.UNSET=`$unset`,e.CLEAR_ALL=`$clearAll`})(P||={});var Oe=[P.CLEAR_ALL,P.UNSET,P.SET,P.SET_ONCE,P.ADD,P.APPEND,P.PREPEND,P.PREINSERT,P.POSTINSERT,P.REMOVE],ke=`Event tracked successfully`,Ae=`Unexpected error occurred`,je=`Event rejected due to exceeded retry count`,Me=`Event skipped due to optOut config`,Ne=`Event rejected due to missing API key`,Pe=`Client not initialized`,F;(function(e){e.Unknown=`unknown`,e.Skipped=`skipped`,e.Success=`success`,e.RateLimit=`rate_limit`,e.PayloadTooLarge=`payload_too_large`,e.Invalid=`invalid`,e.Failed=`failed`,e.Timeout=`Timeout`,e.SystemError=`SystemError`})(F||={});var Fe=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=F.Unknown),{event:e,code:t,message:n}},I=function(){var e=`ampIntegrationContext`;if(typeof globalThis<`u`&&globalThis[e]!==void 0)return globalThis[e];if(typeof globalThis<`u`)return globalThis;if(typeof window<`u`)return window;if(typeof self<`u`)return self;if(typeof global<`u`)return global},Ie=function(e){return e?(e^Math.random()*16>>e/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,Re)},Le=c([],p(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,`0`)}),Re=function(e){var t=I();if(!t?.crypto?.getRandomValues)return Ie(e);var n=t.crypto.getRandomValues(new Uint8Array(16));return n[6]=n[6]&15|64,n[8]=n[8]&63|128,c([],p(n.entries()),!1).map(function(e){var t=p(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?`-${Le[r]}`:Le[r]}).join(``)},ze=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){return b(this,void 0,void 0,function(){return d(this,function(n){switch(n.label){case 0:return this.plugins.some(function(t){return t.name===e.name})?(this.loggerProvider.warn(`Plugin with name ${e.name} already exists, skipping registration`),[2]):(e.name===void 0&&(e.name=Re(),this.loggerProvider.warn(`Plugin name is undefined. 3 Generating a random UUID for plugin name: ${e.name}. 4 Set a name for the plugin to prevent it from being added multiple times.`)),e.type=e.type??`enrichment`,[4,e.setup?.call(e,t,this.client)]);case 1:return n.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e,t){return b(this,void 0,void 0,function(){var n,r;return d(this,function(i){switch(i.label){case 0:return n=this.plugins.findIndex(function(t){return t.name===e}),n===-1?(t.loggerProvider.warn(`Plugin with name ${e} does not exist, skipping deregistration`),[2]):(r=this.plugins[n],this.plugins.splice(n,1),[4,r.teardown?.call(r)]);case 1:return i.sent(),[2]}})})},e.prototype.reset=function(e){this.applying=!1,this.plugins.map(function(e){return e.teardown?.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return b(this,void 0,void 0,function(){var t,n,i,a,o,s,c,u,f,m,h,g,_,u,f,v,y,b,x,S,C,w;return d(this,function(d){switch(d.label){case 0:if(!e)return[2];t=p(e,1),n=t[0],i=p(e,2),a=i[1],this.loggerProvider.log(`Timeline.apply: Initial event`,n),o=this.plugins.filter(function(e){return e.type===`before`}),d.label=1;case 1:d.trys.push([1,6,7,8]),s=l(o),c=s.next(),d.label=2;case 2:return c.done?[3,5]:(u=c.value,u.execute?[4,u.execute(r({},n))]:[3,4]);case 3:if(f=d.sent(),f===null)return this.loggerProvider.log(`Timeline.apply: Event filtered out by before plugin '${String(u.name)}
4', event: ${JSON.stringify(n)}`),a({event:n,code:0,message:``}),[2];n=f,this.loggerProvider.log(`Timeline.apply: Event after before plugin '${String(u.name)}', event: ${JSON.stringify(n)}`),d.label=4;case 4:return c=s.next(),[3,2];case 5:return[3,8];case 6:return m=d.sent(),x={error:m},[3,8];case 7:try{c&&!c.done&&(S=s.return)&&S.call(s)}finally{if(x)throw x.error}return[7];case 8:h=this.plugins.filter(function(e){return e.type===`enrichment`||e.type===void 0}),d.label=9;case 9:d.trys.push([9,14,15,16]),g=l(h),_=g.next(),d.label=10;case 10:return _.done?[3,13]:(u=_.value,u.execute?[4,u.execute(r({},n))]:[3,12]);case 11:if(f=d.sent(),f===null)return this.loggerProvider.log(`Timeline.apply: Event filtered out by enrichment plugin '${String(u.name)}', event: ${JSON.stringify(n)}`),a({event:n,code:0,message:``}),[2];n=f,this.loggerProvider.log(`Timeline.apply: Event after enrichment plugin '${String(u.name)}', event: ${JSON.stringify(n)}`),d.label=12;case 12:return _=g.next(),[3,10];case 13:return[3,16];case 14:return v=d.sent(),C={error:v},[3,16];case 15:try{_&&!_.done&&(w=g.return)&&w.call(g)}finally{if(C)throw C.error}return[7];case 16:return y=this.plugins.filter(function(e){return e.type===`destination`}),this.loggerProvider.log(`Timeline.apply: Final event before destinations, event: ${JSON.stringify(n)}`),b=y.map(function(e){var t=r({},n);return e.execute(t).catch(function(e){return Fe(t,0,String(e))})}),Promise.all(b).then(function(e){var t=p(e,1)[0]||Fe(n,100,`Event not tracked, no destination plugins on the instance`);a(t)}),[2]}})})},e.prototype.flush=function(){return b(this,void 0,void 0,function(){var e,t,n,r=this;return d(this,function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return r.apply(e)}))];case 1:return i.sent(),t=this.plugins.filter(function(e){return e.type===`destination`}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return i.sent(),[2]}})})},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;(n=t.onIdentityChanged)==null||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;(n=t.onSessionIdChanged)==null||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;(n=t.onOptOutChanged)==null||n.call(t,e)})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;(t=e.onReset)==null||t.call(e)})},e}(),Be=function(e,t,n){return r(r(r({},typeof e==`string`?{event_type:e}:e),n),t&&{event_properties:t})},Ve=function(e,t){return r(r({},t),{event_type:j.IDENTIFY,user_properties:e.getUserProperties()})},He=function(e,t,n,i){var a;return r(r({},i),{event_type:j.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(a={},a[e]=t,a)})},Ue=function(e,t,n){var i,a=new De;return a.set(e,t),r(r({},n),{event_type:j.IDENTIFY,user_properties:a.getUserProperties(),groups:(i={},i[e]=t,i)})},We=function(e,t){return r(r({},t),{event_type:j.REVENUE,event_properties:e.getEventProperties()})},Ge=function(e){return{promise:e||Promise.resolve()}},Ke=function(){function e(e){e===void 0&&(e=`$default`),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new ze(this),this.name=e}return e.prototype._init=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions(`q`)];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return b(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c;return d(this,function(u){switch(u.label){case 0:t=this[e],this[e]=[],u.label=1;case 1:u.trys.push([1,8,9,10]),n=l(t),r=n.next(),u.label=2;case 2:return r.done?[3,7]:(i=r.value,a=i(),a&&`promise`in a?[4,a.promise]:[3,4]);case 3:return u.sent(),[3,6];case 4:return[4,a];case 5:u.sent(),u.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return o=u.sent(),s={error:o},[3,10];case 9:try{r&&!r.done&&(c=n.return)&&c.call(n)}finally{if(s)throw s.error}
4return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e)]:[3,12];case 11:u.sent(),u.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=Be(e,t,n);return Ge(this.dispatch(r))},e.prototype.identify=function(e,t){var n=Ve(e,t);return Ge(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=He(e,t,n,r);return Ge(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=Ue(e,t,n);return Ge(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=We(e,t);return Ge(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),Ge())},e.prototype._addPlugin=function(e){return Ge(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),Ge())},e.prototype._removePlugin=function(e){return Ge(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(Fe(e,0,Pe));this.process(e).then(t)},e.prototype.dispatch=function(e){return b(this,void 0,void 0,function(){var t=this;return d(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t={};if(e===void 0)return t;var n={};return Object.keys(e).forEach(function(t){Object.values(A).includes(t)||(n[t]=e[t])}),Oe.forEach(function(n){if(Object.keys(e).includes(n)){var r=e[n];switch(n){case A.CLEAR_ALL:Object.keys(t).forEach(function(e){delete t[e]});break;case A.UNSET:Object.keys(r).forEach(function(e){delete t[e]});break;case A.SET:Object.assign(t,r);break}}}),Object.assign(t,n),t},e.prototype.process=function(e){return b(this,void 0,void 0,function(){var t,n,r,i,n;return d(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),this.config.optOut?[2,Fe(e,0,Me)]:(e.event_type===j.IDENTIFY&&(t=this.getOperationAppliedUserProperties(e.user_properties),this.timeline.onIdentityChanged({userProperties:t})),[4,this.timeline.push(e)]);case 1:return n=a.sent(),n.code===200?this.config.loggerProvider.log(n.message):n.code===100?this.config.loggerProvider.warn(n.message):this.config.loggerProvider.error(n.message),[2,n];case 2:return r=a.sent(),i=String(r),this.config.loggerProvider.error(i),n=Fe(e,0,i),[2,n];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!e));return}this._setOptOut(e)},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.timeline.onOptOutChanged(e),this.config.optOut=!!e)},e.prototype.flush=function(){return Ge(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(t===void 0){this.config.loggerProvider.debug(`Cannot find plugin with name ${e}`);return}return t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),qe=function(){function e(){this.productId=``,this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){return Te(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?r({},this.properties):{};return e[Je.REVENUE_PRODUCT_ID]=this.productId,e[Je.REVENUE_QUANTITY]=this.quantity,e[Je.REVENUE_PRICE]=this.price,e[Je.REVENUE_TYPE]=this.revenueType,e[Je.REVENUE_CURRENCY]=this.currency,e[Je.REVENUE]=this.revenue,e[Je.RECEIPT]=this.receipt,e[Je.RECEIPT_SIG]=this.receiptSig,e},e}(),Je;(function(e){e.REVENUE_PRODUCT_ID=`$productId`,e.REVENUE_QUANTITY=`$quantity`,e.REVENUE_PRICE=`$price`,e.REVENUE_TYPE=`$revenueType`,e.REVENUE_CURRENCY=`$currency`,e.REVENUE=`$revenue`,e.RECEIPT=`$receipt`,e.RECEIPT_SIG=`$receiptSig`})(Je||={});var Ye=function(e,t){var n=Math.max(t,1);return e.reduce(function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e},[])},Xe;(function(e){e[e.None=0]=`None`,e[e.Error=1]=`Error`,e[e.Warn=2]=`Warn`,e[e.Verbose=3]=`Verbose`,e[e.Debug=4]=`Debug`})(Xe||={});var Ze=`Amplitude Logger `,Qe=function(){function e(){this.logLevel=Xe.None}return e.prototype.disable=function(){this.logLevel=Xe.None},e.prototype.enable=function(e){e===void 0&&(e=Xe.Warn),this.logLevel=e},e.prototype.log=function(){var e=[...arguments];this.logLevel<Xe.Verbose||console.log(`${Ze}[Log]: ${e.join(` `)}`)},e.prototype.warn=function(){var e=[...arguments];this.logLevel<Xe.Warn||console.warn(`${Ze}[Warn]: ${e.join(` `)}`)},e.prototype.error=function(){var e=[...arguments];this.logLevel<Xe.Error||console.error(`${Ze}[Error]: ${e.join(` `)}`)},e.prototype.debug=function(){var e=[...arguments];this.logLevel<Xe.Debug||console.log(`${Ze}[Debug]: ${e.join(` `)}`)},e}(),$e=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:M,logLevel:Xe.Warn,loggerProvider:new Qe,offline:!1,optOut:!1,serverUrl:te,serverZone:`US`,useBatch:!1}},et=function(){function e(e){this._optOut=!1;var t=$e();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis??t.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||t.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||t.flushQueueSize,this.instanceName=e.instanceName||t.instanceName,this.loggerProvider=e.loggerProvider||t.loggerProvider,this.logLevel=e.logLevel??t.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=e.offline===void 0?t.offline:e.offline,this.optOut=e.optOut??t.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||t.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=e.useBatch??t.useBatch,this.loggerProvider.enable(this.logLevel);var n=nt(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=n.serverZone,this.serverUrl=n.serverUrl}return Object.defineProperty(e.prototype,`optOut`,{get:function(){return this._optOut},set:function(e){this._optOut=e}
4,enumerable:!1,configurable:!0}),e}(),tt=function(e,t){return e===`EU`?t?ie:ne:t?re:te},nt=function(e,t,n){if(e===void 0&&(e=``),t===void 0&&(t=$e().serverZone),n===void 0&&(n=$e().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=[`US`,`EU`].includes(t)?t:$e().serverZone;return{serverZone:r,serverUrl:tt(r,n)}},rt=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();(function(){function e(){}return e})();function it(e){return e>=200&&e<300}var at=function(e){return e===void 0&&(e=0),(Error().stack||``).split(` 5`).slice(2+e).map(function(e){return e.trim()})},L=function(e){return function(){var t=r({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},ot=function(e,t){var n,r;t=t.replace(/\[(\w+)\]/g,`.$1`),t=t.replace(/^\./,``);try{for(var i=l(t.split(`.`)),a=i.next();!a.done;a=i.next()){var o=a.value;if(o in e)e=e[o];else return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},R=function(e,t){return function(){var n,r,i={};try{for(var a=l(t),o=a.next();!o.done;o=a.next()){var s=o.value;i[s]=ot(e,s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}},z=function(e,t,n,r,i){return i===void 0&&(i=null),function(){var a=[...arguments],o=n(),s=o.logger,c=o.logLevel;if(c&&c<Xe.Debug||!c||!s)return e.apply(i,a);var l={type:`invoke public method`,name:t,args:a,stacktrace:at(1),time:{start:new Date().toISOString()},states:{}};r&&l.states&&(l.states.before=r());var u=e.apply(i,a);return u&&u.promise?u.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),s.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),s.debug(JSON.stringify(l,null,2))),u}};function st(e){return e instanceof Error?e.message:String(e)}function ct(e){var t=``;try{`body`in e&&(t=JSON.stringify(e.body,null,2))}catch{}return t}var lt=function(){function e(e){this.name=`amplitude`,this.type=`destination`,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey=``,this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=e?.diagnosticsClient}return e.prototype.setup=function(e){return b(this,void 0,void 0,function(){var t,n=this;return d(this,function(r){switch(r.label){case 0:return this.config=e,this.storageKey=`${ee}_${this.config.apiKey.substring(0,10)}`,[4,this.config.storageProvider?.get(this.storageKey)];case 1:return t=r.sent(),t&&t.length>0&&Promise.all(t.map(function(e){return n.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||=Re(),new Promise(function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.queue.push(r),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries?!0:(t.fulfillRequest([e],500,je),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(e.timeout===0?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline&&(this.scheduleId===null||this.scheduleId&&e>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return e===void 0&&(e=!1),b(this,void 0,void 0,function(){var t,n,r,i=this;return d(this,function(a){switch(a.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug(`Skipping flush while offline.`),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug(`Skipping flush because previous flush has not resolved.`),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return e.timeout===0?t.push(e):n.push(e)}),r=Ye(t,this.config.flushQueueSize),[4,r.reduce(function(t,n){return b(i,void 0,void 0,function(){return d(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())]);case 1:return a.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){var n;return t===void 0&&(t=!0),b(this,void 0,void 0,function(){var r,i,a,o,c;return d(this,function(l){switch(l.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,Ne)];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,s(t,[`extra`])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new rt,l.label=1;case 1:return l.trys.push([1,3,,4]),i=nt(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,r)];case 2:return a=l.sent(),a===null?(this.fulfillRequest(e,0,Ae),[2]):t?(this.handleResponse(a,e),[3,4]):(`body`in a?this.fulfillRequest(e,a.statusCode,`${a.status}: ${ct(a)}`):this.fulfillRequest(e,a.statusCode,a.status),[2]);case 3:return o=l.sent(),c=st(o),this.config.loggerProvider.error(c),(n=this.diagnosticsClient)==null||n.recordEvent(`anal
5ytics.events.unsuccessful.from.catch.error`,{events:e.map(function(e){return e.event.event_type}),message:c,stack_trace:at()}),this.handleResponse({status:F.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){var n;it(e.statusCode)||(n=this.diagnosticsClient)==null||n.recordEvent(`analytics.events.unsuccessful`,{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:ct(e),stack_trace:at()});var r=e.status;switch(r){case F.Success:this.handleSuccessResponse(e,t);break;case F.Invalid:this.handleInvalidResponse(e,t);break;case F.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case F.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn(`{code: 0, error: "Status '${r}' provided for ${t.length} events"}`),this.handleOtherResponse(t);break}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,ke)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(`Invalid API key`)){this.fulfillRequest(t,e.statusCode,e.body.error);return}var r=c(c(c(c([],p(Object.values(e.body.eventsWithInvalidFields)),!1),p(Object.values(e.body.eventsWithMissingFields)),!1),p(Object.values(e.body.eventsWithInvalidIdLengths)),!1),p(e.body.silencedEvents),!1).flat(),i=new Set(r),a=t.filter(function(t,r){if(i.has(r)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return!0});a.length>0&&this.config.loggerProvider.warn(ct(e));var o=this.removeEventsExceedFlushMaxRetries(a);this.scheduleEvents(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(t.length===1){this.fulfillRequest(t,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(ct(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,o=new Set(r),s=new Set(i),c=new Set(a),l=t.filter(function(t,r){if(t.event.user_id&&o.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return c.has(r)&&(t.timeout=n.throttleTimeout),!0});l.length>0&&this.config.loggerProvider.warn(ct(e));var u=this.removeEventsExceedFlushMaxRetries(l);this.scheduleEvents(u)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){var r,i,a;it(t)?(a=this.diagnosticsClient)==null||a.increment(`analytics.events.sent`,e.length):((r=this.diagnosticsClient)==null||r.increment(`analytics.events.dropped`,e.length),(i=this.diagnosticsClient)==null||i.recordEvent(`analytics.events.dropped`,{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:at()})),this.removeEvents(e),e.forEach(function(e){return e.callback(Fe(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),ut=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:dt(),platform:`Web`,os:void 0,deviceModel:void 0}},e}(),dt=function(){return typeof navigator<`u`&&(navigator.languages&&navigator.languages[0]||navigator.language)||``},ft=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),pt=function(){return pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pt.apply(this,arguments)};function mt(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
5if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function ht(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}var gt=function(e,t){var n,r,i=[`string`,`number`,`boolean`,`undefined`],a=typeof e;if(a!==typeof t)return!1;try{for(var o=mt(i),s=o.next();!s.done;s=o.next())if(s.value===a)return e===t}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;var c=Array.isArray(e),l=Array.isArray(t);if(c!==l)return!1;if(c&&l){for(var u=0;u<e.length;u++)if(!gt(e[u],t[u]))return!1}else{if(!gt(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var d=!0;return Object.keys(e).forEach(function(n){gt(e[n],t[n])||(d=!1)}),d}return!0},_t=`$set`,vt=`$unset`,yt=`$clearAll`;Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var bt=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=pt({},this.identity.userProperties),n=pt(pt({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,a,o,s,c=n.userProperties||{};try{for(var l=mt(Object.entries(e)),u=l.next();!u.done;u=l.next()){var d=ht(u.value,2),f=d[0],p=d[1];switch(f){case _t:try{for(var m=(i=void 0,mt(Object.entries(p))),h=m.next();!h.done;h=m.next()){var g=ht(h.value,2),_=g[0],v=g[1];c[_]=v}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}break;case vt:try{for(var y=(o=void 0,mt(Object.keys(p))),b=y.next();!b.done;b=y.next()){var _=b.value;delete c[_]}}catch(e){o={error:e}}finally{try{b&&!b.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}break;case yt:c={};break}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return n.userProperties=c,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return pt({},this.identity)},e.prototype.setIdentity=function(e){var t=pt({},this.identity);this.identity=pt({},e),gt(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),xt=typeof globalThis<`u`?globalThis:typeof global<`u`?global:self,St=function(){function e(){this.identityStore=new bt,this.eventBridge=new ft,this.applicationContextProvider=new ut}return e.getInstance=function(t){return xt.analyticsConnectorInstances||={},xt.analyticsConnectorInstances[t]||(xt.analyticsConnectorInstances[t]=new e),xt.analyticsConnectorInstances[t]},e}(),Ct=function(e){return e===void 0&&(e=M),St.getInstance(e)},wt=function(e,t){Ct(t).identityStore.editIdentity().setUserId(e).commit()},Tt=function(e,t){Ct(t).identityStore.editIdentity().setDeviceId(e).commit()},Et=function(){function e(){this.name=`identity`,this.type=`before`,this.identityStore=Ct().identityStore}return e.prototype.execute=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){return t=e.user_properties,t&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return e.instanceName&&(this.identityStore=Ct(e.instanceName).identityStore),[2]})})},e}(),Dt=function(e,t){return t===void 0&&(t=Date.now()),Date.now()-t>e},Ot=function(e,t,n){return t===void 0&&(t=``),n===void 0&&(n=10),[`AMP`,t,e.substring(0,n)].filter(
5Boolean).join(`_`)},kt=function(e){return`amp_${e.substring(0,6)}`},At=function(){if(typeof navigator>`u`)return``;var e=navigator.userLanguage;return navigator.languages?.[0]??navigator.language??e??``},jt=function(){var e=I();return e?.location?.search?e.location.search.substring(1).split(`&`).filter(Boolean).reduce(function(e,t){var n=t.split(`=`,2),r=Mt(n[0]),i=Mt(n[1]);return i&&(e[r]=i),e},{}):{}},Mt=function(e){e===void 0&&(e=``);try{return decodeURIComponent(e)}catch{return``}},Nt=function(e,t){return!t||!t.length?!0:t.some(function(t){return typeof t==`string`?e===t:e.match(t)})},Pt=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){t?.error(`Malformed URI sequence: `,e)}return n},Ft=function(e){var t=0;if(e.length===0)return t;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t},It=function(e,t){var n=Ft(e.toString());return Math.abs(n)*31%1e6/1e6<t},Lt=function(e,t){var n=Ft(e.toString());return Math.abs(n)*31%1e5/1e5<t},Rt=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return b(this,void 0,void 0,function(){return d(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return t=n.sent(),[2,t?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return b(this,void 0,void 0,function(){return d(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return b(this,void 0,void 0,function(){return d(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),zt=function(){function e(e,t){t===void 0&&(t={}),this.options=r({},e),this.config=t}return e.prototype.isEnabled=function(){return b(this,void 0,void 0,function(){var t,n,i,a;return d(this,function(o){switch(o.label){case 0:if(!I())return[2,!1];e.testValue=String(Date.now()),t=r(r({},this.options),{expirationDays:.003}),n=new e(t),i=`AMP_TEST_${Re().substring(0,8)}`,o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,n.set(i,e.testValue)];case 2:return o.sent(),[4,n.get(i)];case 3:return a=o.sent(),[2,a===e.testValue];case 4:return o.sent(),[2,!1];case 5:return[4,n.remove(i)];case 6:return o.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return b(this,void 0,void 0,function(){var t,n;return d(this,function(r){switch(r.label){case 0:return[4,this.getRaw(e)];case 1:if(t=r.sent(),!t)return[2,void 0];try{return n=Ht(t),n===void 0?(console.error(`Amplitude Logger [Error]: Failed to decode cookie value for key: ${e}, value: ${t}`),[2,void 0]):[2,JSON.parse(n)]}catch{return console.error(`Amplitude Logger [Error]: Failed to parse cookie value for key: ${e}, value: ${t}`),[2,void 0]}return[2]}})})},e.prototype.getRaw=function(e){var t,n;return b(this,void 0,void 0,function(){var r,i,a,o,s,c,u,f,p,m,h,g,_=this;return d(this,function(d){switch(d.label){case 0:r=I(),i=r,d.label=1;case 1:return d.trys.push([1,4,,5]),a=i?.cookieStore,a?[4,a.getAll(e)]:[3,3];case 2:if(o=d.sent(),o){o.length>1&&((t=this.config.diagnosticsClient)==null||t.recordEvent(`cookies.duplicate`,{cookies:o.map(function(e){return e.domain})}),(n=this.config.diagnosticsClient)==null||n.increment(`cookies.duplicate.occurrence.cookieStore`));try{for(s=l(o),c=s.next();!c.done;c=s.next())if(u=c.value,Ut(u.domain,this.options.domain))return[2,u.value]}catch(e){h={error:e}}finally{try{c&&!c.done&&(g=s.return)&&g.call(s)}finally{if(h)throw h.error}}}d.label=3;case 3:return[3,5];case 4:return d.sent(),[3,5];case 5:return f=((r?.document)?.cookie.split(`; `)??[]).filter(function(t){return t.indexOf(e+`=`)===0}),p=void 0,m=this.config.duplicateResolverFn,typeof m==`function`&&f.length>1&&(p=f.find(function(t){var n;try{var r=m(t.substring(e.length+1));return r||(n=_.config.diagnosticsClient)==null||n.increment(`cookies.duplicate.occurrence.document.cookie`),r}catch{return!1}}
5)),p||=f[0],p?[2,p.substring(e.length+1)]:[2,void 0]}})})},e.prototype.set=function(e,t){return b(this,void 0,void 0,function(){var n,r,i,a,o,s,c;return d(this,function(l){try{n=this.options.expirationDays??0,r=t===null?-1:n,i=void 0,r&&(a=new Date,a.setTime(a.getTime()+r*24*60*60*1e3),i=a),o=`${e}=${btoa(encodeURIComponent(JSON.stringify(t)))}`,i&&(o+=`; expires=${i.toUTCString()}`),o+=`; path=/`,this.options.domain&&(o+=`; domain=${this.options.domain}`),this.options.secure&&(o+=`; Secure`),this.options.sameSite&&(o+=`; SameSite=${this.options.sameSite}`),s=I(),s&&(s.document.cookie=o)}catch(t){c=t instanceof Error?t.message:String(t),console.error(`Amplitude Logger [Error]: Failed to set cookie for key: ${e}. Error: ${c}`)}return[2]})})},e.prototype.remove=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return b(this,void 0,void 0,function(){return d(this,function(e){return[2]})})},e}(),Bt=function(e){try{return decodeURIComponent(atob(e))}catch{return}},Vt=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch{return}},Ht=function(e){return Bt(e)??Vt(e)},Ut=function(e,t){if(!e||!t)return!1;var n=e.startsWith(`.`)?e.substring(1):e,r=t.startsWith(`.`)?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()},Wt=function(e,t,n){return t===void 0&&(t=``),n===void 0&&(n=10),[`AMP`,t,e.substring(0,n)].filter(Boolean).join(`_`)},Gt=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return b(this,void 0,void 0,function(){var t,n,r,i;return d(this,function(a){switch(a.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r=`AMP_TEST`,a.label=1;case 1:return a.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return a.sent(),[4,n.get(r)];case 3:return i=a.sent(),[2,i===t];case 4:return a.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return a.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return t=n.sent(),t?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),console.error(`[Amplitude] Error: Could not get value from storage`),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return[2,this.storage?.getItem(e)||void 0]})})},e.prototype.set=function(e,t){var n;return b(this,void 0,void 0,function(){return d(this,function(r){try{(n=this.storage)==null||n.setItem(e,JSON.stringify(t))}catch{}return[2]})})},e.prototype.remove=function(e){var t;return b(this,void 0,void 0,function(){return d(this,function(n){try{(t=this.storage)==null||t.removeItem(e)}catch{}return[2]})})},e.prototype.reset=function(){var e;return b(this,void 0,void 0,function(){return d(this,function(t){try{(e=this.storage)==null||e.clear()}catch{}return[2]})})},e}(),Kt=10,qt=1,B={TAGS:`tags`,COUNTERS:`counters`,HISTOGRAMS:`histograms`,EVENTS:`events`,INTERNAL:`internal`},Jt={LAST_FLUSH_TIMESTAMP:`last_flush_timestamp`},Yt=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName=`AMP_diagnostics_${e.substring(0,10)}`}return e.isSupported=function(){return I()?.indexedDB!==void 0},e.prototype.getDB=function(){return b(this,void 0,void 0,function(){return d(this,function(e){return this.dbPromise||=this.openDB(),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,n){var r=indexedDB.open(e.dbName,qt);r.onerror=function(){e.dbPromise=null,n(Error(`Failed to open IndexedDB`))},r.onsuccess=function(){var n=r.result;
5n.onclose=function(){e.dbPromise=null,e.logger.debug(`DiagnosticsStorage: DB connection closed.`)},n.onerror=function(t){e.logger.debug(`DiagnosticsStorage: A global database error occurred.`,t),n.close()},t(n)},r.onupgradeneeded=function(t){var n=t.target.result;e.createTables(n)}})},e.prototype.createTables=function(e){e.objectStoreNames.contains(B.TAGS)||e.createObjectStore(B.TAGS,{keyPath:`key`}),e.objectStoreNames.contains(B.COUNTERS)||e.createObjectStore(B.COUNTERS,{keyPath:`key`}),e.objectStoreNames.contains(B.HISTOGRAMS)||e.createObjectStore(B.HISTOGRAMS,{keyPath:`key`}),e.objectStoreNames.contains(B.EVENTS)||e.createObjectStore(B.EVENTS,{keyPath:`id`,autoIncrement:!0}).createIndex(`time_idx`,`time`,{unique:!1}),e.objectStoreNames.contains(B.INTERNAL)||e.createObjectStore(B.INTERNAL,{keyPath:`key`})},e.prototype.setTags=function(e){return b(this,void 0,void 0,function(){var t,n,r,i,a=this;return d(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),Object.entries(e).length===0?[2]:[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([B.TAGS],`readwrite`),r=n.objectStore(B.TAGS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){a.logger.debug(`DiagnosticsStorage: Failed to set tags`,e),t()},i.forEach(function(e){var t=p(e,2),n=t[0],i=t[1],o=r.put({key:n,value:i});o.onerror=function(e){a.logger.debug(`DiagnosticsStorage: Failed to set tag`,n,i,e)}})})];case 2:return i=o.sent(),this.logger.debug(`DiagnosticsStorage: Failed to set tags`,i),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return b(this,void 0,void 0,function(){var t,n,r,i,a=this;return d(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),Object.entries(e).length===0?[2]:[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([B.COUNTERS],`readwrite`),r=n.objectStore(B.COUNTERS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){a.logger.debug(`DiagnosticsStorage: Failed to increment counters`,e),t()},i.forEach(function(e){var t=p(e,2),n=t[0],i=t[1],o=r.get(n);o.onsuccess=function(){var e=o.result,t=e?e.value:0,s=r.put({key:n,value:t+i});s.onerror=function(e){a.logger.debug(`DiagnosticsStorage: Failed to update counter`,n,e)}},o.onerror=function(e){a.logger.debug(`DiagnosticsStorage: Failed to read existing counter`,n,e)}})})];case 2:return i=o.sent(),this.logger.debug(`DiagnosticsStorage: Failed to increment counters`,i),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return b(this,void 0,void 0,function(){var t,n,r,i,a=this;return d(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),Object.entries(e).length===0?[2]:[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([B.HISTOGRAMS],`readwrite`),r=n.objectStore(B.HISTOGRAMS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){a.logger.debug(`DiagnosticsStorage: Failed to set histogram stats`,e),t()},i.forEach(function(e){var t=p(e,2),n=t[0],i=t[1],o=r.get(n);o.onsuccess=function(){var e=o.result,t=e?{key:n,count:e.count+i.count,min:Math.min(e.min,i.min),max:Math.max(e.max,i.max),sum:e.sum+i.sum}:{key:n,count:i.count,min:i.min,max:i.max,sum:i.sum},s=r.put(t);s.onerror=function(e){a.logger.debug(`DiagnosticsStorage: Failed to set histogram stats`,n,e)}},o.onerror=function(e){a.logger.debug(`DiagnosticsStorage: Failed to read existing histogram stats`,n,e)}})})];case 2:return i=o.sent(),this.logger.debug(`DiagnosticsStorage: Failed to set histogram stats`,i),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return b(this,void 0,void 0,function(){var t,n,r,i,a=this;return d(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e.length===0?[2]:[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([B.EVENTS],`readwrite`),r=n.objectStore(B.EVENTS),[2,new Promise(function(t){n.oncomplete=function(){t()},n.onabort=function(e){a.logger.debug(`DiagnosticsStorage: Failed to add event records`,e),t()};var i=r.count();i.onsuccess=function(){var t=i.result,n=Math.max(0,Kt-t);n<e.length&&a.logger.debug(`DiagnosticsStorage: Only added ${n} of ${e.length}
5 events due to storage limit`),e.slice(0,n).forEach(function(e){var t=r.add(e);t.onerror=function(e){a.logger.debug(`DiagnosticsStorage: Failed to add event record`,e)}})},i.onerror=function(e){a.logger.debug(`DiagnosticsStorage: Failed to count existing events`,e)}})];case 2:return i=o.sent(),this.logger.debug(`DiagnosticsStorage: Failed to add event records`,i),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return b(this,void 0,void 0,function(){var n,r,i,a;return d(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=o.sent(),r=n.transaction([B.INTERNAL],`readwrite`),i=r.objectStore(B.INTERNAL),[2,new Promise(function(n,a){r.onabort=function(){return a(Error(`Failed to set internal value`))};var o=i.put({key:e,value:t});o.onsuccess=function(){return n()},o.onerror=function(){return a(Error(`Failed to set internal value`))}})];case 2:return a=o.sent(),this.logger.debug(`DiagnosticsStorage: Failed to set internal value`,a),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return b(this,void 0,void 0,function(){var t,n,r,i;return d(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([B.INTERNAL],`readonly`),r=n.objectStore(B.INTERNAL),[2,new Promise(function(t,i){n.onabort=function(){return i(Error(`Failed to get internal value`))};var a=r.get(e);a.onsuccess=function(){return t(a.result)},a.onerror=function(){return i(Error(`Failed to get internal value`))}})];case 2:return i=a.sent(),this.logger.debug(`DiagnosticsStorage: Failed to get internal value`,i),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return b(this,void 0,void 0,function(){var e,t;return d(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(Jt.LAST_FLUSH_TIMESTAMP)];case 1:return e=n.sent(),[2,e?parseInt(e.value,10):void 0];case 2:return t=n.sent(),this.logger.debug(`DiagnosticsStorage: Failed to get last flush timestamp`,t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(Jt.LAST_FLUSH_TIMESTAMP,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),this.logger.debug(`DiagnosticsStorage: Failed to set last flush timestamp`,t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(Error(`Failed to clear table ${t}`))}})},e.prototype.getAllAndClear=function(){return b(this,void 0,void 0,function(){var e,t,n,r,i,a,o,s;return d(this,function(c){switch(c.label){case 0:return c.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=c.sent(),t=e.transaction([B.TAGS,B.COUNTERS,B.HISTOGRAMS,B.EVENTS],`readwrite`),[4,Promise.all([this.getAllFromStore(t,B.TAGS),this.getAllFromStore(t,B.COUNTERS),this.getAllFromStore(t,B.HISTOGRAMS),this.getAllFromStore(t,B.EVENTS)])];case 2:return n=p.apply(void 0,[c.sent(),4]),r=n[0],i=n[1],a=n[2],o=n[3],[4,Promise.all([this.clearTable(t,B.COUNTERS),this.clearTable(t,B.HISTOGRAMS),this.clearTable(t,B.EVENTS)])];case 3:return c.sent(),[2,{tags:r,counters:i,histogramStats:a,events:o}];case 4:return s=c.sent(),this.logger.debug(`DiagnosticsStorage: Failed to get all and clear data`,s),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(Error(`Failed to get all from ${t}`))}})},e}(),Xt=`__AMPLITUDE_SCRIPT_URL__`,Zt=`sdk.error.uncaught`,Qt=function(){return I()?.[Xt]},$t=function(e){var t=I();if(!(!t||typeof t.addEventListener!=`function`)){var n=function(e){var t=e.error instanceof Error?e.error:void 0,n=t?.stack,r=en({filename:e.filename,stack:n});r&&a({type:`error`,message:e.message,stack:n,filename:e.filename,errorName:t?.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:r}})},i=function(e){var t=e.reason instanceof Error?e.reason:void 0,n=t?.stack,r=tn(n),i=en({filename:r,stack:n});i&&a({type:`unhandledrejection`,message:t?.message??nn(e.reason),stack:n,filename:r,errorName:t?.name,metadata:{isTrusted:e.isTrusted,matchReason:i}})},a=function(t){e.recordEvent(Zt,r({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};
5t.addEventListener(`error`,n,!0),t.addEventListener(`unhandledrejection`,i,!0)}},en=function(e){var t=Qt();if(t){if(e.filename&&e.filename.includes(t))return`filename`;if(e.stack&&e.stack.includes(t))return`stack`}},tn=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},nn=function(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return`[object Object]`}},rn=1e3,an=300*1e3,on=`https://diagnostics.prod.us-west-2.amplitude.com/v1/capture`,sn=`https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture`,cn=function(){function e(e,t,n,i){n===void 0&&(n=`US`),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl=n===`US`?on:sn,this.logger.debug(`DiagnosticsClient: Initializing with options`,JSON.stringify(i,null,2)),this.config=r({enabled:!0,sampleRate:0},i),this.startTimestamp=Date.now(),this.shouldTrack=Lt(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,Yt.isSupported()?this.storage=new Yt(e,t):this.logger.debug(`DiagnosticsClient: IndexedDB is not supported`),this.initializeFlushInterval(),this.shouldTrack&&(this.increment(`sdk.diagnostics.sampled.in.and.enabled`),$t(this))}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryTags).length>=1e4){this.logger.debug(`DiagnosticsClient: Early return setTags as reaching memory limit`);return}this.inMemoryTags[e]=t,this.startTimersIfNeeded()}},e.prototype.increment=function(e,t){if(t===void 0&&(t=1),this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=1e4){this.logger.debug(`DiagnosticsClient: Early return increment as reaching memory limit`);return}this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=1e4){this.logger.debug(`DiagnosticsClient: Early return recordHistogram as reaching memory limit`);return}var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=10){this.logger.debug(`DiagnosticsClient: Early return recordEvent as reaching memory limit`);return}this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug(`DiagnosticsClient: Failed to save all data to storage`,t)}).finally(function(){e.saveTimer=null})},rn),this.flushTimer||=setTimeout(function(){e._flush().catch(function(t){e.logger.debug(`DiagnosticsClient: Failed to flush`,t)}).finally(function(){e.flushTimer=null})},an)},e.prototype.saveAllDataToStorage=function(){return b(this,void 0,void 0,function(){var e,t,n,i;return d(this,function(a){switch(a.label){case 0:return this.storage?(e=r({},this.inMemoryTags),t=r({},this.inMemoryCounters),n=r({},this.inMemoryHistograms),i=c([],p(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(n),this.storage.addEventRecords(i)])]):[2];case 1:return a.sent(),[2]}})})},e.prototype._flush=function(){return b(this,void 0,void 0,function(){var e,t,n,r,i,a,o,s,c,l;return d(this,function(u){switch(u.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return u.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return e=u.sent(),t=e.tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),a={},t.forEach(function(e){a[e.key]=e.value}),o={}
5,n.forEach(function(e){o[e.key]=e.value}),s={},r.forEach(function(e){s[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),c=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),Object.keys(o).length===0&&Object.keys(s).length===0&&c.length===0?[2]:(l={tags:a,histogram:s,counters:o,events:c},this.fetch(l),[2])}})})},e.prototype.fetch=function(e){return b(this,void 0,void 0,function(){var t,n;return d(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),!I())throw Error(`DiagnosticsClient: Fetch is not supported`);return[4,fetch(this.serverUrl,{method:`POST`,headers:{"X-ApiKey":this.apiKey,"Content-Type":`application/json`},body:JSON.stringify(e)})];case 1:return t=r.sent(),t.ok?(this.logger.debug(`DiagnosticsClient: Successfully sent diagnostics data`),[3,3]):(this.logger.debug(`DiagnosticsClient: Failed to send diagnostics data.`),[2]);case 2:return n=r.sent(),this.logger.debug(`DiagnosticsClient: Failed to send diagnostics data. `,n),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return b(this,void 0,void 0,function(){var e,t,n;return d(this,function(r){switch(r.label){case 0:return this.storage?(e=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return t=r.sent()||-1,t===-1?(this.storage.setLastFlushTimestamp(e),this._setFlushTimer(an),[2]):(n=e-t,n>=3e5?(this._flush(),[2]):(this._setFlushTimer(an-n),[2]))}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug(`DiagnosticsClient: Failed to flush`,e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug(`DiagnosticsClient: Setting sample rate to`,e),this.config.sampleRate=e,this.shouldTrack=Lt(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug(`DiagnosticsClient: Should track is`,this.shouldTrack)},e}(),ln=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if(typeof e!=`object`)return null;var t=e.code||0,n=this.buildStatus(t);switch(n){case F.Success:return{status:n,statusCode:t,body:{eventsIngested:e.events_ingested??0,payloadSizeBytes:e.payload_size_bytes??0,serverUploadTime:e.server_upload_time??0}};case F.Invalid:return{status:n,statusCode:t,body:{error:e.error??``,missingField:e.missing_field??``,eventsWithInvalidFields:e.events_with_invalid_fields??{},eventsWithMissingFields:e.events_with_missing_fields??{},eventsWithInvalidIdLengths:e.events_with_invalid_id_lengths??{},epsThreshold:e.eps_threshold??0,exceededDailyQuotaDevices:e.exceeded_daily_quota_devices??{},silencedDevices:e.silenced_devices??[],silencedEvents:e.silenced_events??[],throttledDevices:e.throttled_devices??{},throttledEvents:e.throttled_events??[]}};case F.PayloadTooLarge:return{status:n,statusCode:t,body:{error:e.error??``}};case F.RateLimit:return{status:n,statusCode:t,body:{error:e.error??``,epsThreshold:e.eps_threshold??0,throttledDevices:e.throttled_devices??{},throttledUsers:e.throttled_users??{},exceededDailyQuotaDevices:e.exceeded_daily_quota_devices??{},exceededDailyQuotaUsers:e.exceeded_daily_quota_users??{},throttledEvents:e.throttled_events??[]}};case F.Timeout:default:return{status:n,statusCode:t}}},e.prototype.buildStatus=function(e){return it(e)?F.Success:e===429?F.RateLimit:e===413?F.PayloadTooLarge:e===408?F.Timeout:e>=400&&e<500?F.Invalid:e>=500?F.Failed:F.Unknown},e}(),un=function(e){u(t,e);function t(t){t===void 0&&(t={});var n=e.call(this)||this;return n.customHeaders=t,n}return t.prototype.send=function(e,t){return b(this,void 0,void 0,function(){var n,i,a;return d(this,function(o){switch(o.label){case 0:if(typeof fetch>`u`)throw Error(`FetchTransport is not supported`);return n={headers:r({"Content-Type":`application/json`,Accept:`*/*`},this.customHeaders),body:JSON.stringify(t),method:`POST`},[4,fetch(e,n)];case 1:return i=o.sent(),[4,i.text()];case 2:a=o.sent();try{return[2,this.buildResponse(JSON.parse(a))]}catch{return[2,this.buildResponse({code:i.status})]}return[2]}})})},t}(ln),dn=function(){function e(e,t){this.key=`AMP_remote_config_${e.substring(0,10)}`,this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug(`Remote config localstorage failed to access: `,e),Promise.resolve(t)}if(e===null)return this.logger.debug(`Remote config localstorage gets null because the key does not exist`),Promise.resolve(t);try{var n=JSON.parse(e);return this.logger.debug(`Remote config localstorage parsed successfully: ${JSON.stringify(n)}`),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(e){return this.logger.debug(`Remote config localstorage failed to parse: `,e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug(`Remote config localstorage set successfully.`),Promise.resolve(!0)}catch(e){this.logger.debug(`Remote config localstorage failed to set: `,e)}return Promise.resolve(!1)},e}(),fn=1e3,pn=300*1e3,mn=function(){function e(e,t,n,r){n===void 0&&(n=`US`),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.apiKey=e,this.serverUrl=r||(n===`US`?`https://sr-client-cfg.amplitude.com/config`:`https://sr-client-cfg.eu.amplitude.com/config`),this.logger=t,this.storage=new dn(e,t)}return e.prototype.subscribe=function(e,t,n){var r=Re(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),t===`all`?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return t===-1?(this.logger.debug(`Remote config client unsubscribe failed because callback with id ${e} doesn't exist.`),!1):(this.callbackInfos.splice(t,1),this.logger.debug(`Remote config client unsubscribe succeeded removing callback with id ${e}.`),!0)},e.prototype.updateConfigs=function(){return b(this,void 0,void 0,function(){var e,t,n=this;return d(this,function(r){switch(r.label){case 0:return this.lastSuccessfulFetch&&(e=Date.now()-this.lastSuccessfulFetch,e<pn)?(this.logger.debug(`Remote config client skipping updateConfigs: Too recent`),[2]):[4,this.getOrCreateFetchPromise()];case 1:return t=r.sent(),this.storage.setConfig(t),this.callbackInfos.forEach(function(e){n.sendCallback(e,t,`remote`)}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise||=this.fetch().then(function(t){return t.remoteConfig!==null&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null}),this.fetchPromise},e.prototype.subscribeAll=function(e){return b(this,void 0,void 0,function(){var t,n,r,i=this;return d(this,function(a){switch(a.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug(`Remote config client subscription all mode fetched from remote: ${JSON.stringify(t)}`),i.sendCallback(e,t,`remote`),i.storage.setConfig(t)}),n=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,n])];case 1:return r=a.sent(),r!==void 0&&(this.logger.debug(`Remote config client subscription all mode fetched from cache: ${JSON.stringify(r)}`),r.remoteConfig===null?this.logger.debug(`Remote config client skips sending c
5allback because cache is empty (first time user).`):this.sendCallback(e,r,`cache`)),[4,t];case 2:return a.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return b(this,void 0,void 0,function(){var n,r,r;return d(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n(`Timeout exceeded`)},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug(`Remote config client subscription wait for remote mode returns from remote.`),this.sendCallback(e,r,`remote`),this.storage.setConfig(r),[3,5];case 3:return i.sent(),this.logger.debug(`Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache.`),[4,this.storage.fetchConfig()];case 4:return r=i.sent(),r.remoteConfig===null?(this.logger.debug(`Remote config client subscription wait for remote mode failed to fetch cache.`),this.sendCallback(e,r,`remote`)):(this.logger.debug(`Remote config client subscription wait for remote mode returns a cached copy.`),this.sendCallback(e,r,`cache`)),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){e.lastCallback=new Date;var r=e.key?e.key.split(`.`).reduce(function(e,t){return e===null?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig;e.callback(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return e===void 0&&(e=3),t===void 0&&(t=fn),b(this,void 0,void 0,function(){var n,r,i,a,o,s,c=this;return d(this,function(l){switch(l.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,o,s,l,u,f;return d(this,function(d){switch(d.label){case 0:i=new AbortController,o=setTimeout(function(){return i.abort()},t),d.label=1;case 1:return d.trys.push([1,7,8,9]),[4,fetch(a.getUrlParams(),{method:`GET`,headers:{Accept:`*/*`},signal:i.signal})];case 2:return s=d.sent(),s.ok?[3,4]:[4,s.text()];case 3:return l=d.sent(),a.logger.debug(`Remote config client fetch with retry time ${e} failed with ${s.status}: ${l}`),[3,6];case 4:return[4,s.json()];case 5:return u=d.sent(),[2,{value:{remoteConfig:u,lastFetch:new Date}}];case 6:return[3,9];case 7:return f=d.sent(),f instanceof Error&&f.name===`AbortError`?a.logger.debug(`Remote config client fetch with retry time ${e} timed out after ${t}ms`):a.logger.debug(`Remote config client fetch with retry time ${e} is rejected because: `,f),[3,9];case 8:return clearTimeout(o),[7];case 9:return r<e-1?[4,new Promise(function(e){return setTimeout(e,c.getJitterDelay(n))})]:[3,11];case 10:d.sent(),d.label=11;case 11:return[2]}})},a=this,o=0,l.label=1;case 1:return o<e?[5,i(o)]:[3,4];case 2:if(s=l.sent(),typeof s==`object`)return[2,s.value];l.label=3;case 3:return o++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append(`config_group`,e.CONFIG_GROUP),`${this.serverUrl}/${t}?${n.toString()}`},e.CONFIG_GROUP=`browser`,e}(),hn=I()?.console,gn={},_n={},vn=!1;function yn(e){return!hn||typeof hn[e]!=`function`?!1:_n[e]?!0:(_n[e]=hn[e],hn[e]=function(){var t=[...arguments];try{if(gn[e]&&!vn){vn=!0;var n=gn[e];n&&n.forEach(function(n){try{n(e,t)}catch{}})}}catch{}return vn=!1,_n[e].apply(hn,t)},!0)}function bn(e,t){if(!yn(e))return Error(`Console override failed`);gn[e]?gn[e].push(t):gn[e]=[t]}function xn(e){var t,n;try{for(var r=l(Object.values(gn)),i=r.next();!i.done;i=r.next())for(var a=i.value,o=a.length-1;o>=0;o--)if(a[o]===e){a.splice(o,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}function Sn(){var e,t;try{for(var n=l(Object.entries(_n)),r=n.next();!r.done;r=n.next()){var i=p(r.value,2),a=i[0],o=i[1];o&&(hn[a]=o)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}_n={},gn={}}var Cn={addListener:bn,removeListener:xn,_restoreConsole:Sn},wn;(function(e){e.US=`US`,e.EU=`EU`,e.STAGING=`STAGING`})(wn||={});var Tn=[`a`,`button`,`input`,`select`,`textarea`,`label`,`video`,`audio`,`[contenteditable="true" i]`,`[data-amp-default-track]`,`.amp-default-track`],En=`data-amp-track-`,Dn=[`div`,`span`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],On=c([`input[type="button"]`,`input[type="submit"]`,`input[type="reset"]`,`input[type="image"]`,`input[type="file"]`],p([`a`,`button`,`[role="button"]`,`[role="link"]`,`[role="menuitem"]`,`[role="menuitemcheckbox"]`,`[role="menuitemradio"]`,`[role="option"]`,`[role="tab"]`,`[role="treeitem"]`,`[contenteditable="true" i]`]),!1),kn=On,An=On,jn=[`*`],Mn=1e3;function Nn(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e==null}function Pn(e,t,n){e&&Fn({json:e,allowlist:t.map(In),excludelist:n.map(In),ancestors:[]})}function Fn(e){var t,n,r=e.json,i=e.targetObject,a=e.allowlist,o=e.excludelist,s=e.ancestors,u=e.parentObject,d=e.targetKey;i||=r;var f=Object.keys(i);try{for(var m=l(f),h=m.next();!h.done;h=m.next()){var g=h.value,_=c(c([],p(s),!1),[g],!1);Nn(i[g])?(!Rn(_,a)||Rn(_,o))&&delete i[g]:Fn({json:r,targetObject:i[g],allowlist:a,excludelist:o,ancestors:_,parentObject:i,targetKey:g})}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}Object.keys(i).length===0&&u&&d&&delete u[d]}function In(e){return e.startsWith(`/`)&&(e=e.slice(1)),e.split(`/`).map(function(e){return e.replace(/~0/g,`~`).replace(/~1/g,`/`)})}function Ln(e,t,n,r){if(n===void 0&&(n=0),r===void 0&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&t[r]===`**`;)r++;return r===t.length}var i=t[r];
5if(i===`**`){if(r+1===t.length)return!0;for(var a=n;a<=e.length;a++)if(Ln(e,t,a,r+1))return!0;return!1}else if(i===`*`||i===e[n])return Ln(e,t,n+1,r+1);else return!1}function Rn(e,t){return t.some(function(t){return Ln(e,t)})}var zn=500,Bn=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,n;e===void 0&&(e=[]);var r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=p(e,2),n=t[0];i[n]=t[1]});else if(r instanceof Headers)r.forEach(function(e,t){i[t]=e});else if(typeof r==`object`&&r)try{for(var a=l(Object.entries(r)),o=a.next();!o.done;o=a.next()){var s=p(o.value,2),c=s[0];i[c]=s[1]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return Jn(i,{allow:e})},Object.defineProperty(e.prototype,`bodySize`,{get:function(){if(typeof this._bodySize==`number`)return this._bodySize;if(I()?.TextEncoder){var e=this.request.body;return this._bodySize=Hn(e,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`method`,{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`body`,{get:function(){return typeof this.request.body==`string`?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),b(this,void 0,void 0,function(){var n;return d(this,function(r){return e.length===0?[2,null]:(n=this.body,[2,Gn(n,e,t)])})})},e}(),Vn=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return e===void 0&&(e=[]),Jn(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,`bodySize`,{get:function(){return Hn(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`body`,{get:function(){return typeof this.bodyRaw==`string`?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),b(this,void 0,void 0,function(){var n;return d(this,function(r){return e.length===0?[2,null]:(n=this.body,[2,Gn(n,e,t)])})})},e}();function Hn(e,t){var n,r,i,a=I()?.TextEncoder;if(a){var o;if(typeof e==`string`)o=e,i=new a().encode(o).length;else if(e instanceof Blob)o=e,i=o.size;else if(e instanceof URLSearchParams)o=e,i=new a().encode(o.toString()).length;else if(ArrayBuffer.isView(e))o=e,i=o.byteLength;else if(e instanceof ArrayBuffer)o=e,i=o.byteLength;else if(e instanceof FormData){var s=e,c=0,u=0;try{for(var d=l(s.entries()),f=d.next();!f.done;f=d.next()){var m=p(f.value,2),h=m[0],g=m[1];if(c+=h.length,typeof g==`string`)c+=new a().encode(g).length;else if(g instanceof Blob)c+=g.size;else return;if(++u>=t)return}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}i=c}else if(e instanceof ReadableStream){o=e;return}return i}}var Un=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(e===void 0&&(e=[]),this.response.headers instanceof Headers){var n=this.response.headers,r={};return(t=n?.forEach)==null||t.call(n,function(e,t){r[t]=e}),Jn(r,{allow:e})}},Object.defineProperty(e.prototype,`bodySize`,{get:function(){var e;if(this._bodySize!==void 0)return this._bodySize;var t=((e=this.response.headers)?.get)?.call(e,`content-length`),n=t?parseInt(t,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`status`,{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return b(this,void 0,void 0,function(){var e,t,n;return d(this,function(r){switch(r.label){case 0:this.clonedResponse||=this.response.clone(),r.label=1;case 1:return r.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},zn)}),[4,Promise.race([e,t])];case 2:return n=r.sent(),[2,n];case 3:return r.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),b(this,void 0,void 0,function(){var n;return d(this,function(r){switch(r.label){case 0:return e.length===0?[2,null]:[4,this.text()];case 1:return n=r.sent(),[2,Gn(n,e,t)]}})})},e}(),Wn=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}return Object.defineProperty(e.prototype,`bodySize`,{get:function(){return this.size}
5,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`status`,{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,n;if(e===void 0&&(e=[]),!this.headersString)return{};var r={},i=this.headersString.split(`\r 6`);try{for(var a=l(i),o=a.next();!o.done;o=a.next()){var s=o.value,c=p(s.split(`: `),2),u=c[0],d=c[1];u&&d&&(r[u]=d)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return Jn(r,{allow:e})},e.prototype.json=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),b(this,void 0,void 0,function(){var n;return d(this,function(r){return e.length===0?[2,null]:(n=this.getJson(),n?(Pn(n,e,t),[2,n]):[2,null])})})},e}();function Gn(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return Pn(r,t,n),r}catch{return null}}var Kn;(function(e){e.REDACT=`redact`,e.REMOVE=`remove`})(Kn||={});var qn=`[REDACTED]`,Jn=function(e,t){var n,r,i=t.allow,a=i===void 0?[]:i,o=t.strategy,s=o===void 0?Kn.REMOVE:o,u=c([],p(Ce),!1),d={},f=function(t){var n=t.toLowerCase();u.find(function(e){return e.toLowerCase()===n})?s===Kn.REDACT&&(d[t]=qn):a.find(function(e){return e.toLowerCase()===n})?d[t]=e[t]:s===Kn.REDACT&&(d[t]=qn)};try{for(var m=l(Object.keys(e)),h=m.next();!h.done;h=m.next()){var g=h.value;f(g)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}return d},Yn=function(){function e(e,t,n,r,i,a,o,s,c,l,u){o===void 0&&(o=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=a,this.status=o,this.duration=s,this.responseWrapper=c,this.error=l,this.endTime=u}return e.prototype.toSerializable=function(){var e={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:this.requestWrapper?.headers(c([],p(Se),!1)),requestBodySize:this.requestWrapper?.bodySize,responseHeaders:this.responseWrapper?.headers(c([],p(Se),!1)),responseBodySize:this.responseWrapper?.bodySize};return Object.fromEntries(Object.entries(e).filter(function(e){var t=p(e,2);return t[0],t[1]!==void 0}))},e}();function Xn(e){return typeof e==`object`&&!!e&&`url`in e&&`method`in e}var Zn=function(){function e(e,t){t===void 0&&(t=Re()),this.callback=e,this.id=t}return e}(),Qn=new(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=I();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=I();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){if(this.logger||=t,this.eventCallbacks.set(e.id,e),!this.isObserving){var n=this.globalScope?.XMLHttpRequest?.prototype?.open,r=this.globalScope?.XMLHttpRequest?.prototype?.send,i=this.globalScope?.XMLHttpRequest?.prototype?.setRequestHeader;n&&r&&i&&this.observeXhr(n,r,i);var a=this.globalScope?.fetch;a&&this.observeFetch(a),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){var r;try{n.callback(e)}catch(e){(r=t.logger)==null||r.debug(`an unexpected error occurred while triggering event callbacks`,e)}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,a,o){if(!(a===void 0||o===void 0)){var s,c=`GET`;if(Xn(t)?(s=t.url,c=t.method):s=(t?.toString)?.call(t),s)try{var l=new URL(s);s=`${l.protocol}//${l.host}${l.pathname}${l.search}${l.hash}`}catch{}c=n?.method||c;var u,d;r&&(u=r.status),i&&(d={name:i.name||`UnknownError`,message:i.message||`An unknown error occurred`},u=0);var f=Math.floor(performance.now()-o),p=Math.floor(a+f),m=new Yn(e,c,a,a,s,n,u,f,r,d,p);this.triggerEventCallbacks(m)}},e.prototype.getTimestamps=function(){return{startTime:Date.now?.call(Date),durationStart:(performance==null?void 0:performance.now)?.call(performance)}},e.prototype.observeFetch=function(e){var t=this;!this.globalScope||!e||(this.globalScope.fetch=function(n,r){return b(t,void 0,void 0,function(){var t,i,a,o,s,c;return d(this,function(l){switch(l.label){case 0:try{t=this.getTimestamps()}catch(e){(s=this.logger)==null||s.debug(`an unexpected error occurred while retrieving timestamps`,e)}l.label=1;case 1:return l.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=l.sent(),[3,4];case 3:return o=l.sent(),a=o,[3,4];case 4:try{this.handleNetworkRequestEvent(`fetch`,n,r?new Bn(r):void 0,i?new Un(i):void 0,a,t?.startTime,t?.durationStart)}catch(e){(c=this.logger)==null||c.debug(`an unexpected error occurred while handling fetch`,e)}if(i)return[2,i];throw a}})})})},e.createXhrJsonParser=function(e,t){return function(){var n;try{if(e.responseType===`json`){if(t.globalScope?.structuredClone)return t.globalScope.structuredClone(e.response)}else if([`text`,``].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){return r instanceof Error&&r.name===`InvalidStateError`&&((n=t.logger)==null||n.error(`unexpected error when retrieving responseText. responseType='${e.responseType}'`)),null}return null}},e.prototype.observeXhr=function(t,n,i){if(!(!this.globalScope||!t||!n)){var a=this.globalScope.XMLHttpRequest.prototype,o=this;a.open=function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=this,s=p(n,2),c=s[0],l=s[1];try{a.$$AmplitudeAnalyticsEvent=r({method:c,url:(l?.toString)?.call(l),headers:{}},o.getTimestamps())}catch(t){(e=o.logger)==null||e.error(`an unexpected error occurred while calling xhr open`,t)}return t.apply(a,n)},a.send=function(){var t=[...arguments],r=this,i=r,a=e.createXhrJsonParser(r,o),s=t[0],c=i.$$AmplitudeAnalyticsEvent;return i.addEventListener(`loadend`,function(){var e;try{var t=i.getAllResponseHeaders(),n=i.getResponseHeader(`content-length`),r=new Wn(i.status,t,n?parseInt(n,10):void 0,a),l=i.$$AmplitudeAnalyticsEvent.headers,u=new Vn(s,l);c.status=i.status,o.handleNetworkRequestEvent(`xhr`,{url:c.url,method:c.method},u,r,void 0,c.startTime,c.durationStart)}catch(t){(e=o.logger)==null||e.error(`an unexpected error occurred while handling xhr send`,t)}}),n.apply(i,t)},a.setRequestHeader=function(e,t){var n,r=this;try{r.$$AmplitudeAnalyticsEvent.headers[e]=t}catch(e){(n=o.logger)==null||n.error(`an unexpected error occurred while calling xhr setRequestHeader`,e)}i.apply(r,[e,t])}}},e}()),$n=function(){function e(){}return e.prototype.parse=function(){return b(this,void 0,void 0,function(){return d(this,function(e){return[2,r(r(r(r({},xe),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=jt();return{utm_campaign:e[ae],utm_content:e[oe],utm_id:e[se],utm_medium:e[N],utm_source:e[ce],utm_term:e[le]}},e.prototype.getReferrer=function(){var e={referrer:void 0,referring_domain:void 0};try{e.referrer=document.referrer||void 0,e.referring_domain=e.referrer?.split(`/`)[2]??void 0}catch{}return e},e.prototype.getClickIds=function(){var e,t=jt();return e={},e[ue]=t[ue],e[de]=t[de],e[fe]=t[fe],e[pe]=t[pe],e[me]=t[me],e[he]=t[he],e[ge]=t[ge],e[_e]=t[_e],e[ve]=t[ve],e[ye]=t[ye],e[be]=t[be],e},e}(),er=`data-amp-mask`,tr=`*****`,nr=/\b(?:\d[ -]*?){13,16}\b/,rr=/(\d{3}-?\d{2}-?\d{4})/g,ir=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,ar=function(e,t){var n,r;if(t===void 0&&(t=[]),typeof e!=`string`)return``;var i=e;i=i.replace(nr,tr),i=i.replace(rr,tr),i=i.replace(ir,tr);try{for(var a=l(t),o=a.next();!o.done;o=a.next()){var s=o.value;try{i=i.replace(s,tr)}catch{}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},or=function(e){if(typeof document>`u`||!document.title)return``;var t=document.querySelector(`title`);return t&&t.hasAttribute(`data-amp-mask`)?tr:e?e(document.title):document.title};
6function sr(e,t){return new x(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function cr(e,t){return new x(function(n){var r=!1,i=new Set,a=function(){var e,t;r=!0;try{for(var n=l(i),a=n.next();!a.done;a=n.next()){var o=a.value;try{o.unsubscribe()}catch{}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},o=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),a())},complete:function(){i.delete(t),!r&&i.size===0&&(n.complete(),a(),r=!0)}});i.add(t)};return o(e),o(t),a})}function lr(e){var t=new Set,n=null;function r(){n?.unsubscribe(),n=null,t.clear()}return new x(function(i){return t.add(i),n===null&&(n=e.subscribe({next:function(e){var n,r,i;try{for(var a=l(t),o=a.next();!o.done;o=a.next()){var s=o.value;(i=s.next)==null||i.call(s,e)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},error:function(e){var n,i,a;try{for(var o=l(t),s=o.next();!s.done;s=o.next()){var c=s.value;(a=c.error)==null||a.call(c,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,i;try{for(var a=l(t),o=a.next();!o.done;o=a.next()){var s=o.value;(i=s.complete)==null||i.call(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),t.size===0&&n&&(n.unsubscribe(),n=null)}})}var ur=function(e,t){return typeof e==`boolean`?e:e?.[t]!==!1},dr=function(e){return ur(e,`attribution`)},fr=function(e){return ur(e,`fileDownloads`)},pr=function(e){return ur(e,`formInteractions`)},mr=function(e){return ur(e,`pageViews`)},hr=function(e){return ur(e,`sessions`)},gr=function(e){return ur(e,`pageUrlEnrichment`)},_r=function(e){return typeof e==`boolean`?e:typeof e==`object`&&(e.networkTracking===!0||typeof e.networkTracking==`object`)},vr=function(e){return typeof e==`boolean`?e:typeof e==`object`&&(e.elementInteractions===!0||typeof e.elementInteractions==`object`)},yr=function(e){return typeof e==`boolean`?e:typeof e==`object`&&e.webVitals===!0},br=function(e){return typeof e==`boolean`?e:typeof e==`object`&&(e.frustrationInteractions===!0||typeof e.frustrationInteractions==`object`)},xr=function(e){if(vr(e.autocapture)&&typeof e.autocapture==`object`&&typeof e.autocapture.elementInteractions==`object`)return e.autocapture.elementInteractions},Sr=function(e){if(br(e.autocapture)&&typeof e.autocapture==`object`&&typeof e.autocapture.frustrationInteractions==`object`)return e.autocapture.frustrationInteractions},Cr=function(e){if(_r(e.autocapture)){var t=void 0;return typeof e.autocapture==`object`&&typeof e.autocapture.networkTracking==`object`?t=e.autocapture.networkTracking:e.networkTrackingOptions&&(t=e.networkTrackingOptions),r(r({},t),{captureRules:(t?.captureRules)?.map(function(t){var n;if(t.urls?.length&&t.hosts?.length){var i=JSON.stringify(t.hosts),a=JSON.stringify(t.urls);return(n=e.loggerProvider)==null||n.warn(`Found network capture rule with both urls='${a}' and hosts='${i}' set. Definition of urls takes precedence over hosts, so ignoring hosts.`),r(r({},t),{hosts:void 0})}return t})})}},wr=function(e){var t=function(){return!1},n=void 0,r,i=e.pageCounter;return mr(e.defaultTracking)&&(t=void 0,r=void 0,e.defaultTracking&&typeof e.defaultTracking==`object`&&e.defaultTracking.pageViews&&typeof e.defaultTracking.pageViews==`object`&&(`trackOn`in e.defaultTracking.pageViews&&(t=e.defaultTracking.pageViews.trackOn),`trackHistoryChanges`in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),`eventType`in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(r=e.defaultTracking.pageViews.eventType))),{trackOn:t,trackHistoryChanges:n,eventType:r,pageCounter:i}},Tr=function(e){return dr(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking==`object`&&e.defaultTracking.attribution&&typeof e.defaultTracking.attribution==`object`?r({},e.defaultTracking.attribution):{}},Er=function(e){if(pr(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking==`object`&&typeof e.defaultTracking.formInteractions==`object`)return e.defaultTracking.formInteractions},Dr=function(e,t){Or(e,t)},Or=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,a=r.args,o=r.resolve,s=e&&e[i];if(typeof s==`function`){var c=s.apply(e,a);typeof o==`function`&&o(c?.promise)}}return e},kr=function(e){var t=e;return t&&t._q!==void 0},Ar=`2.34.0`,jr=`amplitude-ts`,Mr=`Web`,Nr=`$remote`,Pr=function(){function e(){this.name=`@amplitude/plugin-context-browser`,this.type=`before`,this.library=`${jr}/${Ar}`,typeof navigator<`u`&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){return b(this,void 0,void 0,function(){var t,n,i,a;return d(this,function(o){return t=new Date().getTime(),n=this.config.lastEventId??-1,i=e.event_id??n+1,this.config.lastEventId=i,e.time||(this.config.lastEventTime=t),a=r(r(r(r(r(r(r(r({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:Mr}),this.config.trackingOptions.language&&{language:At()}),this.config.trackingOptions.ipAddress&&{ip:Nr}),{insert_id:Re(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:i,library:this.library,user_agent:this.userAgent}),[2,a]})})},e}(),Fr=1e3,Ir=function(e){u(t,e);function t(t){var n=this,r,i;try{i=I()?.localStorage}catch(e){(r=t?.loggerProvider)==null||r.debug(`Failed to access localStorage. error=${JSON.stringify(e)}`),i=void 0}return n=e.call(this,i)||this,n.loggerProvider=t?.loggerProvider,n}return t.prototype.set=function(t,n){var r;return b(this,void 0,void 0,function(){var i;return d(this,function(a){switch(a.label){case 0:return Array.isArray(n)&&n.length>Fr?(i=n.length-Fr,[4,e.prototype.set.call(this,t,n.slice(0,Fr))]):[3,2];case 1:return a.sent(),(r=this.loggerProvider)==null||r.error(`Failed to save ${i} events because the queue length exceeded ${Fr}.`),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:a.sent(),a.label=4;case 4:return[2]}})})},t}(Gt),Lr=function(e){u(t,e);function t(){return e.call(this,I()?.sessionStorage)||this}return t}(Gt),Rr=function(e){u(t,e);function t(t){t===void 0&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return t.prototype.send=function(e,t){return b(this,void 0,void 0,function(){var n=this;return d(this,function(i){return[2,new Promise(function(i,a){var o,s;typeof XMLHttpRequest>`u`&&a(Error(`XHRTransport is not supported.`));var c=new XMLHttpRequest;c.open(`POST`,e,!0),c.onreadystatechange=function(){if(c.readyState===n.state.done){var e=c.responseText;try{i(n.buildResponse(JSON.parse(e)))}catch{i(n.buildResponse({code:c.status}))}}};var u=r({"Content-Type":`application/json`,Accept:`*/*`},n.customHeaders);try{for(var d=l(Object.entries(u)),f=d.next();!f.done;f=d.next()){var m=p(f.value,2),h=m[0],g=m[1];c.setRequestHeader(h,g)}}catch(e){o={error:e}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}c.send(JSON.stringify(t))})]})})},t}(ln),zr=function(e){u(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(e,t){return b(this,void 0,void 0,function(){var n=this;return d(this,function(r){return[2,new Promise(function(r,i){var a=I();if(!a?.navigator.sendBeacon)throw Error(`SendBeaconTransport is not supported`);try{var o=JSON.stringify(t);return a.navigator.sendBeacon(e,JSON.stringify(t))?r(n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:o.length,server_upload_time:Date.now()})):r(n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(ln),Br=function(e,t,n){return n===void 0&&(n=!0),b(void 0,void 0,void 0,function(){var r,i,a,o,s,c,l,u,f;return d(this,function(d){switch(d.label){case 0:return r=kt(e),[4,t.getRaw(r)];case 1:return i=d.sent(),i?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:d.sent(),d.label=3;case 3:return a=p(i.split(`.`),6),o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],f=
6a[5],[2,{deviceId:o,userId:Hr(s),sessionId:Vr(l),lastEventId:Vr(f),lastEventTime:Vr(u),optOut:!!c}]}})})},Vr=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},Hr=function(e){if(!(!atob||!escape||!e))try{return decodeURIComponent(escape(atob(e)))}catch{return}},Ur=`[Amplitude]`;`${Ur}`;var Wr=`${Ur} Form Started`,Gr=`${Ur} Form Submitted`,Kr=`${Ur} File Downloaded`,qr=`session_start`,Jr=`session_end`,Yr=`${Ur} File Extension`,Xr=`${Ur} File Name`,Zr=`${Ur} Link ID`,Qr=`${Ur} Link Text`,$r=`${Ur} Link URL`,ei=`${Ur} Form ID`,ti=`${Ur} Form Name`,ni=`${Ur} Form Destination`,ri=`cookie`,ii=function(e){u(t,e);function t(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,ee,M,te,ne,re,ie,ae,oe,se){r===void 0&&(r=new Rt),i===void 0&&(i={domain:``,expiration:365,sameSite:`Lax`,secure:!1,upgrade:!0}),c===void 0&&(c=1e3),l===void 0&&(l=5),u===void 0&&(u=30),d===void 0&&(d=ri),g===void 0&&(g=new Qe),_===void 0&&(_=Xe.Warn),y===void 0&&(y=!1),b===void 0&&(b=!1),C===void 0&&(C=``),w===void 0&&(w=`US`),E===void 0&&(E=1800*1e3),D===void 0&&(D=new Ir({loggerProvider:g})),O===void 0&&(O={ipAddress:!0,language:!0,platform:!0}),k===void 0&&(k=`fetch`),A===void 0&&(A=!1),j===void 0&&(j=!0),ie===void 0&&(ie=!0),ae===void 0&&(ae=0);var N=this;N=e.call(this,{apiKey:t,storageProvider:D,transportProvider:ci(k)})||this,N.apiKey=t,N.appVersion=n,N.cookieOptions=i,N.defaultTracking=a,N.autocapture=o,N.flushIntervalMillis=c,N.flushMaxRetries=l,N.flushQueueSize=u,N.identityStorage=d,N.ingestionMetadata=f,N.instanceName=p,N.loggerProvider=g,N.logLevel=_,N.minIdLength=v,N.offline=y,N.partnerId=x,N.plan=S,N.serverUrl=C,N.serverZone=w,N.sessionTimeout=E,N.storageProvider=D,N.trackingOptions=O,N.transport=k,N.useBatch=A,N.fetchRemoteConfig=j,N.networkTrackingOptions=ne,N.identify=re,N.enableDiagnostics=ie,N.diagnosticsSampleRate=ae,N.diagnosticsClient=oe,N.remoteConfig=se,N.version=Ar,N._optOut=!1,N._cookieStorage=r,N.deviceId=s,N.lastEventId=m,N.lastEventTime=h,N.optOut=b,N.sessionId=T,N.pageCounter=M,N.userId=ee,N.debugLogsEnabled=te,N.loggerProvider.enable(te?Xe.Debug:N.logLevel),N.networkTrackingOptions=ne,N.identify=re,N.enableDiagnostics=ie,N.diagnosticsSampleRate=ae,N.diagnosticsClient=oe;var ce=se?.fetchRemoteConfig??j;return N.remoteConfig=N.remoteConfig||{},N.remoteConfig.fetchRemoteConfig=ce,N.fetchRemoteConfig=ce,N}return Object.defineProperty(t.prototype,`cookieStorage`,{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`deviceId`,{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`userId`,{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`sessionId`,{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`optOut`,{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastEventTime`,{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastEventId`,{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pageCounter`,{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`debugLogsEnabled`,{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())}
6,enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof zt&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(Ot(this.apiKey),e)},t}(et),ai=function(e,t,n,i,a){return t===void 0&&(t={}),b(void 0,void 0,void 0,function(){var o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k;return d(this,function(d){switch(d.label){case 0:return o=t.identityStorage||`cookie`,O={},o===`cookie`?[3,1]:(c=``,[3,5]);case 1:return(k=t.cookieOptions?.domain)==null?[3,2]:(l=k,[3,4]);case 2:return[4,li()];case 3:l=d.sent(),d.label=4;case 4:c=l,d.label=5;case 5:return s=r.apply(void 0,[(O.domain=c,O.expiration=365,O.sameSite=`Lax`,O.secure=!1,O.upgrade=!0,O),t.cookieOptions]),u={duplicateResolverFn:function(e){var t=Ht(e);return t?Ut(JSON.parse(t).cookieDomain,s.domain):!1},diagnosticsClient:i},f=oi(t.identityStorage,s,u),[4,Br(e,f,t.cookieOptions?.upgrade??!0)];case 6:return p=d.sent(),[4,f.get(Ot(e))];case 7:return m=d.sent(),h=jt(),g=h.ampTimestamp?Number(h.ampTimestamp):void 0,_=g?Date.now()<g:!0,v=t.deviceId??(_?h.ampDeviceId??h.deviceId:void 0)??m?.deviceId??p.deviceId??Re(),y=m?.lastEventId??p.lastEventId,b=m?.lastEventTime??p.lastEventTime,x=t.optOut??m?.optOut??p.optOut,S=m?.sessionId??p.sessionId,C=t.userId??m?.userId??p.userId,n.previousSessionDeviceId=m?.deviceId??p.deviceId,n.previousSessionUserId=m?.userId??p.userId,w={ipAddress:t.trackingOptions?.ipAddress??!0,language:t.trackingOptions?.language??!0,platform:t.trackingOptions?.platform??!0},T=m?.pageCounter,E=m?.debugLogsEnabled,t.autocapture!==void 0&&(t.defaultTracking=t.autocapture),D=new ii(e,t.appVersion,f,s,t.defaultTracking,t.autocapture,v,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,o,t.ingestionMetadata,t.instanceName,y,b,a?.loggerProvider??t.loggerProvider,t.logLevel,t.minIdLength,t.offline,x,t.partnerId,t.plan,t.serverUrl,a?.serverZone??t.serverZone,S,t.sessionTimeout,t.storageProvider,w,t.transport,t.useBatch,t.fetchRemoteConfig,C,T,E,t.networkTrackingOptions,t.identify,a?.enableDiagnostics??t.enableDiagnostics,a?.diagnosticsSampleRate??n._diagnosticsSampleRate,i,t.remoteConfig),[4,D.storageProvider.isEnabled()];case 8:return d.sent()||(D.loggerProvider.warn(`Storage provider ${D.storageProvider.constructor.name} is not enabled. Falling back to MemoryStorage.`),D.storageProvider=new Rt),[2,D]}})})},oi=function(e,t,n){switch(e===void 0&&(e=ri),t===void 0&&(t={}),e){case`localStorage`:return new Ir;case`sessionStorage`:return new Lr;case`none`:return new Rt;default:return new zt(r(r({},t),{expirationDays:t.expiration}),n)}},si=function(e){return e===void 0&&(e={}),e.remoteConfig?.fetchRemoteConfig===!0?!0:!(e.remoteConfig?.fetchRemoteConfig===!1||e.fetchRemoteConfig===!1)},ci=function(e){var t=typeof e==`object`?e.type:e,n=typeof e==`object`?e.headers:void 0;return t===`xhr`?new Rr(n):t===`beacon`?new zr:new un(n)},li=function(e){return b(void 0,void 0,void 0,function(){var t,n,r,i,a,o,o,s,c,l,u;return d(this,function(d){switch(d.label){case 0:return[4,new zt().isEnabled()];case 1:if(!d.sent()||!e&&(typeof location>`u`||!location.hostname))return[2,``];for(t=e??location.hostname,n=t.split(`.`),r=[],i=Re(),a=`AMP_TLDTEST_${i.substring(0,8)}`,o=n.length-2;o>=0;--o)r.push(n.slice(o).join(`.`));o=0,d.label=2;case 2:return o<r.length?(s=r[o],c={domain:`.`+s,expirationDays:.003},l=new zt(c),[4,l.set(a,1)]):[3,7];case 3:return d.sent(),[4,l.get(a)];case 4:return u=d.sent(),u?[4,l.remove(a)]:[3,6];case 5:return d.sent(),[2,`.`+s];case 6:return o++,[3,2];case 7:return[2,``]}})})},ui=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},di=`[Amplitude] Page Viewed`,fi=function(e){e===void 0&&(e={});var t,n=I(),i=void 0,a=!1,o,s=e.trackOn,c=e.trackHistoryChanges,l=e.eventType,u=l===void 0?di:l,f=function(e){var t=e;try{t=decodeURI(e)}catch(e){i?.error(`Malformed URI sequence: `,e)}return t},m=function(){return b(void 0,void 0,void 0,function(){var e,t,n;return d(this,function(i){switch(i.label){case 0:return e=f(typeof location<`u`&&location.href||``),n={event_type:u},t=[{}],[4,pi()];case 1:return[2,(n.event_properties=r.apply(void 0,[r.apply(void 0,t.concat([i.sent()])),{"[Amplitude] Page Domain":typeof location<`u`&&location.hostname||``,"[Amplitude] Page Location":e,"[Amplitude] Page Path":typeof location<`u`&&f(location.pathname)||``,"[Amplitude] Page Title":or(ar),"[Amplitude] Page URL":e.split(`?`)[0]}]),n)]}})})},h=function(){return s===void 0||typeof s==`function`&&s()},g=typeof location<`u`?location.href:null,_=function(){return b(void 0,void 0,void 0,function(){var e,n,r,a;return d(this,function(o){switch(o.label){case 0:return e=location.href,n=hi(c,e,g||``)&&h(),g=e,n?(i?.log(`Tracking page view event`),t==null?[3,3]:[3,1]):[3,4];case 1:return a=(r=t).track,[4,m()];case 2:a.apply(r,[o.sent()]),o.label=3;case 3:o.label=4;case 4:return[2]}})})},v=function(){_()};return{name:`@amplitude/plugin-page-view-tracking-browser`,type:`enrichment`,setup:function(e,r){return b(void 0,void 0,void 0,function(){var s,c;return d(this,function(l){switch(l.label){case 0:return t=r,o=e,i=e.loggerProvider,i.log(`Installing @amplitude/plugin-page-view-tracking-browser`),a=!0,n&&(n.addEventListener(`popstate`,v),n.history.pushState=new Proxy(n.history.pushState,{apply:function(e,t,n){var r=p(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),a&&_()}})),h()?(i.log(`Tracking page view event`),c=(s=t).track,[4,m()]):[3,2];case 1:c.apply(s,[l.sent()]),l.label=2;case 2:return[2]}})})},execute:function(e){return b(void 0,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return s===`attribution`&&mi(e)?(i?.log(`Enriching c
6ampaign event to page view event with campaign parameters`),[4,m()]):[3,2];case 1:t=n.sent(),e.event_type=t.event_type,e.event_properties=r(r({},e.event_properties),t.event_properties),n.label=2;case 2:return o&&e.event_type===u&&(o.pageCounter=o.pageCounter?o.pageCounter+1:1,e.event_properties=r(r({},e.event_properties),{"[Amplitude] Page Counter":o.pageCounter})),[2,e]}})})},teardown:function(){return b(void 0,void 0,void 0,function(){return d(this,function(e){return n&&(n.removeEventListener(`popstate`,v),a=!1),[2]})})}}},pi=function(){return b(void 0,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return e=ui,[4,new $n().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},mi=function(e){if(e.event_type===`$identify`&&e.user_properties){var t=e.user_properties,n=t[A.SET]||{},r=t[A.UNSET]||{},i=c(c([],p(Object.keys(n)),!1),p(Object.keys(r)),!1);return Object.keys(xe).every(function(e){return i.includes(e)})}return!1},hi=function(e,t,n){switch(e){case`pathOnly`:if(n==``)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname;default:return t!==n}},gi=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;t?.removeEventListener(n,r)}),t=[]},i;return{name:`@amplitude/plugin-form-interaction-tracking-browser`,type:`enrichment`,setup:function(t,r){return b(void 0,void 0,void 0,function(){var a,o;return d(this,function(s){return i=Er(t),a=function(){if(!r){t.loggerProvider.warn(`Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.`);return}if(!(typeof document>`u`)){var a=function(e){var a=!1;n(e,`change`,function(){var t,n=vi(e);a||r.track(Wr,(t={},t[ei]=_i(e.id),t[ti]=_i(e.name),t[ni]=n,t)),a=!0}),n(e,`submit`,function(n){var o,s,c=vi(e);if(a||r.track(Wr,(o={},o[ei]=_i(e.id),o[ti]=_i(e.name),o[ni]=c,o)),a=!0,i?.shouldTrackSubmit!==void 0)if(typeof i.shouldTrackSubmit==`function`&&typeof SubmitEvent<`u`&&n instanceof SubmitEvent)try{if(!i.shouldTrackSubmit(n))return}catch{t.loggerProvider.warn(`shouldTrackSubmit callback threw an error, proceeding with tracking.`)}else t.loggerProvider.warn(`shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.`);r.track(Gr,(s={},s[ei]=_i(e.id),s[ti]=_i(e.name),s[ni]=c,s)),a=!1})};Array.from(document.getElementsByTagName(`form`)).forEach(a),typeof MutationObserver<`u`&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){e.nodeName===`FORM`&&a(e),`querySelectorAll`in e&&typeof e.querySelectorAll==`function`&&Array.from(e.querySelectorAll(`form`)).map(a)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState===`complete`?a():(o=I(),o?o.addEventListener(`load`,a):t.loggerProvider.debug(`Form interaction tracking is not installed because global is undefined.`)),[2]})})},execute:function(e){return b(void 0,void 0,void 0,function(){return d(this,function(t){return[2,e]})})},teardown:function(){return b(void 0,void 0,void 0,function(){return d(this,function(t){return e?.disconnect(),r(),[2]})})}}},_i=function(e){if(typeof e==`string`)return e},vi=function(e){var t=e.getAttribute(`action`);try{t=new URL(encodeURI(t??``),window.location.href).href}catch{}return t},yi=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;t?.removeEventListener(n,r)}),t=[]};return{name:`@amplitude/plugin-file-download-tracking-browser`,type:`enrichment`,setup:function(t,r){return b(void 0,void 0,void 0,function(){var i,a;return d(this,function(o){return i=function(){if(!r){t.loggerProvider.warn(`File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.`);return}if(!(typeof document>`u`)){var i=function(e){var t;try{t=new URL(e.href,window.location.href)}catch{return}var i=a.exec(t.href)?.[1];i&&n(e,`click`,function(){var n;i&&r.track(Kr,(n={},n[Yr]=i,n[Xr]=t.pathname,n[Zr]=e.id,n[Qr]=e.text,n[$r]=e.href,n))})},a=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;
6Array.from(document.getElementsByTagName(`a`)).forEach(i),typeof MutationObserver<`u`&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){e.nodeName===`A`&&i(e),`querySelectorAll`in e&&typeof e.querySelectorAll==`function`&&Array.from(e.querySelectorAll(`a`)).map(i)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState===`complete`?i():(a=I(),a?a.addEventListener(`load`,i):t.loggerProvider.debug(`File download tracking is not installed because global is undefined.`)),[2]})})},execute:function(e){return b(void 0,void 0,void 0,function(){return d(this,function(t){return[2,e]})})},teardown:function(){return b(void 0,void 0,void 0,function(){return d(this,function(t){return e?.disconnect(),r(),[2]})})}}},bi=!1,xi=function(e){bi||e.defaultTracking!==void 0||(e.loggerProvider.warn(`\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example: 7 8amplitude.init(<YOUR_API_KEY>, { 9 defaultTracking: true, 10}); 11 12Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`),bi=!0)},Si=function(){var e=`@amplitude/plugin-network-checker-browser`,t=`before`,n=I(),r=[],i=function(e,t){n?.addEventListener&&(n?.addEventListener(e,t),r.push({type:e,handler:t}))},a=function(){r.forEach(function(e){var t=e.type,r=e.handler;n?.removeEventListener(t,r)}),r=[]};return{name:e,type:t,setup:function(e,t){return b(void 0,void 0,void 0,function(){return d(this,function(n){return typeof navigator>`u`?(e.loggerProvider.debug(`Network connectivity checker plugin is disabled because navigator is not available.`),e.offline=!1,[2]):(e.offline=!navigator.onLine,i(`online`,function(){e.loggerProvider.debug(`Network connectivity changed to online.`),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),i(`offline`,function(){e.loggerProvider.debug(`Network connectivity changed to offline.`),e.offline=!0}),[2])})})},teardown:function(){return b(void 0,void 0,void 0,function(){return d(this,function(e){return a(),[2]})})}}};function Ci(e){var t,n,r,i,a,o;if(!(typeof e!=`object`||!e)&&!Array.isArray(e)){var s=Object.keys(e);try{for(var u=l(s),d=u.next();!d.done;d=u.next()){var f=d.value;try{var m=e[f];typeof m?.enabled==`boolean`&&(m.enabled?(delete m.enabled,Object.keys(m).length===0&&(e[f]=!0)):e[f]=!1),Ci(m)}catch{}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{if(e.autocapture?.networkTracking?.captureRules?.length)try{for(var h=l(e.autocapture.networkTracking.captureRules),g=h.next();!g.done;g=h.next()){var _=g.value;try{for(var v=(a=void 0,l([`responseHeaders`,`requestHeaders`])),y=v.next();!y.done;y=v.next()){var b=y.value,x=_[b]??{},S=x.captureSafeHeaders,C=x.allowlist;if(!(!S&&!C)){if(C!==void 0&&!Array.isArray(C)){delete _[b];continue}_[b]=c(c([],p(S?Se:[]),!1),p(C??[]),!1)}}}catch(e){a={error:e}}finally{try{y&&!y.done&&(o=v.return)&&o.call(v)}finally{if(a)throw a.error}}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}catch{}var w=e.autocapture?.frustrationInteractions;w&&(w.rageClick&&(w.rageClicks=w.rageClick,delete w.rageClick),w.deadClick&&(w.deadClicks=w.deadClick,delete w.deadClick))}}function wi(e,t,n){var r,i,a=[];try{for(var o=l(t??[]),s=o.next();!s.done;s=o.next()){var c=s.value;try{a.push(new RegExp(c))}catch(e){n.loggerProvider.warn(`Invalid regex pattern: ${c}`,e)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e.concat(a)}function Ti(e,t){var n,i;if(e){Ci(e);try{t.loggerProvider.debug(`Update browser config with remote configuration:`,JSON.stringify(e));var a=e;if(a&&`autocapture`in a){if(typeof a.autocapture==`boolean`&&(t.autocapture=a.autocapture),typeof a.autocapture==`object`&&a.autocapture!==null){var o=r({},a.autocapture);if(t.autocapture===void 0&&(t.autocapture=a.autocapture),typeof a.autocapture.elementInteractions==`object`&&a.autocapture.elementInteractions!==null&&a.autocapture.elementInteractions.pageUrlAllowlistRegex?.length){o.elementInteractions=r({},a.autocapture.elementInteractions);var s=o.elementInteractions,c=s.pageUrlAllowlist??[],u=a.autocapture.elementInteractions.pageUrlAllowlistRegex;s.pageUrlAllowlist=wi(c,u,t),delete s.pageUrlAllowlistRegex}
12if(typeof a.autocapture.networkTracking==`object`&&a.autocapture.networkTracking!==null&&a.autocapture.networkTracking.captureRules?.length){o.networkTracking=r({},a.autocapture.networkTracking);var d=o.networkTracking.captureRules??[];try{for(var f=l(d),p=f.next();!p.done;p=f.next()){var m=p.value;m.urls=wi(m.urls??[],m.urlsRegex,t),delete m.urlsRegex}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}typeof t.autocapture==`boolean`&&(t.autocapture=r({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},o)),typeof t.autocapture==`object`&&(t.autocapture=r(r({},t.autocapture),o))}t.defaultTracking=t.autocapture}t.loggerProvider.debug(`Browser config after remote config update:`,JSON.stringify(t))}catch(e){t.loggerProvider.error(`Failed to apply remote configuration because of error: `,e)}}}var Ei=`1.19.0`,Di=`@amplitude/plugin-autocapture-browser`,Oi=`@amplitude/plugin-frustration-browser`,ki=`[Amplitude] Dead Click`,Ai=`[Amplitude] Rage Click`,ji=`[Amplitude] Error Click`,Mi=`[Amplitude] Element ID`,Ni=`[Amplitude] Element Class`,Pi=`[Amplitude] Element Tag`,Fi=`[Amplitude] Element Text`,Ii=`[Amplitude] Element Hierarchy`,Li=`[Amplitude] Element Href`,Ri=`[Amplitude] Element Position Left`,zi=`[Amplitude] Element Position Top`,Bi=`[Amplitude] Element Aria Label`,Vi=`[Amplitude] Element Attributes`,Hi=`[Amplitude] Element Parent Label`,Ui=`[Amplitude] Page URL`,Wi=`[Amplitude] Page Title`,Gi=`[Amplitude] Viewport Height`,Ki=`[Amplitude] Viewport Width`,qi=`https://app.amplitude.com`,Ji={US:qi,EU:`https://app.eu.amplitude.com`,STAGING:`https://apps.stag2.amplitude.com`},Yi=`https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz`,Xi=`amp-visual-tagging-selector-highlight`,Zi=`data-amp-mask-attributes`,Qi=[`input`,`select`,`textarea`],$i=function(e,t){return((window==null?void 0:window.getComputedStyle)?.call(window,e))?.getPropertyValue(`cursor`)===`pointer`&&t===`click`},ea=function(e,t,n){return n===void 0&&(n=!1),function(r,i){var a,o=e.pageUrlAllowlist,s=e.pageUrlExcludelist,c=e.shouldTrackEventResolver,l=((a=i?.tagName)?.toLowerCase)?.call(a);if(!l)return!1;if(c)return c(r,i);if(!Nt(window.location.href,o)||s&&s.length>0&&Nt(window.location.href,s))return!1;var u=String(i?.getAttribute(`type`))||``;if(typeof u==`string`)switch(u.toLowerCase()){case`hidden`:return!1;case`password`:return!1}var d=$i(i,r);if(n&&d)return!0;if(t&&!t.some(function(e){return!!(i?.matches)?.call(i,e)}))return!1;switch(l){case`input`:case`select`:case`textarea`:return r===`change`||r===`click`;default:return d?!0:r===`click`}}},ta=function(e){var t,n=((t=e?.tagName)?.toLowerCase)?.call(t),r=e instanceof HTMLElement?e.getAttribute(`contenteditable`)?.toLowerCase()===`true`:!1;return!Qi.includes(n)&&!r},na=function(e){return e?e.split(`,`).map(function(e){return e.trim()}).filter(function(e){return e.length>0&&e!==`id`&&e!==`class`}):[]},ra=function(e,t){return Object.entries(e).reduce(function(e,n){var r=p(n,2),i=r[0],a=r[1];if(i.startsWith(t)){var o=i.replace(t,``);o&&(e[o]=a||``)}return e},{})},ia=function(e){return e==null||typeof e==`object`&&Object.keys(e).length===0||typeof e==`string`&&e.trim().length===0},aa=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return ia(r)||(t[n]=r),t},{})},oa=function(e,t){return e?t.some(function(t){return(e?.matches)?.call(e,t)})?e:oa(e?.parentElement,t):null},sa=function(e){return new Promise(function(t,n){var r;try{var i=document.createElement(`script`);i.type=`text/javascript`,i.async=!0,i.src=e,i.addEventListener(`load`,function(){t({status:!0})},{once:!0}),i.addEventListener(`error`,function(){n({status:!1,message:`Failed to load the script ${e}`})}),(r=document.head)==null||r.appendChild(i)}catch(e){n(e)}})};function ca(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}var la=function(e){return!(e.event.target===null||!e.closestTrackedAncestor)};function ua(e){return e.type===`click`||e.type===`change`}var da;(function(e){e[e.LEFT_OR_TOUCH_CONTACT=0]=`LEFT_OR_TOUCH_CONTACT`,e[e.MIDDLE=1]=`MIDDLE`,e[e.RIGHT=2]=`RIGHT`})(da||={});var fa=new Set([`id`,`class`,`style`,`value`,`onclick`,`onchange`,`oninput`,`onblur`,`onsubmit`,`onfocus`,`onkeydown`,`onkeyup`,`onkeypress`,`data-reactid`,`data-react-checksum`,`data-reactroot`,Zi,er]),pa=[`type`],ma=[`svg`,`path`,`g`],ha=[`password`,`hidden`];function ga(e,t){var n,r;if(e===null)return null;var i=String(e.tagName).toLowerCase(),a={tag:i},o=Array.from(e.parentElement?.children??[]);o.length&&(a.index=o.indexOf(e),a.indexOfType=o.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var s=(e.previousElementSibling?.tagName)?.toLowerCase();s&&(a.prevSib=String(s));var c=e.getAttribute(`id`);c&&(a.id=String(c));var u=Array.from(e.classList);u.length&&(a.classes=u);var d={},f=Array.from(e.attributes).filter(function(e){return!fa.has(e.name)}),p=!ta(e);if(!ha.includes(String(e.getAttribute(`type`)))&&!ma.includes(i))try{for(var m=l(f),h=m.next();!h.done;h=m.next()){var g=h.value;
12if(!(p&&!pa.includes(g.name))){if(t.has(g.name)){d[g.name]=tr;continue}d[g.name]=String(g.value).substring(0,128)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}return Object.keys(d).length&&(a.attrs=d),a}function _a(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&n.tagName!==`HTML`;)t.push(n),n=n.parentElement;return t}var va=function(e,t){try{if(e.sourceType===`DOM_ELEMENT`){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch{return}},ya=function(e,t,n){e.forEach(function(e){if(typeof e!=`string`&&e.actionType===`ATTACH_EVENT_PROPERTY`){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},ba=function(){function e(e,t){var n,r,i=this;this.replaceSensitiveString=function(e){return ar(e,i.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,a=performance.now(),o=[];if(!e)return[];for(var s=_a(e),u=new Map,d=s.length-1;d>=0;d--){var f=s[d];if(f){var m=na(f.getAttribute(Zi)),h=d===s.length-1?[]:u.get(s[d+1])??new Set,g=new Set(c(c([],p(h),!1),p(m),!1));u.set(f,g)}}o=s.map(function(e){return ga(e,u.get(e)??new Set)});var _=function(e){e?.attrs&&Object.entries(e.attrs).forEach(function(t){var n=p(t,2),r=n[0],a=n[1];e.attrs&&(e.attrs[r]=i.replaceSensitiveString(a))})};try{for(var v=l(o),y=v.next();!y.done;y=v.next()){var b=y.value;_(b)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(t)throw t.error}}var x=performance.now();return(r=i.diagnosticsClient)==null||r.recordHistogram(`autocapturePlugin.getHierarchy`,x-a),o},this.getNearestLabel=function(e){var t=e.parentElement;if(!t)return``;var n;try{n=t.querySelector(`:scope>span,h1,h2,h3,h4,h5,h6`)}catch{n=null}return n?i.getText(n):i.getNearestLabel(t)},this.getEventProperties=function(e,t,n){var r,a,o=((a=t?.tagName)?.toLowerCase)?.call(a),s=typeof t.getBoundingClientRect==`function`?t.getBoundingClientRect():{left:null,top:null},c=i.getHierarchy(t),l=c[0]?.attrs,u=i.getNearestLabel(t),d=ra(l??{},n),f=(r={},r[Ii]=c,r[Pi]=o,r[Fi]=i.getText(t),r[Ri]=s.left==null?null:Math.round(s.left),r[zi]=s.top==null?null:Math.round(s.top),r[Vi]=d,r[Hi]=u,r[Ui]=Pt(window.location.href.split(`?`)[0]),r[Wi]=or(i.replaceSensitiveString),r[Gi]=window.innerHeight,r[Ki]=window.innerWidth,r);if(f[Mi]=t.getAttribute(`id`)||``,f[Ni]=t.getAttribute(`class`),f[Bi]=l?.[`aria-label`],o===`a`&&e===`click`&&t instanceof HTMLAnchorElement){var p=t.href.substring(0,128);f[Li]=i.replaceSensitiveString(p)}return aa(f)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,a){a===void 0&&(a=!1);var o=i.addTypeAndTimestamp(e,t);if(ua(o)&&o.event.target!==null){if(a&&$i(o.event.target,o.type))return o.closestTrackedAncestor=o.event.target,o.targetElementProperties=i.getEventProperties(o.type,o.closestTrackedAncestor,r),o;var s=oa(o.event.target,n);return s&&(o.closestTrackedAncestor=s,o.targetElementProperties=i.getEventProperties(o.type,s,r)),o}return o},this.extractDataFromDataSource=function(e,t){if(e.sourceType===`DOM_ELEMENT`){var n=va(e,t);return n?e.elementExtractType===`TEXT`?i.getText(n):e.elementExtractType===`ATTRIBUTE`&&e.attribute?n.getAttribute(e.attribute):void 0:void 0}},this.getText=function(e){if(e.closest(`[data-amp-mask]`)!==null)return tr;var t=``;if(!e.querySelector(`[data-amp-mask], [contenteditable]`))t=e.innerText||``;else{var n=e.cloneNode(!0);n.querySelectorAll(`[${er}], [contenteditable]`).forEach(function(e){e.innerText=tr}),t=n.innerText||``}return i.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g,` `).trim()},this.getEventTagProps=function(e){var t,n;if(!e)return{};var r=((n=e?.tagName)?.toLowerCase)?.call(n);return aa((t={},t[Pi]=r,t[Fi]=i.getText(e),t[Ui]=window.location.href.split(`?`)[0],t))},this.diagnosticsClient=t?.diagnosticsClient;var a=e.maskTextRegex??[],o=[];try{for(var s=l(a),u=s.next();!u.done;u=s.next()){var d=u.value;if(o.length>=25)break;if(d instanceof RegExp)o.push(d);else if(`pattern`in d&&typeof d.pattern==`string`)try{o.push(new RegExp(d.pattern,`i`))}catch{}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=o}return e}(),xa=function(){function e(e){var t=(e===void 0?{}:e).origin,n=t===void 0?qi:t,r=this;this.endpoint=qi,this.requestCallbacks={},this.onSelect=function(e){r.notify({action:`element-selected`,data:e})},this.onTrack=function(e,t){e===`selector-mode-changed`?r.notify({action:`track-selector-mode-changed`,data:t}
12):e===`selector-moved`&&r.notify({action:`track-selector-moved`,data:t})},this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;(n=(t=this.logger)?.debug)==null||n.call(t,`Message sent: `,JSON.stringify(e)),(i=(r=window.opener)?.postMessage)==null||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;n===void 0&&(n={timeout:15e3});var i=ca(),a={id:i,action:e,args:t};return new Promise(function(t,o){r.requestCallbacks[i]={resolve:t,reject:o},r.notify(a),n?.timeout>0&&setTimeout(function(){o(Error(`${e} timed out (id: ${i})`)),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){(t=this.logger)==null||t.warn(`No callback found for request id: ${e.id}`);return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.setup=function(e){var t=this,n=e===void 0?{dataExtractor:new ba({})}:e,r=n.logger,i=n.endpoint,a=n.isElementSelectable,o=n.cssSelectorAllowlist,s=n.actionClickAllowlist,c=n.dataExtractor;this.logger=r,i&&this.endpoint===`https://app.amplitude.com`&&(this.endpoint=i);var l=null;window.addEventListener(`message`,function(e){var n,r,i,u,d;if((r=(n=t.logger)?.debug)==null||r.call(n,`Message received: `,JSON.stringify(e)),t.endpoint===e.origin){var f=e?.data,p=f?.action;if(p)if(`id`in f)(u=(i=t.logger)?.debug)==null||u.call(i,`Received Response to previous request: `,JSON.stringify(e)),t.handleResponse(f);else if(p===`ping`)t.notify({action:`pong`});else if(p===`initialize-visual-tagging-selector`){var m=f?.data;sa(Yi).then(function(){l=(window==null?void 0:window.amplitudeVisualTaggingSelector)?.call(window,{getEventTagProps:c.getEventTagProps,isElementSelectable:function(e){return a?a(m?.actionType||`click`,e):!0},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:Xi,messenger:t,cssSelectorAllowlist:o,actionClickAllowlist:s,extractDataFromDataSource:c.extractDataFromDataSource,dataExtractor:c,diagnostics:{autocapture:{version:Ei}}}),t.notify({action:`selector-loaded`})}).catch(function(){var e;(e=t.logger)==null||e.warn(`Failed to initialize visual tagging selector`)})}else p===`close-visual-tagging-selector`&&((d=l?.close)==null||d.call(l))}}),this.notify({action:`page-loaded`})},e}();function Sa(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter(la).filter(function(e){return r(`click`,e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){t?.track(`[Amplitude] Element Clicked`,e.targetElementProperties)})}function Ca(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,a=e.evaluateTriggers;return n.changeObservable.filter(la).filter(function(e){return i(`change`,e.closestTrackedAncestor)}).map(function(e){return a(e)}).subscribe(function(e){t?.track(`[Amplitude] Element Changed`,r(`change`,e.closestTrackedAncestor))})}function wa(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,a=e.shouldTrackEvent,o=e.shouldTrackActionClick,s=n.clickObservable,c=n.mutationObservable,l=n.navigateObservable,u=cr(s.filter(function(e){return!a(`click`,e.closestTrackedAncestor)}).map(function(e){return e.closestTrackedAncestor=oa(e.event.target,r.actionClickAllowlist),e.closestTrackedAncestor!==null&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter(la).filter(function(e){return o(`click`,e.closestTrackedAncestor)}),l?cr(c,l):c),d=null,f=null;return sr(u,function(e){if(d&&=(clearTimeout(d),null),e.type===`click`)return f=e,d=setTimeout(function(){d=null,f=null},500),Promise.resolve(null);if(f){var t=f;return f=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&t?.track(`[Amplitude] Element Clicked`,i(`click`,e.closestTrackedAncestor))})}var Ta=I(),Ea=function(){return new x(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},Da=function(e){return e===void 0&&(e=`click`),new x(function(t){var n=function(e){t.next(e)};return Ta.document.addEventListener(e,n,{capture:!0}),function(){Ta.document.removeEventListener(e,n,{capture:!0})}})},Oa=function(){return new x(function(e){var t=function(t){var n=[...arguments].slice(1),r=void 0;Array.isArray(n[0])&&typeof n[0][0]==`string`&&(r=n[0][0]),e.next({kind:`console`,message:r})};return Cn.addListener(`error`,t),function(){Cn.removeListener(t)}})},ka=function(){return new x(function(e){var t=function(t){var n={kind:`error`};t.error instanceof Error?n=r(r({},n),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):typeof t.error==`string`&&(n.message=t.error),e.next(n)};return Ta.addEventListener(`error`,t),function(){Ta.removeEventListener(`error`,t)}})},Aa=function(){return new x(function(e){var t=function(t){var n={kind:`unhandledrejection`};t.reason instanceof Error?(n.message=t.reason.message,n.stack=t.reason.stack):typeof t.reason==`string`&&(n.message=t.reason),e.next(n)};return Ta.addEventListener(`unhandledrejection`,t),function(){Ta.removeEventListener(`unhandledrejection`,t)}})},ja=function(){return cr(cr(ka(),Aa()),Oa())},Ma=function(e,t){try{if(t.subprop_key===`[Amplitude] Element Text`)return t.subprop_op===`is`&&t.subprop_value.includes(e.targetElementProperties[`[Amplitude] Element Text`]);if(t.subprop_key===`[Amplitude] Element Hierarchy`)return t.subprop_op===`autotrack css match`&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){return console.error(`Error matching event to filter`,e),!1}return!1},Na={"[Amplitude] Element Clicked":`click`,"[Amplitude] Element Changed":`change`},Pa=function(e){var t,n,r,i,a=Object.values(Na).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return a;try{for(var o=l(e),s=o.next();!s.done;s=o.next()){var c=s.value;try{try{for(var u=(r=void 0,l(c.definition)),d=u.next();!d.done;d=u.next()){var f=Na[d.value.event_type];f&&a[f].add(c.id)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}catch(e){console.warn(`Skipping Labeled Event due to malformed definition`,c?.id,e)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},Fa=function(e){var t,n,r,i,a=new Map;try{for(var o=l(e),s=o.next();!s.done;s=o.next()){var c=s.value;try{for(var u=(r=void 0,l(c.conditions)),d=u.next();!d.done;d=u.next()){var f=d.value;if(f.type===`LABELED_EVENT`){var p=f.match.eventId,m=a.get(p);m||(m=[],a.set(p,m)),m.push(c)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},Ia=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return Na[t.event_type]===e.type&&t.filters.every(function(t){return Ma(e,t)})})})},La=function(e,t){var n,r,i,a,o=new Set;try{for(var s=l(e),c=s.next();!c.done;c=s.next()){var u=c.value,d=t.get(u.id);if(d)try{for(var f=(i=void 0,l(d)),p=f.next();!p.done;p=f.next()){var m=p.value;o.add(m)}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Array.from(o)},Ra=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=La(Ia(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var a=l(i),o=a.next();!o.done;o=a.next()){var s=o.value;ya(s.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),za=function(e,t,n,r){return new Ra(e,t,n,r)},Ba;(function(e){e.ClickObservable=`clickObservable`,e.ChangeObservable=`changeObservable`,e.NavigateObservable=`navigateObservable`,e.MutationObservable=`mutationObservable`,e.BrowserErrorObservable=`browserErrorObservable`,e.SelectionObservable=`selectionObservable`})(Ba||={});var Va=function(e,t){e===void 0&&(e={}),t?.diagnosticsClient.setTag(`plugin.autocapture.version`,`1.19.0`);var n=e.dataAttributePrefix,i=n===void 0?En:n,a=e.visualTaggingOptions,o=a===void 0?{enabled:!0,messenger:new xa}:a;e.cssSelectorAllowlist=e.cssSelectorAllowlist??Tn,e.actionClickAllowlist=e.actionClickAllowlist??Dn,e.debounceTime=e.debounceTime??0,e.pageUrlExcludelist=e.pageUrlExcludelist?.reduce(function(e,t){if(typeof t==`string`&&e.push(t),t instanceof RegExp&&e.push(t),typeof t==`object`&&t&&`pattern`in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn(`Invalid regex pattern: ${t.pattern}`,n),e}return e},[]);var s=Di,u=`enrichment`,f=[],m=new ba(e,t),h=function(){var t,n=lr(Da().map(function(t){return m.addAdditionalEventProperties(t,`click`,e.cssSelectorAllowlist,i)}
12)),r=lr(new x(function(t){var n,r=function(n){var r=m.addAdditionalEventProperties(n,`change`,e.cssSelectorAllowlist,i);t.next(r)};return(n=I())==null||n.document.addEventListener(`change`,r,{capture:!0}),function(){return I()?.document.removeEventListener(`change`,r)}})),a;window.navigation&&(a=lr(new x(function(t){var n=function(n){var r=m.addAdditionalEventProperties(n,`navigate`,e.cssSelectorAllowlist,i);t.next(r)};return window.navigation.addEventListener(`navigate`,n),function(){window.navigation.removeEventListener(`navigate`,n)}})));var o=lr(Ea().map(function(t){return m.addAdditionalEventProperties(t,`mutation`,e.cssSelectorAllowlist,i)}));return t={},t[Ba.ChangeObservable]=r,t[Ba.ClickObservable]=n,t[Ba.MutationObservable]=o,t[Ba.NavigateObservable]=a,t},g=Pa(Object.values(e.pageActions?.labeledEvents??{})),_=Fa(e.pageActions?.triggers??[]),v=za(g,_,m,e),y=function(t){t&&(e.pageActions=r(r({},e.pageActions),t),g=Pa(Object.values(e.pageActions.labeledEvents??{})),_=Fa(e.pageActions.triggers??[]),v.update(g,_,e))};return{name:s,type:u,setup:function(t,n){return b(void 0,void 0,void 0,function(){var a,l,u,g,_,b,x,S,C,w;return d(this,function(d){return typeof document>`u`?[2]:(t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe(`configs.analyticsSDK.pageActions`,`all`,function(e){y(e)}):t.loggerProvider.debug(`Remote config client is not provided, skipping remote config fetch`)),a=ea(e,e.cssSelectorAllowlist),l=ea(e,e.actionClickAllowlist),u=h(),g=Sa({allObservables:u,amplitude:n,shouldTrackEvent:a,evaluateTriggers:v.evaluate.bind(v)}),f.push(g),_=Ca({allObservables:u,getEventProperties:function(){var e=[...arguments];return m.getEventProperties.apply(m,c(c([],p(e),!1),[i],!1))},amplitude:n,shouldTrackEvent:a,evaluateTriggers:v.evaluate.bind(v)}),f.push(_),b=wa({allObservables:u,options:e,getEventProperties:function(){var e=[...arguments];return m.getEventProperties.apply(m,c(c([],p(e),!1),[i],!1))},amplitude:n,shouldTrackEvent:a,shouldTrackActionClick:l}),b&&f.push(b),(C=t?.loggerProvider)==null||C.log(`${s} has been successfully added.`),window.opener&&o.enabled&&(x=e.cssSelectorAllowlist,S=e.actionClickAllowlist,(w=o.messenger)==null||w.setup(r(r({dataExtractor:m,logger:t?.loggerProvider},t?.serverZone&&{endpoint:Ji[t.serverZone]}),{isElementSelectable:ea(e,c(c([],p(x),!1),p(S),!1)),cssSelectorAllowlist:x,actionClickAllowlist:S}))),[2])})})},execute:function(e){return b(void 0,void 0,void 0,function(){return d(this,function(t){return[2,e]})})},teardown:function(){return b(void 0,void 0,void 0,function(){var e,t,n,r,i;return d(this,function(a){try{for(e=l(f),t=e.next();!t.done;t=e.next())n=t.value,n.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}},Ha=3e3,Ua=[`mutation`,`navigate`];function Wa(e){var t=e.amplitude,n=e.allObservables,i=e.getEventProperties,a=e.shouldTrackDeadClick,o=n.clickObservable,s=n.mutationObservable,c=n.navigateObservable,l=cr(o.filter(function(e){return la(e)&&a(`click`,e.closestTrackedAncestor)&&e.event.target instanceof Element&&e.event.target.closest(`a[target="_blank"]`)===null&&e.event.button===da.LEFT_OR_TOUCH_CONTACT}),c?cr(s,c):s),u=null;return sr(l,function(e){return u&&Ua.includes(e.type)?(clearTimeout(u),u=null,Promise.resolve(null)):e.type===`click`?u?Promise.resolve(null):new Promise(function(t){u=setTimeout(function(){t(e),u=null},Ha)}):Promise.resolve(null)}).subscribe(function(e){if(e){var n={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};t.track(ki,r(r({},i(`click`,e.closestTrackedAncestor)),n),{time:e.timestamp})}})}var Ga=4,Ka=Mn,qa=50;function Ja(e,t){var n=t.event,r=n.pageX,i=n.pageY;e.yMin=Math.min(e.yMin??i,i),e.yMax=Math.max(e.yMax??i,i),e.xMin=Math.min(e.xMin??r,r),e.xMax=Math.max(e.xMax??r,r),e.isOutOfBounds=e.yMax-e.yMin>qa||e.xMax-e.xMin>qa}function Ya(e){if(e.length===0)return null;var t=e[0],n=e[e.length-1];return{rageClickEvent:r({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}function Xa(e,t){var n=e[Math.max(0,e.length-Ga+1)];return t.timestamp-n.timestamp>=Ka}function Za(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}function Qa(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,a=r.clickObservable,o=r.selectionObservable,s=[],c={},l=null;function u(e){s=[],c={},e&&(Ja(c,e),s.push(e))}var f=sr(a.filter(function(e){return i(`click`,e.closestTrackedAncestor)}),function(e){return b(t,void 0,void 0,function(){var t;return d(this,function(n){return Ja(c,e),t=null,s.length===0||Za(s,e)||Xa(s,e)||c.isOutOfBounds?(l&&(t=Ya(s)),u(e)):s.push(e),l&&=(clearTimeout(l.timerId),l.resolve(t),null),s.length>=Ga?[2,new Promise(function(e){l={resolve:e,timerId:setTimeout(function(){e(Ya(s))},Ka)}})]:[2,null]})})}),p=o?.subscribe(function(){u()}),m=f.subscribe(function(e){e!==null&&n.track(Ai,e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){m.unsubscribe(),p?.unsubscribe()}}}var $a=2e3;function eo(e){var t=e.amplitude,n=e.allObservables,i=e.shouldTrackErrorClick,a=n.clickObservable,o=n.browserErrorObservable,s=a.filter(function(e){return la(e)&&i(`click`,e.closestTrackedAncestor)&&e.event.target instanceof Element&&e.event.target.closest(`a[target="_blank"]`)===null&&e.event.button===da.LEFT_OR_TOUCH_CONTACT}),c=null,l=null,u=function(){c!==null&&(clearTimeout(c),c=null),l=null};return cr(s,o).subscribe(function(e){var n;if(e.type===`click`){u(),l=e,c=setTimeout(u,$a);return}e.type===`error`&&l&&(t.track(ji,r((n={},n[`[Amplitude] Kind`]=e.event.kind,n[`[Amplitude] Message`]=e.event.message,n[`[Amplitude] Stack`]=e.event.stack,n[`[Amplitude] Filename`]=e.event.filename,n[`[Amplitude] Line Number`]=e.event.lineNumber,n[`[Amplitude] Column Number`]=e.event.columnNumber,n),l.targetElementProperties)),u())})}function to(e,t,n,r){if(!r)return[];var i=e[t];return typeof i==`object`&&i&&`cssSelectorAllowlist`in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}var no=function(e){e===void 0&&(e={});var t=Oi,n=`enrichment`,i=[],a=e.errorClicks!==!1;e.errorClicks||(a=!1);var o=e.deadClicks!==!1&&e.deadClicks!==null,s=e.rageClicks!==!1&&e.rageClicks!==null,u=to(e,`rageClicks`,jn,s),f=to(e,`deadClicks`,kn,o),m=to(e,`errorClicks`,An,a),h=e.dataAttributePrefix??En,g=new ba(e),_=c([],p(new Set(c(c(c([],p(u),!1),p(f),!1),p(m),!1))),!1),v=function(){var e,t=lr(Da(`pointerdown`).map(function(e){return g.addAdditionalEventProperties(e,`click`,_,h,!0)})),n=lr(ja().map(function(e){return g.addTypeAndTimestamp(e,`error`)})),i=lr(Ea().map(function(e){return g.addAdditionalEventProperties(e,`mutation`,_,h)})),a;window.navigation&&(a=lr(new x(function(e){var t=function(t){e.next(r(r({},t),{type:`navigate`}))};return window.navigation.addEventListener(`navigate`,t),function(){window.navigation.removeEventListener(`navigate`,t)}}).map(function(e){return g.addAdditionalEventProperties(e,`navigate`,_,h)})));var o=lr(new x(function(e){var t=function(){var t=document.activeElement;if(t&&(t.tagName===`TEXTAREA`||t.tagName===`INPUT`)){var n=void 0,r=void 0;try{if(n=t.selectionStart,r=t.selectionEnd,n===r)return}catch{return}return e.next()}var i=window.getSelection();if(!(!i||i.isCollapsed))return e.next()};return window.document.addEventListener(`selectionchange`,t),function(){window.document.removeEventListener(`selectionchange`,t)}}));return e={},e[Ba.ClickObservable]=t,e[Ba.MutationObservable]=i,e[Ba.NavigateObservable]=a,e[Ba.BrowserErrorObservable]=n,e[Ba.SelectionObservable]=o,e};return{name:t,type:n,setup:function(n,r){return b(void 0,void 0,void 0,function(){var c,l,p,_,y,b,x,S;return d(this,function(d){return typeof document>`u`?[2]:(c=v(),s&&(l=ea(e,u),p=Qa({allObservables:c,amplitude:r,shouldTrackRageClick:l}),i.push(p)),o&&(_=ea(e,f),y=Wa({amplitude:r,allObservables:c,getEventProperties:function(e,t){return g.getEventProperties(e,t,h)},shouldTrackDeadClick:_}),i.push(y)),a&&(b=ea(e,m),x=eo({amplitude:r,allObservables:c,shouldTrackErrorClick:b}),i.push(x)),(S=n?.loggerProvider)==null||S.log(`${t} has been successfully added.`),[2])})})},execute:function(e){return b(void 0,void 0,void 0,function(){return d(this,function(t){return[2,e]})})},teardown:function(){return b(void 0,void 0,void 0,function(){var e,t,n,r,a;return d(this,function(o){try{for(e=l(i),t=e.next();!t.done;t=e.next())n=t.value,n.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(a=e.return)&&a.call(e)}finally{if(r)throw r.error}}return[2]})})}}},ro=`@amplitude/plugin-network-capture-browser`,io=`500-599`;function ao(e,t){var n=`^`+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,`\\$&`).replace(/\*/g,`.*`)+`$`;return new RegExp(n).test(e)}function oo(e,t){var n,r,i=t.split(`,`);try{for(var a=l(i),o=a.next();!o.done;o=a.next()){var s=o.value,c=p(s.split(`-`).map(Number),2),u=c[0],d=c[1];if(e===u&&d===void 0||e>=u&&e<=d)return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return!1}function so(e,t,n,r,i){if(!(e.hosts&&!e.hosts.find(function(e){return ao(t,e)}))&&!(r&&e.urls&&!Nt(r,e.urls))&&!(i&&e.methods&&!e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||e===`*`})))return!((n||n===0)&&!oo(n,e.statusCodeRange||io))}function co(e){if(e)try{var t=I()?.location.href,n=new URL(e,t),r=n.searchParams.toString(),i=n.hash.replace(`#`,``),a=n.href,o=n.host;return n.hash=``,n.search=``,{query:r,fragment:i,href:a,hrefWithoutQueryOrHash:n.href,host:o}}catch{return}}function lo(e,t){if(e.includes(`amplitude.com`))try{var n=t.body;if(typeof n!=`string`)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===`[Amplitude] Network Request`}))return!0}catch{}return!1}function uo(e){if(typeof e!=`object`||!e)return e?c([],p(Se),!1):void 0;if(e.length!==0)return e}function fo(e){return!e?.allowlist?.length&&!e?.blocklist?.length}
12function po(e,t){t===void 0&&(t={});var n=co(e.url);if(!n)return!1;var r=n.host;if(t.ignoreAmplitudeRequests!==!1&&(ao(r,`*.amplitude.com`)||ao(r,`amplitude.com`))||t.ignoreHosts?.find(function(e){return ao(r,e)})||!t.captureRules&&e.status!==void 0&&!oo(e.status,io))return!1;if(t.captureRules){var i;if(c([],p(t.captureRules),!1).reverse().find(function(t){if(i=so(t,r,e.status,e.url,e.method),i){var n=uo(t.responseHeaders);if(e.responseWrapper&&n){var a=e.responseWrapper.headers(n);a&&(e.responseHeaders=a)}var o=uo(t.requestHeaders);if(e.requestWrapper&&o){var s=e.requestWrapper.headers(o);s&&(e.requestHeaders=s)}e.responseWrapper&&t.responseBody&&!fo(t.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,t.responseBody.blocklist)),e.requestWrapper&&t.requestBody&&!fo(t.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,t.requestBody.blocklist))}return i!==void 0}),!i)return!1}return!(e.requestWrapper&&lo(r,e.requestWrapper))}function mo(e,t,n,r){return b(this,void 0,void 0,function(){var i,a,o;return d(this,function(s){switch(s.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=p.apply(void 0,[s.sent(),2]),a=i[0],o=i[1],a)try{e[`[Amplitude] Request Body`]=JSON.stringify(a)}catch(e){r?.debug(`Failed to stringify request body`,e)}if(o)try{e[`[Amplitude] Response Body`]=JSON.stringify(o)}catch{r?.debug(`Failed to stringify response body`)}s.label=2;case 2:return n?.track(`[Amplitude] Network Request`,e),[2]}})})}function ho(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider;return t.networkObservable.filter(function(e){return po(e.event,n)}).subscribe(function(e){var t,n=e.event,a=co(n.url);if(a){var o=n.responseWrapper?.bodySize,s=n.requestWrapper?.bodySize;mo((t={},t[`[Amplitude] URL`]=a.hrefWithoutQueryOrHash,t[`[Amplitude] URL Query`]=a.query,t[`[Amplitude] URL Fragment`]=a.fragment,t[`[Amplitude] Request Method`]=n.method,t[`[Amplitude] Status Code`]=n.status,t[`[Amplitude] Start Time`]=n.startTime,t[`[Amplitude] Completion Time`]=n.endTime,t[`[Amplitude] Duration`]=n.duration,t[`[Amplitude] Request Body Size`]=s,t[`[Amplitude] Response Body Size`]=o,t[`[Amplitude] Request Type`]=n.type,t[`[Amplitude] Request Headers`]=n.requestHeaders,t[`[Amplitude] Response Headers`]=n.responseHeaders,t),n,r,i)}})}var go;(function(e){e.NetworkObservable=`networkObservable`})(go||={});var _o,vo=function(e){e===void 0&&(e={});var t=ro,n=`enrichment`,r,i=function(e,t){return{event:e,timestamp:Date.now(),type:t}},a=function(){var e,t=new x(function(e){var t=new Zn(function(t){var n=i(t,`network`);e.next(n)});return Qn.subscribe(t,r),function(){Qn.unsubscribe(t)}});return e={},e[go.NetworkObservable]=t,e};return{name:t,type:n,setup:function(n,i){return b(void 0,void 0,void 0,function(){var o;return d(this,function(s){return typeof document>`u`?[2]:(o=a(),r=n?.loggerProvider,_o=ho({allObservables:o,networkTrackingOptions:e,amplitude:i,loggerProvider:r}),r?.log(`${t} has been successfully added.`),[2])})})},execute:function(e){return b(void 0,void 0,void 0,function(){return d(this,function(t){return[2,e]})})},teardown:function(){return b(void 0,void 0,void 0,function(){return d(this,function(e){return _o.unsubscribe(),[2]})})}}},yo=`web-vitals-browser`,bo=`[Amplitude] Web Vitals`;function xo(e){var t=e.entries[0]?.startTime||0;return performance.timeOrigin+t}function So(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(xo(e)),navigationStart:Math.floor(performance.timeOrigin)}}var Co=function(){var e=null,t=I(),n=t?.document,r=t?.location;return{name:yo,type:`enrichment`,setup:function(t,i){return b(void 0,void 0,void 0,function(){var s,c;return d(this,function(l){return n===void 0?[2]:(s=Pt(r?.href||``,t.loggerProvider),c={"[Amplitude] Page Domain":r?.hostname||``,"[Amplitude] Page Location":s,"[Amplitude] Page Path":Pt(r?.pathname||``,t.loggerProvider),"[Amplitude] Page Title":typeof document<`u`&&document.title||``,"[Amplitude] Page URL":Pt(s.split(`?`)[0],t.loggerProvider)},f(function(e){c[`[Amplitude] LCP`]=So(e)}),h(function(e){c[`[Amplitude] FCP`]=So(e)}),a(function(e){c[`[Amplitude] INP`]=So(e)}),o(function(e){c[`[Amplitude] CLS`]=So(e)}),C(function(e){c[`[Amplitude] TTFB`]=So(e)}
12),e=function(){n.visibilityState===`hidden`&&e&&(i.track(bo,c),n.removeEventListener(`visibilitychange`,e),e=null)},n.addEventListener(`visibilitychange`,e),[2])})})},execute:function(e){return b(void 0,void 0,void 0,function(){return d(this,function(t){return[2,e]})})},teardown:function(){return b(void 0,void 0,void 0,function(){return d(this,function(t){return e&&n?.removeEventListener(`visibilitychange`,e),[2]})})}}},wo=function(e){var t=e.split(`.`);return t.length<=2?e:t.slice(t.length-2,t.length).join(`.`)},To=function(e){return Object.values(e).every(function(e){return!e})},Eo=function(e,t,n,r,i){i===void 0&&(i=!0),e.referrer;var a=e.referring_domain,o=s(e,[`referrer`,`referring_domain`]),c=t||{};c.referrer;var l=c.referring_domain,u=s(c,[`referrer`,`referring_domain`]);if(Do(n.excludeReferrers,e.referring_domain))return r.debug(`This is not a new campaign because ${e.referring_domain} is in the exclude referrer list.`),!1;if(!i&&To(e)&&t)return r.debug(`This is not a new campaign because this is a direct traffic in the same session.`),!1;var d=JSON.stringify(o)!==JSON.stringify(u),f=wo(a||``)!==wo(l||``),p=!t||d||f;return p?r.debug(`This is a new campaign. An $identify event will be sent.`):r.debug(`This is not a new campaign because it's the same as the previous one.`),p},Do=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=``),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},Oo=function(e,t){var n=r(r({},xe),e);return Ve(Object.entries(n).reduce(function(e,n){var r=p(n,2),i=r[0],a=r[1];return e.setOnce(`initial_${i}`,a??t.initialEmptyValue??`EMPTY`),a?e.set(i,a):e.unset(i)},new De))},ko=function(e){var t=e;return t?(t.startsWith(`.`)&&(t=t.substring(1)),[RegExp(`${t.replace(`.`,`\\.`)}\$`)]):[]},Ao=function(){function e(e,t){this.shouldTrackNewCampaign=!1,this.options=r({initialEmptyValue:`EMPTY`,resetSessionOnNewCampaign:!1,excludeReferrers:ko(t.cookieOptions?.domain)},e),this.storage=t.cookieStorage,this.storageKey=Wt(t.apiKey,`MKTG`),this.webExpStorageKey=Wt(t.apiKey,`MKTG_ORIGINAL`),this.currentCampaign=xe,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,t.loggerProvider.log(`Installing web attribution tracking.`)}return e.prototype.init=function(){return b(this,void 0,void 0,function(){var e,t;return d(this,function(n){switch(n.label){case 0:return[4,this.fetchCampaign()];case 1:return t=p.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=this.lastEventTime?Dt(this.sessionTimeout,this.lastEventTime):!0,Eo(this.currentCampaign,this.previousCampaign,this.options,this.logger,e)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return b(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return e=t.sent(),e?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||new $n().parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t=Oo(this.currentCampaign,this.options);return e&&(t.event_id=e),t},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),jo=`AMP_CURRENT_PAGE`,Mo=`AMP_PREVIOUS_PAGE`,No=`AMP_URL_INFO`,Po;(function(e){e.Direct=`direct`,e.Internal=`internal`,e.External=`external`})(Po||={});var Fo=new Set([j.IDENTIFY,j.GROUP_IDENTIFY,j.REVENUE]),Io=function(e){var t=(e===void 0?{}:e).internalDomains,n=t===void 0?[]:t,i=I(),a=void 0,o=!1,s=void 0,c=!1,l=!1,u=function(e){var t;try{var n=Pt(e,s);t=new URL(n).hostname}catch(e){s?.error(`Could not parse URL: `,e)}return t},f=function(e){var t=typeof location<`u`&&location.hostname||``,r=e?u(e):void 0;if(!r)return Po.Direct;var i=n.some(function(e){return t.indexOf(e)!==-1}),a=n.some(function(e){return r.indexOf(e)!==-1});return t===r||a&&i?Po.Internal:Po.External},m=function(){return b(void 0,void 0,void 0,function(){var e,t,n,r,i;return d(this,function(s){switch(s.label){case 0:return a&&o?[4,a.get(No)]:[3,3];case 1:return e=s.sent(),t=Pt(typeof location<`u`&&location.href||``),n=e?.AMP_CURRENT_PAGE||``,r=void 0,r=t===n?e?.AMP_PREVIOUS_PAGE||``:n||document.referrer||``,[4,a.set(No,(i={},i[jo]=t,i[Mo]=r,i))];case 2:s.sent(),s.label=3;case 3:return[2]}})})},h=function(){m()};return{name:`@amplitude/plugin-page-url-enrichment-browser`,type:`enrichment`,setup:function(e,t){return b(void 0,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return s=e.loggerProvider,s.log(`Installing @amplitude/plugin-page-url-enrichment-browser`),l=!0,i?(a=new Gt(i.sessionStorage),[4,a.isEnabled()]):[3,2];case 1:o=t.sent(),i.addEventListener(`popstate`,h),c||=(i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=p(n,3),i=r[0],a=r[1],o=r[2];e.apply(t,[i,a,o]),l&&h()}}),i.history.replaceState=new Proxy(i.history.replaceState,{apply:function(e,t,n){var r=p(n,3),i=r[0],a=r[1],o=r[2];e.apply(t,[i,a,o]),l&&h()}}),!0),t.label=2;case 2:return[2]}})})},execute:function(e){return b(void 0,void 0,void 0,function(){var t,n,i,s,c;return d(this,function(l){switch(l.label){case 0:return t=Pt(typeof location<`u`&&location.href||``),a&&o?[4,a.get(No)]:[3,5];case 1:return n=l.sent(),n?.AMP_CURRENT_PAGE?[3,3]:[4,a.set(No,(c={},c[jo]=t,c[Mo]=document.referrer||``,c))];case 2:l.sent(),l.label=3;case 3:return[4,a.get(No)];case 4:if(i=l.sent(),s=``,i&&(s=i.AMP_PREVIOUS_PAGE||``),Fo.has(e.event_type))return[2,e];e.event_properties=r(r({},e.event_properties||{}),{"[Amplitude] Page Domain":Lo(e,`[Amplitude] Page Domain`,typeof location<`u`&&location.hostname||``),"[Amplitude] Page Location":Lo(e,`[Amplitude] Page Location`,t),"[Amplitude] Page Path":Lo(e,`[Amplitude] Page Path`,typeof location<`u`&&Pt(location.pathname)||``),"[Amplitude] Page Title":Lo(e,`[Amplitude] Page Title`,or(ar)),"[Amplitude] Page URL":Lo(e,`[Amplitude] Page URL`,t.split(`?`)[0]),"[Amplitude] Previous Page Location":s,"[Amplitude] Previous Page Type":f(s)}),l.label=5;case 5:return[2,e]}})})},teardown:function(){return b(void 0,void 0,void 0,function(){return d(this,function(e){switch(e.label){case 0:return i&&(i.removeEventListener(`popstate`,h),l=!1),a&&o?[4,a.set(No,{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})}}};function Lo(e,t,n){return e.event_properties||={},e.event_properties[t]===void 0?n:e.event_properties[t]}var Ro=function(e){u(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return t.prototype.init=function(e,t,n){e===void 0&&(e=``);var i,a;return arguments.length>2?(i=t,a=n):typeof t==`string`?(i=t,a=void 0):(i=t?.userId,a=t),Ge(this._init(r(r({},a),{userId:i,apiKey:e})))},t.prototype._init=function(t){return b(this,void 0,void 0,function(){var n,r,i,a,o,c,l,u,f,p,m,h,g,_,v=this;return d(this,function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,n=si(t),r=t.loggerProvider??new Qe,i=t.serverZone??`US`,o=this._diagnosticsSampleRate,c=t.enableDiagnostics??!0,n?(a=new mn(t.apiKey,r,i,t.remoteConfig?.serverUrl),[4,new Promise(function(e){a?.subscribe(`configs.diagnostics.browserSDK`,`all`,function(t,n,i){if(r.debug(`Diagnostics remote configuration received:`,JSON.stringify({remoteConfig:t,source:n,lastFetch:i},null,2)),t){var a=t.sampleRate;typeof a==`number`&&!isNaN(a)&&(o=a);var s=t.enabled;typeof s==`boolean`&&(c=s)}e()})})]):[3,2]);case 1:d.sent(),d.label=2;case 2:return l=new cn(t.apiKey,r,i,{enabled:c,sampleRate:o}),l.setTag(`library`,`${jr}/${Ar}`),typeof navigator<`u`&&l.setTag(`user_agent`,navigator.userAgent),[4,ai(t.apiKey,t,this,l,{loggerProvider:r,serverZone:i,enableDiagnostics:c,diagnosticsSampleRate:o})];case 3:return u=d.sent(),n&&a?[4,new Promise(function(e){a?.subscribe(`configs.analyticsSDK.browserSDK`,`all`,function(t,n,r){u.loggerProvider.debug(`Remote configuration received:`,JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&Ti(t,u),e()})})]:[3,5];case 4:d.sent(),d.label=5;case 5:return[4,e.prototype._init.call(this,u)];case 6:return d.sent(),this.logBrowserOptions(u),this.config.remoteConfigClient=a,dr(this.config.defaultTracking)?(f=Tr(this.config),this.webAttribution=new Ao(f,this.config),[4,this.webAttribution.init()]):[3,8];case 7:d.sent(),d.label=8;case 8:return p=jt(),m=p.ampTimestamp?Number(p.ampTimestamp):void 0,h=m?Date.now()<m:!0,g=h&&!Number.isNaN(Number(p.ampSessionId))?Number(p.ampSessionId):void 0,this.setSessionId(t.sessionId??g??this.config.sessionId??Date.now()),_=Ct(t.instanceName),_.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===null?[3,10]:[4,this.add(Si()).promise];case 9:d.sent(),d.label=10;case 10:return[4,this.add(new lt({diagnosticsClient:l})).promise];case 11:return d.sent(),[4,this.add(new Pr).promise];case 12:return d.sent(),[4,this.add(new Et).promise];case 13:return d.sent(),xi(this.config),fr(this.config.defaultTracking)?(this.config.loggerProvider.debug(`Adding file download tracking plugin`),[4,this.add(yi()).promise]):[3,15];case 14:d.sent(),d.label=15;case 15:return pr(this.config.defaultTracking)?(this.config.loggerProvider.debug(`Adding form interaction plugin`),[4,this.add(gi()).promise]):[3,17];case 16:d.sent(),d.label=17;case 17:return mr(this.config.defaultTracking)?(this.config.loggerProvider.debug(`Adding page view tracking plugin`),[4,this.add(fi(wr(this.config))).promise]):[3,19];case 18:d.sent(),d.label=19;case 19:return vr(this.config.autocapture)?(this.config.loggerProvider.debug(`Adding user interactions plugin (autocapture plugin)`),[4,this.add(Va(xr(this.config),{diagnosticsClient:l})).promise]):[3,21];case 20:d.sent(),d.label=21;case 21:return br(this.config.autocapture)?(this.config.loggerProvider.debug(`Adding frustration interactions plugin`),[4,this.add(no(Sr(this.config))).promise]):[3,23];case 22:d.sent(),d.label=23;case 23:return _r(this.config.autocapture)?(this.config.loggerProvider.debug(`Adding network tracking plugin`),[4,this.add(vo(Cr(this.config))).promise]):[3,25];case 24:d.sent(),d.label=25;case 25:return yr(this.config.autocapture)?(this.config.loggerProvider.debug(`Adding web vitals plugin`),[4,this.add(Co()).promise]):[3,27];case 26:d.sent(),d.label=27;case 27:return gr(this.config.autocapture)?(this.config.loggerProvider.debug(`Adding referrer page url plugin`),[4,this.add(Io()).promise]):[3,29];case 28:d.sent(),d.label=29;case 29:return this.initializing=!1,[4,this.runQueuedFunctions(`dispatchQ`)];case 30:return d.sent(),_.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{}
12,n=t.time,r=s(t,[`time`]),i=typeof n==`number`?{time:n}:void 0;v.track(e.eventType,r,i)}),[2]}})})},t.prototype.getUserId=function(){return this.config?.userId},t.prototype.setUserId=function(e){if(!this.config){this.q.push(this.setUserId.bind(this,e));return}this.config.loggerProvider.debug(`function setUserId: `,e),(e!==this.config.userId||e===void 0)&&(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),wt(e,this.config.instanceName))},t.prototype.getDeviceId=function(){return this.config?.deviceId},t.prototype.setDeviceId=function(e){if(!this.config){this.q.push(this.setDeviceId.bind(this,e));return}this.config.loggerProvider.debug(`function setDeviceId: `,e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),Tt(e,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(Re()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){return{deviceId:this.config?.deviceId,userId:this.config?.userId,userProperties:this.userProperties}},t.prototype.getOptOut=function(){return this.config?.optOut},t.prototype.getSessionId=function(){return this.config?.sessionId},t.prototype.setSessionId=function(e){var t=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),Ge(Promise.resolve());if(e===this.config.sessionId)return Ge(Promise.resolve());this.config.loggerProvider.debug(`function setSessionId: `,e);var n=this.getSessionId();n!==e&&this.timeline.onSessionIdChanged(e);var r=this.config.lastEventTime,i=this.config.lastEventId??-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,hr(this.config.defaultTracking)&&(n&&r&&t.push(this.track(Jr,void 0,{device_id:this.previousSessionDeviceId,event_id:++i,session_id:n,time:r+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++i,t);return this.config.identify&&t.push(this.track(Ve(this.config.identify)).promise),hr(this.config.defaultTracking)&&t.push(this.track(qr,void 0,{event_id:a?++i:i,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,Ge(Promise.all(t))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(e){if(!this.config){this.q.push(this.setTransport.bind(this,e));return}this.config.transportProvider=ci(e)},t.prototype.identify=function(t,n){if(kr(t)){var r=t._q;t._q=[],t=Or(new De,r)}return n?.user_id&&this.setUserId(n.user_id),n?.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(kr(r)){var a=r._q;r._q=[],r=Or(new De,a)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(kr(t)){var r=t._q;t._q=[],t=Or(new qe,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log(`Tracking attribution.`),!0},t.prototype.process=function(t){return b(this,void 0,void 0,function(){var n,r,i;return d(this,function(a){return n=Date.now(),r=Dt(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==`session_start`&&t.event_type!==`session_end`&&(!t.session_id||t.session_id===this.getSessionId())&&(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log(`Created a new session for new campaign.`)):r||this.trackCampaignEventIfNeeded()),t.event_type===j.IDENTIFY&&t.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(t.user_properties)),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=r(r({},e),{apiKey:e.apiKey.substring(0,10)+`********`});this.config.loggerProvider.debug(`Initialized Amplitude with BrowserConfig:`,JSON.stringify(t))}catch(e){this.config.loggerProvider.error(`Error logging browser config`,e)}},t.prototype._setDiagnosticsSampleRate=function(e){if(!(e>1||e<0)&&!this.config){this._diagnosticsSampleRate=e;return}},t}(Ke),zo=function(){var e=new Ro;return{init:z(e.init.bind(e),`init`,L(e),R(e,[`config`])),add:z(e.add.bind(e),`add`,L(e),R(e,[`config.apiKey`,`timeline.plugins`])),remove:z(e.remove.bind(e),`remove`,L(e),R(e,[`config.apiKey`,`timeline.plugins`])),track:z(e.track.bind(e),`track`,L(e),R(e,[`config.apiKey`,`timeline.queue.length`])),logEvent:z(e.logEvent.bind(e),`logEvent`,L(e),R(e,[`config.apiKey`,`timeline.queue.length`])),identify:z(e.identify.bind(e),`identify`,L(e),R(e,[`config.apiKey`,`timeline.queue.length`])),groupIdentify:z(e.groupIdentify.bind(e),`groupIdentify`,L(e),R(e,[`config.apiKey`,`timeline.queue.length`])),setGroup:z(e.setGroup.bind(e),`setGroup`,L(e),R(e,[`config.apiKey`,`timeline.queue.length`])),revenue:z(e.revenue.bind(e),`revenue`,
12L(e),R(e,[`config.apiKey`,`timeline.queue.length`])),flush:z(e.flush.bind(e),`flush`,L(e),R(e,[`config.apiKey`,`timeline.queue.length`])),getUserId:z(e.getUserId.bind(e),`getUserId`,L(e),R(e,[`config`,`config.userId`])),setUserId:z(e.setUserId.bind(e),`setUserId`,L(e),R(e,[`config`,`config.userId`])),getDeviceId:z(e.getDeviceId.bind(e),`getDeviceId`,L(e),R(e,[`config`,`config.deviceId`])),setDeviceId:z(e.setDeviceId.bind(e),`setDeviceId`,L(e),R(e,[`config`,`config.deviceId`])),reset:z(e.reset.bind(e),`reset`,L(e),R(e,[`config`,`config.userId`,`config.deviceId`])),getSessionId:z(e.getSessionId.bind(e),`getSessionId`,L(e),R(e,[`config`])),setSessionId:z(e.setSessionId.bind(e),`setSessionId`,L(e),R(e,[`config`])),extendSession:z(e.extendSession.bind(e),`extendSession`,L(e),R(e,[`config`])),setOptOut:z(e.setOptOut.bind(e),`setOptOut`,L(e),R(e,[`config`])),setTransport:z(e.setTransport.bind(e),`setTransport`,L(e),R(e,[`config`])),getIdentity:z(e.getIdentity.bind(e),`getIdentity`,L(e),R(e,[`config`])),getOptOut:z(e.getOptOut.bind(e),`getOptOut`,L(e),R(e,[`config`])),_setDiagnosticsSampleRate:z(e._setDiagnosticsSampleRate.bind(e),`_setDiagnosticsSampleRate`,L(e),R(e,[`config`]))}},V=zo(),Bo=t({DEFAULT_ACTION_CLICK_ALLOWLIST:()=>Dn,DEFAULT_CSS_SELECTOR_ALLOWLIST:()=>Tn,DEFAULT_DATA_ATTRIBUTE_PREFIX:()=>En,IdentifyOperation:()=>A,LogLevel:()=>Xe,OfflineDisabled:()=>null,RevenueProperty:()=>Je,ServerZone:()=>wn,SpecialEventType:()=>j}),Vo=V.add,Ho=V.extendSession,Uo=V.flush,Wo=V.getDeviceId,Go=V.getIdentity,Ko=V.getOptOut,qo=V.getSessionId,Jo=V.getUserId,Yo=V.groupIdentify,Xo=V.identify,Zo=V.init,Qo=V.logEvent,$o=V.remove,es=V.reset,ts=V.revenue,ns=V.setDeviceId,rs=V.setGroup,is=V.setOptOut,as=V.setSessionId,os=V.setTransport,ss=V.setUserId,cs=V.track,ls=V._setDiagnosticsSampleRate,us=Object.defineProperty,ds=(e,t,n)=>t in e?us(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fs=(e,t,n)=>ds(e,typeof t==`symbol`?t:t+``,n),ps=Object.defineProperty,ms=(e,t,n)=>t in e?ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hs=(e,t,n)=>ms(e,typeof t==`symbol`?t:t+``,n),gs=Object.defineProperty,_s=(e,t,n)=>t in e?gs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vs=(e,t,n)=>_s(e,typeof t==`symbol`?t:t+``,n),ys={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},bs={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},xs={};function Ss(e){var t;let n=((t=globalThis==null?void 0:globalThis.Zone)?.__symbol__)?.call(t,e);if(n&&globalThis[n])return globalThis[n]}function Cs(e){if(xs[e])return xs[e];let t=Ss(e)||globalThis[e],n=t.prototype,r=e in ys?ys[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in bs?bs[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o)return xs[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;return document.body.removeChild(r),a?xs[e]=a:n}catch{return n}}var ws={};function Ts(e,t,n){let r=`${e}.${String(n)}`;if(ws[r])return ws[r].call(t);let i=Cs(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?(ws[r]=a,a.call(t)):t[n]}var Es={};function Ds(e,t,n){let r=`${e}.${String(n)}`;if(Es[r])return Es[r].bind(t);let i=Cs(e)[n];return typeof i==`function`?(Es[r]=i,i.bind(t)):t[n]}function Os(e){return Ts(`Node`,e,`childNodes`)}function ks(e){return Ts(`Node`,e,`parentNode`)}function As(e){return Ts(`Node`,e,`parentElement`)}function js(e){return Ts(`Node`,e,`textContent`)}function Ms(e,t){return Ds(`Node`,e,`contains`)(t)}function Ns(e){return Ds(`Node`,e,`getRootNode`)()}function Ps(e){return!e||!(`host`in e)?null:Ts(`ShadowRoot`,e,`host`)}function Fs(e){return e.styleSheets}function Is(e){return!e||!(`shadowRoot`in e)?null:Ts(`Element`,e,`shadowRoot`)}function Ls(e,t){return Ts(`Element`,e,`querySelector`)(t)}function Rs(e,t){return Ts(`Element`,e,`querySelectorAll`)(t)}function zs(){return Cs(`MutationObserver`).constructor}var Bs={childNodes:Os,parentNode:ks,parentElement:As,textContent:js,contains:Ms,getRootNode:Ns,host:Ps,styleSheets:Fs,shadowRoot:Is,querySelector:Ls,querySelectorAll:Rs,mutationObserver:zs};function Vs(e){let t=e&&`host`in e&&`mode`in e&&Bs.host(e)||null;return!!(t&&`shadowRoot`in t&&Bs.shadowRoot(t)===e)}var Hs=class{constructor(){vs(this,`idNodeMap`,new Map),vs(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);
vendor: 13,368 bytes, lines 12-29
12this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Us(){return new Hs}var Ws=-2;function Gs(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Gs(Bs.parentNode(e),t,n):!1;for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return n?Gs(Bs.parentNode(e),t,n):!1}function Ks(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function qs(e){if(Object.prototype.hasOwnProperty.call(e,`__esModule`))return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,`__esModule`,{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Js={exports:{}},Ys;function Xs(){if(Ys)return Js.exports;Ys=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Js.exports=t(),Js.exports.createColors=t,Js.exports}var Zs=qs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),Qs,$s;function ec(){if($s)return Qs;$s=1;let e=Xs(),t=Zs;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+` 13 `+t+c(`^`)}return` `+l(r)+e}).join(` 14`)}toString(){let e=this.showSourceCode();return e&&=` 15 16`+e+` 17`,this.name+`: `+this.message+e}}return Qs=n,n.default=n,Qs}var tc={},nc;function rc(){return nc?tc:(nc=1,tc.isClean=Symbol(`isClean`),tc.my=Symbol(`my`),tc)}var ic,ac;function oc(){if(ac)return ic;ac=1;let e={after:` 18`,beforeClose:` 19`,beforeComment:` 20`,beforeDecl:` 21`,beforeOpen:` `,beforeRule:` 22`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function t(e){return e[0].toUpperCase()+e.slice(1)}class n{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(` 23`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(n,r,i){let a;if(i||=r,r&&(a=n.raws[r],a!==void 0))return a;let o=n.parent;if(i===`before`&&(!o||o.type===`root`&&o.first===n||o&&o.type===`document`))return``;if(!o)return e[i];let s=n.root();if(s.rawCache||={},s.rawCache[i]!==void 0)return s.rawCache[i];if(i===`before`||i===`after`)return this.beforeAfter(n,i);{let e=`raw`+t(i);this[e]?a=this[e](s,n):s.walk(e=>{if(a=e.raws[r],a!==void 0)return!1})}return a===void 0&&(a=e[i]),s.rawCache[i]=a,a}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(` 24`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(` 25`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(` 26`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(` 27`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(` 28`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}}return ic=n,n.default=n,ic}var sc,cc;function lc(){if(cc)return sc;cc=1;let e=oc();function t(t,n){new e(n).stringify(t)}return sc=t,t.default=t,sc}var uc,dc;function fc(){if(dc)return uc;dc=1;let{isClean:e,my:t}=rc(),n=ec(),r=oc(),i=lc();function a(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],o=typeof i;r===`parent`&&o===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>a(e,n)):(o===`object`&&i!==null&&(i=a(i)),n[r]=i)}return n}class o{constructor(n={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in n)if(e===`nodes`){this.nodes=[];for(let t of n[e])typeof t.clone==`function`?this.append(t.clone()):this.append(t)}else this[e]=n[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===` 29`?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}}return uc=o,o.default=o,uc}var pc,mc;function hc(){if(mc)return pc;mc=1;let e=fc();class t extends e{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}return pc=t,t.default=t,pc}var gc,_c;function vc(){return _c?gc:(_c=1,gc={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}},gc)}var yc,bc;function xc(){if(bc)return yc;bc=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Zs,{existsSync:n,readFileSync:r}=Zs,{dirname:i,join:a}=Zs;function o(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}class s{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new e(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return o(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);
29if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(n,r){if(r===!1)return!1;if(r){if(typeof r==`string`)return r;if(typeof r==`function`){let e=r(n);if(e){let t=this.loadFile(e);if(!t)throw Error(`Unable to load previous source map: `+e.toString());return t}}else if(r instanceof e)return t.fromSourceMap(r).toString();else if(r instanceof t)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error(`Unsupported previous source map format: `+r.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return n&&(e=a(i(n),e)),this.loadFile(e)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return yc=s,s.default=s,yc}var Sc,Cc;function wc(){if(Cc)return Sc;Cc=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Zs,{fileURLToPath:n,pathToFileURL:r}=Zs,{isAbsolute:i,resolve:a}=Zs,{nanoid:o}
vendor: 6,807 bytes, lines 29-34
29=vc(),s=Zs,c=ec(),l=xc(),u=Symbol(`fromOffsetCache`),d=!!(e&&t),f=!!(a&&i);class p{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===`￾`?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=a(t.from)),f&&d){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+o(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let a,o,s;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return a=l?new c(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):new c(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:s,line:o},this.css,this.file,i.plugin),a.input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(a.input.url=r(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,n;if(this[u])n=this[u];else{let e=this.css.split(` 30`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[u]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,a,o){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t,line:e});if(!c.source)return!1;let l;typeof a==`number`&&(l=s.originalPositionFor({column:o,line:a}));let u;u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let d={column:c.column,endColumn:l&&l.column,endLine:l&&l.line,line:c.line,url:u.toString()};if(u.protocol===`file:`)if(n)d.file=n(u);else throw Error(`file: protocol is not available in this PostCSS build`);let f=s.sourceContentFor(c.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return Sc=p,p.default=p,s&&s.registerInput&&s.registerInput(p),Sc}var Tc,Ec;function Dc(){if(Ec)return Tc;Ec=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Zs,{dirname:n,relative:r,resolve:i,sep:a}=Zs,{pathToFileURL:o}=Zs,s=wc(),c=!!(e&&t),l=!!(n&&i&&r&&a);class u{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=` 31`;this.css.includes(`\r 32`)&&(t=`\r 33`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&=null):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css=``,this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(` 34`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?this.previous().length?this.previous().some(e=>e.annotation):!0:this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?this.previous().length?this.previous().some(e=>e.withContent()):!0:this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));
vendor: 4,998 bytes, line 34
34let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return Tc=u,Tc}var Oc,kc;function Ac(){if(kc)return Oc;kc=1;let e=fc();class t extends e{constructor(e){super(e),this.type=`comment`}}return Oc=t,t.default=t,Oc}var jc,Mc;function Nc(){if(Mc)return jc;Mc=1;let{isClean:e,my:t}=rc(),n=hc(),r=Ac(),i=fc(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?`prepend`:!1,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}
vendor: 3,888 bytes, line 34
34replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},jc=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},jc}var Pc,Fc;function Ic(){if(Fc)return Pc;Fc=1;let e=Nc(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Pc=r,r.default=r,Pc}var Lc,Rc;function zc(){if(Rc)return Lc;Rc=1;let e={};return Lc=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},Lc}var Bc,Vc;function Hc(){if(Vc)return Bc;Vc=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return Bc=e,e.default=e,Bc}var Uc,Wc;function Gc(){if(Wc)return Uc;Wc=1;let e=Hc();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return Uc=t,t.default=t,Uc}var Kc,qc;function Jc(){if(qc)return Kc;qc=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return Kc=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function T(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}
vendor: 4,493 bytes, lines 34-35
34case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1)if(s||a){l=y;break}else C(`bracket`);for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1)if(s||a){l=y+1;break}else C(`string`);for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l);break}return y++,_}function E(e){x.push(e)}return{back:E,endOfFile:w,nextToken:T,position:S}},Kc}var Yc,Xc;function Zc(){if(Xc)return Yc;Xc=1;let e=Nc();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Yc=t,t.default=t,e.registerAtRule(t),Yc}var Qc,$c;function el(){if($c)return Qc;$c=1;let e=Nc(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Qc=r,r.default=r,e.registerRoot(r),Qc}var tl,nl;function rl(){if(nl)return tl;nl=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,` 35`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return tl=e,e.default=e,tl}var il,al;function ol(){if(al)return il;al=1;let e=Nc(),t=rl();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return il=n,n.default=n,e.registerRule(n),il}var sl,cl;function ll(){if(cl)return sl;cl=1;let e=hc(),t=Jc(),n=Ac(),r=Zc(),i=el(),a=ol(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0)if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n===`{`){s=!0;break}else if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.no
vendor: 4,775 bytes, line 35
35des=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`)if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a;i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;)if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}else a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1];(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],!(c!==`space`&&c!==`comment`));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}else if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0)if(n===`;`)if(r){this.decl(s,o);return}else break;else if(n===`{`){this.rule(s);return}else if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}else n===`:`&&(r=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],!(c!==`space`&&c!==`comment`));)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>
vendor: 6,251 bytes, line 35
35e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],!(t!==`space`&&t!==`comment`));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],!(t!==`space`&&t!==`comment`));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return sl=c,sl}var ul,dl;function fl(){if(dl)return ul;dl=1;let e=Nc(),t=ll(),n=wc();function r(e,r){let i=new t(new n(e,r));try{i.parse()}catch(e){throw e}return i.root}return ul=r,r.default=r,e.registerParse(r),ul}var pl,ml;function hl(){if(ml)return pl;ml=1;let{isClean:e,my:t}=rc(),n=Dc(),r=lc(),i=Nc(),a=Ic();zc();let o=Gc(),s=fl(),c=el(),l={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return typeof e==`object`&&typeof e.then==`function`}function p(e){let t=!1,n=l[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function m(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:p(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function h(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>h(e)),t}let g={};class _{constructor(e,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))a=h(n);else if(n instanceof _||n instanceof o)a=h(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=s;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{a=e(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[t]&&i.rebuild(a)}this.result=new o(e,a,r),this.helpers={...g,postcss:g,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!u[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[n])if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let n=[m(t)];for(;n.length>0;){let e=this.visitTick(n);if(f(e))try{await e}catch(e){let t=n[n.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if(t.type===`document`){let e=t.nodes.map(e=>n(e,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new n(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type===`document`)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;
vendor: 5,671 bytes, lines 35-37
35if(f(e))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!==`root`&&r.type!==`document`&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[e,t]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=e;try{return t(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(n.iterator!==0){let i=n.iterator,a;for(;a=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!a[e]){a[e]=!0,t.push(m(a));return}n.iterator=0,delete r.indexes[i]}let a=n.events;for(;n.eventIndex<a.length;){let t=a[n.eventIndex];if(n.eventIndex+=1,t===0){r.nodes&&r.nodes.length&&(r[e]=!0,n.iterator=r.getIterator());return}else if(this.listeners[t]){n.visitors=this.listeners[t];return}}t.pop()}walkSync(t){t[e]=!0;let n=p(t);for(let r of n)if(r===0)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return`LazyResult`}}return _.registerPostcss=e=>{g=e},pl=_,_.default=_,c.registerLazyResult(_),a.registerLazyResult(_),pl}var gl,_l;function vl(){if(_l)return gl;_l=1;let e=Dc(),t=lc();zc();let n=fl(),r=Gc();class i{constructor(n,i,a){i=i.toString(),this.stringified=!1,this._processor=n,this._css=i,this._opts=a,this._map=void 0;let o=t;this.result=new r(this._processor,void 0,this._opts),this.result.css=i;let s=this;Object.defineProperty(this.result,`root`,{get(){return s.root}});let c=new e(o,void 0,this._opts,i);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}}return gl=i,i.default=i,gl}var yl,bl;function xl(){if(bl)return yl;bl=1;let e=vl(),t=hl(),n=Ic(),r=el();class i{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(!(typeof n==`object`&&(n.parse||n.stringify)))throw Error(n+` is not a PostCSS plugin`);return t}process(n,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new e(this,n,r):new t(this,n,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return yl=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),yl}var Sl,Cl;function wl(){if(Cl)return Sl;Cl=1;let e=hc(),t=xc(),n=Ac(),r=Zc(),i=wc(),a=el(),o=ol();function s(c,l){if(Array.isArray(c))return c.map(e=>s(e));let{inputs:u,...d}=c;if(u){l=[];for(let e of u){let n={...e,__proto__:i.prototype};n.map&&={...n.map,__proto__:t.prototype},l.push(n)}}if(d.nodes&&=c.nodes.map(e=>s(e,l)),d.source){let{inputId:e,...t}=d.source;d.source=t,e!=null&&(d.source.input=l[e])}if(d.type===`root`)return new a(d);if(d.type===`decl`)return new e(d);if(d.type===`rule`)return new o(d);if(d.type===`comment`)return new n(d);if(d.type===`atrule`)return new r(d);throw Error(`Unknown node type: `+c.type)}return Sl=s,s.default=s,Sl}var Tl,El;function Dl(){if(El)return Tl;El=1;let e=ec(),t=hc(),n=hl(),r=Nc(),i=xl(),a=lc(),o=wl(),s=Ic(),c=Hc(),l=Ac(),u=Zc(),d=Gc(),f=wc(),p=fl(),m=rl(),h=ol(),g=el(),_=fc();function v(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return v.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: 36https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå: 37https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new i().version,a}let a;return Object.defineProperty(r,`postcss`,{get(){return a||=r(),a}}),r.process=function(e,t,n){return v([r(n)]).process(e,t)},r},v.stringify=a,v.parse=p,v.fromJSON=o,v.list=m,v.comment=e=>new l(e),v.atRule=e=>new u(e),v.decl=e=>new t(e),v.rule=e=>new h(e),v.root=e=>new g(e),v.document=e=>new s(e),v.CssSyntaxError=e,v.Declaration=t,v.Container=r,v.Processor=i,v.Document=s,v.Comment=l,v.Warning=c,v.AtRule=u,v.Result=d,v.Input=f,v.Rule=h,v.Root=g,v.Node=_,n.registerPostcss(v),Tl=v,v.default=v,Tl}var H=Ks(Dl());H.stringify,H.fromJSON,H.plugin,H.parse,H.list,H.document,H.comment,H.atRule,H.rule,H.decl,H.root,H.CssSyntaxError,H.Declaration,H.Container,H.Processor,H.Document,H.Comment,H.Warning,H.AtRule,H.Result,H.Input,H.Rule,H.Root,H.Node;var Ol=Object.defineProperty,kl=(e,t,n)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}
37):e[t]=n,Al=(e,t,n)=>kl(e,typeof t==`symbol`?t:t+``,n);function jl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function Ml(e){if(Object.prototype.hasOwnProperty.call(e,`__esModule`))return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,`__esModule`,{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Nl={exports:{}},Pl;function Fl(){if(Pl)return Nl.exports;Pl=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Nl.exports=t(),Nl.exports.createColors=t,Nl.exports}var Il=Ml(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),Ll,Rl;function zl(){if(Rl)return Ll;Rl=1;let e=Fl(),t=Il;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+` 38 `+t+c(`^`)}return` `+l(r)+e}).join(` 39`)}toString(){let e=this.showSourceCode();return e&&=` 40 41`+e+` 42`,this.name+`: `+this.message+e}}return Ll=n,n.default=n,Ll}var Bl={},Vl;function Hl(){return Vl?Bl:(Vl=1,Bl.isClean=Symbol(`isClean`),Bl.my=Symbol(`my`),Bl)}var Ul,Wl;function Gl(){if(Wl)return Ul;Wl=1;let e={after:` 43`,beforeClose:` 44`,beforeComment:` 45`,beforeDecl:` 46`,beforeOpen:` `,beforeRule:` 47`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function t(e){return e[0].toUpperCase()+e.slice(1)}class n{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(` 48`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(n,r,i){let a;if(i||=r,r&&(a=n.raws[r],a!==void 0))return a;let o=n.parent;if(i===`before`&&(!o||o.type===`root`&&o.first===n||o&&o.type===`document`))return``;if(!o)return e[i];let s=n.root();if(s.rawCache||={},s.rawCache[i]!==void 0)return s.rawCache[i];if(i===`before`||i===`after`)return this.beforeAfter(n,i);{let e=`raw`+t(i);this[e]?a=this[e](s,n):s.walk(e=>{if(a=e.raws[r],a!==void 0)return!1})}return a===void 0&&(a=e[i]),s.rawCache[i]=a,a}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(` 49`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(` 50`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(` 51`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(` 52`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(` 53`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}}return Ul=n,n.default=n,Ul}var Kl,ql;function Jl(){if(ql)return Kl;ql=1;let e=Gl();function t(t,n){new e(n).stringify(t)}return Kl=t,t.default=t,Kl}var Yl,Xl;function Zl(){if(Xl)return Yl;Xl=1;let{isClean:e,my:t}
vendor: 5,943 bytes, lines 53-54
53=Hl(),n=zl(),r=Gl(),i=Jl();function a(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],o=typeof i;r===`parent`&&o===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>a(e,n)):(o===`object`&&i!==null&&(i=a(i)),n[r]=i)}return n}class o{constructor(n={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in n)if(e===`nodes`){this.nodes=[];for(let t of n[e])typeof t.clone==`function`?this.append(t.clone()):this.append(t)}else this[e]=n[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===` 54`?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}}return Yl=o,o.default=o,Yl}var Ql,$l;function eu(){if($l)return Ql;$l=1;let e=Zl();class t extends e{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}return Ql=t,t.default=t,Ql}var tu,nu;function ru(){return nu?tu:(nu=1,tu={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}},tu)}var iu,au;function ou(){if(au)return iu;au=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Il,{existsSync:n,readFileSync:r}=Il,{dirname:i,join:a}=Il;function o(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}class s{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new e(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return o(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);
54if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(n,r){if(r===!1)return!1;if(r){if(typeof r==`string`)return r;if(typeof r==`function`){let e=r(n);if(e){let t=this.loadFile(e);if(!t)throw Error(`Unable to load previous source map: `+e.toString());return t}}else if(r instanceof e)return t.fromSourceMap(r).toString();else if(r instanceof t)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error(`Unsupported previous source map format: `+r.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return n&&(e=a(i(n),e)),this.loadFile(e)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return iu=s,s.default=s,iu}var su,cu;function lu(){if(cu)return su;cu=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Il,{fileURLToPath:n,pathToFileURL:r}=Il,{isAbsolute:i,resolve:a}=Il,{nanoid:o}
vendor: 6,807 bytes, lines 54-59
54=ru(),s=Il,c=zl(),l=ou(),u=Symbol(`fromOffsetCache`),d=!!(e&&t),f=!!(a&&i);class p{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===`￾`?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=a(t.from)),f&&d){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+o(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let a,o,s;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return a=l?new c(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):new c(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:s,line:o},this.css,this.file,i.plugin),a.input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(a.input.url=r(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,n;if(this[u])n=this[u];else{let e=this.css.split(` 55`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[u]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,a,o){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t,line:e});if(!c.source)return!1;let l;typeof a==`number`&&(l=s.originalPositionFor({column:o,line:a}));let u;u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let d={column:c.column,endColumn:l&&l.column,endLine:l&&l.line,line:c.line,url:u.toString()};if(u.protocol===`file:`)if(n)d.file=n(u);else throw Error(`file: protocol is not available in this PostCSS build`);let f=s.sourceContentFor(c.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return su=p,p.default=p,s&&s.registerInput&&s.registerInput(p),su}var uu,du;function fu(){if(du)return uu;du=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Il,{dirname:n,relative:r,resolve:i,sep:a}=Il,{pathToFileURL:o}=Il,s=lu(),c=!!(e&&t),l=!!(n&&i&&r&&a);class u{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=` 56`;this.css.includes(`\r 57`)&&(t=`\r 58`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&=null):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css=``,this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(` 59`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?this.previous().length?this.previous().some(e=>e.annotation):!0:this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?this.previous().length?this.previous().some(e=>e.withContent()):!0:this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));
vendor: 4,998 bytes, line 59
59let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return uu=u,uu}var pu,mu;function hu(){if(mu)return pu;mu=1;let e=Zl();class t extends e{constructor(e){super(e),this.type=`comment`}}return pu=t,t.default=t,pu}var gu,_u;function vu(){if(_u)return gu;_u=1;let{isClean:e,my:t}=Hl(),n=eu(),r=hu(),i=Zl(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?`prepend`:!1,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}
vendor: 3,888 bytes, line 59
59replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},gu=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},gu}var yu,bu;function xu(){if(bu)return yu;bu=1;let e=vu(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},yu=r,r.default=r,yu}var Su,Cu;function wu(){if(Cu)return Su;Cu=1;let e={};return Su=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},Su}var Tu,Eu;function Du(){if(Eu)return Tu;Eu=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return Tu=e,e.default=e,Tu}var Ou,ku;function Au(){if(ku)return Ou;ku=1;let e=Du();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return Ou=t,t.default=t,Ou}var ju,Mu;function Nu(){if(Mu)return ju;Mu=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return ju=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function T(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}
vendor: 4,493 bytes, lines 59-60
59case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1)if(s||a){l=y;break}else C(`bracket`);for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1)if(s||a){l=y+1;break}else C(`string`);for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l);break}return y++,_}function E(e){x.push(e)}return{back:E,endOfFile:w,nextToken:T,position:S}},ju}var Pu,Fu;function Iu(){if(Fu)return Pu;Fu=1;let e=vu();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Pu=t,t.default=t,e.registerAtRule(t),Pu}var Lu,Ru;function zu(){if(Ru)return Lu;Ru=1;let e=vu(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Lu=r,r.default=r,e.registerRoot(r),Lu}var Bu,Vu;function Hu(){if(Vu)return Bu;Vu=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,` 60`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return Bu=e,e.default=e,Bu}var Uu,Wu;function Gu(){if(Wu)return Uu;Wu=1;let e=vu(),t=Hu();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return Uu=n,n.default=n,e.registerRule(n),Uu}var Ku,qu;function Ju(){if(qu)return Ku;qu=1;let e=eu(),t=Nu(),n=hu(),r=Iu(),i=zu(),a=Gu(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0)if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n===`{`){s=!0;break}else if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.no
vendor: 4,775 bytes, line 60
60des=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`)if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a;i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;)if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}else a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1];(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],!(c!==`space`&&c!==`comment`));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}else if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0)if(n===`;`)if(r){this.decl(s,o);return}else break;else if(n===`{`){this.rule(s);return}else if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}else n===`:`&&(r=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],!(c!==`space`&&c!==`comment`));)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>
vendor: 6,251 bytes, line 60
60e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],!(t!==`space`&&t!==`comment`));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],!(t!==`space`&&t!==`comment`));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return Ku=c,Ku}var Yu,Xu;function Zu(){if(Xu)return Yu;Xu=1;let e=vu(),t=Ju(),n=lu();function r(e,r){let i=new t(new n(e,r));try{i.parse()}catch(e){throw e}return i.root}return Yu=r,r.default=r,e.registerParse(r),Yu}var Qu,$u;function ed(){if($u)return Qu;$u=1;let{isClean:e,my:t}=Hl(),n=fu(),r=Jl(),i=vu(),a=xu();wu();let o=Au(),s=Zu(),c=zu(),l={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return typeof e==`object`&&typeof e.then==`function`}function p(e){let t=!1,n=l[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function m(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:p(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function h(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>h(e)),t}let g={};class _{constructor(e,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))a=h(n);else if(n instanceof _||n instanceof o)a=h(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=s;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{a=e(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[t]&&i.rebuild(a)}this.result=new o(e,a,r),this.helpers={...g,postcss:g,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!u[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[n])if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let n=[m(t)];for(;n.length>0;){let e=this.visitTick(n);if(f(e))try{await e}catch(e){let t=n[n.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if(t.type===`document`){let e=t.nodes.map(e=>n(e,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new n(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type===`document`)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;
vendor: 4,274 bytes, line 60
60if(f(e))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!==`root`&&r.type!==`document`&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[e,t]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=e;try{return t(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(n.iterator!==0){let i=n.iterator,a;for(;a=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!a[e]){a[e]=!0,t.push(m(a));return}n.iterator=0,delete r.indexes[i]}let a=n.events;for(;n.eventIndex<a.length;){let t=a[n.eventIndex];if(n.eventIndex+=1,t===0){r.nodes&&r.nodes.length&&(r[e]=!0,n.iterator=r.getIterator());return}else if(this.listeners[t]){n.visitors=this.listeners[t];return}}t.pop()}walkSync(t){t[e]=!0;let n=p(t);for(let r of n)if(r===0)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return`LazyResult`}}return _.registerPostcss=e=>{g=e},Qu=_,_.default=_,c.registerLazyResult(_),a.registerLazyResult(_),Qu}var td,nd;function rd(){if(nd)return td;nd=1;let e=fu(),t=Jl();wu();let n=Zu(),r=Au();class i{constructor(n,i,a){i=i.toString(),this.stringified=!1,this._processor=n,this._css=i,this._opts=a,this._map=void 0;let o=t;this.result=new r(this._processor,void 0,this._opts),this.result.css=i;let s=this;Object.defineProperty(this.result,`root`,{get(){return s.root}});let c=new e(o,void 0,this._opts,i);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}}return td=i,i.default=i,td}var id,ad;function od(){if(ad)return id;ad=1;let e=rd(),t=ed(),n=xu(),r=zu();class i{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(!(typeof n==`object`&&(n.parse||n.stringify)))throw Error(n+` is not a PostCSS plugin`);return t}process(n,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new e(this,n,r):new t(this,n,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return id=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),id}var sd,cd;function ld(){if(cd)return sd;cd=1;let e=eu(),t=ou(),n=hu(),r=Iu(),i=lu(),a=zu(),o=Gu();function s(c,l){if(Array.isArray(c))return c.map(e=>s(e));let{inputs:u,...d}=c;if(u){l=[];for(let e of u){let n={...e,__proto__:i.prototype};n.map&&={...n.map,__proto__:t.prototype},l.push(n)}}if(d.nodes&&=c.nodes.map(e=>s(e,l)),d.source){let{inputId:e,...t}=d.source;d.source=t,e!=null&&(d.source.input=l[e])}if(d.type===`root`)return new a(d);if(d.type===`decl`)return new e(d);if(d.type===`rule`)return new o(d);if(d.type===`comment`)return new n(d);if(d.type===`atrule`)return new r(d);throw Error(`Unknown node type: `+c.type)}return sd=s,s.default=s,sd}var ud,dd;function fd(){if(dd)return ud;dd=1;let e=zl(),t=eu(),n=ed(),r=vu(),i=od(),a=Jl(),o=ld(),s=xu(),c=Du(),l=hu(),u=Iu(),d=Au(),f=lu(),p=
60Zu(),m=Hu(),h=Gu(),g=zu(),_=Zl();function v(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return v.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: 61https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå: 62https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new i().version,a}let a;return Object.defineProperty(r,`postcss`,{get(){return a||=r(),a}}),r.process=function(e,t,n){return v([r(n)]).process(e,t)},r},v.stringify=a,v.parse=p,v.fromJSON=o,v.list=m,v.comment=e=>new l(e),v.atRule=e=>new u(e),v.decl=e=>new t(e),v.rule=e=>new h(e),v.root=e=>new g(e),v.document=e=>new s(e),v.CssSyntaxError=e,v.Declaration=t,v.Container=r,v.Processor=i,v.Document=s,v.Comment=l,v.Warning=c,v.AtRule=u,v.Result=d,v.Input=f,v.Rule=h,v.Root=g,v.Node=_,n.registerPostcss(v),ud=v,v.default=v,ud}var U=jl(fd());U.stringify,U.fromJSON,U.plugin,U.parse,U.list,U.document,U.comment,U.atRule,U.rule,U.decl,U.root,U.CssSyntaxError,U.Declaration,U.Container,U.Processor,U.Document,U.Comment,U.Warning,U.AtRule,U.Result,U.Input,U.Rule,U.Root,U.Node;var pd=class e{constructor(...e){Al(this,`parentElement`,null),Al(this,`parentNode`,null),Al(this,`ownerDocument`),Al(this,`firstChild`,null),Al(this,`lastChild`,null),Al(this,`previousSibling`,null),Al(this,`nextSibling`,null),Al(this,`ELEMENT_NODE`,1),Al(this,`TEXT_NODE`,3),Al(this,`nodeType`),Al(this,`nodeName`),Al(this,`RRNodeType`)}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e)||t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`)}insertBefore(e,t){throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`)}removeChild(e){throw Error(`RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`)}toString(){return`RRNode`}},md={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},hd={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},gd={};function _d(e){var t;let n=((t=globalThis==null?void 0:globalThis.Zone)?.__symbol__)?.call(t,e);if(n&&globalThis[n])return globalThis[n]}function vd(e){if(gd[e])return gd[e];let t=_d(e)||globalThis[e],n=t.prototype,r=e in md?md[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in hd?hd[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o)return gd[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;return document.body.removeChild(r),a?gd[e]=a:n}catch{return n}}var yd={};function bd(e,t,n){let r=`${e}.${String(n)}`;if(yd[r])return yd[r].call(t);let i=vd(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?(yd[r]=a,a.call(t)):t[n]}var xd={};function Sd(e,t,n){let r=`${e}.${String(n)}`;if(xd[r])return xd[r].bind(t);let i=vd(e)[n];return typeof i==`function`?(xd[r]=i,i.bind(t)):t[n]}function Cd(e){return bd(`Node`,e,`childNodes`)}function wd(e){return bd(`Node`,e,`parentNode`)}function Td(e){return bd(`Node`,e,`parentElement`)}function Ed(e){return bd(`Node`,e,`textContent`)}function Dd(e,t){return Sd(`Node`,e,`contains`)(t)}function Od(e){return Sd(`Node`,e,`getRootNode`)()}function kd(e){return!e||!(`host`in e)?null:bd(`ShadowRoot`,e,`host`)}function Ad(e){return e.styleSheets}function jd(e){return!e||!(`shadowRoot`in e)?null:bd(`Element`,e,`shadowRoot`)}function Md(e,t){return bd(`Element`,e,`querySelector`)(t)}function Nd(e,t){return bd(`Element`,e,`querySelectorAll`)(t)}function Pd(){return vd(`MutationObserver`).constructor}var Fd={childNodes:Cd,parentNode:wd,parentElement:Td,textContent:Ed,contains:Dd,getRootNode:Od,host:kd,styleSheets:Ad,shadowRoot:jd,querySelector:Md,querySelectorAll:Nd,mutationObserver:Pd};function Id(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Ld=`Please stop import mirror directly. Instead of that,\r
63now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 64or you can use record.mirror to access the mirror instance during recording.`,Rd={map:{},getId(){return console.error(Ld),-1},getNode(){return console.error(Ld),null},removeNodeFromMap(){console.error(Ld)},has(){return console.error(Ld),!1},reset(){console.error(Ld)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(Rd=new Proxy(Rd,{get(e,t,n){return t===`map`&&console.error(Ld),Reflect.get(e,t,n)}}));function zd(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(clearTimeout(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function Bd(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>Bd(e,t,a||{},!0)}function Vd(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var Hd=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Hd=()=>new Date().getTime());function Ud(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t.documentElement.scrollLeft||t?.body&&Fd.parentElement(t.body)?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body&&Fd.parentElement(t.body)?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function Wd(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Gd(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Kd(e){return e?e.nodeType===e.ELEMENT_NODE?e:Fd.parentElement(e):null}function qd(e,t,n,r){if(!e)return!1;let i=Kd(e);if(!i)return!1;try{if(typeof t==`string`){if(i.classList.contains(t)||r&&i.closest(`.`+t)!==null)return!0}else if(Gs(i,t,r))return!0}catch{}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function Jd(e,t){return t.getId(e)!==-1}function Yd(e,t,n){return e.tagName===`TITLE`&&n.headTitleMutations?!0:t.getId(e)===Ws}function Xd(e,t){if(Vs(e))return!1;let n=t.getId(e);if(!t.has(n))return!0;let r=Fd.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:r?Xd(r,t):!0}function Zd(e){return!!e.changedTouches}function Qd(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function $d(e){let t={},n=(e,n)=>{let r={value:e,parent:n,children:[]};return t[e.node.id]=r,r},r=[];for(let i of e){let{nextId:e,parentId:a}=i;if(e&&e in t){let a=t[e];if(a.parent){let e=a.parent.children.indexOf(a);a.parent.children.splice(e,0,n(i,a.parent))}else{let e=r.indexOf(a);r.splice(e,0,n(i,null))}continue}if(a in t){let e=t[a];e.children.push(n(i,e));continue}r.push(n(i,null))}return r}function ef(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)ef(e.children[n],t)}function tf(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function nf(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function rf(e,t){let n=e.ownerDocument?.defaultView?.frameElement;if(!n||n===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let r=n.getBoundingClientRect(),i=rf(n,t),a=r.height/n.clientHeight;return{x:r.x*i.relativeScale+i.x,y:r.y*i.relativeScale+i.y,relativeScale:a,absoluteScale:i.absoluteScale*a}}function af(e){return e?e instanceof pd&&`shadowRoot`in e?!!e.shadowRoot:!!Fd.shadowRoot(e):!1}function of(e,t){let n=e[t[0]];return t.length===1?n:of(n.cssRules[t[1]].cssRules,t.slice(2))}function sf(e){let t=[...e];return{positions:t,index:t.pop()}}function cf(e){let t=new Set,n=[];for(let r=e.length;r--;){let i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}var lf=class{constructor(){hs(this,`id`,1),hs(this,`styleIDMap`,new WeakMap),hs(this,`idStyleMap`,new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function uf(e){let t=null;return`getRootNode`in e&&Fd.getRootNode(e)?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Fd.host(Fd.getRootNode(e))&&(t=Fd.host(Fd.getRootNode(e))),t}function df(e){let t=e,n;for(;n=uf(t);)t=n;return t}function ff(e){let t=e.ownerDocument;if(!t)return!1;let n=df(e);return Fd.contains(t,n)}function pf(e){let t=e.ownerDocument;return t?Fd.contains(t,e)||ff(e):!1}for(var mf=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:lf,get _mirror(){return Rd},closestElementOfNode:Kd,getBaseDimension:rf,getNestedRule:of,getPositionsAndIndex:sf,getRootShadowHost:df,getShadowHost:uf,getWindowHeight:Wd,getWindowScroll:Ud,getWindowWidth:Gd,hasShadowRoot:af,hookSetter:Bd,inDom:pf,isAncestorRemoved:Xd,isBlocked:qd,isIgnored:Yd,isSerialized:Jd,isSerializedIframe:tf,isSerializedStylesheet:nf,iterateResolveTree:ef,legacy_isTouchEvent:Zd,get nowTimestamp(){return Hd}
64,on:Id,patch:Vd,polyfill:Qd,queueToResolveTrees:$d,shadowHostInDom:ff,throttle:zd,uniqueTextMutations:cf},Symbol.toStringTag,{value:`Module`})),hf=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,gf=typeof Uint8Array>`u`?[]:new Uint8Array(256),_f=0;_f<hf.length;_f++)gf[hf.charCodeAt(_f)]=_f;typeof self<`u`&&self.Blob&&new Blob([`(function() { 65 "use strict"; 66 var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 67 var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); 68 for (var i = 0; i < chars.length; i++) { 69 lookup[chars.charCodeAt(i)] = i; 70 } 71 var encode = function(arraybuffer) { 72 var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = ""; 73 for (i2 = 0; i2 < len; i2 += 3) { 74 base64 += chars[bytes[i2] >> 2]; 75 base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4]; 76 base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6]; 77 base64 += chars[bytes[i2 + 2] & 63]; 78 } 79 if (len % 3 === 2) { 80 base64 = base64.substring(0, base64.length - 1) + "="; 81 } else if (len % 3 === 1) { 82 base64 = base64.substring(0, base64.length - 2) + "=="; 83 } 84 return base64; 85 }; 86 const lastBlobMap = /* @__PURE__ */ new Map(); 87 const transparentBlobMap = /* @__PURE__ */ new Map(); 88 async function getTransparentBlobFor(width, height, dataURLOptions) { 89 const id = \`\${width}-\${height}\`; 90 if ("OffscreenCanvas" in globalThis) { 91 if (transparentBlobMap.has(id)) return transparentBlobMap.get(id); 92 const offscreen = new OffscreenCanvas(width, height); 93 offscreen.getContext("2d"); 94 const blob = await offscreen.convertToBlob(dataURLOptions); 95 const arrayBuffer = await blob.arrayBuffer(); 96 const base64 = encode(arrayBuffer); 97 transparentBlobMap.set(id, base64); 98 return base64; 99 } else { 100 return ""; 101 } 102 } 103 const worker = self; 104 worker.onmessage = async function(e) { 105 if ("OffscreenCanvas" in globalThis) { 106 const { id, bitmap, width, height, dataURLOptions } = e.data; 107 const transparentBase64 = getTransparentBlobFor( 108 width, 109 height, 110 dataURLOptions 111 ); 112 const offscreen = new OffscreenCanvas(width, height); 113 const ctx = offscreen.getContext("2d"); 114 ctx.drawImage(bitmap, 0, 0); 115 bitmap.close(); 116 const blob = await offscreen.convertToBlob(dataURLOptions); 117 const type = blob.type; 118 const arrayBuffer = await blob.arrayBuffer(); 119 const base64 = encode(arrayBuffer); 120 if (!lastBlobMap.has(id) && await transparentBase64 === base64) { 121 lastBlobMap.set(id, base64); 122 return worker.postMessage({ id }); 123 } 124 if (lastBlobMap.get(id) === base64) return worker.postMessage({ id }); 125 worker.postMessage({ 126 id, 127 type, 128 base64, 129 width, 130 height 131 }); 132 lastBlobMap.set(id, base64); 133 } else { 134 return worker.postMessage({ id: e.data.id }); 135 } 136 }; 137})(); 138//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map 139`],{type:`text/javascript;charset=utf-8`});try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}Us();var vf;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(vf||={});var yf=class{constructor(e){fs(this,`fileName`),fs(this,`functionName`),fs(this,`lineNumber`),fs(this,`columnNumber`),this.fileName=e.fileName||``,this.functionName=e.functionName||``,this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){let e=this.lineNumber||``,t=this.columnNumber||``;return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}},bf=/(^|@)\S+:\d+/,xf=/^\s*at .*(\S+:\d+|\(native\))/m,Sf=/^(eval@)?(\[native code])?$/,Cf={parse:function(e){return e?e.stacktrace!==void 0||e[`opera#sourceloc`]!==void 0?this.parseOpera(e):e.stack&&e.stack.match(xf)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn(`[console-record-plugin]: Failed to parse error object:`,e),[]):[]},extractLocation:function(e){if(e.indexOf(`:`)===-1)return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,``));if(!t)throw Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(` 140`).filter(function(e){return!!e.match(xf)},this).map(function(e){e.indexOf(`(eval `)>-1&&(e=e.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(\),.*$)/g,``));let t=e.replace(/^\s+/,``).replace(/\(eval code/g,`(`),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=n?t.replace(n[0],``):t;let r=t.split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop());
vendor: 4,372 bytes, lines 140-148
140return new yf({functionName:r.join(` `)||void 0,fileName:[`eval`,`<anonymous>`].indexOf(i[0])>-1?void 0:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split(` 141`).filter(function(e){return!e.match(Sf)},this).map(function(e){if(e.indexOf(` > eval`)>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),e.indexOf(`@`)===-1&&e.indexOf(`:`)===-1)return new yf({functionName:e});{let t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,``));return new yf({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(` 142`)>-1&&e.message.split(` 143`).length>e.stacktrace.split(` 144`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){let t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split(` 145`),r=[];for(let e=2,i=n.length;e<i;e+=2){let i=t.exec(n[e]);i&&r.push(new yf({fileName:i[2],lineNumber:parseFloat(i[1])}))}return r},parseOpera10:function(e){let t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split(` 146`),r=[];for(let e=0,i=n.length;e<i;e+=2){let i=t.exec(n[e]);i&&r.push(new yf({functionName:i[3]||void 0,fileName:i[2],lineNumber:parseFloat(i[1])}))}return r},parseOpera11:function(e){return e.stack.split(` 147`).filter(function(e){return!!e.match(bf)&&!e.match(/^Error created at/)},this).map(function(e){let t=e.split(`@`),n=this.extractLocation(t.pop());return new yf({functionName:(t.shift()||``).replace(/<anonymous function(: (\w+))?>/,`$2`).replace(/\([^)]*\)/g,``)||void 0,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)}};function wf(e){if(!e||!e.outerHTML)return``;let t=``;for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();let r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(let e=0;e<r.children.length;e++){let t=r.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===n&&i.push(t)}i.length>1&&(n+=`:eq(${i.indexOf(e)})`),t=n+(t?`>`+t:``),e=r}return t}function Tf(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ef(e,t){if(t===0)return!0;let n=Object.keys(e);for(let r of n)if(Tf(e[r])&&Ef(e[r],t-1))return!0;return!1}function Df(e,t){let n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);let r=[],i=[];return JSON.stringify(e,function(e,t){if(r.length>0){let n=r.indexOf(this);~n?r.splice(n+1):r.push(this),~n?i.splice(n,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?`[Circular ~]`:`[Circular ~.`+i.slice(0,r.indexOf(t)).join(`.`)+`]`)}else r.push(t);if(t===null)return t;if(t===void 0)return`undefined`;if(a(t))return o(t);if(typeof t==`bigint`)return t.toString()+`n`;if(t instanceof Event){let e={};for(let n in t){let r=t[n];Array.isArray(r)?e[n]=wf(r.length?r[0]:null):e[n]=r}return e}else if(t instanceof Node)return t instanceof HTMLElement?t?t.outerHTML:``:t.nodeName;else if(t instanceof Error)return t.stack?t.stack+` 148End of stack for Error object`:t.name+`: `+t.message;return t});function a(e){return!!(Tf(e)&&Object.keys(e).length>n.numOfKeysLimit||typeof e==`function`||Tf(e)&&Ef(e,n.depthOfLimit))}function o(e){let t=e.toString();return n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=`${t.slice(0,n.stringLengthLimit)}...`),t}}var Of={level:[`assert`,`clear`,`count`,`countReset`,`debug`,`dir`,`dirxml`,`error`,`group`,`groupCollapsed`,`groupEnd`,`info`,`log`,`table`,`time`,`timeEnd`,`timeLog`,`trace`,`warn`],lengthThreshold:1e3,logger:`console`};function kf(e,t,n){let r=n?Object.assign({},Of,n):Of,i=r.logger;if(!i)return()=>{};let a;a=typeof i==`string`?t[i]:i;let o=0,s=!1,c=[];if(r.level.includes(`error`)){let n=t=>{let n=t.message,i=t.error;e({level:`error`,trace:Cf.parse(i).map(e=>e.toString()),payload:[Df(n,r.stringifyOptions)]})};t.addEventListener(`error`,n),c.push(()=>{t.removeEventListener(`error`,n)});let i=t=>{let n,i;t.reason instanceof Error?(n=t.reason,i=[Df(`Uncaught (in promise) ${n.name}: ${n.message}`,r.stringifyOptions)]):(n=Error(),i=[Df(`Uncaught (in promise)`,r.stringifyOptions),Df(t.reason,r.stringifyOptions)]),e({level:`error`,trace:Cf.parse(n).map(e=>e.toString()),payload:i})};t.addEventListener(`unhandledrejection`,i),c.push(()=>{t.removeEventListener(`unhandledrejection`,i)})}for(let e of r.level)c.push(l(a,e));return()=>
148{c.forEach(e=>e())};function l(t,n){return t[n]?mf.patch(t,n,t=>(...i)=>{if(t.apply(this,i),!(n===`assert`&&i[0])&&!s){s=!0;try{let t=Cf.parse(Error()).map(e=>e.toString()).splice(1),a=(n===`assert`?i.slice(1):i).map(e=>Df(e,r.stringifyOptions));o++,o<r.lengthThreshold?e({level:n,trace:t,payload:a}):o===r.lengthThreshold&&e({level:`warn`,trace:[],payload:[Df(`The number of log records reached the threshold.`)]})}catch(e){t(`rrweb logger error:`,e,...i)}finally{s=!1}}}):()=>{}}}var Af=`rrweb/console@1`,jf=e=>({name:Af,observer:kf,options:e}),Mf=Object.defineProperty,Nf=(e,t,n)=>t in e?Mf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W=(e,t,n)=>Nf(e,typeof t==`symbol`?t:t+``,n),Pf=Object.defineProperty,Ff=(e,t,n)=>t in e?Pf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,If=(e,t,n)=>Ff(e,typeof t==`symbol`?t:t+``,n),Lf=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(Lf||{}),Rf={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},zf={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},Bf={};function Vf(e){var t;let n=((t=globalThis==null?void 0:globalThis.Zone)?.__symbol__)?.call(t,e);if(n&&globalThis[n])return globalThis[n]}function Hf(e){if(Bf[e])return Bf[e];let t=Vf(e)||globalThis[e],n=t.prototype,r=e in Rf?Rf[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in zf?zf[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o)return Bf[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;return document.body.removeChild(r),a?Bf[e]=a:n}catch{return n}}var Uf={};function Wf(e,t,n){let r=`${e}.${String(n)}`;if(Uf[r])return Uf[r].call(t);let i=Hf(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?(Uf[r]=a,a.call(t)):t[n]}var Gf={};function Kf(e,t,n){let r=`${e}.${String(n)}`;if(Gf[r])return Gf[r].bind(t);let i=Hf(e)[n];return typeof i==`function`?(Gf[r]=i,i.bind(t)):t[n]}function qf(e){return Wf(`Node`,e,`childNodes`)}function Jf(e){return Wf(`Node`,e,`parentNode`)}function Yf(e){return Wf(`Node`,e,`parentElement`)}function Xf(e){return Wf(`Node`,e,`textContent`)}function Zf(e,t){return Kf(`Node`,e,`contains`)(t)}function Qf(e){return Kf(`Node`,e,`getRootNode`)()}function $f(e){return!e||!(`host`in e)?null:Wf(`ShadowRoot`,e,`host`)}function ep(e){return e.styleSheets}function tp(e){return!e||!(`shadowRoot`in e)?null:Wf(`Element`,e,`shadowRoot`)}function np(e,t){return Wf(`Element`,e,`querySelector`)(t)}function rp(e,t){return Wf(`Element`,e,`querySelectorAll`)(t)}function ip(){return Hf(`MutationObserver`).constructor}var ap={childNodes:qf,parentNode:Jf,parentElement:Yf,textContent:Xf,contains:Zf,getRootNode:Qf,host:$f,styleSheets:ep,shadowRoot:tp,querySelector:np,querySelectorAll:rp,mutationObserver:ip};function op(e){return e.nodeType===e.ELEMENT_NODE}function sp(e){let t=e&&`host`in e&&`mode`in e&&ap.host(e)||null;return!!(t&&`shadowRoot`in t&&ap.shadowRoot(t)===e)}function cp(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function lp(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function up(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function dp(e){try{let t=e.rules||e.cssRules;if(!t)return null;let n=e.href;return!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href),lp(Array.from(t,e=>fp(e,n)).join(``))}catch{return null}}function fp(e,t){if(mp(e)){let t;try{t=dp(e.styleSheet)||up(e)}catch{t=e.cssText}return e.styleSheet.href?kp(t,e.styleSheet.href):t}else{let n=e.cssText;return hp(e)&&e.selectorText.includes(`:`)&&(n=pp(n)),t?kp(n,t):n}}function pp(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function mp(e){return`styleSheet`in e}function hp(e){return`selectorText`in e}var gp=class{constructor(){If(this,`idNodeMap`,new Map),If(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);
vendor: 4,454 bytes, line 148
148this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function _p(){return new gp}function vp({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:a}){let o=i||``,s=r&&yp(r);return(t[n.toLowerCase()]||s&&t[s])&&(o=a?a(o,e):`*`.repeat(o.length)),o}function yp(e){return e.toLowerCase()}var bp=`__rrweb_original__`;function xp(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=bp in i?i[bp]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function Sp(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?yp(t):null}function Cp(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}function wp(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var Tp=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ep=/^(?:[a-z+]+:)?\/\//i,Dp=/^www\..*/i,Op=/^(data:)([^,]*),(.*)/i;function kp(e,t){return(e||``).replace(Tp,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(Ep.test(s)||Dp.test(s)||Op.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${wp(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}function Ap(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``).replace(/0px/g,`0`)}function jp(e,t,n=!1){let r=Array.from(t.childNodes),i=[],a=0;if(r.length>1&&e&&typeof e==`string`){let t=Ap(e,n),o=t.length/e.length;for(let s=1;s<r.length;s++)if(r[s].textContent&&typeof r[s].textContent==`string`){let c=Ap(r[s].textContent,n),l=3;for(;l<c.length&&(c[l].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,l),1)!==-1);l++);for(;l<c.length;l++){let u=c.substring(0,l),d=t.split(u),f=-1;if(d.length===2)f=d[0].length;else if(d.length>2&&d[0]===``&&r[s-1].textContent!==``)f=t.indexOf(u,1);else if(d.length===1){if(u=u.substring(0,u.length-1),d=t.split(u),d.length<=1)return i.push(e),i;l=101}else l===c.length-1&&(f=t.indexOf(u));if(d.length>=2&&l>100){let e=r[s-1].textContent;if(e&&typeof e==`string`){let n=Ap(e).length;f=t.indexOf(u,n)}f===-1&&(f=d[0].length)}if(f!==-1){let s=Math.floor(f/o);for(;s>0&&s<e.length;){if(a+=1,a>50*r.length)return i.push(e),i;let c=Ap(e.substring(0,s),n);if(c.length===f){i.push(e.substring(0,s)),e=e.substring(s),t=t.substring(f);break}else c.length<f?s+=Math.max(1,Math.floor((f-c.length)/o)):s-=Math.max(1,Math.floor((c.length-f)*o))}break}}}}return i.push(e),i}function Mp(e,t){return jp(e,t).join(`/* rr_split */`)}var Np=`lightgrey`,Pp=1,Fp=RegExp(`[^a-z0-9-_:]`),Ip=-2;function Lp(){return Pp++}function Rp(e){if(e instanceof HTMLFormElement)return`form`;let t=yp(e.tagName);return Fp.test(t)?`div`:t}var zp,Bp,Vp=/^[^ \t\n\r\u000c]+/,Hp=/^[, \t\n\r\u000c]+/;function Up(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(Hp),!(n>=t.length);){let a=r(Vp);if(a.slice(-1)===`,`)a=Gp(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=Gp(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}else if(o)e===`)`&&(o=!1);else if(e===`,`){n+=1,i.push((a+r).trim());break}else e===`(`&&(o=!0);r+=e,n+=1}}}return i.join(`, `)}var Wp=new WeakMap;function Gp(e,t){return!t||t.trim()===``?t:qp(e,t)}function Kp(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function qp(e,t){let n=Wp.get(e);if(n||(n=e.createElement(`a`),Wp.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function Jp(e,t,n,r){return r&&(n===`src`||n===`href`&&!(t===`use`&&r[0]===`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`)?Gp(e,r):n===`srcset`?Up(e,r):n===`style`?kp(r,qp(e)):t===`object`&&n===`data`?Gp(e,r):r)}function Yp(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}
vendor: 4,391 bytes, line 148
148function Xp(e,t,n){try{if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Zp(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Zp(ap.parentNode(e),t,n):!1;for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return n?Zp(ap.parentNode(e),t,n):!1}function Qp(e,t,n,r){let i;if(op(e)){if(i=e,!ap.childNodes(i).length)return!1}else if(ap.parentElement(e)===null)return!1;else i=ap.parentElement(e);try{if(typeof t==`string`){if(r){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Zp(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function $p(e,t,n){let r=e.contentWindow;if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=setTimeout(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return setTimeout(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function em(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(a),r=!0,t()})}function tm(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:o,inlineStylesheet:s,maskInputOptions:c={},maskTextFn:l,maskInputFn:u,dataURLOptions:d={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h=!1,cssCaptured:g=!1,applyBackgroundColorToBlockedElements:_=!1}=t,v=nm(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:Lf.Document,childNodes:[]}:{type:Lf.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:Lf.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return im(e,{doc:n,blockClass:i,blockSelector:a,inlineStylesheet:s,maskInputOptions:c,maskInputFn:u,dataURLOptions:d,inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h,rootId:v,applyBackgroundColorToBlockedElements:_});case e.TEXT_NODE:return rm(e,{doc:n,needsMask:o,maskTextFn:l,rootId:v,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:Lf.CDATA,textContent:``,rootId:v};case e.COMMENT_NODE:return{type:Lf.Comment,textContent:ap.textContent(e)||``,rootId:v};default:return!1}}function nm(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function rm(e,t){let{needsMask:n,maskTextFn:r,rootId:i,cssCaptured:a}=t,o=ap.parentNode(e),s=o&&o.tagName,c=``,l=s===`STYLE`?!0:void 0,u=s===`SCRIPT`?!0:void 0;return u?c=`SCRIPT_PLACEHOLDER`:a||(c=ap.textContent(e),l&&c&&(c=kp(c,qp(t.doc)))),!l&&!u&&c&&n&&(c=r?r(c,ap.parentElement(e)):c.replace(/[\S]/g,`*`)),{type:Lf.Text,textContent:c||``,rootId:i}}function im(e,t){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskInputFn:s,dataURLOptions:c={},inlineImages:l,recordCanvas:u,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:p,applyBackgroundColorToBlockedElements:m=!1}=t,h=Xp(e,r,i),g=Rp(e),_={},v=e.attributes.length;for(let t=0;t<v;t++){let r=e.attributes[t];Yp(g,r.name,r.value)||(_[r.name]=Jp(n,g,yp(r.name),r.value))}if(g===`link`&&a){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=dp(t)),r&&(delete _.rel,delete _.href,_._cssText=r)}if(g===`style`&&e.sheet){let t=dp(e.sheet);t&&(e.childNodes.length>1&&(t=Mp(t,e)),_._cssText=t)}if(g===`input`||g===`textarea`||g===`select`){let t=e.value,n=e.checked;_.type!==`radio`&&_.type!==`checkbox`&&_.type!==`submit`&&_.type!==`button`&&t?_.value=vp({element:e,type:Sp(e),tagName:g,value:t,maskInputOptions:o,maskInputFn:s}):n&&(_.checked=n)}if(g===`option`&&(e.selected&&!o.select?_.selected=!0:delete _.selected),g===`dialog`&&e.open&&(_.rr_open_mode=e.matches(`dialog:modal`)?`modal`:`non-modal`),g===`canvas`&&u){if(e.__context===`2d`)xp(e)||(_.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!(`__context`in e)){let t=e.toDataURL(c.type,c.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(c.type,c.quality)&&(_.rr_dataURL=t)}}if(g===`img`&&l){zp||(zp=n.createElement(`canvas`),Bp=zp.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);
148try{zp.width=t.naturalWidth,zp.height=t.naturalHeight,Bp.drawImage(t,0,0),_.rr_dataURL=zp.toDataURL(c.type,c.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}else console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?_.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if(g===`audio`||g===`video`){let t=_;t.rr_mediaState=e.paused?`paused`:`played`,t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(f||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),h){let{width:t,height:n}=e.getBoundingClientRect();_={class:_.class,rr_width:`${t}px`,rr_height:`${n}px`,...m?{rr_background_color:Np}:{}}}g===`iframe`&&!d(_.src)&&(e.contentDocument||(_.rr_src=_.src),delete _.src);let y;try{customElements.get(g)&&(y=!0)}catch{}return{type:Lf.Element,tagName:g,attributes:_,childNodes:[],isSVG:Kp(e)||void 0,needBlock:h,rootId:p,isCustom:y}}function G(e){return e==null?``:e.toLowerCase()}function am(e,t){return!!(t.comment&&e.type===Lf.Comment||e.type===Lf.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)&&e.attributes.as===`script`||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&Cp(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(G(e.attributes.name).match(/^msapplication-tile(image|color)$/)||G(e.attributes.name)===`application-name`||G(e.attributes.rel)===`icon`||G(e.attributes.rel)===`apple-touch-icon`||G(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&G(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(G(e.attributes.property).match(/^(og|twitter|fb):/)||G(e.attributes.name).match(/^(og|twitter):/)||G(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(G(e.attributes.name)===`robots`||G(e.attributes.name)===`googlebot`||G(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(G(e.attributes.name)===`author`||G(e.attributes.name)===`generator`||G(e.attributes.name)===`framework`||G(e.attributes.name)===`publisher`||G(e.attributes.name)===`progid`||G(e.attributes.property).match(/^article:/)||G(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(G(e.attributes.name)===`google-site-verification`||G(e.attributes.name)===`yandex-verification`||G(e.attributes.name)===`csrf-token`||G(e.attributes.name)===`p:domain_verify`||G(e.attributes.name)===`verify-v1`||G(e.attributes.name)===`verification`||G(e.attributes.name)===`shopify-checkout-api-token`))))}function om(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:s,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m={},inlineImages:h=!1,recordCanvas:g=!1,onSerialize:_,onIframeLoad:v,iframeLoadTimeout:y=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:C=!1,cssCaptured:w=!1,applyBackgroundColorToBlockedElements:T=!1}=t,{needsMask:E}=t,{preserveWhiteSpace:D=!0}=t;E||=Qp(e,o,s,E===void 0);let O=tm(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:E,inlineStylesheet:l,maskInputOptions:u,maskTextFn:d,maskInputFn:f,dataURLOptions:m,inlineImages:h,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:C,cssCaptured:w,applyBackgroundColorToBlockedElements:T});if(!O)return console.warn(e,`not serialized`),null;let k;k=r.hasNode(e)?r.getId(e):am(O,p)||!D&&O.type===Lf.Text&&!O.textContent.replace(/^\s+|\s+$/gm,``).length?Ip:Lp();let A=Object.assign(O,{id:k});if(r.add(e,A),k===Ip)return null;_&&_(e);let j=!c;if(A.type===Lf.Element){j&&=!A.needBlock,delete A.needBlock;let t=ap.shadowRoot(e);t&&cp(t)&&(A.isShadowHost=!0)}if((A.type===Lf.Document||A.type===Lf.Element)&&j){p.headWhitespace&&A.type===Lf.Element&&A.tagName===`head`&&(D=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:E,maskTextClass:o,maskTextSelector:s,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:D,onSerialize:_,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:x,keepIframeSrcFn:S,cssCaptured:!1,applyBackgroun
vendor: 4,067 bytes, line 148
148dColorToBlockedElements:T};if(!(A.type===Lf.Element&&A.tagName===`textarea`&&A.attributes.value!==void 0)){A.type===Lf.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText==`string`&&(t.cssCaptured=!0);for(let n of Array.from(ap.childNodes(e))){let e=om(n,t);e&&A.childNodes.push(e)}}let C=null;if(op(e)&&(C=ap.shadowRoot(e)))for(let e of Array.from(ap.childNodes(C))){let n=om(e,t);n&&(cp(C)&&(n.isShadow=!0),A.childNodes.push(n))}}let ee=ap.parentNode(e);return ee&&sp(ee)&&cp(ee)&&(A.isShadow=!0),A.type===Lf.Element&&A.tagName===`iframe`&&$p(e,()=>{let t=e.contentDocument;if(t&&v){let n=om(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,needsMask:E,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:D,onSerialize:_,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:x,keepIframeSrcFn:S});n&&v(e,n)}},y),A.type===Lf.Element&&A.tagName===`link`&&typeof A.attributes.rel==`string`&&(A.attributes.rel===`stylesheet`||A.attributes.rel===`preload`&&typeof A.attributes.href==`string`&&Cp(A.attributes.href)===`css`)&&em(e,()=>{if(b){let t=om(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:E,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:D,onSerialize:_,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:x,keepIframeSrcFn:S});t&&b(e,t)}},x),A}function sm(e,t){let{mirror:n=new gp,blockClass:r=`rr-block`,blockSelector:i=null,maskTextClass:a=`rr-mask`,maskTextSelector:o=null,inlineStylesheet:s=!0,inlineImages:c=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x=()=>!1,applyBackgroundColorToBlockedElements:S=!1}=t||{};return om(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:s,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:p===!0||p===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:m,inlineImages:c,recordCanvas:l,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x,newlyAddedElement:!1,applyBackgroundColorToBlockedElements:S})}function cm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function lm(e){if(Object.prototype.hasOwnProperty.call(e,`__esModule`))return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,`__esModule`,{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var um={exports:{}},dm;function fm(){if(dm)return um.exports;dm=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return um.exports=t(),um.exports.createColors=t,um.exports}var pm=lm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),mm,hm;function gm(){if(hm)return mm;hm=1;let e=fm(),t=pm;
148class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+` 149 `+t+c(`^`)}return` `+l(r)+e}).join(` 150`)}toString(){let e=this.showSourceCode();return e&&=` 151 152`+e+` 153`,this.name+`: `+this.message+e}}return mm=n,n.default=n,mm}var _m={},vm;function ym(){return vm?_m:(vm=1,_m.isClean=Symbol(`isClean`),_m.my=Symbol(`my`),_m)}var bm,xm;function Sm(){if(xm)return bm;xm=1;let e={after:` 154`,beforeClose:` 155`,beforeComment:` 156`,beforeDecl:` 157`,beforeOpen:` `,beforeRule:` 158`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function t(e){return e[0].toUpperCase()+e.slice(1)}class n{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(` 159`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(n,r,i){let a;if(i||=r,r&&(a=n.raws[r],a!==void 0))return a;let o=n.parent;if(i===`before`&&(!o||o.type===`root`&&o.first===n||o&&o.type===`document`))return``;if(!o)return e[i];let s=n.root();if(s.rawCache||={},s.rawCache[i]!==void 0)return s.rawCache[i];if(i===`before`||i===`after`)return this.beforeAfter(n,i);{let e=`raw`+t(i);this[e]?a=this[e](s,n):s.walk(e=>{if(a=e.raws[r],a!==void 0)return!1})}return a===void 0&&(a=e[i]),s.rawCache[i]=a,a}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(` 160`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(` 161`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(` 162`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(` 163`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(` 164`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}}return bm=n,n.default=n,bm}var Cm,wm;function Tm(){if(wm)return Cm;wm=1;let e=Sm();function t(t,n){new e(n).stringify(t)}return Cm=t,t.default=t,Cm}var Em,Dm;
vendor: 4,733 bytes, lines 164-165
164function Om(){if(Dm)return Em;Dm=1;let{isClean:e,my:t}=ym(),n=gm(),r=Sm(),i=Tm();function a(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],o=typeof i;r===`parent`&&o===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>a(e,n)):(o===`object`&&i!==null&&(i=a(i)),n[r]=i)}return n}class o{constructor(n={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in n)if(e===`nodes`){this.nodes=[];for(let t of n[e])typeof t.clone==`function`?this.append(t.clone()):this.append(t)}else this[e]=n[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===` 165`?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}}return Em=o,o.default=o,Em}var km,Am;function jm(){if(Am)return km;Am=1;let e=Om();class t extends e{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}return km=t,t.default=t,km}var Mm,Nm;function Pm(){return Nm?Mm:(Nm=1,Mm={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}},Mm)}var Fm,Im;
165function Lm(){if(Im)return Fm;Im=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pm,{existsSync:n,readFileSync:r}=pm,{dirname:i,join:a}=pm;function o(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}class s{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new e(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return o(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(n,r){if(r===!1)return!1;if(r){if(typeof r==`string`)return r;if(typeof r==`function`){let e=r(n);if(e){let t=this.loadFile(e);if(!t)throw Error(`Unable to load previous source map: `+e.toString());return t}}else if(r instanceof e)return t.fromSourceMap(r).toString();else if(r instanceof t)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error(`Unsupported previous source map format: `+r.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return n&&(e=a(i(n),e)),this.loadFile(e)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Fm=s,s.default=s,Fm}var Rm,zm;function Bm(){if(zm)return Rm;zm=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pm,{fileURLToPath:n,pathToFileURL:r}=pm,{isAbsolute:i,resolve:a}=pm,{nanoid:o}
vendor: 6,807 bytes, lines 165-170
165=Pm(),s=pm,c=gm(),l=Lm(),u=Symbol(`fromOffsetCache`),d=!!(e&&t),f=!!(a&&i);class p{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===`￾`?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=a(t.from)),f&&d){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+o(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let a,o,s;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return a=l?new c(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):new c(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:s,line:o},this.css,this.file,i.plugin),a.input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(a.input.url=r(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,n;if(this[u])n=this[u];else{let e=this.css.split(` 166`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[u]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,a,o){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t,line:e});if(!c.source)return!1;let l;typeof a==`number`&&(l=s.originalPositionFor({column:o,line:a}));let u;u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let d={column:c.column,endColumn:l&&l.column,endLine:l&&l.line,line:c.line,url:u.toString()};if(u.protocol===`file:`)if(n)d.file=n(u);else throw Error(`file: protocol is not available in this PostCSS build`);let f=s.sourceContentFor(c.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return Rm=p,p.default=p,s&&s.registerInput&&s.registerInput(p),Rm}var Vm,Hm;function Um(){if(Hm)return Vm;Hm=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pm,{dirname:n,relative:r,resolve:i,sep:a}=pm,{pathToFileURL:o}=pm,s=Bm(),c=!!(e&&t),l=!!(n&&i&&r&&a);class u{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=` 167`;this.css.includes(`\r 168`)&&(t=`\r 169`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&=null):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css=``,this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(` 170`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?this.previous().length?this.previous().some(e=>e.annotation):!0:this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?this.previous().length?this.previous().some(e=>e.withContent()):!0:this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));
vendor: 4,998 bytes, line 170
170let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return Vm=u,Vm}var Wm,Gm;function Km(){if(Gm)return Wm;Gm=1;let e=Om();class t extends e{constructor(e){super(e),this.type=`comment`}}return Wm=t,t.default=t,Wm}var qm,Jm;function Ym(){if(Jm)return qm;Jm=1;let{isClean:e,my:t}=ym(),n=jm(),r=Km(),i=Om(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?`prepend`:!1,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}
vendor: 3,888 bytes, line 170
170replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},qm=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},qm}var Xm,Zm;function Qm(){if(Zm)return Xm;Zm=1;let e=Ym(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Xm=r,r.default=r,Xm}var $m,eh;function th(){if(eh)return $m;eh=1;let e={};return $m=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},$m}var nh,rh;function ih(){if(rh)return nh;rh=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return nh=e,e.default=e,nh}var ah,oh;function sh(){if(oh)return ah;oh=1;let e=ih();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return ah=t,t.default=t,ah}var ch,lh;function uh(){if(lh)return ch;lh=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return ch=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function T(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}
vendor: 4,493 bytes, lines 170-171
170case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1)if(s||a){l=y;break}else C(`bracket`);for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1)if(s||a){l=y+1;break}else C(`string`);for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l);break}return y++,_}function E(e){x.push(e)}return{back:E,endOfFile:w,nextToken:T,position:S}},ch}var dh,fh;function ph(){if(fh)return dh;fh=1;let e=Ym();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return dh=t,t.default=t,e.registerAtRule(t),dh}var mh,hh;function gh(){if(hh)return mh;hh=1;let e=Ym(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},mh=r,r.default=r,e.registerRoot(r),mh}var _h,vh;function yh(){if(vh)return _h;vh=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,` 171`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return _h=e,e.default=e,_h}var bh,xh;function Sh(){if(xh)return bh;xh=1;let e=Ym(),t=yh();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return bh=n,n.default=n,e.registerRule(n),bh}var Ch,wh;function Th(){if(wh)return Ch;wh=1;let e=jm(),t=uh(),n=Km(),r=ph(),i=gh(),a=Sh(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0)if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n===`{`){s=!0;break}else if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.no
vendor: 4,775 bytes, line 171
171des=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`)if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a;i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;)if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}else a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1];(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],!(c!==`space`&&c!==`comment`));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}else if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0)if(n===`;`)if(r){this.decl(s,o);return}else break;else if(n===`{`){this.rule(s);return}else if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}else n===`:`&&(r=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],!(c!==`space`&&c!==`comment`));)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>
vendor: 6,251 bytes, line 171
171e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],!(t!==`space`&&t!==`comment`));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],!(t!==`space`&&t!==`comment`));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return Ch=c,Ch}var Eh,Dh;function Oh(){if(Dh)return Eh;Dh=1;let e=Ym(),t=Th(),n=Bm();function r(e,r){let i=new t(new n(e,r));try{i.parse()}catch(e){throw e}return i.root}return Eh=r,r.default=r,e.registerParse(r),Eh}var kh,Ah;function jh(){if(Ah)return kh;Ah=1;let{isClean:e,my:t}=ym(),n=Um(),r=Tm(),i=Ym(),a=Qm();th();let o=sh(),s=Oh(),c=gh(),l={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return typeof e==`object`&&typeof e.then==`function`}function p(e){let t=!1,n=l[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function m(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:p(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function h(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>h(e)),t}let g={};class _{constructor(e,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))a=h(n);else if(n instanceof _||n instanceof o)a=h(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=s;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{a=e(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[t]&&i.rebuild(a)}this.result=new o(e,a,r),this.helpers={...g,postcss:g,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!u[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[n])if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let n=[m(t)];for(;n.length>0;){let e=this.visitTick(n);if(f(e))try{await e}catch(e){let t=n[n.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if(t.type===`document`){let e=t.nodes.map(e=>n(e,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new n(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type===`document`)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;
vendor: 5,334 bytes, lines 171-173
171if(f(e))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!==`root`&&r.type!==`document`&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[e,t]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=e;try{return t(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(n.iterator!==0){let i=n.iterator,a;for(;a=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!a[e]){a[e]=!0,t.push(m(a));return}n.iterator=0,delete r.indexes[i]}let a=n.events;for(;n.eventIndex<a.length;){let t=a[n.eventIndex];if(n.eventIndex+=1,t===0){r.nodes&&r.nodes.length&&(r[e]=!0,n.iterator=r.getIterator());return}else if(this.listeners[t]){n.visitors=this.listeners[t];return}}t.pop()}walkSync(t){t[e]=!0;let n=p(t);for(let r of n)if(r===0)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return`LazyResult`}}return _.registerPostcss=e=>{g=e},kh=_,_.default=_,c.registerLazyResult(_),a.registerLazyResult(_),kh}var Mh,Nh;function Ph(){if(Nh)return Mh;Nh=1;let e=Um(),t=Tm();th();let n=Oh(),r=sh();class i{constructor(n,i,a){i=i.toString(),this.stringified=!1,this._processor=n,this._css=i,this._opts=a,this._map=void 0;let o=t;this.result=new r(this._processor,void 0,this._opts),this.result.css=i;let s=this;Object.defineProperty(this.result,`root`,{get(){return s.root}});let c=new e(o,void 0,this._opts,i);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}}return Mh=i,i.default=i,Mh}var Fh,Ih;function Lh(){if(Ih)return Fh;Ih=1;let e=Ph(),t=jh(),n=Qm(),r=gh();class i{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(!(typeof n==`object`&&(n.parse||n.stringify)))throw Error(n+` is not a PostCSS plugin`);return t}process(n,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new e(this,n,r):new t(this,n,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Fh=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),Fh}var Rh,zh;function Bh(){if(zh)return Rh;zh=1;let e=jm(),t=Lm(),n=Km(),r=ph(),i=Bm(),a=gh(),o=Sh();function s(c,l){if(Array.isArray(c))return c.map(e=>s(e));let{inputs:u,...d}=c;if(u){l=[];for(let e of u){let n={...e,__proto__:i.prototype};n.map&&={...n.map,__proto__:t.prototype},l.push(n)}}if(d.nodes&&=c.nodes.map(e=>s(e,l)),d.source){let{inputId:e,...t}=d.source;d.source=t,e!=null&&(d.source.input=l[e])}if(d.type===`root`)return new a(d);if(d.type===`decl`)return new e(d);if(d.type===`rule`)return new o(d);if(d.type===`comment`)return new n(d);if(d.type===`atrule`)return new r(d);throw Error(`Unknown node type: `+c.type)}return Rh=s,s.default=s,Rh}var Vh,Hh;function Uh(){if(Hh)return Vh;Hh=1;let e=gm(),t=jm(),n=jh(),r=Ym(),i=Lh(),a=Tm(),o=Bh(),s=Qm(),c=ih(),l=Km(),u=ph(),d=sh(),f=Bm(),p=Oh(),m=yh(),h=Sh(),g=gh(),_=Om();function v(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return v.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: 172https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå: 173https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new i().version,a}let a;return Object.defineProperty(r,`postcss`,{get(){return a||=r(),a}}),r.process=function(e,t,n){return v([r(n)]).process(e,t)},r},v.stringify=a,v.parse=p,v.fromJSON=o,v.list=m,v.comment=e=>new l(e),v.atRule=e=>new u(e),v.decl=e=>new t(e),v.rule=e=>new h(e),v.root=e=>new g(e),v.document=e=>new s(e),v.CssSyntaxError=e,v.Declaration=t,v.Container=r,v.Processor=i,v.Document=s,v.Comment=l,v.Warning=c,v.AtRule=u,v.Result=d,v.Input=f,v.Rule=h,v.Root=g,v.Node=_,n.registerPostcss(v),Vh=v,v.default=v,Vh}var K=cm(Uh());
vendor: 13,081 bytes, lines 173-190
173K.stringify,K.fromJSON,K.plugin,K.parse,K.list,K.document,K.comment,K.atRule,K.rule,K.decl,K.root,K.CssSyntaxError,K.Declaration,K.Container,K.Processor,K.Document,K.Comment,K.Warning,K.AtRule,K.Result,K.Input,K.Rule,K.Root,K.Node;var Wh=Object.defineProperty,Gh=(e,t,n)=>t in e?Wh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kh=(e,t,n)=>Gh(e,typeof t==`symbol`?t:t+``,n);function qh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function Jh(e){if(Object.prototype.hasOwnProperty.call(e,`__esModule`))return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,`__esModule`,{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Yh={exports:{}},Xh;function Zh(){if(Xh)return Yh.exports;Xh=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Yh.exports=t(),Yh.exports.createColors=t,Yh.exports}var Qh=Jh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),$h,eg;function tg(){if(eg)return $h;eg=1;let e=Zh(),t=Qh;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+` 174 `+t+c(`^`)}return` `+l(r)+e}).join(` 175`)}toString(){let e=this.showSourceCode();return e&&=` 176 177`+e+` 178`,this.name+`: `+this.message+e}}return $h=n,n.default=n,$h}var ng={},rg;function ig(){return rg?ng:(rg=1,ng.isClean=Symbol(`isClean`),ng.my=Symbol(`my`),ng)}var ag,og;function sg(){if(og)return ag;og=1;let e={after:` 179`,beforeClose:` 180`,beforeComment:` 181`,beforeDecl:` 182`,beforeOpen:` `,beforeRule:` 183`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function t(e){return e[0].toUpperCase()+e.slice(1)}class n{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(` 184`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(n,r,i){let a;if(i||=r,r&&(a=n.raws[r],a!==void 0))return a;let o=n.parent;if(i===`before`&&(!o||o.type===`root`&&o.first===n||o&&o.type===`document`))return``;if(!o)return e[i];let s=n.root();if(s.rawCache||={},s.rawCache[i]!==void 0)return s.rawCache[i];if(i===`before`||i===`after`)return this.beforeAfter(n,i);{let e=`raw`+t(i);this[e]?a=this[e](s,n):s.walk(e=>{if(a=e.raws[r],a!==void 0)return!1})}return a===void 0&&(a=e[i]),s.rawCache[i]=a,a}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(` 185`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(` 186`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(` 187`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(` 188`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(` 189`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}}return ag=n,n.default=n,ag}var cg,lg;function ug(){if(lg)return cg;lg=1;let e=sg();function t(t,n){new e(n).stringify(t)}return cg=t,t.default=t,cg}var dg,fg;function pg(){if(fg)return dg;fg=1;let{isClean:e,my:t}=ig(),n=tg(),r=sg(),i=ug();function a(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],o=typeof i;r===`parent`&&o===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>a(e,n)):(o===`object`&&i!==null&&(i=a(i)),n[r]=i)}return n}class o{constructor(n={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in n)if(e===`nodes`){this.nodes=[];for(let t of n[e])typeof t.clone==`function`?this.append(t.clone()):this.append(t)}else this[e]=n[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===` 190`?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}}return dg=o,o.default=o,dg}var mg,hg;function gg(){if(hg)return mg;hg=1;let e=pg();class t extends e{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}return mg=t,t.default=t,mg}var _g,vg;function yg(){return vg?_g:(vg=1,_g={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}},_g)}var bg,xg;function Sg(){if(xg)return bg;xg=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Qh,{existsSync:n,readFileSync:r}=Qh,{dirname:i,join:a}=Qh;function o(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}class s{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new e(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return o(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);
190if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(n,r){if(r===!1)return!1;if(r){if(typeof r==`string`)return r;if(typeof r==`function`){let e=r(n);if(e){let t=this.loadFile(e);if(!t)throw Error(`Unable to load previous source map: `+e.toString());return t}}else if(r instanceof e)return t.fromSourceMap(r).toString();else if(r instanceof t)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error(`Unsupported previous source map format: `+r.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return n&&(e=a(i(n),e)),this.loadFile(e)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return bg=s,s.default=s,bg}var Cg,wg;function Tg(){if(wg)return Cg;wg=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Qh,{fileURLToPath:n,pathToFileURL:r}=Qh,{isAbsolute:i,resolve:a}=Qh,{nanoid:o}
vendor: 6,807 bytes, lines 190-195
190=yg(),s=Qh,c=tg(),l=Sg(),u=Symbol(`fromOffsetCache`),d=!!(e&&t),f=!!(a&&i);class p{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===`￾`?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=a(t.from)),f&&d){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+o(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let a,o,s;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return a=l?new c(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):new c(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:s,line:o},this.css,this.file,i.plugin),a.input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(a.input.url=r(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,n;if(this[u])n=this[u];else{let e=this.css.split(` 191`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[u]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,a,o){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t,line:e});if(!c.source)return!1;let l;typeof a==`number`&&(l=s.originalPositionFor({column:o,line:a}));let u;u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let d={column:c.column,endColumn:l&&l.column,endLine:l&&l.line,line:c.line,url:u.toString()};if(u.protocol===`file:`)if(n)d.file=n(u);else throw Error(`file: protocol is not available in this PostCSS build`);let f=s.sourceContentFor(c.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return Cg=p,p.default=p,s&&s.registerInput&&s.registerInput(p),Cg}var Eg,Dg;function Og(){if(Dg)return Eg;Dg=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Qh,{dirname:n,relative:r,resolve:i,sep:a}=Qh,{pathToFileURL:o}=Qh,s=Tg(),c=!!(e&&t),l=!!(n&&i&&r&&a);class u{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=` 192`;this.css.includes(`\r 193`)&&(t=`\r 194`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&=null):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css=``,this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(` 195`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?this.previous().length?this.previous().some(e=>e.annotation):!0:this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?this.previous().length?this.previous().some(e=>e.withContent()):!0:this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));
vendor: 4,998 bytes, line 195
195let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return Eg=u,Eg}var kg,Ag;function jg(){if(Ag)return kg;Ag=1;let e=pg();class t extends e{constructor(e){super(e),this.type=`comment`}}return kg=t,t.default=t,kg}var Mg,Ng;function Pg(){if(Ng)return Mg;Ng=1;let{isClean:e,my:t}=ig(),n=gg(),r=jg(),i=pg(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?`prepend`:!1,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}
vendor: 3,888 bytes, line 195
195replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},Mg=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},Mg}var Fg,Ig;function Lg(){if(Ig)return Fg;Ig=1;let e=Pg(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Fg=r,r.default=r,Fg}var Rg,zg;function Bg(){if(zg)return Rg;zg=1;let e={};return Rg=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},Rg}var Vg,Hg;function Ug(){if(Hg)return Vg;Hg=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return Vg=e,e.default=e,Vg}var Wg,Gg;function Kg(){if(Gg)return Wg;Gg=1;let e=Ug();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return Wg=t,t.default=t,Wg}var qg,Jg;function Yg(){if(Jg)return qg;Jg=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return qg=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function T(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}
vendor: 4,493 bytes, lines 195-196
195case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1)if(s||a){l=y;break}else C(`bracket`);for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1)if(s||a){l=y+1;break}else C(`string`);for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l);break}return y++,_}function E(e){x.push(e)}return{back:E,endOfFile:w,nextToken:T,position:S}},qg}var Xg,Zg;function Qg(){if(Zg)return Xg;Zg=1;let e=Pg();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Xg=t,t.default=t,e.registerAtRule(t),Xg}var $g,e_;function t_(){if(e_)return $g;e_=1;let e=Pg(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},$g=r,r.default=r,e.registerRoot(r),$g}var n_,r_;function i_(){if(r_)return n_;r_=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,` 196`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return n_=e,e.default=e,n_}var a_,o_;function s_(){if(o_)return a_;o_=1;let e=Pg(),t=i_();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return a_=n,n.default=n,e.registerRule(n),a_}var c_,l_;function u_(){if(l_)return c_;l_=1;let e=gg(),t=Yg(),n=jg(),r=Qg(),i=t_(),a=s_(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0)if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n===`{`){s=!0;break}else if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.no
vendor: 4,775 bytes, line 196
196des=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`)if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a;i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;)if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}else a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1];(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],!(c!==`space`&&c!==`comment`));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}else if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0)if(n===`;`)if(r){this.decl(s,o);return}else break;else if(n===`{`){this.rule(s);return}else if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}else n===`:`&&(r=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],!(c!==`space`&&c!==`comment`));)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>
vendor: 6,251 bytes, line 196
196e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],!(t!==`space`&&t!==`comment`));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],!(t!==`space`&&t!==`comment`));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return c_=c,c_}var d_,f_;function p_(){if(f_)return d_;f_=1;let e=Pg(),t=u_(),n=Tg();function r(e,r){let i=new t(new n(e,r));try{i.parse()}catch(e){throw e}return i.root}return d_=r,r.default=r,e.registerParse(r),d_}var m_,h_;function g_(){if(h_)return m_;h_=1;let{isClean:e,my:t}=ig(),n=Og(),r=ug(),i=Pg(),a=Lg();Bg();let o=Kg(),s=p_(),c=t_(),l={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return typeof e==`object`&&typeof e.then==`function`}function p(e){let t=!1,n=l[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function m(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:p(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function h(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>h(e)),t}let g={};class _{constructor(e,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))a=h(n);else if(n instanceof _||n instanceof o)a=h(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=s;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{a=e(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[t]&&i.rebuild(a)}this.result=new o(e,a,r),this.helpers={...g,postcss:g,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!u[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[n])if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let n=[m(t)];for(;n.length>0;){let e=this.visitTick(n);if(f(e))try{await e}catch(e){let t=n[n.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if(t.type===`document`){let e=t.nodes.map(e=>n(e,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new n(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type===`document`)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;
vendor: 4,298 bytes, line 196
196if(f(e))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!==`root`&&r.type!==`document`&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[e,t]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=e;try{return t(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(n.iterator!==0){let i=n.iterator,a;for(;a=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!a[e]){a[e]=!0,t.push(m(a));return}n.iterator=0,delete r.indexes[i]}let a=n.events;for(;n.eventIndex<a.length;){let t=a[n.eventIndex];if(n.eventIndex+=1,t===0){r.nodes&&r.nodes.length&&(r[e]=!0,n.iterator=r.getIterator());return}else if(this.listeners[t]){n.visitors=this.listeners[t];return}}t.pop()}walkSync(t){t[e]=!0;let n=p(t);for(let r of n)if(r===0)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return`LazyResult`}}return _.registerPostcss=e=>{g=e},m_=_,_.default=_,c.registerLazyResult(_),a.registerLazyResult(_),m_}var __,v_;function y_(){if(v_)return __;v_=1;let e=Og(),t=ug();Bg();let n=p_(),r=Kg();class i{constructor(n,i,a){i=i.toString(),this.stringified=!1,this._processor=n,this._css=i,this._opts=a,this._map=void 0;let o=t;this.result=new r(this._processor,void 0,this._opts),this.result.css=i;let s=this;Object.defineProperty(this.result,`root`,{get(){return s.root}});let c=new e(o,void 0,this._opts,i);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}}return __=i,i.default=i,__}var b_,x_;function S_(){if(x_)return b_;x_=1;let e=y_(),t=g_(),n=Lg(),r=t_();class i{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(!(typeof n==`object`&&(n.parse||n.stringify)))throw Error(n+` is not a PostCSS plugin`);return t}process(n,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new e(this,n,r):new t(this,n,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return b_=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),b_}var C_,w_;function T_(){if(w_)return C_;w_=1;let e=gg(),t=Sg(),n=jg(),r=Qg(),i=Tg(),a=t_(),o=s_();function s(c,l){if(Array.isArray(c))return c.map(e=>s(e));let{inputs:u,...d}=c;if(u){l=[];for(let e of u){let n={...e,__proto__:i.prototype};n.map&&={...n.map,__proto__:t.prototype},l.push(n)}}if(d.nodes&&=c.nodes.map(e=>s(e,l)),d.source){let{inputId:e,...t}=d.source;d.source=t,e!=null&&(d.source.input=l[e])}if(d.type===`root`)return new a(d);if(d.type===`decl`)return new e(d);if(d.type===`rule`)return new o(d);if(d.type===`comment`)return new n(d);if(d.type===`atrule`)return new r(d);throw Error(`Unknown node type: `+c.type)}return C_=s,s.default=s,C_}var E_,D_;function O_(){if(D_)return E_;D_=1;let e=tg(),t=gg(),n=g_(),r=Pg(),i=S_(),a=ug(),o=T_(),s=Lg(),c=Ug(),l=jg(),u=Qg(),d=Kg(),f=Tg(),p=p_(),m=i_(),h=s_(),g=t_(
196),_=pg();function v(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return v.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: 197https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå: 198https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new i().version,a}let a;return Object.defineProperty(r,`postcss`,{get(){return a||=r(),a}}),r.process=function(e,t,n){return v([r(n)]).process(e,t)},r},v.stringify=a,v.parse=p,v.fromJSON=o,v.list=m,v.comment=e=>new l(e),v.atRule=e=>new u(e),v.decl=e=>new t(e),v.rule=e=>new h(e),v.root=e=>new g(e),v.document=e=>new s(e),v.CssSyntaxError=e,v.Declaration=t,v.Container=r,v.Processor=i,v.Document=s,v.Comment=l,v.Warning=c,v.AtRule=u,v.Result=d,v.Input=f,v.Rule=h,v.Root=g,v.Node=_,n.registerPostcss(v),E_=v,v.default=v,E_}var q=qh(O_());q.stringify,q.fromJSON,q.plugin,q.parse,q.list,q.document,q.comment,q.atRule,q.rule,q.decl,q.root,q.CssSyntaxError,q.Declaration,q.Container,q.Processor,q.Document,q.Comment,q.Warning,q.AtRule,q.Result,q.Input,q.Rule,q.Root,q.Node;var k_=class e{constructor(...e){Kh(this,`parentElement`,null),Kh(this,`parentNode`,null),Kh(this,`ownerDocument`),Kh(this,`firstChild`,null),Kh(this,`lastChild`,null),Kh(this,`previousSibling`,null),Kh(this,`nextSibling`,null),Kh(this,`ELEMENT_NODE`,1),Kh(this,`TEXT_NODE`,3),Kh(this,`nodeType`),Kh(this,`nodeName`),Kh(this,`RRNodeType`)}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e)||t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`)}insertBefore(e,t){throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`)}removeChild(e){throw Error(`RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`)}toString(){return`RRNode`}},A_={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},j_={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},M_={};function N_(e){var t;let n=((t=globalThis==null?void 0:globalThis.Zone)?.__symbol__)?.call(t,e);if(n&&globalThis[n])return globalThis[n]}function P_(e){if(M_[e])return M_[e];let t=N_(e)||globalThis[e],n=t.prototype,r=e in A_?A_[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in j_?j_[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o)return M_[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;return document.body.removeChild(r),a?M_[e]=a:n}catch{return n}}var F_={};function I_(e,t,n){let r=`${e}.${String(n)}`;if(F_[r])return F_[r].call(t);let i=P_(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?(F_[r]=a,a.call(t)):t[n]}var L_={};function R_(e,t,n){let r=`${e}.${String(n)}`;if(L_[r])return L_[r].bind(t);let i=P_(e)[n];return typeof i==`function`?(L_[r]=i,i.bind(t)):t[n]}function z_(e){return I_(`Node`,e,`childNodes`)}function B_(e){return I_(`Node`,e,`parentNode`)}function V_(e){return I_(`Node`,e,`parentElement`)}function H_(e){return I_(`Node`,e,`textContent`)}function U_(e,t){return R_(`Node`,e,`contains`)(t)}function W_(e){return R_(`Node`,e,`getRootNode`)()}function G_(e){return!e||!(`host`in e)?null:I_(`ShadowRoot`,e,`host`)}function K_(e){return e.styleSheets}function q_(e){return!e||!(`shadowRoot`in e)?null:I_(`Element`,e,`shadowRoot`)}function J_(e,t){return I_(`Element`,e,`querySelector`)(t)}function Y_(e,t){return I_(`Element`,e,`querySelectorAll`)(t)}function X_(){return P_(`MutationObserver`).constructor}var J={childNodes:z_,parentNode:B_,parentElement:V_,textContent:H_,contains:U_,getRootNode:W_,host:G_,styleSheets:K_,shadowRoot:q_,querySelector:J_,querySelectorAll:Y_,mutationObserver:X_};function Z_(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Q_=`Please stop import mirror directly. Instead of that,\r
199now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 200or you can use record.mirror to access the mirror instance during recording.`,$_={map:{},getId(){return console.error(Q_),-1},getNode(){return console.error(Q_),null},removeNodeFromMap(){console.error(Q_)},has(){return console.error(Q_),!1},reset(){console.error(Q_)}};typeof window<`u`&&window.Proxy&&window.Reflect&&($_=new Proxy($_,{get(e,t,n){return t===`map`&&console.error(Q_),Reflect.get(e,t,n)}}));function ev(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(clearTimeout(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function tv(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>tv(e,t,a||{},!0)}function nv(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var rv=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(rv=()=>new Date().getTime());function iv(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t.documentElement.scrollLeft||t?.body&&J.parentElement(t.body)?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body&&J.parentElement(t.body)?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function av(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ov(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function sv(e){return e?e.nodeType===e.ELEMENT_NODE?e:J.parentElement(e):null}function cv(e,t,n,r){if(!e)return!1;let i=sv(e);if(!i)return!1;try{if(typeof t==`string`){if(i.classList.contains(t)||r&&i.closest(`.`+t)!==null)return!0}else if(Zp(i,t,r))return!0}catch{}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function lv(e,t){return t.getId(e)!==-1}function uv(e,t,n){return e.tagName===`TITLE`&&n.headTitleMutations?!0:t.getId(e)===Ip}function dv(e,t){if(sp(e))return!1;let n=t.getId(e);if(!t.has(n))return!0;let r=J.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:r?dv(r,t):!0}function fv(e){return!!e.changedTouches}function pv(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function mv(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function hv(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function gv(e){return e?e instanceof k_&&`shadowRoot`in e?!!e.shadowRoot:!!J.shadowRoot(e):!1}var _v=class{constructor(){W(this,`id`,1),W(this,`styleIDMap`,new WeakMap),W(this,`idStyleMap`,new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function vv(e){let t=null;return`getRootNode`in e&&J.getRootNode(e)?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&J.host(J.getRootNode(e))&&(t=J.host(J.getRootNode(e))),t}function yv(e){let t=e,n;for(;n=vv(t);)t=n;return t}function bv(e){let t=e.ownerDocument;if(!t)return!1;let n=yv(e);return J.contains(t,n)}function xv(e){let t=e.ownerDocument;return t?J.contains(t,e)||bv(e):!1}var Y=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Y||{}),X=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(X||{}),Sv=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(Sv||{}),Cv=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(Cv||{}),wv=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(wv||{}),Tv=(e=>(e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e))(Tv||{}),Ev=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(Ev||{});function Dv(e){return`__ln`in e}var Ov=class{constructor(){W(this,`length`,0),W(this,`head`,null),W(this,`tail`,null)}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Dv(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&
vendor: 13,039 bytes, line 200
200(n.previous=t)}else if(e.nextSibling&&Dv(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},kv=(e,t)=>`${e}@${t}`,Av=class{constructor(){W(this,`frozen`,!1),W(this,`locked`,!1),W(this,`texts`,[]),W(this,`attributes`,[]),W(this,`attributeMap`,new WeakMap),W(this,`removes`,[]),W(this,`mapRemoves`,[]),W(this,`movedMap`,{}),W(this,`addedSet`,new Set),W(this,`movedSet`,new Set),W(this,`droppedSet`,new Set),W(this,`removesSubTreeCache`,new Set),W(this,`mutationCb`),W(this,`blockClass`),W(this,`blockSelector`),W(this,`maskTextClass`),W(this,`maskTextSelector`),W(this,`inlineStylesheet`),W(this,`maskInputOptions`),W(this,`maskTextFn`),W(this,`maskInputFn`),W(this,`keepIframeSrcFn`),W(this,`recordCanvas`),W(this,`inlineImages`),W(this,`slimDOMOptions`),W(this,`dataURLOptions`),W(this,`doc`),W(this,`mirror`),W(this,`iframeManager`),W(this,`stylesheetManager`),W(this,`shadowDomManager`),W(this,`canvasManager`),W(this,`processedNodeManager`),W(this,`unattachedDoc`),W(this,`processMutations`,e=>{e.forEach(this.processMutation),this.emit()}),W(this,`emit`,()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new Ov,r=e=>{let t=e,n=Ip;for(;n===Ip;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{let a=J.parentNode(i);if(!a||!xv(i))return;let o=!1;if(i.nodeType===Node.TEXT_NODE){let e=a.tagName;if(e===`TEXTAREA`)return;e===`STYLE`&&this.addedSet.has(a)&&(o=!0)}let s=sp(a)?this.mirror.getId(vv(i)):this.mirror.getId(a),c=r(i);if(s===-1||c===-1)return n.addNode(i);let l=om(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{mv(e,this.mirror)&&this.iframeManager.addIframe(e),hv(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),gv(i)&&this.shadowDomManager.addShadowRoot(J.shadowRoot(i),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});l&&(e.push({parentId:s,nextId:c,node:l}),t.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)Nv(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(J.parentNode(e))||i(e);for(let e of this.addedSet)!Fv(this.droppedSet,e)&&!Nv(this.removesSubTreeCache,e,this.mirror)||Fv(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(J.parentNode(a.value)),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(J.parentNode(n.value));if(r(n.value)===-1)continue;if(t!==-1){e=n;break}else{let t=n.value,r=J.parentNode(t);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let t=J.host(r);if(this.mirror.getId(t)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>{let t=e.node,n=J.parentNode(t);return n&&n.tagName===`TEXTAREA`&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(o))}),W(this,`genTextAreaValueMutation`,e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let n=Array.from(J.childNodes(e),e=>J.textContent(e)||``).join(``);t.attributes.value=vp({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Sp(e),value:n,maskInputFn:this.maskInputFn})}),W(this,`processMutation`,e=>{if(!uv(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case`characterData`:{let t=J.textContent(e.target);!cv(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Qp(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,sv(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let e=Sp(t);r=vp({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:r,maskInputFn:this.maskInputFn})}if(cv(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r))if(!t.contentDocument)n=`rr_src`;else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!Yp(t.tagName,n))if(i.attributes[n]=Jp(this.doc,yp(t.tagName),yp(n),r),n===`style`){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement(`span`);e.oldValue&&n.setAttribute(`style`,e.oldValue);for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||a!==n.style.getPropertyPriority(e)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}for(let e of Array.from(n.style))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}else n===`open`&&t.tagName===`DIALOG`&&(t.matches(`dialog:modal`)?i.attributes.rr_open_mode=`modal`:i.attributes.rr_open_mode=`non-modal`);break}case`childList`:if(cv(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName===`TEXTAREA`){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=sp(e.target)?this.mirror.getId(J.host(e.target)):this.mirror.getId(e.target);cv(e.target,this.blockClass,this.blockSelector,!1)||uv(t,this.mirror,this.slimDOMOptions)||!lv(t,this.mirror)||(this.addedSet.has(t)?(jv(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||dv(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[kv(n,r)]?jv(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:sp(e.target)&&cp(e.target)?!0:void 0}),Mv(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}),W(this,`genAdds`,(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(uv(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[kv(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);cv(e,this.blockClass,this.blockSelector,!1)||(J.childNodes(e).forEach(e=>this.genAdds(e)),gv(e)&&J.childNodes(J.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){[`mutationCb`,`blockClass`,`blockSelector`,`maskTextClass`,`maskTextSelector`,`inlineStylesheet`,`maskInputOptions`,`maskTextFn`,`maskInputFn`,`keepIframeSrcFn`,`recordCanvas`,`inlineImages`,`slimDOMOptions`,`dataURLOptions`,`doc`,`mirror`,`iframeManager`,`stylesheetManager`,`shadowDomManager`,`canvasManager`,`processedNodeManager`].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function jv(e,t){e.delete(t),J.childNodes(t).forEach(t=>jv(e,t))}function Mv(e,t){let n=[e];for(;n.length;){let e=n.pop();t.has(e)||(t.add(e),J.childNodes(e).forEach(e=>n.push(e)))}}function Nv(e,t,n){return e.size===0?!1:Pv(e,t)}function Pv(e,t,n){let r=J.parentNode(t);return r?e.has(r):!1}function Fv(e,t){return e.size===0?!1:Iv(e,t)}function Iv(e,t){let n=J.parentNode(t);return n?e.has(n)?!0:Iv(e,n):!1}var Lv;function Rv(e){Lv=e}function zv(){Lv=void 0}var Z=e=>Lv?((...t)=>{try{return e(...t)}catch(e){if(Lv&&Lv(e)===!0)return;throw e}}):e;function Bv(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}var Vv=[];function Hv(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Uv(e,t){let n=new Av;Vv.push(n),n.init(e);let r=new(X_())(Z(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Wv({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=ev(Z(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=Z(ev(Z(e=>{let t=Hv(e),{clientX:n,clientY:i}=fv(e)?e.changedTouches[0]:e;s||=rv(),o.push({x:n,y:i,id:r.getId(t),timeOffset:rv()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?X.Drag:e instanceof MouseEvent?X.MouseMove:X.TouchMove)}),i,{trailing:!1})),u=[Z_(`mousemove`,l,n),Z_(`touchmove`,l,n),Z_(`drag`,l,n)];return Z(()=>{u.forEach(e=>e())})}function Gv({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};let o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,s=[],c=null,l=t=>a=>{let o=Hv(a);if(cv(o,r,i,!0))return;let s=null,l=t;if(`pointerType`in a){switch(a.pointerType){case`mouse`:s=Cv.Mouse;break;case`touch`:s=Cv.Touch;break;case`pen`:s=Cv.Pen;break}s===Cv.Touch?Sv[t]===Sv.MouseDown?l=`TouchStart`:Sv[t]===Sv.MouseUp&&(l=`TouchEnd`):Cv.Pen}else fv(a)&&(s=Cv.Touch);s===null?Sv[t]===Sv.Click&&(s=c,c=null):(c=s,(l.startsWith(`Touch`)&&s===Cv.Touch||l.startsWith(`Mouse`)&&s===Cv.Mouse)&&(s=null));let u=fv(a)?a.changedTouches[0]:a;if(!u)return;let d=n.getId(o),{clientX:f,clientY:p}=u;Z(e)({type:Sv[l],id:d,x:f,y:p,...s!==null&&{pointerType:s}})};return Object.keys(Sv).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&o[e]!==!1).forEach(e=>{let n=yp(e),r=l(e);if(window.PointerEvent)switch(Sv[e]){case Sv.MouseDown:case Sv.MouseUp:n=n.replace(`mouse`,`pointer`);break;case Sv.TouchStart:case Sv.TouchEnd:return}s.push(Z_(n,r,t))}),Z(()=>{s.forEach(e=>e())})}function Kv({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:a}){return Z_(`scroll`,Z(ev(Z(a=>{let o=Hv(a);if(!o||cv(o,r,i,!0))return;let s=n.getId(o);if(o===t&&t.defaultView){let n=iv(t.defaultView);e({id:s,x:n.left,y:n.top})}else e({id:s,x:o.scrollLeft,y:o.scrollTop})}),a.scroll||100)),t)}function qv({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Z_(`resize`,Z(ev(Z(()=>{let t=av(),i=ov();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var Jv=[`INPUT`,`TEXTAREA`,`SELECT`],Yv=new WeakMap;function Xv({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:s,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function d(e){let n=Hv(e),l=e.isTrusted,d=n&&n.tagName;if(n&&d===`OPTION`&&(n=J.parentElement(n)),!n||!d||Jv.indexOf(d)<0||cv(n,r,i,!0)||n.classList.contains(a)||o&&n.matches(o))return;let p=n.value,m=!1,h=Sp(n)||``;h===`radio`||h===`checkbox`?m=n.checked:(s[d.toLowerCase()]||s[h])&&(p=vp({element:n,maskInputOptions:s,tagName:d,type:h,value:p,maskInputFn:c})),f(n,u?{text:p,isChecked:m,userTriggered:l}:{text:p,isChecked:m});let g=n.name;h===`radio`&&g&&m&&t.querySelectorAll(`input[type="radio"][name="${g}
200"]`).forEach(e=>{if(e!==n){let t=e.value;f(e,u?{text:t,isChecked:!m,userTriggered:!1}:{text:t,isChecked:!m})}})}function f(t,r){let i=Yv.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){Yv.set(t,r);let i=n.getId(t);Z(e)({...r,id:i})}}let p=(l.input===`last`?[`change`]:[`input`,`change`]).map(e=>Z_(e,Z(d),t)),m=t.defaultView;if(!m)return()=>{p.forEach(e=>e())};let h=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,`value`),g=[[m.HTMLInputElement.prototype,`value`],[m.HTMLInputElement.prototype,`checked`],[m.HTMLSelectElement.prototype,`value`],[m.HTMLTextAreaElement.prototype,`value`],[m.HTMLSelectElement.prototype,`selectedIndex`],[m.HTMLOptionElement.prototype,`selected`]];return h&&h.set&&p.push(...g.map(e=>tv(e[0],e[1],{set(){Z(d)({target:this,isTrusted:!1})}},!1,m))),Z(()=>{p.forEach(e=>e())})}function Zv(e){let t=[];function n(e,t){if(cy(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||cy(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||cy(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||cy(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function Qv(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function $v({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=Qv(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),Bv(()=>r.apply(i,a))()})}),r.CSSStyleSheet.prototype.addRule=function(e,t,n=this.cssRules.length){let i=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[i,n])};let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Qv(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),Bv(()=>r.apply(i,a))()})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Qv(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Qv(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};ly(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(ly(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),ly(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),ly(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=Qv(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...Zv(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Qv(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...Zv(i),o]}]}),r.apply(i,a)})})}),Z(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function ey({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(J.host(n));let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,`adoptedStyleSheets`,{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),Z(()=>{Object.defineProperty(n,`adoptedStyleSheets`,{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function ty({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Z((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=Qv(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:Zv(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Z((i,a,s)=>{let[c]=s;
vendor: 3,104 bytes, line 200
200if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=Qv(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:Zv(a.parentRule)}),i.apply(a,s)})}),Z(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function ny({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:i,doc:a}){let o=Z(a=>ev(Z(i=>{let o=Hv(i);if(!o||cv(o,t,n,!0))return;let{currentTime:s,volume:c,muted:l,playbackRate:u,loop:d}=o;e({type:a,id:r.getId(o),currentTime:s,volume:c,muted:l,playbackRate:u,loop:d})}),i.media||500)),s=[Z_(`play`,o(Tv.Play),a),Z_(`pause`,o(Tv.Pause),a),Z_(`seeked`,o(Tv.Seeked),a),Z_(`volumechange`,o(Tv.VolumeChange),a),Z_(`ratechange`,o(Tv.RateChange),a)];return Z(()=>{s.forEach(e=>e())})}function ry({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=nv(t.fonts,`add`,function(t){return function(n){return setTimeout(Z(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),Z(()=>{r.forEach(e=>e())})}function iy(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,selectionCb:a}=e,o=!0,s=Z(()=>{let e=t.getSelection();if(!e||o&&e?.isCollapsed)return;o=e.isCollapsed||!1;let s=[],c=e.rangeCount||0;for(let t=0;t<c;t++){let{startContainer:a,startOffset:o,endContainer:c,endOffset:l}=e.getRangeAt(t);cv(a,r,i,!0)||cv(c,r,i,!0)||s.push({start:n.getId(a),startOffset:o,end:n.getId(c),endOffset:l})}a({ranges:s})});return s(),Z_(`selectionchange`,s)}function ay({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:nv(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return e.apply(this,[n,r,i])}})}function oy(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:s,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:f,selectionCb:p,customElementCb:m}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),i(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),a(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),s(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),l(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),f(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)}
200,e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),m(...e)}}function sy(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};oy(e,t);let r;e.recordDOM&&(r=Uv(e,e.doc));let i=Wv(e),a=Gv(e),o=Kv(e),s=qv(e,{win:n}),c=Xv(e),l=ny(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=$v(e,{win:n}),d=ey(e,e.doc),f=ty(e,{win:n}),e.collectFonts&&(p=ry(e)));let m=iy(e),h=ay(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Z(()=>{Vv.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function cy(e){return window[e]!==void 0}function ly(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}for(var uy=class{constructor(e){W(this,`iframeIdToRemoteIdMap`,new WeakMap),W(this,`iframeRemoteIdToIdMap`,new WeakMap),this.generateIdFn=e}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
vendor: 14,821 bytes, lines 200-275
200getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},dy=class{constructor(e){W(this,`iframes`,new WeakMap),W(this,`crossOriginIframeMap`,new WeakMap),W(this,`crossOriginIframeMirror`,new uy(Lp)),W(this,`crossOriginIframeStyleMirror`),W(this,`crossOriginIframeRootIdMap`,new WeakMap),W(this,`mirror`),W(this,`mutationCb`),W(this,`wrappedEmit`),W(this,`loadListener`),W(this,`stylesheetManager`),W(this,`recordCrossOriginIframes`),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new uy(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener(`message`,this.handleMessage.bind(this))),(r=this.loadListener)==null||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case Y.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Y.IncrementalSnapshot,data:{source:X.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return t;case Y.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case Y.IncrementalSnapshot:switch(t.data.source){case X.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.Drag:case X.TouchMove:case X.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.ViewportResize:return!1;case X.MediaInteraction:case X.MouseInteraction:case X.Scroll:case X.CanvasMutation:case X.Input:return this.replaceIds(t.data,e,[`id`]),t;case X.StyleSheetRule:case X.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case X.Font:return t;case X.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case X.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),(n=t.data.styles)==null||n.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)!Array.isArray(t[i])&&typeof t[i]!=`number`||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==Ev.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},fy=class{constructor(e){W(this,`shadowDoms`,new WeakSet),W(this,`mutationCb`),W(this,`scrollCb`),W(this,`bypassOptions`),W(this,`mirror`),W(this,`restoreHandlers`,[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!cp(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=Uv({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Kv({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(J.host(e))),this.restoreHandlers.push(ey({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(nv(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r),a=J.shadowRoot(this);return a&&xv(this)&&n.addShadowRoot(a,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},py=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,my=typeof Uint8Array>`u`?[]:new Uint8Array(256),hy=0;hy<py.length;hy++)my[py.charCodeAt(hy)]=hy;var gy=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=py[t[n]>>2],i+=py[(t[n]&3)<<4|t[n+1]>>4],i+=py[(t[n+1]&15)<<2|t[n+2]>>6],i+=py[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},_y=new Map;function vy(e,t){let n=_y.get(e);return n||(n=new Map,_y.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var yy=(e,t,n)=>{if(!e||!(Sy(e,t)||typeof e==`object`))return;let r=e.constructor.name,i=vy(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function by(e,t,n){if(e instanceof Array)return e.map(e=>by(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:gy(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[by(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}else if(e instanceof HTMLCanvasElement)return{rr_type:`HTMLImageElement`,src:e.toDataURL()};else if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[by(e.data,t,n),e.width,e.height]};else if(Sy(e,t)||typeof e==`object`)return{rr_type:e.constructor.name,index:yy(e,t,n)};return e}var xy=(e,t,n)=>e.map(e=>by(e,t,n)),Sy=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function Cy(e,t,n,r){let i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!=`function`)continue;let a=nv(t.CanvasRenderingContext2D.prototype,o,function(i){return function(...a){return cv(this.canvas,n,r,!0)||setTimeout(()=>{let n=xy(a,t,this);e(this.canvas,{type:wv[`2D`],property:o,args:n})},0),i.apply(this,a)}});i.push(a)}catch{let n=tv(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:wv[`2D`],property:o,args:[t],setter:!0})}});i.push(n)}return()=>{i.forEach(e=>e())}}function wy(e){return e===`experimental-webgl`?`webgl`:e}function Ty(e,t,n,r){let i=[];try{let a=nv(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(i,...a){if(!cv(this,t,n,!0)){let e=wy(i);if(`__context`in this||(this.__context=e),r&&[`webgl`,`webgl2`].includes(e))if(a[0]&&typeof a[0]==`object`){let e=a[0];e.preserveDrawingBuffer||=!0}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i,...a])}});i.push(a)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{i.forEach(e=>e())}}function Ey(e,t,n,r,i,a){let o=[],s=Object.getOwnPropertyNames(e);for(let c of s)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(c))try{if(typeof e[c]!=`function`)continue;let s=nv(e,c,function(e){return function(...o){let s=e.apply(this,o);if(yy(s,a,this),`tagName`in this.canvas&&!cv(this.canvas,r,i,!0)){let e={type:t,property:c,args:xy(o,a,this)};n(this.canvas,e)}return s}});o.push(s)}catch{let r=tv(e,c,{set(e){n(this.canvas,{type:t,property:c,args:[e],setter:!0})}});o.push(r)}return o}function Dy(e,t,n,r){let i=[];return i.push(...Ey(t.WebGLRenderingContext.prototype,wv.WebGL,e,n,r,t)),t.WebGL2RenderingContext!==void 0&&i.push(...Ey(t.WebGL2RenderingContext.prototype,wv.WebGL2,e,n,r,t)),()=>{i.forEach(e=>e())}}var Oy=`(function() { 201 "use strict"; 202 var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 203 var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); 204 for (var i = 0; i < chars.length; i++) { 205 lookup[chars.charCodeAt(i)] = i; 206 } 207 var encode = function(arraybuffer) { 208 var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = ""; 209 for (i2 = 0; i2 < len; i2 += 3) { 210 base64 += chars[bytes[i2] >> 2]; 211 base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4]; 212 base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6]; 213 base64 += chars[bytes[i2 + 2] & 63]; 214 } 215 if (len % 3 === 2) { 216 base64 = base64.substring(0, base64.length - 1) + "="; 217 } else if (len % 3 === 1) { 218 base64 = base64.substring(0, base64.length - 2) + "=="; 219 } 220 return base64; 221 }; 222 const lastBlobMap = /* @__PURE__ */ new Map(); 223 const transparentBlobMap = /* @__PURE__ */ new Map(); 224 async function getTransparentBlobFor(width, height, dataURLOptions) { 225 const id = \`\${width}-\${height}\`; 226 if ("OffscreenCanvas" in globalThis) { 227 if (transparentBlobMap.has(id)) return transparentBlobMap.get(id); 228 const offscreen = new OffscreenCanvas(width, height); 229 offscreen.getContext("2d"); 230 const blob = await offscreen.convertToBlob(dataURLOptions); 231 const arrayBuffer = await blob.arrayBuffer(); 232 const base64 = encode(arrayBuffer); 233 transparentBlobMap.set(id, base64); 234 return base64; 235 } else { 236 return ""; 237 } 238 } 239 const worker = self; 240 worker.onmessage = async function(e) { 241 if ("OffscreenCanvas" in globalThis) { 242 const { id, bitmap, width, height, dataURLOptions } = e.data; 243 const transparentBase64 = getTransparentBlobFor( 244 width, 245 height, 246 dataURLOptions 247 ); 248 const offscreen = new OffscreenCanvas(width, height); 249 const ctx = offscreen.getContext("2d"); 250 ctx.drawImage(bitmap, 0, 0); 251 bitmap.close(); 252 const blob = await offscreen.convertToBlob(dataURLOptions); 253 const type = blob.type; 254 const arrayBuffer = await blob.arrayBuffer(); 255 const base64 = encode(arrayBuffer); 256 if (!lastBlobMap.has(id) && await transparentBase64 === base64) { 257 lastBlobMap.set(id, base64); 258 return worker.postMessage({ id }); 259 } 260 if (lastBlobMap.get(id) === base64) return worker.postMessage({ id }); 261 worker.postMessage({ 262 id, 263 type, 264 base64, 265 width, 266 height 267 }); 268 lastBlobMap.set(id, base64); 269 } else { 270 return worker.postMessage({ id: e.data.id }); 271 } 272 }; 273})(); 274//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map 275`,ky=typeof self<`u`&&self.Blob&&new Blob([Oy],{type:`text/javascript;charset=utf-8`});function Ay(e){let t;try{if(t=ky&&(self.URL||self.webkitURL).createObjectURL(ky),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(Oy),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var jy=class{constructor(e){W(this,`pendingCanvasMutations`,new Map),W(this,`rafStamps`,{latestId:0,invokeId:null}),W(this,`mirror`),W(this,`mutationCb`),W(this,`resetObservers`),W(this,`frozen`,!1),W(this,`locked`,!1),W(this,`processMutation`,(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t=`all`,win:n,blockClass:r,blockSelector:i,recordCanvas:a,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t===`all`&&this.initCanvasMutationObserver(n,r,i),a&&typeof t==`number`&&this.initCanvasFPSObserver(t,n,r,i,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,i){let a=Ty(t,n,r,!0),o=new Map,s=new Ay;s.onmessage=e=>{let{id:t}=e.data;if(o.set(t,!1),!(`base64`in e.data))return;let{base64:n,type:r,width:i,height:a}=e.data;this.mutationCb({id:t,type:wv[`2D`],commands:[{property:`clearRect`,args:[0,0,i,a]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:n}],type:r}]},0,0]}]})};let c=1e3/e,l=0,u,d=()=>{let e=[];return t.document.querySelectorAll(`canvas`).forEach(t=>{cv(t,n,r,!0)||e.push(t)}),e},f=e=>{if(l&&e-l<c){u=requestAnimationFrame(f);return}
vendor: 8,986 bytes, line 275
275l=e,d().forEach(async e=>{let t=this.mirror.getId(e);if(o.get(t)||e.width===0||e.height===0)return;if(o.set(t,!0),[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}let n=await createImageBitmap(e);s.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[n])}),u=requestAnimationFrame(f)};u=requestAnimationFrame(f),this.resetObservers=()=>{a(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let r=Ty(e,t,n,!1),i=Cy(this.processMutation.bind(this),e,t,n),a=Dy(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}},My=class{constructor(e){W(this,`trackedLinkElements`,new WeakSet),W(this,`mutationCb`),W(this,`adoptedStyleSheetCb`),W(this,`styleMirror`,new _v),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,n)=>({rule:fp(e,t.href),index:n}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Ny=class{constructor(){W(this,`nodeMap`,new WeakMap),W(this,`active`,!1)}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Q,Py,Fy,Iy=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var Ly=_p();function Ry(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,ignoreClass:o=`rr-ignore`,ignoreSelector:s=null,maskTextClass:c=`rr-mask`,maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:f,slimDOMOptions:p,maskInputFn:m,maskTextFn:h,hooks:g,packFn:_,sampling:v={},dataURLOptions:y={},mousemoveWait:b,recordDOM:x=!0,recordCanvas:S=!1,recordCrossOriginIframes:C=!1,recordAfter:w=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:T=!1,collectFonts:E=!1,inlineImages:D=!1,plugins:O,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:A=new Set([]),errorHandler:j,applyBackgroundColorToBlockedElements:ee=!1}=e;Rv(j);let M=C?window.parent===window:!0,te=!1;if(!M)try{window.parent.document&&(te=!1)}catch{te=!0}if(M&&!t)throw Error(`emit function is required`);if(!M&&!te)return()=>{};b!==void 0&&v.mousemove===void 0&&(v.mousemove=b),Ly.reset();let ne=d===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f===void 0?{password:!0}:f,re=p===!0||p===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:p===`all`,headMetaDescKeywords:p===`all`,headTitleMutations:p===`all`}:p||{};pv();let ie,ae=0,oe=e=>{for(let t of O||[])t.eventProcessor&&(e=t.eventProcessor(e));return _&&!te&&(e=_(e)),e};Q=(e,i)=>{let a=e;if(a.timestamp=rv(),Vv[0]?.isFrozen()&&a.type!==Y.FullSnapshot&&!(a.type===Y.IncrementalSnapshot&&a.data.source===X.Mutation)&&Vv.forEach(e=>e.unfreeze()),M)t?.(oe(a),i);else if(te){let e={type:`rrweb`,event:oe(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===Y.FullSnapshot)ie=a,ae=0;else if(a.type===Y.IncrementalSnapshot){if(a.data.source===X.Mutation&&a.data.isAttachIframe)return;ae++;let e=r&&ae>=r,t=n&&a.timestamp-ie.timestamp>n;(e||t)&&Py(!0)}};let se=e=>{Q({type:Y.IncrementalSnapshot,data:{source:X.Mutation,...e}})},N=e=>Q({type:Y.IncrementalSnapshot,data:{source:X.Scroll,...e}}),ce=e=>Q({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),le=new My({mutationCb:se,adoptedStyleSheetCb:e=>Q({type:Y.IncrementalSnapshot,data:{source:X.AdoptedStyleSheet,...e}})}),ue=new dy({mirror:Ly,mutationCb:se,stylesheetManager:le,recordCrossOriginIframes:C,wrappedEmit:Q});for(let e of O||[])e.getMirror&&e.getMirror({nodeMirror:Ly,crossOriginIframeMirror:ue.crossOriginIframeMirror,crossOriginIframeStyleMirror:ue.crossOriginIframeStyleMirror});let de=new Ny;Fy=new jy({recordCanvas:S,mutationCb:ce,win:window,blockClass:i,blockSelector:a,mirror:Ly,sampling:v.canvas,dataURLOptions:y});let fe=new fy({mutationCb:se,scrollCb:N,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:ne,dataURLOptions:y,maskTextFn:h,maskInputFn:m,recordCanvas:S,inlineImages:D,sampling:v,slimDOMOptions:re,iframeManager:ue,stylesheetManager:le,canvasManager:Fy,keepIframeSrcFn:k,processedNodeManager:de},mirror:Ly});Py=(e=!1)=>{if(!x)return;Q({type:Y.Meta,data:{href:window.location.href,width:ov(),height:av()}},e),le.reset(),fe.init(),Vv.forEach(e=>e.lock());let t=sm(document,{mirror:Ly,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:ne,maskTextFn:h,maskInputFn:m,slimDOM:re,dataURLOptions:y,recordCanvas:S,inlineImages:D,applyBackgroundColorToBlockedElements:ee,onSerialize:e=>{mv(e,Ly)&&ue.addIframe(e),hv(e,Ly)&&le.trackLinkElement(e),gv(e)&&fe.addShadowRoot(J.shadowRoot(e),document)},onIframeLoad:(e,t)=>{ue.attachIframe(e,t),fe.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{le.attachLinkElement(e,t)},keepIframeSrcFn:k});if(!t)return console.warn(`Failed to snapshot the document`);Q({type:Y.FullSnapshot,data:{node:t,initialOffset:iv(window)}},e),Vv.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,Ly.getId(document))};try{let e=[],t=e=>Z(sy)({mutationCb:se,mousemoveCb:(e,t)=>Q({type:Y.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Q({type:Y.IncrementalSnapshot,data:{source:X.MouseInteraction,...e}}),scrollCb:N,viewportResizeCb:e=>Q({type:Y.IncrementalSnapshot,data:{source:X.ViewportResize,...e}}),inputCb:e=>Q({type:Y.IncrementalSnapshot,data:{source:X.Input,...e}}),mediaInteractionCb:e=>Q({type:Y.IncrementalSnapshot,data:{source:X.MediaInteraction,...e}}),styleSheetRuleCb:e=>Q({type:Y.IncrementalSnapshot,data:{source:X.StyleSheetRule,...e}}),styleDeclarationCb:e=>Q({type:Y.IncrementalSnapshot,data:{source:X.StyleDeclaration,...e}}),canvasMutationCb:ce,fontCb:e=>Q({type:Y.IncrementalSnapshot,data:{source:X.Font,...e}}),selectionCb:e=>{Q({type:Y.IncrementalSnapshot,data:{source:X.Selection,...e}})},customElementCb:e=>{Q({type:Y.IncrementalSnapshot,data:{source:X.CustomElement,...e}})},blockClass:i,ignoreClass:o,ignoreSelector:s,maskTextClass:c,maskTextSelector:l,maskInputOptions:ne,inlineStylesheet:u,sampling:v,recordDOM:x,recordCanvas:S,inlineImages:D,userTriggeredOnInput:T,collectFonts:E,doc:e,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:k,blockSelector:a,slimDOMOptions:re,dataURLOptions:y,mirror:Ly,iframeManager:ue,stylesheetManager:le,shadowDomManager:fe,processedNodeManager:de,canvasManager:Fy,ignoreCSSAttributes:A,plugins:(O?.filter(e=>e.observer))?.map(e=>({observer:e.observer,options:e.options,callback:t=>Q({type:Y.Plugin,data:{plugin:e.name,payload:t}})}))||[]},g);ue.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{Py(),e.push(t(document)),Iy=!0};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(Z_(`DOMContentLoaded`,()=>{Q({type:Y.DomContentLoaded,data:{}}),w===`DOMContentLoaded`&&n()})),e.push(Z_(`load`,()=>{Q({type:Y.Load,data:{}}),w===`load`&&n()}
275,window))),()=>{e.forEach(e=>e()),de.destroy(),Iy=!1,zv()}}catch(e){console.warn(e)}}Ry.addCustomEvent=(e,t)=>{if(!Iy)throw Error(`please add custom event after start recording`);Q({type:Y.Custom,data:{tag:e,payload:t}})},Ry.freezePage=()=>{Vv.forEach(e=>e.freeze())},Ry.takeFullSnapshot=e=>{if(!Iy)throw Error(`please take full snapshot after start recording`);Py(e)},Ry.mirror=Ly;var zy;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(zy||={});var{addCustomEvent:By}=Ry,{freezePage:Vy}=Ry,{takeFullSnapshot:Hy}=Ry,Uy=`[Amplitude]`,Wy=`${Uy} Session Replay ID`,Gy=wn.US,Ky={enabled:!0},qy=1e3,Jy=`${Uy} Session Replay Debug`,Yy=`amp-block`,Xy=`amp-mask`,Zy=`https://api-sr.amplitude.com/sessions/v2/track`,Qy=`https://api-sr.eu.amplitude.com/sessions/v2/track`,$y=`https://api-sr.stag2.amplitude.com/sessions/v2/track`,eb=1*1e6,tb=3e4,nb=6e4,rb=10*1e3,ib=1024,ab=1e3,ob;(function(e){e.GET_SR_PROPS=`get-sr-props`,e.DEBUG_INFO=`debug-info`,e.FETCH_REQUEST=`fetch-request`,e.METADATA=`metadata`,e.TARGETING_DECISION=`targeting-decision`})(ob||={});var sb=function(){function e(e){this.logger=e,this.log=this.getSafeMethod(`log`),this.warn=this.getSafeMethod(`warn`),this.error=this.getSafeMethod(`error`),this.debug=this.getSafeMethod(`debug`)}return e.prototype.getSafeMethod=function(e){if(!this.logger)return(function(){});var t=this.logger[e];return typeof t==`function`?(t.__rrweb_original__??t).bind(this.logger):(function(){})},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}(),cb=`medium`;function lb(e){return e.toLowerCase()}function ub(e){var t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?lb(t):null}var db=function(e,t,n){switch(t){case`light`:if(e!==`input`)return!0;var r=n?ub(n):``;return r?!!([`password`,`hidden`,`email`,`tel`].includes(r)||n.autocomplete.startsWith(`cc-`)):!1;case`medium`:case`conservative`:return!0;default:return db(e,cb,n)}},fb=function(e,t,n){if(t===void 0&&(t={defaultMaskLevel:cb}),n){if(n.closest(`.amp-mask`)||(t.maskSelector??[]).some(function(e){return n.closest(e)}))return!0;if(n.closest(`.amp-unmask`)||(t.unmaskSelector??[]).some(function(e){return n.closest(e)}))return!1}return db(e,t.defaultMaskLevel??cb,n)},pb=function(e,t){return function(n,r){return fb(e,t,r)?n.replace(/[^\s]/g,`*`):n}},mb=function(){var e=I();return e?.location?e.location.href:``},hb=function(e,t){return`${t}/${e}`},gb=function(e,t){return t||(e===wn.STAGING?$y:e===wn.EU?Qy:Zy)},_b=function(e){return!(typeof e!=`string`||e.trim()===``||!/^\/|^https?:\/\/[^\s]+$/.test(e))},vb=function(e){var t=e.replace(/[.+^${}()|[\]\\]/g,`\\$&`).replace(/\*/g,`.*`).replace(/\?/g,`.`);return RegExp(`^${t}\$`)},yb=function(e){if(!e.every(function(e){return typeof e.selector==`string`&&typeof e.replacement==`string`}))throw Error(`ugcFilterRules must be an array of objects with selector and replacement properties`);if(!e.every(function(e){return _b(e.selector)}))throw Error(`ugcFilterRules must be an array of objects with valid globs`)},bb=function(e,t){var n,r;try{for(var i=l(t),a=i.next();!a.done;a=i.next()){var o=a.value,s=vb(o.selector);if(s.test(e))return e.replace(s,o.replacement)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},xb=function(){return b(void 0,void 0,void 0,function(){var e,t,n,r,i,a,o;return d(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e=I(),e?[4,e.navigator.storage.estimate()]:[3,2];case 1:return t=s.sent(),n=t.usage,r=t.quota,i=t.usageDetails,a=n?Math.round(n/ib):0,o=n&&r?Math.round((n/r+2**-52)*1e3)/1e3:0,[2,{totalStorageSize:a,percentOfQuota:o,usageDetails:JSON.stringify(i)}];case 2:return[3,4];case 3:return s.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:``}]}})})},Sb=function(e){var t=r({},e),n=t.apiKey;return t.apiKey=`****${n.substring(n.length-4)}`,t},Cb=function(){return{flushMaxRetries:2,logLevel:Xe.Warn,loggerProvider:new Qe,transportProvider:new un}},wb=function(e){u(t,e);function t(t,n){var i=this,a=Cb();if(i=e.call(this,r(r({transportProvider:a.transportProvider,loggerProvider:new sb(n.loggerProvider||a.loggerProvider)},n),{apiKey:t}))||this,i.flushMaxRetries=n.flushMaxRetries!==void 0&&n.flushMaxRetries<=a.flushMaxRetries?n.flushMaxRetries:a.flushMaxRetries,i.apiKey=t,i.sampleRate=n.sampleRate||0,i.serverZone=n.serverZone||Gy,i.configServerUrl=n.configServerUrl,i.trackServerUrl=n.trackServerUrl,i.shouldInlineStylesheet=n.shouldInlineStylesheet,i.version=n.version,i.performanceConfig=n.performanceConfig||Ky,i.storeType=n.storeType??`idb`,i.applyBackgroun
vendor: 4,215 bytes, line 275
275dColorToBlockedElements=n.applyBackgroundColorToBlockedElements??!1,i.enableUrlChangePolling=n.enableUrlChangePolling??!1,i.urlChangePollingInterval=n.urlChangePollingInterval??qy,i.captureDocumentTitle=n.captureDocumentTitle??!1,n.privacyConfig&&(i.privacyConfig=n.privacyConfig),n.interactionConfig&&(i.interactionConfig=n.interactionConfig,i.interactionConfig.ugcFilterRules&&yb(i.interactionConfig.ugcFilterRules)),n.debugMode&&(i.debugMode=n.debugMode),n.useWebWorker!==void 0)i.useWebWorker=n.useWebWorker;else{var o=n;o.experimental?.useWebWorker!==void 0&&(i.useWebWorker=o.experimental.useWebWorker)}return n.omitElementTags&&(i.omitElementTags=n.omitElementTags),i}return t}(et),Tb=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Tb||{}),Eb=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(Eb||{}),Db=function(e,t){var n=document.createDocumentFragment(),r=function(e){if(e===void 0&&(e=[]),typeof e==`string`&&(e=[e]),e=e.filter(function(e){try{n.querySelector(e)}catch{return t.warn(`[session-replay-browser] omitting selector "${e}" because it is invalid`),!1}return!0}),e.length!==0)return e};return e.blockSelector=r(e.blockSelector),e.maskSelector=r(e.maskSelector),e.unmaskSelector=r(e.unmaskSelector),e},Ob=function(){function e(e,t){this.localConfig=t,this.remoteConfigClient=e}return e.prototype.generateJoinedConfig=function(){return b(this,void 0,void 0,function(){var e,t,n,i,a,o,s,c,u,f,m,h,g,_,v,y,b,x=this;return d(this,function(d){switch(d.label){case 0:e=r({},this.localConfig),e.optOut=this.localConfig.optOut,e.captureEnabled=!0,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,new Promise(function(n,r){x.remoteConfigClient.subscribe(`configs.sessionReplay`,`all`,function(i,a){if(x.localConfig.loggerProvider.debug(`Session Replay remote configuration received from ${a}:`,JSON.stringify(i,null,2)),!i){r(Error(`No remote config received`));return}var o=i,s=o.sr_sampling_config,c=o.sr_privacy_config,l=o.sr_targeting_config,u=e.interactionConfig?.ugcFilterRules;e.interactionConfig=o.sr_interaction_config,e.interactionConfig&&u&&(e.interactionConfig.ugcFilterRules=u),e.loggingConfig=o.sr_logging_config,(s||c||l)&&(t={},s&&(t.sr_sampling_config=s),c&&(t.sr_privacy_config=c),l&&(t.sr_targeting_config=l)),n()})})];case 2:return d.sent(),[3,4];case 3:return n=d.sent(),this.localConfig.loggerProvider.error(`Failed to generate joined config: `,n),e.captureEnabled=!1,[2,{localConfig:this.localConfig,joinedConfig:e,remoteConfig:void 0}];case 4:if(!t)return[2,{localConfig:this.localConfig,joinedConfig:e,remoteConfig:t}];if(i=t.sr_sampling_config,a=t.sr_privacy_config,o=t.sr_targeting_config,i&&Object.keys(i).length>0?(Object.prototype.hasOwnProperty.call(i,`capture_enabled`)?e.captureEnabled=i.capture_enabled:e.captureEnabled=!1,Object.prototype.hasOwnProperty.call(i,`sample_rate`)&&(e.sampleRate=i.sample_rate)):(e.captureEnabled=!0,this.localConfig.loggerProvider.debug(`Remote config successfully fetched, but no values set for project, Session Replay capture enabled.`)),a){s=e.privacyConfig??{},c={defaultMaskLevel:a.defaultMaskLevel??s.defaultMaskLevel??`medium`,blockSelector:[],maskSelector:[],unmaskSelector:[]},u=function(e){var t,n,r,i,a,o,s={};typeof e.blockSelector==`string`&&(e.blockSelector=[e.blockSelector]);try{for(var c=l(e.blockSelector??[]),u=c.next();!u.done;u=c.next()){var d=u.value;s[d]=`block`}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}try{for(var f=l(e.maskSelector??[]),p=f.next();!p.done;p=f.next()){var d=p.value;s[d]=`mask`}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}try{for(var m=l(e.unmaskSelector??[]),h=m.next();!h.done;h=m.next()){var d=h.value;s[d]=`unmask`}}catch(e){a={error:e}}
vendor: 4,805 bytes, line 275
275finally{try{h&&!h.done&&(o=m.return)&&o.call(m)}finally{if(a)throw a.error}}return s},f=r(r({},u(s)),u(a));try{for(m=l(Object.entries(f)),h=m.next();!h.done;h=m.next())g=p(h.value,2),_=g[0],v=g[1],v===`mask`?c.maskSelector.push(_):v===`block`?c.blockSelector.push(_):v===`unmask`&&c.unmaskSelector.push(_)}catch(e){y={error:e}}finally{try{h&&!h.done&&(b=m.return)&&b.call(m)}finally{if(y)throw y.error}}e.privacyConfig=Db(c,this.localConfig.loggerProvider)}return o&&Object.keys(o).length>0&&(e.targetingConfig=o),this.localConfig.loggerProvider.debug(JSON.stringify({name:`session replay joined config`,config:Sb(e)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:e,remoteConfig:t}]}})})},e}(),kb=function(e,t){return b(void 0,void 0,void 0,function(){var n,r;return d(this,function(i){return n=new wb(e,t),r=new mn(e,n.loggerProvider,n.serverZone,t.configServerUrl),[2,new Ob(r,n)]})})},Ab=Uint8Array,jb=Uint16Array,Mb=Uint32Array,Nb=new Ab([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Pb=new Ab([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Fb=new Ab([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ib=function(e,t){for(var n=new jb(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new Mb(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return[n,i]},Lb=Ib(Nb,2),Rb=Lb[0],zb=Lb[1];Rb[28]=258,zb[258]=28;var Bb=Ib(Pb,0);Bb[0];for(var Vb=Bb[1],Hb=new jb(32768),Ub=0;Ub<32768;++Ub){var Wb=(Ub&43690)>>>1|(Ub&21845)<<1;Wb=(Wb&52428)>>>2|(Wb&13107)<<2,Wb=(Wb&61680)>>>4|(Wb&3855)<<4,Hb[Ub]=((Wb&65280)>>>8|(Wb&255)<<8)>>>1}for(var Gb=(function(e,t,n){for(var r=e.length,i=0,a=new jb(t);i<r;++i)++a[e[i]-1];var o=new jb(t);for(i=0;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new jb(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[Hb[d]>>>c]=l}else for(s=new jb(r),i=0;i<r;++i)s[i]=Hb[o[e[i]-1]++]>>>15-e[i];return s}),Kb=new Ab(288),Ub=0;Ub<144;++Ub)Kb[Ub]=8;for(var Ub=144;Ub<256;++Ub)Kb[Ub]=9;for(var Ub=256;Ub<280;++Ub)Kb[Ub]=7;for(var Ub=280;Ub<288;++Ub)Kb[Ub]=8;for(var qb=new Ab(32),Ub=0;Ub<32;++Ub)qb[Ub]=5;var Jb=Gb(Kb,9,0),Yb=Gb(qb,5,0),Xb=function(e){return(e/8>>0)+(e&7&&1)},Zb=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof jb?jb:e instanceof Mb?Mb:Ab)(n-t);return r.set(e.subarray(t,n)),r},Qb=function(e,t,n){n<<=t&7;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},$b=function(e,t,n){n<<=t&7;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},ex=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return[new Ab(0),0];if(i==1){var o=new Ab(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};for(var f=a[0].s,r=1;r<i;++r)a[r].s>f&&(f=a[r].s);var p=new jb(f+1),m=tx(n[u-1],p,0);if(m>t){var r=0,h=0,g=m-t,_=1<<g;for(a.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<i;++r){var v=a[r].s;if(p[v]>t)h+=_-(1<<m-p[v]),p[v]=t;else break}for(h>>>=g;h>0;){var y=a[r].s;p[y]<t?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return[new Ab(p),m]},tx=function(e,t,n){return e.s==-1?Math.max(tx(e.l,t,n+1),tx(e.r,t,n+1)):t[e.s]=n},nx=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new jb(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return[n.subarray(0,r),t]},rx=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},ix=function(e,t,n){var r=n.length,i=Xb(t+2);e[i]=r&255,e[i+1]=r>>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},ax=function(e,t,n,r,i,a,o,s,c,l,u){Qb(t,u++,n),++i[256];for(var d=ex(i,15),f=d[0],p=d[1],m=ex(a,15),h=m[0],g=m[1],_=nx(f),v=_[0],y=_[1],b=nx(h),x=b[0],S=b[1],C=new jb(19),w=0;w<v.length;++w)C[v[w]&31]++;for(var w=0;w<x.length;++w)C[x[w]&31]++;for(var T=ex(C,7),E=T[0],D=T[1],O=19;O>4&&!E[Fb[O-1]];--O);var k=l+5<<3,A=rx(i,Kb)+rx(a,qb)+o,j=rx(i,f)+rx(a,h)+o+14+3*O+rx(C,E)+(2*C[16]+3*C[17]+7*C[18]);if(k<=A&&k<=j)return ix(t,u,e.subarray(c,c+l));var ee,M,te,ne;if(Qb(t,u,1+(j<A)),u+=2,j<A){ee=Gb(f,p,0),M=f,te=Gb(h,g,0),ne=h;var re=Gb(E,D,0);Qb(t,u,y-257),Qb(t,u+5,S-1),Qb(t,u+10,O-4),u+=14;for(var w=0;w<O;++w)Qb(t,u+3*w,E[Fb[w]]);u+=3*O;for(var ie=[v,x],ae=0;ae<2;++ae)for(var oe=ie[ae],w=0;w<oe.length;++w){var se=oe[w]&31;Qb(t,u,re[se]),u+=E[se],se>15&&(Qb(t,u,oe[w]>>>5&127),u+=oe[w]>>>12)}}else ee=Jb,M=Kb,te=Yb,ne=qb;for(var w=0;w<s;++w)if(r[w]>
vendor: 6,172 bytes, line 275
275255){var se=r[w]>>>18&31;$b(t,u,ee[se+257]),u+=M[se+257],se>7&&(Qb(t,u,r[w]>>>23&31),u+=Nb[se]);var N=r[w]&31;$b(t,u,te[N]),u+=ne[N],N>3&&($b(t,u,r[w]>>>5&8191),u+=Pb[N])}else $b(t,u,ee[r[w]]),u+=M[r[w]];return $b(t,u,ee[256]),u+M[256]},ox=new Mb([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sx=function(e,t,n,r,i,a){var o=e.length,s=new Ab(r+o+5*(1+Math.floor(o/7e3))+i),c=s.subarray(r,s.length-i),l=0;if(!t||o<8)for(var u=0;u<=o;u+=65535){var d=u+65535;d<o?l=ix(c,l,e.subarray(u,d)):(c[u]=a,l=ix(c,l,e.subarray(u,o)))}else{for(var f=ox[t-1],p=f>>>13,m=f&8191,h=(1<<n)-1,g=new jb(32768),_=new jb(h+1),v=Math.ceil(n/3),y=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&h},x=new Mb(25e3),S=new jb(288),C=new jb(32),w=0,T=0,u=0,E=0,D=0,O=0;u<o;++u){var k=b(u),A=u&32767,j=_[k];if(g[A]=j,_[k]=A,D<=u){var ee=o-u;if((w>7e3||E>24576)&&ee>423){l=ax(e,c,0,x,S,C,T,E,O,u-O,l),E=w=T=0,O=u;for(var M=0;M<286;++M)S[M]=0;for(var M=0;M<30;++M)C[M]=0}var te=2,ne=0,re=m,ie=A-j&32767;if(ee>2&&k==b(u-ie))for(var ae=Math.min(p,ee)-1,oe=Math.min(32767,u),se=Math.min(258,ee);ie<=oe&&--re&&A!=j;){if(e[u+te]==e[u+te-ie]){for(var N=0;N<se&&e[u+N]==e[u+N-ie];++N);if(N>te){if(te=N,ne=ie,N>ae)break;for(var ce=Math.min(ie,N-2),le=0,M=0;M<ce;++M){var ue=u-ie+M+32768&32767,de=ue-g[ue]+32768&32767;de>le&&(le=de,j=ue)}}}A=j,j=g[A],ie+=A-j+32768&32767}if(ne){x[E++]=268435456|zb[te]<<18|Vb[ne];var fe=zb[te]&31,pe=Vb[ne]&31;T+=Nb[fe]+Pb[pe],++S[257+fe],++C[pe],D=u+te,++w}else x[E++]=e[u],++S[e[u]]}}l=ax(e,c,a,x,S,C,T,E,O,u-O,l)}return Zb(s,0,r+Xb(l)+i)},cx=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length,o=0;o!=a;){for(var s=Math.min(o+5552,a);o<s;++o)r+=n[o],i+=r;r%=65521,i%=65521}e=r,t=i},d:function(){return(e>>>8<<16|(t&255)<<8|t>>>8)+((e&255)<<23)*2}}},lx=function(e,t,n,r,i){return sx(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,n,r,!0)},ux=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},dx=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)};function fx(e,t){t===void 0&&(t={});var n=cx();n.p(e);var r=lx(e,t,2,4);return dx(r,t),ux(r,r.length-4,n.d()),r}function px(e,t){var n=e.length;if(!t&&typeof TextEncoder<`u`)return new TextEncoder().encode(e);for(var r=new Ab(e.length+(e.length>>>1)),i=0,a=function(e){r[i++]=e},o=0;o<n;++o){if(i+5>r.length){var s=new Ab(i+8+(n-o<<1));s.set(r),r=s}var c=e.charCodeAt(o);c<128||t?a(c):c<2048?(a(192|c>>>6),a(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++o)&1023,a(240|c>>>18),a(128|c>>>12&63),a(128|c>>>6&63),a(128|c&63)):(a(224|c>>>12),a(128|c>>>6&63),a(128|c&63))}return Zb(r,0,i)}function mx(e,t){var n=``;if(!t&&typeof TextDecoder<`u`)return new TextDecoder().decode(e);for(var r=0;r<e.length;){var i=e[r++];i<128||t?n+=String.fromCharCode(i):i<224?n+=String.fromCharCode((i&31)<<6|e[r++]&63):i<240?n+=String.fromCharCode((i&15)<<12|(e[r++]&63)<<6|e[r++]&63):(i=((i&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,n+=String.fromCharCode(55296|i>>10,56320|i&1023))}return n}var hx=e=>{let t={...e,v:`v1`};return mx(fx(px(JSON.stringify(t))),!0)},gx=2e3,_x=function(){function e(e,t,n,r){var i=this;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=function(e){var t=hx(e);return JSON.stringify(t)},this.addCompressedEventToManager=function(e,t){i.eventsManager&&i.deviceId&&i.eventsManager.addEvent({event:{type:`replay`,data:e},sessionId:t,deviceId:i.deviceId})},this.addCompressedEvent=function(e,t){if(i.worker)try{i.worker.postMessage({event:e,sessionId:t})}catch(n){n.name===`DataCloneError`?i.worker.postMessage(JSON.stringify({event:e,sessionId:t})):i.config.loggerProvider.warn(`Unexpected error while posting message to worker:`,n)}else{var n=i.compressEvent(e);i.addCompressedEventToManager(n,t)}},this.terminate=function(){var e;(e=i.worker)==null||e.terminate()};var a=I();if(this.canUseIdleCallback=a&&`requestIdleCallback`in a,this.eventsManager=e,this.config=t,this.deviceId=n,this.timeout=t.performanceConfig?.timeout||gx,r){t.loggerProvider.log(`Enabling web worker for compression`);var o=new Worker(URL.createObjectURL(new Blob([r],{type:`application/javascript`})));o.onerror=function(e){t.loggerProvider.error(e)},o.onmessage=function(e){var t=e.data,n=t.compressedEvent,r=t.sessionId;i.addCompressedEventToManager(n,r)},this.worker=o}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(t){e.processQueue(t)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){this.canUseIdleCallback&&this.config.performanceConfig?.enabled?(this.config.loggerProvider.debug(`Enqueuing event for processing during idle time.`),this.taskQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug(`Processing event without idle callback.`),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){for(var t=this;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var n=this.taskQueue.shift();if(n){var r=n.event,i=n.sessionId;this.addCompressedEvent(r,i)}}this.taskQueue.length>0?requestIdleCallback(function(e){t.processQueue(e)},{timeout:this.timeout}):this.isProcessing=!1},e}(),vx=`Unexpected error occurred`,yx=`Network error occurred, event batch rejected`,bx=`Session replay event batch rejected due to exceeded retry count`,xx=`Failed to store session replay events in IndexedDB`,Sx=`Session replay event batch not sent due to missing device ID`,Cx=`Session replay event batch not sent due to missing api key`,wx=`1.30.9`,Tx=function(){function e(e){var t=e.trackServerUrl,n=e.loggerProvider,r=e.payloadBatcher;this.storageKey=``,this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=n,this.payloadBatcher=r||function(e){return e},this.trackServerUrl=t}return e.prototype.sendEventsList=function(e){this.addToQueue(r(r({},e),{attempts:0,timeout:0}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.filter(function(t){return t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:bx}),!1)}
vendor: 8,297 bytes, line 275
275).forEach(function(t){if(e.queue=e.queue.concat(t),t.timeout===0){e.schedule(0);return}setTimeout(function(){t.timeout=0,e.schedule(0)},t.timeout)})},e.prototype.schedule=function(e){var t=this;this.scheduled||=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},e)},e.prototype.flush=function(e){return e===void 0&&(e=!1),b(this,void 0,void 0,function(){var t,n,r=this;return d(this,function(i){switch(i.label){case 0:return t=[],n=[],this.queue.forEach(function(e){return e.timeout===0?t.push(e):n.push(e)}),this.queue=n,this.scheduled&&=(clearTimeout(this.scheduled),null),[4,Promise.all(t.map(function(t){return r.send(t,e)}))];case 1:return i.sent(),[2]}})})},e.prototype.send=function(e,t){return t===void 0&&(t=!0),b(this,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u,f,p,m,h;return d(this,function(d){switch(d.label){case 0:if(n=e.apiKey,!n)return[2,this.completeRequest({context:e,err:Cx})];if(r=e.deviceId,!r)return[2,this.completeRequest({context:e,err:Sx})];if(i=mb(),a=wx,o=e.sampleRate,s=new URLSearchParams({device_id:r,session_id:`${e.sessionId}`,type:`${e.type}`}),c=`${e.version?.type||`standalone`}/${e.version?.version||a}`,l=this.payloadBatcher({version:1,events:e.events}),l.events.length===0)return this.completeRequest({context:e}),[2];d.label=1;case 1:return d.trys.push([1,3,,4]),u={headers:{"Content-Type":`application/json`,Accept:`*/*`,Authorization:`Bearer ${n}`,"X-Client-Version":a,"X-Client-Library":c,"X-Client-Url":i.substring(0,ab),"X-Client-Sample-Rate":`${o}`},body:JSON.stringify(l),method:`POST`},f=`${gb(e.serverZone,this.trackServerUrl)}?${s.toString()}`,[4,fetch(f,u)];case 2:if(p=d.sent(),p===null)return this.completeRequest({context:e,err:vx}),[2];if(t)this.handleReponse(p.status,e);else{m=``;try{m=JSON.stringify(p.body,null,2)}catch{}this.completeRequest({context:e,success:`${p.status}: ${m}`})}return[3,4];case 3:return h=d.sent(),this.completeRequest({context:e,err:h}),[3,4];case 4:return[2]}})})},e.prototype.handleReponse=function(e,t){switch(new ln().buildStatus(e)){case F.Success:this.handleSuccessResponse(t);break;case F.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:yx})}},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/ib);this.completeRequest({context:e,success:`Session replay event batch tracked successfully for session id ${e.sessionId}, size of events: ${t} KB`})},e.prototype.handleOtherResponse=function(e){this.addToQueue(r(r({},e),{timeout:e.attempts*this.retryTimeout}))},e.prototype.completeRequest=function(e){var t=e.context,n=e.err,r=e.success;t.onComplete(),n?this.loggerProvider.warn(n):r&&this.loggerProvider.log(r)},e}(),Ex=function(){function e(e){var t=this;this.minInterval=500,this.maxInterval=rb,this.maxPersistedEventsSize=eb,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,n){var r=t.getStringSize(n);return t.getEventsArraySize(e)+r>=t.maxPersistedEventsSize?!0:Date.now()-t.timeAtLastSplit>t.interval&&e.length?(t.interval=Math.min(t.maxInterval,t.interval+t.minInterval),t._timeAtLastSplit=Date.now(),!0):!1},this.loggerProvider=e.loggerProvider,this.minInterval=e.minInterval??this.minInterval,this.maxInterval=e.maxInterval??this.maxInterval,this.maxPersistedEventsSize=e.maxPersistedEventsSize??this.maxPersistedEventsSize}return Object.defineProperty(e.prototype,`timeAtLastSplit`,{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e.prototype.getStringSize=function(e){return e.length},e.prototype.getEventsArraySize=function(e){var t,n,r=0;try{for(var i=l(e),a=i.next();!a.done;a=i.next()){var o=a.value;r+=this.getStringSize(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}var s=2+Math.max(0,e.length-1)+e.length*2;return r+s},e}(),Dx;(function(e){e.RECORDING=`recording`,e.SENT=`sent`})(Dx||={});var Ox=`sessionCurrentSequence`,kx=`sequencesToSend`,Ax=function(){var e=I();return new Promise(function(t,n){if(!e)return n(Error(`Global scope not found`));if(!e.indexedDB)return n(Error(`Session Replay: cannot find indexedDB`));try{var r=e.indexedDB.open(`keyval-store`),i=!1;r.onupgradeneeded=function(){r.result.version===1&&(i=!0)},r.onsuccess=function(){if(i){try{r.result.close()}catch{}try{e.indexedDB.deleteDatabase(`keyval-store`)}catch{}t();return}t(r.result)},r.onerror=function(e){if(r.error?.name===`AbortError`){e.preventDefault(),t();return}n(r.error)}}catch(e){n(e)}})},jx=function(e){return b(void 0,void 0,void 0,function(){var t,n;return d(this,function(r){switch(r.label){case 0:return e.length>0?(t=10,n=e.splice(0,t),[4,Promise.all(n)]):[3,2];case 1:return r.sent(),[3,0];case 2:return[2]}})})},Mx=function(e){var t,n;return e.objectStoreNames.contains(`sessionCurrentSequence`)||(n=e.createObjectStore(Ox,{keyPath:`sessionId`})),e.objectStoreNames.contains(`sequencesToSend`)||(t=e.createObjectStore(kx,{keyPath:`sequenceId`,autoIncrement:!0}),t.createIndex(`sessionId`,`sessionId`)),{sequencesStore:t,currentSequenceStore:n}},Nx=function(e){return b(void 0,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,i(e,1,{upgrade:Mx})];case 1:return[2,t.sent()]}})})},Px=function(e){u(t,e);function t(t){var n=e.call(this,t)||this;return n.getSequencesToSend=function(){return b(n,void 0,void 0,function(){var e,t,n,r,i,a;return d(this,function(o){switch(o.label){case 0:return o.trys.push([0,5,,6]),e=[],[4,this.db.transaction(`sequencesToSend`).store.openCursor()];case 1:t=o.sent(),o.label=2;case 2:return t?(n=t.value,r=n.sessionId,i=n.events,e.push({events:i,sequenceId:t.key,sessionId:r}),[4,t.continue()]):[3,4];case 3:return t=o.sent(),[3,2];case 4:return[2,e];case 5:return a=o.sent(),this.loggerProvider.warn(`${xx}: ${a}`),[3,6];case 6:return[2,void 0]}})})},n.storeCurrentSequence=function(e){return b(n,void 0,void 0,function(){var t,n,i;return d(this,function(a){switch(a.label){case 0:return a.trys.push([0,4,,5]),[4,this.db.get(Ox,e)];case 1:return t=a.sent(),t?[4,this.db.put(kx,{sessionId:e,events:t.events})]:[2,void 0];case 2:return n=a.sent(),[4,this.db.put(Ox,{sessionId:e,events:[]})];case 3:return a.sent(),[2,r(r({},t),{sessionId:e,sequenceId:n})];case 4:return i=a.sent(),this.loggerProvider.warn(`${xx}: ${i}`),[3,5];case 5:return[2,void 0]}})})},n.addEventToCurrentSequence=function(e,t){return b(n,void 0,void 0,function(){var n,r,i,a,o,s;return d(this,function(c){switch(c.label){case 0:return c.trys.push([0,10,,11]),n=this.db.transaction(Ox,`readwrite`),[4,n.store.get(e)];case 1:return r=c.sent(),r?[3,3]:[4,n.store.put({sessionId:e,events:[t]})];case 2:return c.sent(),[2];case 3:return i=void 0,this.shouldSplitEventsList(r.events,t)?(i=r.events,[4,n.store.put({sessionId:e,events:[t]})]):[3,5];case 4:return c.sent(),[3,7];case 5:return a=r.events.concat(t),[4,n.store.put({sessionId:e,events:a})];case 6:c.sent(),c.label=7;case 7:return[4,n.done];case 8:return c.sent(),i?[4,this.storeSendingEvents(e,i)]:[2,void 0];case 9:return o=c.sent(),o?[2,{events:i,sessionId:e,sequenceId:o}]:[2,void 0];case 10:return s=c.sent(),this.loggerProvider.warn(`${xx}: ${s}`),[3,11];case 11:return[2,void 0]}})})},n.storeSendingEvents=function(e,t){return b(n,void 0,void 0,function(){var n,r;return d(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.db.put(kx,{sessionId:e,events:t})];case 1:return n=i.sent(),[2,n];case 2:return r=i.sent(),this.loggerProvider.warn(`${xx}: ${r}`),[3,3];case 3:return[2,void 0]}})})},n.cleanUpSessionEventsStore=function(e,t){return b(n,void 0,void 0,function(){var e;return d(this,function(n){switch(n.label){case 0:if(!t)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.db.delete(kx,t)];case 2:return n.sent(),[3,4];case 3:return e=n.sent(),this.loggerProvider.warn(`${xx}: ${e}`),[3,4];case 4:return[2]}})})},n.transitionFromKeyValStore=function(e){return b(n,void 0,void 0,function(){var t,n,r,i,a,o,s,l,u=this;return d(this,function(f){switch(f.label){case 0:return f.trys.push([0,6,,7]),[4,Ax()];case 1:if(t=f.sent(),!t)return[2];n=function(e,t){return b(u,void 0,void 0,function(){var n,r,i=this;return d(this,function(a){switch(a.label){case 0:return n=t.sessionSequences,r=[],Object.keys(n).forEac
vendor: 7,134 bytes, line 275
275h(function(a){var o=parseInt(a,10),s=n[o];if(o===t.currentSequenceId){var l=s.events.map(function(t){return b(i,void 0,void 0,function(){return d(this,function(n){return[2,this.addEventToCurrentSequence(e,t)]})})});r.push.apply(r,c([],p(l),!1))}else s.status!==Dx.SENT&&r.push(i.storeSendingEvents(e,s.events))}),[4,jx(r)];case 1:return a.sent(),[2]}})})},r=`${ee}_${this.apiKey.substring(0,10)}`,f.label=2;case 2:return f.trys.push([2,4,,5]),i=t.transaction(`keyval`).objectStore(`keyval`).getAll(r),a=new Promise(function(t){i.onsuccess=function(r){return b(u,void 0,void 0,function(){var i,a,o,s=this;return d(this,function(c){switch(c.label){case 0:return i=r&&r.target.result,a=i&&i[0],a?(o=[],Object.keys(a).forEach(function(t){var r=parseInt(t,10),i=a[r];if(e===r)o.push(n(r,i));else{var c=i.sessionSequences;Object.keys(c).forEach(function(e){var t=parseInt(e,10);c[t].status!==Dx.SENT&&o.push(s.storeSendingEvents(r,c[t].events))})}}),[4,jx(o)]):[3,2];case 1:c.sent(),c.label=2;case 2:return t(),[2]}})})}}),[4,a];case 3:return f.sent(),o=I(),o&&o.indexedDB.deleteDatabase(`keyval-store`),[3,5];case 4:return s=f.sent(),this.loggerProvider.warn(`Failed to transition session replay events from keyval to new store: ${s}`),[3,5];case 5:return[3,7];case 6:return l=f.sent(),this.loggerProvider.warn(`Failed to access keyval store: ${l}. For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices`),[3,7];case 7:return[2]}})})},n.apiKey=t.apiKey,n.db=t.db,n}return t.new=function(e,n,i){return b(this,void 0,void 0,function(){var a,o,s,c,l;return d(this,function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),a=e===`replay`?``:`_${e}`,o=`${n.apiKey.substring(0,10)}_amp_session_replay_events${a}`,[4,Nx(o)];case 1:return s=u.sent(),c=new t(r(r({},n),{db:s})),[4,c.transitionFromKeyValStore(i)];case 2:return u.sent(),[2,c];case 3:return l=u.sent(),n.loggerProvider.warn(`${xx}: ${l}`),[3,4];case 4:return[2]}})})},t.prototype.getCurrentSequenceEvents=function(e){return b(this,void 0,void 0,function(){var t,n,r,i,t,a,o,s;return d(this,function(c){switch(c.label){case 0:return e?[4,this.db.get(`sessionCurrentSequence`,e)]:[3,2];case 1:return t=c.sent(),t?[2,[t]]:[2,void 0];case 2:n=[],c.label=3;case 3:return c.trys.push([3,8,9,10]),[4,this.db.getAll(`sessionCurrentSequence`)];case 4:r=l.apply(void 0,[c.sent()]),i=r.next(),c.label=5;case 5:if(i.done)return[3,7];t=i.value,n.push(t),c.label=6;case 6:return i=r.next(),[3,5];case 7:return[3,10];case 8:return a=c.sent(),o={error:a},[3,10];case 9:try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(o)throw o.error}return[7];case 10:return[2,n]}})})},t}(Ex),Fx=function(e){u(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t}return t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,n=c([],p(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:n},this.resetCurrentSequence(e),{sequenceId:t,events:n,sessionId:e}},t.prototype.getSequencesToSend=function(){return b(this,void 0,void 0,function(){return d(this,function(e){return[2,Object.entries(this.finalizedSequences).map(function(e){var t=p(e,2),n=t[0],r=t[1],i=r.sessionId,a=r.events;return{sequenceId:Number(n),sessionId:i,events:a}})]})})},t.prototype.storeCurrentSequence=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return this.sequences[e]?[2,this.addSequence(e)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(e,t){return b(this,void 0,void 0,function(){var n;return d(this,function(r){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(n=this.addSequence(e)),this.sequences[e].push(t),[2,n]})})},t.prototype.storeSendingEvents=function(e,t){return b(this,void 0,void 0,function(){return d(this,function(n){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(e,t){return b(this,void 0,void 0,function(){return d(this,function(e){return t!==void 0&&delete this.finalizedSequences[t],[2]})})},t}(Ex),Ix=function(e){var t=e.config,n=e.sessionId,i=e.minInterval,a=e.maxInterval,o=e.type,s=e.payloadBatcher,c=e.storeType;return b(void 0,void 0,void 0,function(){function e(e){return e===void 0&&(e=!1),b(this,void 0,void 0,function(){return d(this,function(t){return[2,l.flush(e)]})})}var l,u,f,p,m,h,g,_,v;return d(this,function(y){switch(y.label){case 0:return l=new Tx(r(r({},t),{loggerProvider:t.loggerProvider,payloadBatcher:s})),u=function(){return new Fx({loggerProvider:t.loggerProvider,maxInterval:a,minInterval:i})},f=function(){return b(void 0,void 0,void 0,function(){var e;return d(this,function(r){switch(r.label){case 0:return[4,Px.new(o,{loggerProvider:t.loggerProvider,minInterval:i,maxInterval:a,apiKey:t.apiKey},n)];case 1:return e=r.sent(),t.loggerProvider.log(`Failed to initialize idb store, falling back to memory store.`),[2,e??u()]}})})},c===`idb`?[4,f()]:[3,2];case 1:return m=y.sent(),[3,3];case 2:m=u(),y.label=3;case 3:return p=m,h=function(e){var n=e.events,r=e.sessionId,i=e.deviceId,a=e.sequenceId;t.debugMode&&xb().then(function(e){var n=e.totalStorageSize,r=e.percentOfQuota,i=e.usageDetails;t.loggerProvider.debug(`Total storage size: ${n} KB, percentage of quota: ${r}%, usage details: ${i}`)}).catch(function(){}),l.sendEventsList({events:n,sessionId:r,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:i,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:o,onComplete:function(){return b(void 0,void 0,void 0,function(){return d(this,function(e){switch(e.label){case 0:return[4,p.cleanUpSessionEventsStore(r,a)];case 1:return e.sent(),[2]}})})}})},g=function(e){var n=e.sessionId,r=e.deviceId;p.storeCurrentSequence(n).then(function(e){e&&h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})}).catch(function(e){t.loggerProvider.warn(`Failed to get current sequence of session replay events for session:`,e)})},_=function(e){var t=e.deviceId;return b(void 0,void 0,void 0,function(){var e;return d(this,function(n){switch(n.label){case 0:return[4,p.getSequencesToSend()];case 1:return e=n.sent(),e&&e.forEach(function(e){h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})}),[2]}})})},v=function(e){var n=e.event,r=e.sessionId,i=e.deviceId;p.addEventToCurrentSequence(r,n.data).then(function(e){return e&&h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:i})}).catch(function(e){t.loggerProvider.warn(`Failed to add event to session replay capture:`,e)})},[2,{sendCurrentSequenceEvents:g,addEvent:v,sendStoredEvents:_,flush:e}]}})})},Lx=function(){function e(){var e=[...arguments],t=new Map;e.forEach(function(e){t.set(e.name,e.manager)}),this.managers=t}return e.prototype.sendStoredEvents=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return t=[],this.managers.forEac
vendor: 4,509 bytes, line 275
275h(function(n){t.push(n.sendStoredEvents(e))}),[4,Promise.all(t)];case 1:return n.sent(),[2]}})})},e.prototype.addEvent=function(e){var t,n=e.sessionId,r=e.event,i=e.deviceId;(t=this.managers.get(r.type))==null||t.addEvent({sessionId:n,event:r,deviceId:i})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,n=e.deviceId;this.managers.forEach(function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:n})})},e.prototype.flush=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return t=[],this.managers.forEach(function(n){t.push(n.flush(e))}),[4,Promise.all(t)];case 1:return n.sent(),[2]}})})},e}(),Rx,zx,Bx;function Vx(e,t){if(Bx=new Date,e.nodeType!==Node.ELEMENT_NODE)throw Error(`Can't generate CSS selector for non-element node type.`);if(e.tagName.toLowerCase()===`html`)return`html`;var n={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};Rx=r(r({},n),t),zx=Hx(Rx.root,n);var i=Ux(e,`all`,function(){return Ux(e,`two`,function(){return Ux(e,`one`,function(){return Ux(e,`none`)})})});if(i){var a=aS(oS(i,e));return a.length>0&&(i=a[0]),Gx(i)}else throw Error(`Selector was not found.`)}function Hx(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function Ux(e,t,n){for(var r=null,i=[],a=e,o=0,s=function(){var e,s,u=new Date().getTime()-Bx.getTime();if(Rx.timeoutMs!==void 0&&u>Rx.timeoutMs)throw Error(`Timeout: Can't find a unique selector after ${u}ms`);var d=nS(Jx(a))||nS.apply(void 0,c([],p(Yx(a)),!1))||nS.apply(void 0,c([],p(Xx(a)),!1))||nS(Zx(a))||[Qx()],f=$x(a);if(t==`all`)f&&(d=d.concat(d.filter(tS).map(function(e){return eS(e,f)})));else if(t==`two`)d=d.slice(0,1),f&&(d=d.concat(d.filter(tS).map(function(e){return eS(e,f)})));else if(t==`one`){var m=p(d=d.slice(0,1),1)[0];f&&tS(m)&&(d=[eS(m,f)])}else t==`none`&&(d=[Qx()],f&&(d=[eS(d[0],f)]));try{for(var h=(e=void 0,l(d)),g=h.next();!g.done;g=h.next()){var m=g.value;m.level=o}}catch(t){e={error:t}}finally{try{g&&!g.done&&(s=h.return)&&s.call(h)}finally{if(e)throw e.error}}if(i.push(d),i.length>=Rx.seedMinLength&&(r=Wx(i,n),r))return`break`;a=a.parentElement,o++};a&&s()!==`break`;);return r||=Wx(i,n),!r&&n?n():r}function Wx(e,t){var n,r,i=aS(iS(e));if(i.length>Rx.threshold)return t?t():null;try{for(var a=l(i),o=a.next();!o.done;o=a.next()){var s=o.value;if(qx(s))return s}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return null}function Gx(e){for(var t=e[0],n=t.name,r=1;r<e.length;r++){var i=e[r].level||0;n=t.level===i-1?`${e[r].name} > ${n}`:`${e[r].name} ${n}`,t=e[r]}return n}function Kx(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function qx(e){var t=Gx(e);switch(zx.querySelectorAll(t).length){case 0:throw Error(`Can't select any node with this selector: ${t}`);case 1:return!0;default:return!1}}function Jx(e){var t=e.getAttribute(`id`);return t&&Rx.idName(t)?{name:`#`+CSS.escape(t),penalty:0}:null}function Yx(e){return Array.from(e.attributes).filter(function(e){return Rx.attr(e.name,e.value)}).map(function(e){return{name:`[${CSS.escape(e.name)}="${CSS.escape(e.value)}"]`,penalty:.5}})}function Xx(e){return Array.from(e.classList).filter(Rx.className).map(function(e){return{name:`.`+CSS.escape(e),penalty:1}})}function Zx(e){var t=e.tagName.toLowerCase();return Rx.tagName(t)?{name:t,penalty:2}:null}function Qx(){return{name:`*`,penalty:3}}function $x(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r}function eS(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function tS(e){return e.name!==`html`&&!e.name.startsWith(`#`)}function nS(){var e=[...arguments].filter(rS);return e.length>0?e:null}function rS(e){return e!=null}function iS(e,t){var n,r,i,a,o,s;return t===void 0&&(t=[]),d(this,function(c){switch(c.label){case 0:if(!(e.length>0))return[3,9];c.label=1;case 1:c.trys.push([1,6,7,8]),n=l(e[0]),r=n.next(),c.label=2;case 2:return r.done?[3,5]:(i=r.value,[5,l(iS(e.slice(1,e.length),t.concat(i)))]);case 3:c.sent(),c.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return a=c.sent(),o={error:a},[3,8];case 7:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}
vendor: 8,265 bytes, line 275
275return[7];case 8:return[3,11];case 9:return[4,t];case 10:c.sent(),c.label=11;case 11:return[2]}})}function aS(e){return c([],p(e),!1).sort(function(e,t){return Kx(e)-Kx(t)})}function oS(e,t,n){var r,i,a;return n===void 0&&(n={counter:0,visited:new Map}),d(this,function(o){switch(o.label){case 0:if(!(e.length>2&&e.length>Rx.optimizedMinLength))return[3,5];r=1,o.label=1;case 1:return r<e.length-1?n.counter>Rx.maxNumberOfTries||(n.counter+=1,i=c([],p(e),!1),i.splice(r,1),a=Gx(i),n.visited.has(a))?[2]:qx(i)&&sS(i,t)?[4,i]:[3,4]:[3,5];case 2:return o.sent(),n.visited.set(a,!0),[5,l(oS(i,t,n))];case 3:o.sent(),o.label=4;case 4:return r++,[3,1];case 5:return[2]}})}function sS(e,t){return zx.querySelector(Gx(e))===t}var cS=36e5,lS=function(e){var t=e.version,n=e.events,r=[];return n.forEach(function(e){var t=JSON.parse(e);t.count=1,t.type===`click`&&r.push(t)}),{version:t,events:r}},uS=function(e){var t=e.version,n=e.events,i=[];n.forEach(function(e){var t=JSON.parse(e);t.type===`click`&&i.push(t)});var a=i.reduce(function(e,t){var n=t.x,i=t.y,a=t.selector,o=t.timestamp,s=o-o%cS,c=`${n}:${i}:${a??``}:${s}`;return e[c]?e[c].count+=1:e[c]=r(r({},t),{timestamp:s,count:1}),e},{});return{version:t,events:Object.values(a)}},dS=function(){function e(e,t){var n=this;this.createHook=function(e){var t=e.eventsManager,r=e.sessionId,i=e.deviceIdFn,a=e.mirror,o=e.ugcFilterRules,s=e.performanceOptions;return function(e){if(e.type===Eb.Click){var c=I();if(c){var l=c.location,u=c.innerHeight,d=c.innerWidth;if(l){var f=e.x,p=e.y;if(!(f===void 0||p===void 0)){var m=a.getNode(e.id),h;if(m)try{h=Vx(m,s)}catch{n.logger.debug(`error resolving selector from finder`)}var g=bb(l.href,o),_={x:f+n.scrollWatcher.currentScrollX,y:p+n.scrollWatcher.currentScrollY,selector:h,viewportHeight:u,viewportWidth:d,pageUrl:g,timestamp:Date.now(),type:`click`},v=i();v&&t.addEvent({sessionId:r,event:{type:`interaction`,data:JSON.stringify(_)},deviceId:v})}}}}}},this.logger=e,this.scrollWatcher=t}return e}();function fS(){return I()?.innerHeight||document.documentElement&&document.documentElement.clientHeight||0}function pS(){return I()?.innerWidth||document.documentElement&&document.documentElement.clientWidth||0}var mS=function(){function e(e,t){var n=I();n&&n.navigator&&typeof n.navigator.sendBeacon==`function`?this.sendBeacon=function(e,t){try{if(n.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch{}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var n=new XMLHttpRequest;return n.open(`POST`,e,!0),n.setRequestHeader(`Accept`,`*/*`),n.send(JSON.stringify(t)),!0},this.basePageUrl=gb(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var n=this.context,r=n.sessionId,i=n.type,a=new URLSearchParams({device_id:e,session_id:String(r),type:String(i),api_key:this.apiKey}),o=`${this.basePageUrl}?${a.toString()}`;this.sendBeacon(o,t)||this.sendXhr(o,t)},e}(),hS=function(){function e(e,t){var n=this;this.timestamp=Date.now(),this.hook=function(e){n.update(e)},this.send=function(e){return function(t){var r=e(),i=I();i&&r&&n.transport.send(r,{version:1,events:[{maxScrollX:n._maxScrollX,maxScrollY:n._maxScrollY,maxScrollWidth:n._maxScrollWidth,maxScrollHeight:n._maxScrollHeight,viewportHeight:fS(),viewportWidth:pS(),pageUrl:bb(i.location.href,n.config.interactionConfig?.ugcFilterRules??[]),timestamp:n.timestamp,type:`scroll`}]})}},this._maxScrollX=0,this._maxScrollY=0,this._currentScrollX=0,this._currentScrollY=0,this._maxScrollWidth=pS(),this._maxScrollHeight=fS(),this.config=t,this.transport=e}return e.default=function(t,n){return new e(new mS(t,n),n)},Object.defineProperty(e.prototype,`maxScrollX`,{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`maxScrollY`,{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`maxScrollWidth`,{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`maxScrollHeight`,{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`currentScrollX`,{get:function(){return this._currentScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`currentScrollY`,{get:function(){return this._currentScrollY},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(this._currentScrollX=e.x,this._currentScrollY=e.y,e.x>this._maxScrollX){var n=pS();this._maxScrollX=e.x;var r=e.x+n;r>this._maxScrollWidth&&(this._maxScrollWidth=r),this.timestamp=t}if(e.y>this._maxScrollY){var i=fS();this._maxScrollY=e.y;var a=e.y+i;a>this._maxScrollHeight&&(this._maxScrollHeight=a),this.timestamp=t}},e}(),gS=function(){function e(e){var t=e.sessionId,n=e.deviceId;this.deviceId=n,this.sessionId=t,t&&n&&(this.sessionReplayId=hb(t,n))}return e}(),_S=new(function(){function e(){var e=this;this.dbs={},this.createStore=function(t){return b(e,void 0,void 0,function(){return d(this,function(e){switch(e.label){case 0:return[4,i(t,1,{upgrade:function(e){e.objectStoreNames.contains(`sessionTargetingMatch`)||e.createObjectStore(`sessionTargetingMatch`,{keyPath:`sessionId`})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return b(e,void 0,void 0,function(){var e,n;return d(this,function(r){switch(r.label){case 0:return this.dbs&&this.dbs[t]?[2,this.dbs[t]]:(e=`${t.substring(0,10)}_amp_session_replay_targeting`,[4,this.createStore(e)]);case 1:return n=r.sent(),this.dbs[t]=n,[2,n]}})})},this.getTargetingMatchForSession=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.sessionId;return b(e,void 0,void 0,function(){var e,t,a,o;return d(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,this.openOrCreateDB(r)];case 1:return e=s.sent(),t=String(i),[4,e.get(`sessionTargetingMatch`,t)];case 2:return a=s.sent(),[2,a?.targetingMatch];case 3:return o=s.sent(),n.warn(`Failed to get targeting match for session id ${i}: ${o}`),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.sessionId,a=t.targetingMatch;return b(e,void 0,void 0,function(){var e,t,o,s;return d(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),[4,this.openOrCreateDB(r)];case 1:return e=c.sent(),t=String(i),[4,e.put(`sessionTargetingMatch`,{targetingMatch:a,sessionId:t,lastUpdated:Date.now()})];case 2:return o=c.sent(),[2,o];case 3:return s=c.sent(),n.warn(`Failed to store targeting match for session id ${i}: ${s}`),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.currentSessionId;return b(e,void 0,void 0,function(){var e,t,a,o,s,c,l,u;return d(this,function(d){switch(d.label){case 0:return d.trys.push([0,8,,9]),[4,this.openOrCreateDB(r)];case 1:return e=d.sent(),t=String(i),a=e.transaction(`sessionTargetingMatch`,`readwrite`),[4,a.store.getAll()];case 2:o=d.sent(),s=0,d.label=3;case 3:return s<o.length?(c=o[s],l=Date.now()-c.lastUpdated,c.sessionId!==t&&l>1728e5?[4,a.store.delete(c.sessionId)]:[3,5]):[3,6];case 4:d.sent(),d.label=5;case 5:return s++,[3,3];case 6:return[4,a.done];case 7:return d.sent(),[3,9];case 8:return u=d.sent(),n.warn(`Failed to clear old targeting matches for sessions: ${u}`),[3,9];case 9:return[2]}})})}}return e}()),vS=function(e){var t=e.sessionId,n=e.targetingConfig,i=e.loggerProvider,a=e.apiKey,o=e.targetingParams;return b(void 0,void 0,void 0,function(){var e,s,c,l,u,f;return d(this,function(d){switch(d.label){case 0:return[4,_S.clearStoreOfOldSessions({loggerProvider:i,apiKey:a,currentSessionId:t})];case 1:return d.sent(),[4,_S.getTargetingMatchForSession({loggerProvider:i,apiKey:a,sessionId:t})];case 2:if(e=d.sent(),e===!0)return[2,!0];s=!0,d.label=3;case 3:return d.trys.push([3,6,,7]),[4,k(()=>import(`./esm-DgC41OCD.js`),__vite__mapDeps([0,1,2,3]))];case 4:return c=d.sent().evaluateTargeting,[4,c(r(r({},o),{flag:n,sessionId:typeof t==`string`?parseInt(t,10):t,apiKey:a,loggerProvider:i}))];case 5:return l=d.sent(),l&&l.sr_targeting_config&&(s=l.sr_targeting_config.key===`on`),_S.storeTargetingMatchForSession({loggerProvider:i,apiKey:a,sessionId:t,targetingMatch:s}
vendor: 6,004 bytes, line 275
275),[3,7];case 6:return u=d.sent(),f=u,i.warn(f.message),[3,7];case 7:return[2,s]}})})};function yS(e){return e===void 0&&(e={}),{name:`amplitude/url-tracking@1`,observer:function(t,n,i){var a=r(r({},e),i),o=a.ugcFilterRules||[],s=a.enablePolling??!1,c=a.pollingInterval??qy,l=a.captureDocumentTitle??!1;if(!n)return function(){};var u=void 0,d=`__amplitude_url_tracking_patched__`,f=`__amplitude_url_tracking_reset__`,p=function(){return n.location&&n.location.href||``},m=function(){var e=n.innerHeight,t=n.innerWidth,r=n.document,i=p(),a=``;return l&&(a=r?.title||``),{href:o.length>0?bb(i,o):i,title:a,viewportHeight:e,viewportWidth:t,type:`url-change-event`}},h=function(){var e=p();(u===void 0||e!==u)&&(u=e,t(m()))},g=function(e){var t=function(){var t=[...arguments],r=e.apply(this,t);return n[f]||h(),r};return t[d]=!0,t},_=function(){h()};if(s){var v=n.setInterval(function(){h()},c);return h(),function(){v&&n.clearInterval(v)}}if(n.history){var y=n.history.pushState.bind(n.history),b=n.history.replaceState.bind(n.history);return function(){n.history.pushState[d]||(n.history.pushState=g(y),n.history.replaceState=g(b))}(),n.addEventListener(`popstate`,h),n.addEventListener(`hashchange`,_),h(),function(){n[f]=!0,n.removeEventListener(`popstate`,h),n.removeEventListener(`hashchange`,_)}}return n.addEventListener(`hashchange`,_),h(),function(){n.removeEventListener(`hashchange`,_)}},options:e}}yS();var bS=function(){function e(){var e=this;this.name=`@amplitude/session-replay-browser`,this.recordCancelCallback=null,this.eventCount=0,this.sessionTargetingMatch=!1,this.pageLeaveFns=[],this.recordFunction=null,this.teardownEventListeners=function(t){var n=I();n&&(n.removeEventListener(`blur`,e.blurListener),n.removeEventListener(`focus`,e.focusListener),!t&&n.addEventListener(`blur`,e.blurListener),!t&&n.addEventListener(`focus`,e.focusListener),n.self&&`onpagehide`in n.self?(n.removeEventListener(`pagehide`,e.pageLeaveListener),!t&&n.addEventListener(`pagehide`,e.pageLeaveListener)):(n.removeEventListener(`beforeunload`,e.pageLeaveListener),!t&&n.addEventListener(`beforeunload`,e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){e.recordEvents(!1)},this.pageLeaveListener=function(t){e.pageLeaveFns.forEach(function(e){e(t)})},this.evaluateTargetingAndCapture=function(t,n,r){return n===void 0&&(n=!1),r===void 0&&(r=!1),b(e,void 0,void 0,function(){var e,i;return d(this,function(a){switch(a.label){case 0:if(!this.identifiers||!this.identifiers.sessionId||!this.config)return this.identifiers&&!this.identifiers.sessionId?this.loggerProvider.log(`Session ID has not been set yet, cannot evaluate targeting for Session Replay.`):this.loggerProvider.warn(`Session replay init has not been called, cannot evaluate targeting.`),[2];if(!this.config.targetingConfig)if(n)this.loggerProvider.log(`Targeting config has not been set yet, cannot evaluate targeting.`);else return this.loggerProvider.log(`No targeting config set, skipping initialization/recording for event.`),[2];return this.lastTargetingParams=t,this.config.targetingConfig&&!this.sessionTargetingMatch?(e=t.event,e&&Object.values(j).includes(e.event_type)&&(e=void 0),i=this,[4,vS({sessionId:this.identifiers.sessionId,targetingConfig:this.config.targetingConfig,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:t.userProperties,event:e}})]):[3,2];case 1:i.sessionTargetingMatch=a.sent(),this.loggerProvider.debug(JSON.stringify({name:`targeted replay capture config`,sessionTargetingMatch:this.sessionTargetingMatch,event:e,targetingParams:t},null,2)),a.label=2;case 2:return n?(this.initialize(!0),[3,5]):[3,3];case 3:return r||!this.recordCancelCallback?(this.loggerProvider.log(`Recording events for session due to forceRestart or no ongoing recording.`),[4,this.recordEvents()]):[3,5];case 4:a.sent(),a.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(t,n,i){return n===void 0&&(n={}),i===void 0&&(i=!0),b(e,void 0,void 0,function(){var e,a,o,s;return d(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),e=void 0,a=this.config,!(a&&t!==ob.METADATA)||(e={config:Sb(a),version:wx},!i)?[3,2]:[4,xb()];case 1:o=c.sent(),e=r(r({},o),e),c.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(t,r(r({},n),e)):this.loggerProvider.debug(`Not able to add custom replay capture event ${t} due to no ongoing recording.`),[3,4];case 3:return s=c.sent(),this.loggerProvider.debug(`Error while adding custom replay capture event: `,s),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var t;try{e.loggerProvider.log(`Session Replay capture stopping.`),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,(t=e.networkObservers)==null||t.stop()}catch(t){var n=t;e.loggerProvider.warn(`Error occurred while stopping replay capture: ${n.toString()}`)}},this.loggerProvider=new sb(new Qe)}return e.prototype.init=function(e,t){return Ge(this._init(e,t))},e.prototype._init=function(e,t){return b(this,void 0,void 0,function(){var n,r,i,a,o,s,l,u,f,m,h,g,_,v,h,y,b,x;return d(this,function(d){switch(d.label){case 0:return this.loggerProvider=new sb(t.loggerProvider||new Qe),Object.prototype.hasOwnProperty.call(t,`logLevel`)&&this.loggerProvider.enable(t.logLevel),this.identifiers=new gS({sessionId:t.sessionId,deviceId:t.deviceId}),n=this,[4,kb(e,t)];case 1:return n.joinedConfigGenerator=d.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:r=d.sent(),i=r.joinedConfig,a=r.localConfig,o=r.remoteConfig,this.config=i,this.setMetadata(t.sessionId,i,a,o,t.version?.version,wx,t.version?.type),t.sessionId&&this.config.interactionConfig?.enabled&&(s=hS.default({sessionId:t.sessionId,type:`interaction`},this.config),this.pageLeaveFns=[s.send(this.getDeviceId.bind(this)).bind(s)],this.scrollHook=s.hook.bind(s),this.clickHandler=new dS(this.loggerProvider,s)),l=[],u=this.config.storeType,u===`i
275db`&&!I()?.indexedDB&&(u=`memory`,this.loggerProvider.warn(`Could not use preferred indexedDB storage, reverting to in memory option.`)),this.loggerProvider.log(`Using ${u} for event storage.`),d.label=3;case 3:return d.trys.push([3,5,,6]),[4,Ix({config:this.config,sessionId:this.identifiers.sessionId,type:`replay`,storeType:u})];case 4:return f=d.sent(),l.push({name:`replay`,manager:f}),[3,6];case 5:return m=d.sent(),h=m,this.loggerProvider.warn(`Error occurred while creating replay events manager: ${h.toString()}`),[3,6];case 6:if(!this.config.interactionConfig?.enabled)return[3,10];g=this.config.interactionConfig.batch?uS:lS,d.label=7;case 7:return d.trys.push([7,9,,10]),[4,Ix({config:this.config,sessionId:this.identifiers.sessionId,type:`interaction`,minInterval:this.config.interactionConfig.trackEveryNms??tb,maxInterval:nb,payloadBatcher:g,storeType:u})];case 8:return _=d.sent(),l.push({name:`interaction`,manager:_}),[3,10];case 9:return v=d.sent(),h=v,this.loggerProvider.warn(`Error occurred while creating interaction events manager: ${h.toString()}`),[3,10];case 10:return this.eventsManager=new(Lx.bind.apply(Lx,c([void 0],p(l),!1))),this.eventCompressor&&this.eventCompressor.terminate(),y=void 0,b=I(),this.config.useWebWorker&&b&&b.Worker?[4,k(()=>import(`./worker-DLsalf-i.js`),[])]:[3,12];case 11:x=d.sent().compressionScript,y=x,d.label=12;case 12:return this.eventCompressor=new _x(this.eventsManager,this.config,this.getDeviceId(),y),[4,this.initializeNetworkObservers()];case 13:return d.sent(),this.loggerProvider.log(`Installing @amplitude/session-replay-browser.`),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:t.userProperties},!0)];case 14:return d.sent(),[2]}})})},e.prototype.setSessionId=function(e,t){return Ge(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t,n){return b(this,void 0,void 0,function(){var r,i,a;return d(this,function(o){switch(o.label){case 0:return this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,r=this.identifiers&&this.identifiers.sessionId,r&&this.sendEvents(r),i=t||this.getDeviceId(),this.identifiers=new gS({sessionId:e,deviceId:i}),this.joinedConfigGenerator&&r?[4,this.joinedConfigGenerator.generateJoinedConfig()]:[3,2];case 1:a=o.sent().joinedConfig,this.config=a,o.label=2;case 2:return this.config?.targetingConfig?[4,this.evaluateTargetingAndCapture({userProperties:n?.userProperties},!1,!0)]:[3,4];case 3:return o.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:o.sent(),o.label=6;case 6:return[2]}})})},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,n=this.identifiers;if(!t||!n)return this.loggerProvider.warn(`Session replay init has not been called, cannot get session replay properties.`),{};var r=this.getShouldRecord(),i={};return r&&(i=(e={},e[Wy]=n.sessionReplayId?n.sessionReplayId:null,e),t.debugMode&&(i[Jy]=JSON.stringify({appHash:Ft(t.apiKey).toString()}))),this.addCustomRRWebEvent(ob.GET_SR_PROPS,{shouldRecord:r,eventProperties:i},this.eventCount===10),this.eventCount===10&&(this.eventCount=0),this.eventCount++,i},e.prototype.sendEvents=function(e){var t=e||this.identifiers?.sessionId,n=this.getDeviceId();this.eventsManager&&t&&n&&this.eventsManager.sendCurrentSequenceEvents({sessionId:t,deviceId:n})},e.prototype.initialize=function(e){return e===void 0&&(e=!1),b(this,void 0,void 0,function(){var t;return d(this,function(n){return this.identifiers?.sessionId?(t=this.getDeviceId(),t?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:t}),[2,this.recordEvents()]):(this.loggerProvider.log(`Session is not being recorded due to lack of device id.`),[2,Promise.resolve()])):(this.loggerProvider.log(`Session is not being recorded due to lack of session id.`),[2,Promise.resolve()])})})},e.prototype.shouldOptOut=function(){var e;return this.config?.instanceName&&(e=Ct(this.config.instanceName).identityStore.getIdentity().optOut),e===void 0?this.config?.optOut:e},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn(`Session is not being recorded due to lack of config, please call sessionReplay.init.`),!1;if(!this.config.captureEnabled)return this.loggerProvider.log(`Session ${this.identifiers.sessionId}
275 not being captured due to capture being disabled for project or because the remote config could not be fetched.`),!1;if(this.shouldOptOut())return this.loggerProvider.log(`Opting session ${this.identifiers.sessionId} out of recording due to optOut config.`),!1;var e=!1,t=``,n=!1;return this.config.targetingConfig?this.sessionTargetingMatch?(t=`Capturing replays for session ${this.identifiers.sessionId} due to matching targeting conditions.`,this.loggerProvider.log(t),e=!0,n=!0):(t=`Not capturing replays for session ${this.identifiers.sessionId} due to not matching targeting conditions.`,this.loggerProvider.log(t),e=!1,n=!1):It(this.identifiers.sessionId,this.config.sampleRate)?(e=!0,n=!0):(t=`Opting session ${this.identifiers.sessionId} out of recording due to sample rate.`,this.loggerProvider.log(t),e=!1,n=!1),this.lastShouldRecordDecision!==e&&this.config.targetingConfig&&(this.addCustomRRWebEvent(ob.TARGETING_DECISION,{message:t,sessionId:this.identifiers.sessionId,matched:n,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=e),e},e.prototype.getBlockSelectors=function(){var e=this.config?.privacyConfig?.blockSelector??[];if(e.length!==0)return e},e.prototype.getMaskTextSelectors=function(){if(this.config?.privacyConfig?.defaultMaskLevel===`conservative`)return`*`;var e=this.config?.privacyConfig?.maskSelector;if(e)return e},e.prototype.getRecordingPlugins=function(e){return b(this,void 0,void 0,function(){var t,n,r,i;return d(this,function(a){switch(a.label){case 0:t=[];try{n=yS({ugcFilterRules:this.config?.interactionConfig?.ugcFilterRules||[],enablePolling:this.config?.enableUrlChangePolling||!1,pollingInterval:this.config?.urlChangePollingInterval,captureDocumentTitle:this.config?.captureDocumentTitle}),t.push(n)}catch(e){this.loggerProvider.warn(`Failed to create URL tracking plugin:`,e)}if(!e?.console?.enabled)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,k(()=>import(`./rrweb-plugin-console-record-CGYh08dg.js`),[])];case 2:return r=a.sent().getRecordConsolePlugin,t.push(r({level:e.console.levels})),[3,4];case 3:return i=a.sent(),this.loggerProvider.warn(`Failed to load console plugin:`,i),[3,4];case 4:return[2,t.length>0?t:void 0]}})})},e.prototype.getRecordFunction=function(){return b(this,void 0,void 0,function(){var e,t;return d(this,function(n){switch(n.label){case 0:if(this.recordFunction)return[2,this.recordFunction];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,k(()=>import(`./rrweb-record-C524H7Ae.js`),[])];case 2:return e=n.sent().record,this.recordFunction=e,[2,e];case 3:return t=n.sent(),this.loggerProvider.warn(`Failed to load rrweb-record module:`,t),[2,null];case 4:return[2]}})})},e.prototype.recordEvents=function(e){var t;return e===void 0&&(e=!0),b(this,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u,f,p,m,h,g=this;return d(this,function(d){switch(d.label){case 0:return n=this.config,r=this.getShouldRecord(),i=this.identifiers?.sessionId,!r||!i||!n?[2]:(this.stopRecordingEvents(),[4,this.getRecordFunction()]);case 1:return a=d.sent(),a?[4,this.initializeNetworkObservers()]:[2];case 2:d.sent(),(t=this.networkObservers)==null||t.start(function(e){g.addCustomRRWebEvent(ob.FETCH_REQUEST,e)}),o=n.privacyConfig,s=n.interactionConfig,c=n.loggingConfig,l=s?.enabled?{mouseInteraction:this.eventsManager&&this.clickHandler?.createHook({eventsManager:this.eventsManager,sessionId:i,deviceIdFn:this.getDeviceId.bind(this),mirror:a.mirror,ugcFilterRules:s.ugcFilterRules??[],performanceOptions:n.performanceConfig?.interaction}),scroll:this.scrollHook}:{},u=s?.enabled&&s.ugcFilterRules?s.ugcFilterRules:[],this.loggerProvider.log(`Session Replay capture beginning for ${i}.`),d.label=3;case 3:return d.trys.push([3,5,,6]),f=this,p=a,h={emit:function(e){if(g.shouldOptOut()){g.loggerProvider.log(`Opting session ${i} out of recording due to optOut config.`),g.stopRecordingEvents(),g.sendEvents();return}e.type===Tb.Meta&&(e.data.href=bb(e.data.href,u)),g.eventCompressor&&g.eventCompressor.enqueueEvent(e,i)},inlineStylesheet:n.shouldInlineStylesheet,hooks:l,maskAllInputs:!0,maskTextClass:Xy,blockClass:Yy,blockSelector:this.getBlockSelectors(),applyBackgroun
275dColorToBlockedElements:n.applyBackgroundColorToBlockedElements,maskInputFn:pb(`input`,o),maskTextFn:pb(`text`,o),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,slimDOMOptions:{script:n.omitElementTags?.script,comment:n.omitElementTags?.comment},errorHandler:function(e){var t=e;if(t.message.includes(`insertRule`)&&t.message.includes(`CSSStyleSheet`)||t._external_)throw t;return g.loggerProvider.warn(`Error while capturing replay: `,t.toString()),!0}},[4,this.getRecordingPlugins(c)];case 4:return f.recordCancelCallback=p.apply(void 0,[(h.plugins=d.sent(),h)]),this.addCustomRRWebEvent(ob.DEBUG_INFO),e&&this.addCustomRRWebEvent(ob.METADATA,this.metadata),[3,6];case 5:return m=d.sent(),this.loggerProvider.warn(`Failed to initialize session replay:`,m),[3,6];case 6:return[2]}})})},e.prototype.getDeviceId=function(){return this.identifiers?.deviceId},e.prototype.getSessionId=function(){return this.identifiers?.sessionId},e.prototype.flush=function(e){return e===void 0&&(e=!1),b(this,void 0,void 0,function(){return d(this,function(t){return[2,this.eventsManager?.flush(e)]})})},e.prototype.shutdown=function(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e.prototype.mapSDKType=function(e){return e===`plugin`?`@amplitude/plugin-session-replay-browser`:e===`segment`?`@amplitude/segment-session-replay-plugin`:null},e.prototype.setMetadata=function(e,t,n,r,i,a,o){this.metadata={joinedConfig:t,localConfig:n,remoteConfig:r,sessionId:e,hashValue:e?.toString()?Ft(e.toString()):void 0,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(o),replaySDKVersion:i,standaloneSDKType:`@amplitude/session-replay-browser`,standaloneSDKVersion:a}},e.prototype.initializeNetworkObservers=function(){return b(this,void 0,void 0,function(){var e,t;return d(this,function(n){switch(n.label){case 0:if(!(this.config?.loggingConfig?.network?.enabled&&!this.networkObservers))return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,k(()=>import(`./observers-BtOizljl.js`),__vite__mapDeps([4,1,2,3]))];case 2:return e=n.sent().NetworkObservers,this.networkObservers=new e,[3,4];case 3:return t=n.sent(),this.loggerProvider.warn(`Failed to import or instantiate NetworkObservers:`,t),[3,4];case 4:return[2]}})})},e}(),xS=function(e){return function(){var t=e.config||Cb();return{logger:t.loggerProvider,logLevel:t.logLevel}}},SS=function(){var e=new bS;return{init:z(e.init.bind(e),`init`,xS(e)),evaluateTargetingAndCapture:z(e.evaluateTargetingAndCapture.bind(e),`evaluateTargetingAndRecord`,xS(e)),setSessionId:z(e.setSessionId.bind(e),`setSessionId`,xS(e)),getSessionId:z(e.getSessionId.bind(e),`getSessionId`,xS(e)),getSessionReplayProperties:z(e.getSessionReplayProperties.bind(e),`getSessionReplayProperties`,xS(e)),flush:z(e.flush.bind(e),`flush`,xS(e)),shutdown:z(e.shutdown.bind(e),`shutdown`,xS(e))}}(),CS=SS.init,wS=SS.setSessionId,TS=SS.getSessionId,ES=SS.getSessionReplayProperties,DS=SS.flush,OS=SS.shutdown,kS=SS.evaluateTargetingAndCapture,AS=function(){function e(){this.fetchObserver=null}return e.prototype.start=function(e){this.eventCallback=e,this.observeFetch()},e.prototype.stop=function(){var e;(e=this.fetchObserver)==null||e.call(this),this.fetchObserver=null,this.eventCallback=void 0},e.prototype.notifyEvent=function(e){var t;(t=this.eventCallback)==null||t.call(this,e)},e.prototype.observeFetch=function(){var e=this,t=I();if(t){var n=t.fetch;n&&(t.fetch=function(t,r){return b(e,void 0,void 0,function(){var e,i,a,o,s,c,o,l;return d(this,function(u){switch(u.label){case 0:e=Date.now(),i={timestamp:e,type:`fetch`,method:r?.method||`GET`,url:t.toString(),requestHeaders:r?.headers},u.label=1;case 1:return u.trys.push([1,3,,4]),[4,n(t,r)];case 2:return a=u.sent(),o=Date.now(),i.status=a.status,i.duration=o-e,s={},a.headers.forEach(function(e,t){s[t]=e}),i.responseHeaders=s,this.notifyEvent(i),[2,a];case 3:throw c=u.sent(),o=Date.now(),i.duration=o-e,l=c,i.error={name:l.name||`UnknownError`,message:l.message||`An unknown error occurred`},this.notifyEvent(i),c;case 4:return[2]}})})},this.fetchObserver=function(){t.fetch=n})}},e}(),jS
vendor: 7,048 bytes, lines 275-276
275=`var WebWorker=function(r){"use strict";var n=Uint8Array,e=Uint16Array,f=Uint32Array,t=new n([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new n([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),i=function(r,n){for(var t=new e(31),a=0;a<31;++a)t[a]=n+=1<<r[a-1];var o=new f(t[30]);for(a=1;a<30;++a)for(var i=t[a];i<t[a+1];++i)o[i]=i-t[a]<<5|a;return[t,o]},v=i(t,2),u=v[0],s=v[1];u[28]=258,s[258]=28;for(var l=i(a,0)[1],c=new e(32768),h=0;h<32768;++h){var g=(43690&h)>>>1|(21845&h)<<1;g=(61680&(g=(52428&g)>>>2|(13107&g)<<2))>>>4|(3855&g)<<4,c[h]=((65280&g)>>>8|(255&g)<<8)>>>1}var w=function(r,n,f){for(var t=r.length,a=0,o=new e(n);a<t;++a)++o[r[a]-1];var i,v=new e(n);for(a=0;a<n;++a)v[a]=v[a-1]+o[a-1]<<1;if(f){i=new e(1<<n);var u=15-n;for(a=0;a<t;++a)if(r[a])for(var s=a<<4|r[a],l=n-r[a],h=v[r[a]-1]++<<l,g=h|(1<<l)-1;h<=g;++h)i[c[h]>>>u]=s}else for(i=new e(t),a=0;a<t;++a)i[a]=c[v[r[a]-1]++]>>>15-r[a];return i},d=new n(288);for(h=0;h<144;++h)d[h]=8;for(h=144;h<256;++h)d[h]=9;for(h=256;h<280;++h)d[h]=7;for(h=280;h<288;++h)d[h]=8;var m=new n(32);for(h=0;h<32;++h)m[h]=5;var y=w(d,9,0),M=w(m,5,0),p=function(r){return(r/8|0)+(7&r&&1)},b=function(r,t,a){(null==a||a>r.length)&&(a=r.length);var o=new(r instanceof e?e:r instanceof f?f:n)(a-t);return o.set(r.subarray(t,a)),o},C=function(r,n,e){e<<=7&n;var f=n/8|0;r[f]|=e,r[f+1]|=e>>>8},S=function(r,n,e){e<<=7&n;var f=n/8|0;r[f]|=e,r[f+1]|=e>>>8,r[f+2]|=e>>>16},x=function(r,f){for(var t=[],a=0;a<r.length;++a)r[a]&&t.push({s:a,f:r[a]});var o=t.length,i=t.slice();if(!o)return[new n(0),0];if(1==o){var v=new n(t[0].s+1);return v[t[0].s]=1,[v,1]}t.sort(function(r,n){return r.f-n.f}),t.push({s:-1,f:25001});var u=t[0],s=t[1],l=0,c=1,h=2;for(t[0]={s:-1,f:u.f+s.f,l:u,r:s};c!=o-1;)u=t[t[l].f<t[h].f?l++:h++],s=t[l!=c&&t[l].f<t[h].f?l++:h++],t[c++]={s:-1,f:u.f+s.f,l:u,r:s};var g=i[0].s;for(a=1;a<o;++a)i[a].s>g&&(g=i[a].s);var w=new e(g+1),d=A(t[c-1],w,0);if(d>f){a=0;var m=0,y=d-f,M=1<<y;for(i.sort(function(r,n){return w[n.s]-w[r.s]||r.f-n.f});a<o;++a){var p=i[a].s;if(!(w[p]>f))break;m+=M-(1<<d-w[p]),w[p]=f}for(m>>>=y;m>0;){var b=i[a].s;w[b]<f?m-=1<<f-w[b]++-1:++a}for(;a>=0&&m;--a){var C=i[a].s;w[C]==f&&(--w[C],++m)}d=f}return[new n(w),d]},A=function(r,n,e){return-1==r.s?Math.max(A(r.l,n,e+1),A(r.r,n,e+1)):n[r.s]=e},O=function(r){for(var n=r.length;n&&!r[--n];);for(var f=new e(++n),t=0,a=r[0],o=1,i=function(r){f[t++]=r},v=1;v<=n;++v)if(r[v]==a&&v!=n)++o;else{if(!a&&o>2){for(;o>138;o-=138)i(32754);o>2&&(i(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(i(a),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(a);o=1,a=r[v]}return[f.subarray(0,t),n]},T=function(r,n){for(var e=0,f=0;f<n.length;++f)e+=r[f]*n[f];return e},k=function(r,n,e){var f=e.length,t=p(n+2);r[t]=255&f,r[t+1]=f>>>8,r[t+2]=255^r[t],r[t+3]=255^r[t+1];for(var a=0;a<f;++a)r[t+a+4]=e[a];return 8*(t+4+f)},E=function(r,n,f,i,v,u,s,l,c,h,g){C(n,g++,f),++v[256];for(var p=x(v,15),b=p[0],A=p[1],E=x(u,15),J=E[0],N=E[1],U=O(b),D=U[0],I=U[1],W=O(J),_=W[0],j=W[1],P=new e(19),q=0;q<D.length;++q)P[31&D[q]]++;for(q=0;q<_.length;++q)P[31&_[q]]++;for(var z=x(P,7),B=z[0],F=z[1],G=19;G>4&&!B[o[G-1]];--G);var H,K,L,Q,R=h+5<<3,V=T(v,d)+T(u,m)+s,X=T(v,b)+T(u,J)+s+14+3*G+T(P,B)+(2*P[16]+3*P[17]+7*P[18]);if(R<=V&&R<=X)return k(n,g,r.subarray(c,c+h));if(C(n,g,1+(X<V)),g+=2,X<V){H=w(b,A,0),K=b,L=w(J,N,0),Q=J;var Y=w(B,F,0);C(n,g,I-257),C(n,g+5,j-1),C(n,g+10,G-4),g+=14;for(q=0;q<G;++q)C(n,g+3*q,B[o[q]]);g+=3*G;for(var Z=[D,_],$=0;$<2;++$){var rr=Z[$];for(q=0;q<rr.length;++q){var nr=31&rr[q];C(n,g,Y[nr]),g+=B[nr],nr>15&&(C(n,g,rr[q]>>>5&127),g+=rr[q]>>>12)}}}else H=y,K=d,L=M,Q=m;for(q=0;q<l;++q)if(i[q]>255){nr=i[q]>>>18&31;S(n,g,H[nr+257]),g+=K[nr+257],nr>7&&(C(n,g,i[q]>>>23&31),g+=t[nr]);var er=31&i[q];S(n,g,L[er]),g+=Q[er],er>3&&(S(n,g,i[q]>>>5&8191),g+=a[er])}else S(n,g,H[i[q]]),g+=K[i[q]];return S(n,g,H[256]),g+K[256]},J=new f([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),N=function(r,o,i,v,u){return function(r,o,i,v,u,c){var h=r.length,g=new n(v+h+5*(1+Math.floor(h/7e3))+u),w=g.subarray(v,g.length-u),d=0;if(!o||h<8)for(var m=0;m<=h;m+=65535){var y=m+65535;y<h?d=k(w,d,r.subarray(m,y)):(w[m]=c,d=k(w,d,r.subarray(m,h)))}else{for(var M=J[o-1],C=M>>>13,S=8191&M,x=(1<<i)-1,A=new e(32768),O=new e(x+1),T=Math.ceil(i/3),N=2*T,U=function(n){return(r[n]^r[n+1]<<T^r[n+2]<<N)&x},D=new f(25e3),I=new e(288),W=new e(32),_=0,j=0,P=(m=0,0),q=0,z=0;m<h;++m){var B=U(m),F=32767&m,G=O[B];if(A[F]=G,O[B]=F,q<=m){var H=h-m;if((_>7e3||P>24576)&&H>423){d=E(r,w,0,D,I,W,j,P,z,m-z,d),P=_=j=0,z=m;for(var K=0;K<286;++K)I[K]=0;for(K=0;K<30;++K)W[K]=0}var L=2,Q=0,R=S,V=F-G&32767;if(H>2&&B==U(m-V))for(var X=Math.min(C,H)-1,Y=Math.min(32767,m),Z=Math.min(258,H);V<=Y&&--R&&F!=G;){if(r[m+L]==r[m+L-V]){for(var $=0;$<Z&&r[m+$]==r[m+$-V];++$);if($>L){if(L=$,Q=V,$>X)break;var rr=Math.min(V,$-2),nr=0;for(K=0;K<rr;++K){var er=m-V+K+32768&32767,fr=er-A[er]+32768&32767;fr>nr&&(nr=fr,G=er)}}}V+=(F=G)-(G=A[F])+32768&32767}if(Q){D[P++]=268435456|s[L]<<18|l[Q];var tr=31&s[L],ar=31&l[Q];j+=t[tr]+a[ar],++I[257+tr],++W[ar],q=m+L,++_}else D[P++]=r[m],++I[r[m]]}}d=E(r,w,c,D,I,W,j,P,z,m-z,d)}return b(g,0,v+p(d)+u)}(r,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+o.mem,i,v,!0)};function U(r,n){void 0===n&&(n={});var e=function(){var r=1,n=0;return{p:function(e){for(var f=r,t=n,a=e.length,o=0;o!=a;){for(var i=Math.min(o+5552,a);o<i;++o)t+=f+=e[o];f%=65521,t%=65521}r=f,n=t},d:function(){return(r>>>8<<16|(255&n)<<8|n>>>8)+2*((255&r)<<23)}}}();e.p(r);var f,t,a,o=N(r,n,2,4);return f=o,t=n.level,a=0==t?0:t<6?1:9==t?3:2,f[0]=120,f[1]=a<<6|(a?32-2*a:1),function(r,n,e){for(;e;++n)r[n]=e,e>>>=8}(o,o.length-4,e.d()),o}const D=r=>{const e={...r,v:"v1"};return function(r,n){var e="";if(!n&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(r);for(var f=0;f<r.length;){var t=r[f++];t<128||n?e+=String.fromCharCode(t):t<224?e+=String.fromCharCode((31&t)<<6|63&r[f++]):t<240?e+=String.fromCharCode((15&t)<<12|(63&r[f++])<<6|63&r[f++]):(t=((15&t)<<18|(63&r[f++])<<12|(63&r[f++])<<6|63&r[f++])-65536,e+=String.fromCharCode(55296|t>>10,56320|1023&t))}return e}(U(function(r,e){var f=r.length;if(!e&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(r);for(var t=new n(r.length+(r.length>>>1)),a=0,o=function(r){t[a++]=r},i=0;i<f;++i){if(a+5>t.length){var v=new n(a+8+(f-i<<1));v.set(t),t=v}var u=r.charCodeAt(i);u<128||e?o(u):u<2048?(o(192|u>>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&r.charCodeAt(++i))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return b(t,0,a)}(JSON.stringify(e))),!0)};onmessage=r=>{const{event:n,sessionId:e}="string"==typeof r.data?JSON.parse(r.data):r.data,f=JSON.stringify(D(n));postMessage({compressedEvent:f,sessionId:e})};const I=onmessage;return r.compressionOnMessage=I,Object.defineProperty(r,"__esModule",{value:!0}),r}({}); 276`
vendor: 25,219 bytes, line 276
276,MS=function(e,t){return MS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},MS(e,t)};function NS(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);MS(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var PS=function(){return PS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},PS.apply(this,arguments)};function FS(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function IS(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function LS(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function RS(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function zS(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var $={IS:`is`,IS_NOT:`is not`,CONTAINS:`contains`,DOES_NOT_CONTAIN:`does not contain`,LESS_THAN:`less`,LESS_THAN_EQUALS:`less or equal`,GREATER_THAN:`greater`,GREATER_THAN_EQUALS:`greater or equal`,VERSION_LESS_THAN:`version less`,VERSION_LESS_THAN_EQUALS:`version less or equal`,VERSION_GREATER_THAN:`version greater`,VERSION_GREATER_THAN_EQUALS:`version greater or equal`,SET_IS:`set is`,SET_IS_NOT:`set is not`,SET_CONTAINS:`set contains`,SET_DOES_NOT_CONTAIN:`set does not contain`,SET_CONTAINS_ANY:`set contains any`,SET_DOES_NOT_CONTAIN_ANY:`set does not contain any`,REGEX_MATCH:`regex match`,REGEX_DOES_NOT_MATCH:`regex does not match`},BS=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)==55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)==56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return Uint8Array.from(t)},VS=-862048943,HS=461845907,US=15,WS=13,GS=5,KS=-430675100,qS=function(e,t){t===void 0&&(t=0);for(var n=BS(e),r=n.length,i=r>>2,a=t,o=0;o<i;o++)a=JS(ZS(n,o<<2),a);var s=i<<2,c=0;switch(r-s){case 3:c^=n[s+2]<<16,c^=n[s+1]<<8,c^=n[s],c=Math.imul(c,VS),c=XS(c,US),c=Math.imul(c,HS),a^=c;break;case 2:c^=n[s+1]<<8,c^=n[s],c=Math.imul(c,VS),c=XS(c,US),c=Math.imul(c,HS),a^=c;break;case 1:c^=n[s],c=Math.imul(c,VS),c=XS(c,US),c=Math.imul(c,HS),a^=c;break}return a^=r,YS(a)>>>0},JS=function(e,t){var n=e,r=t;return n=Math.imul(n,VS),n=XS(n,US),n=Math.imul(n,HS),r^=n,r=XS(r,WS),r=Math.imul(r,GS),r+KS|0},YS=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-2048144789),t^=t>>>13,t=Math.imul(t,-1028477387),t^=t>>>16,t},XS=function(e,t,n){n===void 0&&(n=32),t>n&&(t%=n);var r=(e&4294967295<<n-t>>>0)>>>0>>>n-t>>>0;return(e<<t|r)>>>0},ZS=function(e,t){return t===void 0&&(t=0),QS(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},QS=function(e){return(e&-16777216)>>>24|(e&16711680)>>>8|(e&65280)<<8|(e&255)<<24},$S=function(e,t){var n,r;if(!(!t||t.length===0)){try{for(var i=LS(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(!o||!e||typeof e!=`object`)return;e=e[o]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}if(e)return e}},eC=`^(\\d+)\\.(\\d+)(\\.(\\d+)(-(([-\\w]+\\.?)*))?)?$`,tC=function(){function e(e,t,n,r){r===void 0&&(r=void 0),this.major=e,this.minor=t,this.patch=n,this.preRelease=r}return e.parse=function(t){if(t){var n=new RegExp(eC).exec(t);if(n){var r=Number(n[1]),i=Number(n[2]);if(!(isNaN(r)||isNaN(i)))return new e(r,i,Number(n[4])||0,n[5]||void 0)}}},e.prototype.compareTo=function(e){return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:this.patch>e.patch?1:this.patch<e.patch||this.preRelease&&!e.preRelease?-1:!this.preRelease&&e.preRelease?1:this.preRelease&&e.preRelease?this.preRelease>e.preRelease?1:this.preRelease<e.preRelease?-1:0:0},e}(),nC=function(){function e(){}return e.prototype.evaluate=function(e,t){var n,r,i={},a={context:e,result:i};try{for(var o=LS(t),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.evaluateFlag(a,c);l&&(i[c.key]=l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.prototype.evaluateFlag=function(e,t){var n,r,i;try{for(var a=LS(t.segments),o=a.next();!o.done;o=a.next()){var s=o.value;if(i=this.evaluateSegment(e,t,s),i){var c=PS(PS(PS({},t.metadata),s.metadata),i.metadata);i=PS(PS({},i),{metadata:c});break}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.prototype.evaluateSegment=function(e,t,n){var r,i,a,o;if(!n.conditions){var s=this.bucket(e,n);return s===void 0?void 0:t.variants[s]}try{for(var c=LS(n.conditions),l=c.next();!l.done;l=c.next()){var u=l.value,d=!0;try{for(var f=(a=void 0,LS(u)),p=f.next();!p.done;p=f.next()){var m=p.value;if(d=this.matchCondition(e,m),!d)break}}catch(e){a={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}if(d){var s=this.bucket(e,n);return s===void 0?void 0:t.variants[s]}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}},e.prototype.matchCondition=function(e,t){var n=$S(e,t.selector);if(!n)return this.matchNull(t.op,t.values);if(this.isSetOperator(t.op)){var r=this.coerceStringArray(n);return r?this.matchSet(r,t.op,t.values):!1}else{var i=this.coerceString(n);return i===void 0?!1:this.matchString(i,t.op,t.values)}},e.prototype.getHash=function(e){return qS(e)},e.prototype.bucket=function(e,t){var n,r,i,a;if(!t.bucket)return t.variant;var o=this.coerceString($S(e,t.bucket.selector));if(!o||o.length===0)return t.variant;var s=`${t.bucket.salt}/${o}`,c=this.getHash(s),l=c%100,u=Math.floor(c/100);try{for(var d=LS(t.bucket.allocations),f=d.next();!f.done;f=d.next()){var p=f.value,m=p.range[0],h=p.range[1];if(l>=m&&l<h)try{for(var g=(i=void 0,LS(p.distributions)),_=g.next();!_.done;_=g.next()){var v=_.value,y=v.range[0],b=v.range[1];if(u>=y&&u<b)return v.variant}}catch(e){i={error:e}}finally{try{_&&!_.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return t.variant},e.prototype.matchNull=function(e,t){var n=this.containsNone(t);switch(e){case $.IS:case $.CONTAINS:case $.LESS_THAN:case $.LESS_THAN_EQUALS:case $.GREATER_THAN:case $.GREATER_THAN_EQUALS:case $.VERSION_LESS_THAN:case $.VERSION_LESS_THAN_EQUALS:case $.VERSION_GREATER_THAN:case $.VERSION_GREATER_THAN_EQUALS:case $.SET_IS:case $.SET_CONTAINS:case $.SET_CONTAINS_ANY:return n;case $.IS_NOT:case $.DOES_NOT_CONTAIN:case $.SET_DOES_NOT_CONTAIN:case $.SET_DOES_NOT_CONTAIN_ANY:return!n;default:return!1}},e.prototype.matchSet=function(e,t,n){switch(t){case $.SET_IS:return this.setEquals(e,n);case $.SET_IS_NOT:return!this.setEquals(e,n);case $.SET_CONTAINS:return this.matchesSetContainsAll(e,n);case $.SET_DOES_NOT_CONTAIN:return!this.matchesSetContainsAll(e,n);case $.SET_CONTAINS_ANY:return this.matchesSetContainsAny(e,n);case $.SET_DOES_NOT_CONTAIN_ANY:return!this.matchesSetContainsAny(e,n);default:return!1}},e.prototype.matchString=function(e,t,n){var r=this;switch(t){case $.IS:return this.matchesIs(e,n);case $.IS_NOT:return!this.matchesIs(e,n);case $.CONTAINS:return this.matchesContains(e,n);case $.DOES_NOT_CONTAIN:return!this.matchesContains(e,n);case $.LESS_THAN:case $.LESS_THAN_EQUALS:case $.GREATER_THAN:case $.GREATER_THAN_EQUALS:return this.matchesComparable(e,t,n,function(e){return r.parseNumber(e)},this.comparator);case $.VERSION_LESS_THAN:case $.VERSION_LESS_THAN_EQUALS:case $.VERSION_GREATER_THAN:case $.VERSION_GREATER_THAN_EQUALS:return this.matchesComparable(e,t,n,function(e){return tC.parse(e)},this.versionComparator);case $.REGEX_MATCH:return this.matchesRegex(e,n);case $.REGEX_DOES_NOT_MATCH:return!this.matchesRegex(e,n);default:return!1}},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var n=e.toLowerCase();if(n===`true`||n===`false`)return t.some(function(e){return e.toLowerCase()===n})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var n,r;try{for(var i=LS(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(e.toLowerCase().includes(o.toLowerCase()))return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e.prototype.matchesComparable=function(e,t,n,r,i){var a=this,o=r(e),s=n.map(function(e){return r(e)}).filter(function(e){return e!==void 0});return o===void 0||s.length===0?n.some(function(n){return a.comparator(e,t,n)}):s.some(function(e){return i(o,t,e)})},e.prototype.comparator=function(e,t,n){switch(t){case $.LESS_THAN:case $.VERSION_LESS_THAN:return e<n;case $.LESS_THAN_EQUALS:case $.VERSION_LESS_THAN_EQUALS:return e<=n;case $.GREATER_THAN:case $.VERSION_GREATER_THAN:return e>n;case $.GREATER_THAN_EQUALS:case $.VERSION_GREATER_THAN_EQUALS:return e>=n;default:return!1}},e.prototype.versionComparator=function(e,t,n){var r=e.compareTo(n);switch(t){case $.LESS_THAN:case $.VERSION_LESS_THAN:return r<0;case $.LESS_THAN_EQUALS:case $.VERSION_LESS_THAN_EQUALS:return r<=0;case $.GREATER_THAN:case $.VERSION_GREATER_THAN:return r>0;case $.GREATER_THAN_EQUALS:case $.VERSION_GREATER_THAN_EQUALS:return r>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return!!new RegExp(t).exec(e)})},e.prototype.containsNone=function(e){return e.some(function(e){return e===`(none)`})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case`true`:case`false`:return!0;default:return!1}})},e.prototype.parseNumber=function(e){return Number(e)??void 0},e.prototype.coerceString=function(e){if(e)return typeof e==`object`?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e)){var n=e;return n.map(function(e){return t.coerceString(e)}).filter(Boolean)}var r=String(e);try{var i=JSON.parse(r);if(Array.isArray(i)){var n=e;return n.map(function(e){return t.coerceString(e)}).filter(Boolean)}else return}catch{return}},e.prototype.isSetOperator=function(e){switch(e){case $.SET_IS:case $.SET_IS_NOT:case $.SET_CONTAINS:case $.SET_DOES_NOT_CONTAIN:case $.SET_CONTAINS_ANY:case $.SET_DOES_NOT_CONTAIN_ANY:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var n=new Set(e),r=new Set(t);return n.size===r.size&&zS([],RS(r),!1).every(function(e){return n.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var n,r;if(e.length<t.length)return!1;try{for(var i=LS(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(!this.matchesIs(o,e))return!1}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var n,r;try{for(var i=LS(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(this.matchesIs(o,e))return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e}(),rC=`3.7.5`,iC=rC,aC=typeof atob==`function`,oC=typeof btoa==`function`,sC=typeof Buffer==`function`,cC=typeof TextDecoder==`function`?new TextDecoder:void 0,lC=typeof TextEncoder==`function`?new TextEncoder:void 0,uC=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),dC=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(uC),fC=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,pC=String.fromCharCode.bind(String),mC=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),hC=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),gC=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),_C=e=>{let t,n,r,i,a=``,o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw TypeError(`invalid character found`);t=n<<16|r<<8|i,a+=uC[t>>18&63]+uC[t>>12&63]+uC[t>>6&63]+uC[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},vC=oC?e=>btoa(e):sC?e=>Buffer.from(e,`binary`).toString(`base64`):_C,yC=sC?e=>Buffer.from(e).toString(`base64`):e=>{let t=4096,n=[];for(let r=0,i=e.length;r<i;r+=t)n.push(pC.apply(null,e.subarray(r,r+t)));return vC(n.join(``))},bC=(e,t=!1)=>t?hC(yC(e)):yC(e),xC=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?pC(192|t>>>6)+pC(128|t&63):pC(224|t>>>12&15)+pC(128|t>>>6&63)+pC(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return pC(240|t>>>18&7)+pC(128|t>>>12&63)+pC(128|t>>>6&63)+pC(128|t&63)}},SC=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,CC=e=>e.replace(SC,xC),wC=sC?e=>Buffer.from(e,`utf8`).toString(`base64`):lC?e=>yC(lC.encode(e)):e=>vC(CC(e)),TC=(e,t=!1)=>t?hC(wC(e)):wC(e),EC=e=>TC(e,!0),DC=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,OC=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return pC((t>>>10)+55296)+pC((t&1023)+56320);case 3:return pC((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return pC((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},kC=e=>e.replace(DC,OC),AC=e=>{if(e=e.replace(/\s+/g,``),!fC.test(e))throw TypeError(`malformed base64.`);e+=`==`.slice(2-(e.length&3));let t,n=``,r,i;for(let a=0;a<e.length;)t=dC[e.charAt(a++)]<<18|dC[e.charAt(a++)]<<12|(r=dC[e.charAt(a++)])<<6|(i=dC[e.charAt(a++)]),n+=r===64?pC(t>>16&255):i===64?pC(t>>16&255,t>>8&255):pC(t>>16&255,t>>8&255,t&255);return n},jC=aC?e=>atob(gC(e)):sC?e=>Buffer.from(e,`base64`).toString(`binary`):AC,MC=sC?e=>mC(Buffer.from(e,`base64`)):e=>mC(jC(e).split(``).map(e=>e.charCodeAt(0))),NC=e=>MC(FC(e)),PC=sC?e=>Buffer.from(e,`base64`).toString(`utf8`):cC?e=>cC.decode(MC(e)):e=>kC(jC(e)),FC=e=>gC(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),IC=e=>PC(FC(e)),LC=e=>{if(typeof e!=`string`)return!1;let t=e.replace(/\s+/g,``).replace(/={0,2}$/,``);return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},RC=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),zC=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,RC(t));e(`fromBase64`,function(){return IC(this)}),e(`toBase64`,function(e){return TC(this,e)}),e(`toBase64URI`,function(){return TC(this,!0)}),e(`toBase64URL`,function(){return TC(this,!0)}),e(`toUint8Array`,function(){return NC(this)})},BC=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,RC(t));e(`toBase64`,function(e){return bC(this,e)}),e(`toBase64URI`,function(){return bC(this,!0)}),e(`toBase64URL`,function(){return bC(this,!0)})},VC={version:rC,VERSION:iC,atob:jC,atobPolyfill:AC,btoa:vC,btoaPolyfill:_C,fromBase64:IC,toBase64:TC,encode:TC,encodeURI:EC,encodeURL:EC,utob:CC,btou:kC,decode:IC,isValid:LC,fromUint8Array:bC,toUint8Array:NC,extendString:zC,extendUint8Array:BC,extendBuiltins:()=>{zC(),BC()}},HC=function(e){NS(t,e);function t(n,r){var i=e.call(this,r)||this;return i.statusCode=n,Object.setPrototypeOf(i,t.prototype),i}return t}(Error);(function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getVariants=function(e,t){return FS(this,void 0,void 0,function(){var n,r,i;return IS(this,function(a){switch(a.label){case 0:return n=VC.encodeURL(JSON.stringify(e)),r={Authorization:`Api-Key ${this.deploymentKey}`,"X-Amp-Exp-User":n},t?.flagKeys&&(r[`X-Amp-Exp-Flag-Keys`]=VC.encodeURL(JSON.stringify(t.flagKeys))),t?.trackingOption&&(r[`X-Amp-Exp-Track`]=t.trackingOption),[4,this.httpClient.request({requestUrl:`${this.serverUrl}/sdk/v2/vardata?v=0`,method:`GET`,headers:r,timeoutMillis:t?.timeoutMillis})];case 1:if(i=a.sent(),i.status!=200)throw new HC(i.status,`Fetch error response: status=${i.status}`);return[2,JSON.parse(i.body)]}})})},e})(),function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getFlags=function(e){return FS(this,void 0,void 0,function(){var t,n,r;return IS(this,function(i){switch(i.label){case 0:return t={Authorization:`Api-Key ${this.deploymentKey}`},e?.libraryName&&e?.libraryVersion&&(t[`X-Amp-Exp-Library`]=`${e.libraryName}/${e.libraryVersion}`),[4,this.httpClient.request({requestUrl:`${this.serverUrl}/sdk/v2/flags`,method:`GET`,headers:t,timeoutMillis:e?.timeoutMillis})];case 1:if(n=i.sent(),n.status!=200)throw Error(`Flags error response: status=${n.status}`);return r=JSON.parse(n.body),[2,r.reduce(function(e,t){return e[t.key]=t,e},{})]}})})},e}();var UC=typeof globalThis<`u`?globalThis:global||self;(function(){function e(e,t){this.poller=void 0,this.action=e,this.ms=t}return e.prototype.start=function(){this.poller||(this.poller=UC.setInterval(this.action,this.ms),this.action())},e.prototype.stop=function(){this.poller&&=(UC.clearInterval(this.poller),void 0)},e})();var WC=new(function(){function e(){var e=this;this.dbs={},this.createStore=function(t){return b(e,void 0,void 0,function(){return d(this,function(e){switch(e.label){case 0:return[4,i(t,1,{upgrade:function(e){e.objectStoreNames.contains(`eventTypesForSession`)||e.createObjectStore(`eventTypesForSession`,{keyPath:`sessionId`})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return b(e,void 0,void 0,function(){var e,n;return d(this,function(r){switch(r.label){case 0:return this.dbs&&this.dbs[t]?[2,this.dbs[t]]:(e=`${t.substring(0,10)}_amp_targeting`,[4,this.createStore(e)]);case 1:return n=r.sent(),this.dbs[t]=n,[2,n]}})})},this.updateEventListForSession=function(t){var n=t.sessionId,i=t.eventType,a=t.eventTime,o=t.loggerProvider,s=t.tx;return b(e,void 0,void 0,function(){var e,t,c,l,u,f,p;return d(this,function(d){switch(d.label){case 0:return d.trys.push([0,3,,4]),[4,s.store.get(n)];case 1:return e=d.sent(),t=e?e.eventTypes:{},c=t[i]||{},l=r(r({},t),(f={},f[i]=r(r({},c),(p={},p[a]={event_type:i},p)),f)),[4,s.store.put({sessionId:n,eventTypes:l})];case 2:return d.sent(),[2,l];case 3:return u=d.sent(),o.warn(`Failed to store events for targeting ${n}: ${u}`),[3,4];case 4:return[2,void 0]}})})},this.deleteOldSessionEventTypes=function(t){var n=t.currentSessionId,r=t.loggerProvider,i=t.tx;return b(e,void 0,void 0,function(){var e,t,a,o,s;return d(this,function(c){switch(c.label){case 0:return c.trys.push([0,6,,7]),[4,i.store.getAll()];case 1:e=c.sent(),t=0,c.label=2;case 2:return t<e.length?(a=e[t],o=Date.now()-a.sessionId,a.sessionId!==n&&o>1728e5?[4,i.store.delete(a.sessionId)]:[3,4]):[3,5];case 3:c.sent(),c.label=4;case 4:return t++,[3,2];case 5:return[3,7];case 6:return s=c.sent(),r.warn(`Failed to clear old session events for targeting: ${s}`),[3,7];case 7:return[2]}})})},this.storeEventTypeForSession=function(t){var n=t.loggerProvider,r=t.sessionId,i=t.eventType,a=t.eventTime,o=t.apiKey;return b(e,void 0,void 0,function(){var e,t,s,c;return d(this,function(l){switch(l.label){case 0:return l.trys.push([0,5,,6]),[4,this.openOrCreateDB(o)];case 1:return e=l.sent(),t=e.transaction(`eventTypesForSession`,`readwrite`),t?[4,this.updateEventListForSession({sessionId:r,tx:t,loggerProvider:n,eventType:i,eventTime:a})]:[2];case 2:return s=l.sent(),[4,this.deleteOldSessionEventTypes({currentSessionId:r,tx:t,loggerProvider:n})];case 3:return l.sent(),[4,t.done];case 4:return l.sent(),[2,s];case 5:return c=l.sent(),n.warn(`Failed to store events for targeting ${r}: ${c}`),[3,6];case 6:return[2,void 0]}})})}}return e}()),GC=function(){function e(){var e=this;this.evaluateTargeting=function(t){var n=t.apiKey,r=t.loggerProvider,i=t.event,a=t.sessionId,o=t.userProperties,s=t.deviceId,c=t.flag;return b(e,void 0,void 0,function(){var e,t,l,u,f;return d(this,function(d){switch(d.label){case 0:return i&&i.time?[4,WC.storeEventTypeForSession({loggerProvider:r,apiKey:n,sessionId:a,eventType:i.event_type,eventTime:i.time})]:[3,2];case 1:return t=d.sent(),[3,3];case 2:t=void 0,d.label=3;case 3:return e=t,l=e&&new Set(Object.keys(e)),u={session_id:a,event:i,event_types:l&&Array.from(l),user:{device_id:s,user_properties:o}},f=this.evaluationEngine.evaluate(u,[c]),[2,f]}})})},this.evaluationEngine=new nC}return e}(),KC=function(){var e=new GC;return{evaluateTargeting:e.evaluateTargeting.bind(e)}}().evaluateTargeting,qC=function(e,t){return Object.keys(e).filter(function(n){return t(n,e[n])}).reduce(function(t,n){return t[n]=e[n],t},{})},JC=function(e){u(t,e);function t(t,n){var r=e.call(this,`${t} ${n}`)||this;return r.field=t,r}return t}(Error);function YC(e){return typeof e==`string`}function XC(e){return typeof e==`number`}function ZC(e){return typeof e==`function`}function QC(e){return e!=null}function $C(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()===`object`}var ew=`is not a string`,tw=`is not an object`,nw=`is nil`;function rw(e){if(!QC(e))throw new JC(`Event`,nw);if(typeof e!=`object`)throw new JC(`Event`,tw)}function iw(e){if(!YC(e.type))throw new JC(`.type`,ew)}function aw(e){if(!YC(e.event))throw new JC(`.event`,ew)}function ow(e){if(!$C(e.properties))throw new JC(`.properties`,tw)}function sw(e){if(!$C(e.traits))throw new JC(`.traits`,tw)}function cw(e){if(!YC(e.messageId))throw new JC(`.messageId`,ew)}function lw(e){rw(e),iw(e),cw(e),e.type===`track`&&(aw(e),ow(e)),[`group`,`identify`].includes(e.type)&&sw(e)}var uw=function(){function e(e){this.settings=e,this.createMessageId=e.createMessageId,this.onEventMethodCall=e.onEventMethodCall??(function(){}),this.onFinishedEvent=e.onFinishedEvent??(function(){})}return e}(),dw=function(){function e(e){this.settings=new uw(e)}return e.prototype.track=function(e,t,n,i){return this.settings.onEventMethodCall({type:`track`,options:n}),this.normalize(r(r({},this.baseEvent()),{event:e,type:`track`,properties:t??{},options:r({},n),integrations:r({},i)}))},e.prototype.page=function(e,t,n,i,a){this.settings.onEventMethodCall({type:`page`,options:i});var o={type:`page`,properties:r({},n),options:r({},i),integrations:r({},a)};return e!==null&&(o.category=e,o.properties=o.properties??{},o.properties.category=e),t!==null&&(o.name=t),this.normalize(r(r({},this.baseEvent()),o))},e.prototype.screen=function(e,t,n,i,a){this.settings.onEventMethodCall({type:`screen`,options:i});var o={type:`screen`,properties:r({},n),options:r({},i),integrations:r({},a)};return e!==null&&(o.category=e),t!==null&&(o.name=t),this.normalize(r(r({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,i){return this.settings.onEventMethodCall({type:`identify`,options:n}),this.normalize(r(r({},this.baseEvent()),{type:`identify`,userId:e,traits:t??{},options:r({},n),integrations:i}))},e.prototype.group=function(e,t,n,i){return this.settings.onEventMethodCall({type:`group`,options:n}),this.normalize(r(r({},this.baseEvent()),{type:`group`,traits:t??{},options:r({},n),integrations:r({},i),groupId:e}))},e.prototype.alias=function(e,t,n,i){this.settings.onEventMethodCall({type:`alias`,options:n});var a={userId:e,type:`alias`,options:r({},n),integrations:r({},i)};return t!==null&&(a.previousId=t),e===void 0?this.normalize(r(r({},a),this.baseEvent())):this.normalize(r(r({},this.baseEvent()),a))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.prototype.context=function(e){var t=[`userId`,`anonymousId`,`timestamp`,`messageId`];delete e.integrations;var n=Object.keys(e),r=e.context??{},i={};
vendor: 11,020 bytes, line 276
276return n.forEach(function(n){n!==`context`&&(t.includes(n)?m(i,n,e[n]):m(r,n,e[n]))}),[r,i]},e.prototype.normalize=function(e){var t=Object.keys(e.integrations??{}).reduce(function(t,n){var i;return r(r({},t),(i={},i[n]=!!e.integrations?.[n],i))},{});e.options=qC(e.options||{},function(e,t){return t!==void 0});var n=r(r({},t),e.options?.integrations),i=e.options?this.context(e.options):[],a=i[0],o=i[1],c=e.options,l=s(e,[`options`]),u=r(r(r(r({timestamp:new Date},l),{context:a,integrations:n}),o),{messageId:c.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(u),lw(u),u},e}();function fw(e,t){return new Promise(function(n,r){var i=setTimeout(function(){r(Error(`Promise timed out`))},t);e.then(function(e){return clearTimeout(i),n(e)}).catch(r)})}function pw(e){return new Promise(function(t){return setTimeout(t,e)})}function mw(e,t,n){var r=function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}};return pw(n).then(function(){return fw(r(),1e3)}).catch(function(t){e?.log(`warn`,`Callback Error`,{error:t}),e?.stats.increment(`callback_error`)}).then(function(){return e})}var hw=function(){var e,t,n=!1,r=new Promise(function(r,i){e=function(){var e=[...arguments];n=!0,r.apply(void 0,e)},t=function(){var e=[...arguments];n=!0,i.apply(void 0,e)}});return{resolve:e,reject:t,promise:r,isSettled:function(){return n}}},gw=function(){function e(e){this.callbacks={},this.warned=!1,this.maxListeners=e?.maxListeners??10}return e.prototype.warnIfPossibleMemoryLeak=function(e){this.warned||this.maxListeners&&this.callbacks[e].length>this.maxListeners&&(console.warn(`Event Emitter: Possible memory leak detected; ${String(e)} has exceeded ${this.maxListeners} listeners.`),this.warned=!0)},e.prototype.on=function(e,t){return this.callbacks[e]?(this.callbacks[e].push(t),this.warnIfPossibleMemoryLeak(e)):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){var i=[...arguments];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n=(this.callbacks[e]??[]).filter(function(e){return e!==t});return this.callbacks[e]=n,this},e.prototype.emit=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return(this.callbacks[e]??[]).forEach(function(e){e.apply(t,n)}),this},e}();function _w(e){var t=Math.random()+1,n=e.minTimeout,r=n===void 0?500:n,i=e.factor,a=i===void 0?2:i,o=e.attempt,s=e.maxTimeout,c=s===void 0?1/0:s;return Math.min(t*r*a**+o,c)}var vw=`onRemoveFromFuture`,yw=function(e){u(t,e);function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=r??{},i}return t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map(function(t){return e.updateAttempts(t)>e.maxAttempts||e.includes(t)?!1:(e.queue.push(t),!0)});return this.queue=this.queue.sort(function(t,n){return e.getAttempts(t)-e.getAttempts(n)}),r},t.prototype.pushWithBackoff=function(e,t){var n=this;if(t===void 0&&(t=0),t==0&&this.getAttempts(e)===0)return this.push(e)[0];var r=this.updateAttempts(e);if(r>this.maxAttempts||this.includes(e))return!1;var i=_w({attempt:r-1});return t>0&&i<t&&(i=t),setTimeout(function(){n.queue.push(e),n.future=n.future.filter(function(t){return t.id!==e.id}),n.emit(vw)},i),this.future.push(e),!0},t.prototype.getAttempts=function(e){return this.seen[e.id]??0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||!!this.queue.find(function(t){return t.id===e.id})||!!this.future.find(function(t){return t.id===e.id})},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,`length`,{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`todo`,{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(gw),bw=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,`logs`,{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce(function(e,t){var n,i=r(r({},t),{json:JSON.stringify(t.extras,null,` `),extras:t.extras});delete i.time;var a=t.time?.toISOString()??``;return e[a]&&(a=`${a}-${Math.random()}`),r(r({},e),(n={},n[a]=i,n))},{});console.table?console.table(e):console.log(e)}else this.logs.forEach(function(e){var t=e.level,n=e.message,r=e.extras;t===`info`||t===`debug`?console.log(n,r??``):console[t](n,r??``)});this._logs=[]},e}(),xw=function(e){return{gauge:`g`,counter:`c`}[e]},Sw=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){t===void 0&&(t=1),this.metrics.push({metric:e,value:t,tags:n??[],type:`counter`,timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:n??[],type:`gauge`,timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map(function(e){return r(r({},e),{tags:e.tags.join(`,`)})});console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(e){return{m:e.metric,v:e.value,t:e.tags,k:xw(e.type),e:e.timestamp}})},e}(),Cw=function(e){u(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Sw),ww=function(){function e(e){this.retry=e.retry??!0,this.type=e.type??`plugin Error`,this.reason=e.reason??``}return e}(),Tw=function(){function e(e,t,n,r){t===void 0&&(t=w()),n===void 0&&(n=new Cw),r===void 0&&(r=new bw),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){throw e||new ww({reason:`Context Cancel`})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,`id`,{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){if(e.split(`.`)[0]===`integrations`){var n=e.split(`.`)[1];if(this.event.integrations?.[n]===!1)return this.event}return m(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function Ew(e,t){var n={};return e.forEach(function(e){var r=void 0;if(typeof t==`string`){var i=e[t];r=typeof i==`string`?i:JSON.stringify(i)}else t instanceof Function&&(r=t(e));r!==void 0&&(n[r]=c(c([],n[r]??[],!0),[e],!1))}),n}var Dw=function(e){return typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`},Ow=function(){var e,t,n=0;return{done:function(){return e},run:function(r){var i=r();return Dw(i)&&(++n===1&&(e=new Promise(function(e){return t=e})),i.finally(function(){return--n===0&&t()})),i}}};function kw(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}})})}function Aw(e,t){e.log(`debug`,`plugin`,{plugin:t.name});var n=new Date().getTime(),r=t[e.event.type];return r===void 0?Promise.resolve(e):kw(function(){return r.apply(t,[e])}).then(function(e){var r=new Date().getTime()-n;return e.stats.gauge(`plugin_time`,r,[`plugin:${t.name}`]),e}).catch(function(n){if(n instanceof ww&&n.type===`middleware_cancellation`)throw n;return n instanceof ww?(e.log(`warn`,n.type,{plugin:t.name,error:n}),n):(e.log(`error`,`plugin Error`,{plugin:t.name,error:n}),e.stats.increment(`plugin_error`,1,[`plugin:${t.name}`]),n)})}function jw(e,t){return Aw(e,t).then(function(t){if(t instanceof Tw)return t;e.log(`debug`,`Context canceled`),e.stats.increment(`context_canceled`),e.cancel(t)})}var Mw=function(e){u(t,e);function t(t){var n=e.call(this)||this;return n.criticalTasks=Ow(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=t,n.queue.on(vw,function(){n.scheduleFlush(0)}),n}return t.prototype.register=function(e,t,n){return b(this,void 0,void 0,function(){var r,i,a=this;return d(this,function(o){switch(o.label){case 0:return this.plugins.push(t),r=function(n){a.failedInitializations.push(t.name),a.emit(`initialization_failure`,t),console.warn(t.name,n),e.log(`warn`,`Failed to load destination`,{plugin:t.name,error:n}),a.plugins=a.plugins.filter(function(e){return e!==t})},t.type===`destination`&&t.name!==`Segment.io`?(t.load(e,n).catch(r),[3,4]):[3,1];case 1:return o.trys.push([1,3,,4]),[4,t.load(e,n)];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),r(i),[3,4];case 4:return[2]}})})},t.prototype.deregister=function(e,t,n){return b(this,void 0,void 0,function(){var r;return d(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter(function(e){return e.name!==t.name}),[3,4];case 3:return r=i.sent(),e.log(`warn`,`Failed to unload destination`,{plugin:t.name,error:r}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){return e.log(`debug`,`Dispatching`),e.stats.increment(`message_dispatched`),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]})})},t.prototype.subscribeToDelivery=function(e){return b(this,void 0,void 0,function(){var t=this;return d(this,function(n){return[2,new Promise(function(n){var r=function(i,a){i.isSame(e)&&(t.off(`flush`,r),n(i))};t.on(`flush`,r)})]})})},t.prototype.dispatchSingle=function(e){return b(this,void 0,void 0,function(){var t=this;return d(this,function(n){return e.log(`debug`,`Dispatching`),e.stats.increment(`message_dispatched`),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch(function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)})]})})},t.prototype.isEmpty=function(){return this.queue.length===0},t.prototype.scheduleFlush=function(e){var t=this;e===void 0&&(e=500),!this.flushing&&(this.flushing=!0,setTimeout(function(){t.flush().then(function(){setTimeout(function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)},0)})},e))},t.prototype.deliver=function(e){return b(this,void 0,void 0,function(){var t,n,r,i;return d(this,function(a){switch(a.label){case 0:return[4,this.criticalTasks.done()];case 1:a.sent(),t=Date.now(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.flushOne(e)];
276case 3:return e=a.sent(),n=Date.now()-t,this.emit(`delivery_success`,e),e.stats.gauge(`delivered`,n),e.log(`debug`,`Delivered`,e.event),[2,e];case 4:throw r=a.sent(),i=r,e.log(`error`,`Failed to deliver`,i),this.emit(`delivery_failure`,e,i),e.stats.increment(`delivery_failed`),r;case 5:return[2]}})})},t.prototype.enqueuRetry=function(e,t){return!(e instanceof ww)||e.retry?this.queue.pushWithBackoff(t):!1},t.prototype.flush=function(){return b(this,void 0,void 0,function(){var e,t,n;return d(this,function(r){switch(r.label){case 0:if(this.queue.length===0||(e=this.queue.pop(),!e))return[2,[]];e.attempts=this.queue.getAttempts(e),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=r.sent(),this.emit(`flush`,e,!0),[3,4];case 3:return t=r.sent(),n=this.enqueuRetry(t,e),n||(e.setFailedDelivery({reason:t}),this.emit(`flush`,e,!1)),[2,[]];case 4:return[2,[e]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t=Ew(this.plugins.filter(function(t){var n;if(t.type!==`destination`&&t.name!==`Segment.io`)return!0;var r=void 0;return(n=t.alternativeNames)==null||n.forEach(function(t){e[t]!==void 0&&(r=e[t])}),e[t.name]??r??(t.name===`Segment.io`?!0:e.All)!==!1}),`type`),n=t.before,r=n===void 0?[]:n,i=t.enrichment,a=i===void 0?[]:i,o=t.destination,s=o===void 0?[]:o,c=t.after;return{before:r,enrichment:a,destinations:s,after:c===void 0?[]:c}},t.prototype.flushOne=function(e){return b(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c,l,u,s,f,p,m,h;return d(this,function(d){switch(d.label){case 0:if(!this.isReady())throw Error(`Not ready`);e.attempts>1&&this.emit(`delivery_retry`,e),t=this.availableExtensions(e.event.integrations??{}),n=t.before,r=t.enrichment,i=0,a=n,d.label=1;case 1:return i<a.length?(o=a[i],[4,jw(e,o)]):[3,4];case 2:s=d.sent(),s instanceof Tw&&(e=s),this.emit(`message_enriched`,e,o),d.label=3;case 3:return i++,[3,1];case 4:c=0,l=r,d.label=5;case 5:return c<l.length?(u=l[c],[4,Aw(e,u)]):[3,8];case 6:s=d.sent(),s instanceof Tw&&(e=s),this.emit(`message_enriched`,e,u),d.label=7;case 7:return c++,[3,5];case 8:return f=this.availableExtensions(e.event.integrations??{}),p=f.destinations,m=f.after,[4,new Promise(function(t,n){setTimeout(function(){var r=p.map(function(t){return Aw(e,t)});Promise.all(r).then(t).catch(n)},0)})];case 9:return d.sent(),e.stats.increment(`message_delivered`),this.emit(`message_delivered`,e),h=m.map(function(t){return Aw(e,t)}),[4,Promise.all(h)];case 10:return d.sent(),[2,e]}})})},t}(gw),Nw=function(e,t){var n=Date.now()-e;return Math.max((t??300)-n,0)};function Pw(e,t,n,r){return b(this,void 0,void 0,function(){var i,a;return d(this,function(o){switch(o.label){case 0:return n.emit(`dispatch_start`,e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return a=o.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:a=o.sent(),o.label=4;case 4:return r?.callback?[4,mw(a,r.callback,Nw(i,r.timeout))]:[3,6];case 5:a=o.sent(),o.label=6;case 6:return r?.debug&&a.flush(),[2,a]}})})}function Fw(e){var t=e;return!!(t.ctrlKey||t.shiftKey||t.metaKey||t.button&&t.button==1)}function Iw(e,t){return!!(e.target===`_blank`&&t)}function Lw(e,t,n,r){var i=this,a=[];return e?(a=e instanceof Element?[e]:`toArray`in e?e.toArray():e,a.forEach(function(e){e.addEventListener(`click`,function(a){var o=t instanceof Function?t(e):t,s=n instanceof Function?n(e):n,c=e.getAttribute(`href`)||e.getAttributeNS(`http://www.w3.org/1999/xlink`,`href`)||e.getAttribute(`xlink:href`)||e.getElementsByTagName(`a`)[0]?.getAttribute(`href`),l=fw(i.track(o,s,r??{}),i.settings.timeout??500);!Iw(e,c)&&!Fw(a)&&c&&(a.preventDefault?a.preventDefault():a.returnValue=!1,l.catch(console.error).then(function(){window.location.href=c}).catch(console.error))},!1)}),this):this}function Rw(e,t,n,r){var i=this;return e?(e instanceof HTMLFormElement&&(e=[e]),e.forEach(function(e){if(!(e instanceof Element))throw TypeError(`Must pass HTMLElement to trackForm/trackSubmit.`);var a=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1;var o=t instanceof Function?t(e):t,s=n instanceof Function?n(e):n;fw(i.track(o,s,r??{}),i.settings.timeout??500).catch(console.error).then(function(){e.submit()}).catch(console.error)},o=window.jQuery||window.Zepto;o?o(e).submit(a):e.addEventListener(`submit`,a,!1)}),this):this}function zw(e,t){return Object.keys(t).reduce(function(n,r){if(r.startsWith(e)){var i=r.substr(e.length);n[i]=t[r]}return n},{})}function Bw(e){try{return decodeURIComponent(e.replace(/\+/g,` `))}catch{return e}}function Vw(e,t){var n=document.createElement(`a`);n.href=t;var r=n.search.slice(1).split(`&`).reduce(function(e,t){var n=t.split(`=`),r=n[0],i=n[1];return e[r]=Bw(i),e},{}),i=[],a=r.ajs_uid,o=r.ajs_event,s=r.ajs_aid,c=$C(e.options.useQueryString)?e.options.useQueryString:{},l=c.aid,u=l===void 0?/.+/:l,d=c.uid,f=d===void 0?/.+/:d;if(s){var p=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;u.test(p)&&e.setAnonymousId(p)}if(a){var m=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(f.test(m)){var h=zw(`ajs_trait_`,r);i.push(e.identify(m,h))}}if(o){var g=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,_=zw(`ajs_prop_`,r);i.push(e.track(g,_))}return Promise.all(i)}function Hw(e,t,n,r){var i=[e,t,n,r],a=$C(e)?e.event:e;if(!a||!YC(a))throw Error(`Event missing`);var o=$C(e)?e.properties??{}:$C(t)?t:{},s={};ZC(n)||(s=n??{}),$C(e)&&!ZC(t)&&(s=t??{});var c=i.find(ZC);return[a,o,s,c]}function Uw(e,t,n,r,i){var a,o,s=null,c=null,l=[e,t,n,r,i],u=l.filter(YC);u.length===1?YC(l[1])?(c=l[1],s=null):(c=u[0],s=null):u.length===2&&(typeof l[0]==`string`&&(s=l[0]),typeof l[1]==`string`&&(c=l[1]));var d=l.find(ZC),f=l.filter($C);return f.length===1?$C(l[2])?(o={},a=l[2]):$C(l[3])?(a={},o=l[3]):(a=f[0],o={}):f.length===2&&(a=f[0],o=f[1]),[s,c,a??={},o??={},d]}var Ww=function(e){return function(){for(var t=[...arguments],n={},r=[`callback`,`options`,`traits`,`id`],i=0,a=t;i<a.length;i++){var o=a[i],s=r.pop();if(s===`id`){if(YC(o)||XC(o)){n.id=o.toString();continue}if(o==null)continue;s=r.pop()}if((s===`traits`||s===`options`)&&(o==null||$C(o))&&(n[s]=o),ZC(o)){n.callback=o;break}}return[n.id??e.id(),n.traits??{},n.options??{},n.callback]}};function Gw(e,t,n,r){XC(e)&&(e=e.toString()),XC(t)&&(t=t.toString());var i=[e,t,n,r],a=i.filter(YC),o=a[0],s=o===void 0?e:o,c=a[1],l=c===void 0?null:c,u=i.filter($C)[0];return[s,l,u===void 0?{}:u,i.find(ZC)]}function Kw(){return typeof window<`u`}function qw(){return!Kw()}function Jw(){return Kw()?window.navigator.onLine:!0}function Yw(){return!Jw()}var Xw=function(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:null},Zw=function(){var e=[...arguments],t=Xw();return(t&&t.fetch||_).apply(void 0,e)},Qw=`1.81.1`,$w=`npm`;function eT(){return $w}var tT=`api.segment.io/v1`,nT=function(e,t,n){return{type:`Counter`,metric:e,value:1,tags:r(r({},t.reduce(function(e,t){var n=t.split(`:`),r=n[0];return e[r]=n[1],e},{})),{library:`analytics.js`,library_version:n===`web`?`next-${Qw}`:`npm:next-${Qw}`})}};function rT(e){console.error(`Error sending segment performance metrics`,e)}var iT=function(){function e(e){var t=this;if(this.host=e?.host??tT,this.sampleRate=e?.sampleRate??1,this.flushTimer=e?.flushTimer??30*1e3,this.maxQueueSize=e?.maxQueueSize??20,this.protocol=e?.protocol??`https`,this.queue=[],this.sampleRate>0){var n=!1,r=function(){n||(n=!0,t.flush().catch(rT),n=!1,setTimeout(r,t.flushTimer))};r()}}return e.prototype.increment=function(e,t){if(e.includes(`analytics_js.`)&&t.length!==0&&!(Math.random()>this.sampleRate)&&!(this.queue.length>=this.maxQueueSize)){var n=nT(e,t,eT());this.queue.push(n),e.includes(`error`)&&this.flush().catch(rT)}},e.prototype.flush=function(){return b(this,void 0,void 0,function(){var e=this;return d(this,function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(t){rT(t),e.sampleRate=0})];case 1:return t.sent(),[2]}})})},e.prototype.send=function(){return b(this,void 0,void 0,function(){var e,t,n;return d(this,function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":`text/plain`},n=`${this.protocol}://${this.host}/m`,[2,Zw(n,{headers:t,body:JSON.stringify(e),method:`POST`})]})})},e}(),aT,oT=function(e){u(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.initRemoteMetrics=function(e){aT=new iT(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),aT?.increment(t,r??[])},t}(Sw),sT=function(e){u(t,e);function t(t,n){return e.call(this,t,n,new oT)||this}return t.system=function(){return new this({type:`track`,event:`system`})},t}(Tw);function cT(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()===`object`}var lT=function(e,t,n,r,i,a){return{__t:`bpc`,c:t,p:r,u:e,s:n,t:i,r:a}},uT=Object.keys(lT(``,``,``,``,``,``));function dT(e){if(!cT(e)||e.__t!==`bpc`)return!1;for(var t in e)if(!uT.includes(t))return!1;return!0}var fT=function(e,t){return e.indexOf(`?`)>-1?e:e+t},pT=function(e){var t=e.indexOf(`#`);return t===-1?e:e.slice(0,t)},mT=function(e){try{return new URL(e).pathname}catch{return e[0]===`/`?e:`/`+e}},hT=function(e){var t=e.c,n=e.p,r=e.s,i=e.u,a=e.r,o=e.t;return{path:t?mT(t):n,referrer:a,search:r,title:o,url:t?fT(t,r):pT(i)}},gT=function(){var e=document.querySelector(`link[rel='canonical']`);return lT(location.href,e&&e.getAttribute(`href`)||void 0,location.search,location.pathname,document.title,document.referrer)},_T=function(){return hT(gT())};function vT(e,t){return Object.assign.apply(Object,c([{}],t.map(function(t){var n;if(e&&Object.prototype.hasOwnProperty.call(e,t))return n={},n[t]=e[t],n}),!1))}var yT=function(e,t){t===void 0&&(t=_T());var n=e.context,i;e.type===`page`&&(i=e.properties&&vT(e.properties,Object.keys(t)),e.properties=r(r(r({},t),e.properties),e.name?{name:e.name}:{})),n.page=r(r(r({},t),i),n.page)},bT=function(e){u(t,e);function t(t){var n=e.call(this,{createMessageId:function(){return`ajs-next-${Date.now()}-${w()}`},onEventMethodCall:function(e){var t=e.options;n.maybeUpdateAnonId(t)},onFinishedEvent:function(e){return n.addIdentity(e),e}})||this;return n.user=t,n}return t.prototype.maybeUpdateAnonId=function(e){e!=null&&e.anonymousId&&this.user.anonymousId(e.anonymousId)},t.prototype.addIdentity=function(e){this.user.id()&&(e.userId=this.user.id()),this.user.anonymousId()&&(e.anonymousId=this.user.anonymousId())},t.prototype.track=function(t,n,r,i,a){var o=e.prototype.track.call(this,t,n,r,i);return yT(o,a),o},t.prototype.page=function(t,n,r,i,a,o){var s=e.prototype.page.call(this,t,n,r,i,a);return yT(s,o),s},t.prototype.screen=function(t,n,r,i,a,o){var s=e.prototype.screen.call(this,t,n,r,i,a);return yT(s,o),s},t.prototype.identify=function(t,n,r,i,a){var o=e.prototype.identify.call(this,t,n,r,i);return yT(o,a),o},t.prototype.group=function(t,n,r,i,a){var o=e.prototype.group.call(this,t,n,r,i);return yT(o,a),o},t.prototype.alias=function(t,n,r,i,a){var o=e.prototype.alias.call(this,t,n,r,i);return yT(o,a),o},t}(dw),xT=function(e){return`addMiddleware`in e&&e.type===`destination`},ST={getItem:function(){},setItem:function(){},removeItem:function(){}};try{ST=Kw()&&window.localStorage?window.localStorage:ST}catch(e){console.warn(`Unable to access localStorage`,e)}function CT(e){var t=ST.getItem(e);return(t?JSON.parse(t):[]).map(function(e){return new sT(e.event,e.id)})}function wT(e,t){var n=CT(e),i=c(c([],t,!0),n,!0).reduce(function(e,t){var n;return r(r({},e),(n={},n[t.id]=t,n))},{});ST.setItem(e,JSON.stringify(Object.values(i)))}function TT(e){var t=ST.getItem(e);return t?JSON.parse(t):{}}function ET(e,t){var n=TT(e);ST.setItem(e,JSON.stringify(r(r({},n),t)))}function DT(e){ST.removeItem(e)}var OT=function(){return new Date().getTime()};function kT(e,t,n){n===void 0&&(n=0);var r=50,i=`persisted-queue:v1:${e}:lock`,a=function(e){return new Date().getTime()>e},o=ST.getItem(i),s=o?JSON.parse(o):null,c=s===null||a(s);if(c){ST.setItem(i,JSON.stringify(OT()+r)),t(),ST.removeItem(i);return}!c&&n<3?setTimeout(function(){kT(e,t,n+1)},r):console.error(`Unable to retrieve lock`)}var AT=function(e){u(t,e);function t(t,n){var i=e.call(this,t,[])||this,a=`persisted-queue:v1:${n}:items`,o=`persisted-queue:v1:${n}:seen`,s=[],l={};
vendor: 4,080 bytes, line 276
276return kT(n,function(){try{s=CT(a),l=TT(o),DT(a),DT(o),i.queue=c(c([],s,!0),i.queue,!0),i.seen=r(r({},l),i.seen)}catch(e){console.error(e)}}),window.addEventListener(`pagehide`,function(){if(i.todo>0){var e=c(c([],i.queue,!0),i.future,!0);try{kT(n,function(){wT(a,e),ET(o,i.seen)})}catch(e){console.error(e)}}}),i}return t}(yw),jT=function(e){u(t,e);function t(t){return e.call(this,typeof t==`string`?new AT(4,t):t)||this}return t.prototype.flush=function(){return b(this,void 0,void 0,function(){return d(this,function(t){return Yw()?[2,[]]:[2,e.prototype.flush.call(this)]})})},t}(Mw);function MT(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if(i!==`constructor`){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);a&&typeof a.value==`function`&&(e[i]=e[i].bind(e))}}return e}function NT(e){var t=e.hostname.split(`.`),n=t[t.length-1],r=[];if(t.length===4&&parseInt(n,10)>0||t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join(`.`));return r}function PT(e){try{return new URL(e)}catch{return}}function FT(e){var t=PT(e);if(t)for(var n=NT(t),r=0;r<n.length;++r){var i=`__tld__`,a=n[r],o={domain:`.`+a};try{if(T.set(i,`1`,o),T.get(i))return T.remove(i,o),a}catch{return}}}var IT=365,LT=function(){function e(t){t===void 0&&(t=e.defaults),this.options=r(r({},e.defaults),t)}return Object.defineProperty(e,`defaults`,{get:function(){return{maxage:IT,domain:FT(window.location.href),path:`/`,sameSite:`Lax`}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(e){try{var t=T.get(e);if(t==null)return null;try{return JSON.parse(t)??null}catch{return t??null}}catch{return null}},e.prototype.set=function(e,t){typeof t==`string`?T.set(e,t,this.opts()):t===null?T.remove(e,this.opts()):T.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return T.remove(e,this.opts())},e}(),RT=function(){function e(){}return e.prototype.localStorageWarning=function(e,t){console.warn(`Unable to access ${e}, localStorage may be ${t}`)},e.prototype.get=function(e){try{var t=localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)??null}catch{return t??null}}catch{return this.localStorageWarning(e,`unavailable`),null}},e.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{this.localStorageWarning(e,`full`)}},e.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch{this.localStorageWarning(e,`unavailable`)}},e}(),zT=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]??null},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},e}(),BT={Cookie:`cookie`,LocalStorage:`localStorage`,Memory:`memory`};function VT(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every(function(e){return Object.values(BT).includes(e)})}function HT(e){return typeof e==`object`&&e.name!==void 0}var UT=function(e,t,n,r){console.warn(`${e.constructor.name}: Can't ${t} key "${n}" | Err: ${r}`)},WT=function(){function e(e){this.stores=e}return e.prototype.get=function(e){for(var t=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(t=i.get(e),t!=null)return t}catch(t){UT(i,`get`,e,t)}}return null},e.prototype.set=function(e,t){this.stores.forEach(function(n){try{n.set(e,t)}catch(t){UT(n,`set`,e,t)}})},e.prototype.clear=function(e){this.stores.forEach(function(t){try{t.remove(e)}catch(n){UT(t,`remove`,e,n)}})},e.prototype.getAndSync=function(e){var t=this.get(e),n=typeof t==`number`?t.toString():t;return this.set(e,n),n},e}();function GT(e){return e.map(function(e){var t,n;switch(HT(e)?(t=e.name,n=e.settings):t=e,t){case BT.Cookie:return new LT(n);case BT.LocalStorage:return new RT;case BT.Memory:return new zT;default:throw Error(`Unknown Store Type: ${e}`)}})}function KT(e,t){return e.map(function(e){return t&&e===BT.Cookie?{name:e,settings:t}:e})}
276var qT={persist:!0,cookie:{key:`ajs_user_id`,oldKey:`ajs_user`},localStorage:{key:`ajs_user_traits`}},JT=function(){function e(e,t){e===void 0&&(e=qT);var n=this;this.options={},this.id=function(e){if(n.options.disable)return null;var t=n.identityStore.getAndSync(n.idKey);e!==void 0&&(n.identityStore.set(n.idKey,e),e!==t&&t!==null&&e!==null&&n.anonymousId(null));var r=n.identityStore.getAndSync(n.idKey);if(r)return r;var i=n.legacyUserStore.get(qT.cookie.oldKey);return i?typeof i==`object`?i.id:i:null},this.anonymousId=function(e){if(n.options.disable)return null;if(e===void 0){var t=n.identityStore.getAndSync(n.anonKey)??n.legacySIO()?.[0];if(t)return t}return e===null?(n.identityStore.set(n.anonKey,null),n.identityStore.getAndSync(n.anonKey)):(n.identityStore.set(n.anonKey,e??w()),n.identityStore.getAndSync(n.anonKey))},this.traits=function(e){if(!n.options.disable)return e===null&&(e={}),e&&n.traitsStore.set(n.traitsKey,e??{}),n.traitsStore.get(n.traitsKey)??{}},this.options=r(r({},qT),e),this.cookieOptions=t,this.idKey=e.cookie?.key??qT.cookie.key,this.traitsKey=e.localStorage?.key??qT.localStorage.key,this.anonKey=`ajs_anonymous_id`,this.identityStore=this.createStorage(this.options,t),this.legacyUserStore=this.createStorage(this.options,t,function(e){return e===BT.Cookie}),this.traitsStore=this.createStorage(this.options,t,function(e){return e!==BT.Cookie});var i=this.legacyUserStore.get(qT.cookie.oldKey);i&&typeof i==`object`&&(i.id&&this.id(i.id),i.traits&&this.traits(i.traits)),MT(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get(`_sio`);if(!e)return null;var t=e.split(`----`);return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t??={};var n=this.id();(n===null||n===e)&&(t=r(r({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(e,t,n){var r=[BT.LocalStorage,BT.Cookie,BT.Memory];return e.disable?new WT([]):e.persist?(e.storage!==void 0&&e.storage!==null&&VT(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter(function(e){return e!==BT.LocalStorage})),n&&(r=r.filter(n)),new WT(GT(KT(r,t)))):new WT([new zT])},e.defaults=qT,e}(),XT={persist:!0,cookie:{key:`ajs_group_id`},localStorage:{key:`ajs_group_properties`}},ZT=function(e){u(t,e);function t(t,n){t===void 0&&(t=XT);var i=e.call(this,r(r({},XT),t),n)||this;return i.anonymousId=function(e){},MT(i),i}return t}(JT),QT=`analytics`;function $T(){return window[QT]}function eE(e){QT=e}function tE(e){window[QT]=e}var nE=function(e){return typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`},rE=function(e,t,n){n.getAndRemove(e).forEach(function(e){pE(t,e).catch(console.error)})},iE=function(e,t){return b(void 0,void 0,void 0,function(){var n,r,i;return d(this,function(a){switch(a.label){case 0:n=0,r=t.getAndRemove(`addSourceMiddleware`),a.label=1;case 1:return n<r.length?(i=r[n],[4,pE(e,i).catch(console.error)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},aE=function(e,t){return b(void 0,void 0,void 0,function(){var n,r,i;return d(this,function(a){switch(a.label){case 0:n=0,r=t.getAndRemove(`register`),a.label=1;case 1:return n<r.length?(i=r[n],[4,pE(e,i).catch(console.error)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},oE=rE.bind(void 0,`on`),sE=rE.bind(void 0,`setAnonymousId`),cE=function(e,t){Object.keys(t.calls).forEach(function(n){t.getAndRemove(n).forEach(function(t){setTimeout(function(){pE(e,t).catch(console.error)},0)})})},lE=function(e){if(uE(e))return hT(e.pop())},uE=function(e){var t=e[e.length-1];return dT(t)},dE=function(){function e(e,t,n,r){n===void 0&&(n=function(){}),r===void 0&&(r=console.error),this.method=e,this.resolve=n,this.reject=r,this.called=!1,this.args=t}return e}(),fE=function(){function e(){var e=[...arguments];this._callMap={},this.add.apply(this,e)}return Object.defineProperty(e.prototype,`calls`,{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(e){this._callMap=e}
vendor: 4,569 bytes, line 276
276,enumerable:!1,configurable:!0}),e.prototype.get=function(e){return this.calls[e]??[]},e.prototype.getAndRemove=function(e){var t=this.get(e);return this.calls[e]=[],t},e.prototype.add=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.forEach(function(t){[`track`,`screen`,`alias`,`group`,`page`,`identify`].includes(t.method)&&!uE(t.args)&&(t.args=c(c([],t.args,!0),[gT()],!1)),e.calls[t.method]?e.calls[t.method].push(t):e.calls[t.method]=[t]})},e.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this.calls))},e.prototype._pushSnippetWindowBuffer=function(){if(eT()!==`npm`){var e=$T();if(Array.isArray(e)){var t=e.splice(0,e.length).map(function(e){var t=e[0];return new dE(t,e.slice(1))});this.add.apply(this,t)}}},e}();function pE(e,t){return b(this,void 0,void 0,function(){var n,r;return d(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),nE(n)?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}})})}var mE=function(){function e(e){var t=this;this.trackSubmit=this._createMethod(`trackSubmit`),this.trackClick=this._createMethod(`trackClick`),this.trackLink=this._createMethod(`trackLink`),this.pageView=this._createMethod(`pageview`),this.identify=this._createMethod(`identify`),this.reset=this._createMethod(`reset`),this.group=this._createMethod(`group`),this.track=this._createMethod(`track`),this.ready=this._createMethod(`ready`),this.alias=this._createMethod(`alias`),this.debug=this._createChainableMethod(`debug`),this.page=this._createMethod(`page`),this.once=this._createChainableMethod(`once`),this.off=this._createChainableMethod(`off`),this.on=this._createChainableMethod(`on`),this.addSourceMiddleware=this._createMethod(`addSourceMiddleware`),this.setAnonymousId=this._createMethod(`setAnonymousId`),this.addDestinationMiddleware=this._createMethod(`addDestinationMiddleware`),this.screen=this._createMethod(`screen`),this.register=this._createMethod(`register`),this.deregister=this._createMethod(`deregister`),this.user=this._createMethod(`user`),this.VERSION=Qw,this._preInitBuffer=new fE,this._promise=e(this._preInitBuffer),this._promise.then(function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r}).catch(function(){})}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var a=(n=t.instance)[e].apply(n,r);return Promise.resolve(a)}return new Promise(function(n,i){t._preInitBuffer.add(new dE(e,r,n,i))})}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.add(new dE(e,r)),t)}},e}(),hE=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var n=t(S());function r(e,t){return function(){var r=this.traits(),i=this.properties?this.properties():{};return n.default(r,`address.`+e)||n.default(r,e)||(t?n.default(r,`address.`+t):null)||(t?n.default(r,t):null)||n.default(i,`address.`+e)||n.default(i,e)||(t?n.default(i,`address.`+t):null)||(t?n.default(i,t):null)}}function i(e){e.zip=r(`postalCode`,`zip`),e.country=r(`country`),e.street=r(`street`),e.state=r(`state`),e.city=r(`city`),e.region=r(`region`)}e.default=i})),gE=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.clone=void 0;function t(e){if(typeof e!=`object`)return e;if(Object.prototype.toString.call(e)===`[object Object]`){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=t(e[r]));return n}else if(Array.isArray(e))return e.map(t);else return e}e.clone=t})),_E=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t={Salesforce:!0};function n(e){return!t[e]}e.default=n})),vE=n(((e,t)=>{var n=g();t.exports=r;function r(e,t){return t===void 0&&(t=!0),e&&typeof e==`object`?i(e,t):Array.isArray(e)?a(e,t):n.is(e,t)?
276n.parse(e):e}function i(e,t){return Object.keys(e).forEach(function(n){e[n]=r(e[n],t)}),e}function a(e,t){return e.forEach(function(n,i){e[i]=r(n,t)}),e}})),yE=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Facade=void 0;var n=t(hE()),r=gE(),i=t(_E()),a=t(v()),o=t(S()),s=t(vE());function c(e,t){t||={},this.raw=r.clone(e),`clone`in t||(t.clone=!0),t.clone&&(e=r.clone(e)),`traverse`in t||(t.traverse=!0),`timestamp`in e?e.timestamp=a.default(e.timestamp):e.timestamp=new Date,t.traverse&&s.default(e),this.opts=t,this.obj=e}e.Facade=c;var l=c.prototype;l.proxy=function(e){var t=e.split(`.`);e=t.shift();var n=this[e]||this.obj[e];return n&&(typeof n==`function`&&(n=n.call(this)||{}),t.length===0||(n=o.default(n,t.join(`.`))),this.opts.clone?u(n):n)},l.field=function(e){var t=this.obj[e];return this.opts.clone?u(t):t},c.proxy=function(e){return function(){return this.proxy(e)}},c.field=function(e){return function(){return this.field(e)}},c.multi=function(e){return function(){var t=this.proxy(e+`s`);if(Array.isArray(t))return t;var n=this.proxy(e);return n&&=[this.opts.clone?r.clone(n):n],n||[]}},c.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+`s`);if(Array.isArray(n))return n[0]}},l.json=function(){var e=this.opts.clone?r.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},l.rawEvent=function(){return this.raw},l.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?r.clone(t):t;if(!e)return n;if(this.enabled(e)){var i=this.integrations(),a=i[e]||o.default(i,e);return typeof a!=`object`&&(a=o.default(this.options(),e)),typeof a==`object`?a:{}}},l.context=l.options,l.enabled=function(e){var t=this.proxy(`options.providers.all`);typeof t!=`boolean`&&(t=this.proxy(`options.all`)),typeof t!=`boolean`&&(t=this.proxy(`integrations.all`)),typeof t!=`boolean`&&(t=!0);var n=t&&i.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var a=r[e];n=typeof a==`boolean`?a:!0}return!!n},l.integrations=function(){return this.obj.integrations||this.proxy(`options.providers`)||this.options()},l.active=function(){var e=this.proxy(`options.active`);return e??=!0,e},l.anonymousId=function(){return this.field(`anonymousId`)||this.field(`sessionId`)},l.sessionId=l.anonymousId,l.groupId=c.proxy(`options.groupId`),l.traits=function(e){var t=this.proxy(`options.traits`)||{},n=this.userId();for(var r in e||={},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=this[r]==null?this.proxy(`options.traits.`+r):this[r]();if(i==null)continue;t[e[r]]=i,delete t[r]}return t},l.library=function(){var e=this.proxy(`options.library`);return e?typeof e==`string`?{name:e,version:null}:e:{name:`unknown`,version:null}},l.device=function(){var e=this.proxy(`context.device`);(typeof e!=`object`||!e)&&(e={});var t=this.library().name;return e.type?e:(t.indexOf(`ios`)>-1&&(e.type=`ios`),t.indexOf(`android`)>-1&&(e.type=`android`),e)},l.userAgent=c.proxy(`context.userAgent`),l.timezone=c.proxy(`context.timezone`),l.timestamp=c.field(`timestamp`),l.channel=c.field(`channel`),l.ip=c.proxy(`context.ip`),l.userId=c.field(`userId`),n.default(l);function u(e){return r.clone(e)}})),bE=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Alias=void 0;var n=t(y()),r=yE();function i(e,t){r.Facade.call(this,e,t)}e.Alias=i,n.default(i,r.Facade),i.prototype.action=function(){return`alias`},i.prototype.type=i.prototype.action,i.prototype.previousId=function(){return this.field(`previousId`)||this.field(`from`)},i.prototype.from=i.prototype.previousId,i.prototype.userId=function(){return this.field(`userId`)||this.field(`to`)},i.prototype.to=i.prototype.userId})),xE=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=/.+\@.+\..+/;function n(e){return t.test(e)}e.default=n})),SE=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Group=void 0;
276var n=t(y()),r=t(xE()),i=t(v()),a=yE();function o(e,t){a.Facade.call(this,e,t)}e.Group=o,n.default(o,a.Facade);var s=o.prototype;s.action=function(){return`group`},s.type=s.action,s.groupId=a.Facade.field(`groupId`),s.created=function(){var e=this.proxy(`traits.createdAt`)||this.proxy(`traits.created`)||this.proxy(`properties.createdAt`)||this.proxy(`properties.created`);if(e)return i.default(e)},s.email=function(){var e=this.proxy(`traits.email`);if(e)return e;var t=this.groupId();if(r.default(t))return t},s.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e||={},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=this[r]==null?this.proxy(`traits.`+r):this[r]();if(i==null)continue;t[e[r]]=i,delete t[r]}return t},s.name=a.Facade.proxy(`traits.name`),s.industry=a.Facade.proxy(`traits.industry`),s.employees=a.Facade.proxy(`traits.employees`),s.properties=function(){return this.field(`traits`)||this.field(`properties`)||{}}})),CE=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Identify=void 0;var n=yE(),r=t(S()),i=t(y()),a=t(xE()),o=t(v()),s=function(e){return e.trim()};function c(e,t){n.Facade.call(this,e,t)}e.Identify=c,i.default(c,n.Facade);var l=c.prototype;l.action=function(){return`identify`},l.type=l.action,l.traits=function(e){var t=this.field(`traits`)||{},n=this.userId();for(var r in e||={},n&&(t.id=n),e){var i=this[r]==null?this.proxy(`traits.`+r):this[r]();i!=null&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},l.email=function(){var e=this.proxy(`traits.email`);if(e)return e;var t=this.userId();if(a.default(t))return t},l.created=function(){var e=this.proxy(`traits.created`)||this.proxy(`traits.createdAt`);if(e)return o.default(e)},l.companyCreated=function(){var e=this.proxy(`traits.company.created`)||this.proxy(`traits.company.createdAt`);if(e)return o.default(e)},l.companyName=function(){return this.proxy(`traits.company.name`)},l.name=function(){var e=this.proxy(`traits.name`);if(typeof e==`string`)return s(e);var t=this.firstName(),n=this.lastName();if(t&&n)return s(t+` `+n)},l.firstName=function(){var e=this.proxy(`traits.firstName`);if(typeof e==`string`)return s(e);var t=this.proxy(`traits.name`);if(typeof t==`string`)return s(t).split(` `)[0]},l.lastName=function(){var e=this.proxy(`traits.lastName`);if(typeof e==`string`)return s(e);var t=this.proxy(`traits.name`);if(typeof t==`string`){var n=s(t).indexOf(` `);if(n!==-1)return s(t.substr(n+1))}},l.uid=function(){return this.userId()||this.username()||this.email()},l.description=function(){return this.proxy(`traits.description`)||this.proxy(`traits.background`)},l.age=function(){var e=this.birthday(),t=r.default(this.traits(),`age`);if(t!=null)return t;if(e instanceof Date)return new Date().getFullYear()-e.getFullYear()},l.avatar=function(){var e=this.traits();return r.default(e,`avatar`)||r.default(e,`photoUrl`)||r.default(e,`avatarUrl`)},l.position=function(){var e=this.traits();return r.default(e,`position`)||r.default(e,`jobTitle`)},l.username=n.Facade.proxy(`traits.username`),l.website=n.Facade.one(`traits.website`),l.websites=n.Facade.multi(`traits.website`),l.phone=n.Facade.one(`traits.phone`),l.phones=n.Facade.multi(`traits.phone`),l.address=n.Facade.proxy(`traits.address`),l.gender=n.Facade.proxy(`traits.gender`),l.birthday=n.Facade.proxy(`traits.birthday`)})),wE=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Track=void 0;var n=t(y()),r=yE(),i=CE(),a=t(xE()),o=t(S());function s(e,t){r.Facade.call(this,e,t)}e.Track=s,n.default(s,r.Facade);var c=s.prototype;c.action=function(){return`track`},c.type=c.action,c.event=r.Facade.field(`event`),c.value=r.Facade.proxy(`properties.value`),c.category=r.Facade.proxy(`properties.category`),c.id=r.Facade.proxy(`properties.id`),c.productId=function(){return this.proxy(`properties.product_id`)||this.proxy(`properties.productId`)},c.promotionId=function(){return this.proxy(`properties.promotion_id`)||this.proxy(`properties.promotionId`)},c.cartId=function(){return this.proxy(`properties.cart_id`)||this.proxy(`properties.cartId`)},c.checkoutId=function(){return this.proxy(`properties.checkout_id`)||this.proxy(`properties.checkoutId`)},c.paymentId=function(){return this.proxy(`properties.payment_id`)||this.proxy(`properties.paymentId`)},c.couponId=function(){return this.proxy(`properties.coupon_id`)||this.proxy(`properties.couponId`)},c.wishlistId=function(){return this.proxy(`properties.wishlist_id`)||this.proxy(`properties.wishlistId`)},c.reviewId=function(){return this.proxy(`properties.review_id`)||this.proxy(`properties.reviewId`)},c.orderId=function(){return this.proxy(`properties.id`)||this.proxy(`properties.order_id`)||this.proxy(`properties.orderId`)},c.sku=r.Facade.proxy(`properties.sku`),c.tax=r.Facade.proxy(`properties.tax`),c.name=r.Facade.proxy(`properties.name`),c.price=r.Facade.proxy(`properties.price`),c.total=r.Facade.proxy(`properties.total`),c.repeat=r.Facade.proxy(`properties.repeat`),c.coupon=r.Facade.proxy(`properties.coupon`),c.shipping=r.Facade.proxy(`properties.shipping`),c.discount=r.Facade.proxy(`properties.discount`),c.shippingMethod=function(){return this.proxy(`properties.shipping_method`)||this.proxy(`properties.shippingMethod`)},c.paymentMethod=function(){return this.proxy(`properties.payment_method`)||this.proxy(`properties.paymentMethod`)},c.description=r.Facade.proxy(`properties.description`),c.plan=r.Facade.proxy(`properties.plan`),c.subtotal=function(){var e=o.default(this.properties(),`subtotal`),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),n=this.shipping(),n&&(t-=n),n=this.discount(),n&&(t+=n)}return t},c.products=function(){var e=this.properties(),t=o.default(e,`products`);return Array.isArray(t)?t.filter(function(e){return e!==null}):[]},c.quantity=function(){return(this.obj.properties||{}).quantity||1},c.currency=function(){return(this.obj.properties||{}).currency||`USD`},c.referrer=function(){return this.proxy(`context.referrer.url`)||this.proxy(`context.page.referrer`)||this.proxy(`properties.referrer`)},c.query=r.Facade.proxy(`options.query`),c.properties=function(e){var t=this.field(`properties`)||{};for(var n in e||={},e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=this[n]==null?this.proxy(`properties.`+n):this[n]();if(r==null)continue;t[e[n]]=r,delete t[n]}return t},c.username=function(){return this.proxy(`traits.username`)||this.proxy(`properties.username`)||this.userId()||this.sessionId()},c.email=function(){var e=this.proxy(`traits.email`)||this.proxy(`properties.email`)||this.proxy(`options.traits.email`);if(e)return e;var t=this.userId();if(a.default(t))return t},c.revenue=function(){var e=this.proxy(`properties.revenue`),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy(`properties.total`)),l(e)},c.cents=function(){var e=this.revenue();return typeof e==`number`?e*100:this.value()||0},c.identify=function(){var e=this.json();return e.traits=this.traits(),new i.Identify(e,this.opts)};function l(e){if(e&&(typeof e==`number`||typeof e==`string`&&(e=e.replace(/\$/g,``),e=parseFloat(e),!isNaN(e))))return e}})),TE=n((e=>
276{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Page=void 0;var n=t(y()),r=yE(),i=wE(),a=t(xE());function o(e,t){r.Facade.call(this,e,t)}e.Page=o,n.default(o,r.Facade);var s=o.prototype;s.action=function(){return`page`},s.type=s.action,s.category=r.Facade.field(`category`),s.name=r.Facade.field(`name`),s.title=r.Facade.proxy(`properties.title`),s.path=r.Facade.proxy(`properties.path`),s.url=r.Facade.proxy(`properties.url`),s.referrer=function(){return this.proxy(`context.referrer.url`)||this.proxy(`context.page.referrer`)||this.proxy(`properties.referrer`)},s.properties=function(e){var t=this.field(`properties`)||{},n=this.category(),r=this.name();for(var i in e||={},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=this[i]==null?this.proxy(`properties.`+i):this[i]();if(a==null)continue;t[e[i]]=a,i!==e[i]&&delete t[i]}return t},s.email=function(){var e=this.proxy(`context.traits.email`)||this.proxy(`properties.email`);if(e)return e;var t=this.userId();if(a.default(t))return t},s.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+` `+t:t},s.event=function(e){return e?`Viewed `+e+` Page`:`Loaded a Page`},s.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new i.Track(t,this.opts)}})),EE=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Screen=void 0;var n=t(y()),r=TE(),i=wE();function a(e,t){r.Page.call(this,e,t)}e.Screen=a,n.default(a,r.Page),a.prototype.action=function(){return`screen`},a.prototype.type=a.prototype.action,a.prototype.event=function(e){return e?`Viewed `+e+` Screen`:`Loaded a Screen`},a.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new i.Track(t,this.opts)}})),DE=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Delete=void 0;var n=t(y()),r=yE();function i(e,t){r.Facade.call(this,e,t)}e.Delete=i,n.default(i,r.Facade),i.prototype.type=function(){return`delete`}})),OE=n((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,`__esModule`,{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=yE();Object.defineProperty(e,`Facade`,{enumerable:!0,get:function(){return n.Facade}});var r=bE();Object.defineProperty(e,`Alias`,{enumerable:!0,get:function(){return r.Alias}});var i=SE();Object.defineProperty(e,`Group`,{enumerable:!0,get:function(){return i.Group}});var a=CE();Object.defineProperty(e,`Identify`,{enumerable:!0,get:function(){return a.Identify}});var o=wE();Object.defineProperty(e,`Track`,{enumerable:!0,get:function(){return o.Track}});var s=TE();Object.defineProperty(e,`Page`,{enumerable:!0,get:function(){return s.Page}});var c=EE();Object.defineProperty(e,`Screen`,{enumerable:!0,get:function(){return c.Screen}});var l=DE();Object.defineProperty(e,`Delete`,{enumerable:!0,get:function(){return l.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:a.Identify,Track:o.Track,Page:s.Page,Screen:c.Screen,Delete:l.Delete})}))();function kE(e,t){var n=new OE.Facade(e,t);return e.type===`track`&&(n=new OE.Track(e,t)),e.type===`identify`&&(n=new OE.Identify(e,t)),e.type===`page`&&(n=new OE.Page(e,t)),e.type===`alias`&&(n=new OE.Alias(e,t)),e.type===`group`&&(n=new OE.Group(e,t)),e.type===`screen`&&(n=new OE.Screen(e,t)),Object.defineProperty(n,`obj`,{value:e,writable:!0}),n}var AE=function(e){var t=!1;window.addEventListener(`pagehide`,function(){t||(t=!0,e(t))}),document.addEventListener(`visibilitychange`,function(){if(document.visibilityState==`hidden`){if(t)return;t=!0}else t=!1;e(t)})},jE=function(e){u(t,e);function t(t,n){var r=e.call(this,t)||this;return r.retryTimeout=n,r.name=`RateLimitError`,r}return t}(Error),ME=function(e){return r({"Content-Type":`text/plain`},typeof e==`function`?e():e)},NE=500,PE=64;function FE(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function IE(e){return FE(e)>=NE-50}function LE(e){return FE(e)>=PE-10}function RE(e){var t=[],n=0;return e.forEach(function(e){FE(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]}),t}function zE(e,t){var n=[],i=!1,a=t?.size??10,o=t?.timeout??5e3,c=0;function l(n){if(n.length!==0){var r=n[0]?.writeKey,a=n.map(function(e){var t=e;return t.sentAt,s(t,[`sentAt`])});return Zw(`https://${e}/b`,{credentials:t?.credentials,keepalive:t?.keepalive||i,headers:ME(t?.headers),method:`post`,body:JSON.stringify({writeKey:r,batch:a,sentAt:new Date().toISOString()}),priority:t?.priority}).then(function(e){if(e.status>=500)throw Error(`Bad response from server: ${e.status}`);if(e.status===429){var t=e.headers?.get(`x-ratelimit-reset`),n=typeof t==`string`?parseInt(t)*1e3:o;throw new jE(`Rate limit exceeded: ${e.status}`,n)}})}}function u(e){return e===void 0&&(e=1),b(this,void 0,void 0,function(){var i;return d(this,function(a){return n.length?(i=n,n=[],[2,l(i)?.catch(function(a){sT.system().log(`error`,`Error sending batch`,a),e<=(t?.maxRetries??10)&&(a.name===`RateLimitError`&&(c=a.retryTimeout),n.push.apply(n,i),n.map(function(t){if(`_metadata`in t){var n=t;n._metadata=r(r({},n._metadata),{retryCount:e})}}),p(e+1))})]):[2]})})}var f;function p(e){e===void 0&&(e=1),!f&&(f=setTimeout(function(){f=void 0,u(e).catch(console.error)},c||o),c=0)}AE(function(e){if(i=e,i&&n.length){var t=RE(n).map(l);Promise.all(t).catch(console.error)}});function m(e,r){return b(this,void 0,void 0,function(){var e;return d(this,function(o){return n.push(r),e=n.length>=a||IE(n)||t?.keepalive&&LE(n),[2,e||i?u():p()]})})}return{dispatch:m}}function BE(e){function t(t,n){return Zw(t,{credentials:e?.credentials,keepalive:e?.keepalive,headers:ME(e?.headers),method:`post`,body:JSON.stringify(n),priority:e?.priority}).then(function(e){if(e.status>=500)throw Error(`Bad response from server: ${e.status}`);if(e.status===429){var t=e.headers?.get(`x-ratelimit-reset`),n=t?parseInt(t)*1e3:5e3;throw new jE(`Rate limit exceeded: ${e.status}`,n)}})}return{dispatch:t}}function VE(e,t,n,i,a){var o=e.user();delete t.options,t.writeKey=n?.apiKey,t.userId=t.userId||o.id(),t.anonymousId=t.anonymousId||o.anonymousId(),t.sentAt=new Date;var s=e.queue.failedInitializations||[];s.length>0&&(t._metadata={failedInitializations:s}),a!=null&&(a.attempts>1&&(t._metadata=r(r({},t._metadata),{retryCount:a.attempts})),a.attempts++);var c=[],l=[];for(var u in i){var d=i[u];u===`Segment.io`&&c.push(u),d.bundlingStatus===`bundled`&&c.push(u),d.bundlingStatus===`unbundled`&&l.push(u)}for(var f=0,p=n?.unbundledIntegrations||[];f<p.length;f++){var m=p[f];l.includes(m)||l.push(m)}var h=n?.maybeBundledConfigIds??{},g=[];
276return c.sort().forEach(function(e){(h[e]??[]).forEach(function(e){g.push(e)})}),n?.addBundledMetadata!==!1&&(t._metadata=r(r({},t._metadata),{bundled:c.sort(),unbundled:l.sort(),bundledIds:g})),t}var HE=function(e,t){return b(void 0,void 0,void 0,function(){var n;return d(this,function(r){return n=function(r){return b(void 0,void 0,void 0,function(){var i;return d(this,function(a){switch(a.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[a.sent()])];case 2:return[2]}})})},[2,n(void 0)]})})};function UE(e,t){return b(this,void 0,void 0,function(){var n,r=this;return d(this,function(i){switch(i.label){case 0:return n=[],Yw()?[2,t]:[4,HE(function(){return t.length>0&&!Yw()},function(){return b(r,void 0,void 0,function(){var r,i,a;return d(this,function(o){switch(o.label){case 0:return r=t.pop(),r?[4,Aw(r,e)]:[2];case 1:return i=o.sent(),a=i instanceof sT,a||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(e){return t.pushWithBackoff(e)}),[2,t]}})})}function WE(e,t,n,r){var i=this;e||setTimeout(function(){return b(i,void 0,void 0,function(){var e,i;return d(this,function(a){switch(a.label){case 0:return e=!0,[4,UE(n,t)];case 1:return i=a.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}})})},Math.random()*5e3)}function GE(e,t){var n=e.user();return t.previousId=t.previousId??t.from??n.id()??n.anonymousId(),t.userId=t.userId??t.to,delete t.from,delete t.to,t}var KE=function(e){return e.name===`Segment.io`};function qE(e,t,n){window.addEventListener(`pagehide`,function(){i.push.apply(i,Array.from(a)),a.clear()});var r=t?.apiKey??``,i=e.options.disableClientPersistence?new yw(e.queue.queue.maxAttempts,[]):new AT(e.queue.queue.maxAttempts,`${r}:dest-Segment.io`),a=new Set,o=!1,s=t?.apiHost??tT,c=t?.protocol??`https`,l=`${c}://${s}`,u=t?.deliveryStrategy,f=u&&`strategy`in u&&u.strategy===`batching`?zE(s,u.config):BE(u?.config);function p(r){return b(this,void 0,void 0,function(){var s,c;return d(this,function(u){return Yw()?(i.push(r),WE(o,i,m,WE),[2,r]):(a.add(r),s=r.event.type.charAt(0),c=kE(r.event).json(),r.event.type===`track`&&delete c.traits,r.event.type===`alias`&&(c=GE(e,c)),i.getAttempts(r)>=i.maxAttempts?(a.delete(r),[2,r]):[2,f.dispatch(`${l}/${s}`,VE(e,c,t,n,r)).then(function(){return r}).catch(function(e){if(r.log(`error`,`Error sending event`,e),e.name===`RateLimitError`){var t=e.retryTimeout;i.pushWithBackoff(r,t)}else i.pushWithBackoff(r);return WE(o,i,m,WE),r}).finally(function(){a.delete(r)})])})})}var m={metadata:{writeKey:r,apiHost:s,protocol:c},name:`Segment.io`,type:`destination`,version:`0.1.0`,isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:p,identify:p,page:p,alias:p,group:p,screen:p};return i.todo&&WE(o,i,m,WE),m}var JE=`This is being deprecated and will be not be available in future releases of Analytics JS`,YE=Xw()?.anal
276ytics;function XE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=t?10:1;return new jT(n?new yw(r,[]):new AT(r,e))}var ZE=function(){function e(e,t){this.timeout=300,this._getSegmentPluginMetadata=function(){return t.plugins.find(KE)?.metadata},this.writeKey=e.writeKey,this.cdnSettings=e.cdnSettings??{integrations:{"Segment.io":{apiKey:``}}},this.cdnURL=e.cdnURL}return Object.defineProperty(e.prototype,`apiHost`,{get:function(){return this._getSegmentPluginMetadata?.call(this)?.apiHost},enumerable:!1,configurable:!0}),e}();function QE(){console.warn(JE)}var $E=function(e){u(t,e);function t(t,n,i,a,o){var s=this;s=e.call(this)||this,s._debug=!1,s.initialized=!1,s.user=function(){return s._user},s.init=s.initialize.bind(s),s.log=QE,s.addIntegrationMiddleware=QE,s.listeners=QE,s.addEventListener=QE,s.removeAllListeners=QE,s.removeListener=QE,s.removeEventListener=QE,s.hasListeners=QE,s.add=QE,s.addIntegration=QE;var c=n?.cookie,l=n?.disableClientPersistence??!1;s.queue=i??XE(`${t.writeKey}:event-queue`,n?.retryQueue,l),s.settings=new ZE(t,s.queue);var u=n?.storage;return s._universalStorage=s.createStore(l,u,c),s._user=a??new JT(r({persist:!l,storage:n?.storage},n?.user),c).load(),s._group=o??new ZT(r({persist:!l,storage:n?.storage},n?.group),c).load(),s.eventFactory=new bT(s._user),s.integrations=n?.integrations??{},s.options=n??{},MT(s),s}return t.prototype.createStore=function(e,t,n){return e?new WT([new zT]):t&&VT(t)?new WT(GT(KT(t.stores,n))):new WT(GT([BT.LocalStorage,{name:BT.Cookie,settings:n},BT.Memory]))},Object.defineProperty(t.prototype,`storage`,{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c=this;return d(this,function(l){return t=lE(e),n=Hw.apply(void 0,e),r=n[0],i=n[1],a=n[2],o=n[3],s=this.eventFactory.track(r,i,a,this.integrations,t),[2,this._dispatch(s,o).then(function(e){return c.emit(`track`,r,e.event.properties,e.event.options),e})]})})},t.prototype.page=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c,l=this;return d(this,function(u){return t=lE(e),n=Uw.apply(void 0,e),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=this.eventFactory.page(r,i,a,o,this.integrations,t),[2,this._dispatch(c,s).then(function(e){return l.emit(`page`,r,i,e.event.properties,e.event.options),e})]})})},t.prototype.identify=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c=this;return d(this,function(l){return t=lE(e),n=Ww(this._user).apply(void 0,e),r=n[0],i=n[1],a=n[2],o=n[3],this._user.identify(r,i),s=this.eventFactory.identify(this._user.id(),this._user.traits(),a,this.integrations,t),[2,this._dispatch(s,o).then(function(e){return c.emit(`identify`,e.event.userId,e.event.traits,e.event.options),e})]})})},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=lE(t);if(t.length===0)return this._group;var i=Ww(this._group).apply(void 0,t),a=i[0],o=i[1],s=i[2],c=i[3];this._group.identify(a,o);var l=this._group.id(),u=this._group.traits(),d=this.eventFactory.group(l,u,s,this.integrations,r);return this._dispatch(d,c).then(function(t){return e.emit(`group`,t.event.groupId,t.event.traits,t.event.options),t})},t.prototype.alias=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c=this;return d(this,function(l){return t=lE(e),n=Gw.apply(void 0,e),r=n[0],i=n[1],a=n[2],o=n[3],s=this.eventFactory.alias(r,i,a,this.integrations,t),[2,this._dispatch(s,o).then(function(e){return c.emit(`alias`,r,i,e.event.options),e})]})})},t.prototype.screen=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c,l=this;return d(this,function(u){return t=lE(e),n=Uw.apply(void 0,e),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=this.eventFactory.screen(r,i,a,o,this.integrations,t),[2,this._dispatch(c,s).then(function(e){return l.emit(`screen`,r,i,e.event.properties,e.event.options),e})]})})},t.prototype.trackClick=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n;return d(this,function(r){switch(r.label){case 0:return[4,k(()=>import(`./auto-track-DLDSfhgi.js`),[])];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,c([this],e,!1))]}})})},t.prototype.trackLink=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n;return d(this,function(r){switch(r.label){case 0:return[4,k(()=>import(`./auto-track-DLDSfhgi.js`),[])];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,c([this],e,!1))]}})})},t.prototype.trackSubmit=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n;return d(this,function(r){switch(r.label){case 0:return[4,k(()=>import(`./auto-track-DLDSfhgi.js`),[])];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,c([this],e,!1))]}})})},t.prototype.trackForm=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n;return d(this,function(r){switch(r.label){case 0:return[4,k(()=>import(`./auto-track-DLDSfhgi.js`),[])];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,c([this],e,!1))]}})})},t.prototype.register=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n,r=this;return d(this,function(i){switch(i.label){case 0:return t=sT.system(),n=e.map(function(e){return r.queue.register(t,e,r)}),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}})})},t.prototype.deregister=function(){var e=[...arguments];return b(this,void 0,void 0,function(){var t,n,r=this;return d(this,function(i){switch(i.label){case 0:return t=sT.system(),n=e.map(function(e){var n=r.queue.plugins.find(function(t){return t.name===e});if(n)return r.queue.deregister(t,n,r);t.log(`warn`,`plugin ${e} not found`)}),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}})})},t.prototype.debug=function(e){return e===!1&&localStorage.getItem(`debug`)&&localStorage.removeItem(`debug`),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit
vendor: 9,208 bytes, line 276
276(`reset`)},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return b(this,void 0,void 0,function(){var n;return d(this,function(r){return n=new sT(e),n.stats.increment(`analytics_js.invoke`,1,[e.type]),Yw()&&!this.options.retryQueue?[2,n]:[2,Pw(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]})})},t.prototype.addSourceMiddleware=function(e){return b(this,void 0,void 0,function(){var t=this;return d(this,function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run(function(){return b(t,void 0,void 0,function(){var t,n,r;return d(this,function(i){switch(i.label){case 0:return[4,k(()=>import(`./middleware-iGyjunrs.js`),__vite__mapDeps([5,1,2,3]))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach(function(e){if(e.type===`destination`)return n[e.name]=!0}),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}})})})];case 1:return n.sent(),[2,this]}})})},t.prototype.addDestinationMiddleware=function(e){var t=[...arguments].slice(1);return this.queue.plugins.filter(xT).forEach(function(n){(e===`*`||n.name.toLowerCase()===e.toLowerCase())&&n.addMiddleware.apply(n,t)}),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return this.options.useQueryString===!1?[2,[]]:[4,k(()=>import(`./query-string-BEwNSE7V.js`),[])];case 1:return t=n.sent().queryString,[2,t(this,e)]}})})},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return e===void 0&&(e=function(e){return e}),b(this,void 0,void 0,function(){return d(this,function(t){return[2,Promise.all(this.queue.plugins.map(function(e){return e.ready?e.ready():Promise.resolve()})).then(function(t){return e(t),t})]})})},t.prototype.noConflict=function(){return console.warn(JE),tE(YE??this),this},t.prototype.normalize=function(e){return console.warn(JE),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,`failedInitializations`,{get:function(){return console.warn(JE),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`VERSION`,{get:function(){return Qw},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return b(this,void 0,void 0,function(){return d(this,function(e){return console.warn(JE),[2,Promise.resolve(this)]})})},t.prototype.pageview=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return console.warn(JE),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}})})},Object.defineProperty(t.prototype,`plugins`,{get:function(){return console.warn(JE),this._plugins??{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`Integrations`,{get:function(){return console.warn(JE),this.queue.plugins.filter(function(e){return e.type===`destination`}).reduce(function(e,t){var n=`${t.name.toLowerCase().replace(`.`,``).split(` `).join(`-`)}Integration`,r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)},{})},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=this,n=e.shift();n&&!t[n]||t[n].apply(this,e)},t}(gw),eD=function(e){u(t,e);function t(){var t=e.call(this,{writeKey:``},{disableClientPersistence:!0})||this;return t.initialized=!0,t}return t}($E);function tD(){return{}}var nD=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,rD=function(){var e;return Array.prototype.slice.call(document.querySelectorAll(`script`)).forEach(function(t){var n=t.getAttribute(`src`)??``,r=nD.exec(n);r&&r[1]&&(e=r[1])}),e},iD,aD=function(){return iD??$T()?._cdn},oD=function(e){var t=$T();t&&(t._cdn=e),iD=e},sD=function(){return aD()||rD()||`https://cdn.segment.com`},cD=function(){return`${sD()}/next-integrations`};function lD(e,t){var n=Object.entries(t.integrations??{}).reduce(function(e,t){var n,i,a=t[0],o=t[1];return typeof o==`object`?r(r({},e),(n={},n[a]=o,n)):r(r({},e),(i={},i[a]={},i))},{});return Object.entries(e.integrations).reduce(function(e,t){var i,a=t[0],o=t[1];return r(r({},e),(i={},i[a]=r(r({},o),n[a]),i))},{})}function uD(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){return t=navigator.userAgentData,t?e?[2,t.getHighEntropyValues(e).catch(function(){return t.toJSON()})]:[2,t.toJSON()]:[2,void 0]})})}var dD;function fD(){if(dD)return dD;var e=FT(window.location.href);return dD={expires:31536e6,secure:!1,path:`/`},e&&(dD.domain=e),dD}function pD(e){var t={btid:`dataxu`,urid:`millennial-media`};e.startsWith(`?`)&&(e=e.substring(1)),e=e.replace(/\?/g,`&`);for(var n=e.split(`&`),r=0,i=n;r<i.length;r++){var a=i[r].split(`=`),o=a[0],s=a[1];if(t[o])return{id:s,type:t[o]}}}function mD(e){return e.startsWith(`?`)&&(e=e.substring(1)),e=e.replace(/\?/g,`&`),e.split(`&`).reduce(function(e,t){var n=t.split(`=`),r=n[0],i=n[1],a=i===void 0?``:i;if(r.includes(`utm_`)&&r.length>4){var o=r.slice(4);o===`campaign`&&(o=`name`),e[o]=Bw(a)}return e},{})}function hD(){var e=T.get(`_ga`);if(e&&e.startsWith(`amp`))return e}function gD(e,t,n){var i=new WT(n?[]:[new LT(fD())]),a=i.get(`s:context.referrer`),o=pD(e)??a;o&&(t&&(t.referrer=r(r({},t.referrer),o)),i.set(`s:context.referrer`,o))}var _D=function(e){try{var t=new URLSearchParams;return Object.entries(e).forEach(function(e){var n=e[0],r=e[1];Array.isArray(r)?r.forEach(function(e){return t.append(n,e)}):t.append(n,r)}),t.toString()}catch{return``}},vD=new(function(){function e(){var e=this;this.name=`Page Enrichment`,this.type=`before`,this.version=`0.1.0`,this.isLoaded=function(){return!0},this.load=function(t,n){return b(e,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:this.instance=n,t.label=1;case 1:return t.trys.push([1,3,,4]),e=this,[4,uD(this.instance.options.highEntropyValuesClientHints)];case 2:return e.userAgentData=t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2,Promise.resolve()]}})})},this.enrich=function(t){var n=t.event.context,r=n.page.search||``,i=typeof r==`object`?_D(r):r;n.userAgent=navigator.userAgent,n.userAgentData=e.userAgentData;var a=navigator.userLanguage||navigator.language;n.locale===void 0&&a!==void 0&&(n.locale=a),n.library??={name:`analytics.js`,version:`${eT()===`web`?`next`:`npm:next`}-1.81.1`},i&&!n.campaign&&(n.campaign=mD(i));var o=hD();o&&(n.amp={id:o}),gD(i,n,e.instance.options.disableClientPersistence??!1);try{n.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}return t},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich}return e}());function yD(e){return Array.prototype.slice.call(window.document.querySelectorAll(`script`)).find(function(t){return t.src===e})}function bD(e,t){var n=yD(e);if(n!==void 0){var r=n?.getAttribute(`status`);if(r===`loaded`)return Promise.resolve(n);if(r===`loading`)return new Promise(function(e,t){n.addEventListener(`load`,function(){return e(n)}),n.addEventListener(`error`,function(e){return t(e)})})}return new Promise(function(n,r){var i,a=window.document.createElement(`script`);a.type=`text/javascript`,a.src=e,a.async=!0,a.setAttribute(`status`,`loading`);for(var o=0,s=Object.entries(t??{});o<s.length;o++){var c=s[o],l=c[0],u=c[1];a.setAttribute(l,u)}a.onload=function(){a.onerror=a.onload=null,a.setAttribute(`status`,`loaded`),n(a)},a.onerror=function(){a.onerror=a.onload=null,a.setAttribute(`status`,`error`),r(Error(`Failed to load ${e}`))};var d=window.document.querySelector(`script`);d?(i=d.parentElement)==null||i.insertBefore(a,d):window.document.head.appendChild(a)})}function xD(e){var t=yD(e);return t!==void 0&&t.remove(),Promise.resolve()}function SD(e,t,n){return b(this,void 0,void 0,function(){function i(t,n){return b(this,void 0,void 0,function(){var i,a,o;return d(this,function(s){switch(s.label){case 0:return i=!1,a=null,[4,n({payload:kE(t,{clone:!0,traverse:!1}),integration:e,next:function(e){i=!0,e===null&&(a=null),e&&(a=e.obj)}})];case 1:return s.sent(),!i&&a!==null&&(a=a,a.integrations=r(r({},t.integrations),(o={},o[e]=!1,o))),[2,a]}})})}var a,o,s,c,l;return d(this,function(e){switch(e.label){case 0:a=kE(t,{clone:!0,traverse:!1}).rawEvent(),o=0,s=n,e.label=1;case 1:return o<s.length?(c=s[o],[4,i(a,c)]):[3,4];case 2:if(l=e.sent(),l===null)return[2,null];a=l,e.label=3;case 3:return o++,[3,1];case 4:return[2,a]}})})}function CD(e,t){function n(n){return b(this,void 0,void 0,function(){var r;return d(this,function(i){switch(i.label){case 0:return r=!1,[4,e({payload:kE(n.event,{clone:!0,traverse:!1}),integrations:t??{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new ww({retry:!1,type:`middleware_cancellation`,reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:`Source Middleware ${e.name}`,type:`before`,version:`0.1.0`,isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,screen:n,identify:n,alias:n,group:n}}function wD(e,t){var n=t.methodName,r=t.integrationName,i=t.type,a=t.didError,o=a===void 0?!1:a;
vendor: 4,752 bytes, line 276
276e.stats.increment(`analytics_js.integration.invoke${o?`.error`:``}`,1,[`method:${n}`,`integration_name:${r}`,`type:${i}`])}var TD=function(){function e(e,t){this.version=`1.0.0`,this.alternativeNames=[],this.loadPromise=hw(),this.middleware=[],this.alias=this._createMethod(`alias`),this.group=this._createMethod(`group`),this.identify=this._createMethod(`identify`),this.page=this._createMethod(`page`),this.screen=this._createMethod(`screen`),this.track=this._createMethod(`track`),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.type===`destination`&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return b(this,void 0,void 0,function(){var t;return d(this,function(n){switch(n.label){case 0:return[4,SD(this.name,e.event,this.middleware)];case 1:return t=n.sent(),t===null&&e.cancel(new ww({retry:!1,reason:`dropped by destination middleware`})),[2,new sT(t)]}})})},e.prototype._createMethod=function(e){var t=this;return function(n){return b(t,void 0,void 0,function(){var t,r;return d(this,function(i){switch(i.label){case 0:return this.action[e]?(t=n,this.type===`destination`?[4,this.transform(n)]:[3,2]):[2,n];case 1:t=i.sent(),i.label=2;case 2:return i.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!i.sent())throw Error(`Something prevented the destination from getting ready`);return wD(n,{integrationName:this.action.name,methodName:e,type:`action`}),[4,this.action[e](t)];case 4:return i.sent(),[3,6];case 5:throw r=i.sent(),wD(n,{integrationName:this.action.name,methodName:e,type:`action`,didError:!0}),r;case 6:return[2,n]}})})}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return b(this,void 0,void 0,function(){return d(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}})})},e.prototype.load=function(e,t){return b(this,void 0,void 0,function(){var n,r,i,a;return d(this,function(o){switch(o.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];o.label=1;case 1:return o.trys.push([1,3,,4]),wD(e,{integrationName:this.action.name,methodName:`load`,type:`action`}),n=this.action.load(e,t),i=(r=this.loadPromise).resolve,[4,n];case 2:return i.apply(r,[o.sent()]),[2,n];case 3:throw a=o.sent(),wD(e,{integrationName:this.action.name,methodName:`load`,type:`action`,didError:!0}),this.loadPromise.reject(a),a;case 4:return[2]}})})},e.prototype.unload=function(e,t){var n;return(n=this.action).unload?.call(n,e,t)},e}();function ED(e){if(!Array.isArray(e))throw Error(`Not a valid list of plugins`);var t=[`load`,`isLoaded`,`name`,`version`,`type`];return e.forEach(function(e){t.forEach(function(t){if(e[t]===void 0)throw Error(`Plugin: ${e.name??`unknown`} missing required function ${t}`)})}),!0}function DD(e,t){var n=e[t.creationName],r=e[t.name];return e.All===!1&&!n&&!r||n===!1||r===!1}function OD(e,t){return b(this,void 0,void 0,function(){var n,r,i,a,o,s;return d(this,function(c){switch(c.label){case 0:if(c.trys.push([0,9,,10]),n=RegExp(`https://cdn.segment.(com|build)`),r=sD(),!t)return[3,6];i=e.url.split(`/`),a=i[i.length-2],o=e.url.replace(a,btoa(a).replace(/=/g,``)),c.label=1;case 1:return c.trys.push([1,3,,5]),[4,bD(o.replace(n,r))];case 2:return c.sent(),[3,5];case 3:return c.sent(),[4,bD(e.url.replace(n,r))];case 4:return c.sent(),[3,5];case 5:return[3,8];case 6:return[4,bD(e.url.replace(n,r))];case 7:c.sent(),c.label=8;case 8:return typeof window[e.libraryName]==`function`?[2,window[e.libraryName]]:[3,10];case 9:throw s=c.sent(),console.error(`Failed to create PluginFactory`,e),s;case 10:return[2]}})})}function kD(e,t,n,i,a,o){return b(this,void 0,void 0,function(){var s,c,l,u=this;return d(this,function(f){switch(f.label){case 0:return s=[],c=e.middlewareSettings?.routingRules??[],l=(e.remotePlugins??[]).map(function(e){return b(u,void 0,void 0,function(){var l,u,f,p,m,h,g;return d(this,function(d){switch(d.label){case 0:if(DD(t,e))return[2];d.label=1;case 1:return d.trys.push([1,6,,7]),u=o?.find(function(t){return t.pluginName===e.name}),u?[3,3]:[4,OD(e,i?.obfuscate)];case 2:u=d.sent(),d.label=3;case 3:return l=u,l?(f=n[e.name],[4,l(r(r({},e.settings),f))]):[3,5];case 4:p=d.sent(),m=Array.isArray(p)?p:[p],ED(m),h=c.filter(function(t){return t.destinationName===e.creationName}),m.forEach(function(t){var n=new TD(e.creationName,t);h.length&&a&&n.addMiddleware(a),s.push(n)}),d.label=5;case 5:return[3,7];case 6:return g=d.sent(),console.warn(`Failed to load Remote Plugin`,g),[3,7];case 7:return[2]}})})}),[4,Promise.all(l)];
276case 1:return f.sent(),[2,s.filter(Boolean)]}})})}var AD,jD=(AD=Xw()).__SEGMENT_INSPECTOR__??(AD.__SEGMENT_INSPECTOR__={}),MD=function(e){return jD.attach?.call(jD,e)};function ND(e,t){return Zw(`${t}/v1/projects/${e}/settings`).then(function(e){return e.ok?e.json():e.text().then(function(e){throw Error(e)})}).catch(function(e){throw console.error(e.message),e})}function PD(e){return tD().NODE_ENV!==`test`&&Object.keys(e.integrations).length>1}function FD(e){return tD().NODE_ENV!==`test`&&(e.middlewareSettings?.routingRules?.length??0)>0}function ID(e,t){sE(e,t),oE(e,t)}function LD(e,t,n){return b(this,void 0,void 0,function(){return d(this,function(r){switch(r.label){case 0:return[4,zD(e,t)];case 1:return r.sent(),cE(e,n),[2]}})})}var RD=function(){var e=window.location.hash??``,t=window.location.search??``;return t.length?t:e.replace(/(?=#).*(?=\?)/,``)},zD=function(e,t){return b(void 0,void 0,void 0,function(){return d(this,function(n){switch(n.label){case 0:return t.includes(`ajs_`)?[4,e.queryString(t).catch(console.error)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})};function BD(e,t,n,r,i,a,o){return i===void 0&&(i=[]),b(this,void 0,void 0,function(){var s,l,u,f,p,m,h,g,_,v,y,x,S,C,w,T=this;return d(this,function(E){switch(E.label){case 0:return ID(n,o),s=i?.filter(function(e){return typeof e==`object`}),l=i?.filter(function(e){return typeof e==`function`&&typeof e.pluginName==`string`}),FD(t)?[4,k(()=>import(`./routing-middleware-DFqqRevA.js`).then(function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}),[])]:[3,2];case 1:return f=E.sent(),[3,3];case 2:f=void 0,E.label=3;case 3:return u=f,PD(t)||a.length>0?[4,k(()=>import(`./ajs-destination-D1sSgatq.js`).then(function(i){return i.ajsDestinations(e,t,n.integrations,r,u,a)}),__vite__mapDeps([6,1,2,3]))]:[3,5];case 4:return m=E.sent(),[3,6];case 5:m=[],E.label=6;case 6:return p=m,t.legacyVideoPluginsEnabled?[4,k(()=>import(`./legacy-video-plugins-CDxqzb_Q.js`).then(function(e){return e.loadLegacyVideoPlugins(n)}),__vite__mapDeps([7,1,2,3]))]:[3,8];case 7:E.sent(),E.label=8;case 8:return r.plan?.track?[4,k(()=>import(`./schema-filter-BXgPCGcP.js`).then(function(e){return e.schemaFilter(r.plan?.track,t)}),__vite__mapDeps([8,1,2,3]))]:[3,10];case 9:return g=E.sent(),[3,11];case 10:g=void 0,E.label=11;case 11:return h=g,_=lD(t,r),[4,kD(t,n.integrations,_,r,u,l).catch(function(){return[]})];case 12:return v=E.sent(),y=c(c([vD],p,!0),v,!0),h&&y.push(h),x=r.integrations?.All===!1&&!r.integrations[`Segment.io`]||r.integrations&&r.integrations[`Segment.io`]===!1,x?[3,14]:(C=(S=y).push,[4,qE(n,_[`Segment.io`],t.integrations)]);case 13:C.apply(S,[E.sent()]),E.label=14;case 14:return[4,n.register.apply(n,c(c([],y,!1),s,!1))];case 15:return w=E.sent(),[4,aE(n,o)];case 16:return E.sent(),Object.entries(t.enabledMiddleware??{}).some(function(e){return e[1]})?[4,k(()=>import(`./remote-middleware-Bt9oQ57U.js`).then(function(e){var i=e.remoteMiddlewares;return b(T,void 0,void 0,function(){var e,a;return d(this,function(o){switch(o.label){case 0:return[4,i(w,t,r.obfuscate)];case 1:return e=o.sent(),a=e.map(function(e){return n.addSourceMiddleware(e)}),[2,Promise.all(a)]}})})}),__vite__mapDeps([9,1,2,3]))]:[3,18];case 17:E.sent(),E.label=18;case 18:return[4,iE(n,o)];case 19:return E.sent(),[2,w]}})})}function VD(e,t,n){var i;return t===void 0&&(t={}),b(this,void 0,void 0,function(){var a,o,s,c,l,u,f,p,m,h,g;return d(this,function(d){switch(d.label){case 0:return t.disable===!0?[2,[new eD,sT.system()]]:(t.globalAnalyticsKey&&eE(t.globalAnalyticsKey),e.cdnURL&&oD(e.cdnURL),t.initialPageview&&n.add(new dE(`page`,[])),a=RD(),o=e.cdnURL??sD(),(i=e.cdnSettings)==null?[3,1]:(c=i,[3,3]));case 1:return[4,ND(e.writeKey,o)];case 2:c=d.sent(),d.label=3;case 3:return s=c,t.updateCDNSettings&&(s=t.updateCDNSettings(s)),typeof t.disable==`function`?[4,t.disable(s)]:[3,5];case 4:if(l=d.sent(),l)return[2,[new eD,sT.system()]];d.label=5;case 5:return u=s.integrations[`Segment.io`]?.retryQueue??!0,t=r({retryQueue:u},t),f=new $E(r(r({},e),{cdnSettings:s,cdnURL:o}),t),MD(f),p=e.plugins??[],m=e.classicIntegrations??[],h=t.integrations?.[`Segment.io`],oT.initRemoteMetrics(r(r({},s.metrics),{host:h?.apiHost??s.metrics?.host,protocol:h?.protocol})),[4,BD(e.writeKey,s,f,t,p,m,n)];case 6:return g=d.sent(),f.initialized=!0,f.emit(`initialize`,e,t),[4,LD(f,a,n)];case 7:return d.sent(),[2,[f,g]]}})})}var HD=function(e){u(t,e);function t(){var t=this,n=hw(),r=n.promise,i=n.resolve;return t=e.call(this,function(e){return r.then(function(t){var n=t[0],r=t[1];return VD(n,r,e)})})||this,t._resolveLoadStart=function(e,t){return i([e,t])},t}return t.prototype.load=function(e,t){return t===void 0&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return n===void 0&&(n={}),new t().load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then(function(e){return e[0]})},t}(mE);function UD(e,t){return typeof t?.enabled==`boolean`?t.enabled:e?.__default?.enabled??!0}function WD(e){return e.toLowerCase().replace(`.`,``).replace(/\s+/g,`-`)}function GD(e,t){return t===void 0&&(t=!1),t?btoa(e).replace(/=/g,``):void 0}function KD(e){return(`Integration`in e?e.Integration:e).prototype.name}function qD(e,t,n){try{var r=((window==null?void 0:window.performance)?.getEntriesByName(e,`resource`)??[])[0];r&&t.stats.gauge(`legacy_destination_time`,Math.round(r.duration),c([n],r.duration<100?[`cached`]:[],!0))}catch{}}function JD(e,t,n){var r;`Integration`in e?(e({user:function(){return n.user()},addIntegration:function(){}}),r=e.Integration):r=e;var i=new r(t);return i.analytics=n,i}function YD(e,t,n,r){return b(this,void 0,void 0,function(){var i,a,o,s,c,l;return d(this,function(u){switch(u.label){case 0:i=WD(t),a=GD(i,r),o=cD(),s=`${o}/integrations/${a??i}/${n}/${a??i}.dynamic.js.gz`,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,bD(s)];case 2:return u.sent(),qD(s,e,t),[3,4];case 3:throw c=u.sent(),e.stats.gauge(`legacy_destination_time`,-1,[`plugin:${t}`,`failed`]),c;case 4:return l=window[`${i}Deps`],[4,Promise.all(l.map(function(e){return bD(o+e+`.gz`)}))];case 5:return u.sent(),window[`${i}Loader`](),[2,window[`${i}Integration`]]}})})}function XD(e,t,n){return b(this,void 0,void 0,function(){var r,i,a,o;return d(this,function(s){return r=cD(),i=WD(e),a=GD(e,n),o=`${r}/integrations/${a??i}/${t}/${a??i}.dynamic.js.gz`,[2,xD(o)]})})}
vendor: 4,037 bytes, line 276
276function ZD(e){return e?.versionSettings?.override??e?.versionSettings?.version??`latest`}var QD=function(e,t){var n=t.type,r=t.bundlingStatus,i=t.versionSettings,a=r!==`unbundled`&&(n===`browser`||(i?.componentTypes)?.includes(`browser`));return!e.startsWith(`Segment`)&&e!==`Iterable`&&a},$D=function(e,t){var n=t.All===!1&&t[e]===void 0;return t[e]===!1||n};function eO(e,t){return b(this,void 0,void 0,function(){var n,r=this;return d(this,function(i){switch(i.label){case 0:return n=[],Yw()?[2,t]:[4,HE(function(){return t.length>0&&Jw()},function(){return b(r,void 0,void 0,function(){var r,i,a;return d(this,function(o){switch(o.label){case 0:return r=t.pop(),r?[4,Aw(r,e)]:[2];case 1:return i=o.sent(),a=i instanceof sT,a||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(e){return t.pushWithBackoff(e)}),[2,t]}})})}var tO=function(){function e(e,t,n,i,a,o){i===void 0&&(i={});var s=this;this.options={},this.type=`destination`,this.middleware=[],this.initializePromise=hw(),this.flushing=!1,this.name=e,this.version=t,this.settings=r({},i),this.disableAutoISOConversion=a.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&this.settings.type===`browser`&&delete this.settings.type,this.initializePromise.promise.then(function(e){return s._initialized=e},function(){}),this.options=a,this.buffer=a.disableClientPersistence?new yw(4,[]):new AT(4,`${n}:dest-${e}`),this.scheduleFlush()}return e.prototype.isLoaded=function(){return!!this._ready},e.prototype.ready=function(){var e=this;return this.initializePromise.promise.then(function(){return e.onReady??Promise.resolve()})},e.prototype.load=function(e,t){var n;return b(this,void 0,void 0,function(){var r,i,a=this;return d(this,function(o){switch(o.label){case 0:return this._ready||this.onReady!==void 0?[2]:(n=this.integrationSource)==null?[3,1]:(i=n,[3,3]);case 1:return[4,YD(e,this.name,this.version,this.options.obfuscate)];case 2:i=o.sent(),o.label=3;case 3:r=i,this.integration=JD(r,this.settings,t),this.onReady=new Promise(function(e){a.integration.once(`ready`,function(){a._ready=!0,e(!0)})}),this.integration.on(`initialize`,function(){a.initializePromise.resolve(!0)});try{wD(e,{integrationName:this.name,methodName:`initialize`,type:`classic`}),this.integration.initialize()}catch(t){throw wD(e,{integrationName:this.name,methodName:`initialize`,type:`classic`,didError:!0}),this.initializePromise.resolve(!1),t}return[2]}})})},e.prototype.unload=function(e,t){return XD(this.name,this.version,this.options.obfuscate)},e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.middleware=(e=this.middleware).concat.apply(e,t)},e.prototype.shouldBuffer=function(e){return e.event.type!==`page`&&(Yw()||this._ready!==!0||this._initialized!==!0)},e.prototype.send=function(e,t,n){return b(this,void 0,void 0,function(){var i,a,o,s,c,l;return d(this,function(u){switch(u.label){case 0:return this.shouldBuffer(e)?(this.buffer.push(e),this.scheduleFlush(),[2,e]):(i=this.options?.plan?.track,a=e.event.event,i&&a&&this.name!==`Segment.io`&&(o=i[a],UD(i,o)?e.updateEvent(`integrations`,r(r({},e.event.integrations),o?.integrations)):(e.updateEvent(`integrations`,r(r({},e.event.integrations),{All:!1,"Segment.io":!0})),e.cancel(new ww({retry:!1,reason:`Event ${a} disabled for integration ${this.name} in tracking plan`,type:`Dropped by plan`}))),o?.enabled&&o?.integrations[this.name]===!1&&e.cancel(new ww({retry:!1,reason:`Event ${a} disabled for integration ${this.name} in tracking plan`,type:`Dropped by plan`}))),[4,SD(this.name,e.event,this.middleware)]);case 1:if(s=u.sent(),s===null)return[2,e];c=new t(s,{traverse:!this.disableAutoISOConversion}),wD(e,{integrationName:this.name,methodName:n,type:`classic`}),u.label=2;case 2:return u.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,n,c)]:[3,4];case 3:u.sent(),u.label=4;case 4:return[3,6];case 5:throw l=u.sent(),wD(e,{integrationName:this.name,methodName:n,type:`classic`,didError:!0}),l;
276case 6:return[2,e]}})})},e.prototype.track=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return[2,this.send(e,OE.Track,`track`)]})})},e.prototype.page=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return this.integration?._assumesPageview&&!this._initialized&&this.integration.initialize(),[4,this.initializePromise.promise];case 1:return t.sent(),[2,this.send(e,OE.Page,`page`)]}})})},e.prototype.identify=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return[2,this.send(e,OE.Identify,`identify`)]})})},e.prototype.alias=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return[2,this.send(e,OE.Alias,`alias`)]})})},e.prototype.group=function(e){return b(this,void 0,void 0,function(){return d(this,function(t){return[2,this.send(e,OE.Group,`group`)]})})},e.prototype.scheduleFlush=function(){var e=this;this.flushing||setTimeout(function(){return b(e,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return Yw()||this._ready!==!0||this._initialized!==!0?(this.scheduleFlush(),[2]):(this.flushing=!0,e=this,[4,eO(this,this.buffer)]);case 1:return e.buffer=t.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}})})},Math.random()*5e3)},e}();function nO(e,t,n,i,a,o){if(n===void 0&&(n={}),i===void 0&&(i={}),qw())return[];t.plan&&(i??={},i.plan=t.plan);var s=t.middlewareSettings?.routingRules??[],l=t.integrations,u=i.integrations,d=lD(t,i??{}),f=o?.reduce(function(e,t){var n;return r(r({},e),(n={},n[KD(t)]=t,n))},{}),p=new Set(c(c([],Object.keys(l).filter(function(e){return QD(e,l[e])}),!0),Object.keys(f||{}).filter(function(e){return $C(l[e])||$C(u?.[e])}),!0));return Array.from(p).filter(function(e){return!$D(e,n)}).map(function(t){var n=l[t],r=new tO(t,ZD(n),e,d[t],i,f?.[t]);return s.filter(function(e){return e.destinationName===t}).length>0&&a&&r.addMiddleware(a),r})}function rO(t){return b(this,void 0,void 0,function(){var n;return d(this,function(r){switch(r.label){case 0:return[4,k(()=>import(`./index.umd-BkPl71Qz.js`).then(t=>e(t.default)),[])];case 1:return n=r.sent(),t._plugins=n,[2]}})})}function iO(e,t,n){return b(this,void 0,void 0,function(){var r,i,a,o,s,c=this;return d(this,function(l){switch(l.label){case 0:return qw()?[2,[]]:(r=cD(),i=t.enabledMiddleware??{},a=Object.entries(i).filter(function(e){return e[0],e[1]}).map(function(e){return e[0]}),o=a.map(function(t){return b(c,void 0,void 0,function(){var i,a,o,s;return d(this,function(c){switch(c.label){case 0:i=t.replace(`@segment/`,``),a=i,n&&(a=btoa(i).replace(/=/g,``)),o=`${r}/middleware/${a}/latest/${a}.js.gz`,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,bD(o)];case 2:return c.sent(),[2,window[`${i}Middleware`]];case 3:return s=c.sent(),e.log(`error`,s),e.stats.increment(`failed_remote_middleware`),[3,4];case 4:return[2]}})})}),[4,Promise.all(o)]);
vendor: 11,284 bytes, line 276
276case 1:return s=l.sent(),s=s.filter(Boolean),[2,s]}})})}var aO=e(n(((e,t)=>{(function(n,r){if(typeof e==`object`&&typeof t==`object`)t.exports=r();else if(typeof define==`function`&&define.amd)define([],r);else{var i=r();for(var a in i)(typeof e==`object`?e:n)[a]=i[a]}})(self,(function(){return(function(){var e={2870:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.Store=t.matches=t.transform=void 0;var i=n(4303);Object.defineProperty(t,`transform`,{enumerable:!0,get:function(){return r(i).default}});var a=n(2370);Object.defineProperty(t,`matches`,{enumerable:!0,get:function(){return r(a).default}});var o=n(1444);Object.defineProperty(t,`Store`,{enumerable:!0,get:function(){return r(o).default}})},2370:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0});var i=r(n(7843));function a(e,t){if(!Array.isArray(e))return!0===o(e,t);var n,r,i,u,d=e[0];switch(d){case`!`:return!a(e[1],t);case`or`:for(var f=1;f<e.length;f++)if(a(e[f],t))return!0;return!1;case`and`:for(f=1;f<e.length;f++)if(!a(e[f],t))return!1;return!0;case`=`:case`!=`:return function(e,t,n,r){switch(s(e)&&(e=a(e,r)),s(t)&&(t=a(t,r)),typeof e==`object`&&typeof t==`object`&&(e=JSON.stringify(e),t=JSON.stringify(t)),n){case`=`:return e===t;case`!=`:return e!==t;default:throw Error(`Invalid operator in compareItems: ${n}`)}}(o(e[1],t),o(e[2],t),d,t);case`<=`:case`<`:case`>`:case`>=`:return function(e,t,n,r){if(s(e)&&(e=a(e,r)),s(t)&&(t=a(t,r)),typeof e!=`number`||typeof t!=`number`)return!1;switch(n){case`<=`:return e<=t;case`>=`:return e>=t;case`<`:return e<t;case`>`:return e>t;default:throw Error(`Invalid operator in compareNumbers: ${n}`)}}(o(e[1],t),o(e[2],t),d,t);case`in`:return function(e,t,n){return t.find((function(t){return o(t,n)===e}))!==void 0}(o(e[1],t),o(e[2],t),t);case`contains`:return i=o(e[1],t),u=o(e[2],t),typeof i==`string`&&typeof u==`string`&&i.indexOf(u)!==-1;case`match`:return n=o(e[1],t),r=o(e[2],t),typeof n==`string`&&typeof r==`string`&&function(e,t){var n,r;t:for(;e.length>0;){var i,a;if(i=(n=c(e)).star,a=n.chunk,e=n.pattern,i&&a===``)return!0;var o=l(a,t),s=o.t,u=o.ok,d=o.err;if(d)return!1;if(!u||!(s.length===0||e.length>0)){if(i)for(var f=0;f<t.length;f++){if(s=(r=l(a,t.slice(f+1))).t,u=r.ok,d=r.err,u){if(e.length===0&&s.length>0)continue;t=s;continue t}if(d)return!1}return!1}t=s}return t.length===0}(r,n);case`lowercase`:var p=o(e[1],t);return typeof p==`string`?p.toLowerCase():null;case`typeof`:return typeof o(e[1],t);case`length`:return function(e){return e===null?0:Array.isArray(e)||typeof e==`string`?e.length:NaN}(o(e[1],t));default:throw Error(`FQL IR could not evaluate for token: ${d}`)}}function o(e,t){return Array.isArray(e)?e:typeof e==`object`?e.value:(0,i.default)(t,e)}function s(e){return!!Array.isArray(e)&&((e[0]===`lowercase`||e[0]===`length`||e[0]===`typeof`)&&e.length===2||(e[0]===`contains`||e[0]===`match`)&&e.length===3)}function c(e){for(var t={star:!1,chunk:``,pattern:``};e.length>0&&e[0]===`*`;)e=e.slice(1),t.star=!0;var n,r=!1;t:for(n=0;n<e.length;n++)switch(e[n]){case`\\`:n+1<e.length&&n++;break;case`[`:r=!0;break;case`]`:r=!1;break;case`*`:if(!r)break t}return t.chunk=e.slice(0,n),t.pattern=e.slice(n),t}function l(e,t){for(var n,r,i={t:``,ok:!1,err:!1};e.length>0;){if(t.length===0)return i;switch(e[0]){case`[`:var a=t[0];t=t.slice(1);var o=!0;(e=e.slice(1)).length>0&&e[0]===`^`&&(o=!1,e=e.slice(1));for(var s=!1,c=0;;){if(e.length>0&&e[0]===`]`&&c>0){e=e.slice(1);break}var l,d=``;if(l=(n=u(e)).char,e=n.newChunk,n.err||(d=l,e[0]===`-`&&(d=(r=u(e.slice(1))).char,e=r.newChunk,r.err)))return i;l<=a&&a<=d&&(s=!0),c++}if(s!==o)return i;break;case`?`:t=t.slice(1),e=e.slice(1);break;case`\\`:if((e=e.slice(1)).length===0)return i.err=!0,i;default:if(e[0]!==t[0])return i;t=t.slice(1),e=e.slice(1)}}return i.t=t,i.ok=!0,i.err=!1,i}function u(e){var t={char:``,newChunk:``,err:!1};return e.length===0||e[0]===`-`||e[0]===`]`||e[0]===`\\`&&(e=e.slice(1)).length===0?(t.err=!0,t):(t.char=e[0],t.newChunk=e.slice(1),t.newChunk.length===0&&(t.err=!0),t)}t.default=function(e,t){if(!t)throw Error(`No matcher supplied!`);switch(t.type){case`all`:return!0;case`fql`:return function(e,t){if(!e)return!1;try{e=JSON.parse(e)}catch(t){throw Error(`Failed to JSON.parse FQL intermediate representation "${e}": ${t}`)}var n=a(e,t);return typeof n==`boolean`&&n}(t.ir,e);default:throw Error(`Matcher of type ${t.type} unsupported.`)}}},1444:function(e,t){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=function(){function e(e){this.rules=[],this.rules=e||[]}return e.prototype.getRulesByDestinationName=function(e){for(var t=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==e&&i.destinationName!==void 0||t.push(i)}return t},e}()},4303:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0});var i=r(n(374)),a=r(n(7843)),o=r(n(5500)),s=n(9014),c=n(4966);function l(e,t){d(e,t.drop,(function(e,t){t.forEach((function(t){return delete e[t]}))}))}function u(e,t){d(e,t.allow,(function(e,t){Object.keys(e).forEach((function(n){t.includes(n)||delete e[n]}))}))}function d(e,t,n){Object.entries(t).forEach((function(t){var r=t[0],i=t[1],o=function(e){typeof e==`object`&&e&&n(e,i)},s=r===``?e:(0,a.default)(e,r);Array.isArray(s)?s.forEach(o):o(s)}))}function f(e,t){var n=JSON.parse(JSON.stringify(e));for(var r in t.map)if(t.map.hasOwnProperty(r)){var i=t.map[r],o=r.split(`.`),l=void 0;if(o.length>1?(o.pop(),l=(0,a.default)(n,o.join(`.`))):l=e,typeof l==`object`){if(i.copy){var u=(0,a.default)(n,i.copy);u!==void 0&&(0,s.dset)(e,r,u)}else if(i.move){var d=(0,a.default)(n,i.move);d!==void 0&&(0,s.dset)(e,r,d),(0,c.unset)(e,i.move)}else i.hasOwnProperty(`set`)&&(0,s.dset)(e,r,i.set);if(i.to_string){var f=(0,a.default)(e,r);if(typeof f==`string`||typeof f==`object`&&f)continue;f===void 0?(0,s.dset)(e,r,`undefined`):(0,s.dset)(e,r,JSON.stringify(f))}}}}function p(e,t){return!(t.sample.percent<=0)&&(t.sample.percent>=1||(t.sample.path?function(e,t){var n=(0,a.default)(e,t.sample.path),r=(0,i.default)(JSON.stringify(n)),s=-64,c=[];m(r.slice(0,8),c);for(var l=0,u=0;u<64&&c[u]!==1;u++)l++;if(l!==0){var d=[];m(r.slice(9,16),d),s-=l,c.splice(0,l),d.splice(64-l),c=c.concat(d)}return c[63]=c[63]===0?1:0,(0,o.default)(parseInt(c.join(``),2),s)<t.sample.percent}(e,t):(n=t.sample.percent,Math.random()<=n)));var n}function m(e,t){for(var n=0;n<8;n++)for(var r=e[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,t.push(1)):t.push(0)}t.default=function(e,t){for(var n=e,r=0,i=t;r<i.length;r++){var a=i[r];switch(a.type){case`drop`:return null;case`drop_properties`:l(n,a.config);break;case`allow_properties`:u(n,a.config);break;case`sample_event`:if(p(n,a.config))break;return null;case`map_properties`:f(n,a.config);break;case`hash_properties`:break;default:throw Error(`Transformer of type "${a.type}" is unsupported.`)}}return n}},4966:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.unset=void 0;var i=r(n(7843));t.unset=function(e,t){if((0,i.default)(e,t)){for(var n=t.split(`.`),r=n.pop();n.length&&n[n.length-1].slice(-1)===`\\`;)r=n.pop().slice(0,-1)+`.`+r;for(;n.length;)e=e[t=n.shift()];return delete e[r]}return!0}},9014:function(e,t){t.dset=function(e,t,n){t.split&&(t=t.split(`.`));for(var r,i,a=0,o=t.length,s=e;a<o&&(i=t[a++])!==`__proto__`&&i!==`constructor`&&i!==`prototype`;)s=s[i]=a===o?n:typeof(r=s[i])==typeof t?r:0*t[a]!=0||~(``+t[a]).indexOf(`.`)?{}:[]}},3304:function(e){e.exports=typeof Float64Array==`function`?Float64Array:void 0},7382:function(e,t,n){var r,i=n(5569),a=n(3304),o=n(8482);r=i()?a:o,e.exports=r},8482:function(e){e.exports=function(){throw Error(`not implemented`)}},6322:function(e,t,n){var r,i=n(2508),a=n(5679),o=n(882);r=i()?a:o,e.exports=r},882:function(e){e.exports=function(){throw Error(`not implemented`)}},5679:function(e){e.exports=typeof Uint16Array==`function`?Uint16Array:void 0},4773:function(e,t,n){var r,i=n(9773),a=n(3004),o=n(3078);r=i()?a:o,e.exports=r},3078:function(e){e.exports=function(){throw Error(`not implemented`)}},3004:function(e){e.exports=typeof Uint32Array==`function`?Uint32Array:void 0},7980:function(e,t,n){var r,i=n(8114),a=n(6737),o=n(3357);r=i()?a:o,e.exports=r},3357:function(e){e.exports=function(){throw Error(`not implemented`)}},6737:function(e){e.exports=typeof Uint8Array==`function`?Uint8Array:void 0},2684:function(e){e.exports=typeof Float64Array==`function`?Float64Array:null},5569:function(e,t,n){e.exports=n(3876)},3876:function(e,t,n){var r=n(1448),i=n(2684);e.exports=function(){var e,t;if(typeof i!=`function`)return!1;try{t=new i([1,3.14,-3.14,NaN]),e=r(t)&&t[0]===1&&t[1]===3.14&&t[2]===-3.14&&t[3]!=t[3]}catch{e=!1}return e}},9048:function(e,t,n){e.exports=n(3763)},3763:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return e!=null&&t.call(e,n)}},7009:function(e,t,n){e.exports=n(6784)},6784:function(e){e.exports=function(){return typeof Symbol==`function`&&typeof Symbol(`foo`)==`symbol`}},3123:function(e,t,n){e.exports=n(8481)},8481:function(e,t,n){var r=n(7009)();e.exports=function(){return r&&typeof Symbol.toStringTag==`symbol`}},2508:function(e,t,n){e.exports=n(3403)},3403:function(e,t,n){var r=n(768),i=n(9668),a=n(187);e.exports=function(){var e,t;if(typeof a!=`function`)return!1;try{t=new a(t=[1,3.14,-3.14,i+1,i+2]),e=r(t)&&t[0]===1&&t[1]===3&&t[2]===i-2&&t[3]===0&&t[4]===1}catch{e=!1}return e}},187:function(e){e.exports=typeof Uint16Array==`function`?Uint16Array:null},9773:function(e,t,n){e.exports=n(2822)},2822:function(e,t,n){var r=n(2744),i=n(3899),a=n(746);e.exports=function(){var e,t;if(typeof a!=`function`)return!1;try{t=new a(t=[1,3.14,-3.14,i+1,i+2]),e=r(t)&&t[0]===1&&t[1]===3&&t[2]===i-2&&t[3]===0&&t[4]===1}catch{e=!1}return e}},746:function(e){e.exports=typeof Uint32Array==`function`?Uint32Array:null},8114:function(e,t,n){e.exports=n(8066)},8066:function(e,t,n){var r=n(8279),i=n(3443),a=n(2731);e.exports=function(){var e,t;if(typeof a!=`function`)return!1;try{t=new a(t=[1,3.14,-3.14,i+1,i+2]),e=r(t)&&t[0]===1&&t[1]===3&&t[2]===i-2&&t[3]===0&&t[4]===1}catch{e=!1}return e}},2731:function(e){e.exports=typeof Uint8Array==`function`?Uint8Array:null},1448:function(e,t,n){e.exports=n(1453)},1453:function(e,t,n){var r=n(6208),i=typeof Float64Array==`function`;e.exports=function(e){return i&&e instanceof Float64Array||r(e)===`[object Float64Array]`}},9331:function(e,t,n){var r=n(7980);e.exports={uint16:n(6322),uint8:r}},5902:function(e,t,n){e.exports=n(4106)},4106:function(e,t,n){var r,i,a=n(9331);(i=new a.uint16(1))[0]=4660,r=new a.uint8(i.buffer)[0]===52,e.exports=r},768:function(e,t,n){e.exports=n(3823)},3823:function(e,t,n){var r=n(6208),i=typeof Uint16Array==`function`;e.exports=function(e){return i&&e instanceof Uint16Array||r(e)===`[object Uint16Array]`}},2744:function(e,t,n){e.exports=n(2326)},2326:function(e,t,n){var r=n(6208),i=typeof Uint32Array==`function`;e.exports=function(e){return i&&e instanceof Uint32Array||r(e)===`[object Uint32Array]`}}
vendor: 5,745 bytes, line 276
276,8279:function(e,t,n){e.exports=n(208)},208:function(e,t,n){var r=n(6208),i=typeof Uint8Array==`function`;e.exports=function(e){return i&&e instanceof Uint8Array||r(e)===`[object Uint8Array]`}},6315:function(e){e.exports=1023},1686:function(e){e.exports=2147483647},3105:function(e){e.exports=2146435072},3449:function(e){e.exports=2147483648},6988:function(e){e.exports=-1023},9777:function(e){e.exports=1023},3690:function(e){e.exports=-1074},2918:function(e,t,n){e.exports=n(4772).NEGATIVE_INFINITY},4165:function(e){e.exports=1/0},6488:function(e){e.exports=22250738585072014e-324},9668:function(e){e.exports=65535},3899:function(e){e.exports=4294967295},3443:function(e){e.exports=255},7011:function(e,t,n){e.exports=n(812)},812:function(e,t,n){var r=n(4165),i=n(2918);e.exports=function(e){return e===r||e===i}},1883:function(e,t,n){e.exports=n(1797)},1797:function(e){e.exports=function(e){return e!=e}},513:function(e,t,n){e.exports=n(5760)},5760:function(e){e.exports=function(e){return Math.abs(e)}},5848:function(e,t,n){e.exports=n(677)},677:function(e,t,n){var r=n(3449),i=n(1686),a=n(7838),o=n(1921),s=n(2490),c=[0,0];e.exports=function(e,t){var n,l;return a.assign(e,c,1,0),n=c[0],n&=i,l=o(t),s(n|=l&=r,c[1])}},5500:function(e,t,n){e.exports=n(8397)},8397:function(e,t,n){var r=n(4165),i=n(2918),a=n(6315),o=n(9777),s=n(6988),c=n(3690),l=n(1883),u=n(7011),d=n(5848),f=n(4948),p=n(8478),m=n(7838),h=n(2490),g=[0,0],_=[0,0];e.exports=function(e,t){var n,v;return e===0||l(e)||u(e)?e:(f(g,e),t+=g[1],(t+=p(e=g[0]))<c?d(0,e):t>o?e<0?i:r:(t<=s?(t+=52,v=2220446049250313e-31):v=1,m(_,e),n=_[0],n&=2148532223,v*h(n|=t+a<<20,_[1])))}},4772:function(e,t,n){e.exports=n(7548)},7548:function(e){e.exports=Number},8478:function(e,t,n){e.exports=n(4500)},4500:function(e,t,n){var r=n(1921),i=n(3105),a=n(6315);e.exports=function(e){var t=r(e);return(t=(t&i)>>>20)-a|0}},2490:function(e,t,n){e.exports=n(9639)},4445:function(e,t,n){var r,i,a;!0===n(5902)?(i=1,a=0):(i=0,a=1),r={HIGH:i,LOW:a},e.exports=r},9639:function(e,t,n){var r=n(4773),i=n(7382),a=n(4445),o=new i(1),s=new r(o.buffer),c=a.HIGH,l=a.LOW;e.exports=function(e,t){return s[c]=e,s[l]=t,o[0]}},5646:function(e,t,n){e.exports=!0===n(5902)?1:0},1921:function(e,t,n){e.exports=n(6285)},6285:function(e,t,n){var r=n(4773),i=n(7382),a=n(5646),o=new i(1),s=new r(o.buffer);e.exports=function(e){return o[0]=e,s[a]}},9024:function(e,t,n){var r=n(6488),i=n(7011),a=n(1883),o=n(513);e.exports=function(e,t,n,s){return a(e)||i(e)?(t[s]=e,t[s+n]=0,t):e!==0&&o(e)<r?(t[s]=4503599627370496*e,t[s+n]=-52,t):(t[s]=e,t[s+n]=0,t)}},4948:function(e,t,n){var r=n(7576),i=n(9422);r(i,`assign`,n(9024)),e.exports=i},9422:function(e,t,n){var r=n(9024);e.exports=function(e){return r(e,[0,0],1,0)}},5239:function(e,t,n){var r=n(4773),i=n(7382),a=n(5782),o=new i(1),s=new r(o.buffer),c=a.HIGH,l=a.LOW;e.exports=function(e,t,n,r){return o[0]=e,t[r]=s[c],t[r+n]=s[l],t}},7838:function(e,t,n){var r=n(7576),i=n(4010);r(i,`assign`,n(5239)),e.exports=i},5782:function(e,t,n){var r,i,a;!0===n(5902)?(i=1,a=0):(i=0,a=1),r={HIGH:i,LOW:a},e.exports=r},4010:function(e,t,n){var r=n(5239);e.exports=function(e){return r(e,[0,0],1,0)}},7576:function(e,t,n){e.exports=n(7063)},7063:function(e,t,n){var r=n(6691);e.exports=function(e,t,n){r(e,t,{configurable:!1,enumerable:!1,writable:!1,value:n})}},2073:function(e){e.exports=Object.defineProperty},1680:function(e){e.exports=typeof Object.defineProperty==`function`?Object.defineProperty:null},1471:function(e,t,n){var r=n(1680);e.exports=function(){try{return r({},`x`,{}),!0}catch{return!1}}},6691:function(e,t,n){var r,i=n(1471),a=n(2073),o=n(1309);r=i()?a:o,e.exports=r},1309:function(e){var t=Object.prototype,n=t.toString,r=t.__defineGetter__,i=t.__defineSetter__,a=t.__lookupGetter__,o=t.__lookupSetter__;e.exports=function(e,s,c){var l,u,d,f;if(typeof e!=`object`||!e||n.call(e)===`[object Array]`)throw TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if(typeof c!=`object`||!c||n.call(c)===`[object Array]`)throw TypeError("invalid argument. Property descriptor must be an object. Value: `"+c+"`.");if((u=`value`in c)&&(a.call(e,s)||o.call(e,s)?(l=e.__proto__,e.__proto__=t,delete e[s],e[s]=c.value,e.__proto__=l):e[s]=c.value),d=`get`in c,f=`set`in c,u&&(d||f))throw Error(`invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.`);return d&&r&&r.call(e,s,c.get),f&&i&&i.call(e,s,c.set),e}},6208:function(e,t,n){var r,i=n(3123),a=n(7407),o=n(4210);r=i()?o:a,e.exports=r},7407:function(e,t,n){var r=n(173);e.exports=function(e){return r.call(e)}},4210:function(e,t,n){var r=n(9048),i=n(1403),a=n(173);e.exports=function(e){var t,n,o;if(e==null)return a.call(e);n=e[i],t=r(e,i);try{e[i]=void 0}catch{return a.call(e)}return o=a.call(e),t?e[i]=n:delete e[i],o}},173:function(e){e.exports=Object.prototype.toString},1403:function(e){e.exports=typeof Symbol==`function`?Symbol.toStringTag:``},7843:function(e){e.exports=function(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}},374:function(e,t,n){n.r(t),n.d(t,{default:function(){return a}});for(var r=[],i=0;i<64;)r[i]=0|4294967296*Math.sin(++i%Math.PI);function a(e){var t,n,a,o=[t=1732584193,n=4023233417,~t,~n],s=[],c=unescape(encodeURI(e))+`Â`,l=c.length;for(e=--l/4+2|15,s[--e]=8*l;~l;)s[l>>2]|=c.charCodeAt(l)<<8*l--;for(i=c=0;i<e;i+=16){for(l=o;c<64;l=[a=l[3],t+((a=l[0]+[t&n|~t&a,a&t|~a&n,t^n^a,n^(t|~a)][l=c>>4]+r[c]+~~s[i|15&[c,5*c+1,3*c+5,7*c][l]])<<(l=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*l+ c++%4])|a>>>-l),t,n])t=0|l[1],n=l[2];for(c=4;c;)o[--c]+=l[c]}for(e=``;c<32;)e+=(o[c>>3]>>4*(1^c++)&15).toString(16);return e}}},t={};function n(r){var i=t[r];
276if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})},n(2870)})()}))}))()),oO=function(e){return function(t){var n=t.payload,r=t.integration,i=t.next;new aO.Store(e).getRulesByDestinationName(r).forEach(function(e){for(var t=e.matchers,r=e.transformers,a=0;a<t.length;a++)if(aO.matches(n.obj,t[a])&&(n.obj=aO.transform(n.obj,r[a]),n.obj===null))return i(null)}),i(n)}};function sO(e,t){if(!e||!Object.keys(e))return{};var n=e.integrations?Object.keys(e.integrations).filter(function(t){return e.integrations[t]===!1}):[],r=[];return(t.remotePlugins??[]).forEach(function(e){n.forEach(function(t){e.creationName==t&&r.push(e.name)})}),(t.remotePlugins??[]).reduce(function(e,t){return t.settings.subscriptions&&r.includes(t.name)&&t.settings.subscriptions.forEach(function(n){return e[`${t.name} ${n.partnerAction}`]=!1}),e},{})}function cO(e,t){function n(n){var i=e,a=n.event.event;if(i&&a){var o=i[a];if(UD(i,o)){var s=sO(o,t);n.updateEvent(`integrations`,r(r(r({},n.event.integrations),o?.integrations),s))}else return n.updateEvent(`integrations`,r(r({},n.event.integrations),{All:!1,"Segment.io":!0})),n}return n}return{name:`Schema Filter`,version:`0.1.0`,isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:`before`,page:n,alias:n,track:n,identify:n,group:n}}var lO=n(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.analyticsVideoPlugins=r():n.analyticsVideoPlugins=r()})(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,`default`,{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=2)}([function(e,t,n){n.r(t),t.default=typeof fetch==`function`?fetch.bind():function(e,t){return t||={},new Promise((function(n,r){var i=new XMLHttpRequest;for(var a in i.open(t.method||`get`,e,!0),t.headers)i.setRequestHeader(a,t.headers[a]);function o(){var e,t=[],n=[],r={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,a,o){t.push(a=a.toLowerCase()),n.push([a,o]),e=r[a],r[a]=e?e+`,`+o:o})),{ok:(i.status/100|0)==2,status:i.status,statusText:i.statusText,url:i.responseURL,clone:o,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return t},entries:function(){return n},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}i.withCredentials=t.credentials==`include`,i.onload=function(){n(o())},i.onerror=r,i.send(t.body)}))}},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.pluginName=t}return r(e,[{key:`track`,value:function(e,t){window.analytics.track(e,t,{integration:{name:this.pluginName}})}}]),e}()},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.YouTubeAnalytics=t.VimeoAnalytics=void 0;var r=a(n(3)),i=a(n(4));
vendor: 6,386 bytes, line 276
276function a(e){return e&&e.__esModule?e:{default:e}}t.VimeoAnalytics=r.default,t.YouTubeAnalytics=i.default},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){function t(e,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,`VimeoAnalytics`));return r.authToken=n,r.player=e,r.metadata={content:{},playback:{videoPlayer:`Vimeo`}},r.mostRecentHeartbeat=0,r.isPaused=!1,r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:`initialize`,value:function(){var e=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var n in t)this.registerHandler(n,t[n]);this.player.getVideoId().then((function(t){e.retrieveMetadata({id:t})})).catch(console.error)}},{key:`registerHandler`,value:function(e,t){var n=this;this.player.on(e,(function(e){n.updateMetadata(e),t.call(n,e)}))}},{key:`trackPlay`,value:function(){this.isPaused?(this.track(`Video Playback Resumed`,this.metadata.playback),this.isPaused=!1):(this.track(`Video Playback Started`,this.metadata.playback),this.track(`Video Content Started`,this.metadata.content))}},{key:`trackEnded`,value:function(){this.track(`Video Playback Completed`,this.metadata.playback),this.track(`Video Content Completed`,this.metadata.content)}},{key:`trackHeartbeat`,value:function(){var e=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==e&&t-e>=10&&(this.track(`Video Content Playing`,this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:`trackPause`,value:function(){this.isPaused=!0,this.track(`Video Playback Paused`,this.metadata.playback)}},{key:`retrieveMetadata`,value:function(e){var t=this;return new Promise((function(n,r){var a=e.id;(0,i.default)(`https://api.vimeo.com/videos/`+a,{headers:{Authorization:`Bearer `+t.authToken}}).then((function(e){return e.ok?e.json():r(e)})).then((function(e){t.metadata.content.title=e.name,t.metadata.content.description=e.description,t.metadata.content.publisher=e.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=e.duration})).catch((function(e){return console.error(`Request to Vimeo API Failed with: `,e),r(e)}))}))}},{key:`updateMetadata`,value:function(e){var t=this;return new Promise((function(n,r){t.player.getVolume().then((function(r){r&&(t.metadata.playback.sound=100*r),t.metadata.playback.position=e.seconds,n()})).catch(r)}))}}]),t}(a(n(1)).default)},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(0)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,`YoutubeAnalytics`));return r.player=e,r.apiKey=n,r.playerLoaded=!1,r.playbackStarted=!1,r.contentStarted=!1,r.isPaused=!1,r.isBuffering=!1,r.isSeeking=!1,r.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},r.metadata=[{playback:{video_player:`youtube`},content:{}}],r.playlistIndex=0,r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:`initialize`,value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener(`onReady`,`segmentYoutubeOnReady`),this.player.addEventListener(`onStateChange`,`segmentYoutubeOnStateChange`)}},{key:`onPlayerReady`,value:function(e){this.retrieveMetadata()}},{key:`onPlayerStateChange`,value:function(e){var t=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=t,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:`retrieveMetadata`,value:function(){var e=this;return new Promise((function(t,n){var r=e.player.getVideoData(),a=e.player.getPlaylist()||[r.video_id],o=a.join();(0,i.default)(`https://www.googleapis.com/youtube/v3/videos?id=`+o+`&part=snippet,contentDetails&key=`+e.apiKey).then((function(e){if(!e.ok){var t=Error(`Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)`);throw t.response=e,t}return e.json()})).then((function(n){e.metadata=[];for(var r=0,i=0;i<a.length;i++){var o=n.items[i];
276e.metadata.push({content:{title:o.snippet.title,description:o.snippet.description,keywords:o.snippet.tags,channel:o.snippet.channelTitle,airdate:o.snippet.publishedAt}}),r+=c(o.contentDetails.duration)}for(i=0;i<a.length;i++)e.metadata[i].playback={total_length:r,video_player:`youtube`};t()})).catch((function(t){e.metadata=a.map((function(e){return{playback:{video_player:`youtube`},content:{}}})),n(t)}))}))}},{key:`handleBuffer`,value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track(`Video Playback Started`,this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track(`Video Playback Seek Started`,this.metadata[this.playlistIndex].playback)),this.isSeeking&&=(this.track(`Video Playback Seek Completed`,this.metadata[this.playlistIndex].playback),!1);var t=this.player.getPlaylist();t&&this.player.getCurrentTime()===0&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===t.length-1&&this.player.getPlaylistIndex()===0&&(this.track(`Video Playback Completed`,this.metadata[this.player.getPlaylistIndex()].playback),this.track(`Video Playback Started`,this.metadata[this.player.getPlaylistIndex()].playback))),this.track(`Video Playback Buffer Started`,this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:`handlePlay`,value:function(){this.contentStarted||=(this.playlistIndex=this.player.getPlaylistIndex(),this.playlistIndex===-1&&(this.playlistIndex=0),this.track(`Video Content Started`,this.metadata[this.playlistIndex].content),!0),this.isBuffering&&=(this.track(`Video Playback Buffer Completed`,this.metadata[this.playlistIndex].playback),!1),this.isPaused&&=(this.track(`Video Playback Resumed`,this.metadata[this.playlistIndex].playback),!1)}},{key:`handlePause`,value:function(){var e=this.determineSeek();this.isBuffering&&=(this.track(`Video Playback Buffer Completed`,this.metadata[this.playlistIndex].playback),!1),this.isPaused||(e?(this.track(`Video Playback Seek Started`,this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track(`Video Playback Paused`,this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:`handleEnd`,value:function(){this.track(`Video Content Completed`,this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),t=this.player.getPlaylist();(t&&e===t.length-1||e===-1)&&(this.track(`Video Playback Completed`,this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:`determineSeek`,value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,t=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-t)>2e3}}]),t}(a.default);function c(e){var t=e.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map((function(e){if(e!=null)return e.replace(/\D/,``)})),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}t.default=s}])}))}));export{Zo as $,AS as A,Af as B,Ww as C,ww as D,Lw as E,CS as F,Uo as G,ls as H,wS as I,Ko as J,Wo as K,OS as L,DS as M,TS as N,KC as O,ES as P,Xo as Q,sb as R,Uw as S,Rw as T,Vo as U,jf as V,Ho as W,Jo as X,qo as Y,Yo as Z,xT as _,k as _t,rO as a,rs as at,Gw as b,HD as c,os as ct,$E as d,Bo as dt,Qo as et,qE as f,zo as ft,WT as g,De as gt,JT as h,qe as ht,iO as i,ns as it,kS as j,jS as k,SD as l,ss as lt,ZT as m,Dr as mt,cO as n,es as nt,tO as o,is as ot,$T as p,Ro as pt,Go as q,oO as r,ts as rt,nO as s,as as st,lO as t,$o as tt,CD as u,cs as ut,bT as v,Vw as w,Hw as x,sT as y,Ry as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.