@amplitude/session-replay-browser 1.22.7-networktrackingprereleasemay.0 → 1.22.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/lib/cjs/config/types.d.ts +1 -1
  2. package/lib/cjs/config/types.d.ts.map +1 -1
  3. package/lib/cjs/config/types.js.map +1 -1
  4. package/lib/cjs/helpers.d.ts +7 -1
  5. package/lib/cjs/helpers.d.ts.map +1 -1
  6. package/lib/cjs/helpers.js +2 -2
  7. package/lib/cjs/helpers.js.map +1 -1
  8. package/lib/cjs/session-replay.d.ts +1 -0
  9. package/lib/cjs/session-replay.d.ts.map +1 -1
  10. package/lib/cjs/session-replay.js +32 -23
  11. package/lib/cjs/session-replay.js.map +1 -1
  12. package/lib/cjs/utils/get-input-type.d.ts +9 -0
  13. package/lib/cjs/utils/get-input-type.d.ts.map +1 -0
  14. package/lib/cjs/utils/get-input-type.js +25 -0
  15. package/lib/cjs/utils/get-input-type.js.map +1 -0
  16. package/lib/cjs/version.d.ts +1 -1
  17. package/lib/cjs/version.d.ts.map +1 -1
  18. package/lib/cjs/version.js +1 -1
  19. package/lib/cjs/version.js.map +1 -1
  20. package/lib/esm/config/types.d.ts +1 -1
  21. package/lib/esm/config/types.d.ts.map +1 -1
  22. package/lib/esm/config/types.js.map +1 -1
  23. package/lib/esm/helpers.d.ts +7 -1
  24. package/lib/esm/helpers.d.ts.map +1 -1
  25. package/lib/esm/helpers.js +1 -1
  26. package/lib/esm/helpers.js.map +1 -1
  27. package/lib/esm/session-replay.d.ts +1 -0
  28. package/lib/esm/session-replay.d.ts.map +1 -1
  29. package/lib/esm/session-replay.js +32 -23
  30. package/lib/esm/session-replay.js.map +1 -1
  31. package/lib/esm/utils/get-input-type.d.ts +9 -0
  32. package/lib/esm/utils/get-input-type.d.ts.map +1 -0
  33. package/lib/esm/utils/get-input-type.js +20 -0
  34. package/lib/esm/utils/get-input-type.js.map +1 -0
  35. package/lib/esm/version.d.ts +1 -1
  36. package/lib/esm/version.d.ts.map +1 -1
  37. package/lib/esm/version.js +1 -1
  38. package/lib/esm/version.js.map +1 -1
  39. package/lib/scripts/session-replay-browser-esm.js +1 -1
  40. package/lib/scripts/session-replay-browser-esm.js.gz +0 -0
  41. package/lib/scripts/session-replay-browser-esm.js.map +1 -1
  42. package/lib/scripts/session-replay-browser-min.js +1 -1
  43. package/lib/scripts/session-replay-browser-min.js.gz +0 -0
  44. package/lib/scripts/session-replay-browser-min.js.map +1 -1
  45. package/package.json +3 -4
@@ -1,2 +1,2 @@
1
- var sessionReplay=function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};var r=function(){return r=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)};function s(e,t,r,s){return new(r||(r=Promise))((function(n,o){function i(e){try{l(s.next(e))}catch(e){o(e)}}function a(e){try{l(s.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((s=s.apply(e,t||[])).next())}))}function n(e,t){var r,s,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(r=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,s=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){o.label=a[1];break}if(6===a[0]&&o.label<n[1]){o.label=n[1],n=a;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(a);break}n[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],s=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}"function"==typeof SuppressedError&&SuppressedError;var o,i="".concat("AMP","_unsent"),a="https://api2.amplitude.com/2/httpapi";!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"}(o||(o={}));var l,c=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},h=function(e){return{promise:e||Promise.resolve()}};!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"}(l||(l={}));var u="Amplitude Logger ",p=function(){function e(){this.logLevel=l.None}return e.prototype.disable=function(){this.logLevel=l.None},e.prototype.enable=function(e){void 0===e&&(e=l.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Verbose||console.log("".concat(u,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Warn||console.warn("".concat(u,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Error||console.error("".concat(u,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Debug||console.log("".concat(u,"[Debug]: ").concat(e.join(" ")))},e}(),d=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:l.Warn,loggerProvider:new p,offline:!1,optOut:!1,serverUrl:a,serverZone:"US",useBatch:!1}},f=function(){function e(e){var t,r,s,n;this._optOut=!1;var o=d();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=e.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(s=e.optOut)&&void 0!==s?s:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(n=e.useBatch)&&void 0!==n?n:o.useBatch,this.loggerProvider.enable(this.logLevel);var i=g(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=i.serverZone,this.serverUrl=i.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),m=function(e,t){return"EU"===e?t?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":t?"https://api2.amplitude.com/batch":a},g=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=d().serverZone),void 0===r&&(r=d().useBatch),e)return{serverUrl:e,serverZone:void 0};var s=["US","EU"].includes(t)?t:d().serverZone;return{serverZone:s,serverUrl:m(s,r)}},y=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:w(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),w=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},v=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}(),b=function(){return b=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},b.apply(this,arguments)};function S(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var s,n,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(s=o.next()).done;)i.push(s.value)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}"function"==typeof SuppressedError&&SuppressedError;var x=function(e,t){var r,s,n=typeof e;if(n!==typeof t)return!1;try{for(var o=S(["string","number","boolean","undefined"]),i=o.next();!i.done;i=o.next()){if(i.value===n)return e===t}}catch(e){r={error:e}}finally{try{i&&!i.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var a=Array.isArray(e),l=Array.isArray(t);if(a!==l)return!1;if(!a||!l){var c=Object.keys(e).sort(),h=Object.keys(t).sort();if(!x(c,h))return!1;var u=!0;return Object.keys(e).forEach((function(r){x(e[r],t[r])||(u=!1)})),u}for(var p=0;p<e.length;p++)if(!x(e[p],t[p]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,s=new Array(r);r--;)s[r]=[t[r],e[t[r]]];return s});var I,k=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=b({},this.identity.userProperties),r=b(b({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,s,n,o,i,a,l=r.userProperties||{};try{for(var c=S(Object.entries(e)),h=c.next();!h.done;h=c.next()){var u=C(h.value,2),p=u[0],d=u[1];switch(p){case"$set":try{for(var f=(n=void 0,S(Object.entries(d))),m=f.next();!m.done;m=f.next()){var g=C(m.value,2),y=g[0],w=g[1];l[y]=w}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}break;case"$unset":try{for(var v=(i=void 0,S(Object.keys(d))),b=v.next();!b.done;b=v.next()){delete l[y=b.value]}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return b({},this.identity)},e.prototype.setIdentity=function(e){var t=b({},this.identity);this.identity=b({},e),x(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}(),O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,E=function(){function e(){this.identityStore=new k,this.eventBridge=new v,this.applicationContextProvider=new y}return e.getInstance=function(t){return O.analyticsConnectorInstances||(O.analyticsConnectorInstances={}),O.analyticsConnectorInstances[t]||(O.analyticsConnectorInstances[t]=new e),O.analyticsConnectorInstances[t]},e}(),A=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,i,a,l,c,h,u,p,d,f,m,g,y,w,v,b,S,C,x;if("object"!=typeof e)return null;var I=e.code||0,k=this.buildStatus(I);switch(k){case o.Success:return{status:k,statusCode:I,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(s=e.server_upload_time)&&void 0!==s?s:0}};case o.Invalid:return{status:k,statusCode:I,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(i=e.missing_field)&&void 0!==i?i:"",eventsWithInvalidFields:null!==(a=e.events_with_invalid_fields)&&void 0!==a?a:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(c=e.events_with_invalid_id_lengths)&&void 0!==c?c:{},epsThreshold:null!==(h=e.eps_threshold)&&void 0!==h?h:0,exceededDailyQuotaDevices:null!==(u=e.exceeded_daily_quota_devices)&&void 0!==u?u:{},silencedDevices:null!==(p=e.silenced_devices)&&void 0!==p?p:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(m=e.throttled_events)&&void 0!==m?m:[]}};case o.PayloadTooLarge:return{status:k,statusCode:I,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case o.RateLimit:return{status:k,statusCode:I,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(w=e.eps_threshold)&&void 0!==w?w:0,throttledDevices:null!==(v=e.throttled_devices)&&void 0!==v?v:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(S=e.exceeded_daily_quota_devices)&&void 0!==S?S:{},exceededDailyQuotaUsers:null!==(C=e.exceeded_daily_quota_users)&&void 0!==C?C:{},throttledEvents:null!==(x=e.throttled_events)&&void 0!==x?x:[]}};case o.Timeout:default:return{status:k,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?o.Success:429===e?o.RateLimit:413===e?o.PayloadTooLarge:408===e?o.Timeout:e>=400&&e<500?o.Invalid:e>=500?o.Failed:o.Unknown},e}(),R=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}(r,e),r.prototype.send=function(e,t){return s(this,void 0,void 0,(function(){var r,s,o;return n(this,(function(n){switch(n.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,r)];case 1:return[4,(s=n.sent()).text()];case 2:o=n.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(e){return[2,this.buildResponse({code:s.status})]}return[2]}}))}))},r}(A);!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(I||(I={}));var M,P=Object.defineProperty,N=(e,t,r)=>((e,t,r)=>t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),T=Object.defineProperty,L=(e,t,r)=>((e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),D=(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))(D||{});const F={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},_={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},B={};function U(e){if(B[e])return B[e];const t=globalThis[e],r=t.prototype,s=e in F?F[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in _?_[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return B[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?B[e]=o:r}catch{return r}}const j={};function z(e,t,r){var s;const n=`${e}.${String(r)}`;if(j[n])return j[n].call(t);const o=U(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(j[n]=i,i.call(t)):t[r]}const W={};function V(e,t,r){const s=`${e}.${String(r)}`;if(W[s])return W[s].bind(t);const n=U(e)[r];return"function"!=typeof n?t[r]:(W[s]=n,n.bind(t))}const G={childNodes:function(e){return z("Node",e,"childNodes")},parentNode:function(e){return z("Node",e,"parentNode")},parentElement:function(e){return z("Node",e,"parentElement")},textContent:function(e){return z("Node",e,"textContent")},contains:function(e,t){return V("Node",e,"contains")(t)},getRootNode:function(e){return V("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?z("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?z("Element",e,"shadowRoot"):null},querySelector:function(e,t){return z("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return z("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return U("MutationObserver").constructor}};function Z(e){return e.nodeType===e.ELEMENT_NODE}function Y(e){const t=e&&"host"in e&&"mode"in e&&G.host(e)||null;return Boolean(t&&"shadowRoot"in t&&G.shadowRoot(t)===e)}function $(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function J(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const n=Array.from(r,(e=>K(e,s))).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function K(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=J(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?ie(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?ie(r,t):r}}class q{constructor(){L(this,"idNodeMap",new Map),L(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const t=this.getId(e);this.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){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function X({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&H(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function H(e){return e.toLowerCase()}const Q="__rrweb_original__";function ee(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?H(t):null}function te(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const re=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,se=/^(?:[a-z+]+:)?\/\//i,ne=/^www\..*/i,oe=/^(data:)([^,]*),(.*)/i;function ie(e,t){return(e||"").replace(re,((e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(se.test(a)||ne.test(a))return`url(${l}${a}${l})`;if(oe.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),h=a.split("/");c.pop();for(const e of h)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`}))}function ae(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function le(e,t){return function(e,t,r=!1){const s=Array.from(t.childNodes),n=[];let o=0;if(s.length>1&&e&&"string"==typeof e){let t=ae(e,r);const i=t.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){const l=ae(s[a].textContent,r),c=100;let h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,h),1));h++);for(;h<l.length;h++){let u=l.substring(0,h),p=t.split(u),d=-1;if(2===p.length)d=p[0].length;else if(p.length>2&&""===p[0]&&""!==s[a-1].textContent)d=t.indexOf(u,1);else if(1===p.length){if(u=u.substring(0,u.length-1),p=t.split(u),p.length<=1)return n.push(e),n;h=c+1}else h===l.length-1&&(d=t.indexOf(u));if(p.length>=2&&h>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=ae(e).length;d=t.indexOf(u,r)}-1===d&&(d=p[0].length)}if(-1!==d){let a=Math.floor(d/i);for(;a>0&&a<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;const l=ae(e.substring(0,a),r);if(l.length===d){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(d);break}l.length<d?a+=Math.max(1,Math.floor((d-l.length)/i)):a-=Math.max(1,Math.floor((l.length-d)*i))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}let ce=1;const he=new RegExp("[^a-z0-9-_:]");function ue(){return ce++}let pe,de;const fe=/^[^ \t\n\r\u000c]+/,me=/^[, \t\n\r\u000c]+/;const ge=new WeakMap;function ye(e,t){return t&&""!==t.trim()?ve(e,t):t}function we(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function ve(e,t){let r=ge.get(e);if(r||(r=e.createElement("a"),ge.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function be(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?ye(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(me),!(r>=t.length);){let o=s(fe);if(","===o.slice(-1))o=ye(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=ye(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,n.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?ie(s,ve(e)):"object"===t&&"data"===r?ye(e,s):s:ye(e,s):s}function Se(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function Ce(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Ce(G.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Ce(G.parentNode(e),t,r)}function xe(e,t,r,s){let n;if(Z(e)){if(n=e,!G.childNodes(n).length)return!1}else{if(null===G.parentElement(e))return!1;n=G.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(Ce(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function Ie(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:i,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:h,dataURLOptions:u={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:D.Document,childNodes:[],compatMode:e.compatMode}:{type:D.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:D.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:o,maskInputOptions:i={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:u,newlyAddedElement:p=!1,rootId:d}=t,f=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=H(e.tagName);return he.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let t=0;t<y;t++){const s=e.attributes[t];Se(m,s.name,s.value)||(g[s.name]=be(r,m,H(s.name),s.value))}if("link"===m&&o){const t=Array.from(r.styleSheets).find((t=>t.href===e.href));let s=null;t&&(s=J(t)),s&&(delete g.rel,delete g.href,g._cssText=s)}if("style"===m&&e.sheet){let t=J(e.sheet);t&&(e.childNodes.length>1&&(t=le(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,r=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=X({element:e,type:ee(e),tagName:m,value:t,maskInputOptions:i,maskInputFn:a}):r&&(g.checked=r)}"option"===m&&(e.selected&&!i.select?g.selected=!0:delete g.selected);"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){const n=t.getImageData,o=Q in n?n[Q]:n;if(new Uint32Array(o.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){pe||(pe=r.createElement("canvas"),de=pe.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{pe.width=t.naturalWidth,pe.height=t.naturalHeight,de.drawImage(t,0,0),g.rr_dataURL=pe.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===m||"video"===m){const t=g;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}p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:r}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==m||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(m)&&(w=!0)}catch(e){}return{type:D.Element,tagName:m,attributes:g,childNodes:[],isSVG:we(e)||void 0,needBlock:f,rootId:d,isCustom:w}}(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:u,inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,i=G.parentNode(e),a=i&&i.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":o||(l=G.textContent(e),c&&l&&(l=ie(l,ve(t.doc))));!c&&!h&&l&&r&&(l=s?s(l,G.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:D.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:D.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:D.Comment,textContent:G.textContent(e)||"",rootId:y};default:return!1}}function ke(e){return null==e?"":e.toLowerCase()}function Oe(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:v=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:x=!1,cssCaptured:I=!1}=t;let{needsMask:k}=t,{preserveWhiteSpace:O=!0}=t;if(!k){k=xe(e,i,a,void 0===k)}const E=Ie(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:x,cssCaptured:I});if(!E)return console.warn(e,"not serialized"),null;let A;A=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===D.Comment)return!0;if(e.type===D.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===te(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ke(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ke(e.attributes.name)||"icon"===ke(e.attributes.rel)||"apple-touch-icon"===ke(e.attributes.rel)||"shortcut icon"===ke(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ke(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ke(e.attributes.property).match(/^(og|twitter|fb):/)||ke(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ke(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ke(e.attributes.name)||"googlebot"===ke(e.attributes.name)||"bingbot"===ke(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ke(e.attributes.name)||"generator"===ke(e.attributes.name)||"framework"===ke(e.attributes.name)||"publisher"===ke(e.attributes.name)||"progid"===ke(e.attributes.name)||ke(e.attributes.property).match(/^article:/)||ke(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ke(e.attributes.name)||"yandex-verification"===ke(e.attributes.name)||"csrf-token"===ke(e.attributes.name)||"p:domain_verify"===ke(e.attributes.name)||"verify-v1"===ke(e.attributes.name)||"verification"===ke(e.attributes.name)||"shopify-checkout-api-token"===ke(e.attributes.name)))return!0}}return!1}(E,d)||!O&&E.type===D.Text&&!E.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ue();const R=Object.assign(E,{id:A});if(s.add(e,R),-2===A)return null;y&&y(e);let M=!l;if(R.type===D.Element){M=M&&!R.needBlock,delete R.needBlock;const t=G.shadowRoot(e);t&&$(t)&&(R.isShadowHost=!0)}if((R.type===D.Document||R.type===D.Element)&&M){d.headWhitespace&&R.type===D.Element&&"head"===R.tagName&&(O=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(R.type===D.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===D.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(G.childNodes(e))){const e=Oe(r,t);e&&R.childNodes.push(e)}}let x=null;if(Z(e)&&(x=G.shadowRoot(e)))for(const e of Array.from(G.childNodes(x))){const r=Oe(e,t);r&&($(x)&&(r.isShadow=!0),R.childNodes.push(r))}}const P=G.parentNode(e);return P&&Y(P)&&$(P)&&(R.isShadow=!0),R.type===D.Element&&"iframe"===R.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,o=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout((()=>{o||(t(),o=!0)}),r);return void e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&w){const r=Oe(t,{doc:t,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});r&&w(e,r)}}),v),R.type===D.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===te(R.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=setTimeout((()=>{n||(t(),n=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(o),n=!0,t()}))}(e,(()=>{if(b){const t=Oe(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&b(e,t)}}),S),R}function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ae(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Re={exports:{}},Me=String,Pe=function(){return{isColorSupported:!1,reset:Me,bold:Me,dim:Me,italic:Me,underline:Me,inverse:Me,hidden:Me,strikethrough:Me,black:Me,red:Me,green:Me,yellow:Me,blue:Me,magenta:Me,cyan:Me,white:Me,gray:Me,bgBlack:Me,bgRed:Me,bgGreen:Me,bgYellow:Me,bgBlue:Me,bgMagenta:Me,bgCyan:Me,bgWhite:Me}};Re.exports=Pe(),Re.exports.createColors=Pe;var Ne=Re.exports;const Te=Ae(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Le=Ne,De=Te,Fe=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Le.isColorSupported),De&&e&&(t=De(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Le.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var _e=Fe;Fe.default=Fe;var Be={};Be.isClean=Symbol("isClean"),Be.my=Symbol("my");const Ue={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let je=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ue[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Ue[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var ze=je;je.default=je;let We=ze;function Ve(e,t){new We(t).stringify(e)}var Ge=Ve;Ve.default=Ve;let{isClean:Ze,my:Ye}=Be,$e=_e,Je=ze,Ke=Ge;function qe(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>qe(e,r))):("object"===o&&null!==n&&(n=qe(n)),r[s]=n)}return r}let Xe=class{constructor(e={}){this.raws={},this[Ze]=!1,this[Ye]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=qe(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new $e(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Ze]){this[Ze]=!1;let e=this;for(;e=e.parent;)e[Ze]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Je).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ke){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var He=Xe;Xe.default=Xe;let Qe=He,et=class extends Qe{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var tt=et;et.default=et;var rt={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:st,SourceMapGenerator:nt}=Te,{existsSync:ot,readFileSync:it}=Te,{dirname:at,join:lt}=Te;let ct=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=at(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new st(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=at(e),ot(e))return this.mapFile=e,it(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof st)return nt.fromSourceMap(t).toString();if(t instanceof nt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=lt(at(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ht=ct;ct.default=ct;let{SourceMapConsumer:ut,SourceMapGenerator:pt}=Te,{fileURLToPath:dt,pathToFileURL:ft}=Te,{isAbsolute:mt,resolve:gt}=Te,{nanoid:yt}=rt,wt=Te,vt=_e,bt=ht,St=Symbol("fromOffsetCache"),Ct=Boolean(ut&&pt),xt=Boolean(gt&&mt),It=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!xt||/^\w+:\/\//.test(t.from)||mt(t.from)?this.file=t.from:this.file=gt(t.from)),xt&&Ct){let e=new bt(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 "+yt(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new vt(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new vt(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(ft&&(n.input.url=ft(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[St])r=this[St];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[St]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:gt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=mt(a.source)?ft(a.source):new URL(a.source,this.map.consumer().sourceRoot||ft(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!dt)throw new Error("file: protocol is not available in this PostCSS build");l.file=dt(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var kt=It;It.default=It,wt&&wt.registerInput&&wt.registerInput(It);let{SourceMapConsumer:Ot,SourceMapGenerator:Et}=Te,{dirname:At,relative:Rt,resolve:Mt,sep:Pt}=Te,{pathToFileURL:Nt}=Te,Tt=kt,Lt=Boolean(Ot&&Et),Dt=Boolean(At&&Mt&&Rt&&Pt);var Ft=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||At(e.file);!1===this.mapOpts.sourcesContent?(t=new Ot(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Dt&&Lt&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Et.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Et({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 Et({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?At(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=At(Mt(r,this.mapOpts.annotation)));let s=Rt(r,e);return this.memoizedPaths.set(e,s),s}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 Tt(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(Nt){let t=Nt(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Pt&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let _t=He,Bt=class extends _t{constructor(e){super(e),this.type="comment"}};var Ut=Bt;Bt.default=Bt;let jt,zt,Wt,Vt,{isClean:Gt,my:Zt}=Be,Yt=tt,$t=Ut,Jt=He;function Kt(e){return e.map((e=>(e.nodes&&(e.nodes=Kt(e.nodes)),delete e.source,e)))}function qt(e){if(e[Gt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)qt(t)}let Xt=class e extends Jt{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Kt(jt(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Yt(t)]}else if(t.selector)t=[new zt(t)];else if(t.name)t=[new Wt(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new $t(t)]}return t.map((t=>(t[Zt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Gt]&&qt(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};Xt.registerParse=e=>{jt=e},Xt.registerRule=e=>{zt=e},Xt.registerAtRule=e=>{Wt=e},Xt.registerRoot=e=>{Vt=e};var Ht=Xt;Xt.default=Xt,Xt.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Wt.prototype):"rule"===e.type?Object.setPrototypeOf(e,zt.prototype):"decl"===e.type?Object.setPrototypeOf(e,Yt.prototype):"comment"===e.type?Object.setPrototypeOf(e,$t.prototype):"root"===e.type&&Object.setPrototypeOf(e,Vt.prototype),e[Zt]=!0,e.nodes&&e.nodes.forEach((e=>{Xt.rebuild(e)}))};let Qt,er,tr=Ht,rr=class extends tr{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Qt(new er,this,e).stringify()}};rr.registerLazyResult=e=>{Qt=e},rr.registerProcessor=e=>{er=e};var sr=rr;rr.default=rr;let nr={};var or=function(e){nr[e]||(nr[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ir=class{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}};var ar=ir;ir.default=ir;let lr=ar,cr=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new lr(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var hr=cr;cr.default=cr;const ur="'".charCodeAt(0),pr='"'.charCodeAt(0),dr="\\".charCodeAt(0),fr="/".charCodeAt(0),mr="\n".charCodeAt(0),gr=" ".charCodeAt(0),yr="\f".charCodeAt(0),wr="\t".charCodeAt(0),vr="\r".charCodeAt(0),br="[".charCodeAt(0),Sr="]".charCodeAt(0),Cr="(".charCodeAt(0),xr=")".charCodeAt(0),Ir="{".charCodeAt(0),kr="}".charCodeAt(0),Or=";".charCodeAt(0),Er="*".charCodeAt(0),Ar=":".charCodeAt(0),Rr="@".charCodeAt(0),Mr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Nr=/.[\r\n"'(/\\]/,Tr=/[\da-f]/i;let Lr=Ht,Dr=class extends Lr{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)}};var Fr=Dr;Dr.default=Dr,Lr.registerAtRule(Dr);let _r,Br,Ur=Ht,jr=class extends Ur{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new _r(new Br,this,e).stringify()}};jr.registerLazyResult=e=>{_r=e},jr.registerProcessor=e=>{Br=e};var zr=jr;jr.default=jr,Ur.registerRoot(jr);let Wr={comma:e=>Wr.split(e,[","],!0),space:e=>Wr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Vr=Wr;Wr.default=Wr;let Gr=Ht,Zr=Vr,Yr=class extends Gr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Zr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var $r=Yr;Yr.default=Yr,Gr.registerRule(Yr);let Jr=tt,Kr=function(e,t={}){let r,s,n,o,i,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case mr:case gr:case wr:case vr:case yr:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===gr||r===mr||r===wr||r===vr||r===yr);u=["space",p.slice(m,s)],m=s-1;break;case br:case Sr:case Ir:case kr:case Ar:case Or:case xr:{let e=String.fromCharCode(r);u=[e,e,m];break}case Cr:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==ur&&h!==pr&&h!==gr&&h!==mr&&h!==wr&&h!==yr&&h!==vr){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===dr;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Nr.test(o)?u=["(","(",m]:(u=["brackets",o,m,s],m=s);break;case ur:case pr:n=r===ur?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===dr;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Rr:Mr.lastIndex=m+1,Mr.test(p),s=0===Mr.lastIndex?p.length-1:Mr.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case dr:for(s=m,i=!0;p.charCodeAt(s+1)===dr;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==fr&&r!==gr&&r!==mr&&r!==wr&&r!==vr&&r!==yr&&(s+=1,Tr.test(p.charAt(s)))){for(;Tr.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===gr&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===fr&&p.charCodeAt(m+1)===Er?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(Pr.lastIndex=m+1,Pr.test(p),s=0===Pr.lastIndex?p.length-1:Pr.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},qr=Ut,Xr=Fr,Hr=zr,Qr=$r;const es={empty:!0,space:!0};var ts=class{constructor(e){this.input=e,this.root=new Hr,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,r,s,n=new Xr;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new qr;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=Kr(this.input)}decl(e,t){let r=new Jr;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Qr;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",es[a]||es[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Qr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let rs=Ht,ss=ts,ns=kt;function os(e,t){let r=new ns(e,t),s=new ss(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var is=os;os.default=os,rs.registerParse(os);let{isClean:as,my:ls}=Be,cs=Ft,hs=Ge,us=Ht,ps=sr,ds=or,fs=hr,ms=is,gs=zr;const ys={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ws={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},vs={Once:!0,postcssPlugin:!0,prepare:!0};function bs(e){return"object"==typeof e&&"function"==typeof e.then}function Ss(e){let t=!1,r=ys[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Cs(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ss(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function xs(e){return e[as]=!1,e.nodes&&e.nodes.forEach((e=>xs(e))),e}let Is={},ks=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof fs)n=xs(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=ms;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[ls]&&us.rebuild(n)}else n=xs(r);this.result=new fs(t,n,s),this.helpers={...Is,postcss:Is,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!ws[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!vs[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(bs(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[as];){e[as]=!0;let t=[Cs(e)];for(;t.length>0;){let e=this.visitTick(t);if(bs(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return bs(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=hs;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new cs(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(bs(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[as];)e[as]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||ds("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(bs(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[as])return s[as]=!0,void e.push(Cs(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[as]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[as]=!0;let t=Ss(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[as]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};ks.registerPostcss=e=>{Is=e};var Os=ks;ks.default=ks,gs.registerLazyResult(ks),ps.registerLazyResult(ks);let Es=Ft,As=Ge,Rs=or,Ms=is;const Ps=hr;let Ns=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=As;this.result=new Ps(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Es(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||Rs("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=Ms;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"}};var Ts=Ns;Ns.default=Ns;let Ls=Ts,Ds=Os,Fs=sr,_s=zr,Bs=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ds(this,e,t):new Ls(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Us=Bs;Bs.default=Bs,_s.registerProcessor(Bs),Fs.registerProcessor(Bs);let js=tt,zs=ht,Ws=Ut,Vs=Fr,Gs=kt,Zs=zr,Ys=$r;function $s(e,t){if(Array.isArray(e))return e.map((e=>$s(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Gs.prototype};r.map&&(r.map={...r.map,__proto__:zs.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>$s(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Zs(s);if("decl"===s.type)return new js(s);if("rule"===s.type)return new Ys(s);if("comment"===s.type)return new Ws(s);if("atrule"===s.type)return new Vs(s);throw new Error("Unknown node type: "+e.type)}var Js=$s;$s.default=$s;let Ks=_e,qs=tt,Xs=Os,Hs=Ht,Qs=Us,en=Ge,tn=Js,rn=sr,sn=ar,nn=Ut,on=Fr,an=hr,ln=kt,cn=is,hn=Vr,un=$r,pn=zr,dn=He;function fn(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Qs(e)}fn.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Qs).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return fn([n(r)]).process(e,t)},n},fn.stringify=en,fn.parse=cn,fn.fromJSON=tn,fn.list=hn,fn.comment=e=>new nn(e),fn.atRule=e=>new on(e),fn.decl=e=>new qs(e),fn.rule=e=>new un(e),fn.root=e=>new pn(e),fn.document=e=>new rn(e),fn.CssSyntaxError=Ks,fn.Declaration=qs,fn.Container=Hs,fn.Processor=Qs,fn.Document=rn,fn.Comment=nn,fn.Warning=sn,fn.AtRule=on,fn.Result=an,fn.Input=ln,fn.Rule=un,fn.Root=pn,fn.Node=dn,Xs.registerPostcss(fn);var mn=fn;fn.default=fn;const gn=Ee(mn);gn.stringify,gn.fromJSON,gn.plugin,gn.parse,gn.list,gn.document,gn.comment,gn.atRule,gn.rule,gn.decl,gn.root,gn.CssSyntaxError,gn.Declaration,gn.Container,gn.Processor,gn.Document,gn.Comment,gn.Warning,gn.AtRule,gn.Result,gn.Input,gn.Rule,gn.Root,gn.Node;var yn=Object.defineProperty,wn=(e,t,r)=>((e,t,r)=>t in e?yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Sn={exports:{}},Cn=String,xn=function(){return{isColorSupported:!1,reset:Cn,bold:Cn,dim:Cn,italic:Cn,underline:Cn,inverse:Cn,hidden:Cn,strikethrough:Cn,black:Cn,red:Cn,green:Cn,yellow:Cn,blue:Cn,magenta:Cn,cyan:Cn,white:Cn,gray:Cn,bgBlack:Cn,bgRed:Cn,bgGreen:Cn,bgYellow:Cn,bgBlue:Cn,bgMagenta:Cn,bgCyan:Cn,bgWhite:Cn}};Sn.exports=xn(),Sn.exports.createColors=xn;var In=Sn.exports;const kn=bn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let On=In,En=kn,An=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=On.isColorSupported),En&&e&&(t=En(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=On.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Rn=An;An.default=An;var Mn={};Mn.isClean=Symbol("isClean"),Mn.my=Symbol("my");const Pn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Nn=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Pn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Pn[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Tn=Nn;Nn.default=Nn;let Ln=Tn;function Dn(e,t){new Ln(t).stringify(e)}var Fn=Dn;Dn.default=Dn;let{isClean:_n,my:Bn}=Mn,Un=Rn,jn=Tn,zn=Fn;function Wn(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>Wn(e,r))):("object"===o&&null!==n&&(n=Wn(n)),r[s]=n)}return r}let Vn=class{constructor(e={}){this.raws={},this[_n]=!1,this[Bn]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=Wn(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Un(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[_n]){this[_n]=!1;let e=this;for(;e=e.parent;)e[_n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new jn).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=zn){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Gn=Vn;Vn.default=Vn;let Zn=Gn,Yn=class extends Zn{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var $n=Yn;Yn.default=Yn;var Jn={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:Kn,SourceMapGenerator:qn}=kn,{existsSync:Xn,readFileSync:Hn}=kn,{dirname:Qn,join:eo}=kn;let to=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Qn(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Kn(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Qn(e),Xn(e))return this.mapFile=e,Hn(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Kn)return qn.fromSourceMap(t).toString();if(t instanceof qn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=eo(Qn(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ro=to;to.default=to;let{SourceMapConsumer:so,SourceMapGenerator:no}=kn,{fileURLToPath:oo,pathToFileURL:io}=kn,{isAbsolute:ao,resolve:lo}=kn,{nanoid:co}=Jn,ho=kn,uo=Rn,po=ro,fo=Symbol("fromOffsetCache"),mo=Boolean(so&&no),go=Boolean(lo&&ao),yo=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!go||/^\w+:\/\//.test(t.from)||ao(t.from)?this.file=t.from:this.file=lo(t.from)),go&&mo){let e=new po(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 "+co(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new uo(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new uo(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(io&&(n.input.url=io(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[fo])r=this[fo];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[fo]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:lo(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=ao(a.source)?io(a.source):new URL(a.source,this.map.consumer().sourceRoot||io(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!oo)throw new Error("file: protocol is not available in this PostCSS build");l.file=oo(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var wo=yo;yo.default=yo,ho&&ho.registerInput&&ho.registerInput(yo);let{SourceMapConsumer:vo,SourceMapGenerator:bo}=kn,{dirname:So,relative:Co,resolve:xo,sep:Io}=kn,{pathToFileURL:ko}=kn,Oo=wo,Eo=Boolean(vo&&bo),Ao=Boolean(So&&xo&&Co&&Io);var Ro=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||So(e.file);!1===this.mapOpts.sourcesContent?(t=new vo(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ao&&Eo&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=bo.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new bo({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 bo({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?So(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=So(xo(r,this.mapOpts.annotation)));let s=Co(r,e);return this.memoizedPaths.set(e,s),s}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 Oo(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(ko){let t=ko(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Io&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Mo=Gn,Po=class extends Mo{constructor(e){super(e),this.type="comment"}};var No=Po;Po.default=Po;let To,Lo,Do,Fo,{isClean:_o,my:Bo}=Mn,Uo=$n,jo=No,zo=Gn;function Wo(e){return e.map((e=>(e.nodes&&(e.nodes=Wo(e.nodes)),delete e.source,e)))}function Vo(e){if(e[_o]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Vo(t)}let Go=class e extends zo{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Wo(To(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Uo(t)]}else if(t.selector)t=[new Lo(t)];else if(t.name)t=[new Do(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new jo(t)]}return t.map((t=>(t[Bo]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[_o]&&Vo(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};Go.registerParse=e=>{To=e},Go.registerRule=e=>{Lo=e},Go.registerAtRule=e=>{Do=e},Go.registerRoot=e=>{Fo=e};var Zo=Go;Go.default=Go,Go.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Do.prototype):"rule"===e.type?Object.setPrototypeOf(e,Lo.prototype):"decl"===e.type?Object.setPrototypeOf(e,Uo.prototype):"comment"===e.type?Object.setPrototypeOf(e,jo.prototype):"root"===e.type&&Object.setPrototypeOf(e,Fo.prototype),e[Bo]=!0,e.nodes&&e.nodes.forEach((e=>{Go.rebuild(e)}))};let Yo,$o,Jo=Zo,Ko=class extends Jo{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Yo(new $o,this,e).stringify()}};Ko.registerLazyResult=e=>{Yo=e},Ko.registerProcessor=e=>{$o=e};var qo=Ko;Ko.default=Ko;let Xo={};var Ho=function(e){Xo[e]||(Xo[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Qo=class{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}};var ei=Qo;Qo.default=Qo;let ti=ei,ri=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ti(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var si=ri;ri.default=ri;const ni="'".charCodeAt(0),oi='"'.charCodeAt(0),ii="\\".charCodeAt(0),ai="/".charCodeAt(0),li="\n".charCodeAt(0),ci=" ".charCodeAt(0),hi="\f".charCodeAt(0),ui="\t".charCodeAt(0),pi="\r".charCodeAt(0),di="[".charCodeAt(0),fi="]".charCodeAt(0),mi="(".charCodeAt(0),gi=")".charCodeAt(0),yi="{".charCodeAt(0),wi="}".charCodeAt(0),vi=";".charCodeAt(0),bi="*".charCodeAt(0),Si=":".charCodeAt(0),Ci="@".charCodeAt(0),xi=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ii=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ki=/.[\r\n"'(/\\]/,Oi=/[\da-f]/i;let Ei=Zo,Ai=class extends Ei{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)}};var Ri=Ai;Ai.default=Ai,Ei.registerAtRule(Ai);let Mi,Pi,Ni=Zo,Ti=class extends Ni{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Mi(new Pi,this,e).stringify()}};Ti.registerLazyResult=e=>{Mi=e},Ti.registerProcessor=e=>{Pi=e};var Li=Ti;Ti.default=Ti,Ni.registerRoot(Ti);let Di={comma:e=>Di.split(e,[","],!0),space:e=>Di.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Fi=Di;Di.default=Di;let _i=Zo,Bi=Fi,Ui=class extends _i{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Bi.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var ji=Ui;Ui.default=Ui,_i.registerRule(Ui);let zi=$n,Wi=function(e,t={}){let r,s,n,o,i,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case li:case ci:case ui:case pi:case hi:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===ci||r===li||r===ui||r===pi||r===hi);u=["space",p.slice(m,s)],m=s-1;break;case di:case fi:case yi:case wi:case Si:case vi:case gi:{let e=String.fromCharCode(r);u=[e,e,m];break}case mi:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==ni&&h!==oi&&h!==ci&&h!==li&&h!==ui&&h!==hi&&h!==pi){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===ii;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||ki.test(o)?u=["(","(",m]:(u=["brackets",o,m,s],m=s);break;case ni:case oi:n=r===ni?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===ii;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Ci:xi.lastIndex=m+1,xi.test(p),s=0===xi.lastIndex?p.length-1:xi.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case ii:for(s=m,i=!0;p.charCodeAt(s+1)===ii;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==ai&&r!==ci&&r!==li&&r!==ui&&r!==pi&&r!==hi&&(s+=1,Oi.test(p.charAt(s)))){for(;Oi.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===ci&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===ai&&p.charCodeAt(m+1)===bi?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(Ii.lastIndex=m+1,Ii.test(p),s=0===Ii.lastIndex?p.length-1:Ii.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},Vi=No,Gi=Ri,Zi=Li,Yi=ji;const $i={empty:!0,space:!0};var Ji=class{constructor(e){this.input=e,this.root=new Zi,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,r,s,n=new Gi;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Vi;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=Wi(this.input)}decl(e,t){let r=new zi;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Yi;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",$i[a]||$i[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Yi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let Ki=Zo,qi=Ji,Xi=wo;function Hi(e,t){let r=new Xi(e,t),s=new qi(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Qi=Hi;Hi.default=Hi,Ki.registerParse(Hi);let{isClean:ea,my:ta}=Mn,ra=Ro,sa=Fn,na=Zo,oa=qo,ia=Ho,aa=si,la=Qi,ca=Li;const ha={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ua={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},pa={Once:!0,postcssPlugin:!0,prepare:!0};function da(e){return"object"==typeof e&&"function"==typeof e.then}function fa(e){let t=!1,r=ha[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function ma(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:fa(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function ga(e){return e[ea]=!1,e.nodes&&e.nodes.forEach((e=>ga(e))),e}let ya={},wa=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof aa)n=ga(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=la;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[ta]&&na.rebuild(n)}else n=ga(r);this.result=new aa(t,n,s),this.helpers={...ya,postcss:ya,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!ua[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!pa[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(da(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ea];){e[ea]=!0;let t=[ma(e)];for(;t.length>0;){let e=this.visitTick(t);if(da(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return da(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=sa;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ra(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(da(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ea];)e[ea]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||ia("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(da(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[ea])return s[ea]=!0,void e.push(ma(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[ea]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ea]=!0;let t=fa(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[ea]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};wa.registerPostcss=e=>{ya=e};var va=wa;wa.default=wa,ca.registerLazyResult(wa),oa.registerLazyResult(wa);let ba=Ro,Sa=Fn,Ca=Ho,xa=Qi;const Ia=si;let ka=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Sa;this.result=new Ia(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new ba(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||Ca("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=xa;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"}};var Oa=ka;ka.default=ka;let Ea=Oa,Aa=va,Ra=qo,Ma=Li,Pa=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Aa(this,e,t):new Ea(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Na=Pa;Pa.default=Pa,Ma.registerProcessor(Pa),Ra.registerProcessor(Pa);let Ta=$n,La=ro,Da=No,Fa=Ri,_a=wo,Ba=Li,Ua=ji;function ja(e,t){if(Array.isArray(e))return e.map((e=>ja(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:_a.prototype};r.map&&(r.map={...r.map,__proto__:La.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>ja(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Ba(s);if("decl"===s.type)return new Ta(s);if("rule"===s.type)return new Ua(s);if("comment"===s.type)return new Da(s);if("atrule"===s.type)return new Fa(s);throw new Error("Unknown node type: "+e.type)}var za=ja;ja.default=ja;let Wa=Rn,Va=$n,Ga=va,Za=Zo,Ya=Na,$a=Fn,Ja=za,Ka=qo,qa=ei,Xa=No,Ha=Ri,Qa=si,el=wo,tl=Qi,rl=Fi,sl=ji,nl=Li,ol=Gn;function il(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Ya(e)}il.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Ya).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return il([n(r)]).process(e,t)},n},il.stringify=$a,il.parse=tl,il.fromJSON=Ja,il.list=rl,il.comment=e=>new Xa(e),il.atRule=e=>new Ha(e),il.decl=e=>new Va(e),il.rule=e=>new sl(e),il.root=e=>new nl(e),il.document=e=>new Ka(e),il.CssSyntaxError=Wa,il.Declaration=Va,il.Container=Za,il.Processor=Ya,il.Document=Ka,il.Comment=Xa,il.Warning=qa,il.AtRule=Ha,il.Result=Qa,il.Input=el,il.Rule=sl,il.Root=nl,il.Node=ol,Ga.registerPostcss(il);var al=il;il.default=il;const ll=vn(al);ll.stringify,ll.fromJSON,ll.plugin,ll.parse,ll.list,ll.document,ll.comment,ll.atRule,ll.rule,ll.decl,ll.root,ll.CssSyntaxError,ll.Declaration,ll.Container,ll.Processor,ll.Document,ll.Comment,ll.Warning,ll.AtRule,ll.Result,ll.Input,ll.Rule,ll.Root,ll.Node;class cl{constructor(...e){wn(this,"parentElement",null),wn(this,"parentNode",null),wn(this,"ownerDocument"),wn(this,"firstChild",null),wn(this,"lastChild",null),wn(this,"previousSibling",null),wn(this,"nextSibling",null),wn(this,"ELEMENT_NODE",1),wn(this,"TEXT_NODE",3),wn(this,"nodeType"),wn(this,"nodeName"),wn(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof cl))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const hl={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ul={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pl={};function dl(e){if(pl[e])return pl[e];const t=globalThis[e],r=t.prototype,s=e in hl?hl[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in ul?ul[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return pl[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?pl[e]=o:r}catch{return r}}const fl={};function ml(e,t,r){var s;const n=`${e}.${String(r)}`;if(fl[n])return fl[n].call(t);const o=dl(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(fl[n]=i,i.call(t)):t[r]}const gl={};function yl(e,t,r){const s=`${e}.${String(r)}`;if(gl[s])return gl[s].bind(t);const n=dl(e)[r];return"function"!=typeof n?t[r]:(gl[s]=n,n.bind(t))}function wl(){return dl("MutationObserver").constructor}const vl={childNodes:function(e){return ml("Node",e,"childNodes")},parentNode:function(e){return ml("Node",e,"parentNode")},parentElement:function(e){return ml("Node",e,"parentElement")},textContent:function(e){return ml("Node",e,"textContent")},contains:function(e,t){return yl("Node",e,"contains")(t)},getRootNode:function(e){return yl("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ml("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ml("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ml("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ml("Element",e,"querySelectorAll")(t)},mutationObserver:wl};function bl(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Sl="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Cl={map:{},getId:()=>(console.error(Sl),-1),getNode:()=>(console.error(Sl),null),removeNodeFromMap(){console.error(Sl)},has:()=>(console.error(Sl),!1),reset(){console.error(Sl)}};function xl(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)}),a))}}function Il(e,t,r,s,n=window){const o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>Il(e,t,o||{},!0)}function kl(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Cl=new Proxy(Cl,{get:(e,t,r)=>("map"===t&&console.error(Sl),Reflect.get(e,t,r))}));let Ol=Date.now;function El(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=vl.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=vl.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function Al(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Rl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ml(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:vl.parentElement(e)}function Pl(e,t,r,s){if(!e)return!1;const n=Ml(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(Ce(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function Nl(e,t){return-1!==t.getId(e)}function Tl(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Ll(e,t){if(Y(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=vl.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||Ll(s,t))}function Dl(e){return Boolean(e.changedTouches)}function Fl(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 _l(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Bl(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Ul(e){return!!e&&(e instanceof cl&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(vl.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ol=()=>(new Date).getTime());class jl{constructor(){N(this,"id",1),N(this,"styleIDMap",new WeakMap),N(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 r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}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 zl(e){var t;let r=null;return"getRootNode"in e&&(null==(t=vl.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&vl.host(vl.getRootNode(e))&&(r=vl.host(vl.getRootNode(e))),r}function Wl(e){let t,r=e;for(;t=zl(r);)r=t;return r}function Vl(e){const t=e.ownerDocument;if(!t)return!1;const r=Wl(e);return vl.contains(t,r)}function Gl(e){const t=e.ownerDocument;return!!t&&(vl.contains(t,e)||Vl(e))}const Zl=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:jl,get _mirror(){return Cl},closestElementOfNode:Ml,getBaseDimension:function e(t,r){var s,n;const o=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Wl,getShadowHost:zl,getWindowHeight:Al,getWindowScroll:El,getWindowWidth:Rl,hasShadowRoot:Ul,hookSetter:Il,inDom:Gl,isAncestorRemoved:Ll,isBlocked:Pl,isIgnored:Tl,isSerialized:Nl,isSerializedIframe:_l,isSerializedStylesheet:Bl,iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:Dl,get nowTimestamp(){return Ol},on:bl,patch:kl,polyfill:Fl,queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:o}=n;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(n,o.parent))}else{const e=s.indexOf(o);s.splice(e,0,r(n,null))}}else if(o in t){const e=t[o];e.children.push(r(n,e))}else s.push(r(n,null))}return s},shadowHostInDom:Vl,throttle:xl,uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));var Yl=(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))(Yl||{}),$l=(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))($l||{}),Jl=(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))(Jl||{}),Kl=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Kl||{}),ql=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ql||{}),Xl=(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))(Xl||{}),Hl=(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))(Hl||{});function Ql(e){return"__ln"in e}class ec{constructor(){N(this,"length",0),N(this,"head",null),N(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ql(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ql(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const 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--)}}const tc=(e,t)=>`${e}@${t}`;class rc{constructor(){N(this,"frozen",!1),N(this,"locked",!1),N(this,"texts",[]),N(this,"attributes",[]),N(this,"attributeMap",new WeakMap),N(this,"removes",[]),N(this,"mapRemoves",[]),N(this,"movedMap",{}),N(this,"addedSet",new Set),N(this,"movedSet",new Set),N(this,"droppedSet",new Set),N(this,"removesSubTreeCache",new Set),N(this,"mutationCb"),N(this,"blockClass"),N(this,"blockSelector"),N(this,"maskTextClass"),N(this,"maskTextSelector"),N(this,"inlineStylesheet"),N(this,"maskInputOptions"),N(this,"maskTextFn"),N(this,"maskInputFn"),N(this,"keepIframeSrcFn"),N(this,"recordCanvas"),N(this,"inlineImages"),N(this,"slimDOMOptions"),N(this,"dataURLOptions"),N(this,"doc"),N(this,"mirror"),N(this,"iframeManager"),N(this,"stylesheetManager"),N(this,"shadowDomManager"),N(this,"canvasManager"),N(this,"processedNodeManager"),N(this,"unattachedDoc"),N(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),N(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new ec,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const o=vl.parentNode(n);if(!o||!Gl(n))return;let i=!1;if(n.nodeType===Node.TEXT_NODE){const e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(i=!0)}const a=Y(o)?this.mirror.getId(zl(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=Oe(n,{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=>{_l(e,this.mirror)&&this.iframeManager.addIframe(e),Bl(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Ul(n)&&this.shadowDomManager.addShadowRoot(vl.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:i});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)nc(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(vl.parentNode(e))||n(e);for(const e of this.addedSet)oc(this.droppedSet,e)||nc(this.removesSubTreeCache,e,this.mirror)?oc(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let o=null;for(;r.length;){let e=null;if(o){const t=this.mirror.getId(vl.parentNode(o.value)),r=s(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(vl.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=vl.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=vl.host(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),n(e.value)}const i={texts:this.texts.map((e=>{const t=e.node,r=vl.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{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=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).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};(i.texts.length||i.attributes.length||i.removes.length||i.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(i))})),N(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));const r=Array.from(vl.childNodes(e),(e=>vl.textContent(e)||"")).join("");t.attributes.value=X({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ee(e),value:r,maskInputFn:this.maskInputFn})})),N(this,"processMutation",(e=>{if(!Tl(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=vl.textContent(e.target);Pl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:xe(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ml(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=ee(t);s=X({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Pl(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Se(t.tagName,r))if(n.attributes[r]=be(this.doc,H(t.tagName),H(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===o?s:[s,o]:n._unchangedStyles[e]=[s,o]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":if(Pl(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const r=this.mirror.getId(t),s=Y(e.target)?this.mirror.getId(vl.host(e.target)):this.mirror.getId(e.target);Pl(e.target,this.blockClass,this.blockSelector,!1)||Tl(t,this.mirror,this.slimDOMOptions)||!Nl(t,this.mirror)||(this.addedSet.has(t)?(sc(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Ll(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[tc(r,s)]?sc(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!Y(e.target)||!$(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),vl.childNodes(e).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),N(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Tl(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[tc(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Pl(e,this.blockClass,this.blockSelector,!1)||(vl.childNodes(e).forEach((e=>this.genAdds(e))),Ul(e)&&vl.childNodes(vl.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 sc(e,t){e.delete(t),vl.childNodes(t).forEach((t=>sc(e,t)))}function nc(e,t,r){return 0!==e.size&&function(e,t){const r=vl.parentNode(t);return!!r&&e.has(r)}(e,t)}function oc(e,t){return 0!==e.size&&ic(e,t)}function ic(e,t){const r=vl.parentNode(t);return!!r&&(!!e.has(r)||ic(e,r))}let ac;const lc=e=>{if(!ac)return e;return(...t)=>{try{return e(...t)}catch(e){if(ac&&!0===ac(e))return;throw e}}};function cc(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}const hc=[];function uc(e){try{if("composedPath"in e){const 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 pc(e,t){const r=new rc;hc.push(r),r.init(e);const s=new(wl())(lc(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function dc({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let l=null;return Object.keys(Jl).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e])).forEach((o=>{let i=H(o);const c=(t=>o=>{const i=uc(o);if(Pl(i,s,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=Kl.Mouse;break;case"touch":a=Kl.Touch;break;case"pen":a=Kl.Pen}a===Kl.Touch?Jl[t]===Jl.MouseDown?c="TouchStart":Jl[t]===Jl.MouseUp&&(c="TouchEnd"):Kl.Pen}else Dl(o)&&(a=Kl.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Kl.Touch||c.startsWith("Mouse")&&a===Kl.Mouse)&&(a=null)):Jl[t]===Jl.Click&&(a=l,l=null);const h=Dl(o)?o.changedTouches[0]:o;if(!h)return;const u=r.getId(i),{clientX:p,clientY:d}=h;lc(e)({type:Jl[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(Jl[o]){case Jl.MouseDown:case Jl.MouseUp:i=i.replace("mouse","pointer");break;case Jl.TouchStart:case Jl.TouchEnd:return}a.push(bl(i,c,t))})),lc((()=>{a.forEach((e=>e()))}))}function fc({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){const i=lc(xl(lc((o=>{const i=uc(o);if(!i||Pl(i,s,n,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=El(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})})),o.scroll||100));return bl("scroll",i,t)}const mc=["INPUT","TEXTAREA","SELECT"],gc=new WeakMap;function yc(e){return function(e,t){if(Sc("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Sc("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Sc("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Sc("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function wc(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function vc({mirror:e,stylesheetManager:t},r){var s,n,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(vl.host(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(o=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return s}}),lc((()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function bc(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),i(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=pc(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const l=xl(lc((t=>{const r=Date.now()-i;e(a.map((e=>(e.timeOffset-=r,e))),t),a=[],i=null})),o),c=lc(xl(lc((e=>{const t=uc(e),{clientX:r,clientY:n}=Dl(e)?e.changedTouches[0]:e;i||(i=Ol()),a.push({x:r,y:n,id:s.getId(t),timeOffset:Ol()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?$l.Drag:e instanceof MouseEvent?$l.MouseMove:$l.TouchMove)})),n,{trailing:!1})),h=[bl("mousemove",c,r),bl("touchmove",c,r),bl("drag",c,r)];return lc((()=>{h.forEach((e=>e()))}))}(e),o=dc(e),i=fc(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return bl("resize",lc(xl(lc((()=>{const t=Al(),n=Rl();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)})),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:o,ignoreSelector:i,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let r=uc(e);const c=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=vl.parentElement(r)),!r||!u||mc.indexOf(u)<0||Pl(r,s,n,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let d=r.value,f=!1;const m=ee(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[u.toLowerCase()]||a[m])&&(d=X({element:r,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(r,h?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach((e=>{if(e!==r){const t=e.value;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function p(t,s){const n=gc.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){gc.set(t,s);const n=r.getId(t);lc(e)({...s,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map((e=>bl(e,lc(u),t))),f=t.defaultView;if(!f)return()=>{d.forEach((e=>e()))};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map((e=>Il(e[0],e[1],{set(){lc(u)({target:this,isTrusted:!1})}},!1,f)))),lc((()=>{d.forEach((e=>e()))}))}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:o}){const i=lc((o=>xl(lc((n=>{const i=uc(n);if(!i||Pl(i,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=i;e({type:o,id:s.getId(i),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})})),n.media||500))),a=[bl("play",i(Xl.Play),o),bl("pause",i(Xl.Pause),o),bl("seeked",i(Xl.Seeked),o),bl("volumechange",i(Xl.VolumeChange),o),bl("ratechange",i(Xl.RateChange),o)];return lc((()=>{a.forEach((e=>e()))}))}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:lc(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=wc(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),cc((()=>s.apply(n,o)))()}))}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};const o=s.CSSStyleSheet.prototype.deleteRule;let i,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:lc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=wc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),cc((()=>s.apply(n,o)))()}))}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:lc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=wc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:i}),s.apply(n,o)}))})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:lc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=wc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),s.apply(n,o)}))}));const l={};Cc("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Cc("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Cc("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Cc("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach((([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:lc(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=wc(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...yc(n),a||0]}]}),s.apply(n,o)}))}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:lc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=wc(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...yc(n),i]}]}),s.apply(n,o)}))})})),lc((()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=o,i&&(s.CSSStyleSheet.prototype.replace=i),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}))}(e,{win:r}),u=vc(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:lc(((n,i,a)=>{var l;const[c,h,u]=a;if(r.has(c))return o.apply(i,[c,h,u]);const{id:p,styleId:d}=wc(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:yc(i.parentRule)}),n.apply(i,a)}))});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:lc(((n,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:h,styleId:u}=wc(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:yc(o.parentRule)}),n.apply(o,a)}))}),lc((()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=i}))}(e,{win:r}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){const s=new o(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const i=kl(t.fonts,"add",(function(t){return function(r){return setTimeout(lc((()=>{const t=n.get(r);t&&(e(t),n.delete(r))})),0),t.apply(this,[r])}}));return s.push((()=>{r.FontFace=o})),s.push(i),lc((()=>{s.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:o}=e;let i=!0;const a=lc((()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const o=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:h}=o;Pl(i,s,n,!0)||Pl(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:h})}o({ranges:a})}));return a(),bl("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?kl(r.customElements,"define",(function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,n])}})):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return lc((()=>{hc.forEach((e=>e.reset())),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach((e=>e()))}))}function Sc(e){return void 0!==window[e]}function Cc(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class xc{constructor(e){N(this,"iframeIdToRemoteIdMap",new WeakMap),N(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let i=n.get(t);return i||(i=this.generateIdFn(),n.set(t,i),o.set(i,t)),i}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,s)))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=s.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);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}}class Ic{constructor(e){N(this,"iframes",new WeakMap),N(this,"crossOriginIframeMap",new WeakMap),N(this,"crossOriginIframeMirror",new xc(ue)),N(this,"crossOriginIframeStyleMirror"),N(this,"crossOriginIframeRootIdMap",new WeakMap),N(this,"mirror"),N(this,"mutationCb"),N(this,"wrappedEmit"),N(this,"loadListener"),N(this,"stylesheetManager"),N(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xc(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 r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.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){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case Yl.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:Yl.IncrementalSnapshot,data:{source:$l.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Yl.Meta:case Yl.Load:case Yl.DomContentLoaded:return!1;case Yl.Plugin:return t;case Yl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Yl.IncrementalSnapshot:switch(t.data.source){case $l.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),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 $l.Drag:case $l.TouchMove:case $l.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case $l.ViewportResize:return!1;case $l.MediaInteraction:case $l.MouseInteraction:case $l.Scroll:case $l.CanvasMutation:case $l.Input:return this.replaceIds(t.data,e,["id"]),t;case $l.StyleSheetRule:case $l.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case $l.Font:return t;case $l.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case $l.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}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===Hl.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class kc{constructor(e){N(this,"shadowDoms",new WeakSet),N(this,"mutationCb"),N(this,"scrollCb"),N(this,"bypassOptions"),N(this,"mirror"),N(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(!$(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=pc({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(fc({...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(vl.host(e))),this.restoreHandlers.push(vc({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){const r=this;this.restoreHandlers.push(kl(e.prototype,"attachShadow",(function(e){return function(s){const n=e.call(this,s),o=vl.shadowRoot(this);return o&&Gl(this)&&r.addShadowRoot(o,t),n}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Oc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ec="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ac=0;Ac<64;Ac++)Ec[Oc.charCodeAt(Ac)]=Ac;const Rc=new Map;const Mc=(e,t,r)=>{if(!e||!Tc(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=Rc.get(e);return r||(r=new Map,Rc.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function Pc(e,t,r){if(e instanceof Array)return e.map((e=>Pc(e,t,r)));if(null===e)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:function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=Oc[r[t]>>2],n+=Oc[(3&r[t])<<4|r[t+1]>>4],n+=Oc[(15&r[t+1])<<2|r[t+2]>>6],n+=Oc[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Pc(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Pc(e.data,t,r),e.width,e.height]}}if(Tc(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Mc(e,t,r)}}return e}const Nc=(e,t,r)=>e.map((e=>Pc(e,t,r))),Tc=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function Lc(e,t,r,s){const n=[];try{const o=kl(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n,...o){if(!Pl(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){const e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...o])}}));n.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((e=>e()))}}function Dc(e,t,r,s,n,o){const i=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=kl(e,l,(function(e){return function(...i){const a=e.apply(this,i);if(Mc(a,o,this),"tagName"in this.canvas&&!Pl(this.canvas,s,n,!0)){const e=Nc(i,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}}));i.push(a)}catch{const s=Il(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const Fc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",_c="undefined"!=typeof window&&window.Blob&&new Blob([(Bc=Fc,Uint8Array.from(atob(Bc),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var Bc;function Uc(e){let t;try{if(t=_c&&(window.URL||window.webkitURL).createObjectURL(_c),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Fc,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class jc{constructor(e){N(this,"pendingCanvasMutations",new Map),N(this,"rafStamps",{latestId:0,invokeId:null}),N(this,"mirror"),N(this,"mutationCb"),N(this,"resetObservers"),N(this,"frozen",!1),N(this,"locked",!1),N(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)}));const{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:o,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,s,n),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{dataURLOptions:i})}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,r,s,n){const o=Lc(t,r,s,!0),i=new Map,a=new Uc;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:o}=e.data;this.mutationCb({id:t,type:ql["2D"],commands:[{property:"clearRect",args:[0,0,n,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{Pl(t,r,s,!0)||e.push(t)})),e})().forEach((async e=>{var t;const r=this.mirror.getId(e);if(i.get(r))return;if(0===e.width||0===e.height)return;if(i.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])}))),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Lc(e,t,r,!1),n=function(e,t,r,s){const n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const o=kl(t.CanvasRenderingContext2D.prototype,i,(function(n){return function(...o){return Pl(this.canvas,r,s,!0)||setTimeout((()=>{const r=Nc(o,t,this);e(this.canvas,{type:ql["2D"],property:i,args:r})}),0),n.apply(this,o)}}));n.push(o)}catch{const r=Il(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:ql["2D"],property:i,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,s){const n=[];return n.push(...Dc(t.WebGLRenderingContext.prototype,ql.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Dc(t.WebGL2RenderingContext.prototype,ql.WebGL2,e,r,s,t)),()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map((e=>{const{type:t,...r}=e;return r})),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class zc{constructor(e){N(this,"trackedLinkElements",new WeakSet),N(this,"mutationCb"),N(this,"adoptedStyleSheetCb"),N(this,"styleMirror",new jl),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(0===e.length)return;const r={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:K(e,t.href),index:r})))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Wc{constructor(){N(this,"nodeMap",new WeakMap),N(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).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(){}}let Vc,Gc,Zc,Yc=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(M=e.contentWindow)?void 0:M.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const $c=new q;function Jc(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:i="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:v={},mousemoveWait:b,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:x=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:k=!1,collectFonts:O=!1,inlineImages:E=!1,plugins:A,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:P}=e;ac=P;const N=!x||window.parent===window;let T=!1;if(!N)try{window.parent.document&&(T=!1)}catch(e){T=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!T)return()=>{};void 0!==b&&void 0===w.mousemove&&(w.mousemove=b),$c.reset();const L=!0===u?{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}:void 0!==p?p:{password:!0},D=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let F;Fl();let _=0;const B=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!T&&(e=y(e)),e};Vc=(e,n)=>{var o;const i=e;if(i.timestamp=Ol(),!(null==(o=hc[0])?void 0:o.isFrozen())||i.type===Yl.FullSnapshot||i.type===Yl.IncrementalSnapshot&&i.data.source===$l.Mutation||hc.forEach((e=>e.unfreeze())),N)null==t||t(B(i),n);else if(T){const e={type:"rrweb",event:B(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===Yl.FullSnapshot)F=i,_=0;else if(i.type===Yl.IncrementalSnapshot){if(i.data.source===$l.Mutation&&i.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&i.timestamp-F.timestamp>r;(e||t)&&Gc(!0)}};const U=e=>{Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Mutation,...e}})},j=e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Scroll,...e}}),z=e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.CanvasMutation,...e}}),W=new zc({mutationCb:U,adoptedStyleSheetCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.AdoptedStyleSheet,...e}})}),V=new Ic({mirror:$c,mutationCb:U,stylesheetManager:W,recordCrossOriginIframes:x,wrappedEmit:Vc});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:$c,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const G=new Wc;Zc=new jc({recordCanvas:C,mutationCb:z,win:window,blockClass:n,blockSelector:o,mirror:$c,sampling:w.canvas,dataURLOptions:v});const Z=new kc({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:L,dataURLOptions:v,maskTextFn:m,maskInputFn:f,recordCanvas:C,inlineImages:E,sampling:w,slimDOMOptions:D,iframeManager:V,stylesheetManager:W,canvasManager:Zc,keepIframeSrcFn:R,processedNodeManager:G},mirror:$c});Gc=(e=!1)=>{if(!S)return;Vc({type:Yl.Meta,data:{href:window.location.href,width:Rl(),height:Al()}},e),W.reset(),Z.init(),hc.forEach((e=>e.lock()));const t=function(e,t){const{mirror:r=new q,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:i=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:b,keepIframeSrcFn:S=()=>!1}=t||{};return Oe(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:i,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{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}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:$c,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:L,maskTextFn:m,maskInputFn:f,slimDOM:D,dataURLOptions:v,recordCanvas:C,inlineImages:E,onSerialize:e=>{_l(e,$c)&&V.addIframe(e),Bl(e,$c)&&W.trackLinkElement(e),Ul(e)&&Z.addShadowRoot(vl.shadowRoot(e),document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),Z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");Vc({type:Yl.FullSnapshot,data:{node:t,initialOffset:El(window)}},e),hc.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,$c.getId(document))};try{const e=[],t=e=>{var t;return lc(bc)({mutationCb:U,mousemoveCb:(e,t)=>Vc({type:Yl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.ViewportResize,...e}}),inputCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Input,...e}}),mediaInteractionCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.MediaInteraction,...e}}),styleSheetRuleCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.StyleSheetRule,...e}}),styleDeclarationCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Font,...e}}),selectionCb:e=>{Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Selection,...e}})},customElementCb:e=>{Vc({type:Yl.IncrementalSnapshot,data:{source:$l.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:h,sampling:w,recordDOM:S,recordCanvas:C,inlineImages:E,userTriggeredOnInput:k,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:o,slimDOMOptions:D,dataURLOptions:v,mirror:$c,iframeManager:V,stylesheetManager:W,shadowDomManager:Z,processedNodeManager:G,canvasManager:Zc,ignoreCSSAttributes:M,plugins:(null==(t=null==A?void 0:A.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>Vc({type:Yl.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};V.addLoadListener((r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}}));const r=()=>{Gc(),e.push(t(document)),Yc=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(bl("DOMContentLoaded",(()=>{Vc({type:Yl.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&r()}))),e.push(bl("load",(()=>{Vc({type:Yl.Load,data:{}}),"load"===I&&r()}),window))),()=>{e.forEach((e=>e())),G.destroy(),Yc=!1,ac=void 0}}catch(e){console.warn(e)}}var Kc,qc,Xc,Hc;Jc.addCustomEvent=(e,t)=>{if(!Yc)throw new Error("please add custom event after start recording");Vc({type:Yl.Custom,data:{tag:e,payload:t}})},Jc.freezePage=()=>{hc.forEach((e=>e.freeze()))},Jc.takeFullSnapshot=e=>{if(!Yc)throw new Error("please take full snapshot after start recording");Gc(e)},Jc.mirror=$c,(qc=Kc||(Kc={}))[qc.NotStarted=0]="NotStarted",qc[qc.Running=1]="Running",qc[qc.Stopped=2]="Stopped",function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(Xc||(Xc={})),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"}(Hc||(Hc={}));var Qc=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,o,i,a,l,c,h,u,p,d,f,m,g,y,w,v,b,S,C;if("object"!=typeof e)return null;var x=e.code||0,I=this.buildStatus(x);switch(I){case Hc.Success:return{status:I,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(s=e.server_upload_time)&&void 0!==s?s:0}};case Hc.Invalid:return{status:I,statusCode:x,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(i=e.events_with_invalid_fields)&&void 0!==i?i:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(h=e.exceeded_daily_quota_devices)&&void 0!==h?h:{},silencedDevices:null!==(u=e.silenced_devices)&&void 0!==u?u:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(d=e.throttled_devices)&&void 0!==d?d:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case Hc.PayloadTooLarge:return{status:I,statusCode:x,body:{error:null!==(m=e.error)&&void 0!==m?m:""}};case Hc.RateLimit:return{status:I,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(w=e.throttled_devices)&&void 0!==w?w:{},throttledUsers:null!==(v=e.throttled_users)&&void 0!==v?v:{},exceededDailyQuotaDevices:null!==(b=e.exceeded_daily_quota_devices)&&void 0!==b?b:{},exceededDailyQuotaUsers:null!==(S=e.exceeded_daily_quota_users)&&void 0!==S?S:{},throttledEvents:null!==(C=e.throttled_events)&&void 0!==C?C:[]}};case Hc.Timeout:default:return{status:I,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?Hc.Success:429===e?Hc.RateLimit:413===e?Hc.PayloadTooLarge:408===e?Hc.Timeout:e>=400&&e<500?Hc.Invalid:e>=500?Hc.Failed:Hc.Unknown},e}(),eh="Remote config fetch rejected due to timeout after 5 seconds",th="Unexpected error occurred",rh=function(){function e(e){var t=e.localConfig,o=e.configKeys,i=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(e,t,r){return s(i,void 0,void 0,(function(){var s,o,i;return n(this,(function(n){switch(n.label){case 0:return s=Date.now(),[4,this.fetchWithTimeout(r)];case 1:return(o=n.sent())&&(i=o.configs&&o.configs[e])?(this.metrics.fetchTimeAPISuccess=Date.now()-s,[2,i[t]]):(this.metrics.fetchTimeAPIFail=Date.now()-s,[2,void 0])}}))}))},this.fetchWithTimeout=function(e){return s(i,void 0,void 0,(function(){var t,r,s;return n(this,(function(n){switch(n.label){case 0:return t=new AbortController,r=setTimeout((function(){return t.abort()}),5e3),[4,this.fetchRemoteConfig(t.signal,e)];case 1:return s=n.sent(),clearTimeout(r),[2,s]}}))}))},this.fetchRemoteConfig=function(e,t){return s(i,void 0,void 0,(function(){var s,o,i,a,l,c,h,u,p,d,f,m;return n(this,(function(n){switch(n.label){case 0:if(t===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:"Remote config fetch rejected due to exceeded retry count"})];if(e.aborted)return[2,this.completeRequest({err:eh})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0),n.label=1;case 1:n.trys.push([1,3,,4]),s=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.configKeys),i=o.next();!i.done;i=o.next())a=i.value,s.append("config_keys",a)}catch(e){d={error:e}}finally{try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(d)throw d.error}}return t&&s.set("session_id",String(t)),l={headers:{Accept:"*/*"},method:"GET"},c="".concat(this.getServerUrl(),"?").concat(s.toString()),this.attempts+=1,[4,fetch(c,r(r({},l),{signal:e}))];case 2:if(null===(h=n.sent()))return[2,this.completeRequest({err:th})];switch((new Qc).buildStatus(h.status)){case Hc.Success:return this.attempts=0,[2,this.parseAndStoreConfig(h)];case Hc.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:return u=n.sent(),p=u,e.aborted?[2,this.completeRequest({err:eh})]:[2,this.completeRequest({err:null!==(m=p.message)&&void 0!==m?m:th})];case 4:return[2]}}))}))},this.retryFetch=function(e,t){return s(i,void 0,void 0,(function(){var r=this;return n(this,(function(s){switch(s.label){case 0:return[4,new Promise((function(e){return setTimeout(e,r.attempts*r.retryTimeout)}))];case 1:return s.sent(),[2,this.fetchRemoteConfig(e,t)]}}))}))},this.parseAndStoreConfig=function(e){return s(i,void 0,void 0,(function(){var t;return n(this,(function(r){switch(r.label){case 0:return[4,e.json()];case 1:return t=r.sent(),this.completeRequest({success:"Remote config successfully fetched"}),[2,t]}}))}))},this.localConfig=t,this.configKeys=o}return e.prototype.getServerUrl=function(){return this.localConfig.configServerUrl?this.localConfig.configServerUrl:this.localConfig.serverZone===Xc.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===Xc.EU?"https://sr-client-cfg.eu.amplitude.com/config":"https://sr-client-cfg.amplitude.com/config"},e.prototype.completeRequest=function(e){var t=e.err,r=e.success;if(t)throw new Error(t);r&&this.localConfig.loggerProvider.log(r)},e}(),sh=function(e){var t=e.localConfig,r=e.configKeys;return s(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,new rh({localConfig:t,configKeys:r})]}))}))};function nh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oh(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var ih={exports:{}},ah=String,lh=function(){return{isColorSupported:!1,reset:ah,bold:ah,dim:ah,italic:ah,underline:ah,inverse:ah,hidden:ah,strikethrough:ah,black:ah,red:ah,green:ah,yellow:ah,blue:ah,magenta:ah,cyan:ah,white:ah,gray:ah,bgBlack:ah,bgRed:ah,bgGreen:ah,bgYellow:ah,bgBlue:ah,bgMagenta:ah,bgCyan:ah,bgWhite:ah}};ih.exports=lh(),ih.exports.createColors=lh;var ch=ih.exports;const hh=oh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let uh=ch,ph=hh,dh=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=uh.isColorSupported),ph&&e&&(t=ph(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=uh.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var fh=dh;dh.default=dh;var mh={};mh.isClean=Symbol("isClean"),mh.my=Symbol("my");const gh={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let yh=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return gh[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=gh[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var wh=yh;yh.default=yh;let vh=wh;function bh(e,t){new vh(t).stringify(e)}var Sh=bh;bh.default=bh;let{isClean:Ch,my:xh}=mh,Ih=fh,kh=wh,Oh=Sh;function Eh(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>Eh(e,r))):("object"===o&&null!==n&&(n=Eh(n)),r[s]=n)}return r}let Ah=class{constructor(e={}){this.raws={},this[Ch]=!1,this[xh]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=Eh(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Ih(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Ch]){this[Ch]=!1;let e=this;for(;e=e.parent;)e[Ch]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new kh).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Oh){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Rh=Ah;Ah.default=Ah;let Mh=Rh,Ph=class extends Mh{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Nh=Ph;Ph.default=Ph;var Th={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:Lh,SourceMapGenerator:Dh}=hh,{existsSync:Fh,readFileSync:_h}=hh,{dirname:Bh,join:Uh}=hh;let jh=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Bh(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Lh(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Bh(e),Fh(e))return this.mapFile=e,_h(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Lh)return Dh.fromSourceMap(t).toString();if(t instanceof Dh)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Uh(Bh(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var zh=jh;jh.default=jh;let{SourceMapConsumer:Wh,SourceMapGenerator:Vh}=hh,{fileURLToPath:Gh,pathToFileURL:Zh}=hh,{isAbsolute:Yh,resolve:$h}=hh,{nanoid:Jh}=Th,Kh=hh,qh=fh,Xh=zh,Hh=Symbol("fromOffsetCache"),Qh=Boolean(Wh&&Vh),eu=Boolean($h&&Yh),tu=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!eu||/^\w+:\/\//.test(t.from)||Yh(t.from)?this.file=t.from:this.file=$h(t.from)),eu&&Qh){let e=new Xh(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 "+Jh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new qh(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new qh(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(Zh&&(n.input.url=Zh(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Hh])r=this[Hh];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Hh]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:$h(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=Yh(a.source)?Zh(a.source):new URL(a.source,this.map.consumer().sourceRoot||Zh(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Gh)throw new Error("file: protocol is not available in this PostCSS build");l.file=Gh(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var ru=tu;tu.default=tu,Kh&&Kh.registerInput&&Kh.registerInput(tu);let{SourceMapConsumer:su,SourceMapGenerator:nu}=hh,{dirname:ou,relative:iu,resolve:au,sep:lu}=hh,{pathToFileURL:cu}=hh,hu=ru,uu=Boolean(su&&nu),pu=Boolean(ou&&au&&iu&&lu);var du=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||ou(e.file);!1===this.mapOpts.sourcesContent?(t=new su(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),pu&&uu&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=nu.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new nu({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 nu({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?ou(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=ou(au(r,this.mapOpts.annotation)));let s=iu(r,e);return this.memoizedPaths.set(e,s),s}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 hu(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(cu){let t=cu(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===lu&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let fu=Rh,mu=class extends fu{constructor(e){super(e),this.type="comment"}};var gu=mu;mu.default=mu;let yu,wu,vu,bu,{isClean:Su,my:Cu}=mh,xu=Nh,Iu=gu,ku=Rh;function Ou(e){return e.map((e=>(e.nodes&&(e.nodes=Ou(e.nodes)),delete e.source,e)))}function Eu(e){if(e[Su]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Eu(t)}let Au=class e extends ku{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Ou(yu(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new xu(t)]}else if(t.selector)t=[new wu(t)];else if(t.name)t=[new vu(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Iu(t)]}let s=t.map((t=>(t[Cu]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Su]&&Eu(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return s}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};Au.registerParse=e=>{yu=e},Au.registerRule=e=>{wu=e},Au.registerAtRule=e=>{vu=e},Au.registerRoot=e=>{bu=e};var Ru=Au;Au.default=Au,Au.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,vu.prototype):"rule"===e.type?Object.setPrototypeOf(e,wu.prototype):"decl"===e.type?Object.setPrototypeOf(e,xu.prototype):"comment"===e.type?Object.setPrototypeOf(e,Iu.prototype):"root"===e.type&&Object.setPrototypeOf(e,bu.prototype),e[Cu]=!0,e.nodes&&e.nodes.forEach((e=>{Au.rebuild(e)}))};let Mu,Pu,Nu=Ru,Tu=class extends Nu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Mu(new Pu,this,e).stringify()}};Tu.registerLazyResult=e=>{Mu=e},Tu.registerProcessor=e=>{Pu=e};var Lu=Tu;Tu.default=Tu;let Du={};var Fu=function(e){Du[e]||(Du[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let _u=class{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}};var Bu=_u;_u.default=_u;let Uu=Bu,ju=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Uu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var zu=ju;ju.default=ju;const Wu="'".charCodeAt(0),Vu='"'.charCodeAt(0),Gu="\\".charCodeAt(0),Zu="/".charCodeAt(0),Yu="\n".charCodeAt(0),$u=" ".charCodeAt(0),Ju="\f".charCodeAt(0),Ku="\t".charCodeAt(0),qu="\r".charCodeAt(0),Xu="[".charCodeAt(0),Hu="]".charCodeAt(0),Qu="(".charCodeAt(0),ep=")".charCodeAt(0),tp="{".charCodeAt(0),rp="}".charCodeAt(0),sp=";".charCodeAt(0),np="*".charCodeAt(0),op=":".charCodeAt(0),ip="@".charCodeAt(0),ap=/[\t\n\f\r "#'()/;[\\\]{}]/g,lp=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cp=/.[\r\n"'(/\\]/,hp=/[\da-f]/i;let up=Ru,pp=class extends up{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)}};var dp=pp;pp.default=pp,up.registerAtRule(pp);let fp,mp,gp=Ru,yp=class extends gp{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new fp(new mp,this,e).stringify()}};yp.registerLazyResult=e=>{fp=e},yp.registerProcessor=e=>{mp=e};var wp=yp;yp.default=yp,gp.registerRoot(yp);let vp={comma:e=>vp.split(e,[","],!0),space:e=>vp.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var bp=vp;vp.default=vp;let Sp=Ru,Cp=bp,xp=class extends Sp{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Cp.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ip=xp;xp.default=xp,Sp.registerRule(xp);let kp=Nh,Op=function(e,t={}){let r,s,n,o,i,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case Yu:case $u:case Ku:case qu:case Ju:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===$u||r===Yu||r===Ku||r===qu||r===Ju);u=["space",p.slice(m,s)],m=s-1;break;case Xu:case Hu:case tp:case rp:case op:case sp:case ep:{let e=String.fromCharCode(r);u=[e,e,m];break}case Qu:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Wu&&h!==Vu&&h!==$u&&h!==Yu&&h!==Ku&&h!==Ju&&h!==qu){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===Gu;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||cp.test(o)?u=["(","(",m]:(u=["brackets",o,m,s],m=s);break;case Wu:case Vu:n=r===Wu?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===Gu;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case ip:ap.lastIndex=m+1,ap.test(p),s=0===ap.lastIndex?p.length-1:ap.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case Gu:for(s=m,i=!0;p.charCodeAt(s+1)===Gu;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==Zu&&r!==$u&&r!==Yu&&r!==Ku&&r!==qu&&r!==Ju&&(s+=1,hp.test(p.charAt(s)))){for(;hp.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===$u&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Zu&&p.charCodeAt(m+1)===np?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(lp.lastIndex=m+1,lp.test(p),s=0===lp.lastIndex?p.length-1:lp.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},Ep=gu,Ap=dp,Rp=wp,Mp=Ip;const Pp={empty:!0,space:!0};var Np=class{constructor(e){this.input=e,this.root=new Rp,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,r,s,n=new Ap;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Ep;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=Op(this.input)}decl(e,t){let r=new kp;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}let a=e.some((e=>"space"!==e[0]&&"comment"!==e[0]));a&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Mp;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",Pp[a]||Pp[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Mp;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let Tp=Ru,Lp=Np,Dp=ru;function Fp(e,t){let r=new Dp(e,t),s=new Lp(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var _p=Fp;Fp.default=Fp,Tp.registerParse(Fp);let{isClean:Bp,my:Up}=mh,jp=du,zp=Sh,Wp=Ru,Vp=Lu,Gp=Fu,Zp=zu,Yp=_p,$p=wp;const Jp={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Kp={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},qp={Once:!0,postcssPlugin:!0,prepare:!0};function Xp(e){return"object"==typeof e&&"function"==typeof e.then}function Hp(e){let t=!1,r=Jp[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Qp(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Hp(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function ed(e){return e[Bp]=!1,e.nodes&&e.nodes.forEach((e=>ed(e))),e}let td={},rd=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Zp)n=ed(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Yp;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Up]&&Wp.rebuild(n)}else n=ed(r);this.result=new Zp(t,n,s),this.helpers={...td,postcss:td,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Kp[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qp[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(Xp(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Bp];){e[Bp]=!0;let t=[Qp(e)];for(;t.length>0;){let e=this.visitTick(t);if(Xp(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Xp(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=zp;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new jp(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(Xp(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Bp];)e[Bp]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Gp("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Xp(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Bp])return s[Bp]=!0,void e.push(Qp(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Bp]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Bp]=!0;let t=Hp(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Bp]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};rd.registerPostcss=e=>{td=e};var sd=rd;rd.default=rd,$p.registerLazyResult(rd),Vp.registerLazyResult(rd);let nd=du,od=Sh,id=Fu,ad=_p;const ld=zu;let cd=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=od;this.result=new ld(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new nd(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||id("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=ad;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"}};var hd=cd;cd.default=cd;let ud=hd,pd=sd,dd=Lu,fd=wp,md=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new pd(this,e,t):new ud(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var gd=md;md.default=md,fd.registerProcessor(md),dd.registerProcessor(md);let yd=Nh,wd=zh,vd=gu,bd=dp,Sd=ru,Cd=wp,xd=Ip;function Id(e,t){if(Array.isArray(e))return e.map((e=>Id(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Sd.prototype};r.map&&(r.map={...r.map,__proto__:wd.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Id(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Cd(s);if("decl"===s.type)return new yd(s);if("rule"===s.type)return new xd(s);if("comment"===s.type)return new vd(s);if("atrule"===s.type)return new bd(s);throw new Error("Unknown node type: "+e.type)}var kd=Id;Id.default=Id;let Od=fh,Ed=Nh,Ad=sd,Rd=Ru,Md=gd,Pd=Sh,Nd=kd,Td=Lu,Ld=Bu,Dd=gu,Fd=dp,_d=zu,Bd=ru,Ud=_p,jd=bp,zd=Ip,Wd=wp,Vd=Rh;function Gd(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Md(e)}Gd.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Md).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Gd([n(r)]).process(e,t)},n},Gd.stringify=Pd,Gd.parse=Ud,Gd.fromJSON=Nd,Gd.list=jd,Gd.comment=e=>new Dd(e),Gd.atRule=e=>new Fd(e),Gd.decl=e=>new Ed(e),Gd.rule=e=>new zd(e),Gd.root=e=>new Wd(e),Gd.document=e=>new Td(e),Gd.CssSyntaxError=Od,Gd.Declaration=Ed,Gd.Container=Rd,Gd.Processor=Md,Gd.Document=Td,Gd.Comment=Dd,Gd.Warning=Ld,Gd.AtRule=Fd,Gd.Result=_d,Gd.Input=Bd,Gd.Rule=zd,Gd.Root=Wd,Gd.Node=Vd,Ad.registerPostcss(Gd);var Zd=Gd;Gd.default=Gd;const Yd=nh(Zd);Yd.stringify,Yd.fromJSON,Yd.plugin,Yd.parse,Yd.list,Yd.document,Yd.comment,Yd.atRule,Yd.rule,Yd.decl,Yd.root,Yd.CssSyntaxError,Yd.Declaration,Yd.Container,Yd.Processor,Yd.Document,Yd.Comment,Yd.Warning,Yd.AtRule,Yd.Result,Yd.Input,Yd.Rule,Yd.Root,Yd.Node;const $d="medium",Jd="[Amplitude]",Kd=`${Jd} Session Replay ID`,qd=I.US,Xd=`${Jd} Session Replay Debug`,Hd="amp-mask";var Qd;!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata"}(Qd||(Qd={}));const ef=(e,t,r)=>{switch(t){case"light":{if("input"!==e)return!0;const t=r?function(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(r):"";return!!t&&(!!["password","hidden","email","tel"].includes(t)||!!r.autocomplete.startsWith("cc-"))}case"medium":case"conservative":return!0;default:return ef(e,$d,r)}},tf=(e,t)=>(r,s)=>((e,t={defaultMaskLevel:$d},r)=>{var s,n,o;if(r){if(r.closest("."+Hd))return!0;const e=(null!==(s=t.maskSelector)&&void 0!==s?s:[]).some((e=>r.closest(e)));if(e)return!0;if(r.closest(".amp-unmask"))return!1;const o=(null!==(n=t.unmaskSelector)&&void 0!==n?n:[]).some((e=>r.closest(e)));if(o)return!1}return ef(e,null!==(o=t.defaultMaskLevel)&&void 0!==o?o:$d,r)})(e,t,s)?r.replace(/[^\s]/g,"*"):r,rf=function(e){let t=0;if(0===e.length)return t;for(let r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t},sf=(e,t)=>t||(e===I.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===I.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track"),nf=()=>s(void 0,void 0,void 0,(function*(){try{const e=c();if(e){const{usage:t,quota:r,usageDetails:s}=yield e.navigator.storage.estimate(),n=t?Math.round(t/1024):0;return{totalStorageSize:n,percentOfQuota:t&&r?Math.round(1e3*(t/r+Number.EPSILON))/1e3:0,usageDetails:JSON.stringify(s)}}}catch(e){}return{totalStorageSize:0,percentOfQuota:0,usageDetails:""}})),of=e=>{const t=Object.assign({},e),{apiKey:r}=t;return t.apiKey=`****${r.substring(r.length-4)}`,t};class af{constructor(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}getSafeMethod(e){var t;if(!this.logger)return()=>{};const r=this.logger[e];if("function"==typeof r){return(null!==(t=r.__rrweb_original__)&&void 0!==t?t:r).bind(this.logger)}return()=>{}}enable(e){this.logger.enable(e)}disable(){this.logger.disable()}}class lf extends f{constructor(e,t){var r;const s={flushMaxRetries:2,logLevel:l.Warn,loggerProvider:new p,transportProvider:new R};super(Object.assign(Object.assign({transportProvider:s.transportProvider,loggerProvider:new af(t.loggerProvider||s.loggerProvider)},t),{apiKey:e})),this.flushMaxRetries=void 0!==t.flushMaxRetries&&t.flushMaxRetries<=s.flushMaxRetries?t.flushMaxRetries:s.flushMaxRetries,this.apiKey=e,this.sampleRate=t.sampleRate||0,this.serverZone=t.serverZone||qd,this.configServerUrl=t.configServerUrl,this.trackServerUrl=t.trackServerUrl,this.shouldInlineStylesheet=t.shouldInlineStylesheet,this.version=t.version,this.performanceConfig=t.performanceConfig,this.storeType=null!==(r=t.storeType)&&void 0!==r?r:"idb",t.privacyConfig&&(this.privacyConfig=t.privacyConfig),t.debugMode&&(this.debugMode=t.debugMode),t.experimental&&(this.experimental=t.experimental)}}class cf{constructor(e,t){this.localConfig=t,this.remoteConfigFetch=e}generateJoinedConfig(e){var t,r,n;return s(this,void 0,void 0,(function*(){const s=Object.assign({},this.localConfig);let o;s.optOut=this.localConfig.optOut,s.captureEnabled=!0;try{const t=yield this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_sampling_config",e),r=yield this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_privacy_config",e);s.interactionConfig=yield this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_interaction_config",e),s.loggingConfig=yield this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_logging_config",e),(t||r)&&(o={},t&&(o.sr_sampling_config=t),r&&(o.sr_privacy_config=r))}catch(e){const t=e;this.localConfig.loggerProvider.warn(t.message),s.captureEnabled=!1}if(!o)return{localConfig:this.localConfig,joinedConfig:s,remoteConfig:o};const{sr_sampling_config:i,sr_privacy_config:a}=o;if(i&&Object.keys(i).length>0?(Object.prototype.hasOwnProperty.call(i,"capture_enabled")?s.captureEnabled=i.capture_enabled:s.captureEnabled=!1,Object.prototype.hasOwnProperty.call(i,"sample_rate")&&(s.sampleRate=i.sample_rate)):(s.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),a){const e=null!==(t=s.privacyConfig)&&void 0!==t?t:{},o={defaultMaskLevel:null!==(n=null!==(r=a.defaultMaskLevel)&&void 0!==r?r:e.defaultMaskLevel)&&void 0!==n?n:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},i=e=>{var t,r,s;const n={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);for(const r of null!==(t=e.blockSelector)&&void 0!==t?t:[])n[r]="block";for(const t of null!==(r=e.maskSelector)&&void 0!==r?r:[])n[t]="mask";for(const t of null!==(s=e.unmaskSelector)&&void 0!==s?s:[])n[t]="unmask";return n},l=Object.assign(Object.assign({},i(e)),i(a));for(const[e,t]of Object.entries(l))"mask"===t?o.maskSelector.push(e):"block"===t?o.blockSelector.push(e):"unmask"===t&&o.unmaskSelector.push(e);s.privacyConfig=((e,t)=>{const r=document.createDocumentFragment(),s=(e=[])=>{if("string"==typeof e&&(e=[e]),e=e.filter((e=>{try{r.querySelector(e)}catch(r){return t.warn(`[session-replay-browser] omitting selector "${e}" because it is invalid`),!1}return!0})),0!==e.length)return e};return e.blockSelector=s(e.blockSelector),e.maskSelector=s(e.maskSelector),e.unmaskSelector=s(e.unmaskSelector),e})(o,this.localConfig.loggerProvider)}return this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:of(s)},null,2)),{localConfig:this.localConfig,joinedConfig:s,remoteConfig:o}}))}}const hf="Failed to store session replay events in IndexedDB",uf="1.22.7-networktrackingprereleasemay.0";class pf{constructor({trackServerUrl:e,loggerProvider:t,payloadBatcher:r}){this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=t,this.payloadBatcher=r||(e=>e),this.trackServerUrl=e}sendEventsList(e){this.addToQueue(Object.assign(Object.assign({},e),{attempts:0,timeout:0}))}addToQueue(...e){e.filter((e=>e.attempts<(e.flushMaxRetries||0)?(e.attempts+=1,!0):(this.completeRequest({context:e,err:"Session replay event batch rejected due to exceeded retry count"}),!1))).forEach((e=>{this.queue=this.queue.concat(e),0!==e.timeout?setTimeout((()=>{e.timeout=0,this.schedule(0)}),e.timeout):this.schedule(0)}))}schedule(e){this.scheduled||(this.scheduled=setTimeout((()=>{this.flush(!0).then((()=>{this.queue.length>0&&this.schedule(e)}))}),e))}flush(e=!1){return s(this,void 0,void 0,(function*(){const t=[],r=[];this.queue.forEach((e=>0===e.timeout?t.push(e):r.push(e))),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),yield Promise.all(t.map((t=>this.send(t,e))))}))}send(e,t=!0){var r,n;return s(this,void 0,void 0,(function*(){const s=e.apiKey;if(!s)return this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"});const o=e.deviceId;if(!o)return this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"});const i=(()=>{const e=c();return(null==e?void 0:e.location)?e.location.href:""})(),a=uf,l=e.sampleRate,h=new URLSearchParams({device_id:o,session_id:`${e.sessionId}`,type:`${e.type}`}),u=`${(null===(r=e.version)||void 0===r?void 0:r.type)||"standalone"}/${(null===(n=e.version)||void 0===n?void 0:n.version)||a}`,p=this.payloadBatcher({version:1,events:e.events});if(0!==p.events.length)try{const r={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:`Bearer ${s}`,"X-Client-Version":a,"X-Client-Library":u,"X-Client-Url":i.substring(0,1e3),"X-Client-Sample-Rate":`${l}`},body:JSON.stringify(p),method:"POST"},n=`${sf(e.serverZone,this.trackServerUrl)}?${h.toString()}`,o=yield fetch(n,r);if(null===o)return void this.completeRequest({context:e,err:"Unexpected error occurred"});if(t)this.handleReponse(o.status,e);else{let t="";try{t=JSON.stringify(o.body,null,2)}catch(e){}this.completeRequest({context:e,success:`${o.status}: ${t}`})}}catch(t){this.completeRequest({context:e,err:t})}else this.completeRequest({context:e})}))}handleReponse(e,t){switch((new A).buildStatus(e)){case o.Success:this.handleSuccessResponse(t);break;case o.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}}handleSuccessResponse(e){const t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:`Session replay event batch tracked successfully for session id ${e.sessionId}, size of events: ${t} KB`})}handleOtherResponse(e){this.addToQueue(Object.assign(Object.assign({},e),{timeout:e.attempts*this.retryTimeout}))}completeRequest({context:e,err:t,success:r}){e.onComplete(),t?this.loggerProvider.warn(t):r&&this.loggerProvider.log(r)}}const df=(e,t)=>t.some((t=>e instanceof t));let ff,mf;const gf=new WeakMap,yf=new WeakMap,wf=new WeakMap;let vf={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return gf.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return xf(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function bf(e){vf=e(vf)}function Sf(e){return(mf||(mf=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(If(this),t),xf(this.request)}:function(...t){return xf(e.apply(If(this),t))}}function Cf(e){return"function"==typeof e?Sf(e):(e instanceof IDBTransaction&&function(e){if(gf.has(e))return;const t=new Promise(((t,r)=>{const s=()=>{e.removeEventListener("complete",n),e.removeEventListener("error",o),e.removeEventListener("abort",o)},n=()=>{t(),s()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",n),e.addEventListener("error",o),e.addEventListener("abort",o)}));gf.set(e,t)}(e),df(e,ff||(ff=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,vf):e)}function xf(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const s=()=>{e.removeEventListener("success",n),e.removeEventListener("error",o)},n=()=>{t(xf(e.result)),s()},o=()=>{r(e.error),s()};e.addEventListener("success",n),e.addEventListener("error",o)}));return wf.set(t,e),t}(e);if(yf.has(e))return yf.get(e);const t=Cf(e);return t!==e&&(yf.set(e,t),wf.set(t,e)),t}const If=e=>wf.get(e);const kf=["get","getKey","getAll","getAllKeys","count"],Of=["put","add","delete","clear"],Ef=new Map;function Af(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Ef.get(t))return Ef.get(t);const r=t.replace(/FromIndex$/,""),s=t!==r,n=Of.includes(r);if(!(r in(s?IDBIndex:IDBObjectStore).prototype)||!n&&!kf.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,n?"readwrite":"readonly");let i=o.store;return s&&(i=i.index(t.shift())),(await Promise.all([i[r](...t),n&&o.done]))[0]};return Ef.set(t,o),o}bf((e=>({...e,get:(t,r,s)=>Af(t,r)||e.get(t,r,s),has:(t,r)=>!!Af(t,r)||e.has(t,r)})));const Rf=["continue","continuePrimaryKey","advance"],Mf={},Pf=new WeakMap,Nf=new WeakMap,Tf={get(e,t){if(!Rf.includes(t))return e[t];let r=Mf[t];return r||(r=Mf[t]=function(...e){Pf.set(this,Nf.get(this)[t](...e))}),r}};async function*Lf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,Tf);for(Nf.set(r,t),wf.set(r,If(t));t;)yield r,t=await(Pf.get(r)||t.continue()),Pf.delete(r)}function Df(e,t){return t===Symbol.asyncIterator&&df(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&df(e,[IDBIndex,IDBObjectStore])}bf((e=>({...e,get:(t,r,s)=>Df(t,r)?Lf:e.get(t,r,s),has:(t,r)=>Df(t,r)||e.has(t,r)})));class Ff{get timeAtLastSplit(){return this._timeAtLastSplit}constructor(e){var t,r,s;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=(e,t)=>{const r=new Blob([t]).size;return new Blob(e).size+r>=this.maxPersistedEventsSize||!!(Date.now()-this.timeAtLastSplit>this.interval&&e.length)&&(this.interval=Math.min(this.maxInterval,this.interval+this.minInterval),this._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!==(t=e.minInterval)&&void 0!==t?t:this.minInterval,this.maxInterval=null!==(r=e.maxInterval)&&void 0!==r?r:this.maxInterval,this.maxPersistedEventsSize=null!==(s=e.maxPersistedEventsSize)&&void 0!==s?s:this.maxPersistedEventsSize}}var _f;!function(e){e.RECORDING="recording",e.SENT="sent"}(_f||(_f={}));const Bf="sessionCurrentSequence",Uf="sequencesToSend",jf=e=>s(void 0,void 0,void 0,(function*(){for(;e.length>0;){const t=10,r=e.splice(0,t);yield Promise.all(r)}})),zf=e=>{let t,r;return e.objectStoreNames.contains(Bf)||(r=e.createObjectStore(Bf,{keyPath:"sessionId"})),e.objectStoreNames.contains(Uf)||(t=e.createObjectStore(Uf,{keyPath:"sequenceId",autoIncrement:!0}),t.createIndex("sessionId","sessionId")),{sequencesStore:t,currentSequenceStore:r}},Wf=e=>s(void 0,void 0,void 0,(function*(){return yield function(e,t,{blocked:r,upgrade:s,blocking:n,terminated:o}={}){const i=indexedDB.open(e,t),a=xf(i);return s&&i.addEventListener("upgradeneeded",(e=>{s(xf(i.result),e.oldVersion,e.newVersion,xf(i.transaction),e)})),r&&i.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),n&&e.addEventListener("versionchange",(e=>n(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}(e,1,{upgrade:zf})}));class Vf extends Ff{constructor(e){super(e),this.getSequencesToSend=()=>s(this,void 0,void 0,(function*(){try{const e=[];let t=yield this.db.transaction("sequencesToSend").store.openCursor();for(;t;){const{sessionId:r,events:s}=t.value;e.push({events:s,sequenceId:t.key,sessionId:r}),t=yield t.continue()}return e}catch(e){this.loggerProvider.warn(`${hf}: ${e}`)}})),this.storeCurrentSequence=e=>s(this,void 0,void 0,(function*(){try{const t=yield this.db.get(Bf,e);if(!t)return;const r=yield this.db.put(Uf,{sessionId:e,events:t.events});return yield this.db.put(Bf,{sessionId:e,events:[]}),Object.assign(Object.assign({},t),{sessionId:e,sequenceId:r})}catch(e){this.loggerProvider.warn(`${hf}: ${e}`)}})),this.addEventToCurrentSequence=(e,t)=>s(this,void 0,void 0,(function*(){try{const r=this.db.transaction(Bf,"readwrite"),s=yield r.store.get(e);if(!s)return void(yield r.store.put({sessionId:e,events:[t]}));let n;if(this.shouldSplitEventsList(s.events,t))n=s.events,yield r.store.put({sessionId:e,events:[t]});else{const n=s.events.concat(t);yield r.store.put({sessionId:e,events:n})}if(yield r.done,!n)return;const o=yield this.storeSendingEvents(e,n);if(!o)return;return{events:n,sessionId:e,sequenceId:o}}catch(e){this.loggerProvider.warn(`${hf}: ${e}`)}})),this.storeSendingEvents=(e,t)=>s(this,void 0,void 0,(function*(){try{return yield this.db.put(Uf,{sessionId:e,events:t})}catch(e){this.loggerProvider.warn(`${hf}: ${e}`)}})),this.cleanUpSessionEventsStore=(e,t)=>s(this,void 0,void 0,(function*(){if(t)try{yield this.db.delete(Uf,t)}catch(e){this.loggerProvider.warn(`${hf}: ${e}`)}})),this.transitionFromKeyValStore=e=>s(this,void 0,void 0,(function*(){try{const t=yield function(){const e=c();return new Promise(((t,r)=>{if(!e)return r(new Error("Global scope not found"));if(!e.indexedDB)return r(new Error("Session Replay: cannot find indexedDB"));try{const r=e.indexedDB.open("keyval-store");r.onupgradeneeded=function(){1===r.result.version&&(r.result.close(),r.transaction&&r.transaction.abort(),e.indexedDB.deleteDatabase("keyval-store"),t())},r.onsuccess=function(){t(r.result)}}catch(e){r(e)}}))}();if(!t)return;const r=(e,t)=>s(this,void 0,void 0,(function*(){const r=t.sessionSequences,n=[];Object.keys(r).forEach((o=>{const i=parseInt(o,10),a=r[i];if(i===t.currentSequenceId){const t=a.events.map((t=>s(this,void 0,void 0,(function*(){return this.addEventToCurrentSequence(e,t)}))));n.concat(t)}else a.status!==_f.SENT&&n.push(this.storeSendingEvents(e,a.events))})),yield jf(n)})),n=`${i}_${this.apiKey.substring(0,10)}`;try{const o=t.transaction("keyval").objectStore("keyval").getAll(n),i=new Promise((t=>{o.onsuccess=n=>s(this,void 0,void 0,(function*(){const s=n&&n.target.result,o=s&&s[0];if(o){const t=[];Object.keys(o).forEach((s=>{const n=parseInt(s,10),i=o[n];if(e===n)t.push(r(n,i));else{const e=i.sessionSequences;Object.keys(e).forEach((r=>{const s=parseInt(r,10);e[s].status!==_f.SENT&&t.push(this.storeSendingEvents(n,e[s].events))}))}})),yield jf(t)}t()}))}));yield i;const a=c();a&&a.indexedDB.deleteDatabase("keyval-store")}catch(e){this.loggerProvider.warn(`Failed to transition session replay events from keyval to new store: ${e}`)}}catch(e){this.loggerProvider.warn(`Failed to access keyval store: ${e}. For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices`)}})),this.apiKey=e.apiKey,this.db=e.db}static new(e,t,r){return s(this,void 0,void 0,(function*(){try{const s="replay"===e?"":`_${e}`,n=`${t.apiKey.substring(0,10)}_amp_session_replay_events${s}`,o=yield Wf(n),i=new Vf(Object.assign(Object.assign({},t),{db:o}));return yield i.transitionFromKeyValStore(r),i}catch(e){t.loggerProvider.warn(`${hf}: ${e}`)}}))}getCurrentSequenceEvents(e){return s(this,void 0,void 0,(function*(){if(e){const t=yield this.db.get("sessionCurrentSequence",e);if(!t)return;return[t]}const t=[];for(const e of yield this.db.getAll("sessionCurrentSequence"))t.push(e);return t}))}}class Gf extends Ff{constructor(){super(...arguments),this.finalizedSequences={},this.sequences={},this.sequenceId=0}resetCurrentSequence(e){this.sequences[e]=[]}addSequence(e){const t=this.sequenceId++,r=[...this.sequences[e]];return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}}getSequencesToSend(){return s(this,void 0,void 0,(function*(){return Object.entries(this.finalizedSequences).map((([e,{sessionId:t,events:r}])=>({sequenceId:Number(e),sessionId:t,events:r})))}))}storeCurrentSequence(e){return s(this,void 0,void 0,(function*(){if(this.sequences[e])return this.addSequence(e)}))}addEventToCurrentSequence(e,t){return s(this,void 0,void 0,(function*(){let r;return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),r}))}storeSendingEvents(e,t){return s(this,void 0,void 0,(function*(){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},this.sequenceId++}))}cleanUpSessionEventsStore(e,t){return s(this,void 0,void 0,(function*(){void 0!==t&&delete this.finalizedSequences[t]}))}}const Zf=({config:e,sessionId:t,minInterval:r,maxInterval:n,type:o,payloadBatcher:i,storeType:a})=>s(void 0,void 0,void 0,(function*(){const l=new pf(Object.assign(Object.assign({},e),{loggerProvider:e.loggerProvider,payloadBatcher:i})),c=()=>new Gf({loggerProvider:e.loggerProvider,maxInterval:n,minInterval:r}),h="idb"===a?yield s(void 0,void 0,void 0,(function*(){const s=yield Vf.new(o,{loggerProvider:e.loggerProvider,minInterval:r,maxInterval:n,apiKey:e.apiKey},t);return e.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),null!=s?s:c()})):c(),u=({events:t,sessionId:r,deviceId:n,sequenceId:i})=>{e.debugMode&&nf().then((({totalStorageSize:t,percentOfQuota:r,usageDetails:s})=>{e.loggerProvider.debug(`Total storage size: ${t} KB, percentage of quota: ${r}%, usage details: ${s}`)})).catch((()=>{})),l.sendEventsList({events:t,sessionId:r,flushMaxRetries:e.flushMaxRetries,apiKey:e.apiKey,deviceId:n,sampleRate:e.sampleRate,serverZone:e.serverZone,version:e.version,type:o,onComplete:()=>s(void 0,void 0,void 0,(function*(){yield h.cleanUpSessionEventsStore(r,i)}))})};return{sendCurrentSequenceEvents:({sessionId:t,deviceId:r})=>{h.storeCurrentSequence(t).then((e=>{e&&u({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})})).catch((t=>{e.loggerProvider.warn("Failed to get current sequence of session replay events for session:",t)}))},addEvent:({event:t,sessionId:r,deviceId:s})=>{h.addEventToCurrentSequence(r,t.data).then((e=>e&&u({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:s}))).catch((t=>{e.loggerProvider.warn("Failed to add event to session replay capture:",t)}))},sendStoredEvents:({deviceId:e})=>s(void 0,void 0,void 0,(function*(){const t=yield h.getSequencesToSend();t&&t.forEach((t=>{u({sequenceId:t.sequenceId,events:t.events,sessionId:t.sessionId,deviceId:e})}))})),flush:function(e=!1){return s(this,void 0,void 0,(function*(){return l.flush(e)}))}}}));class Yf{constructor(...e){const t=new Map;e.forEach((e=>{t.set(e.name,e.manager)})),this.managers=t}sendStoredEvents(e){return s(this,void 0,void 0,(function*(){const t=[];this.managers.forEach((r=>{t.push(r.sendStoredEvents(e))})),yield Promise.all(t)}))}addEvent({sessionId:e,event:t,deviceId:r}){var s;null===(s=this.managers.get(t.type))||void 0===s||s.addEvent({sessionId:e,event:t,deviceId:r})}sendCurrentSequenceEvents({sessionId:e,deviceId:t}){this.managers.forEach((r=>{r.sendCurrentSequenceEvents({sessionId:e,deviceId:t})}))}flush(e){return s(this,void 0,void 0,(function*(){const t=[];this.managers.forEach((r=>{t.push(r.flush(e))})),yield Promise.all(t)}))}}var $f=(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))($f||{});let Jf,Kf,qf;function Xf(e,t){if(qf=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";const r={root:document.body,idName:e=>!0,className:e=>!0,tagName:e=>!0,attr:(e,t)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};Jf=Object.assign(Object.assign({},r),t),Kf=function(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return e;if(e===t.root)return e.ownerDocument;return e}(Jf.root,r);let s=Hf(e,"all",(()=>Hf(e,"two",(()=>Hf(e,"one",(()=>Hf(e,"none")))))));if(s){const t=dm(fm(s,e));return t.length>0&&(s=t[0]),em(s)}throw new Error("Selector was not found.")}function Hf(e,t,r){let s=null,n=[],o=e,i=0;for(;o;){const e=(new Date).getTime()-qf.getTime();if(void 0!==Jf.timeoutMs&&e>Jf.timeoutMs)throw new Error(`Timeout: Can't find a unique selector after ${e}ms`);let a=hm(sm(o))||hm(...nm(o))||hm(...om(o))||hm(im(o))||[{name:"*",penalty:3}];const l=am(o);if("all"==t)l&&(a=a.concat(a.filter(cm).map((e=>lm(e,l)))));else if("two"==t)a=a.slice(0,1),l&&(a=a.concat(a.filter(cm).map((e=>lm(e,l)))));else if("one"==t){const[e]=a=a.slice(0,1);l&&cm(e)&&(a=[lm(e,l)])}else"none"==t&&(a=[{name:"*",penalty:3}],l&&(a=[lm(a[0],l)]));for(let e of a)e.level=i;if(n.push(a),n.length>=Jf.seedMinLength&&(s=Qf(n,r),s))break;o=o.parentElement,i++}return s||(s=Qf(n,r)),!s&&r?r():s}function Qf(e,t){const r=dm(pm(e));if(r.length>Jf.threshold)return t?t():null;for(let e of r)if(rm(e))return e;return null}function em(e){let t=e[0],r=t.name;for(let s=1;s<e.length;s++){const n=e[s].level||0;r=t.level===n-1?`${e[s].name} > ${r}`:`${e[s].name} ${r}`,t=e[s]}return r}function tm(e){return e.map((e=>e.penalty)).reduce(((e,t)=>e+t),0)}function rm(e){const t=em(e);switch(Kf.querySelectorAll(t).length){case 0:throw new Error(`Can't select any node with this selector: ${t}`);case 1:return!0;default:return!1}}function sm(e){const t=e.getAttribute("id");return t&&Jf.idName(t)?{name:"#"+CSS.escape(t),penalty:0}:null}function nm(e){const t=Array.from(e.attributes).filter((e=>Jf.attr(e.name,e.value)));return t.map((e=>({name:`[${CSS.escape(e.name)}="${CSS.escape(e.value)}"]`,penalty:.5})))}function om(e){return Array.from(e.classList).filter(Jf.className).map((e=>({name:"."+CSS.escape(e),penalty:1})))}function im(e){const t=e.tagName.toLowerCase();return Jf.tagName(t)?{name:t,penalty:2}:null}function am(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let s=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&s++,r!==e);)r=r.nextSibling;return s}function lm(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function cm(e){return"html"!==e.name&&!e.name.startsWith("#")}function hm(...e){const t=e.filter(um);return t.length>0?t:null}function um(e){return null!=e}function*pm(e,t=[]){if(e.length>0)for(let r of e[0])yield*pm(e.slice(1,e.length),t.concat(r));else yield t}function dm(e){return[...e].sort(((e,t)=>tm(e)-tm(t)))}function*fm(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>Jf.optimizedMinLength)for(let s=1;s<e.length-1;s++){if(r.counter>Jf.maxNumberOfTries)return;r.counter+=1;const n=[...e];n.splice(s,1);const o=em(n);if(r.visited.has(o))return;rm(n)&&mm(n,t)&&(yield n,r.visited.set(o,!0),yield*fm(n,t,r))}}function mm(e,t){return Kf.querySelector(em(e))===t}const gm=({version:e,events:t})=>{const r=[];return t.forEach((e=>{const t=JSON.parse(e);t.count=1,"click"===t.type&&r.push(t)})),{version:e,events:r}},ym=({version:e,events:t})=>{const r=[];t.forEach((e=>{const t=JSON.parse(e);"click"===t.type&&r.push(t)}));const s=r.reduce(((e,t)=>{const{x:r,y:s,selector:n,timestamp:o}=t,i=o-o%36e5,a=`${r}:${s}:${null!=n?n:""}:${i}`;return e[a]?e[a].count+=1:e[a]=Object.assign(Object.assign({},t),{timestamp:i,count:1}),e}),{});return{version:e,events:Object.values(s)}},wm=(e,{eventsManager:t,sessionId:r,deviceIdFn:s})=>n=>{if(n.type!==$f.Click)return;const o=c();if(!o)return;const{location:i,innerHeight:a,innerWidth:l}=o;if(!i)return;const{x:h,y:u}=n;if(void 0===h||void 0===u)return;const p=Jc.mirror.getNode(n.id);let d;if(p)try{d=Xf(p)}catch(t){e.debug("error resolving selector from finder")}const{left:f,top:m}=Zl.getWindowScroll(o),g={x:h+f,y:u+m,selector:d,viewportHeight:a,viewportWidth:l,pageUrl:i.href,timestamp:Date.now(),type:"click"},y=s();y&&t.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(g)},deviceId:y})};class vm{constructor(e,t){const r=c();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=(e,t)=>{try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=()=>!1,this.sendXhr=(e,t)=>{const r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=sf(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}send(e,t){const{sessionId:r,type:s}=this.context,n=new URLSearchParams({device_id:e,session_id:String(r),type:String(s),api_key:this.apiKey}),o=`${this.basePageUrl}?${n.toString()}`;this.sendBeacon(o,t)||this.sendXhr(o,t)}}const{getWindowHeight:bm,getWindowWidth:Sm}=Zl;class Cm{static default(e,t){return new Cm(new vm(e,t))}constructor(e){this.timestamp=Date.now(),this.hook=e=>{this.update(e)},this.send=e=>t=>{const r=e(),s=c();s&&r&&this.transport.send(r,{version:1,events:[{maxScrollX:this._maxScrollX,maxScrollY:this._maxScrollY,maxScrollWidth:this._maxScrollWidth,maxScrollHeight:this._maxScrollHeight,viewportHeight:bm(),viewportWidth:Sm(),pageUrl:s.location.href,timestamp:this.timestamp,type:"scroll"}]})},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=Sm(),this._maxScrollHeight=bm(),this.transport=e}get maxScrollX(){return this._maxScrollX}get maxScrollY(){return this._maxScrollY}get maxScrollWidth(){return this._maxScrollWidth}get maxScrollHeight(){return this._maxScrollHeight}update(e){const t=Date.now();if(e.x>this._maxScrollX){const r=Sm();this._maxScrollX=e.x;const s=e.x+r;s>this._maxScrollWidth&&(this._maxScrollWidth=s),this.timestamp=t}if(e.y>this._maxScrollY){const r=bm();this._maxScrollY=e.y;const s=e.y+r;s>this._maxScrollHeight&&(this._maxScrollHeight=s),this.timestamp=t}}}class xm{constructor({sessionId:e,deviceId:t}){this.deviceId=t,this.sessionId=e,e&&t&&(this.sessionReplayId=((e,t)=>`${t}/${e}`)(e,t))}}var Im=Uint8Array,km=Uint16Array,Om=Uint32Array,Em=new Im([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]),Am=new Im([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]),Rm=new Im([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Mm=function(e,t){for(var r=new km(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];var n=new Om(r[30]);for(s=1;s<30;++s)for(var o=r[s];o<r[s+1];++o)n[o]=o-r[s]<<5|s;return[r,n]},Pm=Mm(Em,2),Nm=Pm[0],Tm=Pm[1];Nm[28]=258,Tm[258]=28;for(var Lm=Mm(Am,0)[1],Dm=new km(32768),Fm=0;Fm<32768;++Fm){var _m=(43690&Fm)>>>1|(21845&Fm)<<1;_m=(61680&(_m=(52428&_m)>>>2|(13107&_m)<<2))>>>4|(3855&_m)<<4,Dm[Fm]=((65280&_m)>>>8|(255&_m)<<8)>>>1}var Bm=function(e,t,r){for(var s=e.length,n=0,o=new km(t);n<s;++n)++o[e[n]-1];var i,a=new km(t);for(n=0;n<t;++n)a[n]=a[n-1]+o[n-1]<<1;if(r){i=new km(1<<t);var l=15-t;for(n=0;n<s;++n)if(e[n])for(var c=n<<4|e[n],h=t-e[n],u=a[e[n]-1]++<<h,p=u|(1<<h)-1;u<=p;++u)i[Dm[u]>>>l]=c}else for(i=new km(s),n=0;n<s;++n)i[n]=Dm[a[e[n]-1]++]>>>15-e[n];return i},Um=new Im(288);for(Fm=0;Fm<144;++Fm)Um[Fm]=8;for(Fm=144;Fm<256;++Fm)Um[Fm]=9;for(Fm=256;Fm<280;++Fm)Um[Fm]=7;for(Fm=280;Fm<288;++Fm)Um[Fm]=8;var jm=new Im(32);for(Fm=0;Fm<32;++Fm)jm[Fm]=5;var zm=Bm(Um,9,0),Wm=Bm(jm,5,0),Vm=function(e){return(e/8|0)+(7&e&&1)},Gm=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var s=new(e instanceof km?km:e instanceof Om?Om:Im)(r-t);return s.set(e.subarray(t,r)),s},Zm=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>>8},Ym=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>>8,e[s+2]|=r>>>16},$m=function(e,t){for(var r=[],s=0;s<e.length;++s)e[s]&&r.push({s:s,f:e[s]});var n=r.length,o=r.slice();if(!n)return[new Im(0),0];if(1==n){var i=new Im(r[0].s+1);return i[r[0].s]=1,[i,1]}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var a=r[0],l=r[1],c=0,h=1,u=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};h!=n-1;)a=r[r[c].f<r[u].f?c++:u++],l=r[c!=h&&r[c].f<r[u].f?c++:u++],r[h++]={s:-1,f:a.f+l.f,l:a,r:l};var p=o[0].s;for(s=1;s<n;++s)o[s].s>p&&(p=o[s].s);var d=new km(p+1),f=Jm(r[h-1],d,0);if(f>t){s=0;var m=0,g=f-t,y=1<<g;for(o.sort((function(e,t){return d[t.s]-d[e.s]||e.f-t.f}));s<n;++s){var w=o[s].s;if(!(d[w]>t))break;m+=y-(1<<f-d[w]),d[w]=t}for(m>>>=g;m>0;){var v=o[s].s;d[v]<t?m-=1<<t-d[v]++-1:++s}for(;s>=0&&m;--s){var b=o[s].s;d[b]==t&&(--d[b],++m)}f=t}return[new Im(d),f]},Jm=function(e,t,r){return-1==e.s?Math.max(Jm(e.l,t,r+1),Jm(e.r,t,r+1)):t[e.s]=r},Km=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new km(++t),s=0,n=e[0],o=1,i=function(e){r[s++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++o;else{if(!n&&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(n),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(n);o=1,n=e[a]}return[r.subarray(0,s),t]},qm=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},Xm=function(e,t,r){var s=r.length,n=Vm(t+2);e[n]=255&s,e[n+1]=s>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var o=0;o<s;++o)e[n+o+4]=r[o];return 8*(n+4+s)},Hm=function(e,t,r,s,n,o,i,a,l,c,h){Zm(t,h++,r),++n[256];for(var u=$m(n,15),p=u[0],d=u[1],f=$m(o,15),m=f[0],g=f[1],y=Km(p),w=y[0],v=y[1],b=Km(m),S=b[0],C=b[1],x=new km(19),I=0;I<w.length;++I)x[31&w[I]]++;for(I=0;I<S.length;++I)x[31&S[I]]++;for(var k=$m(x,7),O=k[0],E=k[1],A=19;A>4&&!O[Rm[A-1]];--A);var R,M,P,N,T=c+5<<3,L=qm(n,Um)+qm(o,jm)+i,D=qm(n,p)+qm(o,m)+i+14+3*A+qm(x,O)+(2*x[16]+3*x[17]+7*x[18]);if(T<=L&&T<=D)return Xm(t,h,e.subarray(l,l+c));if(Zm(t,h,1+(D<L)),h+=2,D<L){R=Bm(p,d,0),M=p,P=Bm(m,g,0),N=m;var F=Bm(O,E,0);Zm(t,h,v-257),Zm(t,h+5,C-1),Zm(t,h+10,A-4),h+=14;for(I=0;I<A;++I)Zm(t,h+3*I,O[Rm[I]]);h+=3*A;for(var _=[w,S],B=0;B<2;++B){var U=_[B];for(I=0;I<U.length;++I){var j=31&U[I];Zm(t,h,F[j]),h+=O[j],j>15&&(Zm(t,h,U[I]>>>5&127),h+=U[I]>>>12)}}}else R=zm,M=Um,P=Wm,N=jm;for(I=0;I<a;++I)if(s[I]>255){j=s[I]>>>18&31;Ym(t,h,R[j+257]),h+=M[j+257],j>7&&(Zm(t,h,s[I]>>>23&31),h+=Em[j]);var z=31&s[I];Ym(t,h,P[z]),h+=N[z],z>3&&(Ym(t,h,s[I]>>>5&8191),h+=Am[z])}else Ym(t,h,R[s[I]]),h+=M[s[I]];return Ym(t,h,R[256]),h+M[256]},Qm=new Om([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),eg=function(e,t,r,s,n){return function(e,t,r,s,n,o){var i=e.length,a=new Im(s+i+5*(1+Math.floor(i/7e3))+n),l=a.subarray(s,a.length-n),c=0;if(!t||i<8)for(var h=0;h<=i;h+=65535){var u=h+65535;u<i?c=Xm(l,c,e.subarray(h,u)):(l[h]=o,c=Xm(l,c,e.subarray(h,i)))}else{for(var p=Qm[t-1],d=p>>>13,f=8191&p,m=(1<<r)-1,g=new km(32768),y=new km(m+1),w=Math.ceil(r/3),v=2*w,b=function(t){return(e[t]^e[t+1]<<w^e[t+2]<<v)&m},S=new Om(25e3),C=new km(288),x=new km(32),I=0,k=0,O=(h=0,0),E=0,A=0;h<i;++h){var R=b(h),M=32767&h,P=y[R];if(g[M]=P,y[R]=M,E<=h){var N=i-h;if((I>7e3||O>24576)&&N>423){c=Hm(e,l,0,S,C,x,k,O,A,h-A,c),O=I=k=0,A=h;for(var T=0;T<286;++T)C[T]=0;for(T=0;T<30;++T)x[T]=0}var L=2,D=0,F=f,_=M-P&32767;if(N>2&&R==b(h-_))for(var B=Math.min(d,N)-1,U=Math.min(32767,h),j=Math.min(258,N);_<=U&&--F&&M!=P;){if(e[h+L]==e[h+L-_]){for(var z=0;z<j&&e[h+z]==e[h+z-_];++z);if(z>L){if(L=z,D=_,z>B)break;var W=Math.min(_,z-2),V=0;for(T=0;T<W;++T){var G=h-_+T+32768&32767,Z=G-g[G]+32768&32767;Z>V&&(V=Z,P=G)}}}_+=(M=P)-(P=g[M])+32768&32767}if(D){S[O++]=268435456|Tm[L]<<18|Lm[D];var Y=31&Tm[L],$=31&Lm[D];k+=Em[Y]+Am[$],++C[257+Y],++x[$],E=h+L,++I}else S[O++]=e[h],++C[e[h]]}}c=Hm(e,l,o,S,C,x,k,O,A,h-A,c)}return Gm(a,0,s+Vm(c)+n)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,s,!n)};function tg(e,t){void 0===t&&(t={});var r=function(){var e=1,t=0;return{p:function(r){for(var s=e,n=t,o=r.length,i=0;i!=o;){for(var a=Math.min(i+5552,o);i<a;++i)n+=s+=r[i];s%=65521,n%=65521}e=s,t=n},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}}();r.p(e);var s,n,o,i=eg(e,t,2,4);return s=i,n=t.level,o=0==n?0:n<6?1:9==n?3:2,s[0]=120,s[1]=o<<6|(o?32-2*o:1),function(e,t,r){for(;r;++t)e[t]=r,r>>>=8}(i,i.length-4,r.d()),i}const rg=e=>{const t={...e,v:"v1"};return function(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var s=0;s<e.length;){var n=e[s++];n<128||t?r+=String.fromCharCode(n):n<224?r+=String.fromCharCode((31&n)<<6|63&e[s++]):n<240?r+=String.fromCharCode((15&n)<<12|(63&e[s++])<<6|63&e[s++]):(n=((15&n)<<18|(63&e[s++])<<12|(63&e[s++])<<6|63&e[s++])-65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n))}return r}(tg(function(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new Im(e.length+(e.length>>>1)),n=0,o=function(e){s[n++]=e},i=0;i<r;++i){if(n+5>s.length){var a=new Im(n+8+(r-i<<1));a.set(s),s=a}var l=e.charCodeAt(i);l<128||t?o(l):l<2048?(o(192|l>>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++i))>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|63&l)):(o(224|l>>>12),o(128|l>>>6&63),o(128|63&l))}return Gm(s,0,n)}(JSON.stringify(t))),!0)};class sg{constructor(e,t,r,s){var n,o,i;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=e=>{const t=rg(e);return JSON.stringify(t)},this.addCompressedEventToManager=(e,t)=>{this.eventsManager&&this.deviceId&&this.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:this.deviceId})},this.addCompressedEvent=(e,t)=>{if(this.worker)this.worker.postMessage({event:e,sessionId:t});else{const r=this.compressEvent(e);this.addCompressedEventToManager(r,t)}},this.terminate=()=>{var e;null===(e=this.worker)||void 0===e||e.terminate()};const a=c();this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null===(n=t.performanceConfig)||void 0===n?void 0:n.timeout)||2e3;const l=null!==(o='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]),o=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]),a=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),o=0;o<31;++o)t[o]=n+=1<<r[o-1];var a=new f(t[30]);for(o=1;o<30;++o)for(var i=t[o];i<t[o+1];++i)a[i]=i-t[o]<<5|o;return[t,a]},v=i(t,2),u=v[0],s=v[1];u[28]=258,s[258]=28;for(var l=i(o,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,o=0,a=new e(n);o<t;++o)++a[r[o]-1];var i,v=new e(n);for(o=0;o<n;++o)v[o]=v[o-1]+a[o-1]<<1;if(f){i=new e(1<<n);var u=15-n;for(o=0;o<t;++o)if(r[o])for(var s=o<<4|r[o],l=n-r[o],h=v[r[o]-1]++<<l,g=h|(1<<l)-1;h<=g;++h)i[c[h]>>>u]=s}else for(i=new e(t),o=0;o<t;++o)i[o]=c[v[r[o]-1]++]>>>15-r[o];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 M=w(d,9,0),y=w(m,5,0),b=function(r){return(r/8|0)+(7&r&&1)},p=function(r,t,o){(null==o||o>r.length)&&(o=r.length);var a=new(r instanceof e?e:r instanceof f?f:n)(o-t);return a.set(r.subarray(t,o)),a},C=function(r,n,e){e<<=7&n;var f=n/8|0;r[f]|=e,r[f+1]|=e>>>8},x=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},S=function(r,f){for(var t=[],o=0;o<r.length;++o)r[o]&&t.push({s:o,f:r[o]});var a=t.length,i=t.slice();if(!a)return[new n(0),0];if(1==a){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!=a-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(o=1;o<a;++o)i[o].s>g&&(g=i[o].s);var w=new e(g+1),d=A(t[c-1],w,0);if(d>f){o=0;var m=0,M=d-f,y=1<<M;for(i.sort((function(r,n){return w[n.s]-w[r.s]||r.f-n.f}));o<a;++o){var b=i[o].s;if(!(w[b]>f))break;m+=y-(1<<d-w[b]),w[b]=f}for(m>>>=M;m>0;){var p=i[o].s;w[p]<f?m-=1<<f-w[p]++-1:++o}for(;o>=0&&m;--o){var C=i[o].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,o=r[0],a=1,i=function(r){f[t++]=r},v=1;v<=n;++v)if(r[v]==o&&v!=n)++a;else{if(!o&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(o),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(o);a=1,o=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=b(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 o=0;o<f;++o)r[t+o+4]=e[o];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 b=S(v,15),p=b[0],A=b[1],E=S(u,15),U=E[0],D=E[1],I=O(p),J=I[0],N=I[1],W=O(U),_=W[0],j=W[1],P=new e(19),q=0;q<J.length;++q)P[31&J[q]]++;for(q=0;q<_.length;++q)P[31&_[q]]++;for(var z=S(P,7),B=z[0],F=z[1],G=19;G>4&&!B[a[G-1]];--G);var H,K,L,Q,R=h+5<<3,V=T(v,d)+T(u,m)+s,X=T(v,p)+T(u,U)+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(p,A,0),K=p,L=w(U,D,0),Q=U;var Y=w(B,F,0);C(n,g,N-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[a[q]]);g+=3*G;for(var Z=[J,_],$=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=M,K=d,L=y,Q=m;for(q=0;q<l;++q)if(i[q]>255){nr=i[q]>>>18&31;x(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];x(n,g,L[er]),g+=Q[er],er>3&&(x(n,g,i[q]>>>5&8191),g+=o[er])}else x(n,g,H[i[q]]),g+=K[i[q]];return x(n,g,H[256]),g+K[256]},U=new f([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=function(r,a,i,v,u){return function(r,a,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(!a||h<8)for(var m=0;m<=h;m+=65535){var M=m+65535;M<h?d=k(w,d,r.subarray(m,M)):(w[m]=c,d=k(w,d,r.subarray(m,h)))}else{for(var y=U[a-1],C=y>>>13,x=8191&y,S=(1<<i)-1,A=new e(32768),O=new e(S+1),T=Math.ceil(i/3),D=2*T,I=function(n){return(r[n]^r[n+1]<<T^r[n+2]<<D)&S},J=new f(25e3),N=new e(288),W=new e(32),_=0,j=0,P=(m=0,0),q=0,z=0;m<h;++m){var B=I(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,J,N,W,j,P,z,m-z,d),P=_=j=0,z=m;for(var K=0;K<286;++K)N[K]=0;for(K=0;K<30;++K)W[K]=0}var L=2,Q=0,R=x,V=F-G&32767;if(H>2&&B==I(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){J[P++]=268435456|s[L]<<18|l[Q];var tr=31&s[L],or=31&l[Q];j+=t[tr]+o[or],++N[257+tr],++W[or],q=m+L,++_}else J[P++]=r[m],++N[r[m]]}}d=E(r,w,c,J,N,W,j,P,z,m-z,d)}return p(g,0,v+b(d)+u)}(r,null==a.level?6:a.level,null==a.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+a.mem,i,v,!u)};function I(r,n){void 0===n&&(n={});var e=function(){var r=1,n=0;return{p:function(e){for(var f=r,t=n,o=e.length,a=0;a!=o;){for(var i=Math.min(a+5552,o);a<i;++a)t+=f+=e[a];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,o,a=D(r,n,2,4);return f=a,t=n.level,o=0==t?0:t<6?1:9==t?3:2,f[0]=120,f[1]=o<<6|(o?32-2*o:1),function(r,n,e){for(;e;++n)r[n]=e,e>>>=8}(a,a.length-4,e.d()),a}const J=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}(I(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)),o=0,a=function(r){t[o++]=r},i=0;i<f;++i){if(o+5>t.length){var v=new n(o+8+(f-i<<1));v.set(t),t=v}var u=r.charCodeAt(i);u<128||e?a(u):u<2048?(a(192|u>>>6),a(128|63&u)):u>55295&&u<57344?(a(240|(u=65536+(1047552&u)|1023&r.charCodeAt(++i))>>>18),a(128|u>>>12&63),a(128|u>>>6&63),a(128|63&u)):(a(224|u>>>12),a(128|u>>>6&63),a(128|63&u))}return p(t,0,o)}(JSON.stringify(e))),!0)};onmessage=r=>{const{event:n,sessionId:e}=r.data,f=JSON.stringify(J(n));postMessage({compressedEvent:f,sessionId:e})};const N=onmessage;return r.compressionOnMessage=N,Object.defineProperty(r,"__esModule",{value:!0}),r}({});\n')?o:s;if((null===(i=this.config.experimental)||void 0===i?void 0:i.useWebWorker)&&a&&a.Worker&&l){t.loggerProvider.log("[Experimental] Enabling web worker for compression");const e=new Worker(URL.createObjectURL(new Blob([l],{type:"application/javascript"})));e.onerror=e=>{t.loggerProvider.error(e)},e.onmessage=e=>{const{compressedEvent:t,sessionId:r}=e.data;this.addCompressedEventToManager(t,r)},this.worker=e}}scheduleIdleProcessing(){this.isProcessing||(this.isProcessing=!0,requestIdleCallback((e=>{this.processQueue(e)}),{timeout:this.timeout}))}enqueueEvent(e,t){var r;this.canUseIdleCallback&&(null===(r=this.config.performanceConfig)||void 0===r?void 0:r.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))}processQueue(e){for(;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){const e=this.taskQueue.shift();if(e){const{event:t,sessionId:r}=e;this.addCompressedEvent(t,r)}}this.taskQueue.length>0?requestIdleCallback((e=>{this.processQueue(e)}),{timeout:this.timeout}):this.isProcessing=!1}}class ng{constructor(){this.fetchObserver=null}start(e){this.eventCallback=e,this.observeFetch()}stop(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0}notifyEvent(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)}observeFetch(){const e=c();if(!e)return;const t=e.fetch;t&&(e.fetch=(e,r)=>s(this,void 0,void 0,(function*(){const s=Date.now(),n={timestamp:s,type:"fetch",method:(null==r?void 0:r.method)||"GET",url:e.toString(),requestHeaders:null==r?void 0:r.headers};try{const o=yield t(e,r),i=Date.now();n.status=o.status,n.duration=i-s;const a={};return o.headers.forEach(((e,t)=>{a[t]=e})),n.responseHeaders=a,this.notifyEvent(n),o}catch(e){const t=Date.now();n.duration=t-s;const r=e;throw n.error={name:r.name||"UnknownError",message:r.message||"An unknown error occurred"},this.notifyEvent(n),e}})),this.fetchObserver=()=>{e.fetch=t})}}var og,ig=Object.defineProperty,ag=(e,t,r)=>((e,t,r)=>t in e?ig(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),lg=Object.defineProperty,cg=(e,t,r)=>((e,t,r)=>t in e?lg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),hg=Object.defineProperty,ug=(e,t,r)=>((e,t,r)=>t in e?hg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const pg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},dg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},fg={};function mg(e){if(fg[e])return fg[e];const t=globalThis[e],r=t.prototype,s=e in pg?pg[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in dg?dg[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return fg[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?fg[e]=o:r}catch{return r}}const gg={};function yg(e,t,r){var s;const n=`${e}.${String(r)}`;if(gg[n])return gg[n].call(t);const o=mg(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(gg[n]=i,i.call(t)):t[r]}const wg={};function vg(e,t,r){const s=`${e}.${String(r)}`;if(wg[s])return wg[s].bind(t);const n=mg(e)[r];return"function"!=typeof n?t[r]:(wg[s]=n,n.bind(t))}const bg={childNodes:function(e){return yg("Node",e,"childNodes")},parentNode:function(e){return yg("Node",e,"parentNode")},parentElement:function(e){return yg("Node",e,"parentElement")},textContent:function(e){return yg("Node",e,"textContent")},contains:function(e,t){return vg("Node",e,"contains")(t)},getRootNode:function(e){return vg("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?yg("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?yg("Element",e,"shadowRoot"):null},querySelector:function(e,t){return yg("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return yg("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return mg("MutationObserver").constructor}};class Sg{constructor(){ug(this,"idNodeMap",new Map),ug(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const t=this.getId(e);this.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){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Cg(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Cg(bg.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Cg(bg.parentNode(e),t,r)}function xg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ig(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var kg={exports:{}},Og=String,Eg=function(){return{isColorSupported:!1,reset:Og,bold:Og,dim:Og,italic:Og,underline:Og,inverse:Og,hidden:Og,strikethrough:Og,black:Og,red:Og,green:Og,yellow:Og,blue:Og,magenta:Og,cyan:Og,white:Og,gray:Og,bgBlack:Og,bgRed:Og,bgGreen:Og,bgYellow:Og,bgBlue:Og,bgMagenta:Og,bgCyan:Og,bgWhite:Og}};kg.exports=Eg(),kg.exports.createColors=Eg;var Ag=kg.exports;const Rg=Ig(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Mg=Ag,Pg=Rg,Ng=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Mg.isColorSupported),Pg&&e&&(t=Pg(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Mg.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Tg=Ng;Ng.default=Ng;var Lg={};Lg.isClean=Symbol("isClean"),Lg.my=Symbol("my");const Dg={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Fg=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Dg[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Dg[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var _g=Fg;Fg.default=Fg;let Bg=_g;function Ug(e,t){new Bg(t).stringify(e)}var jg=Ug;Ug.default=Ug;let{isClean:zg,my:Wg}=Lg,Vg=Tg,Gg=_g,Zg=jg;function Yg(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>Yg(e,r))):("object"===o&&null!==n&&(n=Yg(n)),r[s]=n)}return r}let $g=class{constructor(e={}){this.raws={},this[zg]=!1,this[Wg]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=Yg(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Vg(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[zg]){this[zg]=!1;let e=this;for(;e=e.parent;)e[zg]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Gg).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Zg){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Jg=$g;$g.default=$g;let Kg=Jg,qg=class extends Kg{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Xg=qg;qg.default=qg;var Hg={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:Qg,SourceMapGenerator:ey}=Rg,{existsSync:ty,readFileSync:ry}=Rg,{dirname:sy,join:ny}=Rg;let oy=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=sy(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Qg(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=sy(e),ty(e))return this.mapFile=e,ry(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Qg)return ey.fromSourceMap(t).toString();if(t instanceof ey)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ny(sy(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var iy=oy;oy.default=oy;let{SourceMapConsumer:ay,SourceMapGenerator:ly}=Rg,{fileURLToPath:cy,pathToFileURL:hy}=Rg,{isAbsolute:uy,resolve:py}=Rg,{nanoid:dy}=Hg,fy=Rg,my=Tg,gy=iy,yy=Symbol("fromOffsetCache"),wy=Boolean(ay&&ly),vy=Boolean(py&&uy),by=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!vy||/^\w+:\/\//.test(t.from)||uy(t.from)?this.file=t.from:this.file=py(t.from)),vy&&wy){let e=new gy(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 "+dy(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new my(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new my(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(hy&&(n.input.url=hy(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[yy])r=this[yy];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[yy]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:py(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=uy(a.source)?hy(a.source):new URL(a.source,this.map.consumer().sourceRoot||hy(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!cy)throw new Error("file: protocol is not available in this PostCSS build");l.file=cy(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var Sy=by;by.default=by,fy&&fy.registerInput&&fy.registerInput(by);let{SourceMapConsumer:Cy,SourceMapGenerator:xy}=Rg,{dirname:Iy,relative:ky,resolve:Oy,sep:Ey}=Rg,{pathToFileURL:Ay}=Rg,Ry=Sy,My=Boolean(Cy&&xy),Py=Boolean(Iy&&Oy&&ky&&Ey);var Ny=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Iy(e.file);!1===this.mapOpts.sourcesContent?(t=new Cy(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Py&&My&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=xy.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new xy({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 xy({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Iy(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Iy(Oy(r,this.mapOpts.annotation)));let s=ky(r,e);return this.memoizedPaths.set(e,s),s}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 Ry(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(Ay){let t=Ay(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ey&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ty=Jg,Ly=class extends Ty{constructor(e){super(e),this.type="comment"}};var Dy=Ly;Ly.default=Ly;let Fy,_y,By,Uy,{isClean:jy,my:zy}=Lg,Wy=Xg,Vy=Dy,Gy=Jg;function Zy(e){return e.map((e=>(e.nodes&&(e.nodes=Zy(e.nodes)),delete e.source,e)))}function Yy(e){if(e[jy]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Yy(t)}let $y=class e extends Gy{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Zy(Fy(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Wy(t)]}else if(t.selector)t=[new _y(t)];else if(t.name)t=[new By(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Vy(t)]}return t.map((t=>(t[zy]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[jy]&&Yy(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};$y.registerParse=e=>{Fy=e},$y.registerRule=e=>{_y=e},$y.registerAtRule=e=>{By=e},$y.registerRoot=e=>{Uy=e};var Jy=$y;$y.default=$y,$y.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,By.prototype):"rule"===e.type?Object.setPrototypeOf(e,_y.prototype):"decl"===e.type?Object.setPrototypeOf(e,Wy.prototype):"comment"===e.type?Object.setPrototypeOf(e,Vy.prototype):"root"===e.type&&Object.setPrototypeOf(e,Uy.prototype),e[zy]=!0,e.nodes&&e.nodes.forEach((e=>{$y.rebuild(e)}))};let Ky,qy,Xy=Jy,Hy=class extends Xy{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ky(new qy,this,e).stringify()}};Hy.registerLazyResult=e=>{Ky=e},Hy.registerProcessor=e=>{qy=e};var Qy=Hy;Hy.default=Hy;let ew={};var tw=function(e){ew[e]||(ew[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let rw=class{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}};var sw=rw;rw.default=rw;let nw=sw,ow=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new nw(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var iw=ow;ow.default=ow;const aw="'".charCodeAt(0),lw='"'.charCodeAt(0),cw="\\".charCodeAt(0),hw="/".charCodeAt(0),uw="\n".charCodeAt(0),pw=" ".charCodeAt(0),dw="\f".charCodeAt(0),fw="\t".charCodeAt(0),mw="\r".charCodeAt(0),gw="[".charCodeAt(0),yw="]".charCodeAt(0),ww="(".charCodeAt(0),vw=")".charCodeAt(0),bw="{".charCodeAt(0),Sw="}".charCodeAt(0),Cw=";".charCodeAt(0),xw="*".charCodeAt(0),Iw=":".charCodeAt(0),kw="@".charCodeAt(0),Ow=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ew=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Aw=/.[\r\n"'(/\\]/,Rw=/[\da-f]/i;let Mw=Jy,Pw=class extends Mw{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)}};var Nw=Pw;Pw.default=Pw,Mw.registerAtRule(Pw);let Tw,Lw,Dw=Jy,Fw=class extends Dw{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Tw(new Lw,this,e).stringify()}};Fw.registerLazyResult=e=>{Tw=e},Fw.registerProcessor=e=>{Lw=e};var _w=Fw;Fw.default=Fw,Dw.registerRoot(Fw);let Bw={comma:e=>Bw.split(e,[","],!0),space:e=>Bw.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Uw=Bw;Bw.default=Bw;let jw=Jy,zw=Uw,Ww=class extends jw{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return zw.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Vw=Ww;Ww.default=Ww,jw.registerRule(Ww);let Gw=Xg,Zw=function(e,t={}){let r,s,n,o,i,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case uw:case pw:case fw:case mw:case dw:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===pw||r===uw||r===fw||r===mw||r===dw);u=["space",p.slice(m,s)],m=s-1;break;case gw:case yw:case bw:case Sw:case Iw:case Cw:case vw:{let e=String.fromCharCode(r);u=[e,e,m];break}case ww:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==aw&&h!==lw&&h!==pw&&h!==uw&&h!==fw&&h!==dw&&h!==mw){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===cw;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Aw.test(o)?u=["(","(",m]:(u=["brackets",o,m,s],m=s);break;case aw:case lw:n=r===aw?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===cw;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case kw:Ow.lastIndex=m+1,Ow.test(p),s=0===Ow.lastIndex?p.length-1:Ow.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case cw:for(s=m,i=!0;p.charCodeAt(s+1)===cw;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==hw&&r!==pw&&r!==uw&&r!==fw&&r!==mw&&r!==dw&&(s+=1,Rw.test(p.charAt(s)))){for(;Rw.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===pw&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===hw&&p.charCodeAt(m+1)===xw?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(Ew.lastIndex=m+1,Ew.test(p),s=0===Ew.lastIndex?p.length-1:Ew.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},Yw=Dy,$w=Nw,Jw=_w,Kw=Vw;const qw={empty:!0,space:!0};var Xw=class{constructor(e){this.input=e,this.root=new Jw,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,r,s,n=new $w;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Yw;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=Zw(this.input)}decl(e,t){let r=new Gw;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Kw;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",qw[a]||qw[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Kw;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let Hw=Jy,Qw=Xw,ev=Sy;function tv(e,t){let r=new ev(e,t),s=new Qw(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var rv=tv;tv.default=tv,Hw.registerParse(tv);let{isClean:sv,my:nv}=Lg,ov=Ny,iv=jg,av=Jy,lv=Qy,cv=tw,hv=iw,uv=rv,pv=_w;const dv={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},fv={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},mv={Once:!0,postcssPlugin:!0,prepare:!0};function gv(e){return"object"==typeof e&&"function"==typeof e.then}function yv(e){let t=!1,r=dv[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function wv(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:yv(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function vv(e){return e[sv]=!1,e.nodes&&e.nodes.forEach((e=>vv(e))),e}let bv={},Sv=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof hv)n=vv(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=uv;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[nv]&&av.rebuild(n)}else n=vv(r);this.result=new hv(t,n,s),this.helpers={...bv,postcss:bv,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!fv[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!mv[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(gv(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[sv];){e[sv]=!0;let t=[wv(e)];for(;t.length>0;){let e=this.visitTick(t);if(gv(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return gv(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=iv;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ov(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(gv(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[sv];)e[sv]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||cv("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(gv(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[sv])return s[sv]=!0,void e.push(wv(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[sv]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[sv]=!0;let t=yv(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[sv]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};Sv.registerPostcss=e=>{bv=e};var Cv=Sv;Sv.default=Sv,pv.registerLazyResult(Sv),lv.registerLazyResult(Sv);let xv=Ny,Iv=jg,kv=tw,Ov=rv;const Ev=iw;let Av=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Iv;this.result=new Ev(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new xv(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||kv("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=Ov;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"}};var Rv=Av;Av.default=Av;let Mv=Rv,Pv=Cv,Nv=Qy,Tv=_w,Lv=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Pv(this,e,t):new Mv(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Dv=Lv;Lv.default=Lv,Tv.registerProcessor(Lv),Nv.registerProcessor(Lv);let Fv=Xg,_v=iy,Bv=Dy,Uv=Nw,jv=Sy,zv=_w,Wv=Vw;function Vv(e,t){if(Array.isArray(e))return e.map((e=>Vv(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:jv.prototype};r.map&&(r.map={...r.map,__proto__:_v.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Vv(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new zv(s);if("decl"===s.type)return new Fv(s);if("rule"===s.type)return new Wv(s);if("comment"===s.type)return new Bv(s);if("atrule"===s.type)return new Uv(s);throw new Error("Unknown node type: "+e.type)}var Gv=Vv;Vv.default=Vv;let Zv=Tg,Yv=Xg,$v=Cv,Jv=Jy,Kv=Dv,qv=jg,Xv=Gv,Hv=Qy,Qv=sw,eb=Dy,tb=Nw,rb=iw,sb=Sy,nb=rv,ob=Uw,ib=Vw,ab=_w,lb=Jg;function cb(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Kv(e)}cb.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Kv).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return cb([n(r)]).process(e,t)},n},cb.stringify=qv,cb.parse=nb,cb.fromJSON=Xv,cb.list=ob,cb.comment=e=>new eb(e),cb.atRule=e=>new tb(e),cb.decl=e=>new Yv(e),cb.rule=e=>new ib(e),cb.root=e=>new ab(e),cb.document=e=>new Hv(e),cb.CssSyntaxError=Zv,cb.Declaration=Yv,cb.Container=Jv,cb.Processor=Kv,cb.Document=Hv,cb.Comment=eb,cb.Warning=Qv,cb.AtRule=tb,cb.Result=rb,cb.Input=sb,cb.Rule=ib,cb.Root=ab,cb.Node=lb,$v.registerPostcss(cb);var hb=cb;cb.default=cb;const ub=xg(hb);ub.stringify,ub.fromJSON,ub.plugin,ub.parse,ub.list,ub.document,ub.comment,ub.atRule,ub.rule,ub.decl,ub.root,ub.CssSyntaxError,ub.Declaration,ub.Container,ub.Processor,ub.Document,ub.Comment,ub.Warning,ub.AtRule,ub.Result,ub.Input,ub.Rule,ub.Root,ub.Node;var pb=Object.defineProperty,db=(e,t,r)=>((e,t,r)=>t in e?pb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function fb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mb(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var gb={exports:{}},yb=String,wb=function(){return{isColorSupported:!1,reset:yb,bold:yb,dim:yb,italic:yb,underline:yb,inverse:yb,hidden:yb,strikethrough:yb,black:yb,red:yb,green:yb,yellow:yb,blue:yb,magenta:yb,cyan:yb,white:yb,gray:yb,bgBlack:yb,bgRed:yb,bgGreen:yb,bgYellow:yb,bgBlue:yb,bgMagenta:yb,bgCyan:yb,bgWhite:yb}};gb.exports=wb(),gb.exports.createColors=wb;var vb=gb.exports;const bb=mb(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Sb=vb,Cb=bb,xb=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Sb.isColorSupported),Cb&&e&&(t=Cb(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Sb.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ib=xb;xb.default=xb;var kb={};kb.isClean=Symbol("isClean"),kb.my=Symbol("my");const Ob={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Eb=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ob[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Ob[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Ab=Eb;Eb.default=Eb;let Rb=Ab;function Mb(e,t){new Rb(t).stringify(e)}var Pb=Mb;Mb.default=Mb;let{isClean:Nb,my:Tb}=kb,Lb=Ib,Db=Ab,Fb=Pb;function _b(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>_b(e,r))):("object"===o&&null!==n&&(n=_b(n)),r[s]=n)}return r}let Bb=class{constructor(e={}){this.raws={},this[Nb]=!1,this[Tb]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=_b(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Lb(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Nb]){this[Nb]=!1;let e=this;for(;e=e.parent;)e[Nb]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Db).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Fb){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Ub=Bb;Bb.default=Bb;let jb=Ub,zb=class extends jb{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Wb=zb;zb.default=zb;var Vb={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:Gb,SourceMapGenerator:Zb}=bb,{existsSync:Yb,readFileSync:$b}=bb,{dirname:Jb,join:Kb}=bb;let qb=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Jb(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Gb(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Jb(e),Yb(e))return this.mapFile=e,$b(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Gb)return Zb.fromSourceMap(t).toString();if(t instanceof Zb)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Kb(Jb(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Xb=qb;qb.default=qb;let{SourceMapConsumer:Hb,SourceMapGenerator:Qb}=bb,{fileURLToPath:eS,pathToFileURL:tS}=bb,{isAbsolute:rS,resolve:sS}=bb,{nanoid:nS}=Vb,oS=bb,iS=Ib,aS=Xb,lS=Symbol("fromOffsetCache"),cS=Boolean(Hb&&Qb),hS=Boolean(sS&&rS),uS=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!hS||/^\w+:\/\//.test(t.from)||rS(t.from)?this.file=t.from:this.file=sS(t.from)),hS&&cS){let e=new aS(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 "+nS(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new iS(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new iS(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(tS&&(n.input.url=tS(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[lS])r=this[lS];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[lS]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:sS(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=rS(a.source)?tS(a.source):new URL(a.source,this.map.consumer().sourceRoot||tS(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!eS)throw new Error("file: protocol is not available in this PostCSS build");l.file=eS(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var pS=uS;uS.default=uS,oS&&oS.registerInput&&oS.registerInput(uS);let{SourceMapConsumer:dS,SourceMapGenerator:fS}=bb,{dirname:mS,relative:gS,resolve:yS,sep:wS}=bb,{pathToFileURL:vS}=bb,bS=pS,SS=Boolean(dS&&fS),CS=Boolean(mS&&yS&&gS&&wS);var xS=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||mS(e.file);!1===this.mapOpts.sourcesContent?(t=new dS(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),CS&&SS&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=fS.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new fS({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 fS({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?mS(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=mS(yS(r,this.mapOpts.annotation)));let s=gS(r,e);return this.memoizedPaths.set(e,s),s}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 bS(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(vS){let t=vS(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===wS&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let IS=Ub,kS=class extends IS{constructor(e){super(e),this.type="comment"}};var OS=kS;kS.default=kS;let ES,AS,RS,MS,{isClean:PS,my:NS}=kb,TS=Wb,LS=OS,DS=Ub;function FS(e){return e.map((e=>(e.nodes&&(e.nodes=FS(e.nodes)),delete e.source,e)))}function _S(e){if(e[PS]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)_S(t)}let BS=class e extends DS{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=FS(ES(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new TS(t)]}else if(t.selector)t=[new AS(t)];else if(t.name)t=[new RS(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new LS(t)]}return t.map((t=>(t[NS]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[PS]&&_S(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};BS.registerParse=e=>{ES=e},BS.registerRule=e=>{AS=e},BS.registerAtRule=e=>{RS=e},BS.registerRoot=e=>{MS=e};var US=BS;BS.default=BS,BS.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,RS.prototype):"rule"===e.type?Object.setPrototypeOf(e,AS.prototype):"decl"===e.type?Object.setPrototypeOf(e,TS.prototype):"comment"===e.type?Object.setPrototypeOf(e,LS.prototype):"root"===e.type&&Object.setPrototypeOf(e,MS.prototype),e[NS]=!0,e.nodes&&e.nodes.forEach((e=>{BS.rebuild(e)}))};let jS,zS,WS=US,VS=class extends WS{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new jS(new zS,this,e).stringify()}};VS.registerLazyResult=e=>{jS=e},VS.registerProcessor=e=>{zS=e};var GS=VS;VS.default=VS;let ZS={};var YS=function(e){ZS[e]||(ZS[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let $S=class{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}};var JS=$S;$S.default=$S;let KS=JS,qS=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new KS(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var XS=qS;qS.default=qS;const HS="'".charCodeAt(0),QS='"'.charCodeAt(0),eC="\\".charCodeAt(0),tC="/".charCodeAt(0),rC="\n".charCodeAt(0),sC=" ".charCodeAt(0),nC="\f".charCodeAt(0),oC="\t".charCodeAt(0),iC="\r".charCodeAt(0),aC="[".charCodeAt(0),lC="]".charCodeAt(0),cC="(".charCodeAt(0),hC=")".charCodeAt(0),uC="{".charCodeAt(0),pC="}".charCodeAt(0),dC=";".charCodeAt(0),fC="*".charCodeAt(0),mC=":".charCodeAt(0),gC="@".charCodeAt(0),yC=/[\t\n\f\r "#'()/;[\\\]{}]/g,wC=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vC=/.[\r\n"'(/\\]/,bC=/[\da-f]/i;let SC=US,CC=class extends SC{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)}};var xC=CC;CC.default=CC,SC.registerAtRule(CC);let IC,kC,OC=US,EC=class extends OC{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new IC(new kC,this,e).stringify()}};EC.registerLazyResult=e=>{IC=e},EC.registerProcessor=e=>{kC=e};var AC=EC;EC.default=EC,OC.registerRoot(EC);let RC={comma:e=>RC.split(e,[","],!0),space:e=>RC.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var MC=RC;RC.default=RC;let PC=US,NC=MC,TC=class extends PC{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return NC.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var LC=TC;TC.default=TC,PC.registerRule(TC);let DC=Wb,FC=function(e,t={}){let r,s,n,o,i,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case rC:case sC:case oC:case iC:case nC:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===sC||r===rC||r===oC||r===iC||r===nC);u=["space",p.slice(m,s)],m=s-1;break;case aC:case lC:case uC:case pC:case mC:case dC:case hC:{let e=String.fromCharCode(r);u=[e,e,m];break}case cC:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==HS&&h!==QS&&h!==sC&&h!==rC&&h!==oC&&h!==nC&&h!==iC){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===eC;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||vC.test(o)?u=["(","(",m]:(u=["brackets",o,m,s],m=s);break;case HS:case QS:n=r===HS?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===eC;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case gC:yC.lastIndex=m+1,yC.test(p),s=0===yC.lastIndex?p.length-1:yC.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case eC:for(s=m,i=!0;p.charCodeAt(s+1)===eC;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==tC&&r!==sC&&r!==rC&&r!==oC&&r!==iC&&r!==nC&&(s+=1,bC.test(p.charAt(s)))){for(;bC.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===sC&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===tC&&p.charCodeAt(m+1)===fC?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(wC.lastIndex=m+1,wC.test(p),s=0===wC.lastIndex?p.length-1:wC.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},_C=OS,BC=xC,UC=AC,jC=LC;const zC={empty:!0,space:!0};var WC=class{constructor(e){this.input=e,this.root=new UC,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,r,s,n=new BC;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new _C;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=FC(this.input)}decl(e,t){let r=new DC;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new jC;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",zC[a]||zC[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new jC;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let VC=US,GC=WC,ZC=pS;function YC(e,t){let r=new ZC(e,t),s=new GC(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var $C=YC;YC.default=YC,VC.registerParse(YC);let{isClean:JC,my:KC}=kb,qC=xS,XC=Pb,HC=US,QC=GS,ex=YS,tx=XS,rx=$C,sx=AC;const nx={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ox={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},ix={Once:!0,postcssPlugin:!0,prepare:!0};function ax(e){return"object"==typeof e&&"function"==typeof e.then}function lx(e){let t=!1,r=nx[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function cx(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:lx(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function hx(e){return e[JC]=!1,e.nodes&&e.nodes.forEach((e=>hx(e))),e}let ux={},px=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof tx)n=hx(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=rx;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[KC]&&HC.rebuild(n)}else n=hx(r);this.result=new tx(t,n,s),this.helpers={...ux,postcss:ux,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!ox[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ix[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(ax(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[JC];){e[JC]=!0;let t=[cx(e)];for(;t.length>0;){let e=this.visitTick(t);if(ax(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return ax(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=XC;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new qC(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(ax(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[JC];)e[JC]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||ex("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(ax(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[JC])return s[JC]=!0,void e.push(cx(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[JC]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[JC]=!0;let t=lx(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[JC]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};px.registerPostcss=e=>{ux=e};var dx=px;px.default=px,sx.registerLazyResult(px),QC.registerLazyResult(px);let fx=xS,mx=Pb,gx=YS,yx=$C;const wx=XS;let vx=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=mx;this.result=new wx(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new fx(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||gx("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=yx;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"}};var bx=vx;vx.default=vx;let Sx=bx,Cx=dx,xx=GS,Ix=AC,kx=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Cx(this,e,t):new Sx(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ox=kx;kx.default=kx,Ix.registerProcessor(kx),xx.registerProcessor(kx);let Ex=Wb,Ax=Xb,Rx=OS,Mx=xC,Px=pS,Nx=AC,Tx=LC;function Lx(e,t){if(Array.isArray(e))return e.map((e=>Lx(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Px.prototype};r.map&&(r.map={...r.map,__proto__:Ax.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Lx(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Nx(s);if("decl"===s.type)return new Ex(s);if("rule"===s.type)return new Tx(s);if("comment"===s.type)return new Rx(s);if("atrule"===s.type)return new Mx(s);throw new Error("Unknown node type: "+e.type)}var Dx=Lx;Lx.default=Lx;let Fx=Ib,_x=Wb,Bx=dx,Ux=US,jx=Ox,zx=Pb,Wx=Dx,Vx=GS,Gx=JS,Zx=OS,Yx=xC,$x=XS,Jx=pS,Kx=$C,qx=MC,Xx=LC,Hx=AC,Qx=Ub;function eI(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new jx(e)}eI.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new jx).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return eI([n(r)]).process(e,t)},n},eI.stringify=zx,eI.parse=Kx,eI.fromJSON=Wx,eI.list=qx,eI.comment=e=>new Zx(e),eI.atRule=e=>new Yx(e),eI.decl=e=>new _x(e),eI.rule=e=>new Xx(e),eI.root=e=>new Hx(e),eI.document=e=>new Vx(e),eI.CssSyntaxError=Fx,eI.Declaration=_x,eI.Container=Ux,eI.Processor=jx,eI.Document=Vx,eI.Comment=Zx,eI.Warning=Gx,eI.AtRule=Yx,eI.Result=$x,eI.Input=Jx,eI.Rule=Xx,eI.Root=Hx,eI.Node=Qx,Bx.registerPostcss(eI);var tI=eI;eI.default=eI;const rI=fb(tI);rI.stringify,rI.fromJSON,rI.plugin,rI.parse,rI.list,rI.document,rI.comment,rI.atRule,rI.rule,rI.decl,rI.root,rI.CssSyntaxError,rI.Declaration,rI.Container,rI.Processor,rI.Document,rI.Comment,rI.Warning,rI.AtRule,rI.Result,rI.Input,rI.Rule,rI.Root,rI.Node;class sI{constructor(...e){db(this,"parentElement",null),db(this,"parentNode",null),db(this,"ownerDocument"),db(this,"firstChild",null),db(this,"lastChild",null),db(this,"previousSibling",null),db(this,"nextSibling",null),db(this,"ELEMENT_NODE",1),db(this,"TEXT_NODE",3),db(this,"nodeType"),db(this,"nodeName"),db(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof sI))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const nI={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},oI={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},iI={};function aI(e){if(iI[e])return iI[e];const t=globalThis[e],r=t.prototype,s=e in nI?nI[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in oI?oI[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return iI[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?iI[e]=o:r}catch{return r}}const lI={};function cI(e,t,r){var s;const n=`${e}.${String(r)}`;if(lI[n])return lI[n].call(t);const o=aI(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(lI[n]=i,i.call(t)):t[r]}const hI={};function uI(e,t,r){const s=`${e}.${String(r)}`;if(hI[s])return hI[s].bind(t);const n=aI(e)[r];return"function"!=typeof n?t[r]:(hI[s]=n,n.bind(t))}const pI={childNodes:function(e){return cI("Node",e,"childNodes")},parentNode:function(e){return cI("Node",e,"parentNode")},parentElement:function(e){return cI("Node",e,"parentElement")},textContent:function(e){return cI("Node",e,"textContent")},contains:function(e,t){return uI("Node",e,"contains")(t)},getRootNode:function(e){return uI("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?cI("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?cI("Element",e,"shadowRoot"):null},querySelector:function(e,t){return cI("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return cI("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return aI("MutationObserver").constructor}};const dI="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let fI={map:{},getId:()=>(console.error(dI),-1),getNode:()=>(console.error(dI),null),removeNodeFromMap(){console.error(dI)},has:()=>(console.error(dI),!1),reset(){console.error(dI)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(fI=new Proxy(fI,{get:(e,t,r)=>("map"===t&&console.error(dI),Reflect.get(e,t,r))}));let mI=Date.now;function gI(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:pI.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(mI=()=>(new Date).getTime());function yI(e){var t;let r=null;return"getRootNode"in e&&(null==(t=pI.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&pI.host(pI.getRootNode(e))&&(r=pI.host(pI.getRootNode(e))),r}function wI(e){let t,r=e;for(;t=yI(r);)r=t;return r}function vI(e){const t=e.ownerDocument;if(!t)return!1;const r=wI(e);return pI.contains(t,r)}const bI=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){cg(this,"id",1),cg(this,"styleIDMap",new WeakMap),cg(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 r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return fI},closestElementOfNode:gI,getBaseDimension:function e(t,r){var s,n;const o=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:wI,getShadowHost:yI,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=pI.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=pI.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof sI&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(pI.shadowRoot(e)))},hookSetter:function e(t,r,s,n,o=window){const i=o.Object.getOwnPropertyDescriptor(t,r);return o.Object.defineProperty(t,r,n?s:{set(e){setTimeout((()=>{s.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>e(t,r,i||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(pI.contains(t,e)||vI(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&bg.host(e)||null;return Boolean(t&&"shadowRoot"in t&&bg.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=pI.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,r))},isBlocked:function(e,t,r,s){if(!e)return!1;const n=gI(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(Cg(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return mI},on:function(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)},patch:function(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}},polyfill:function(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)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:o}=n;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(n,o.parent))}else{const e=s.indexOf(o);s.splice(e,0,r(n,null))}}else if(o in t){const e=t[o];e.children.push(r(n,e))}else s.push(r(n,null))}return s},shadowHostInDom:vI,throttle:function(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)}),a))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var SI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",CI="undefined"==typeof Uint8Array?[]:new Uint8Array(256),xI=0;xI<64;xI++)CI[SI.charCodeAt(xI)]=xI;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(og=e.contentWindow)?void 0:og.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var II;new Sg,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(II||(II={}));class kI{constructor(e){ag(this,"fileName"),ag(this,"functionName"),ag(this,"lineNumber"),ag(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const OI=/(^|@)\S+:\d+/,EI=/^\s*at .*(\S+:\d+|\(native\))/m,AI=/^(eval@)?(\[native code])?$/,RI={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(EI)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(EI)}),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,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const s=t.split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:s.pop()),o=s.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new kI({functionName:o,fileName:i,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(AI)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new kI({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new kI({functionName:s,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),s=[];for(let e=2,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new kI({fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),s=[];for(let e=0,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new kI({functionName:n[3]||void 0,fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(OI)&&!e.match(/^Error created at/)}),this).map((function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),s=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new kI({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function MI(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const s=e.parentElement,n=[];if(s.children&&s.children.length>0)for(let e=0;e<s.children.length;e++){const t=s.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&n.push(t)}n.length>1&&(r+=`:eq(${n.indexOf(e)})`),t=r+(t?">"+t:""),e=s}return t}function PI(e){return"[object Object]"===Object.prototype.toString.call(e)}function NI(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(PI(e[s])&&NI(e[s],t-1))return!0;return!1}function TI(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const s=[],n=[];return JSON.stringify(e,(function(e,t){if(s.length>0){const r=s.indexOf(this);~r?s.splice(r+1):s.push(this),~r?n.splice(r,1/0,e):n.push(e),~s.indexOf(t)&&(t=s[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(t)).join(".")+"]")}else s.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(PI(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(PI(e)&&NI(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const s=t[r];Array.isArray(s)?e[r]=MI(s.length?s[0]:null):e[r]=s}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}const LI={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 DI(e,t,r){const s=r?Object.assign({},LI,r):LI,n=s.logger;if(!n)return()=>{};let o;o="string"==typeof n?t[n]:n;let i=0,a=!1;const l=[];if(s.level.includes("error")){const r=t=>{const r=t.message,n=t.error,o=RI.parse(n).map((e=>e.toString())),i=[TI(r,s.stringifyOptions)];e({level:"error",trace:o,payload:i})};t.addEventListener("error",r),l.push((()=>{t.removeEventListener("error",r)}));const n=t=>{let r,n;t.reason instanceof Error?(r=t.reason,n=[TI(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[TI("Uncaught (in promise)",s.stringifyOptions),TI(t.reason,s.stringifyOptions)]);const o=RI.parse(r).map((e=>e.toString()));e({level:"error",trace:o,payload:n})};t.addEventListener("unhandledrejection",n),l.push((()=>{t.removeEventListener("unhandledrejection",n)}))}for(const e of s.level)l.push(c(o,e));return()=>{l.forEach((e=>e()))};function c(t,r){return t[r]?bI.patch(t,r,(t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||a)){a=!0;try{const t=RI.parse(new Error).map((e=>e.toString())).splice(1),o=("assert"===r?n.slice(1):n).map((e=>TI(e,s.stringifyOptions)));i++,i<s.lengthThreshold?e({level:r,trace:t,payload:o}):i===s.lengthThreshold&&e({level:"warn",trace:[],payload:[TI("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}}})):()=>{}}}const FI="rrweb/console@1";var _I=Object.freeze({__proto__:null,PLUGIN_NAME:FI,getRecordConsolePlugin:e=>({name:FI,observer:DI,options:e})});return e.SessionReplay=class{constructor(){this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.pageLeaveFns=[],this.teardownEventListeners=e=>{const t=c();t&&(t.removeEventListener("blur",this.blurListener),t.removeEventListener("focus",this.focusListener),!e&&t.addEventListener("blur",this.blurListener),!e&&t.addEventListener("focus",this.focusListener),t.self&&"onpagehide"in t.self?(t.removeEventListener("pagehide",this.pageLeaveListener),!e&&t.addEventListener("pagehide",this.pageLeaveListener)):(t.removeEventListener("beforeunload",this.pageLeaveListener),!e&&t.addEventListener("beforeunload",this.pageLeaveListener)))},this.blurListener=()=>{this.sendEvents()},this.focusListener=()=>{this.recordEvents(!1)},this.pageLeaveListener=e=>{this.pageLeaveFns.forEach((t=>{t(e)}))},this.addCustomRRWebEvent=(e,t={},r=!0)=>s(this,void 0,void 0,(function*(){try{let s;const n=this.config;if(n&&e!==Qd.METADATA&&(s={config:of(n),version:uf},r)){const e=yield nf();s=Object.assign(Object.assign({},e),s)}this.recordCancelCallback?Jc.addCustomEvent(e,Object.assign(Object.assign({},t),s)):this.loggerProvider.debug(`Not able to add custom replay capture event ${e} due to no ongoing recording.`)}catch(e){this.loggerProvider.debug("Error while adding custom replay capture event: ",e)}})),this.stopRecordingEvents=()=>{var e;try{this.loggerProvider.log("Session Replay capture stopping."),this.recordCancelCallback&&this.recordCancelCallback(),this.recordCancelCallback=null,null===(e=this.networkObservers)||void 0===e||e.stop()}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while stopping replay capture: ${t.toString()}`)}},this.loggerProvider=new af(new p)}init(e,t){return h(this._init(e,t))}_init(e,t){var r,n,o,i,a,l,h;return s(this,void 0,void 0,(function*(){this.loggerProvider=new af(t.loggerProvider||new p),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.identifiers=new xm({sessionId:t.sessionId,deviceId:t.deviceId}),this.joinedConfigGenerator=yield((e,t)=>s(void 0,void 0,void 0,(function*(){const r=new lf(e,t),s=yield sh({localConfig:r,configKeys:["sessionReplay"]});return new cf(s,r)})))(e,t);const{joinedConfig:u,localConfig:d,remoteConfig:f}=yield this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId);if(this.config=u,this.setMetadata(t.sessionId,u,d,f,null===(r=t.version)||void 0===r?void 0:r.version,uf),t.sessionId&&(null===(n=this.config.interactionConfig)||void 0===n?void 0:n.enabled)){const e=Cm.default({sessionId:t.sessionId,type:"interaction"},this.config);this.pageLeaveFns=[e.send(this.getDeviceId.bind(this)).bind(e)],this.scrollHook=e.hook.bind(e)}const m=[];let{storeType:g}=this.config;"idb"!==g||(null===(o=c())||void 0===o?void 0:o.indexedDB)||(g="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log(`Using ${g} for event storage.`);try{const e=yield Zf({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:g});m.push({name:"replay",manager:e})}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while creating replay events manager: ${t.toString()}`)}if(null===(i=this.config.interactionConfig)||void 0===i?void 0:i.enabled){const e=this.config.interactionConfig.batch?ym:gm;try{const t=yield Zf({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!==(a=this.config.interactionConfig.trackEveryNms)&&void 0!==a?a:3e4,maxInterval:6e4,payloadBatcher:e,storeType:g});m.push({name:"interaction",manager:t})}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while creating interaction events manager: ${t.toString()}`)}}this.eventsManager=new Yf(...m),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new sg(this.eventsManager,this.config,this.getDeviceId()),(null===(h=null===(l=this.config.loggingConfig)||void 0===l?void 0:l.network)||void 0===h?void 0:h.enabled)&&(this.networkObservers=new ng),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),this.initialize(!0)}))}setSessionId(e,t){return h(this.asyncSetSessionId(e,t))}asyncSetSessionId(e,t){return s(this,void 0,void 0,(function*(){const r=this.identifiers&&this.identifiers.sessionId;r&&this.sendEvents(r);const s=t||this.getDeviceId();if(this.identifiers=new xm({sessionId:e,deviceId:s}),this.joinedConfigGenerator&&r){const{joinedConfig:e}=yield this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId);this.config=e}this.recordEvents()}))}getSessionReplayProperties(){const e=this.config,t=this.identifiers;if(!e||!t)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};const r=this.getShouldRecord();let s={};return r&&(s={[Kd]:t.sessionReplayId?t.sessionReplayId:null},e.debugMode&&(s[Xd]=JSON.stringify({appHash:rf(e.apiKey).toString()}))),this.addCustomRRWebEvent(Qd.GET_SR_PROPS,{shouldRecord:r,eventProperties:s},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,s}sendEvents(e){var t;const r=e||(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId),s=this.getDeviceId();this.eventsManager&&r&&s&&this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:s})}initialize(e=!1){var t;return s(this,void 0,void 0,(function*(){if(!(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId))return this.loggerProvider.log("Session is not being recorded due to lack of session id."),Promise.resolve();const r=this.getDeviceId();return r?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:r}),this.recordEvents()):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),Promise.resolve())}))}shouldOptOut(){var e,t;let r;if(null===(e=this.config)||void 0===e?void 0:e.instanceName){r=(s=this.config.instanceName,void 0===s&&(s="$default_instance"),E.getInstance(s)).identityStore.getIdentity().optOut}var s;return void 0!==r?r:null===(t=this.config)||void 0===t?void 0:t.optOut}getShouldRecord(){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} 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;const e=function(e,t){const r=rf(e.toString());return 31*Math.abs(r)%1e6/1e6<t}(this.identifiers.sessionId,this.config.sampleRate);return e||this.loggerProvider.log(`Opting session ${this.identifiers.sessionId} out of recording due to sample rate.`),e}getBlockSelectors(){var e,t,r;const s=null!==(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.blockSelector)&&void 0!==r?r:[];if(0!==s.length)return s}getMaskTextSelectors(){var e,t,r,s;if("conservative"===(null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.defaultMaskLevel))return"*";const n=null===(s=null===(r=this.config)||void 0===r?void 0:r.privacyConfig)||void 0===s?void 0:s.maskSelector;return n||void 0}getRecordingPlugins(e){var t;return s(this,void 0,void 0,(function*(){const r=[];if(null===(t=null==e?void 0:e.console)||void 0===t?void 0:t.enabled)try{const{getRecordConsolePlugin:t}=yield Promise.resolve().then((function(){return _I}));r.push(t({level:e.console.levels}))}catch(e){this.loggerProvider.warn("Failed to load console plugin:",e)}return r.length>0?r:void 0}))}recordEvents(e=!0){var t,r;return s(this,void 0,void 0,(function*(){const s=this.config,n=this.getShouldRecord(),o=null===(t=this.identifiers)||void 0===t?void 0:t.sessionId;if(!n||!o||!s)return;this.stopRecordingEvents(),null===(r=this.networkObservers)||void 0===r||r.start((e=>{this.addCustomRRWebEvent(Qd.FETCH_REQUEST,e)}));const{privacyConfig:i,interactionConfig:a,loggingConfig:l}=s,c=(null==a?void 0:a.enabled)?{mouseInteraction:this.eventsManager&&wm(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:o,deviceIdFn:this.getDeviceId.bind(this)}),scroll:this.scrollHook}:{};this.loggerProvider.log(`Session Replay capture beginning for ${o}.`);try{this.recordCancelCallback=Jc({emit:e=>{if(this.shouldOptOut())return this.loggerProvider.log(`Opting session ${o} out of recording due to optOut config.`),this.stopRecordingEvents(),void this.sendEvents();this.eventCompressor&&this.eventCompressor.enqueueEvent(e,o)},inlineStylesheet:s.shouldInlineStylesheet,hooks:c,maskAllInputs:!0,maskTextClass:Hd,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),maskInputFn:tf("input",i),maskTextFn:tf("text",i),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,errorHandler:e=>{const t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return this.loggerProvider.warn("Error while capturing replay: ",t.toString()),!0},plugins:yield this.getRecordingPlugins(l)}),this.addCustomRRWebEvent(Qd.DEBUG_INFO),e&&this.addCustomRRWebEvent(Qd.METADATA,this.metadata)}catch(e){this.loggerProvider.warn("Failed to initialize session replay:",e)}}))}getDeviceId(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId}getSessionId(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId}flush(e=!1){var t;return s(this,void 0,void 0,(function*(){return null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)}))}shutdown(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()}setMetadata(e,t,r,s,n,o){const i=(null==e?void 0:e.toString())?rf(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:r,remoteConfig:s,sessionId:e,hashValue:i,sampleRate:t.sampleRate,replaySDKType:"@amplitude/plugin-session-replay-browser",replaySDKVersion:n,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
1
+ var sessionReplay=function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};var r=function(){return r=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)};function s(e,t,r,s){return new(r||(r=Promise))((function(n,o){function i(e){try{l(s.next(e))}catch(e){o(e)}}function a(e){try{l(s.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((s=s.apply(e,t||[])).next())}))}function n(e,t){var r,s,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(r=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,s=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){o.label=a[1];break}if(6===a[0]&&o.label<n[1]){o.label=n[1],n=a;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(a);break}n[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],s=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}"function"==typeof SuppressedError&&SuppressedError;var o,i="".concat("AMP","_unsent"),a="https://api2.amplitude.com/2/httpapi";!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"}(o||(o={}));var l,c=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},u=function(e){return{promise:e||Promise.resolve()}};!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"}(l||(l={}));var h="Amplitude Logger ",d=function(){function e(){this.logLevel=l.None}return e.prototype.disable=function(){this.logLevel=l.None},e.prototype.enable=function(e){void 0===e&&(e=l.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Verbose||console.log("".concat(h,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Warn||console.warn("".concat(h,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Error||console.error("".concat(h,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Debug||console.log("".concat(h,"[Debug]: ").concat(e.join(" ")))},e}(),p=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:l.Warn,loggerProvider:new d,offline:!1,optOut:!1,serverUrl:a,serverZone:"US",useBatch:!1}},f=function(){function e(e){var t,r,s,n;this._optOut=!1;var o=p();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=e.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(s=e.optOut)&&void 0!==s?s:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(n=e.useBatch)&&void 0!==n?n:o.useBatch,this.loggerProvider.enable(this.logLevel);var i=g(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=i.serverZone,this.serverUrl=i.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),m=function(e,t){return"EU"===e?t?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":t?"https://api2.amplitude.com/batch":a},g=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=p().serverZone),void 0===r&&(r=p().useBatch),e)return{serverUrl:e,serverZone:void 0};var s=["US","EU"].includes(t)?t:p().serverZone;return{serverZone:s,serverUrl:m(s,r)}},y=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:v(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),v=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},w=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}(),b=function(){return b=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},b.apply(this,arguments)};function S(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var s,n,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(s=o.next()).done;)i.push(s.value)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}"function"==typeof SuppressedError&&SuppressedError;var I=function(e,t){var r,s,n=typeof e;if(n!==typeof t)return!1;try{for(var o=S(["string","number","boolean","undefined"]),i=o.next();!i.done;i=o.next()){if(i.value===n)return e===t}}catch(e){r={error:e}}finally{try{i&&!i.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var a=Array.isArray(e),l=Array.isArray(t);if(a!==l)return!1;if(!a||!l){var c=Object.keys(e).sort(),u=Object.keys(t).sort();if(!I(c,u))return!1;var h=!0;return Object.keys(e).forEach((function(r){I(e[r],t[r])||(h=!1)})),h}for(var d=0;d<e.length;d++)if(!I(e[d],t[d]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,s=new Array(r);r--;)s[r]=[t[r],e[t[r]]];return s});var x,k=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=b({},this.identity.userProperties),r=b(b({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,s,n,o,i,a,l=r.userProperties||{};try{for(var c=S(Object.entries(e)),u=c.next();!u.done;u=c.next()){var h=C(u.value,2),d=h[0],p=h[1];switch(d){case"$set":try{for(var f=(n=void 0,S(Object.entries(p))),m=f.next();!m.done;m=f.next()){var g=C(m.value,2),y=g[0],v=g[1];l[y]=v}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}break;case"$unset":try{for(var w=(i=void 0,S(Object.keys(p))),b=w.next();!b.done;b=w.next()){delete l[y=b.value]}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return b({},this.identity)},e.prototype.setIdentity=function(e){var t=b({},this.identity);this.identity=b({},e),I(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}(),O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,E=function(){function e(){this.identityStore=new k,this.eventBridge=new w,this.applicationContextProvider=new y}return e.getInstance=function(t){return O.analyticsConnectorInstances||(O.analyticsConnectorInstances={}),O.analyticsConnectorInstances[t]||(O.analyticsConnectorInstances[t]=new e),O.analyticsConnectorInstances[t]},e}(),A=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,i,a,l,c,u,h,d,p,f,m,g,y,v,w,b,S,C,I;if("object"!=typeof e)return null;var x=e.code||0,k=this.buildStatus(x);switch(k){case o.Success:return{status:k,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(s=e.server_upload_time)&&void 0!==s?s:0}};case o.Invalid:return{status:k,statusCode:x,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(i=e.missing_field)&&void 0!==i?i:"",eventsWithInvalidFields:null!==(a=e.events_with_invalid_fields)&&void 0!==a?a:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(c=e.events_with_invalid_id_lengths)&&void 0!==c?c:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(h=e.exceeded_daily_quota_devices)&&void 0!==h?h:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(m=e.throttled_events)&&void 0!==m?m:[]}};case o.PayloadTooLarge:return{status:k,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case o.RateLimit:return{status:k,statusCode:x,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(v=e.eps_threshold)&&void 0!==v?v:0,throttledDevices:null!==(w=e.throttled_devices)&&void 0!==w?w:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(S=e.exceeded_daily_quota_devices)&&void 0!==S?S:{},exceededDailyQuotaUsers:null!==(C=e.exceeded_daily_quota_users)&&void 0!==C?C:{},throttledEvents:null!==(I=e.throttled_events)&&void 0!==I?I:[]}};case o.Timeout:default:return{status:k,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?o.Success:429===e?o.RateLimit:413===e?o.PayloadTooLarge:408===e?o.Timeout:e>=400&&e<500?o.Invalid:e>=500?o.Failed:o.Unknown},e}(),M=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}(r,e),r.prototype.send=function(e,t){return s(this,void 0,void 0,(function(){var r,s,o;return n(this,(function(n){switch(n.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,r)];case 1:return[4,(s=n.sent()).text()];case 2:o=n.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(e){return[2,this.buildResponse({code:s.status})]}return[2]}}))}))},r}(A);!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(x||(x={}));var R,N=Object.defineProperty,P=(e,t,r)=>((e,t,r)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),T=Object.defineProperty,L=(e,t,r)=>((e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),D=(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))(D||{});const F={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},_={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},B={};function U(e){if(B[e])return B[e];const t=globalThis[e],r=t.prototype,s=e in F?F[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in _?_[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return B[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?B[e]=o:r}catch{return r}}const j={};function z(e,t,r){var s;const n=`${e}.${String(r)}`;if(j[n])return j[n].call(t);const o=U(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(j[n]=i,i.call(t)):t[r]}const W={};function V(e,t,r){const s=`${e}.${String(r)}`;if(W[s])return W[s].bind(t);const n=U(e)[r];return"function"!=typeof n?t[r]:(W[s]=n,n.bind(t))}const G={childNodes:function(e){return z("Node",e,"childNodes")},parentNode:function(e){return z("Node",e,"parentNode")},parentElement:function(e){return z("Node",e,"parentElement")},textContent:function(e){return z("Node",e,"textContent")},contains:function(e,t){return V("Node",e,"contains")(t)},getRootNode:function(e){return V("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?z("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?z("Element",e,"shadowRoot"):null},querySelector:function(e,t){return z("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return z("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return U("MutationObserver").constructor}};function Z(e){return e.nodeType===e.ELEMENT_NODE}function Y(e){const t=e&&"host"in e&&"mode"in e&&G.host(e)||null;return Boolean(t&&"shadowRoot"in t&&G.shadowRoot(t)===e)}function $(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function J(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const n=Array.from(r,(e=>K(e,s))).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function K(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=J(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?ie(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?ie(r,t):r}}class q{constructor(){L(this,"idNodeMap",new Map),L(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const t=this.getId(e);this.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){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function X({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&H(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function H(e){return e.toLowerCase()}const Q="__rrweb_original__";function ee(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?H(t):null}function te(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const re=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,se=/^(?:[a-z+]+:)?\/\//i,ne=/^www\..*/i,oe=/^(data:)([^,]*),(.*)/i;function ie(e,t){return(e||"").replace(re,((e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(se.test(a)||ne.test(a))return`url(${l}${a}${l})`;if(oe.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`}))}function ae(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function le(e,t){return function(e,t,r=!1){const s=Array.from(t.childNodes),n=[];let o=0;if(s.length>1&&e&&"string"==typeof e){let t=ae(e,r);const i=t.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){const l=ae(s[a].textContent,r),c=100;let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){let h=l.substring(0,u),d=t.split(h),p=-1;if(2===d.length)p=d[0].length;else if(d.length>2&&""===d[0]&&""!==s[a-1].textContent)p=t.indexOf(h,1);else if(1===d.length){if(h=h.substring(0,h.length-1),d=t.split(h),d.length<=1)return n.push(e),n;u=c+1}else u===l.length-1&&(p=t.indexOf(h));if(d.length>=2&&u>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=ae(e).length;p=t.indexOf(h,r)}-1===p&&(p=d[0].length)}if(-1!==p){let a=Math.floor(p/i);for(;a>0&&a<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;const l=ae(e.substring(0,a),r);if(l.length===p){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(p);break}l.length<p?a+=Math.max(1,Math.floor((p-l.length)/i)):a-=Math.max(1,Math.floor((l.length-p)*i))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}let ce=1;const ue=new RegExp("[^a-z0-9-_:]");function he(){return ce++}let de,pe;const fe=/^[^ \t\n\r\u000c]+/,me=/^[, \t\n\r\u000c]+/;const ge=new WeakMap;function ye(e,t){return t&&""!==t.trim()?we(e,t):t}function ve(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function we(e,t){let r=ge.get(e);if(r||(r=e.createElement("a"),ge.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function be(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?ye(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(me),!(r>=t.length);){let o=s(fe);if(","===o.slice(-1))o=ye(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=ye(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,n.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?ie(s,we(e)):"object"===t&&"data"===r?ye(e,s):s:ye(e,s):s}function Se(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function Ce(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Ce(G.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Ce(G.parentNode(e),t,r)}function Ie(e,t,r,s){let n;if(Z(e)){if(n=e,!G.childNodes(n).length)return!1}else{if(null===G.parentElement(e))return!1;n=G.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(Ce(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function xe(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:i,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:D.Document,childNodes:[],compatMode:e.compatMode}:{type:D.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:D.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:o,maskInputOptions:i={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:d=!1,rootId:p}=t,f=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=H(e.tagName);return ue.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let t=0;t<y;t++){const s=e.attributes[t];Se(m,s.name,s.value)||(g[s.name]=be(r,m,H(s.name),s.value))}if("link"===m&&o){const t=Array.from(r.styleSheets).find((t=>t.href===e.href));let s=null;t&&(s=J(t)),s&&(delete g.rel,delete g.href,g._cssText=s)}if("style"===m&&e.sheet){let t=J(e.sheet);t&&(e.childNodes.length>1&&(t=le(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,r=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=X({element:e,type:ee(e),tagName:m,value:t,maskInputOptions:i,maskInputFn:a}):r&&(g.checked=r)}"option"===m&&(e.selected&&!i.select?g.selected=!0:delete g.selected);"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&u)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){const n=t.getImageData,o=Q in n?n[Q]:n;if(new Uint32Array(o.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){de||(de=r.createElement("canvas"),pe=de.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{de.width=t.naturalWidth,de.height=t.naturalHeight,pe.drawImage(t,0,0),g.rr_dataURL=de.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===m||"video"===m){const t=g;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}d||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:r}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==m||h(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(m)&&(v=!0)}catch(e){}return{type:D.Element,tagName:m,attributes:g,childNodes:[],isSVG:ve(e)||void 0,needBlock:f,rootId:p,isCustom:v}}(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:u,dataURLOptions:h,inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,i=G.parentNode(e),a=i&&i.tagName;let l="";const c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;u?l="SCRIPT_PLACEHOLDER":o||(l=G.textContent(e),c&&l&&(l=ie(l,we(t.doc))));!c&&!u&&l&&r&&(l=s?s(l,G.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:D.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:D.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:D.Comment,textContent:G.textContent(e)||"",rootId:y};default:return!1}}function ke(e){return null==e?"":e.toLowerCase()}function Oe(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:I=!1,cssCaptured:x=!1}=t;let{needsMask:k}=t,{preserveWhiteSpace:O=!0}=t;if(!k){k=Ie(e,i,a,void 0===k)}const E=xe(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:I,cssCaptured:x});if(!E)return console.warn(e,"not serialized"),null;let A;A=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===D.Comment)return!0;if(e.type===D.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===te(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ke(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ke(e.attributes.name)||"icon"===ke(e.attributes.rel)||"apple-touch-icon"===ke(e.attributes.rel)||"shortcut icon"===ke(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ke(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ke(e.attributes.property).match(/^(og|twitter|fb):/)||ke(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ke(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ke(e.attributes.name)||"googlebot"===ke(e.attributes.name)||"bingbot"===ke(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ke(e.attributes.name)||"generator"===ke(e.attributes.name)||"framework"===ke(e.attributes.name)||"publisher"===ke(e.attributes.name)||"progid"===ke(e.attributes.name)||ke(e.attributes.property).match(/^article:/)||ke(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ke(e.attributes.name)||"yandex-verification"===ke(e.attributes.name)||"csrf-token"===ke(e.attributes.name)||"p:domain_verify"===ke(e.attributes.name)||"verify-v1"===ke(e.attributes.name)||"verification"===ke(e.attributes.name)||"shopify-checkout-api-token"===ke(e.attributes.name)))return!0}}return!1}(E,p)||!O&&E.type===D.Text&&!E.textContent.replace(/^\s+|\s+$/gm,"").length?-2:he();const M=Object.assign(E,{id:A});if(s.add(e,M),-2===A)return null;y&&y(e);let R=!l;if(M.type===D.Element){R=R&&!M.needBlock,delete M.needBlock;const t=G.shadowRoot(e);t&&$(t)&&(M.isShadowHost=!0)}if((M.type===D.Document||M.type===D.Element)&&R){p.headWhitespace&&M.type===D.Element&&"head"===M.tagName&&(O=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(M.type===D.Element&&"textarea"===M.tagName&&void 0!==M.attributes.value);else{M.type===D.Element&&void 0!==M.attributes._cssText&&"string"==typeof M.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(G.childNodes(e))){const e=Oe(r,t);e&&M.childNodes.push(e)}}let I=null;if(Z(e)&&(I=G.shadowRoot(e)))for(const e of Array.from(G.childNodes(I))){const r=Oe(e,t);r&&($(I)&&(r.isShadow=!0),M.childNodes.push(r))}}const N=G.parentNode(e);return N&&Y(N)&&$(N)&&(M.isShadow=!0),M.type===D.Element&&"iframe"===M.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,o=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout((()=>{o||(t(),o=!0)}),r);return void e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&v){const r=Oe(t,{doc:t,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});r&&v(e,r)}}),w),M.type===D.Element&&"link"===M.tagName&&"string"==typeof M.attributes.rel&&("stylesheet"===M.attributes.rel||"preload"===M.attributes.rel&&"string"==typeof M.attributes.href&&"css"===te(M.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=setTimeout((()=>{n||(t(),n=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(o),n=!0,t()}))}(e,(()=>{if(b){const t=Oe(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&b(e,t)}}),S),M}function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ae(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Me={exports:{}},Re=String,Ne=function(){return{isColorSupported:!1,reset:Re,bold:Re,dim:Re,italic:Re,underline:Re,inverse:Re,hidden:Re,strikethrough:Re,black:Re,red:Re,green:Re,yellow:Re,blue:Re,magenta:Re,cyan:Re,white:Re,gray:Re,bgBlack:Re,bgRed:Re,bgGreen:Re,bgYellow:Re,bgBlue:Re,bgMagenta:Re,bgCyan:Re,bgWhite:Re}};Me.exports=Ne(),Me.exports.createColors=Ne;var Pe=Me.exports;const Te=Ae(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Le=Pe,De=Te,Fe=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Le.isColorSupported),De&&e&&(t=De(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Le.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var _e=Fe;Fe.default=Fe;var Be={};Be.isClean=Symbol("isClean"),Be.my=Symbol("my");const Ue={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let je=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ue[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Ue[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var ze=je;je.default=je;let We=ze;function Ve(e,t){new We(t).stringify(e)}var Ge=Ve;Ve.default=Ve;let{isClean:Ze,my:Ye}=Be,$e=_e,Je=ze,Ke=Ge;function qe(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>qe(e,r))):("object"===o&&null!==n&&(n=qe(n)),r[s]=n)}return r}let Xe=class{constructor(e={}){this.raws={},this[Ze]=!1,this[Ye]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=qe(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new $e(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Ze]){this[Ze]=!1;let e=this;for(;e=e.parent;)e[Ze]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Je).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ke){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var He=Xe;Xe.default=Xe;let Qe=He,et=class extends Qe{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var tt=et;et.default=et;var rt={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:st,SourceMapGenerator:nt}=Te,{existsSync:ot,readFileSync:it}=Te,{dirname:at,join:lt}=Te;let ct=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=at(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new st(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=at(e),ot(e))return this.mapFile=e,it(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof st)return nt.fromSourceMap(t).toString();if(t instanceof nt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=lt(at(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ut=ct;ct.default=ct;let{SourceMapConsumer:ht,SourceMapGenerator:dt}=Te,{fileURLToPath:pt,pathToFileURL:ft}=Te,{isAbsolute:mt,resolve:gt}=Te,{nanoid:yt}=rt,vt=Te,wt=_e,bt=ut,St=Symbol("fromOffsetCache"),Ct=Boolean(ht&&dt),It=Boolean(gt&&mt),xt=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!It||/^\w+:\/\//.test(t.from)||mt(t.from)?this.file=t.from:this.file=gt(t.from)),It&&Ct){let e=new bt(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 "+yt(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new wt(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new wt(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(ft&&(n.input.url=ft(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[St])r=this[St];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[St]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:gt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=mt(a.source)?ft(a.source):new URL(a.source,this.map.consumer().sourceRoot||ft(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!pt)throw new Error("file: protocol is not available in this PostCSS build");l.file=pt(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var kt=xt;xt.default=xt,vt&&vt.registerInput&&vt.registerInput(xt);let{SourceMapConsumer:Ot,SourceMapGenerator:Et}=Te,{dirname:At,relative:Mt,resolve:Rt,sep:Nt}=Te,{pathToFileURL:Pt}=Te,Tt=kt,Lt=Boolean(Ot&&Et),Dt=Boolean(At&&Rt&&Mt&&Nt);var Ft=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||At(e.file);!1===this.mapOpts.sourcesContent?(t=new Ot(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Dt&&Lt&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Et.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Et({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 Et({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?At(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=At(Rt(r,this.mapOpts.annotation)));let s=Mt(r,e);return this.memoizedPaths.set(e,s),s}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 Tt(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(Pt){let t=Pt(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Nt&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let _t=He,Bt=class extends _t{constructor(e){super(e),this.type="comment"}};var Ut=Bt;Bt.default=Bt;let jt,zt,Wt,Vt,{isClean:Gt,my:Zt}=Be,Yt=tt,$t=Ut,Jt=He;function Kt(e){return e.map((e=>(e.nodes&&(e.nodes=Kt(e.nodes)),delete e.source,e)))}function qt(e){if(e[Gt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)qt(t)}let Xt=class e extends Jt{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Kt(jt(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Yt(t)]}else if(t.selector)t=[new zt(t)];else if(t.name)t=[new Wt(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new $t(t)]}return t.map((t=>(t[Zt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Gt]&&qt(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};Xt.registerParse=e=>{jt=e},Xt.registerRule=e=>{zt=e},Xt.registerAtRule=e=>{Wt=e},Xt.registerRoot=e=>{Vt=e};var Ht=Xt;Xt.default=Xt,Xt.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Wt.prototype):"rule"===e.type?Object.setPrototypeOf(e,zt.prototype):"decl"===e.type?Object.setPrototypeOf(e,Yt.prototype):"comment"===e.type?Object.setPrototypeOf(e,$t.prototype):"root"===e.type&&Object.setPrototypeOf(e,Vt.prototype),e[Zt]=!0,e.nodes&&e.nodes.forEach((e=>{Xt.rebuild(e)}))};let Qt,er,tr=Ht,rr=class extends tr{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Qt(new er,this,e).stringify()}};rr.registerLazyResult=e=>{Qt=e},rr.registerProcessor=e=>{er=e};var sr=rr;rr.default=rr;let nr={};var or=function(e){nr[e]||(nr[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ir=class{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}};var ar=ir;ir.default=ir;let lr=ar,cr=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new lr(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var ur=cr;cr.default=cr;const hr="'".charCodeAt(0),dr='"'.charCodeAt(0),pr="\\".charCodeAt(0),fr="/".charCodeAt(0),mr="\n".charCodeAt(0),gr=" ".charCodeAt(0),yr="\f".charCodeAt(0),vr="\t".charCodeAt(0),wr="\r".charCodeAt(0),br="[".charCodeAt(0),Sr="]".charCodeAt(0),Cr="(".charCodeAt(0),Ir=")".charCodeAt(0),xr="{".charCodeAt(0),kr="}".charCodeAt(0),Or=";".charCodeAt(0),Er="*".charCodeAt(0),Ar=":".charCodeAt(0),Mr="@".charCodeAt(0),Rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Nr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Pr=/.[\r\n"'(/\\]/,Tr=/[\da-f]/i;let Lr=Ht,Dr=class extends Lr{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)}};var Fr=Dr;Dr.default=Dr,Lr.registerAtRule(Dr);let _r,Br,Ur=Ht,jr=class extends Ur{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new _r(new Br,this,e).stringify()}};jr.registerLazyResult=e=>{_r=e},jr.registerProcessor=e=>{Br=e};var zr=jr;jr.default=jr,Ur.registerRoot(jr);let Wr={comma:e=>Wr.split(e,[","],!0),space:e=>Wr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Vr=Wr;Wr.default=Wr;let Gr=Ht,Zr=Vr,Yr=class extends Gr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Zr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var $r=Yr;Yr.default=Yr,Gr.registerRule(Yr);let Jr=tt,Kr=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case mr:case gr:case vr:case wr:case yr:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===gr||r===mr||r===vr||r===wr||r===yr);h=["space",d.slice(m,s)],m=s-1;break;case br:case Sr:case xr:case kr:case Ar:case Or:case Ir:{let e=String.fromCharCode(r);h=[e,e,m];break}case Cr:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==hr&&u!==dr&&u!==gr&&u!==mr&&u!==vr&&u!==yr&&u!==wr){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===pr;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Pr.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case hr:case dr:n=r===hr?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===pr;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case Mr:Rr.lastIndex=m+1,Rr.test(d),s=0===Rr.lastIndex?d.length-1:Rr.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case pr:for(s=m,i=!0;d.charCodeAt(s+1)===pr;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==fr&&r!==gr&&r!==mr&&r!==vr&&r!==wr&&r!==yr&&(s+=1,Tr.test(d.charAt(s)))){for(;Tr.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===gr&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===fr&&d.charCodeAt(m+1)===Er?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Nr.lastIndex=m+1,Nr.test(d),s=0===Nr.lastIndex?d.length-1:Nr.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},qr=Ut,Xr=Fr,Hr=zr,Qr=$r;const es={empty:!0,space:!0};var ts=class{constructor(e){this.input=e,this.root=new Hr,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,r,s,n=new Xr;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new qr;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=Kr(this.input)}decl(e,t){let r=new Jr;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Qr;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",es[a]||es[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Qr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let rs=Ht,ss=ts,ns=kt;function os(e,t){let r=new ns(e,t),s=new ss(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var is=os;os.default=os,rs.registerParse(os);let{isClean:as,my:ls}=Be,cs=Ft,us=Ge,hs=Ht,ds=sr,ps=or,fs=ur,ms=is,gs=zr;const ys={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vs={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},ws={Once:!0,postcssPlugin:!0,prepare:!0};function bs(e){return"object"==typeof e&&"function"==typeof e.then}function Ss(e){let t=!1,r=ys[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Cs(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ss(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Is(e){return e[as]=!1,e.nodes&&e.nodes.forEach((e=>Is(e))),e}let xs={},ks=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof fs)n=Is(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=ms;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[ls]&&hs.rebuild(n)}else n=Is(r);this.result=new fs(t,n,s),this.helpers={...xs,postcss:xs,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!vs[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ws[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(bs(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[as];){e[as]=!0;let t=[Cs(e)];for(;t.length>0;){let e=this.visitTick(t);if(bs(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return bs(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=us;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new cs(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(bs(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[as];)e[as]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||ps("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(bs(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[as])return s[as]=!0,void e.push(Cs(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[as]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[as]=!0;let t=Ss(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[as]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};ks.registerPostcss=e=>{xs=e};var Os=ks;ks.default=ks,gs.registerLazyResult(ks),ds.registerLazyResult(ks);let Es=Ft,As=Ge,Ms=or,Rs=is;const Ns=ur;let Ps=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=As;this.result=new Ns(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Es(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||Ms("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=Rs;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"}};var Ts=Ps;Ps.default=Ps;let Ls=Ts,Ds=Os,Fs=sr,_s=zr,Bs=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ds(this,e,t):new Ls(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Us=Bs;Bs.default=Bs,_s.registerProcessor(Bs),Fs.registerProcessor(Bs);let js=tt,zs=ut,Ws=Ut,Vs=Fr,Gs=kt,Zs=zr,Ys=$r;function $s(e,t){if(Array.isArray(e))return e.map((e=>$s(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Gs.prototype};r.map&&(r.map={...r.map,__proto__:zs.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>$s(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Zs(s);if("decl"===s.type)return new js(s);if("rule"===s.type)return new Ys(s);if("comment"===s.type)return new Ws(s);if("atrule"===s.type)return new Vs(s);throw new Error("Unknown node type: "+e.type)}var Js=$s;$s.default=$s;let Ks=_e,qs=tt,Xs=Os,Hs=Ht,Qs=Us,en=Ge,tn=Js,rn=sr,sn=ar,nn=Ut,on=Fr,an=ur,ln=kt,cn=is,un=Vr,hn=$r,dn=zr,pn=He;function fn(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Qs(e)}fn.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Qs).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return fn([n(r)]).process(e,t)},n},fn.stringify=en,fn.parse=cn,fn.fromJSON=tn,fn.list=un,fn.comment=e=>new nn(e),fn.atRule=e=>new on(e),fn.decl=e=>new qs(e),fn.rule=e=>new hn(e),fn.root=e=>new dn(e),fn.document=e=>new rn(e),fn.CssSyntaxError=Ks,fn.Declaration=qs,fn.Container=Hs,fn.Processor=Qs,fn.Document=rn,fn.Comment=nn,fn.Warning=sn,fn.AtRule=on,fn.Result=an,fn.Input=ln,fn.Rule=hn,fn.Root=dn,fn.Node=pn,Xs.registerPostcss(fn);var mn=fn;fn.default=fn;const gn=Ee(mn);gn.stringify,gn.fromJSON,gn.plugin,gn.parse,gn.list,gn.document,gn.comment,gn.atRule,gn.rule,gn.decl,gn.root,gn.CssSyntaxError,gn.Declaration,gn.Container,gn.Processor,gn.Document,gn.Comment,gn.Warning,gn.AtRule,gn.Result,gn.Input,gn.Rule,gn.Root,gn.Node;var yn=Object.defineProperty,vn=(e,t,r)=>((e,t,r)=>t in e?yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Sn={exports:{}},Cn=String,In=function(){return{isColorSupported:!1,reset:Cn,bold:Cn,dim:Cn,italic:Cn,underline:Cn,inverse:Cn,hidden:Cn,strikethrough:Cn,black:Cn,red:Cn,green:Cn,yellow:Cn,blue:Cn,magenta:Cn,cyan:Cn,white:Cn,gray:Cn,bgBlack:Cn,bgRed:Cn,bgGreen:Cn,bgYellow:Cn,bgBlue:Cn,bgMagenta:Cn,bgCyan:Cn,bgWhite:Cn}};Sn.exports=In(),Sn.exports.createColors=In;var xn=Sn.exports;const kn=bn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let On=xn,En=kn,An=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=On.isColorSupported),En&&e&&(t=En(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=On.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Mn=An;An.default=An;var Rn={};Rn.isClean=Symbol("isClean"),Rn.my=Symbol("my");const Nn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Pn=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Nn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Nn[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Tn=Pn;Pn.default=Pn;let Ln=Tn;function Dn(e,t){new Ln(t).stringify(e)}var Fn=Dn;Dn.default=Dn;let{isClean:_n,my:Bn}=Rn,Un=Mn,jn=Tn,zn=Fn;function Wn(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>Wn(e,r))):("object"===o&&null!==n&&(n=Wn(n)),r[s]=n)}return r}let Vn=class{constructor(e={}){this.raws={},this[_n]=!1,this[Bn]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=Wn(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Un(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[_n]){this[_n]=!1;let e=this;for(;e=e.parent;)e[_n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new jn).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=zn){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Gn=Vn;Vn.default=Vn;let Zn=Gn,Yn=class extends Zn{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var $n=Yn;Yn.default=Yn;var Jn={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:Kn,SourceMapGenerator:qn}=kn,{existsSync:Xn,readFileSync:Hn}=kn,{dirname:Qn,join:eo}=kn;let to=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Qn(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Kn(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Qn(e),Xn(e))return this.mapFile=e,Hn(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Kn)return qn.fromSourceMap(t).toString();if(t instanceof qn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=eo(Qn(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ro=to;to.default=to;let{SourceMapConsumer:so,SourceMapGenerator:no}=kn,{fileURLToPath:oo,pathToFileURL:io}=kn,{isAbsolute:ao,resolve:lo}=kn,{nanoid:co}=Jn,uo=kn,ho=Mn,po=ro,fo=Symbol("fromOffsetCache"),mo=Boolean(so&&no),go=Boolean(lo&&ao),yo=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!go||/^\w+:\/\//.test(t.from)||ao(t.from)?this.file=t.from:this.file=lo(t.from)),go&&mo){let e=new po(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 "+co(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new ho(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new ho(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(io&&(n.input.url=io(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[fo])r=this[fo];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[fo]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:lo(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=ao(a.source)?io(a.source):new URL(a.source,this.map.consumer().sourceRoot||io(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!oo)throw new Error("file: protocol is not available in this PostCSS build");l.file=oo(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var vo=yo;yo.default=yo,uo&&uo.registerInput&&uo.registerInput(yo);let{SourceMapConsumer:wo,SourceMapGenerator:bo}=kn,{dirname:So,relative:Co,resolve:Io,sep:xo}=kn,{pathToFileURL:ko}=kn,Oo=vo,Eo=Boolean(wo&&bo),Ao=Boolean(So&&Io&&Co&&xo);var Mo=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||So(e.file);!1===this.mapOpts.sourcesContent?(t=new wo(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ao&&Eo&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=bo.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new bo({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 bo({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?So(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=So(Io(r,this.mapOpts.annotation)));let s=Co(r,e);return this.memoizedPaths.set(e,s),s}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 Oo(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(ko){let t=ko(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===xo&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ro=Gn,No=class extends Ro{constructor(e){super(e),this.type="comment"}};var Po=No;No.default=No;let To,Lo,Do,Fo,{isClean:_o,my:Bo}=Rn,Uo=$n,jo=Po,zo=Gn;function Wo(e){return e.map((e=>(e.nodes&&(e.nodes=Wo(e.nodes)),delete e.source,e)))}function Vo(e){if(e[_o]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Vo(t)}let Go=class e extends zo{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Wo(To(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Uo(t)]}else if(t.selector)t=[new Lo(t)];else if(t.name)t=[new Do(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new jo(t)]}return t.map((t=>(t[Bo]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[_o]&&Vo(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};Go.registerParse=e=>{To=e},Go.registerRule=e=>{Lo=e},Go.registerAtRule=e=>{Do=e},Go.registerRoot=e=>{Fo=e};var Zo=Go;Go.default=Go,Go.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Do.prototype):"rule"===e.type?Object.setPrototypeOf(e,Lo.prototype):"decl"===e.type?Object.setPrototypeOf(e,Uo.prototype):"comment"===e.type?Object.setPrototypeOf(e,jo.prototype):"root"===e.type&&Object.setPrototypeOf(e,Fo.prototype),e[Bo]=!0,e.nodes&&e.nodes.forEach((e=>{Go.rebuild(e)}))};let Yo,$o,Jo=Zo,Ko=class extends Jo{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Yo(new $o,this,e).stringify()}};Ko.registerLazyResult=e=>{Yo=e},Ko.registerProcessor=e=>{$o=e};var qo=Ko;Ko.default=Ko;let Xo={};var Ho=function(e){Xo[e]||(Xo[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Qo=class{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}};var ei=Qo;Qo.default=Qo;let ti=ei,ri=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ti(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var si=ri;ri.default=ri;const ni="'".charCodeAt(0),oi='"'.charCodeAt(0),ii="\\".charCodeAt(0),ai="/".charCodeAt(0),li="\n".charCodeAt(0),ci=" ".charCodeAt(0),ui="\f".charCodeAt(0),hi="\t".charCodeAt(0),di="\r".charCodeAt(0),pi="[".charCodeAt(0),fi="]".charCodeAt(0),mi="(".charCodeAt(0),gi=")".charCodeAt(0),yi="{".charCodeAt(0),vi="}".charCodeAt(0),wi=";".charCodeAt(0),bi="*".charCodeAt(0),Si=":".charCodeAt(0),Ci="@".charCodeAt(0),Ii=/[\t\n\f\r "#'()/;[\\\]{}]/g,xi=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ki=/.[\r\n"'(/\\]/,Oi=/[\da-f]/i;let Ei=Zo,Ai=class extends Ei{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)}};var Mi=Ai;Ai.default=Ai,Ei.registerAtRule(Ai);let Ri,Ni,Pi=Zo,Ti=class extends Pi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ri(new Ni,this,e).stringify()}};Ti.registerLazyResult=e=>{Ri=e},Ti.registerProcessor=e=>{Ni=e};var Li=Ti;Ti.default=Ti,Pi.registerRoot(Ti);let Di={comma:e=>Di.split(e,[","],!0),space:e=>Di.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Fi=Di;Di.default=Di;let _i=Zo,Bi=Fi,Ui=class extends _i{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Bi.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var ji=Ui;Ui.default=Ui,_i.registerRule(Ui);let zi=$n,Wi=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case li:case ci:case hi:case di:case ui:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===ci||r===li||r===hi||r===di||r===ui);h=["space",d.slice(m,s)],m=s-1;break;case pi:case fi:case yi:case vi:case Si:case wi:case gi:{let e=String.fromCharCode(r);h=[e,e,m];break}case mi:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==ni&&u!==oi&&u!==ci&&u!==li&&u!==hi&&u!==ui&&u!==di){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===ii;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||ki.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case ni:case oi:n=r===ni?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===ii;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case Ci:Ii.lastIndex=m+1,Ii.test(d),s=0===Ii.lastIndex?d.length-1:Ii.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case ii:for(s=m,i=!0;d.charCodeAt(s+1)===ii;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==ai&&r!==ci&&r!==li&&r!==hi&&r!==di&&r!==ui&&(s+=1,Oi.test(d.charAt(s)))){for(;Oi.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===ci&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===ai&&d.charCodeAt(m+1)===bi?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(xi.lastIndex=m+1,xi.test(d),s=0===xi.lastIndex?d.length-1:xi.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},Vi=Po,Gi=Mi,Zi=Li,Yi=ji;const $i={empty:!0,space:!0};var Ji=class{constructor(e){this.input=e,this.root=new Zi,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,r,s,n=new Gi;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Vi;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=Wi(this.input)}decl(e,t){let r=new zi;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Yi;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",$i[a]||$i[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Yi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let Ki=Zo,qi=Ji,Xi=vo;function Hi(e,t){let r=new Xi(e,t),s=new qi(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Qi=Hi;Hi.default=Hi,Ki.registerParse(Hi);let{isClean:ea,my:ta}=Rn,ra=Mo,sa=Fn,na=Zo,oa=qo,ia=Ho,aa=si,la=Qi,ca=Li;const ua={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ha={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},da={Once:!0,postcssPlugin:!0,prepare:!0};function pa(e){return"object"==typeof e&&"function"==typeof e.then}function fa(e){let t=!1,r=ua[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function ma(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:fa(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function ga(e){return e[ea]=!1,e.nodes&&e.nodes.forEach((e=>ga(e))),e}let ya={},va=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof aa)n=ga(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=la;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[ta]&&na.rebuild(n)}else n=ga(r);this.result=new aa(t,n,s),this.helpers={...ya,postcss:ya,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!ha[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!da[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(pa(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ea];){e[ea]=!0;let t=[ma(e)];for(;t.length>0;){let e=this.visitTick(t);if(pa(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return pa(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=sa;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ra(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(pa(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ea];)e[ea]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||ia("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pa(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[ea])return s[ea]=!0,void e.push(ma(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[ea]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ea]=!0;let t=fa(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[ea]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};va.registerPostcss=e=>{ya=e};var wa=va;va.default=va,ca.registerLazyResult(va),oa.registerLazyResult(va);let ba=Mo,Sa=Fn,Ca=Ho,Ia=Qi;const xa=si;let ka=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Sa;this.result=new xa(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new ba(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||Ca("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=Ia;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"}};var Oa=ka;ka.default=ka;let Ea=Oa,Aa=wa,Ma=qo,Ra=Li,Na=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Aa(this,e,t):new Ea(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Pa=Na;Na.default=Na,Ra.registerProcessor(Na),Ma.registerProcessor(Na);let Ta=$n,La=ro,Da=Po,Fa=Mi,_a=vo,Ba=Li,Ua=ji;function ja(e,t){if(Array.isArray(e))return e.map((e=>ja(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:_a.prototype};r.map&&(r.map={...r.map,__proto__:La.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>ja(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Ba(s);if("decl"===s.type)return new Ta(s);if("rule"===s.type)return new Ua(s);if("comment"===s.type)return new Da(s);if("atrule"===s.type)return new Fa(s);throw new Error("Unknown node type: "+e.type)}var za=ja;ja.default=ja;let Wa=Mn,Va=$n,Ga=wa,Za=Zo,Ya=Pa,$a=Fn,Ja=za,Ka=qo,qa=ei,Xa=Po,Ha=Mi,Qa=si,el=vo,tl=Qi,rl=Fi,sl=ji,nl=Li,ol=Gn;function il(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Ya(e)}il.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Ya).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return il([n(r)]).process(e,t)},n},il.stringify=$a,il.parse=tl,il.fromJSON=Ja,il.list=rl,il.comment=e=>new Xa(e),il.atRule=e=>new Ha(e),il.decl=e=>new Va(e),il.rule=e=>new sl(e),il.root=e=>new nl(e),il.document=e=>new Ka(e),il.CssSyntaxError=Wa,il.Declaration=Va,il.Container=Za,il.Processor=Ya,il.Document=Ka,il.Comment=Xa,il.Warning=qa,il.AtRule=Ha,il.Result=Qa,il.Input=el,il.Rule=sl,il.Root=nl,il.Node=ol,Ga.registerPostcss(il);var al=il;il.default=il;const ll=wn(al);ll.stringify,ll.fromJSON,ll.plugin,ll.parse,ll.list,ll.document,ll.comment,ll.atRule,ll.rule,ll.decl,ll.root,ll.CssSyntaxError,ll.Declaration,ll.Container,ll.Processor,ll.Document,ll.Comment,ll.Warning,ll.AtRule,ll.Result,ll.Input,ll.Rule,ll.Root,ll.Node;class cl{constructor(...e){vn(this,"parentElement",null),vn(this,"parentNode",null),vn(this,"ownerDocument"),vn(this,"firstChild",null),vn(this,"lastChild",null),vn(this,"previousSibling",null),vn(this,"nextSibling",null),vn(this,"ELEMENT_NODE",1),vn(this,"TEXT_NODE",3),vn(this,"nodeType"),vn(this,"nodeName"),vn(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof cl))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const ul={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},hl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},dl={};function pl(e){if(dl[e])return dl[e];const t=globalThis[e],r=t.prototype,s=e in ul?ul[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in hl?hl[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return dl[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?dl[e]=o:r}catch{return r}}const fl={};function ml(e,t,r){var s;const n=`${e}.${String(r)}`;if(fl[n])return fl[n].call(t);const o=pl(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(fl[n]=i,i.call(t)):t[r]}const gl={};function yl(e,t,r){const s=`${e}.${String(r)}`;if(gl[s])return gl[s].bind(t);const n=pl(e)[r];return"function"!=typeof n?t[r]:(gl[s]=n,n.bind(t))}function vl(){return pl("MutationObserver").constructor}const wl={childNodes:function(e){return ml("Node",e,"childNodes")},parentNode:function(e){return ml("Node",e,"parentNode")},parentElement:function(e){return ml("Node",e,"parentElement")},textContent:function(e){return ml("Node",e,"textContent")},contains:function(e,t){return yl("Node",e,"contains")(t)},getRootNode:function(e){return yl("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ml("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ml("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ml("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ml("Element",e,"querySelectorAll")(t)},mutationObserver:vl};function bl(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Sl="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Cl={map:{},getId:()=>(console.error(Sl),-1),getNode:()=>(console.error(Sl),null),removeNodeFromMap(){console.error(Sl)},has:()=>(console.error(Sl),!1),reset(){console.error(Sl)}};function Il(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)}),a))}}function xl(e,t,r,s,n=window){const o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>xl(e,t,o||{},!0)}function kl(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Cl=new Proxy(Cl,{get:(e,t,r)=>("map"===t&&console.error(Sl),Reflect.get(e,t,r))}));let Ol=Date.now;function El(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=wl.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=wl.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function Al(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ml(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Rl(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:wl.parentElement(e)}function Nl(e,t,r,s){if(!e)return!1;const n=Rl(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(Ce(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function Pl(e,t){return-1!==t.getId(e)}function Tl(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Ll(e,t){if(Y(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=wl.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||Ll(s,t))}function Dl(e){return Boolean(e.changedTouches)}function Fl(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 _l(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Bl(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Ul(e){return!!e&&(e instanceof cl&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(wl.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ol=()=>(new Date).getTime());class jl{constructor(){P(this,"id",1),P(this,"styleIDMap",new WeakMap),P(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 r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}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 zl(e){var t;let r=null;return"getRootNode"in e&&(null==(t=wl.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&wl.host(wl.getRootNode(e))&&(r=wl.host(wl.getRootNode(e))),r}function Wl(e){let t,r=e;for(;t=zl(r);)r=t;return r}function Vl(e){const t=e.ownerDocument;if(!t)return!1;const r=Wl(e);return wl.contains(t,r)}function Gl(e){const t=e.ownerDocument;return!!t&&(wl.contains(t,e)||Vl(e))}const Zl=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:jl,get _mirror(){return Cl},closestElementOfNode:Rl,getBaseDimension:function e(t,r){var s,n;const o=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Wl,getShadowHost:zl,getWindowHeight:Al,getWindowScroll:El,getWindowWidth:Ml,hasShadowRoot:Ul,hookSetter:xl,inDom:Gl,isAncestorRemoved:Ll,isBlocked:Nl,isIgnored:Tl,isSerialized:Pl,isSerializedIframe:_l,isSerializedStylesheet:Bl,iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:Dl,get nowTimestamp(){return Ol},on:bl,patch:kl,polyfill:Fl,queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:o}=n;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(n,o.parent))}else{const e=s.indexOf(o);s.splice(e,0,r(n,null))}}else if(o in t){const e=t[o];e.children.push(r(n,e))}else s.push(r(n,null))}return s},shadowHostInDom:Vl,throttle:Il,uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));var Yl=(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))(Yl||{}),$l=(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))($l||{}),Jl=(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))(Jl||{}),Kl=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Kl||{}),ql=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ql||{}),Xl=(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))(Xl||{}),Hl=(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))(Hl||{});function Ql(e){return"__ln"in e}class ec{constructor(){P(this,"length",0),P(this,"head",null),P(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ql(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ql(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const 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--)}}const tc=(e,t)=>`${e}@${t}`;class rc{constructor(){P(this,"frozen",!1),P(this,"locked",!1),P(this,"texts",[]),P(this,"attributes",[]),P(this,"attributeMap",new WeakMap),P(this,"removes",[]),P(this,"mapRemoves",[]),P(this,"movedMap",{}),P(this,"addedSet",new Set),P(this,"movedSet",new Set),P(this,"droppedSet",new Set),P(this,"removesSubTreeCache",new Set),P(this,"mutationCb"),P(this,"blockClass"),P(this,"blockSelector"),P(this,"maskTextClass"),P(this,"maskTextSelector"),P(this,"inlineStylesheet"),P(this,"maskInputOptions"),P(this,"maskTextFn"),P(this,"maskInputFn"),P(this,"keepIframeSrcFn"),P(this,"recordCanvas"),P(this,"inlineImages"),P(this,"slimDOMOptions"),P(this,"dataURLOptions"),P(this,"doc"),P(this,"mirror"),P(this,"iframeManager"),P(this,"stylesheetManager"),P(this,"shadowDomManager"),P(this,"canvasManager"),P(this,"processedNodeManager"),P(this,"unattachedDoc"),P(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),P(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new ec,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const o=wl.parentNode(n);if(!o||!Gl(n))return;let i=!1;if(n.nodeType===Node.TEXT_NODE){const e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(i=!0)}const a=Y(o)?this.mirror.getId(zl(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=Oe(n,{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=>{_l(e,this.mirror)&&this.iframeManager.addIframe(e),Bl(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Ul(n)&&this.shadowDomManager.addShadowRoot(wl.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:i});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)nc(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(wl.parentNode(e))||n(e);for(const e of this.addedSet)oc(this.droppedSet,e)||nc(this.removesSubTreeCache,e,this.mirror)?oc(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let o=null;for(;r.length;){let e=null;if(o){const t=this.mirror.getId(wl.parentNode(o.value)),r=s(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(wl.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=wl.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=wl.host(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),n(e.value)}const i={texts:this.texts.map((e=>{const t=e.node,r=wl.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{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=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).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};(i.texts.length||i.attributes.length||i.removes.length||i.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(i))})),P(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));const r=Array.from(wl.childNodes(e),(e=>wl.textContent(e)||"")).join("");t.attributes.value=X({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ee(e),value:r,maskInputFn:this.maskInputFn})})),P(this,"processMutation",(e=>{if(!Tl(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=wl.textContent(e.target);Nl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Ie(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Rl(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=ee(t);s=X({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Nl(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Se(t.tagName,r))if(n.attributes[r]=be(this.doc,H(t.tagName),H(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===o?s:[s,o]:n._unchangedStyles[e]=[s,o]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":if(Nl(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const r=this.mirror.getId(t),s=Y(e.target)?this.mirror.getId(wl.host(e.target)):this.mirror.getId(e.target);Nl(e.target,this.blockClass,this.blockSelector,!1)||Tl(t,this.mirror,this.slimDOMOptions)||!Pl(t,this.mirror)||(this.addedSet.has(t)?(sc(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Ll(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[tc(r,s)]?sc(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!Y(e.target)||!$(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),wl.childNodes(e).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),P(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Tl(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[tc(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Nl(e,this.blockClass,this.blockSelector,!1)||(wl.childNodes(e).forEach((e=>this.genAdds(e))),Ul(e)&&wl.childNodes(wl.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 sc(e,t){e.delete(t),wl.childNodes(t).forEach((t=>sc(e,t)))}function nc(e,t,r){return 0!==e.size&&function(e,t){const r=wl.parentNode(t);return!!r&&e.has(r)}(e,t)}function oc(e,t){return 0!==e.size&&ic(e,t)}function ic(e,t){const r=wl.parentNode(t);return!!r&&(!!e.has(r)||ic(e,r))}let ac;const lc=e=>{if(!ac)return e;return(...t)=>{try{return e(...t)}catch(e){if(ac&&!0===ac(e))return;throw e}}};function cc(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}const uc=[];function hc(e){try{if("composedPath"in e){const 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 dc(e,t){const r=new rc;uc.push(r),r.init(e);const s=new(vl())(lc(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function pc({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let l=null;return Object.keys(Jl).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e])).forEach((o=>{let i=H(o);const c=(t=>o=>{const i=hc(o);if(Nl(i,s,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=Kl.Mouse;break;case"touch":a=Kl.Touch;break;case"pen":a=Kl.Pen}a===Kl.Touch?Jl[t]===Jl.MouseDown?c="TouchStart":Jl[t]===Jl.MouseUp&&(c="TouchEnd"):Kl.Pen}else Dl(o)&&(a=Kl.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Kl.Touch||c.startsWith("Mouse")&&a===Kl.Mouse)&&(a=null)):Jl[t]===Jl.Click&&(a=l,l=null);const u=Dl(o)?o.changedTouches[0]:o;if(!u)return;const h=r.getId(i),{clientX:d,clientY:p}=u;lc(e)({type:Jl[c],id:h,x:d,y:p,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(Jl[o]){case Jl.MouseDown:case Jl.MouseUp:i=i.replace("mouse","pointer");break;case Jl.TouchStart:case Jl.TouchEnd:return}a.push(bl(i,c,t))})),lc((()=>{a.forEach((e=>e()))}))}function fc({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){const i=lc(Il(lc((o=>{const i=hc(o);if(!i||Nl(i,s,n,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=El(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})})),o.scroll||100));return bl("scroll",i,t)}const mc=["INPUT","TEXTAREA","SELECT"],gc=new WeakMap;function yc(e){return function(e,t){if(Sc("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Sc("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Sc("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Sc("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function vc(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function wc({mirror:e,stylesheetManager:t},r){var s,n,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(wl.host(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(o=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return s}}),lc((()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function bc(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:d,selectionCb:p,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),i(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),h(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=dc(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const l=Il(lc((t=>{const r=Date.now()-i;e(a.map((e=>(e.timeOffset-=r,e))),t),a=[],i=null})),o),c=lc(Il(lc((e=>{const t=hc(e),{clientX:r,clientY:n}=Dl(e)?e.changedTouches[0]:e;i||(i=Ol()),a.push({x:r,y:n,id:s.getId(t),timeOffset:Ol()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?$l.Drag:e instanceof MouseEvent?$l.MouseMove:$l.TouchMove)})),n,{trailing:!1})),u=[bl("mousemove",c,r),bl("touchmove",c,r),bl("drag",c,r)];return lc((()=>{u.forEach((e=>e()))}))}(e),o=pc(e),i=fc(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return bl("resize",lc(Il(lc((()=>{const t=Al(),n=Ml();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)})),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:o,ignoreSelector:i,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function h(e){let r=hc(e);const c=e.isTrusted,h=r&&r.tagName;if(r&&"OPTION"===h&&(r=wl.parentElement(r)),!r||!h||mc.indexOf(h)<0||Nl(r,s,n,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let p=r.value,f=!1;const m=ee(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[h.toLowerCase()]||a[m])&&(p=X({element:r,maskInputOptions:a,tagName:h,type:m,value:p,maskInputFn:l})),d(r,u?{text:p,isChecked:f,userTriggered:c}:{text:p,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach((e=>{if(e!==r){const t=e.value;d(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function d(t,s){const n=gc.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){gc.set(t,s);const n=r.getId(t);lc(e)({...s,id:n})}}const p=("last"===c.input?["change"]:["input","change"]).map((e=>bl(e,lc(h),t))),f=t.defaultView;if(!f)return()=>{p.forEach((e=>e()))};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...g.map((e=>xl(e[0],e[1],{set(){lc(h)({target:this,isTrusted:!1})}},!1,f)))),lc((()=>{p.forEach((e=>e()))}))}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:o}){const i=lc((o=>Il(lc((n=>{const i=hc(n);if(!i||Nl(i,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u,loop:h}=i;e({type:o,id:s.getId(i),currentTime:a,volume:l,muted:c,playbackRate:u,loop:h})})),n.media||500))),a=[bl("play",i(Xl.Play),o),bl("pause",i(Xl.Pause),o),bl("seeked",i(Xl.Seeked),o),bl("volumechange",i(Xl.VolumeChange),o),bl("ratechange",i(Xl.RateChange),o)];return lc((()=>{a.forEach((e=>e()))}))}(e);let u=()=>{},h=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:lc(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=vc(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),cc((()=>s.apply(n,o)))()}))}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};const o=s.CSSStyleSheet.prototype.deleteRule;let i,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:lc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=vc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),cc((()=>s.apply(n,o)))()}))}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:lc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=vc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:i}),s.apply(n,o)}))})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:lc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=vc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),s.apply(n,o)}))}));const l={};Cc("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Cc("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Cc("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Cc("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach((([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:lc(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=vc(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...yc(n),a||0]}]}),s.apply(n,o)}))}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:lc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=vc(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...yc(n),i]}]}),s.apply(n,o)}))})})),lc((()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=o,i&&(s.CSSStyleSheet.prototype.replace=i),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}))}(e,{win:r}),h=wc(e,e.doc),d=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:lc(((n,i,a)=>{var l;const[c,u,h]=a;if(r.has(c))return o.apply(i,[c,u,h]);const{id:d,styleId:p}=vc(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:h},index:yc(i.parentRule)}),n.apply(i,a)}))});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:lc(((n,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:u,styleId:h}=vc(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(u&&-1!==u||h&&-1!==h)&&e({id:u,styleId:h,remove:{property:c},index:yc(o.parentRule)}),n.apply(o,a)}))}),lc((()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=i}))}(e,{win:r}),e.collectFonts&&(p=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){const s=new o(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const i=kl(t.fonts,"add",(function(t){return function(r){return setTimeout(lc((()=>{const t=n.get(r);t&&(e(t),n.delete(r))})),0),t.apply(this,[r])}}));return s.push((()=>{r.FontFace=o})),s.push(i),lc((()=>{s.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:o}=e;let i=!0;const a=lc((()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const o=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:u}=o;Nl(i,s,n,!0)||Nl(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:u})}o({ranges:a})}));return a(),bl("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?kl(r.customElements,"define",(function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,n])}})):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return lc((()=>{uc.forEach((e=>e.reset())),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),u(),h(),d(),p(),f(),m(),g.forEach((e=>e()))}))}function Sc(e){return void 0!==window[e]}function Cc(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ic{constructor(e){P(this,"iframeIdToRemoteIdMap",new WeakMap),P(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let i=n.get(t);return i||(i=this.generateIdFn(),n.set(t,i),o.set(i,t)),i}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,s)))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=s.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);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}}class xc{constructor(e){P(this,"iframes",new WeakMap),P(this,"crossOriginIframeMap",new WeakMap),P(this,"crossOriginIframeMirror",new Ic(he)),P(this,"crossOriginIframeStyleMirror"),P(this,"crossOriginIframeRootIdMap",new WeakMap),P(this,"mirror"),P(this,"mutationCb"),P(this,"wrappedEmit"),P(this,"loadListener"),P(this,"stylesheetManager"),P(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ic(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 r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.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){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case Yl.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:Yl.IncrementalSnapshot,data:{source:$l.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Yl.Meta:case Yl.Load:case Yl.DomContentLoaded:return!1;case Yl.Plugin:return t;case Yl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Yl.IncrementalSnapshot:switch(t.data.source){case $l.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),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 $l.Drag:case $l.TouchMove:case $l.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case $l.ViewportResize:return!1;case $l.MediaInteraction:case $l.MouseInteraction:case $l.Scroll:case $l.CanvasMutation:case $l.Input:return this.replaceIds(t.data,e,["id"]),t;case $l.StyleSheetRule:case $l.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case $l.Font:return t;case $l.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case $l.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}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===Hl.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class kc{constructor(e){P(this,"shadowDoms",new WeakSet),P(this,"mutationCb"),P(this,"scrollCb"),P(this,"bypassOptions"),P(this,"mirror"),P(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(!$(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=dc({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(fc({...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(wl.host(e))),this.restoreHandlers.push(wc({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){const r=this;this.restoreHandlers.push(kl(e.prototype,"attachShadow",(function(e){return function(s){const n=e.call(this,s),o=wl.shadowRoot(this);return o&&Gl(this)&&r.addShadowRoot(o,t),n}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Oc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ec="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ac=0;Ac<64;Ac++)Ec[Oc.charCodeAt(Ac)]=Ac;const Mc=new Map;const Rc=(e,t,r)=>{if(!e||!Tc(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=Mc.get(e);return r||(r=new Map,Mc.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function Nc(e,t,r){if(e instanceof Array)return e.map((e=>Nc(e,t,r)));if(null===e)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:function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=Oc[r[t]>>2],n+=Oc[(3&r[t])<<4|r[t+1]>>4],n+=Oc[(15&r[t+1])<<2|r[t+2]>>6],n+=Oc[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Nc(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Nc(e.data,t,r),e.width,e.height]}}if(Tc(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Rc(e,t,r)}}return e}const Pc=(e,t,r)=>e.map((e=>Nc(e,t,r))),Tc=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function Lc(e,t,r,s){const n=[];try{const o=kl(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n,...o){if(!Nl(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){const e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...o])}}));n.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((e=>e()))}}function Dc(e,t,r,s,n,o){const i=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=kl(e,l,(function(e){return function(...i){const a=e.apply(this,i);if(Rc(a,o,this),"tagName"in this.canvas&&!Nl(this.canvas,s,n,!0)){const e=Pc(i,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}}));i.push(a)}catch{const s=xl(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const Fc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",_c="undefined"!=typeof window&&window.Blob&&new Blob([(Bc=Fc,Uint8Array.from(atob(Bc),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var Bc;function Uc(e){let t;try{if(t=_c&&(window.URL||window.webkitURL).createObjectURL(_c),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Fc,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class jc{constructor(e){P(this,"pendingCanvasMutations",new Map),P(this,"rafStamps",{latestId:0,invokeId:null}),P(this,"mirror"),P(this,"mutationCb"),P(this,"resetObservers"),P(this,"frozen",!1),P(this,"locked",!1),P(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)}));const{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:o,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,s,n),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{dataURLOptions:i})}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,r,s,n){const o=Lc(t,r,s,!0),i=new Map,a=new Uc;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:o}=e.data;this.mutationCb({id:t,type:ql["2D"],commands:[{property:"clearRect",args:[0,0,n,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};const l=1e3/e;let c,u=0;const h=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{Nl(t,r,s,!0)||e.push(t)})),e})().forEach((async e=>{var t;const r=this.mirror.getId(e);if(i.get(r))return;if(0===e.width||0===e.height)return;if(i.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])}))),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Lc(e,t,r,!1),n=function(e,t,r,s){const n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const o=kl(t.CanvasRenderingContext2D.prototype,i,(function(n){return function(...o){return Nl(this.canvas,r,s,!0)||setTimeout((()=>{const r=Pc(o,t,this);e(this.canvas,{type:ql["2D"],property:i,args:r})}),0),n.apply(this,o)}}));n.push(o)}catch{const r=xl(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:ql["2D"],property:i,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,s){const n=[];return n.push(...Dc(t.WebGLRenderingContext.prototype,ql.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Dc(t.WebGL2RenderingContext.prototype,ql.WebGL2,e,r,s,t)),()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map((e=>{const{type:t,...r}=e;return r})),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class zc{constructor(e){P(this,"trackedLinkElements",new WeakSet),P(this,"mutationCb"),P(this,"adoptedStyleSheetCb"),P(this,"styleMirror",new jl),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(0===e.length)return;const r={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:K(e,t.href),index:r})))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Wc{constructor(){P(this,"nodeMap",new WeakMap),P(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).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(){}}let Vc,Gc,Zc,Yc=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(R=e.contentWindow)?void 0:R.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const $c=new q;function Jc(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:i="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:d,slimDOMOptions:p,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:v={},dataURLOptions:w={},mousemoveWait:b,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:k=!1,collectFonts:O=!1,inlineImages:E=!1,plugins:A,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:R=new Set([]),errorHandler:N}=e;ac=N;const P=!I||window.parent===window;let T=!1;if(!P)try{window.parent.document&&(T=!1)}catch(e){T=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!T)return()=>{};void 0!==b&&void 0===v.mousemove&&(v.mousemove=b),$c.reset();const L=!0===h?{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}:void 0!==d?d:{password:!0},D=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p,headTitleMutations:"all"===p}:p||{};let F;Fl();let _=0;const B=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!T&&(e=y(e)),e};Vc=(e,n)=>{var o;const i=e;if(i.timestamp=Ol(),!(null==(o=uc[0])?void 0:o.isFrozen())||i.type===Yl.FullSnapshot||i.type===Yl.IncrementalSnapshot&&i.data.source===$l.Mutation||uc.forEach((e=>e.unfreeze())),P)null==t||t(B(i),n);else if(T){const e={type:"rrweb",event:B(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===Yl.FullSnapshot)F=i,_=0;else if(i.type===Yl.IncrementalSnapshot){if(i.data.source===$l.Mutation&&i.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&i.timestamp-F.timestamp>r;(e||t)&&Gc(!0)}};const U=e=>{Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Mutation,...e}})},j=e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Scroll,...e}}),z=e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.CanvasMutation,...e}}),W=new zc({mutationCb:U,adoptedStyleSheetCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.AdoptedStyleSheet,...e}})}),V=new xc({mirror:$c,mutationCb:U,stylesheetManager:W,recordCrossOriginIframes:I,wrappedEmit:Vc});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:$c,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const G=new Wc;Zc=new jc({recordCanvas:C,mutationCb:z,win:window,blockClass:n,blockSelector:o,mirror:$c,sampling:v.canvas,dataURLOptions:w});const Z=new kc({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:L,dataURLOptions:w,maskTextFn:m,maskInputFn:f,recordCanvas:C,inlineImages:E,sampling:v,slimDOMOptions:D,iframeManager:V,stylesheetManager:W,canvasManager:Zc,keepIframeSrcFn:M,processedNodeManager:G},mirror:$c});Gc=(e=!1)=>{if(!S)return;Vc({type:Yl.Meta,data:{href:window.location.href,width:Ml(),height:Al()}},e),W.reset(),Z.init(),uc.forEach((e=>e.lock()));const t=function(e,t){const{mirror:r=new q,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:i=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:d,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S=()=>!1}=t||{};return Oe(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:i,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{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}:!1===u?{password:!0}:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:$c,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:L,maskTextFn:m,maskInputFn:f,slimDOM:D,dataURLOptions:w,recordCanvas:C,inlineImages:E,onSerialize:e=>{_l(e,$c)&&V.addIframe(e),Bl(e,$c)&&W.trackLinkElement(e),Ul(e)&&Z.addShadowRoot(wl.shadowRoot(e),document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),Z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:M});if(!t)return console.warn("Failed to snapshot the document");Vc({type:Yl.FullSnapshot,data:{node:t,initialOffset:El(window)}},e),uc.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,$c.getId(document))};try{const e=[],t=e=>{var t;return lc(bc)({mutationCb:U,mousemoveCb:(e,t)=>Vc({type:Yl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.ViewportResize,...e}}),inputCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Input,...e}}),mediaInteractionCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.MediaInteraction,...e}}),styleSheetRuleCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.StyleSheetRule,...e}}),styleDeclarationCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Font,...e}}),selectionCb:e=>{Vc({type:Yl.IncrementalSnapshot,data:{source:$l.Selection,...e}})},customElementCb:e=>{Vc({type:Yl.IncrementalSnapshot,data:{source:$l.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:u,sampling:v,recordDOM:S,recordCanvas:C,inlineImages:E,userTriggeredOnInput:k,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:M,blockSelector:o,slimDOMOptions:D,dataURLOptions:w,mirror:$c,iframeManager:V,stylesheetManager:W,shadowDomManager:Z,processedNodeManager:G,canvasManager:Zc,ignoreCSSAttributes:R,plugins:(null==(t=null==A?void 0:A.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>Vc({type:Yl.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};V.addLoadListener((r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}}));const r=()=>{Gc(),e.push(t(document)),Yc=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(bl("DOMContentLoaded",(()=>{Vc({type:Yl.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&r()}))),e.push(bl("load",(()=>{Vc({type:Yl.Load,data:{}}),"load"===x&&r()}),window))),()=>{e.forEach((e=>e())),G.destroy(),Yc=!1,ac=void 0}}catch(e){console.warn(e)}}var Kc,qc,Xc,Hc;Jc.addCustomEvent=(e,t)=>{if(!Yc)throw new Error("please add custom event after start recording");Vc({type:Yl.Custom,data:{tag:e,payload:t}})},Jc.freezePage=()=>{uc.forEach((e=>e.freeze()))},Jc.takeFullSnapshot=e=>{if(!Yc)throw new Error("please take full snapshot after start recording");Gc(e)},Jc.mirror=$c,(qc=Kc||(Kc={}))[qc.NotStarted=0]="NotStarted",qc[qc.Running=1]="Running",qc[qc.Stopped=2]="Stopped",function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(Xc||(Xc={})),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"}(Hc||(Hc={}));var Qc=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,o,i,a,l,c,u,h,d,p,f,m,g,y,v,w,b,S,C;if("object"!=typeof e)return null;var I=e.code||0,x=this.buildStatus(I);switch(x){case Hc.Success:return{status:x,statusCode:I,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(s=e.server_upload_time)&&void 0!==s?s:0}};case Hc.Invalid:return{status:x,statusCode:I,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(i=e.events_with_invalid_fields)&&void 0!==i?i:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(u=e.exceeded_daily_quota_devices)&&void 0!==u?u:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case Hc.PayloadTooLarge:return{status:x,statusCode:I,body:{error:null!==(m=e.error)&&void 0!==m?m:""}};case Hc.RateLimit:return{status:x,statusCode:I,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(v=e.throttled_devices)&&void 0!==v?v:{},throttledUsers:null!==(w=e.throttled_users)&&void 0!==w?w:{},exceededDailyQuotaDevices:null!==(b=e.exceeded_daily_quota_devices)&&void 0!==b?b:{},exceededDailyQuotaUsers:null!==(S=e.exceeded_daily_quota_users)&&void 0!==S?S:{},throttledEvents:null!==(C=e.throttled_events)&&void 0!==C?C:[]}};case Hc.Timeout:default:return{status:x,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?Hc.Success:429===e?Hc.RateLimit:413===e?Hc.PayloadTooLarge:408===e?Hc.Timeout:e>=400&&e<500?Hc.Invalid:e>=500?Hc.Failed:Hc.Unknown},e}(),eu="Remote config fetch rejected due to timeout after 5 seconds",tu="Unexpected error occurred",ru=function(){function e(e){var t=e.localConfig,o=e.configKeys,i=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(e,t,r){return s(i,void 0,void 0,(function(){var s,o,i;return n(this,(function(n){switch(n.label){case 0:return s=Date.now(),[4,this.fetchWithTimeout(r)];case 1:return(o=n.sent())&&(i=o.configs&&o.configs[e])?(this.metrics.fetchTimeAPISuccess=Date.now()-s,[2,i[t]]):(this.metrics.fetchTimeAPIFail=Date.now()-s,[2,void 0])}}))}))},this.fetchWithTimeout=function(e){return s(i,void 0,void 0,(function(){var t,r,s;return n(this,(function(n){switch(n.label){case 0:return t=new AbortController,r=setTimeout((function(){return t.abort()}),5e3),[4,this.fetchRemoteConfig(t.signal,e)];case 1:return s=n.sent(),clearTimeout(r),[2,s]}}))}))},this.fetchRemoteConfig=function(e,t){return s(i,void 0,void 0,(function(){var s,o,i,a,l,c,u,h,d,p,f,m;return n(this,(function(n){switch(n.label){case 0:if(t===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:"Remote config fetch rejected due to exceeded retry count"})];if(e.aborted)return[2,this.completeRequest({err:eu})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0),n.label=1;case 1:n.trys.push([1,3,,4]),s=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.configKeys),i=o.next();!i.done;i=o.next())a=i.value,s.append("config_keys",a)}catch(e){p={error:e}}finally{try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(p)throw p.error}}return t&&s.set("session_id",String(t)),l={headers:{Accept:"*/*"},method:"GET"},c="".concat(this.getServerUrl(),"?").concat(s.toString()),this.attempts+=1,[4,fetch(c,r(r({},l),{signal:e}))];case 2:if(null===(u=n.sent()))return[2,this.completeRequest({err:tu})];switch((new Qc).buildStatus(u.status)){case Hc.Success:return this.attempts=0,[2,this.parseAndStoreConfig(u)];case Hc.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:return h=n.sent(),d=h,e.aborted?[2,this.completeRequest({err:eu})]:[2,this.completeRequest({err:null!==(m=d.message)&&void 0!==m?m:tu})];case 4:return[2]}}))}))},this.retryFetch=function(e,t){return s(i,void 0,void 0,(function(){var r=this;return n(this,(function(s){switch(s.label){case 0:return[4,new Promise((function(e){return setTimeout(e,r.attempts*r.retryTimeout)}))];case 1:return s.sent(),[2,this.fetchRemoteConfig(e,t)]}}))}))},this.parseAndStoreConfig=function(e){return s(i,void 0,void 0,(function(){var t;return n(this,(function(r){switch(r.label){case 0:return[4,e.json()];case 1:return t=r.sent(),this.completeRequest({success:"Remote config successfully fetched"}),[2,t]}}))}))},this.localConfig=t,this.configKeys=o}return e.prototype.getServerUrl=function(){return this.localConfig.configServerUrl?this.localConfig.configServerUrl:this.localConfig.serverZone===Xc.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===Xc.EU?"https://sr-client-cfg.eu.amplitude.com/config":"https://sr-client-cfg.amplitude.com/config"},e.prototype.completeRequest=function(e){var t=e.err,r=e.success;if(t)throw new Error(t);r&&this.localConfig.loggerProvider.log(r)},e}(),su=function(e){var t=e.localConfig,r=e.configKeys;return s(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,new ru({localConfig:t,configKeys:r})]}))}))};const nu="medium",ou="[Amplitude]",iu=`${ou} Session Replay ID`,au=x.US,lu=`${ou} Session Replay Debug`,cu="amp-mask";var uu;!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata"}(uu||(uu={}));const hu=(e,t,r)=>{switch(t){case"light":{if("input"!==e)return!0;const t=r?function(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(r):"";return!!t&&(!!["password","hidden","email","tel"].includes(t)||!!r.autocomplete.startsWith("cc-"))}case"medium":case"conservative":return!0;default:return hu(e,nu,r)}},du=(e,t)=>(r,s)=>((e,t={defaultMaskLevel:nu},r)=>{var s,n,o;if(r){if(r.closest("."+cu))return!0;const e=(null!==(s=t.maskSelector)&&void 0!==s?s:[]).some((e=>r.closest(e)));if(e)return!0;if(r.closest(".amp-unmask"))return!1;const o=(null!==(n=t.unmaskSelector)&&void 0!==n?n:[]).some((e=>r.closest(e)));if(o)return!1}return hu(e,null!==(o=t.defaultMaskLevel)&&void 0!==o?o:nu,r)})(e,t,s)?r.replace(/[^\s]/g,"*"):r,pu=function(e){let t=0;if(0===e.length)return t;for(let r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t},fu=(e,t)=>t||(e===x.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===x.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track"),mu=()=>s(void 0,void 0,void 0,(function*(){try{const e=c();if(e){const{usage:t,quota:r,usageDetails:s}=yield e.navigator.storage.estimate(),n=t?Math.round(t/1024):0;return{totalStorageSize:n,percentOfQuota:t&&r?Math.round(1e3*(t/r+Number.EPSILON))/1e3:0,usageDetails:JSON.stringify(s)}}}catch(e){}return{totalStorageSize:0,percentOfQuota:0,usageDetails:""}})),gu=e=>{const t=Object.assign({},e),{apiKey:r}=t;return t.apiKey=`****${r.substring(r.length-4)}`,t};class yu{constructor(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}getSafeMethod(e){var t;if(!this.logger)return()=>{};const r=this.logger[e];if("function"==typeof r){return(null!==(t=r.__rrweb_original__)&&void 0!==t?t:r).bind(this.logger)}return()=>{}}enable(e){this.logger.enable(e)}disable(){this.logger.disable()}}class vu extends f{constructor(e,t){var r;const s={flushMaxRetries:2,logLevel:l.Warn,loggerProvider:new d,transportProvider:new M};super(Object.assign(Object.assign({transportProvider:s.transportProvider,loggerProvider:new yu(t.loggerProvider||s.loggerProvider)},t),{apiKey:e})),this.flushMaxRetries=void 0!==t.flushMaxRetries&&t.flushMaxRetries<=s.flushMaxRetries?t.flushMaxRetries:s.flushMaxRetries,this.apiKey=e,this.sampleRate=t.sampleRate||0,this.serverZone=t.serverZone||au,this.configServerUrl=t.configServerUrl,this.trackServerUrl=t.trackServerUrl,this.shouldInlineStylesheet=t.shouldInlineStylesheet,this.version=t.version,this.performanceConfig=t.performanceConfig,this.storeType=null!==(r=t.storeType)&&void 0!==r?r:"idb",t.privacyConfig&&(this.privacyConfig=t.privacyConfig),t.debugMode&&(this.debugMode=t.debugMode),t.experimental&&(this.experimental=t.experimental)}}class wu{constructor(e,t){this.localConfig=t,this.remoteConfigFetch=e}generateJoinedConfig(e){var t,r,n;return s(this,void 0,void 0,(function*(){const s=Object.assign({},this.localConfig);let o;s.optOut=this.localConfig.optOut,s.captureEnabled=!0;try{const t=yield this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_sampling_config",e),r=yield this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_privacy_config",e);s.interactionConfig=yield this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_interaction_config",e),s.loggingConfig=yield this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_logging_config",e),(t||r)&&(o={},t&&(o.sr_sampling_config=t),r&&(o.sr_privacy_config=r))}catch(e){const t=e;this.localConfig.loggerProvider.warn(t.message),s.captureEnabled=!1}if(!o)return{localConfig:this.localConfig,joinedConfig:s,remoteConfig:o};const{sr_sampling_config:i,sr_privacy_config:a}=o;if(i&&Object.keys(i).length>0?(Object.prototype.hasOwnProperty.call(i,"capture_enabled")?s.captureEnabled=i.capture_enabled:s.captureEnabled=!1,Object.prototype.hasOwnProperty.call(i,"sample_rate")&&(s.sampleRate=i.sample_rate)):(s.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),a){const e=null!==(t=s.privacyConfig)&&void 0!==t?t:{},o={defaultMaskLevel:null!==(n=null!==(r=a.defaultMaskLevel)&&void 0!==r?r:e.defaultMaskLevel)&&void 0!==n?n:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},i=e=>{var t,r,s;const n={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);for(const r of null!==(t=e.blockSelector)&&void 0!==t?t:[])n[r]="block";for(const t of null!==(r=e.maskSelector)&&void 0!==r?r:[])n[t]="mask";for(const t of null!==(s=e.unmaskSelector)&&void 0!==s?s:[])n[t]="unmask";return n},l=Object.assign(Object.assign({},i(e)),i(a));for(const[e,t]of Object.entries(l))"mask"===t?o.maskSelector.push(e):"block"===t?o.blockSelector.push(e):"unmask"===t&&o.unmaskSelector.push(e);s.privacyConfig=((e,t)=>{const r=document.createDocumentFragment(),s=(e=[])=>{if("string"==typeof e&&(e=[e]),e=e.filter((e=>{try{r.querySelector(e)}catch(r){return t.warn(`[session-replay-browser] omitting selector "${e}" because it is invalid`),!1}return!0})),0!==e.length)return e};return e.blockSelector=s(e.blockSelector),e.maskSelector=s(e.maskSelector),e.unmaskSelector=s(e.unmaskSelector),e})(o,this.localConfig.loggerProvider)}return this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:gu(s)},null,2)),{localConfig:this.localConfig,joinedConfig:s,remoteConfig:o}}))}}const bu="Failed to store session replay events in IndexedDB",Su="1.22.10";class Cu{constructor({trackServerUrl:e,loggerProvider:t,payloadBatcher:r}){this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=t,this.payloadBatcher=r||(e=>e),this.trackServerUrl=e}sendEventsList(e){this.addToQueue(Object.assign(Object.assign({},e),{attempts:0,timeout:0}))}addToQueue(...e){e.filter((e=>e.attempts<(e.flushMaxRetries||0)?(e.attempts+=1,!0):(this.completeRequest({context:e,err:"Session replay event batch rejected due to exceeded retry count"}),!1))).forEach((e=>{this.queue=this.queue.concat(e),0!==e.timeout?setTimeout((()=>{e.timeout=0,this.schedule(0)}),e.timeout):this.schedule(0)}))}schedule(e){this.scheduled||(this.scheduled=setTimeout((()=>{this.flush(!0).then((()=>{this.queue.length>0&&this.schedule(e)}))}),e))}flush(e=!1){return s(this,void 0,void 0,(function*(){const t=[],r=[];this.queue.forEach((e=>0===e.timeout?t.push(e):r.push(e))),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),yield Promise.all(t.map((t=>this.send(t,e))))}))}send(e,t=!0){var r,n;return s(this,void 0,void 0,(function*(){const s=e.apiKey;if(!s)return this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"});const o=e.deviceId;if(!o)return this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"});const i=(()=>{const e=c();return(null==e?void 0:e.location)?e.location.href:""})(),a=Su,l=e.sampleRate,u=new URLSearchParams({device_id:o,session_id:`${e.sessionId}`,type:`${e.type}`}),h=`${(null===(r=e.version)||void 0===r?void 0:r.type)||"standalone"}/${(null===(n=e.version)||void 0===n?void 0:n.version)||a}`,d=this.payloadBatcher({version:1,events:e.events});if(0!==d.events.length)try{const r={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:`Bearer ${s}`,"X-Client-Version":a,"X-Client-Library":h,"X-Client-Url":i.substring(0,1e3),"X-Client-Sample-Rate":`${l}`},body:JSON.stringify(d),method:"POST"},n=`${fu(e.serverZone,this.trackServerUrl)}?${u.toString()}`,o=yield fetch(n,r);if(null===o)return void this.completeRequest({context:e,err:"Unexpected error occurred"});if(t)this.handleReponse(o.status,e);else{let t="";try{t=JSON.stringify(o.body,null,2)}catch(e){}this.completeRequest({context:e,success:`${o.status}: ${t}`})}}catch(t){this.completeRequest({context:e,err:t})}else this.completeRequest({context:e})}))}handleReponse(e,t){switch((new A).buildStatus(e)){case o.Success:this.handleSuccessResponse(t);break;case o.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}}handleSuccessResponse(e){const t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:`Session replay event batch tracked successfully for session id ${e.sessionId}, size of events: ${t} KB`})}handleOtherResponse(e){this.addToQueue(Object.assign(Object.assign({},e),{timeout:e.attempts*this.retryTimeout}))}completeRequest({context:e,err:t,success:r}){e.onComplete(),t?this.loggerProvider.warn(t):r&&this.loggerProvider.log(r)}}const Iu=(e,t)=>t.some((t=>e instanceof t));let xu,ku;const Ou=new WeakMap,Eu=new WeakMap,Au=new WeakMap;let Mu={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return Ou.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Tu(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ru(e){Mu=e(Mu)}function Nu(e){return(ku||(ku=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Lu(this),t),Tu(this.request)}:function(...t){return Tu(e.apply(Lu(this),t))}}function Pu(e){return"function"==typeof e?Nu(e):(e instanceof IDBTransaction&&function(e){if(Ou.has(e))return;const t=new Promise(((t,r)=>{const s=()=>{e.removeEventListener("complete",n),e.removeEventListener("error",o),e.removeEventListener("abort",o)},n=()=>{t(),s()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",n),e.addEventListener("error",o),e.addEventListener("abort",o)}));Ou.set(e,t)}(e),Iu(e,xu||(xu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Mu):e)}function Tu(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const s=()=>{e.removeEventListener("success",n),e.removeEventListener("error",o)},n=()=>{t(Tu(e.result)),s()},o=()=>{r(e.error),s()};e.addEventListener("success",n),e.addEventListener("error",o)}));return Au.set(t,e),t}(e);if(Eu.has(e))return Eu.get(e);const t=Pu(e);return t!==e&&(Eu.set(e,t),Au.set(t,e)),t}const Lu=e=>Au.get(e);const Du=["get","getKey","getAll","getAllKeys","count"],Fu=["put","add","delete","clear"],_u=new Map;function Bu(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(_u.get(t))return _u.get(t);const r=t.replace(/FromIndex$/,""),s=t!==r,n=Fu.includes(r);if(!(r in(s?IDBIndex:IDBObjectStore).prototype)||!n&&!Du.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,n?"readwrite":"readonly");let i=o.store;return s&&(i=i.index(t.shift())),(await Promise.all([i[r](...t),n&&o.done]))[0]};return _u.set(t,o),o}Ru((e=>({...e,get:(t,r,s)=>Bu(t,r)||e.get(t,r,s),has:(t,r)=>!!Bu(t,r)||e.has(t,r)})));const Uu=["continue","continuePrimaryKey","advance"],ju={},zu=new WeakMap,Wu=new WeakMap,Vu={get(e,t){if(!Uu.includes(t))return e[t];let r=ju[t];return r||(r=ju[t]=function(...e){zu.set(this,Wu.get(this)[t](...e))}),r}};async function*Gu(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,Vu);for(Wu.set(r,t),Au.set(r,Lu(t));t;)yield r,t=await(zu.get(r)||t.continue()),zu.delete(r)}function Zu(e,t){return t===Symbol.asyncIterator&&Iu(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&Iu(e,[IDBIndex,IDBObjectStore])}Ru((e=>({...e,get:(t,r,s)=>Zu(t,r)?Gu:e.get(t,r,s),has:(t,r)=>Zu(t,r)||e.has(t,r)})));class Yu{get timeAtLastSplit(){return this._timeAtLastSplit}constructor(e){var t,r,s;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=(e,t)=>{const r=new Blob([t]).size;return new Blob(e).size+r>=this.maxPersistedEventsSize||!!(Date.now()-this.timeAtLastSplit>this.interval&&e.length)&&(this.interval=Math.min(this.maxInterval,this.interval+this.minInterval),this._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!==(t=e.minInterval)&&void 0!==t?t:this.minInterval,this.maxInterval=null!==(r=e.maxInterval)&&void 0!==r?r:this.maxInterval,this.maxPersistedEventsSize=null!==(s=e.maxPersistedEventsSize)&&void 0!==s?s:this.maxPersistedEventsSize}}var $u;!function(e){e.RECORDING="recording",e.SENT="sent"}($u||($u={}));const Ju="sessionCurrentSequence",Ku="sequencesToSend",qu=e=>s(void 0,void 0,void 0,(function*(){for(;e.length>0;){const t=10,r=e.splice(0,t);yield Promise.all(r)}})),Xu=e=>{let t,r;return e.objectStoreNames.contains(Ju)||(r=e.createObjectStore(Ju,{keyPath:"sessionId"})),e.objectStoreNames.contains(Ku)||(t=e.createObjectStore(Ku,{keyPath:"sequenceId",autoIncrement:!0}),t.createIndex("sessionId","sessionId")),{sequencesStore:t,currentSequenceStore:r}},Hu=e=>s(void 0,void 0,void 0,(function*(){return yield function(e,t,{blocked:r,upgrade:s,blocking:n,terminated:o}={}){const i=indexedDB.open(e,t),a=Tu(i);return s&&i.addEventListener("upgradeneeded",(e=>{s(Tu(i.result),e.oldVersion,e.newVersion,Tu(i.transaction),e)})),r&&i.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),n&&e.addEventListener("versionchange",(e=>n(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}(e,1,{upgrade:Xu})}));class Qu extends Yu{constructor(e){super(e),this.getSequencesToSend=()=>s(this,void 0,void 0,(function*(){try{const e=[];let t=yield this.db.transaction("sequencesToSend").store.openCursor();for(;t;){const{sessionId:r,events:s}=t.value;e.push({events:s,sequenceId:t.key,sessionId:r}),t=yield t.continue()}return e}catch(e){this.loggerProvider.warn(`${bu}: ${e}`)}})),this.storeCurrentSequence=e=>s(this,void 0,void 0,(function*(){try{const t=yield this.db.get(Ju,e);if(!t)return;const r=yield this.db.put(Ku,{sessionId:e,events:t.events});return yield this.db.put(Ju,{sessionId:e,events:[]}),Object.assign(Object.assign({},t),{sessionId:e,sequenceId:r})}catch(e){this.loggerProvider.warn(`${bu}: ${e}`)}})),this.addEventToCurrentSequence=(e,t)=>s(this,void 0,void 0,(function*(){try{const r=this.db.transaction(Ju,"readwrite"),s=yield r.store.get(e);if(!s)return void(yield r.store.put({sessionId:e,events:[t]}));let n;if(this.shouldSplitEventsList(s.events,t))n=s.events,yield r.store.put({sessionId:e,events:[t]});else{const n=s.events.concat(t);yield r.store.put({sessionId:e,events:n})}if(yield r.done,!n)return;const o=yield this.storeSendingEvents(e,n);if(!o)return;return{events:n,sessionId:e,sequenceId:o}}catch(e){this.loggerProvider.warn(`${bu}: ${e}`)}})),this.storeSendingEvents=(e,t)=>s(this,void 0,void 0,(function*(){try{return yield this.db.put(Ku,{sessionId:e,events:t})}catch(e){this.loggerProvider.warn(`${bu}: ${e}`)}})),this.cleanUpSessionEventsStore=(e,t)=>s(this,void 0,void 0,(function*(){if(t)try{yield this.db.delete(Ku,t)}catch(e){this.loggerProvider.warn(`${bu}: ${e}`)}})),this.transitionFromKeyValStore=e=>s(this,void 0,void 0,(function*(){try{const t=yield function(){const e=c();return new Promise(((t,r)=>{if(!e)return r(new Error("Global scope not found"));if(!e.indexedDB)return r(new Error("Session Replay: cannot find indexedDB"));try{const r=e.indexedDB.open("keyval-store");r.onupgradeneeded=function(){1===r.result.version&&(r.result.close(),r.transaction&&r.transaction.abort(),e.indexedDB.deleteDatabase("keyval-store"),t())},r.onsuccess=function(){t(r.result)}}catch(e){r(e)}}))}();if(!t)return;const r=(e,t)=>s(this,void 0,void 0,(function*(){const r=t.sessionSequences,n=[];Object.keys(r).forEach((o=>{const i=parseInt(o,10),a=r[i];if(i===t.currentSequenceId){const t=a.events.map((t=>s(this,void 0,void 0,(function*(){return this.addEventToCurrentSequence(e,t)}))));n.concat(t)}else a.status!==$u.SENT&&n.push(this.storeSendingEvents(e,a.events))})),yield qu(n)})),n=`${i}_${this.apiKey.substring(0,10)}`;try{const o=t.transaction("keyval").objectStore("keyval").getAll(n),i=new Promise((t=>{o.onsuccess=n=>s(this,void 0,void 0,(function*(){const s=n&&n.target.result,o=s&&s[0];if(o){const t=[];Object.keys(o).forEach((s=>{const n=parseInt(s,10),i=o[n];if(e===n)t.push(r(n,i));else{const e=i.sessionSequences;Object.keys(e).forEach((r=>{const s=parseInt(r,10);e[s].status!==$u.SENT&&t.push(this.storeSendingEvents(n,e[s].events))}))}})),yield qu(t)}t()}))}));yield i;const a=c();a&&a.indexedDB.deleteDatabase("keyval-store")}catch(e){this.loggerProvider.warn(`Failed to transition session replay events from keyval to new store: ${e}`)}}catch(e){this.loggerProvider.warn(`Failed to access keyval store: ${e}. For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices`)}})),this.apiKey=e.apiKey,this.db=e.db}static new(e,t,r){return s(this,void 0,void 0,(function*(){try{const s="replay"===e?"":`_${e}`,n=`${t.apiKey.substring(0,10)}_amp_session_replay_events${s}`,o=yield Hu(n),i=new Qu(Object.assign(Object.assign({},t),{db:o}));return yield i.transitionFromKeyValStore(r),i}catch(e){t.loggerProvider.warn(`${bu}: ${e}`)}}))}getCurrentSequenceEvents(e){return s(this,void 0,void 0,(function*(){if(e){const t=yield this.db.get("sessionCurrentSequence",e);if(!t)return;return[t]}const t=[];for(const e of yield this.db.getAll("sessionCurrentSequence"))t.push(e);return t}))}}class eh extends Yu{constructor(){super(...arguments),this.finalizedSequences={},this.sequences={},this.sequenceId=0}resetCurrentSequence(e){this.sequences[e]=[]}addSequence(e){const t=this.sequenceId++,r=[...this.sequences[e]];return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}}getSequencesToSend(){return s(this,void 0,void 0,(function*(){return Object.entries(this.finalizedSequences).map((([e,{sessionId:t,events:r}])=>({sequenceId:Number(e),sessionId:t,events:r})))}))}storeCurrentSequence(e){return s(this,void 0,void 0,(function*(){if(this.sequences[e])return this.addSequence(e)}))}addEventToCurrentSequence(e,t){return s(this,void 0,void 0,(function*(){let r;return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),r}))}storeSendingEvents(e,t){return s(this,void 0,void 0,(function*(){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},this.sequenceId++}))}cleanUpSessionEventsStore(e,t){return s(this,void 0,void 0,(function*(){void 0!==t&&delete this.finalizedSequences[t]}))}}const th=({config:e,sessionId:t,minInterval:r,maxInterval:n,type:o,payloadBatcher:i,storeType:a})=>s(void 0,void 0,void 0,(function*(){const l=new Cu(Object.assign(Object.assign({},e),{loggerProvider:e.loggerProvider,payloadBatcher:i})),c=()=>new eh({loggerProvider:e.loggerProvider,maxInterval:n,minInterval:r}),u="idb"===a?yield s(void 0,void 0,void 0,(function*(){const s=yield Qu.new(o,{loggerProvider:e.loggerProvider,minInterval:r,maxInterval:n,apiKey:e.apiKey},t);return e.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),null!=s?s:c()})):c(),h=({events:t,sessionId:r,deviceId:n,sequenceId:i})=>{e.debugMode&&mu().then((({totalStorageSize:t,percentOfQuota:r,usageDetails:s})=>{e.loggerProvider.debug(`Total storage size: ${t} KB, percentage of quota: ${r}%, usage details: ${s}`)})).catch((()=>{})),l.sendEventsList({events:t,sessionId:r,flushMaxRetries:e.flushMaxRetries,apiKey:e.apiKey,deviceId:n,sampleRate:e.sampleRate,serverZone:e.serverZone,version:e.version,type:o,onComplete:()=>s(void 0,void 0,void 0,(function*(){yield u.cleanUpSessionEventsStore(r,i)}))})};return{sendCurrentSequenceEvents:({sessionId:t,deviceId:r})=>{u.storeCurrentSequence(t).then((e=>{e&&h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})})).catch((t=>{e.loggerProvider.warn("Failed to get current sequence of session replay events for session:",t)}))},addEvent:({event:t,sessionId:r,deviceId:s})=>{u.addEventToCurrentSequence(r,t.data).then((e=>e&&h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:s}))).catch((t=>{e.loggerProvider.warn("Failed to add event to session replay capture:",t)}))},sendStoredEvents:({deviceId:e})=>s(void 0,void 0,void 0,(function*(){const t=yield u.getSequencesToSend();t&&t.forEach((t=>{h({sequenceId:t.sequenceId,events:t.events,sessionId:t.sessionId,deviceId:e})}))})),flush:function(e=!1){return s(this,void 0,void 0,(function*(){return l.flush(e)}))}}}));class rh{constructor(...e){const t=new Map;e.forEach((e=>{t.set(e.name,e.manager)})),this.managers=t}sendStoredEvents(e){return s(this,void 0,void 0,(function*(){const t=[];this.managers.forEach((r=>{t.push(r.sendStoredEvents(e))})),yield Promise.all(t)}))}addEvent({sessionId:e,event:t,deviceId:r}){var s;null===(s=this.managers.get(t.type))||void 0===s||s.addEvent({sessionId:e,event:t,deviceId:r})}sendCurrentSequenceEvents({sessionId:e,deviceId:t}){this.managers.forEach((r=>{r.sendCurrentSequenceEvents({sessionId:e,deviceId:t})}))}flush(e){return s(this,void 0,void 0,(function*(){const t=[];this.managers.forEach((r=>{t.push(r.flush(e))})),yield Promise.all(t)}))}}var sh=(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))(sh||{});let nh,oh,ih;function ah(e,t){if(ih=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";const r={root:document.body,idName:e=>!0,className:e=>!0,tagName:e=>!0,attr:(e,t)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};nh=Object.assign(Object.assign({},r),t),oh=function(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return e;if(e===t.root)return e.ownerDocument;return e}(nh.root,r);let s=lh(e,"all",(()=>lh(e,"two",(()=>lh(e,"one",(()=>lh(e,"none")))))));if(s){const t=Ih(xh(s,e));return t.length>0&&(s=t[0]),uh(s)}throw new Error("Selector was not found.")}function lh(e,t,r){let s=null,n=[],o=e,i=0;for(;o;){const e=(new Date).getTime()-ih.getTime();if(void 0!==nh.timeoutMs&&e>nh.timeoutMs)throw new Error(`Timeout: Can't find a unique selector after ${e}ms`);let a=bh(ph(o))||bh(...fh(o))||bh(...mh(o))||bh(gh(o))||[{name:"*",penalty:3}];const l=yh(o);if("all"==t)l&&(a=a.concat(a.filter(wh).map((e=>vh(e,l)))));else if("two"==t)a=a.slice(0,1),l&&(a=a.concat(a.filter(wh).map((e=>vh(e,l)))));else if("one"==t){const[e]=a=a.slice(0,1);l&&wh(e)&&(a=[vh(e,l)])}else"none"==t&&(a=[{name:"*",penalty:3}],l&&(a=[vh(a[0],l)]));for(let e of a)e.level=i;if(n.push(a),n.length>=nh.seedMinLength&&(s=ch(n,r),s))break;o=o.parentElement,i++}return s||(s=ch(n,r)),!s&&r?r():s}function ch(e,t){const r=Ih(Ch(e));if(r.length>nh.threshold)return t?t():null;for(let e of r)if(dh(e))return e;return null}function uh(e){let t=e[0],r=t.name;for(let s=1;s<e.length;s++){const n=e[s].level||0;r=t.level===n-1?`${e[s].name} > ${r}`:`${e[s].name} ${r}`,t=e[s]}return r}function hh(e){return e.map((e=>e.penalty)).reduce(((e,t)=>e+t),0)}function dh(e){const t=uh(e);switch(oh.querySelectorAll(t).length){case 0:throw new Error(`Can't select any node with this selector: ${t}`);case 1:return!0;default:return!1}}function ph(e){const t=e.getAttribute("id");return t&&nh.idName(t)?{name:"#"+CSS.escape(t),penalty:0}:null}function fh(e){const t=Array.from(e.attributes).filter((e=>nh.attr(e.name,e.value)));return t.map((e=>({name:`[${CSS.escape(e.name)}="${CSS.escape(e.value)}"]`,penalty:.5})))}function mh(e){return Array.from(e.classList).filter(nh.className).map((e=>({name:"."+CSS.escape(e),penalty:1})))}function gh(e){const t=e.tagName.toLowerCase();return nh.tagName(t)?{name:t,penalty:2}:null}function yh(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let s=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&s++,r!==e);)r=r.nextSibling;return s}function vh(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function wh(e){return"html"!==e.name&&!e.name.startsWith("#")}function bh(...e){const t=e.filter(Sh);return t.length>0?t:null}function Sh(e){return null!=e}function*Ch(e,t=[]){if(e.length>0)for(let r of e[0])yield*Ch(e.slice(1,e.length),t.concat(r));else yield t}function Ih(e){return[...e].sort(((e,t)=>hh(e)-hh(t)))}function*xh(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>nh.optimizedMinLength)for(let s=1;s<e.length-1;s++){if(r.counter>nh.maxNumberOfTries)return;r.counter+=1;const n=[...e];n.splice(s,1);const o=uh(n);if(r.visited.has(o))return;dh(n)&&kh(n,t)&&(yield n,r.visited.set(o,!0),yield*xh(n,t,r))}}function kh(e,t){return oh.querySelector(uh(e))===t}const Oh=({version:e,events:t})=>{const r=[];return t.forEach((e=>{const t=JSON.parse(e);t.count=1,"click"===t.type&&r.push(t)})),{version:e,events:r}},Eh=({version:e,events:t})=>{const r=[];t.forEach((e=>{const t=JSON.parse(e);"click"===t.type&&r.push(t)}));const s=r.reduce(((e,t)=>{const{x:r,y:s,selector:n,timestamp:o}=t,i=o-o%36e5,a=`${r}:${s}:${null!=n?n:""}:${i}`;return e[a]?e[a].count+=1:e[a]=Object.assign(Object.assign({},t),{timestamp:i,count:1}),e}),{});return{version:e,events:Object.values(s)}},Ah=(e,{eventsManager:t,sessionId:r,deviceIdFn:s})=>n=>{if(n.type!==sh.Click)return;const o=c();if(!o)return;const{location:i,innerHeight:a,innerWidth:l}=o;if(!i)return;const{x:u,y:h}=n;if(void 0===u||void 0===h)return;const d=Jc.mirror.getNode(n.id);let p;if(d)try{p=ah(d)}catch(t){e.debug("error resolving selector from finder")}const{left:f,top:m}=Zl.getWindowScroll(o),g={x:u+f,y:h+m,selector:p,viewportHeight:a,viewportWidth:l,pageUrl:i.href,timestamp:Date.now(),type:"click"},y=s();y&&t.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(g)},deviceId:y})};class Mh{constructor(e,t){const r=c();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=(e,t)=>{try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=()=>!1,this.sendXhr=(e,t)=>{const r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=fu(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}send(e,t){const{sessionId:r,type:s}=this.context,n=new URLSearchParams({device_id:e,session_id:String(r),type:String(s),api_key:this.apiKey}),o=`${this.basePageUrl}?${n.toString()}`;this.sendBeacon(o,t)||this.sendXhr(o,t)}}const{getWindowHeight:Rh,getWindowWidth:Nh}=Zl;class Ph{static default(e,t){return new Ph(new Mh(e,t))}constructor(e){this.timestamp=Date.now(),this.hook=e=>{this.update(e)},this.send=e=>t=>{const r=e(),s=c();s&&r&&this.transport.send(r,{version:1,events:[{maxScrollX:this._maxScrollX,maxScrollY:this._maxScrollY,maxScrollWidth:this._maxScrollWidth,maxScrollHeight:this._maxScrollHeight,viewportHeight:Rh(),viewportWidth:Nh(),pageUrl:s.location.href,timestamp:this.timestamp,type:"scroll"}]})},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=Nh(),this._maxScrollHeight=Rh(),this.transport=e}get maxScrollX(){return this._maxScrollX}get maxScrollY(){return this._maxScrollY}get maxScrollWidth(){return this._maxScrollWidth}get maxScrollHeight(){return this._maxScrollHeight}update(e){const t=Date.now();if(e.x>this._maxScrollX){const r=Nh();this._maxScrollX=e.x;const s=e.x+r;s>this._maxScrollWidth&&(this._maxScrollWidth=s),this.timestamp=t}if(e.y>this._maxScrollY){const r=Rh();this._maxScrollY=e.y;const s=e.y+r;s>this._maxScrollHeight&&(this._maxScrollHeight=s),this.timestamp=t}}}class Th{constructor({sessionId:e,deviceId:t}){this.deviceId=t,this.sessionId=e,e&&t&&(this.sessionReplayId=((e,t)=>`${t}/${e}`)(e,t))}}var Lh=Uint8Array,Dh=Uint16Array,Fh=Uint32Array,_h=new Lh([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]),Bh=new Lh([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]),Uh=new Lh([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),jh=function(e,t){for(var r=new Dh(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];var n=new Fh(r[30]);for(s=1;s<30;++s)for(var o=r[s];o<r[s+1];++o)n[o]=o-r[s]<<5|s;return[r,n]},zh=jh(_h,2),Wh=zh[0],Vh=zh[1];Wh[28]=258,Vh[258]=28;for(var Gh=jh(Bh,0)[1],Zh=new Dh(32768),Yh=0;Yh<32768;++Yh){var $h=(43690&Yh)>>>1|(21845&Yh)<<1;$h=(61680&($h=(52428&$h)>>>2|(13107&$h)<<2))>>>4|(3855&$h)<<4,Zh[Yh]=((65280&$h)>>>8|(255&$h)<<8)>>>1}var Jh=function(e,t,r){for(var s=e.length,n=0,o=new Dh(t);n<s;++n)++o[e[n]-1];var i,a=new Dh(t);for(n=0;n<t;++n)a[n]=a[n-1]+o[n-1]<<1;if(r){i=new Dh(1<<t);var l=15-t;for(n=0;n<s;++n)if(e[n])for(var c=n<<4|e[n],u=t-e[n],h=a[e[n]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)i[Zh[h]>>>l]=c}else for(i=new Dh(s),n=0;n<s;++n)i[n]=Zh[a[e[n]-1]++]>>>15-e[n];return i},Kh=new Lh(288);for(Yh=0;Yh<144;++Yh)Kh[Yh]=8;for(Yh=144;Yh<256;++Yh)Kh[Yh]=9;for(Yh=256;Yh<280;++Yh)Kh[Yh]=7;for(Yh=280;Yh<288;++Yh)Kh[Yh]=8;var qh=new Lh(32);for(Yh=0;Yh<32;++Yh)qh[Yh]=5;var Xh=Jh(Kh,9,0),Hh=Jh(qh,5,0),Qh=function(e){return(e/8|0)+(7&e&&1)},ed=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var s=new(e instanceof Dh?Dh:e instanceof Fh?Fh:Lh)(r-t);return s.set(e.subarray(t,r)),s},td=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>>8},rd=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>>8,e[s+2]|=r>>>16},sd=function(e,t){for(var r=[],s=0;s<e.length;++s)e[s]&&r.push({s:s,f:e[s]});var n=r.length,o=r.slice();if(!n)return[new Lh(0),0];if(1==n){var i=new Lh(r[0].s+1);return i[r[0].s]=1,[i,1]}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var a=r[0],l=r[1],c=0,u=1,h=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=n-1;)a=r[r[c].f<r[h].f?c++:h++],l=r[c!=u&&r[c].f<r[h].f?c++:h++],r[u++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(s=1;s<n;++s)o[s].s>d&&(d=o[s].s);var p=new Dh(d+1),f=nd(r[u-1],p,0);if(f>t){s=0;var m=0,g=f-t,y=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));s<n;++s){var v=o[s].s;if(!(p[v]>t))break;m+=y-(1<<f-p[v]),p[v]=t}for(m>>>=g;m>0;){var w=o[s].s;p[w]<t?m-=1<<t-p[w]++-1:++s}for(;s>=0&&m;--s){var b=o[s].s;p[b]==t&&(--p[b],++m)}f=t}return[new Lh(p),f]},nd=function(e,t,r){return-1==e.s?Math.max(nd(e.l,t,r+1),nd(e.r,t,r+1)):t[e.s]=r},od=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Dh(++t),s=0,n=e[0],o=1,i=function(e){r[s++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++o;else{if(!n&&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(n),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(n);o=1,n=e[a]}return[r.subarray(0,s),t]},id=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},ad=function(e,t,r){var s=r.length,n=Qh(t+2);e[n]=255&s,e[n+1]=s>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var o=0;o<s;++o)e[n+o+4]=r[o];return 8*(n+4+s)},ld=function(e,t,r,s,n,o,i,a,l,c,u){td(t,u++,r),++n[256];for(var h=sd(n,15),d=h[0],p=h[1],f=sd(o,15),m=f[0],g=f[1],y=od(d),v=y[0],w=y[1],b=od(m),S=b[0],C=b[1],I=new Dh(19),x=0;x<v.length;++x)I[31&v[x]]++;for(x=0;x<S.length;++x)I[31&S[x]]++;for(var k=sd(I,7),O=k[0],E=k[1],A=19;A>4&&!O[Uh[A-1]];--A);var M,R,N,P,T=c+5<<3,L=id(n,Kh)+id(o,qh)+i,D=id(n,d)+id(o,m)+i+14+3*A+id(I,O)+(2*I[16]+3*I[17]+7*I[18]);if(T<=L&&T<=D)return ad(t,u,e.subarray(l,l+c));if(td(t,u,1+(D<L)),u+=2,D<L){M=Jh(d,p,0),R=d,N=Jh(m,g,0),P=m;var F=Jh(O,E,0);td(t,u,w-257),td(t,u+5,C-1),td(t,u+10,A-4),u+=14;for(x=0;x<A;++x)td(t,u+3*x,O[Uh[x]]);u+=3*A;for(var _=[v,S],B=0;B<2;++B){var U=_[B];for(x=0;x<U.length;++x){var j=31&U[x];td(t,u,F[j]),u+=O[j],j>15&&(td(t,u,U[x]>>>5&127),u+=U[x]>>>12)}}}else M=Xh,R=Kh,N=Hh,P=qh;for(x=0;x<a;++x)if(s[x]>255){j=s[x]>>>18&31;rd(t,u,M[j+257]),u+=R[j+257],j>7&&(td(t,u,s[x]>>>23&31),u+=_h[j]);var z=31&s[x];rd(t,u,N[z]),u+=P[z],z>3&&(rd(t,u,s[x]>>>5&8191),u+=Bh[z])}else rd(t,u,M[s[x]]),u+=R[s[x]];return rd(t,u,M[256]),u+R[256]},cd=new Fh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ud=function(e,t,r,s,n){return function(e,t,r,s,n,o){var i=e.length,a=new Lh(s+i+5*(1+Math.floor(i/7e3))+n),l=a.subarray(s,a.length-n),c=0;if(!t||i<8)for(var u=0;u<=i;u+=65535){var h=u+65535;h<i?c=ad(l,c,e.subarray(u,h)):(l[u]=o,c=ad(l,c,e.subarray(u,i)))}else{for(var d=cd[t-1],p=d>>>13,f=8191&d,m=(1<<r)-1,g=new Dh(32768),y=new Dh(m+1),v=Math.ceil(r/3),w=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<w)&m},S=new Fh(25e3),C=new Dh(288),I=new Dh(32),x=0,k=0,O=(u=0,0),E=0,A=0;u<i;++u){var M=b(u),R=32767&u,N=y[M];if(g[R]=N,y[M]=R,E<=u){var P=i-u;if((x>7e3||O>24576)&&P>423){c=ld(e,l,0,S,C,I,k,O,A,u-A,c),O=x=k=0,A=u;for(var T=0;T<286;++T)C[T]=0;for(T=0;T<30;++T)I[T]=0}var L=2,D=0,F=f,_=R-N&32767;if(P>2&&M==b(u-_))for(var B=Math.min(p,P)-1,U=Math.min(32767,u),j=Math.min(258,P);_<=U&&--F&&R!=N;){if(e[u+L]==e[u+L-_]){for(var z=0;z<j&&e[u+z]==e[u+z-_];++z);if(z>L){if(L=z,D=_,z>B)break;var W=Math.min(_,z-2),V=0;for(T=0;T<W;++T){var G=u-_+T+32768&32767,Z=G-g[G]+32768&32767;Z>V&&(V=Z,N=G)}}}_+=(R=N)-(N=g[R])+32768&32767}if(D){S[O++]=268435456|Vh[L]<<18|Gh[D];var Y=31&Vh[L],$=31&Gh[D];k+=_h[Y]+Bh[$],++C[257+Y],++I[$],E=u+L,++x}else S[O++]=e[u],++C[e[u]]}}c=ld(e,l,o,S,C,I,k,O,A,u-A,c)}return ed(a,0,s+Qh(c)+n)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,s,!n)};function hd(e,t){void 0===t&&(t={});var r=function(){var e=1,t=0;return{p:function(r){for(var s=e,n=t,o=r.length,i=0;i!=o;){for(var a=Math.min(i+5552,o);i<a;++i)n+=s+=r[i];s%=65521,n%=65521}e=s,t=n},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}}();r.p(e);var s,n,o,i=ud(e,t,2,4);return s=i,n=t.level,o=0==n?0:n<6?1:9==n?3:2,s[0]=120,s[1]=o<<6|(o?32-2*o:1),function(e,t,r){for(;r;++t)e[t]=r,r>>>=8}(i,i.length-4,r.d()),i}const dd=e=>{const t={...e,v:"v1"};return function(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var s=0;s<e.length;){var n=e[s++];n<128||t?r+=String.fromCharCode(n):n<224?r+=String.fromCharCode((31&n)<<6|63&e[s++]):n<240?r+=String.fromCharCode((15&n)<<12|(63&e[s++])<<6|63&e[s++]):(n=((15&n)<<18|(63&e[s++])<<12|(63&e[s++])<<6|63&e[s++])-65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n))}return r}(hd(function(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new Lh(e.length+(e.length>>>1)),n=0,o=function(e){s[n++]=e},i=0;i<r;++i){if(n+5>s.length){var a=new Lh(n+8+(r-i<<1));a.set(s),s=a}var l=e.charCodeAt(i);l<128||t?o(l):l<2048?(o(192|l>>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++i))>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|63&l)):(o(224|l>>>12),o(128|l>>>6&63),o(128|63&l))}return ed(s,0,n)}(JSON.stringify(t))),!0)};class pd{constructor(e,t,r,s){var n,o,i;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=e=>{const t=dd(e);return JSON.stringify(t)},this.addCompressedEventToManager=(e,t)=>{this.eventsManager&&this.deviceId&&this.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:this.deviceId})},this.addCompressedEvent=(e,t)=>{if(this.worker)this.worker.postMessage({event:e,sessionId:t});else{const r=this.compressEvent(e);this.addCompressedEventToManager(r,t)}},this.terminate=()=>{var e;null===(e=this.worker)||void 0===e||e.terminate()};const a=c();this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null===(n=t.performanceConfig)||void 0===n?void 0:n.timeout)||2e3;const l=null!==(o='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]),o=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]),a=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),o=0;o<31;++o)t[o]=n+=1<<r[o-1];var a=new f(t[30]);for(o=1;o<30;++o)for(var i=t[o];i<t[o+1];++i)a[i]=i-t[o]<<5|o;return[t,a]},v=i(t,2),u=v[0],s=v[1];u[28]=258,s[258]=28;for(var l=i(o,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,o=0,a=new e(n);o<t;++o)++a[r[o]-1];var i,v=new e(n);for(o=0;o<n;++o)v[o]=v[o-1]+a[o-1]<<1;if(f){i=new e(1<<n);var u=15-n;for(o=0;o<t;++o)if(r[o])for(var s=o<<4|r[o],l=n-r[o],h=v[r[o]-1]++<<l,g=h|(1<<l)-1;h<=g;++h)i[c[h]>>>u]=s}else for(i=new e(t),o=0;o<t;++o)i[o]=c[v[r[o]-1]++]>>>15-r[o];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 M=w(d,9,0),y=w(m,5,0),b=function(r){return(r/8|0)+(7&r&&1)},p=function(r,t,o){(null==o||o>r.length)&&(o=r.length);var a=new(r instanceof e?e:r instanceof f?f:n)(o-t);return a.set(r.subarray(t,o)),a},C=function(r,n,e){e<<=7&n;var f=n/8|0;r[f]|=e,r[f+1]|=e>>>8},x=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},S=function(r,f){for(var t=[],o=0;o<r.length;++o)r[o]&&t.push({s:o,f:r[o]});var a=t.length,i=t.slice();if(!a)return[new n(0),0];if(1==a){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!=a-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(o=1;o<a;++o)i[o].s>g&&(g=i[o].s);var w=new e(g+1),d=A(t[c-1],w,0);if(d>f){o=0;var m=0,M=d-f,y=1<<M;for(i.sort((function(r,n){return w[n.s]-w[r.s]||r.f-n.f}));o<a;++o){var b=i[o].s;if(!(w[b]>f))break;m+=y-(1<<d-w[b]),w[b]=f}for(m>>>=M;m>0;){var p=i[o].s;w[p]<f?m-=1<<f-w[p]++-1:++o}for(;o>=0&&m;--o){var C=i[o].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,o=r[0],a=1,i=function(r){f[t++]=r},v=1;v<=n;++v)if(r[v]==o&&v!=n)++a;else{if(!o&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(o),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(o);a=1,o=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=b(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 o=0;o<f;++o)r[t+o+4]=e[o];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 b=S(v,15),p=b[0],A=b[1],E=S(u,15),U=E[0],D=E[1],I=O(p),J=I[0],N=I[1],W=O(U),_=W[0],j=W[1],P=new e(19),q=0;q<J.length;++q)P[31&J[q]]++;for(q=0;q<_.length;++q)P[31&_[q]]++;for(var z=S(P,7),B=z[0],F=z[1],G=19;G>4&&!B[a[G-1]];--G);var H,K,L,Q,R=h+5<<3,V=T(v,d)+T(u,m)+s,X=T(v,p)+T(u,U)+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(p,A,0),K=p,L=w(U,D,0),Q=U;var Y=w(B,F,0);C(n,g,N-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[a[q]]);g+=3*G;for(var Z=[J,_],$=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=M,K=d,L=y,Q=m;for(q=0;q<l;++q)if(i[q]>255){nr=i[q]>>>18&31;x(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];x(n,g,L[er]),g+=Q[er],er>3&&(x(n,g,i[q]>>>5&8191),g+=o[er])}else x(n,g,H[i[q]]),g+=K[i[q]];return x(n,g,H[256]),g+K[256]},U=new f([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=function(r,a,i,v,u){return function(r,a,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(!a||h<8)for(var m=0;m<=h;m+=65535){var M=m+65535;M<h?d=k(w,d,r.subarray(m,M)):(w[m]=c,d=k(w,d,r.subarray(m,h)))}else{for(var y=U[a-1],C=y>>>13,x=8191&y,S=(1<<i)-1,A=new e(32768),O=new e(S+1),T=Math.ceil(i/3),D=2*T,I=function(n){return(r[n]^r[n+1]<<T^r[n+2]<<D)&S},J=new f(25e3),N=new e(288),W=new e(32),_=0,j=0,P=(m=0,0),q=0,z=0;m<h;++m){var B=I(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,J,N,W,j,P,z,m-z,d),P=_=j=0,z=m;for(var K=0;K<286;++K)N[K]=0;for(K=0;K<30;++K)W[K]=0}var L=2,Q=0,R=x,V=F-G&32767;if(H>2&&B==I(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){J[P++]=268435456|s[L]<<18|l[Q];var tr=31&s[L],or=31&l[Q];j+=t[tr]+o[or],++N[257+tr],++W[or],q=m+L,++_}else J[P++]=r[m],++N[r[m]]}}d=E(r,w,c,J,N,W,j,P,z,m-z,d)}return p(g,0,v+b(d)+u)}(r,null==a.level?6:a.level,null==a.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+a.mem,i,v,!u)};function I(r,n){void 0===n&&(n={});var e=function(){var r=1,n=0;return{p:function(e){for(var f=r,t=n,o=e.length,a=0;a!=o;){for(var i=Math.min(a+5552,o);a<i;++a)t+=f+=e[a];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,o,a=D(r,n,2,4);return f=a,t=n.level,o=0==t?0:t<6?1:9==t?3:2,f[0]=120,f[1]=o<<6|(o?32-2*o:1),function(r,n,e){for(;e;++n)r[n]=e,e>>>=8}(a,a.length-4,e.d()),a}const J=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}(I(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)),o=0,a=function(r){t[o++]=r},i=0;i<f;++i){if(o+5>t.length){var v=new n(o+8+(f-i<<1));v.set(t),t=v}var u=r.charCodeAt(i);u<128||e?a(u):u<2048?(a(192|u>>>6),a(128|63&u)):u>55295&&u<57344?(a(240|(u=65536+(1047552&u)|1023&r.charCodeAt(++i))>>>18),a(128|u>>>12&63),a(128|u>>>6&63),a(128|63&u)):(a(224|u>>>12),a(128|u>>>6&63),a(128|63&u))}return p(t,0,o)}(JSON.stringify(e))),!0)};onmessage=r=>{const{event:n,sessionId:e}=r.data,f=JSON.stringify(J(n));postMessage({compressedEvent:f,sessionId:e})};const N=onmessage;return r.compressionOnMessage=N,Object.defineProperty(r,"__esModule",{value:!0}),r}({});\n')?o:s;if((null===(i=this.config.experimental)||void 0===i?void 0:i.useWebWorker)&&a&&a.Worker&&l){t.loggerProvider.log("[Experimental] Enabling web worker for compression");const e=new Worker(URL.createObjectURL(new Blob([l],{type:"application/javascript"})));e.onerror=e=>{t.loggerProvider.error(e)},e.onmessage=e=>{const{compressedEvent:t,sessionId:r}=e.data;this.addCompressedEventToManager(t,r)},this.worker=e}}scheduleIdleProcessing(){this.isProcessing||(this.isProcessing=!0,requestIdleCallback((e=>{this.processQueue(e)}),{timeout:this.timeout}))}enqueueEvent(e,t){var r;this.canUseIdleCallback&&(null===(r=this.config.performanceConfig)||void 0===r?void 0:r.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))}processQueue(e){for(;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){const e=this.taskQueue.shift();if(e){const{event:t,sessionId:r}=e;this.addCompressedEvent(t,r)}}this.taskQueue.length>0?requestIdleCallback((e=>{this.processQueue(e)}),{timeout:this.timeout}):this.isProcessing=!1}}class fd{constructor(){this.fetchObserver=null}start(e){this.eventCallback=e,this.observeFetch()}stop(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0}notifyEvent(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)}observeFetch(){const e=c();if(!e)return;const t=e.fetch;t&&(e.fetch=(e,r)=>s(this,void 0,void 0,(function*(){const s=Date.now(),n={timestamp:s,type:"fetch",method:(null==r?void 0:r.method)||"GET",url:e.toString(),requestHeaders:null==r?void 0:r.headers};try{const o=yield t(e,r),i=Date.now();n.status=o.status,n.duration=i-s;const a={};return o.headers.forEach(((e,t)=>{a[t]=e})),n.responseHeaders=a,this.notifyEvent(n),o}catch(e){const t=Date.now();n.duration=t-s;const r=e;throw n.error={name:r.name||"UnknownError",message:r.message||"An unknown error occurred"},this.notifyEvent(n),e}})),this.fetchObserver=()=>{e.fetch=t})}}var md,gd=Object.defineProperty,yd=(e,t,r)=>((e,t,r)=>t in e?gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),vd=Object.defineProperty,wd=(e,t,r)=>((e,t,r)=>t in e?vd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),bd=Object.defineProperty,Sd=(e,t,r)=>((e,t,r)=>t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const Cd={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Id={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xd={};function kd(e){if(xd[e])return xd[e];const t=globalThis[e],r=t.prototype,s=e in Cd?Cd[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in Id?Id[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return xd[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?xd[e]=o:r}catch{return r}}const Od={};function Ed(e,t,r){var s;const n=`${e}.${String(r)}`;if(Od[n])return Od[n].call(t);const o=kd(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Od[n]=i,i.call(t)):t[r]}const Ad={};function Md(e,t,r){const s=`${e}.${String(r)}`;if(Ad[s])return Ad[s].bind(t);const n=kd(e)[r];return"function"!=typeof n?t[r]:(Ad[s]=n,n.bind(t))}const Rd={childNodes:function(e){return Ed("Node",e,"childNodes")},parentNode:function(e){return Ed("Node",e,"parentNode")},parentElement:function(e){return Ed("Node",e,"parentElement")},textContent:function(e){return Ed("Node",e,"textContent")},contains:function(e,t){return Md("Node",e,"contains")(t)},getRootNode:function(e){return Md("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ed("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ed("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ed("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ed("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return kd("MutationObserver").constructor}};class Nd{constructor(){Sd(this,"idNodeMap",new Map),Sd(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const t=this.getId(e);this.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){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Pd(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Pd(Rd.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Pd(Rd.parentNode(e),t,r)}function Td(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ld(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Dd={exports:{}},Fd=String,_d=function(){return{isColorSupported:!1,reset:Fd,bold:Fd,dim:Fd,italic:Fd,underline:Fd,inverse:Fd,hidden:Fd,strikethrough:Fd,black:Fd,red:Fd,green:Fd,yellow:Fd,blue:Fd,magenta:Fd,cyan:Fd,white:Fd,gray:Fd,bgBlack:Fd,bgRed:Fd,bgGreen:Fd,bgYellow:Fd,bgBlue:Fd,bgMagenta:Fd,bgCyan:Fd,bgWhite:Fd}};Dd.exports=_d(),Dd.exports.createColors=_d;var Bd=Dd.exports;const Ud=Ld(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let jd=Bd,zd=Ud,Wd=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=jd.isColorSupported),zd&&e&&(t=zd(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=jd.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Vd=Wd;Wd.default=Wd;var Gd={};Gd.isClean=Symbol("isClean"),Gd.my=Symbol("my");const Zd={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Yd=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Zd[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Zd[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var $d=Yd;Yd.default=Yd;let Jd=$d;function Kd(e,t){new Jd(t).stringify(e)}var qd=Kd;Kd.default=Kd;let{isClean:Xd,my:Hd}=Gd,Qd=Vd,ep=$d,tp=qd;function rp(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>rp(e,r))):("object"===o&&null!==n&&(n=rp(n)),r[s]=n)}return r}let sp=class{constructor(e={}){this.raws={},this[Xd]=!1,this[Hd]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=rp(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Qd(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Xd]){this[Xd]=!1;let e=this;for(;e=e.parent;)e[Xd]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new ep).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=tp){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var np=sp;sp.default=sp;let op=np,ip=class extends op{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var ap=ip;ip.default=ip;var lp={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:cp,SourceMapGenerator:up}=Ud,{existsSync:hp,readFileSync:dp}=Ud,{dirname:pp,join:fp}=Ud;let mp=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=pp(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new cp(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=pp(e),hp(e))return this.mapFile=e,dp(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof cp)return up.fromSourceMap(t).toString();if(t instanceof up)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=fp(pp(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var gp=mp;mp.default=mp;let{SourceMapConsumer:yp,SourceMapGenerator:vp}=Ud,{fileURLToPath:wp,pathToFileURL:bp}=Ud,{isAbsolute:Sp,resolve:Cp}=Ud,{nanoid:Ip}=lp,xp=Ud,kp=Vd,Op=gp,Ep=Symbol("fromOffsetCache"),Ap=Boolean(yp&&vp),Mp=Boolean(Cp&&Sp),Rp=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Mp||/^\w+:\/\//.test(t.from)||Sp(t.from)?this.file=t.from:this.file=Cp(t.from)),Mp&&Ap){let e=new Op(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 "+Ip(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new kp(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new kp(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(bp&&(n.input.url=bp(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ep])r=this[Ep];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Ep]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Cp(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=Sp(a.source)?bp(a.source):new URL(a.source,this.map.consumer().sourceRoot||bp(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!wp)throw new Error("file: protocol is not available in this PostCSS build");l.file=wp(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var Np=Rp;Rp.default=Rp,xp&&xp.registerInput&&xp.registerInput(Rp);let{SourceMapConsumer:Pp,SourceMapGenerator:Tp}=Ud,{dirname:Lp,relative:Dp,resolve:Fp,sep:_p}=Ud,{pathToFileURL:Bp}=Ud,Up=Np,jp=Boolean(Pp&&Tp),zp=Boolean(Lp&&Fp&&Dp&&_p);var Wp=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Lp(e.file);!1===this.mapOpts.sourcesContent?(t=new Pp(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),zp&&jp&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Tp.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Tp({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 Tp({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Lp(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Lp(Fp(r,this.mapOpts.annotation)));let s=Dp(r,e);return this.memoizedPaths.set(e,s),s}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 Up(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(Bp){let t=Bp(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===_p&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Vp=np,Gp=class extends Vp{constructor(e){super(e),this.type="comment"}};var Zp=Gp;Gp.default=Gp;let Yp,$p,Jp,Kp,{isClean:qp,my:Xp}=Gd,Hp=ap,Qp=Zp,ef=np;function tf(e){return e.map((e=>(e.nodes&&(e.nodes=tf(e.nodes)),delete e.source,e)))}function rf(e){if(e[qp]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)rf(t)}let sf=class e extends ef{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=tf(Yp(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Hp(t)]}else if(t.selector)t=[new $p(t)];else if(t.name)t=[new Jp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Qp(t)]}return t.map((t=>(t[Xp]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[qp]&&rf(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};sf.registerParse=e=>{Yp=e},sf.registerRule=e=>{$p=e},sf.registerAtRule=e=>{Jp=e},sf.registerRoot=e=>{Kp=e};var nf=sf;sf.default=sf,sf.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Jp.prototype):"rule"===e.type?Object.setPrototypeOf(e,$p.prototype):"decl"===e.type?Object.setPrototypeOf(e,Hp.prototype):"comment"===e.type?Object.setPrototypeOf(e,Qp.prototype):"root"===e.type&&Object.setPrototypeOf(e,Kp.prototype),e[Xp]=!0,e.nodes&&e.nodes.forEach((e=>{sf.rebuild(e)}))};let of,af,lf=nf,cf=class extends lf{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new of(new af,this,e).stringify()}};cf.registerLazyResult=e=>{of=e},cf.registerProcessor=e=>{af=e};var uf=cf;cf.default=cf;let hf={};var df=function(e){hf[e]||(hf[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let pf=class{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}};var ff=pf;pf.default=pf;let mf=ff,gf=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new mf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var yf=gf;gf.default=gf;const vf="'".charCodeAt(0),wf='"'.charCodeAt(0),bf="\\".charCodeAt(0),Sf="/".charCodeAt(0),Cf="\n".charCodeAt(0),If=" ".charCodeAt(0),xf="\f".charCodeAt(0),kf="\t".charCodeAt(0),Of="\r".charCodeAt(0),Ef="[".charCodeAt(0),Af="]".charCodeAt(0),Mf="(".charCodeAt(0),Rf=")".charCodeAt(0),Nf="{".charCodeAt(0),Pf="}".charCodeAt(0),Tf=";".charCodeAt(0),Lf="*".charCodeAt(0),Df=":".charCodeAt(0),Ff="@".charCodeAt(0),_f=/[\t\n\f\r "#'()/;[\\\]{}]/g,Bf=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Uf=/.[\r\n"'(/\\]/,jf=/[\da-f]/i;let zf=nf,Wf=class extends zf{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)}};var Vf=Wf;Wf.default=Wf,zf.registerAtRule(Wf);let Gf,Zf,Yf=nf,$f=class extends Yf{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Gf(new Zf,this,e).stringify()}};$f.registerLazyResult=e=>{Gf=e},$f.registerProcessor=e=>{Zf=e};var Jf=$f;$f.default=$f,Yf.registerRoot($f);let Kf={comma:e=>Kf.split(e,[","],!0),space:e=>Kf.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var qf=Kf;Kf.default=Kf;let Xf=nf,Hf=qf,Qf=class extends Xf{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Hf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var em=Qf;Qf.default=Qf,Xf.registerRule(Qf);let tm=ap,rm=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case Cf:case If:case kf:case Of:case xf:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===If||r===Cf||r===kf||r===Of||r===xf);h=["space",d.slice(m,s)],m=s-1;break;case Ef:case Af:case Nf:case Pf:case Df:case Tf:case Rf:{let e=String.fromCharCode(r);h=[e,e,m];break}case Mf:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==vf&&u!==wf&&u!==If&&u!==Cf&&u!==kf&&u!==xf&&u!==Of){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===bf;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Uf.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case vf:case wf:n=r===vf?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===bf;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case Ff:_f.lastIndex=m+1,_f.test(d),s=0===_f.lastIndex?d.length-1:_f.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case bf:for(s=m,i=!0;d.charCodeAt(s+1)===bf;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==Sf&&r!==If&&r!==Cf&&r!==kf&&r!==Of&&r!==xf&&(s+=1,jf.test(d.charAt(s)))){for(;jf.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===If&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===Sf&&d.charCodeAt(m+1)===Lf?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Bf.lastIndex=m+1,Bf.test(d),s=0===Bf.lastIndex?d.length-1:Bf.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},sm=Zp,nm=Vf,om=Jf,im=em;const am={empty:!0,space:!0};var lm=class{constructor(e){this.input=e,this.root=new om,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,r,s,n=new nm;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new sm;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=rm(this.input)}decl(e,t){let r=new tm;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new im;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",am[a]||am[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new im;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let cm=nf,um=lm,hm=Np;function dm(e,t){let r=new hm(e,t),s=new um(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var pm=dm;dm.default=dm,cm.registerParse(dm);let{isClean:fm,my:mm}=Gd,gm=Wp,ym=qd,vm=nf,wm=uf,bm=df,Sm=yf,Cm=pm,Im=Jf;const xm={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},km={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},Om={Once:!0,postcssPlugin:!0,prepare:!0};function Em(e){return"object"==typeof e&&"function"==typeof e.then}function Am(e){let t=!1,r=xm[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Mm(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Am(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Rm(e){return e[fm]=!1,e.nodes&&e.nodes.forEach((e=>Rm(e))),e}let Nm={},Pm=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Sm)n=Rm(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Cm;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[mm]&&vm.rebuild(n)}else n=Rm(r);this.result=new Sm(t,n,s),this.helpers={...Nm,postcss:Nm,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!km[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Om[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(Em(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fm];){e[fm]=!0;let t=[Mm(e)];for(;t.length>0;){let e=this.visitTick(t);if(Em(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Em(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=ym;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new gm(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(Em(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fm];)e[fm]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||bm("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Em(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[fm])return s[fm]=!0,void e.push(Mm(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[fm]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[fm]=!0;let t=Am(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[fm]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};Pm.registerPostcss=e=>{Nm=e};var Tm=Pm;Pm.default=Pm,Im.registerLazyResult(Pm),wm.registerLazyResult(Pm);let Lm=Wp,Dm=qd,Fm=df,_m=pm;const Bm=yf;let Um=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Dm;this.result=new Bm(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Lm(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||Fm("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=_m;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"}};var jm=Um;Um.default=Um;let zm=jm,Wm=Tm,Vm=uf,Gm=Jf,Zm=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Wm(this,e,t):new zm(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ym=Zm;Zm.default=Zm,Gm.registerProcessor(Zm),Vm.registerProcessor(Zm);let $m=ap,Jm=gp,Km=Zp,qm=Vf,Xm=Np,Hm=Jf,Qm=em;function eg(e,t){if(Array.isArray(e))return e.map((e=>eg(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Xm.prototype};r.map&&(r.map={...r.map,__proto__:Jm.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>eg(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Hm(s);if("decl"===s.type)return new $m(s);if("rule"===s.type)return new Qm(s);if("comment"===s.type)return new Km(s);if("atrule"===s.type)return new qm(s);throw new Error("Unknown node type: "+e.type)}var tg=eg;eg.default=eg;let rg=Vd,sg=ap,ng=Tm,og=nf,ig=Ym,ag=qd,lg=tg,cg=uf,ug=ff,hg=Zp,dg=Vf,pg=yf,fg=Np,mg=pm,gg=qf,yg=em,vg=Jf,wg=np;function bg(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new ig(e)}bg.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new ig).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return bg([n(r)]).process(e,t)},n},bg.stringify=ag,bg.parse=mg,bg.fromJSON=lg,bg.list=gg,bg.comment=e=>new hg(e),bg.atRule=e=>new dg(e),bg.decl=e=>new sg(e),bg.rule=e=>new yg(e),bg.root=e=>new vg(e),bg.document=e=>new cg(e),bg.CssSyntaxError=rg,bg.Declaration=sg,bg.Container=og,bg.Processor=ig,bg.Document=cg,bg.Comment=hg,bg.Warning=ug,bg.AtRule=dg,bg.Result=pg,bg.Input=fg,bg.Rule=yg,bg.Root=vg,bg.Node=wg,ng.registerPostcss(bg);var Sg=bg;bg.default=bg;const Cg=Td(Sg);Cg.stringify,Cg.fromJSON,Cg.plugin,Cg.parse,Cg.list,Cg.document,Cg.comment,Cg.atRule,Cg.rule,Cg.decl,Cg.root,Cg.CssSyntaxError,Cg.Declaration,Cg.Container,Cg.Processor,Cg.Document,Cg.Comment,Cg.Warning,Cg.AtRule,Cg.Result,Cg.Input,Cg.Rule,Cg.Root,Cg.Node;var Ig=Object.defineProperty,xg=(e,t,r)=>((e,t,r)=>t in e?Ig(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function kg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Og(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Eg={exports:{}},Ag=String,Mg=function(){return{isColorSupported:!1,reset:Ag,bold:Ag,dim:Ag,italic:Ag,underline:Ag,inverse:Ag,hidden:Ag,strikethrough:Ag,black:Ag,red:Ag,green:Ag,yellow:Ag,blue:Ag,magenta:Ag,cyan:Ag,white:Ag,gray:Ag,bgBlack:Ag,bgRed:Ag,bgGreen:Ag,bgYellow:Ag,bgBlue:Ag,bgMagenta:Ag,bgCyan:Ag,bgWhite:Ag}};Eg.exports=Mg(),Eg.exports.createColors=Mg;var Rg=Eg.exports;const Ng=Og(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Pg=Rg,Tg=Ng,Lg=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Pg.isColorSupported),Tg&&e&&(t=Tg(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Pg.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Dg=Lg;Lg.default=Lg;var Fg={};Fg.isClean=Symbol("isClean"),Fg.my=Symbol("my");const _g={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Bg=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),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&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return _g[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=_g[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");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&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Ug=Bg;Bg.default=Bg;let jg=Ug;function zg(e,t){new jg(t).stringify(e)}var Wg=zg;zg.default=zg;let{isClean:Vg,my:Gg}=Fg,Zg=Dg,Yg=Ug,$g=Wg;function Jg(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>Jg(e,r))):("object"===o&&null!==n&&(n=Jg(n)),r[s]=n)}return r}let Kg=class{constructor(e={}){this.raws={},this[Vg]=!1,this[Gg]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=Jg(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Zg(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Vg]){this[Vg]=!1;let e=this;for(;e=e.parent;)e[Vg]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Yg).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=$g){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var qg=Kg;Kg.default=Kg;let Xg=qg,Hg=class extends Xg{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Qg=Hg;Hg.default=Hg;var ey={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:ty,SourceMapGenerator:ry}=Ng,{existsSync:sy,readFileSync:ny}=Ng,{dirname:oy,join:iy}=Ng;let ay=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=oy(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new ty(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=oy(e),sy(e))return this.mapFile=e,ny(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ty)return ry.fromSourceMap(t).toString();if(t instanceof ry)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=iy(oy(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ly=ay;ay.default=ay;let{SourceMapConsumer:cy,SourceMapGenerator:uy}=Ng,{fileURLToPath:hy,pathToFileURL:dy}=Ng,{isAbsolute:py,resolve:fy}=Ng,{nanoid:my}=ey,gy=Ng,yy=Dg,vy=ly,wy=Symbol("fromOffsetCache"),by=Boolean(cy&&uy),Sy=Boolean(fy&&py),Cy=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Sy||/^\w+:\/\//.test(t.from)||py(t.from)?this.file=t.from:this.file=fy(t.from)),Sy&&by){let e=new vy(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 "+my(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new yy(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new yy(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(dy&&(n.input.url=dy(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[wy])r=this[wy];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[wy]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:fy(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=py(a.source)?dy(a.source):new URL(a.source,this.map.consumer().sourceRoot||dy(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!hy)throw new Error("file: protocol is not available in this PostCSS build");l.file=hy(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(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}};var Iy=Cy;Cy.default=Cy,gy&&gy.registerInput&&gy.registerInput(Cy);let{SourceMapConsumer:xy,SourceMapGenerator:ky}=Ng,{dirname:Oy,relative:Ey,resolve:Ay,sep:My}=Ng,{pathToFileURL:Ry}=Ng,Ny=Iy,Py=Boolean(xy&&ky),Ty=Boolean(Oy&&Ay&&Ey&&My);var Ly=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Oy(e.file);!1===this.mapOpts.sourcesContent?(t=new xy(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ty&&Py&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=ky.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ky({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 ky({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Oy(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Oy(Ay(r,this.mapOpts.annotation)));let s=Ey(r,e);return this.memoizedPaths.set(e,s),s}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 Ny(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(Ry){let t=Ry(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===My&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Dy=qg,Fy=class extends Dy{constructor(e){super(e),this.type="comment"}};var _y=Fy;Fy.default=Fy;let By,Uy,jy,zy,{isClean:Wy,my:Vy}=Fg,Gy=Qg,Zy=_y,Yy=qg;function $y(e){return e.map((e=>(e.nodes&&(e.nodes=$y(e.nodes)),delete e.source,e)))}function Jy(e){if(e[Wy]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Jy(t)}let Ky=class e extends Yy{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=$y(By(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Gy(t)]}else if(t.selector)t=[new Uy(t)];else if(t.name)t=[new jy(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Zy(t)]}return t.map((t=>(t[Vy]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Wy]&&Jy(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};Ky.registerParse=e=>{By=e},Ky.registerRule=e=>{Uy=e},Ky.registerAtRule=e=>{jy=e},Ky.registerRoot=e=>{zy=e};var qy=Ky;Ky.default=Ky,Ky.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,jy.prototype):"rule"===e.type?Object.setPrototypeOf(e,Uy.prototype):"decl"===e.type?Object.setPrototypeOf(e,Gy.prototype):"comment"===e.type?Object.setPrototypeOf(e,Zy.prototype):"root"===e.type&&Object.setPrototypeOf(e,zy.prototype),e[Vy]=!0,e.nodes&&e.nodes.forEach((e=>{Ky.rebuild(e)}))};let Xy,Hy,Qy=qy,ev=class extends Qy{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Xy(new Hy,this,e).stringify()}};ev.registerLazyResult=e=>{Xy=e},ev.registerProcessor=e=>{Hy=e};var tv=ev;ev.default=ev;let rv={};var sv=function(e){rv[e]||(rv[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let nv=class{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}};var ov=nv;nv.default=nv;let iv=ov,av=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new iv(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var lv=av;av.default=av;const cv="'".charCodeAt(0),uv='"'.charCodeAt(0),hv="\\".charCodeAt(0),dv="/".charCodeAt(0),pv="\n".charCodeAt(0),fv=" ".charCodeAt(0),mv="\f".charCodeAt(0),gv="\t".charCodeAt(0),yv="\r".charCodeAt(0),vv="[".charCodeAt(0),wv="]".charCodeAt(0),bv="(".charCodeAt(0),Sv=")".charCodeAt(0),Cv="{".charCodeAt(0),Iv="}".charCodeAt(0),xv=";".charCodeAt(0),kv="*".charCodeAt(0),Ov=":".charCodeAt(0),Ev="@".charCodeAt(0),Av=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mv=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Rv=/.[\r\n"'(/\\]/,Nv=/[\da-f]/i;let Pv=qy,Tv=class extends Pv{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)}};var Lv=Tv;Tv.default=Tv,Pv.registerAtRule(Tv);let Dv,Fv,_v=qy,Bv=class extends _v{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)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 s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Dv(new Fv,this,e).stringify()}};Bv.registerLazyResult=e=>{Dv=e},Bv.registerProcessor=e=>{Fv=e};var Uv=Bv;Bv.default=Bv,_v.registerRoot(Bv);let jv={comma:e=>jv.split(e,[","],!0),space:e=>jv.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var zv=jv;jv.default=jv;let Wv=qy,Vv=zv,Gv=class extends Wv{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Vv.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Zv=Gv;Gv.default=Gv,Wv.registerRule(Gv);let Yv=Qg,$v=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case pv:case fv:case gv:case yv:case mv:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===fv||r===pv||r===gv||r===yv||r===mv);h=["space",d.slice(m,s)],m=s-1;break;case vv:case wv:case Cv:case Iv:case Ov:case xv:case Sv:{let e=String.fromCharCode(r);h=[e,e,m];break}case bv:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==cv&&u!==uv&&u!==fv&&u!==pv&&u!==gv&&u!==mv&&u!==yv){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===hv;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Rv.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case cv:case uv:n=r===cv?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===hv;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case Ev:Av.lastIndex=m+1,Av.test(d),s=0===Av.lastIndex?d.length-1:Av.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case hv:for(s=m,i=!0;d.charCodeAt(s+1)===hv;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==dv&&r!==fv&&r!==pv&&r!==gv&&r!==yv&&r!==mv&&(s+=1,Nv.test(d.charAt(s)))){for(;Nv.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===fv&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===dv&&d.charCodeAt(m+1)===kv?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Mv.lastIndex=m+1,Mv.test(d),s=0===Mv.lastIndex?d.length-1:Mv.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},Jv=_y,Kv=Lv,qv=Uv,Xv=Zv;const Hv={empty:!0,space:!0};var Qv=class{constructor(e){this.input=e,this.root=new qv,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,r,s,n=new Kv;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Jv;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=$v(this.input)}decl(e,t){let r=new Yv;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Xv;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&&"rule"===e.type&&!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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",Hv[a]||Hv[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Xv;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}};let ew=qy,tw=Qv,rw=Iy;function sw(e,t){let r=new rw(e,t),s=new tw(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var nw=sw;sw.default=sw,ew.registerParse(sw);let{isClean:ow,my:iw}=Fg,aw=Ly,lw=Wg,cw=qy,uw=tv,hw=sv,dw=lv,pw=nw,fw=Uv;const mw={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gw={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},yw={Once:!0,postcssPlugin:!0,prepare:!0};function vw(e){return"object"==typeof e&&"function"==typeof e.then}function ww(e){let t=!1,r=mw[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function bw(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ww(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Sw(e){return e[ow]=!1,e.nodes&&e.nodes.forEach((e=>Sw(e))),e}let Cw={},Iw=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof dw)n=Sw(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=pw;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[iw]&&cw.rebuild(n)}else n=Sw(r);this.result=new dw(t,n,s),this.helpers={...Cw,postcss:Cw,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&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.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!gw[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yw[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(vw(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ow];){e[ow]=!0;let t=[bw(e)];for(;t.length>0;){let e=this.visitTick(t);if(vw(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return vw(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)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=lw;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new aw(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(vw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ow];)e[ow]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||hw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(vw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[ow])return s[ow]=!0,void e.push(bw(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[ow]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ow]=!0;let t=ww(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[ow]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};Iw.registerPostcss=e=>{Cw=e};var xw=Iw;Iw.default=Iw,fw.registerLazyResult(Iw),uw.registerLazyResult(Iw);let kw=Ly,Ow=Wg,Ew=sv,Aw=nw;const Mw=lv;let Rw=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Ow;this.result=new Mw(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new kw(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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"production"!==process.env.NODE_ENV&&("from"in this._opts||Ew("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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=Aw;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"}};var Nw=Rw;Rw.default=Rw;let Pw=Nw,Tw=xw,Lw=tv,Dw=Uv,Fw=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Tw(this,e,t):new Pw(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var _w=Fw;Fw.default=Fw,Dw.registerProcessor(Fw),Lw.registerProcessor(Fw);let Bw=Qg,Uw=ly,jw=_y,zw=Lv,Ww=Iy,Vw=Uv,Gw=Zv;function Zw(e,t){if(Array.isArray(e))return e.map((e=>Zw(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Ww.prototype};r.map&&(r.map={...r.map,__proto__:Uw.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Zw(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Vw(s);if("decl"===s.type)return new Bw(s);if("rule"===s.type)return new Gw(s);if("comment"===s.type)return new jw(s);if("atrule"===s.type)return new zw(s);throw new Error("Unknown node type: "+e.type)}var Yw=Zw;Zw.default=Zw;let $w=Dg,Jw=Qg,Kw=xw,qw=qy,Xw=_w,Hw=Wg,Qw=Yw,eb=tv,tb=ov,rb=_y,sb=Lv,nb=lv,ob=Iy,ib=nw,ab=zv,lb=Zv,cb=Uv,ub=qg;function hb(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Xw(e)}hb.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Xw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return hb([n(r)]).process(e,t)},n},hb.stringify=Hw,hb.parse=ib,hb.fromJSON=Qw,hb.list=ab,hb.comment=e=>new rb(e),hb.atRule=e=>new sb(e),hb.decl=e=>new Jw(e),hb.rule=e=>new lb(e),hb.root=e=>new cb(e),hb.document=e=>new eb(e),hb.CssSyntaxError=$w,hb.Declaration=Jw,hb.Container=qw,hb.Processor=Xw,hb.Document=eb,hb.Comment=rb,hb.Warning=tb,hb.AtRule=sb,hb.Result=nb,hb.Input=ob,hb.Rule=lb,hb.Root=cb,hb.Node=ub,Kw.registerPostcss(hb);var db=hb;hb.default=hb;const pb=kg(db);pb.stringify,pb.fromJSON,pb.plugin,pb.parse,pb.list,pb.document,pb.comment,pb.atRule,pb.rule,pb.decl,pb.root,pb.CssSyntaxError,pb.Declaration,pb.Container,pb.Processor,pb.Document,pb.Comment,pb.Warning,pb.AtRule,pb.Result,pb.Input,pb.Rule,pb.Root,pb.Node;class fb{constructor(...e){xg(this,"parentElement",null),xg(this,"parentNode",null),xg(this,"ownerDocument"),xg(this,"firstChild",null),xg(this,"lastChild",null),xg(this,"previousSibling",null),xg(this,"nextSibling",null),xg(this,"ELEMENT_NODE",1),xg(this,"TEXT_NODE",3),xg(this,"nodeType"),xg(this,"nodeName"),xg(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof fb))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const mb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},gb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yb={};function vb(e){if(yb[e])return yb[e];const t=globalThis[e],r=t.prototype,s=e in mb?mb[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in gb?gb[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return yb[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?yb[e]=o:r}catch{return r}}const wb={};function bb(e,t,r){var s;const n=`${e}.${String(r)}`;if(wb[n])return wb[n].call(t);const o=vb(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(wb[n]=i,i.call(t)):t[r]}const Sb={};function Cb(e,t,r){const s=`${e}.${String(r)}`;if(Sb[s])return Sb[s].bind(t);const n=vb(e)[r];return"function"!=typeof n?t[r]:(Sb[s]=n,n.bind(t))}const Ib={childNodes:function(e){return bb("Node",e,"childNodes")},parentNode:function(e){return bb("Node",e,"parentNode")},parentElement:function(e){return bb("Node",e,"parentElement")},textContent:function(e){return bb("Node",e,"textContent")},contains:function(e,t){return Cb("Node",e,"contains")(t)},getRootNode:function(e){return Cb("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?bb("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?bb("Element",e,"shadowRoot"):null},querySelector:function(e,t){return bb("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return bb("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return vb("MutationObserver").constructor}};const xb="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let kb={map:{},getId:()=>(console.error(xb),-1),getNode:()=>(console.error(xb),null),removeNodeFromMap(){console.error(xb)},has:()=>(console.error(xb),!1),reset(){console.error(xb)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(kb=new Proxy(kb,{get:(e,t,r)=>("map"===t&&console.error(xb),Reflect.get(e,t,r))}));let Ob=Date.now;function Eb(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Ib.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ob=()=>(new Date).getTime());function Ab(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Ib.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ib.host(Ib.getRootNode(e))&&(r=Ib.host(Ib.getRootNode(e))),r}function Mb(e){let t,r=e;for(;t=Ab(r);)r=t;return r}function Rb(e){const t=e.ownerDocument;if(!t)return!1;const r=Mb(e);return Ib.contains(t,r)}const Nb=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){wd(this,"id",1),wd(this,"styleIDMap",new WeakMap),wd(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 r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return kb},closestElementOfNode:Eb,getBaseDimension:function e(t,r){var s,n;const o=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Mb,getShadowHost:Ab,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=Ib.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=Ib.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof fb&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Ib.shadowRoot(e)))},hookSetter:function e(t,r,s,n,o=window){const i=o.Object.getOwnPropertyDescriptor(t,r);return o.Object.defineProperty(t,r,n?s:{set(e){setTimeout((()=>{s.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>e(t,r,i||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(Ib.contains(t,e)||Rb(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&Rd.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Rd.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=Ib.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,r))},isBlocked:function(e,t,r,s){if(!e)return!1;const n=Eb(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(Pd(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return Ob},on:function(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)},patch:function(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}},polyfill:function(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)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:o}=n;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(n,o.parent))}else{const e=s.indexOf(o);s.splice(e,0,r(n,null))}}else if(o in t){const e=t[o];e.children.push(r(n,e))}else s.push(r(n,null))}return s},shadowHostInDom:Rb,throttle:function(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)}),a))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var Pb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tb="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Lb=0;Lb<64;Lb++)Tb[Pb.charCodeAt(Lb)]=Lb;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(md=e.contentWindow)?void 0:md.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Db;new Nd,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Db||(Db={}));class Fb{constructor(e){yd(this,"fileName"),yd(this,"functionName"),yd(this,"lineNumber"),yd(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const _b=/(^|@)\S+:\d+/,Bb=/^\s*at .*(\S+:\d+|\(native\))/m,Ub=/^(eval@)?(\[native code])?$/,jb={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Bb)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Bb)}),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,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const s=t.split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:s.pop()),o=s.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Fb({functionName:o,fileName:i,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Ub)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Fb({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Fb({functionName:s,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),s=[];for(let e=2,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new Fb({fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),s=[];for(let e=0,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new Fb({functionName:n[3]||void 0,fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(_b)&&!e.match(/^Error created at/)}),this).map((function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),s=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Fb({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function zb(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const s=e.parentElement,n=[];if(s.children&&s.children.length>0)for(let e=0;e<s.children.length;e++){const t=s.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&n.push(t)}n.length>1&&(r+=`:eq(${n.indexOf(e)})`),t=r+(t?">"+t:""),e=s}return t}function Wb(e){return"[object Object]"===Object.prototype.toString.call(e)}function Vb(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(Wb(e[s])&&Vb(e[s],t-1))return!0;return!1}function Gb(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const s=[],n=[];return JSON.stringify(e,(function(e,t){if(s.length>0){const r=s.indexOf(this);~r?s.splice(r+1):s.push(this),~r?n.splice(r,1/0,e):n.push(e),~s.indexOf(t)&&(t=s[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(t)).join(".")+"]")}else s.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Wb(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Wb(e)&&Vb(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const s=t[r];Array.isArray(s)?e[r]=zb(s.length?s[0]:null):e[r]=s}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}const Zb={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 Yb(e,t,r){const s=r?Object.assign({},Zb,r):Zb,n=s.logger;if(!n)return()=>{};let o;o="string"==typeof n?t[n]:n;let i=0,a=!1;const l=[];if(s.level.includes("error")){const r=t=>{const r=t.message,n=t.error,o=jb.parse(n).map((e=>e.toString())),i=[Gb(r,s.stringifyOptions)];e({level:"error",trace:o,payload:i})};t.addEventListener("error",r),l.push((()=>{t.removeEventListener("error",r)}));const n=t=>{let r,n;t.reason instanceof Error?(r=t.reason,n=[Gb(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[Gb("Uncaught (in promise)",s.stringifyOptions),Gb(t.reason,s.stringifyOptions)]);const o=jb.parse(r).map((e=>e.toString()));e({level:"error",trace:o,payload:n})};t.addEventListener("unhandledrejection",n),l.push((()=>{t.removeEventListener("unhandledrejection",n)}))}for(const e of s.level)l.push(c(o,e));return()=>{l.forEach((e=>e()))};function c(t,r){return t[r]?Nb.patch(t,r,(t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||a)){a=!0;try{const t=jb.parse(new Error).map((e=>e.toString())).splice(1),o=("assert"===r?n.slice(1):n).map((e=>Gb(e,s.stringifyOptions)));i++,i<s.lengthThreshold?e({level:r,trace:t,payload:o}):i===s.lengthThreshold&&e({level:"warn",trace:[],payload:[Gb("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}}})):()=>{}}}const $b="rrweb/console@1";var Jb=Object.freeze({__proto__:null,PLUGIN_NAME:$b,getRecordConsolePlugin:e=>({name:$b,observer:Yb,options:e})});return e.SessionReplay=class{constructor(){this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.pageLeaveFns=[],this.teardownEventListeners=e=>{const t=c();t&&(t.removeEventListener("blur",this.blurListener),t.removeEventListener("focus",this.focusListener),!e&&t.addEventListener("blur",this.blurListener),!e&&t.addEventListener("focus",this.focusListener),t.self&&"onpagehide"in t.self?(t.removeEventListener("pagehide",this.pageLeaveListener),!e&&t.addEventListener("pagehide",this.pageLeaveListener)):(t.removeEventListener("beforeunload",this.pageLeaveListener),!e&&t.addEventListener("beforeunload",this.pageLeaveListener)))},this.blurListener=()=>{this.sendEvents()},this.focusListener=()=>{this.recordEvents(!1)},this.pageLeaveListener=e=>{this.pageLeaveFns.forEach((t=>{t(e)}))},this.addCustomRRWebEvent=(e,t={},r=!0)=>s(this,void 0,void 0,(function*(){try{let s;const n=this.config;if(n&&e!==uu.METADATA&&(s={config:gu(n),version:Su},r)){const e=yield mu();s=Object.assign(Object.assign({},e),s)}this.recordCancelCallback?Jc.addCustomEvent(e,Object.assign(Object.assign({},t),s)):this.loggerProvider.debug(`Not able to add custom replay capture event ${e} due to no ongoing recording.`)}catch(e){this.loggerProvider.debug("Error while adding custom replay capture event: ",e)}})),this.stopRecordingEvents=()=>{var e;try{this.loggerProvider.log("Session Replay capture stopping."),this.recordCancelCallback&&this.recordCancelCallback(),this.recordCancelCallback=null,null===(e=this.networkObservers)||void 0===e||e.stop()}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while stopping replay capture: ${t.toString()}`)}},this.loggerProvider=new yu(new d)}init(e,t){return u(this._init(e,t))}_init(e,t){var r,n,o,i,a,l,u,h;return s(this,void 0,void 0,(function*(){this.loggerProvider=new yu(t.loggerProvider||new d),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.identifiers=new Th({sessionId:t.sessionId,deviceId:t.deviceId}),this.joinedConfigGenerator=yield((e,t)=>s(void 0,void 0,void 0,(function*(){const r=new vu(e,t),s=yield su({localConfig:r,configKeys:["sessionReplay"]});return new wu(s,r)})))(e,t);const{joinedConfig:p,localConfig:f,remoteConfig:m}=yield this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId);if(this.config=p,this.setMetadata(t.sessionId,p,f,m,null===(r=t.version)||void 0===r?void 0:r.version,Su,null===(n=t.version)||void 0===n?void 0:n.type),t.sessionId&&(null===(o=this.config.interactionConfig)||void 0===o?void 0:o.enabled)){const e=Ph.default({sessionId:t.sessionId,type:"interaction"},this.config);this.pageLeaveFns=[e.send(this.getDeviceId.bind(this)).bind(e)],this.scrollHook=e.hook.bind(e)}const g=[];let{storeType:y}=this.config;"idb"!==y||(null===(i=c())||void 0===i?void 0:i.indexedDB)||(y="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log(`Using ${y} for event storage.`);try{const e=yield th({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:y});g.push({name:"replay",manager:e})}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while creating replay events manager: ${t.toString()}`)}if(null===(a=this.config.interactionConfig)||void 0===a?void 0:a.enabled){const e=this.config.interactionConfig.batch?Eh:Oh;try{const t=yield th({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!==(l=this.config.interactionConfig.trackEveryNms)&&void 0!==l?l:3e4,maxInterval:6e4,payloadBatcher:e,storeType:y});g.push({name:"interaction",manager:t})}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while creating interaction events manager: ${t.toString()}`)}}this.eventsManager=new rh(...g),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new pd(this.eventsManager,this.config,this.getDeviceId()),(null===(h=null===(u=this.config.loggingConfig)||void 0===u?void 0:u.network)||void 0===h?void 0:h.enabled)&&(this.networkObservers=new fd),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),this.initialize(!0)}))}setSessionId(e,t){return u(this.asyncSetSessionId(e,t))}asyncSetSessionId(e,t){return s(this,void 0,void 0,(function*(){const r=this.identifiers&&this.identifiers.sessionId;r&&this.sendEvents(r);const s=t||this.getDeviceId();if(this.identifiers=new Th({sessionId:e,deviceId:s}),this.joinedConfigGenerator&&r){const{joinedConfig:e}=yield this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId);this.config=e}this.recordEvents()}))}getSessionReplayProperties(){const e=this.config,t=this.identifiers;if(!e||!t)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};const r=this.getShouldRecord();let s={};return r&&(s={[iu]:t.sessionReplayId?t.sessionReplayId:null},e.debugMode&&(s[lu]=JSON.stringify({appHash:pu(e.apiKey).toString()}))),this.addCustomRRWebEvent(uu.GET_SR_PROPS,{shouldRecord:r,eventProperties:s},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,s}sendEvents(e){var t;const r=e||(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId),s=this.getDeviceId();this.eventsManager&&r&&s&&this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:s})}initialize(e=!1){var t;return s(this,void 0,void 0,(function*(){if(!(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId))return this.loggerProvider.log("Session is not being recorded due to lack of session id."),Promise.resolve();const r=this.getDeviceId();return r?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:r}),this.recordEvents()):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),Promise.resolve())}))}shouldOptOut(){var e,t;let r;if(null===(e=this.config)||void 0===e?void 0:e.instanceName){r=(s=this.config.instanceName,void 0===s&&(s="$default_instance"),E.getInstance(s)).identityStore.getIdentity().optOut}var s;return void 0!==r?r:null===(t=this.config)||void 0===t?void 0:t.optOut}getShouldRecord(){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} 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;const e=function(e,t){const r=pu(e.toString());return 31*Math.abs(r)%1e6/1e6<t}(this.identifiers.sessionId,this.config.sampleRate);return e||this.loggerProvider.log(`Opting session ${this.identifiers.sessionId} out of recording due to sample rate.`),e}getBlockSelectors(){var e,t,r;const s=null!==(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.blockSelector)&&void 0!==r?r:[];if(0!==s.length)return s}getMaskTextSelectors(){var e,t,r,s;if("conservative"===(null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.defaultMaskLevel))return"*";const n=null===(s=null===(r=this.config)||void 0===r?void 0:r.privacyConfig)||void 0===s?void 0:s.maskSelector;return n||void 0}getRecordingPlugins(e){var t;return s(this,void 0,void 0,(function*(){const r=[];if(null===(t=null==e?void 0:e.console)||void 0===t?void 0:t.enabled)try{const{getRecordConsolePlugin:t}=yield Promise.resolve().then((function(){return Jb}));r.push(t({level:e.console.levels}))}catch(e){this.loggerProvider.warn("Failed to load console plugin:",e)}return r.length>0?r:void 0}))}recordEvents(e=!0){var t,r;return s(this,void 0,void 0,(function*(){const s=this.config,n=this.getShouldRecord(),o=null===(t=this.identifiers)||void 0===t?void 0:t.sessionId;if(!n||!o||!s)return;this.stopRecordingEvents(),null===(r=this.networkObservers)||void 0===r||r.start((e=>{this.addCustomRRWebEvent(uu.FETCH_REQUEST,e)}));const{privacyConfig:i,interactionConfig:a,loggingConfig:l}=s,c=(null==a?void 0:a.enabled)?{mouseInteraction:this.eventsManager&&Ah(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:o,deviceIdFn:this.getDeviceId.bind(this)}),scroll:this.scrollHook}:{};this.loggerProvider.log(`Session Replay capture beginning for ${o}.`);try{this.recordCancelCallback=Jc({emit:e=>{if(this.shouldOptOut())return this.loggerProvider.log(`Opting session ${o} out of recording due to optOut config.`),this.stopRecordingEvents(),void this.sendEvents();this.eventCompressor&&this.eventCompressor.enqueueEvent(e,o)},inlineStylesheet:s.shouldInlineStylesheet,hooks:c,maskAllInputs:!0,maskTextClass:cu,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),maskInputFn:du("input",i),maskTextFn:du("text",i),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,errorHandler:e=>{const t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return this.loggerProvider.warn("Error while capturing replay: ",t.toString()),!0},plugins:yield this.getRecordingPlugins(l)}),this.addCustomRRWebEvent(uu.DEBUG_INFO),e&&this.addCustomRRWebEvent(uu.METADATA,this.metadata)}catch(e){this.loggerProvider.warn("Failed to initialize session replay:",e)}}))}getDeviceId(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId}getSessionId(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId}flush(e=!1){var t;return s(this,void 0,void 0,(function*(){return null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)}))}shutdown(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()}mapSDKType(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null}setMetadata(e,t,r,s,n,o,i){const a=(null==e?void 0:e.toString())?pu(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:r,remoteConfig:s,sessionId:e,hashValue:a,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(i),replaySDKVersion:n,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
2
2
  //# sourceMappingURL=session-replay-browser-min.js.map