function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./LDObserve-Cc16WfBI-DFwrj9Xf.js","./index-D8-yxEbK.js","./index-BFl0hGbo.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
import{Q as iu}from"./index-D8-yxEbK.js";var ni={},nu=Object.defineProperty,ru=(e,t,s)=>t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,He=(e,t,s)=>ru(e,typeof t!="symbol"?t+"":t,s),ou=(e,t,s)=>new Promise((i,n)=>{var r=a=>{try{o(s.next(a))}catch(c){n(c)}},l=a=>{try{o(s.throw(a))}catch(c){n(c)}},o=a=>a.done?i(a.value):Promise.resolve(a.value).then(r,l);o((s=s.apply(e,t)).next())});const Pr=Object.create(null),Se=(e,t,...s)=>{const i=`[@launchdarkly plugins]: (${e}): `;console[t].apply(console,[i,...s]),lu(i,...s)},ot=(e,t,s,...i)=>{Pr[`${e}-${t}`]||(Pr[`${e}-${t}`]=!0,Se(e,s,...i))},lu=(e,...t)=>ou(void 0,null,function*(){try{const{LDObserve:s}=yield iu(()=>import("./LDObserve-Cc16WfBI-DFwrj9Xf.js"),__vite__mapDeps([0,1,2]),import.meta.url);s.recordLog(`${e}${t}`,"warn")}catch{}});class Sl{constructor(t,s){He(this,"debug"),He(this,"name"),this.debug=t,this.name=s}log(...t){if(this.debug){let s=`[${Date.now()}]`;this.name&&(s+=` - ${this.name}`),console.log.apply(console,[s,...t])}}warn(...t){let s=`[${Date.now()}]`;this.name&&(s+=` - ${this.name}`),console.warn.apply(console,[s,...t])}}let Vl=class{constructor(){He(this,"_sdk"),He(this,"_isLoaded",!1),He(this,"_callBuffer",[]),He(this,"_capacity",1e5),He(this,"_droppedEvents",0),He(this,"_exceededCapacity",!1),He(this,"_logger",new Sl)}_bufferCall(e,t){if(this._isLoaded)try{return this._sdk[e](...t)}catch(s){Se(`Error executing buffered call to ${e}:`,"error",s)}else{this._enqueue({method:e,args:t});return}}_enqueue(e){this._callBuffer.length<this._capacity?(this._callBuffer.push(e),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,Se("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(e){this._sdk=e,this._isLoaded=!0;for(const{method:t,args:s}of this._callBuffer)try{this._sdk[t](...s)}catch(i){Se(`Error executing buffered call to ${t}:`,"error",i)}this._callBuffer=[]}};var au=Object.defineProperty,cu=Object.defineProperties,uu=Object.getOwnPropertyDescriptors,ri=Object.getOwnPropertySymbols,Xl=Object.prototype.hasOwnProperty,Cl=Object.prototype.propertyIsEnumerable,fn=(e,t,s)=>t in e?au(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Q=(e,t)=>{for(var s in t||(t={}))Xl.call(t,s)&&fn(e,s,t[s]);if(ri)for(var s of ri(t))Cl.call(t,s)&&fn(e,s,t[s]);return e},oi=(e,t)=>cu(e,uu(t)),Qt=(e,t)=>{var s={};for(var i in e)Xl.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&ri)for(var i of ri(e))t.indexOf(i)<0&&Cl.call(e,i)&&(s[i]=e[i]);return s},is=(e,t,s)=>fn(e,typeof t!="symbol"?t+"":t,s),Wt=(e,t,s)=>new Promise((i,n)=>{var r=a=>{try{o(s.next(a))}catch(c){n(c)}},l=a=>{try{o(s.throw(a))}catch(c){n(c)}},o=a=>a.done?i(a.value):Promise.resolve(a.value).then(r,l);o((s=s.apply(e,t)).next())});function hu(e,t){for(var s=0;s<t.length;s++){const i=t[s];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in e)){const r=Object.getOwnPropertyDescriptor(i,n);r&&Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ds(e,t){throw new Error(t)}function du(e){return typeof e=="object"&&e!==null}function pu(e,t){throw new Error("Unexpected invariant triggered.")}const mu=/\r\n|[\n\r]/g;function yn(e,t){let s=0,i=1;for(const n of e.body.matchAll(mu)){if(typeof n.index=="number"||pu(),n.index>=t)break;s=n.index+n[0].length,i+=1}return{line:i,column:t+1-s}}function bu(e){return Wl(e.source,yn(e.source,e.start))}function Wl(e,t){const s=e.locationOffset.column-1,i="".padStart(s)+e.body,n=t.line-1,r=e.locationOffset.line-1,l=t.line+r,o=t.line===1?s:0,a=t.column+o,c=`${e.name}:${l}:${a}
`,u=i.split(/\r\n|[\n\r]/g),d=u[n];if(d.length>120){const p=Math.floor(a/80),m=a%80,b=[];for(let h=0;h<d.length;h+=80)b.push(d.slice(h,h+80));return c+Br([[`${l} |`,b[0]],...b.slice(1,p+1).map(h=>["|",h]),["|","^".padStart(m)],["|",b[p+1]]])}return c+Br([[`${l-1} |`,u[n-1]],[`${l} |`,d],["|","^".padStart(a)],[`${l+1} |`,u[n+1]]])}function Br(e){const t=e.filter(([i,n])=>n!==void 0),s=Math.max(...t.map(([i])=>i.length));return t.map(([i,n])=>i.padStart(s)+(n?" "+n:"")).join(`
`)}function fu(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}let yu=class Rl extends Error{constructor(t,...s){var i,n,r;const{nodes:l,source:o,positions:a,path:c,originalError:u,extensions:d}=fu(s);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=u??void 0,this.nodes=Dr(Array.isArray(l)?l:l?[l]:void 0);const p=Dr((i=this.nodes)===null||i===void 0?void 0:i.map(b=>b.loc).filter(b=>b!=null));this.source=o??(p==null||(n=p[0])===null||n===void 0?void 0:n.source),this.positions=a??(p==null?void 0:p.map(b=>b.start)),this.locations=a&&o?a.map(b=>yn(o,b)):p==null?void 0:p.map(b=>yn(b.source,b.start));const m=du(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(r=d??m)!==null&&r!==void 0?r:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Rl):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const s of this.nodes)s.loc&&(t+=`

`+bu(s.loc));else if(this.source&&this.locations)for(const s of this.locations)t+=`

`+Wl(this.source,s);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Dr(e){return e===void 0||e.length===0?void 0:e}function ue(e,t,s){return new yu(`Syntax Error: ${s}`,{source:e,positions:[t]})}let gu=class{constructor(e,t,s){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=s}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},kl=class{constructor(e,t,s,i,n,r){this.kind=e,this.start=t,this.end=s,this.line=i,this.column=n,this.value=r,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};const wl={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Zu=new Set(Object.keys(wl));function jr(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&Zu.has(t)}var It;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(It||(It={}));var gn;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(gn||(gn={}));var L;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(L||(L={}));function Zn(e){return e===9||e===32}function ns(e){return e>=48&&e<=57}function vl(e){return e>=97&&e<=122||e>=65&&e<=90}function xl(e){return vl(e)||e===95}function Iu(e){return vl(e)||ns(e)||e===95}function Gu(e){var t;let s=Number.MAX_SAFE_INTEGER,i=null,n=-1;for(let l=0;l<e.length;++l){var r;const o=e[l],a=Su(o);a!==o.length&&(i=(r=i)!==null&&r!==void 0?r:l,n=l,l!==0&&a<s&&(s=a))}return e.map((l,o)=>o===0?l:l.slice(s)).slice((t=i)!==null&&t!==void 0?t:0,n+1)}function Su(e){let t=0;for(;t<e.length&&Zn(e.charCodeAt(t));)++t;return t}function Vu(e,t){const s=e.replace(/"""/g,'\\"""'),i=s.split(/\r\n|[\n\r]/g),n=i.length===1,r=i.length>1&&i.slice(1).every(m=>m.length===0||Zn(m.charCodeAt(0))),l=s.endsWith('\\"""'),o=e.endsWith('"')&&!l,a=e.endsWith("\\"),c=o||a,u=!n||e.length>70||c||r||l;let d="";const p=n&&Zn(e.charCodeAt(0));return(u&&!p||r)&&(d+=`
`),d+=s,(u||c)&&(d+=`
`),'"""'+d+'"""'}var Z;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(Z||(Z={}));let Xu=class{constructor(e){const t=new kl(Z.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Z.EOF)do if(e.next)e=e.next;else{const t=Wu(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===Z.COMMENT);return e}};function Cu(e){return e===Z.BANG||e===Z.DOLLAR||e===Z.AMP||e===Z.PAREN_L||e===Z.PAREN_R||e===Z.SPREAD||e===Z.COLON||e===Z.EQUALS||e===Z.AT||e===Z.BRACKET_L||e===Z.BRACKET_R||e===Z.BRACE_L||e===Z.PIPE||e===Z.BRACE_R}function Yt(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function xi(e,t){return Tl(e.charCodeAt(t))&&Nl(e.charCodeAt(t+1))}function Tl(e){return e>=55296&&e<=56319}function Nl(e){return e>=56320&&e<=57343}function lt(e,t){const s=e.source.body.codePointAt(t);if(s===void 0)return Z.EOF;if(s>=32&&s<=126){const i=String.fromCodePoint(s);return i==='"'?`'"'`:`"${i}"`}return"U+"+s.toString(16).toUpperCase().padStart(4,"0")}function le(e,t,s,i,n){const r=e.line,l=1+s-e.lineStart;return new kl(t,s,i,r,l,n)}function Wu(e,t){const s=e.source.body,i=s.length;let n=t;for(;n<i;){const r=s.charCodeAt(n);switch(r){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++e.line,e.lineStart=n;continue;case 13:s.charCodeAt(n+1)===10?n+=2:++n,++e.line,e.lineStart=n;continue;case 35:return Ru(e,n);case 33:return le(e,Z.BANG,n,n+1);case 36:return le(e,Z.DOLLAR,n,n+1);case 38:return le(e,Z.AMP,n,n+1);case 40:return le(e,Z.PAREN_L,n,n+1);case 41:return le(e,Z.PAREN_R,n,n+1);case 46:if(s.charCodeAt(n+1)===46&&s.charCodeAt(n+2)===46)return le(e,Z.SPREAD,n,n+3);break;case 58:return le(e,Z.COLON,n,n+1);case 61:return le(e,Z.EQUALS,n,n+1);case 64:return le(e,Z.AT,n,n+1);case 91:return le(e,Z.BRACKET_L,n,n+1);case 93:return le(e,Z.BRACKET_R,n,n+1);case 123:return le(e,Z.BRACE_L,n,n+1);case 124:return le(e,Z.PIPE,n,n+1);case 125:return le(e,Z.BRACE_R,n,n+1);case 34:return s.charCodeAt(n+1)===34&&s.charCodeAt(n+2)===34?Nu(e,n):wu(e,n)}if(ns(r)||r===45)return ku(e,n,r);if(xl(r))return Lu(e,n);throw ue(e.source,n,r===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Yt(r)||xi(s,n)?`Unexpected character: ${lt(e,n)}.`:`Invalid character: ${lt(e,n)}.`)}return le(e,Z.EOF,i,i)}function Ru(e,t){const s=e.source.body,i=s.length;let n=t+1;for(;n<i;){const r=s.charCodeAt(n);if(r===10||r===13)break;if(Yt(r))++n;else if(xi(s,n))n+=2;else break}return le(e,Z.COMMENT,t,n,s.slice(t+1,n))}function ku(e,t,s){const i=e.source.body;let n=t,r=s,l=!1;if(r===45&&(r=i.charCodeAt(++n)),r===48){if(r=i.charCodeAt(++n),ns(r))throw ue(e.source,n,`Invalid number, unexpected digit after 0: ${lt(e,n)}.`)}else n=Di(e,n,r),r=i.charCodeAt(n);if(r===46&&(l=!0,r=i.charCodeAt(++n),n=Di(e,n,r),r=i.charCodeAt(n)),(r===69||r===101)&&(l=!0,r=i.charCodeAt(++n),(r===43||r===45)&&(r=i.charCodeAt(++n)),n=Di(e,n,r),r=i.charCodeAt(n)),r===46||xl(r))throw ue(e.source,n,`Invalid number, expected digit but got: ${lt(e,n)}.`);return le(e,l?Z.FLOAT:Z.INT,t,n,i.slice(t,n))}function Di(e,t,s){if(!ns(s))throw ue(e.source,t,`Invalid number, expected digit but got: ${lt(e,t)}.`);const i=e.source.body;let n=t+1;for(;ns(i.charCodeAt(n));)++n;return n}function wu(e,t){const s=e.source.body,i=s.length;let n=t+1,r=n,l="";for(;n<i;){const o=s.charCodeAt(n);if(o===34)return l+=s.slice(r,n),le(e,Z.STRING,t,n+1,l);if(o===92){l+=s.slice(r,n);const a=s.charCodeAt(n+1)===117?s.charCodeAt(n+2)===123?vu(e,n):xu(e,n):Tu(e,n);l+=a.value,n+=a.size,r=n;continue}if(o===10||o===13)break;if(Yt(o))++n;else if(xi(s,n))n+=2;else throw ue(e.source,n,`Invalid character within String: ${lt(e,n)}.`)}throw ue(e.source,n,"Unterminated string.")}function vu(e,t){const s=e.source.body;let i=0,n=3;for(;n<12;){const r=s.charCodeAt(t+n++);if(r===125){if(n<5||!Yt(i))break;return{value:String.fromCodePoint(i),size:n}}if(i=i<<4|jt(r),i<0)break}throw ue(e.source,t,`Invalid Unicode escape sequence: "${s.slice(t,t+n)}".`)}function xu(e,t){const s=e.source.body,i=Qr(s,t+2);if(Yt(i))return{value:String.fromCodePoint(i),size:6};if(Tl(i)&&s.charCodeAt(t+6)===92&&s.charCodeAt(t+7)===117){const n=Qr(s,t+8);if(Nl(n))return{value:String.fromCodePoint(i,n),size:12}}throw ue(e.source,t,`Invalid Unicode escape sequence: "${s.slice(t,t+6)}".`)}function Qr(e,t){return jt(e.charCodeAt(t))<<12|jt(e.charCodeAt(t+1))<<8|jt(e.charCodeAt(t+2))<<4|jt(e.charCodeAt(t+3))}function jt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Tu(e,t){const s=e.source.body;switch(s.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw ue(e.source,t,`Invalid character escape sequence: "${s.slice(t,t+2)}".`)}function Nu(e,t){const s=e.source.body,i=s.length;let n=e.lineStart,r=t+3,l=r,o="";const a=[];for(;r<i;){const c=s.charCodeAt(r);if(c===34&&s.charCodeAt(r+1)===34&&s.charCodeAt(r+2)===34){o+=s.slice(l,r),a.push(o);const u=le(e,Z.BLOCK_STRING,t,r+3,Gu(a).join(`
`));return e.line+=a.length-1,e.lineStart=n,u}if(c===92&&s.charCodeAt(r+1)===34&&s.charCodeAt(r+2)===34&&s.charCodeAt(r+3)===34){o+=s.slice(l,r),l=r+1,r+=4;continue}if(c===10||c===13){o+=s.slice(l,r),a.push(o),c===13&&s.charCodeAt(r+1)===10?r+=2:++r,o="",l=r,n=r;continue}if(Yt(c))++r;else if(xi(s,r))r+=2;else throw ue(e.source,r,`Invalid character within String: ${lt(e,r)}.`)}throw ue(e.source,r,"Unterminated string.")}function Lu(e,t){const s=e.source.body,i=s.length;let n=t+1;for(;n<i;){const r=s.charCodeAt(n);if(Iu(r))++n;else break}return le(e,Z.NAME,t,n,s.slice(t,n))}const Ju=10,Ll=2;function hr(e){return Ti(e,[])}function Ti(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Yu(e,t);default:return String(e)}}function Yu(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const s=[...t,e];if(Fu(e)){const i=e.toJSON();if(i!==e)return typeof i=="string"?i:Ti(i,s)}else if(Array.isArray(e))return Ku(e,s);return Uu(e,s)}function Fu(e){return typeof e.toJSON=="function"}function Uu(e,t){const s=Object.entries(e);return s.length===0?"{}":t.length>Ll?"["+Ou(e)+"]":"{ "+s.map(([i,n])=>i+": "+Ti(n,t)).join(", ")+" }"}function Ku(e,t){if(e.length===0)return"[]";if(t.length>Ll)return"[Array]";const s=Math.min(Ju,e.length),i=e.length-s,n=[];for(let r=0;r<s;++r)n.push(Ti(e[r],t));return i===1?n.push("... 1 more item"):i>1&&n.push(`... ${i} more items`),"["+n.join(", ")+"]"}function Ou(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const s=e.constructor.name;if(typeof s=="string"&&s!=="")return s}return t}const Mu=globalThis.process&&!0,Eu=Mu?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e=="object"&&e!==null){var s;const i=t.prototype[Symbol.toStringTag],n=Symbol.toStringTag in e?e[Symbol.toStringTag]:(s=e.constructor)===null||s===void 0?void 0:s.name;if(i===n){const r=hr(e);throw new Error(`Cannot use ${i} "${r}" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`)}}return!1};let Jl=class{constructor(e,t="GraphQL request",s={line:1,column:1}){typeof e=="string"||Ds(!1,`Body must be a string. Received: ${hr(e)}.`),this.body=e,this.name=t,this.locationOffset=s,this.locationOffset.line>0||Ds(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ds(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function zu(e){return Eu(e,Jl)}function Yl(e,t){const s=new Hu(e,t),i=s.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:s.tokenCount}),i}let Hu=class{constructor(e,t={}){const s=zu(e)?e:new Jl(e);this._lexer=new Xu(s),this._options=t,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(Z.NAME);return this.node(e,{kind:L.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:L.DOCUMENT,definitions:this.many(Z.SOF,this.parseDefinition,Z.EOF)})}parseDefinition(){if(this.peek(Z.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Z.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw ue(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Z.BRACE_L))return this.node(e,{kind:L.OPERATION_DEFINITION,operation:It.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let s;return this.peek(Z.NAME)&&(s=this.parseName()),this.node(e,{kind:L.OPERATION_DEFINITION,operation:t,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Z.NAME);switch(e.value){case"query":return It.QUERY;case"mutation":return It.MUTATION;case"subscription":return It.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Z.PAREN_L,this.parseVariableDefinition,Z.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:L.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Z.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Z.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Z.DOLLAR),this.node(e,{kind:L.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:L.SELECTION_SET,selections:this.many(Z.BRACE_L,this.parseSelection,Z.BRACE_R)})}parseSelection(){return this.peek(Z.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let s,i;return this.expectOptionalToken(Z.COLON)?(s=t,i=this.parseName()):i=t,this.node(e,{kind:L.FIELD,alias:s,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Z.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Z.PAREN_L,t,Z.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,s=this.parseName();return this.expectToken(Z.COLON),this.node(t,{kind:L.ARGUMENT,name:s,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Z.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Z.NAME)?this.node(e,{kind:L.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:L.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:L.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:L.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Z.BRACKET_L:return this.parseList(e);case Z.BRACE_L:return this.parseObject(e);case Z.INT:return this.advanceLexer(),this.node(t,{kind:L.INT,value:t.value});case Z.FLOAT:return this.advanceLexer(),this.node(t,{kind:L.FLOAT,value:t.value});case Z.STRING:case Z.BLOCK_STRING:return this.parseStringLiteral();case Z.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:L.BOOLEAN,value:!0});case"false":return this.node(t,{kind:L.BOOLEAN,value:!1});case"null":return this.node(t,{kind:L.NULL});default:return this.node(t,{kind:L.ENUM,value:t.value})}case Z.DOLLAR:if(e)if(this.expectToken(Z.DOLLAR),this._lexer.token.kind===Z.NAME){const s=this._lexer.token.value;throw ue(this._lexer.source,t.start,`Unexpected variable "$${s}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:L.STRING,value:e.value,block:e.kind===Z.BLOCK_STRING})}parseList(e){const t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:L.LIST,values:this.any(Z.BRACKET_L,t,Z.BRACKET_R)})}parseObject(e){const t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:L.OBJECT,fields:this.any(Z.BRACE_L,t,Z.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,s=this.parseName();return this.expectToken(Z.COLON),this.node(t,{kind:L.OBJECT_FIELD,name:s,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Z.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Z.AT),this.node(t,{kind:L.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Z.BRACKET_L)){const s=this.parseTypeReference();this.expectToken(Z.BRACKET_R),t=this.node(e,{kind:L.LIST_TYPE,type:s})}else t=this.parseNamedType();return this.expectOptionalToken(Z.BANG)?this.node(e,{kind:L.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:L.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Z.STRING)||this.peek(Z.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const s=this.parseConstDirectives(),i=this.many(Z.BRACE_L,this.parseOperationTypeDefinition,Z.BRACE_R);return this.node(e,{kind:L.SCHEMA_DEFINITION,description:t,directives:s,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Z.COLON);const s=this.parseNamedType();return this.node(e,{kind:L.OPERATION_TYPE_DEFINITION,operation:t,type:s})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const s=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:L.SCALAR_TYPE_DEFINITION,description:t,name:s,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const s=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),r=this.parseFieldsDefinition();return this.node(e,{kind:L.OBJECT_TYPE_DEFINITION,description:t,name:s,interfaces:i,directives:n,fields:r})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Z.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Z.BRACE_L,this.parseFieldDefinition,Z.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),s=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Z.COLON);const n=this.parseTypeReference(),r=this.parseConstDirectives();return this.node(e,{kind:L.FIELD_DEFINITION,description:t,name:s,arguments:i,type:n,directives:r})}parseArgumentDefs(){return this.optionalMany(Z.PAREN_L,this.parseInputValueDef,Z.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),s=this.parseName();this.expectToken(Z.COLON);const i=this.parseTypeReference();let n;this.expectOptionalToken(Z.EQUALS)&&(n=this.parseConstValueLiteral());const r=this.parseConstDirectives();return this.node(e,{kind:L.INPUT_VALUE_DEFINITION,description:t,name:s,type:i,defaultValue:n,directives:r})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const s=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),r=this.parseFieldsDefinition();return this.node(e,{kind:L.INTERFACE_TYPE_DEFINITION,description:t,name:s,interfaces:i,directives:n,fields:r})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseUnionMemberTypes();return this.node(e,{kind:L.UNION_TYPE_DEFINITION,description:t,name:s,directives:i,types:n})}parseUnionMemberTypes(){return this.expectOptionalToken(Z.EQUALS)?this.delimitedMany(Z.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();return this.node(e,{kind:L.ENUM_TYPE_DEFINITION,description:t,name:s,directives:i,values:n})}parseEnumValuesDefinition(){return this.optionalMany(Z.BRACE_L,this.parseEnumValueDefinition,Z.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),s=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:L.ENUM_VALUE_DEFINITION,description:t,name:s,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ue(this._lexer.source,this._lexer.token.start,`${Vs(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();return this.node(e,{kind:L.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:s,directives:i,fields:n})}parseInputFieldsDefinition(){return this.optionalMany(Z.BRACE_L,this.parseInputValueDef,Z.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Z.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),s=this.optionalMany(Z.BRACE_L,this.parseOperationTypeDefinition,Z.BRACE_R);if(t.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:L.SCHEMA_EXTENSION,directives:t,operationTypes:s})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(e,{kind:L.SCALAR_TYPE_EXTENSION,name:t,directives:s})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:L.OBJECT_TYPE_EXTENSION,name:t,interfaces:s,directives:i,fields:n})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:L.INTERFACE_TYPE_EXTENSION,name:t,interfaces:s,directives:i,fields:n})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),s=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:L.UNION_TYPE_EXTENSION,name:t,directives:s,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),s=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:L.ENUM_TYPE_EXTENSION,name:t,directives:s,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),s=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:L.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:s,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Z.AT);const s=this.parseName(),i=this.parseArgumentDefs(),n=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const r=this.parseDirectiveLocations();return this.node(e,{kind:L.DIRECTIVE_DEFINITION,description:t,name:s,arguments:i,repeatable:n,locations:r})}parseDirectiveLocations(){return this.delimitedMany(Z.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(gn,t.value))return t;throw this.unexpected(e)}node(e,t){return this._options.noLocation!==!0&&(t.loc=new gu(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw ue(this._lexer.source,t.start,`Expected ${Fl(e)}, found ${Vs(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const t=this._lexer.token;if(t.kind===Z.NAME&&t.value===e)this.advanceLexer();else throw ue(this._lexer.source,t.start,`Expected "${e}", found ${Vs(t)}.`)}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Z.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const t=e??this._lexer.token;return ue(this._lexer.source,t.start,`Unexpected ${Vs(t)}.`)}any(e,t,s){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(s);)i.push(t.call(this));return i}optionalMany(e,t,s){if(this.expectOptionalToken(e)){const i=[];do i.push(t.call(this));while(!this.expectOptionalToken(s));return i}return[]}many(e,t,s){this.expectToken(e);const i=[];do i.push(t.call(this));while(!this.expectOptionalToken(s));return i}delimitedMany(e,t){this.expectOptionalToken(e);const s=[];do s.push(t.call(this));while(this.expectOptionalToken(e));return s}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==Z.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw ue(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function Vs(e){const t=e.value;return Fl(e.kind)+(t!=null?` "${t}"`:"")}function Fl(e){return Cu(e)?`"${e}"`:e}function Pu(e){return`"${e.replace(Bu,Du)}"`}const Bu=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Du(e){return ju[e.charCodeAt(0)]}const ju=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Qu=Object.freeze({});function Au(e,t,s=wl){const i=new Map;for(const I of Object.values(L))i.set(I,_u(t,I));let n,r=Array.isArray(e),l=[e],o=-1,a=[],c=e,u,d;const p=[],m=[];do{o++;const I=o===l.length,V=I&&a.length!==0;if(I){if(u=m.length===0?void 0:p[p.length-1],c=d,d=m.pop(),V)if(r){c=c.slice();let X=0;for(const[S,k]of a){const w=S-X;k===null?(c.splice(w,1),X++):c[w]=k}}else{c=Q({},c);for(const[X,S]of a)c[X]=S}o=n.index,l=n.keys,a=n.edits,r=n.inArray,n=n.prev}else if(d){if(u=r?o:l[o],c=d[u],c==null)continue;p.push(u)}let W;if(!Array.isArray(c)){var b,h;jr(c)||Ds(!1,`Invalid AST Node: ${hr(c)}.`);const X=I?(b=i.get(c.kind))===null||b===void 0?void 0:b.leave:(h=i.get(c.kind))===null||h===void 0?void 0:h.enter;if(W=X==null?void 0:X.call(t,c,u,d,p,m),W===Qu)break;if(W===!1){if(!I){p.pop();continue}}else if(W!==void 0&&(a.push([u,W]),!I))if(jr(W))c=W;else{p.pop();continue}}if(W===void 0&&V&&a.push([u,c]),I)p.pop();else{var G;n={inArray:r,index:o,keys:l,edits:a,prev:n},r=Array.isArray(c),l=r?c:(G=s[c.kind])!==null&&G!==void 0?G:[],o=-1,a=[],d&&m.push(d),d=c}}while(n!==void 0);return a.length!==0?a[a.length-1][1]:e}function _u(e,t){const s=e[t];return typeof s=="object"?s:typeof s=="function"?{enter:s,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ul(e){return Au(e,qu)}const $u=80,qu={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>x(e.definitions,`

`)},OperationDefinition:{leave(e){const t=z("(",x(e.variableDefinitions,", "),")"),s=x([e.operation,x([e.name,t]),x(e.directives," ")]," ");return(s==="query"?"":s+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:s,directives:i})=>e+": "+t+z(" = ",s)+z(" ",x(i," "))},SelectionSet:{leave:({selections:e})=>xe(e)},Field:{leave({alias:e,name:t,arguments:s,directives:i,selectionSet:n}){const r=z("",e,": ")+t;let l=r+z("(",x(s,", "),")");return l.length>$u&&(l=r+z(`(
`,js(x(s,`
`)),`
)`)),x([l,x(i," "),n]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+z(" ",x(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:s})=>x(["...",z("on ",e),x(t," "),s]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:s,directives:i,selectionSet:n})=>`fragment ${e}${z("(",x(s,", "),")")} on ${t} ${z("",x(i," ")," ")}`+n},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Vu(e):Pu(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+x(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+x(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+z("(",x(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:s})=>z("",e,`
`)+x(["schema",x(t," "),xe(s)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:s})=>z("",e,`
`)+x(["scalar",t,x(s," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:s,directives:i,fields:n})=>z("",e,`
`)+x(["type",t,z("implements ",x(s," & ")),x(i," "),xe(n)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:s,type:i,directives:n})=>z("",e,`
`)+t+(Ar(s)?z(`(
`,js(x(s,`
`)),`
)`):z("(",x(s,", "),")"))+": "+i+z(" ",x(n," "))},InputValueDefinition:{leave:({description:e,name:t,type:s,defaultValue:i,directives:n})=>z("",e,`
`)+x([t+": "+s,z("= ",i),x(n," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:s,directives:i,fields:n})=>z("",e,`
`)+x(["interface",t,z("implements ",x(s," & ")),x(i," "),xe(n)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:s,types:i})=>z("",e,`
`)+x(["union",t,x(s," "),z("= ",x(i," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:s,values:i})=>z("",e,`
`)+x(["enum",t,x(s," "),xe(i)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:s})=>z("",e,`
`)+x([t,x(s," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:s,fields:i})=>z("",e,`
`)+x(["input",t,x(s," "),xe(i)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:s,repeatable:i,locations:n})=>z("",e,`
`)+"directive @"+t+(Ar(s)?z(`(
`,js(x(s,`
`)),`
)`):z("(",x(s,", "),")"))+(i?" repeatable":"")+" on "+x(n," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>x(["extend schema",x(e," "),xe(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>x(["extend scalar",e,x(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:s,fields:i})=>x(["extend type",e,z("implements ",x(t," & ")),x(s," "),xe(i)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:s,fields:i})=>x(["extend interface",e,z("implements ",x(t," & ")),x(s," "),xe(i)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:s})=>x(["extend union",e,x(t," "),z("= ",x(s," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:s})=>x(["extend enum",e,x(t," "),xe(s)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:s})=>x(["extend input",e,x(t," "),xe(s)]," ")}};function x(e,t=""){var s;return(s=e==null?void 0:e.filter(i=>i).join(t))!==null&&s!==void 0?s:""}function xe(e){return z(`{
`,js(x(e,`
`)),`
}`)}function z(e,t,s=""){return t!=null&&t!==""?e+t+s:""}function js(e){return z("  ",e.replace(/\n/g,`
  `))}function Ar(e){var t;return(t=e==null?void 0:e.some(s=>s.includes(`
`)))!==null&&t!==void 0?t:!1}const dr=JSON,eh=e=>e.toUpperCase(),th=e=>{const t={};return e.forEach((s,i)=>{t[i]=s}),t},sh=(e,t,s)=>e.document?e:{document:e,variables:t,requestHeaders:s,signal:void 0},ih=(e,t,s)=>e.query?e:{query:e,variables:t,requestHeaders:s,signal:void 0},nh=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},_r=e=>{var t,s;let i;const n=e.definitions.filter(r=>r.kind==="OperationDefinition");return n.length===1&&(i=(s=(t=n[0])==null?void 0:t.name)==null?void 0:s.value),i},ji=e=>{if(typeof e=="string"){let s;try{const i=Yl(e);s=_r(i)}catch{}return{query:e,operationName:s}}const t=_r(e);return{query:Ul(e),operationName:t}};class Xt extends Error{constructor(t,s){const i=`${Xt.extractMessage(t)}: ${JSON.stringify({response:t,request:s})}`;super(i),Object.setPrototypeOf(this,Xt.prototype),this.response=t,this.request=s,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Xt)}static extractMessage(t){var s,i,n;return(n=(i=(s=t.errors)==null?void 0:s[0])==null?void 0:i.message)!=null?n:`GraphQL Error (Code: ${t.status})`}}var rh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var In={exports:{}};(function(e,t){var s=typeof self<"u"?self:rh,i=function(){function r(){this.fetch=!1,this.DOMException=s.DOMException}return r.prototype=s,new r}();(function(r){(function(l){var o={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function a(f){return f&&DataView.prototype.isPrototypeOf(f)}if(o.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(f){return f&&c.indexOf(Object.prototype.toString.call(f))>-1};function d(f){if(typeof f!="string"&&(f=String(f)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(f))throw new TypeError("Invalid character in header field name");return f.toLowerCase()}function p(f){return typeof f!="string"&&(f=String(f)),f}function m(f){var y={next:function(){var T=f.shift();return{done:T===void 0,value:T}}};return o.iterable&&(y[Symbol.iterator]=function(){return y}),y}function b(f){this.map={},f instanceof b?f.forEach(function(y,T){this.append(T,y)},this):Array.isArray(f)?f.forEach(function(y){this.append(y[0],y[1])},this):f&&Object.getOwnPropertyNames(f).forEach(function(y){this.append(y,f[y])},this)}b.prototype.append=function(f,y){f=d(f),y=p(y);var T=this.map[f];this.map[f]=T?T+", "+y:y},b.prototype.delete=function(f){delete this.map[d(f)]},b.prototype.get=function(f){return f=d(f),this.has(f)?this.map[f]:null},b.prototype.has=function(f){return this.map.hasOwnProperty(d(f))},b.prototype.set=function(f,y){this.map[d(f)]=p(y)},b.prototype.forEach=function(f,y){for(var T in this.map)this.map.hasOwnProperty(T)&&f.call(y,this.map[T],T,this)},b.prototype.keys=function(){var f=[];return this.forEach(function(y,T){f.push(T)}),m(f)},b.prototype.values=function(){var f=[];return this.forEach(function(y){f.push(y)}),m(f)},b.prototype.entries=function(){var f=[];return this.forEach(function(y,T){f.push([T,y])}),m(f)},o.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function h(f){if(f.bodyUsed)return Promise.reject(new TypeError("Already read"));f.bodyUsed=!0}function G(f){return new Promise(function(y,T){f.onload=function(){y(f.result)},f.onerror=function(){T(f.error)}})}function I(f){var y=new FileReader,T=G(y);return y.readAsArrayBuffer(f),T}function V(f){var y=new FileReader,T=G(y);return y.readAsText(f),T}function W(f){for(var y=new Uint8Array(f),T=new Array(y.length),K=0;K<y.length;K++)T[K]=String.fromCharCode(y[K]);return T.join("")}function X(f){if(f.slice)return f.slice(0);var y=new Uint8Array(f.byteLength);return y.set(new Uint8Array(f)),y.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(f){this._bodyInit=f,f?typeof f=="string"?this._bodyText=f:o.blob&&Blob.prototype.isPrototypeOf(f)?this._bodyBlob=f:o.formData&&FormData.prototype.isPrototypeOf(f)?this._bodyFormData=f:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)?this._bodyText=f.toString():o.arrayBuffer&&o.blob&&a(f)?(this._bodyArrayBuffer=X(f.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(f)||u(f))?this._bodyArrayBuffer=X(f):this._bodyText=f=Object.prototype.toString.call(f):this._bodyText="",this.headers.get("content-type")||(typeof f=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var f=h(this);if(f)return f;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(I)}),this.text=function(){var f=h(this);if(f)return f;if(this._bodyBlob)return V(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(W(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(f){var y=f.toUpperCase();return k.indexOf(y)>-1?y:f}function v(f,y){y=y||{};var T=y.body;if(f instanceof v){if(f.bodyUsed)throw new TypeError("Already read");this.url=f.url,this.credentials=f.credentials,y.headers||(this.headers=new b(f.headers)),this.method=f.method,this.mode=f.mode,this.signal=f.signal,!T&&f._bodyInit!=null&&(T=f._bodyInit,f.bodyUsed=!0)}else this.url=String(f);if(this.credentials=y.credentials||this.credentials||"same-origin",(y.headers||!this.headers)&&(this.headers=new b(y.headers)),this.method=w(y.method||this.method||"GET"),this.mode=y.mode||this.mode||null,this.signal=y.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(T)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})};function g(f){var y=new FormData;return f.trim().split("&").forEach(function(T){if(T){var K=T.split("="),F=K.shift().replace(/\+/g," "),N=K.join("=").replace(/\+/g," ");y.append(decodeURIComponent(F),decodeURIComponent(N))}}),y}function R(f){var y=new b,T=f.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(K){var F=K.split(":"),N=F.shift().trim();if(N){var A=F.join(":").trim();y.append(N,A)}}),y}S.call(v.prototype);function J(f,y){y||(y={}),this.type="default",this.status=y.status===void 0?200:y.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in y?y.statusText:"OK",this.headers=new b(y.headers),this.url=y.url||"",this._initBody(f)}S.call(J.prototype),J.prototype.clone=function(){return new J(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},J.error=function(){var f=new J(null,{status:0,statusText:""});return f.type="error",f};var E=[301,302,303,307,308];J.redirect=function(f,y){if(E.indexOf(y)===-1)throw new RangeError("Invalid status code");return new J(null,{status:y,headers:{location:f}})},l.DOMException=r.DOMException;try{new l.DOMException}catch{l.DOMException=function(f,y){this.message=f,this.name=y;var T=Error(f);this.stack=T.stack},l.DOMException.prototype=Object.create(Error.prototype),l.DOMException.prototype.constructor=l.DOMException}function _(f,y){return new Promise(function(T,K){var F=new v(f,y);if(F.signal&&F.signal.aborted)return K(new l.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function A(){N.abort()}N.onload=function(){var D={status:N.status,statusText:N.statusText,headers:R(N.getAllResponseHeaders()||"")};D.url="responseURL"in N?N.responseURL:D.headers.get("X-Request-URL");var he="response"in N?N.response:N.responseText;T(new J(he,D))},N.onerror=function(){K(new TypeError("Network request failed"))},N.ontimeout=function(){K(new TypeError("Network request failed"))},N.onabort=function(){K(new l.DOMException("Aborted","AbortError"))},N.open(F.method,F.url,!0),F.credentials==="include"?N.withCredentials=!0:F.credentials==="omit"&&(N.withCredentials=!1),"responseType"in N&&o.blob&&(N.responseType="blob"),F.headers.forEach(function(D,he){N.setRequestHeader(he,D)}),F.signal&&(F.signal.addEventListener("abort",A),N.onreadystatechange=function(){N.readyState===4&&F.signal.removeEventListener("abort",A)}),N.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return _.polyfill=!0,r.fetch||(r.fetch=_,r.Headers=b,r.Request=v,r.Response=J),l.Headers=b,l.Request=v,l.Response=J,l.fetch=_,Object.defineProperty(l,"__esModule",{value:!0}),l})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var n=i;t=n.fetch,t.default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t})(In,In.exports);var li=In.exports;const Qs=pr(li),oh=hu({__proto__:null,default:Qs},[li]),bt=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||oh&&li.Headers&&e instanceof li.Headers?t=th(e):Array.isArray(e)?e.forEach(([s,i])=>{s&&i!==void 0&&(t[s]=i)}):t=e),t},$r=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),lh=e=>{if(!Array.isArray(e.query)){const i=e,n=[`query=${encodeURIComponent($r(i.query))}`];return e.variables&&n.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&n.push(`operationName=${encodeURIComponent(i.operationName)}`),n.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,s=e.query.reduce((i,n,r)=>(i.push({query:$r(n),variables:t.variables?t.jsonSerializer.stringify(t.variables[r]):void 0}),i),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(s))}`},ah=e=>t=>Wt(void 0,null,function*(){var s;const{url:i,query:n,variables:r,operationName:l,fetch:o,fetchOptions:a,middleware:c}=t,u=Q({},t.headers);let d="",p;e==="POST"?(p=uh(n,r,l,a.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):d=lh({query:n,variables:r,operationName:l,jsonSerializer:(s=a.jsonSerializer)!=null?s:dr});const m=Q({method:e,headers:u,body:p},a);let b=i,h=m;if(c){const G=yield Promise.resolve(c(oi(Q({},m),{url:i,operationName:l,variables:r}))),{url:I}=G,V=Qt(G,["url"]);b=I,h=V}return d&&(b=`${b}?${d}`),yield o(b,h)});let ch=class{constructor(e,t={}){this.url=e,this.requestConfig=t,this.rawRequest=(...s)=>Wt(this,null,function*(){const[i,n,r]=s,l=ih(i,n,r),o=this.requestConfig,{headers:a,fetch:c=Qs,method:u="POST",requestMiddleware:d,responseMiddleware:p}=o,m=Qt(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:b}=this;l.signal!==void 0&&(m.signal=l.signal);const{operationName:h}=ji(l.query);return Qi({url:b,query:l.query,variables:l.variables,headers:Q(Q({},bt(Ai(a))),bt(l.requestHeaders)),operationName:h,fetch:c,method:u,fetchOptions:m,middleware:d}).then(G=>(p&&p(G),G)).catch(G=>{throw p&&p(G),G})})}request(e,...t){return Wt(this,null,function*(){const[s,i]=t,n=sh(e,s,i),r=this.requestConfig,{headers:l,fetch:o=Qs,method:a="POST",requestMiddleware:c,responseMiddleware:u}=r,d=Qt(r,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;n.signal!==void 0&&(d.signal=n.signal);const{query:m,operationName:b}=ji(n.document);return Qi({url:p,query:m,variables:n.variables,headers:Q(Q({},bt(Ai(l))),bt(n.requestHeaders)),operationName:b,fetch:o,method:a,fetchOptions:d,middleware:c}).then(h=>(u&&u(h),h.data)).catch(h=>{throw u&&u(h),h})})}batchRequests(e,t){var s;const i=nh(e,t),n=this.requestConfig,{headers:r}=n,l=Qt(n,["headers"]);i.signal!==void 0&&(l.signal=i.signal);const o=i.documents.map(({document:c})=>ji(c).query),a=i.documents.map(({variables:c})=>c);return Qi({url:this.url,query:o,variables:a,headers:Q(Q({},bt(Ai(r))),bt(i.requestHeaders)),operationName:void 0,fetch:(s=this.requestConfig.fetch)!=null?s:Qs,method:this.requestConfig.method||"POST",fetchOptions:l,middleware:this.requestConfig.requestMiddleware}).then(c=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(c),c.data)).catch(c=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(c),c})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){const{headers:s}=this.requestConfig;return s?s[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}};const Qi=e=>Wt(void 0,null,function*(){var t,s;const{query:i,variables:n,fetchOptions:r}=e,l=ah(eh((t=e.method)!=null?t:"post")),o=Array.isArray(e.query),a=yield l(e),c=yield hh(a,(s=r.jsonSerializer)!=null?s:dr),u=Array.isArray(c)?!c.some(({data:p})=>!p):!!c.data,d=Array.isArray(c)||!c.errors||Array.isArray(c.errors)&&!c.errors.length||r.errorPolicy==="all"||r.errorPolicy==="ignore";if(a.ok&&d&&u){const p=c,m=Qt(p,["errors"]),b=r.errorPolicy==="ignore"?m:c;return oi(Q({},o?{data:b}:b),{headers:a.headers,status:a.status})}else{const p=typeof c=="string"?{error:c}:c;throw new Xt(oi(Q({},p),{status:a.status,headers:a.headers}),{query:i,variables:n})}}),uh=(e,t,s,i)=>{const n=i??dr;if(!Array.isArray(e))return n.stringify({query:e,variables:t,operationName:s});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const r=e.reduce((l,o,a)=>(l.push({query:o,variables:t?t[a]:void 0}),l),[]);return n.stringify(r)},hh=(e,t)=>Wt(void 0,null,function*(){let s;return e.headers.forEach((i,n)=>{n.toLowerCase()==="content-type"&&(s=i)}),s&&(s.toLowerCase().startsWith("application/json")||s.toLowerCase().startsWith("application/graphql+json")||s.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(yield e.text()):e.text()}),Ai=e=>typeof e=="function"?e():e;var Gn={exports:{}};(function(e,t){t=e.exports=s,t.getSerialize=i;function s(n,r,l,o){return JSON.stringify(n,i(r,o),l)}function i(n,r){var l=[],o=[];return r==null&&(r=function(a,c){return l[0]===c?"[Circular ~]":"[Circular ~."+o.slice(0,l.indexOf(c)).join(".")+"]"}),function(a,c){if(l.length>0){var u=l.indexOf(this);~u?l.splice(u+1):l.push(this),~u?o.splice(u,1/0,a):o.push(a),~l.indexOf(c)&&(c=r.call(this,a,c))}else l.push(c);return n==null?c:n.call(this,a,c)}}})(Gn,Gn.exports);var dh=Gn.exports;const ph=pr(dh);var ai=function(){return ai=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ai.apply(this,arguments)},As=new Map,Sn=new Map,Kl=!0,ci=!1;function Ol(e){return e.replace(/[\s,]+/g," ").trim()}function mh(e){return Ol(e.source.body.substring(e.start,e.end))}function bh(e){var t=new Set,s=[];return e.definitions.forEach(function(i){if(i.kind==="FragmentDefinition"){var n=i.name.value,r=mh(i.loc),l=Sn.get(n);l&&!l.has(r)?Kl&&console.warn("Warning: fragment with name "+n+` already exists.
graphql-tag enforces all fragment names across your application to be unique; read more about
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):l||Sn.set(n,l=new Set),l.add(r),t.has(r)||(t.add(r),s.push(i))}else s.push(i)}),ai(ai({},e),{definitions:s})}function fh(e){var t=new Set(e.definitions);t.forEach(function(i){i.loc&&delete i.loc,Object.keys(i).forEach(function(n){var r=i[n];r&&typeof r=="object"&&t.add(r)})});var s=e.loc;return s&&(delete s.startToken,delete s.endToken),e}function yh(e){var t=Ol(e);if(!As.has(t)){var s=Yl(e,{experimentalFragmentVariables:ci,allowLegacyFragmentVariables:ci});if(!s||s.kind!=="Document")throw new Error("Not a valid GraphQL document.");As.set(t,fh(bh(s)))}return As.get(t)}function Ze(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];typeof e=="string"&&(e=[e]);var i=e[0];return t.forEach(function(n,r){n&&n.kind==="Document"?i+=n.loc.source.body:i+=n,i+=e[r+1]}),yh(i)}function gh(){As.clear(),Sn.clear()}function Zh(){Kl=!1}function Ih(){ci=!0}function Gh(){ci=!1}var Kt={gql:Ze,resetCaches:gh,disableFragmentWarnings:Zh,enableExperimentalFragmentVariables:Ih,disableExperimentalFragmentVariables:Gh};(function(e){e.gql=Kt.gql,e.resetCaches=Kt.resetCaches,e.disableFragmentWarnings=Kt.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Kt.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Kt.disableExperimentalFragmentVariables})(Ze||(Ze={}));Ze.default=Ze;const Ml=Ze`
	fragment MatchParts on MatchConfig {
		regexValue
		matchValue
	}
`,Sh=Ze`
	mutation PushPayload(
		$session_secure_id: String!
		$payload_id: ID!
		$events: ReplayEventsInput!
		$messages: String!
		$resources: String!
		$web_socket_events: String!
		$errors: [ErrorObjectInput]!
		$is_beacon: Boolean
		$has_session_unloaded: Boolean
		$highlight_logs: String
	) {
		pushPayload(
			session_secure_id: $session_secure_id
			payload_id: $payload_id
			events: $events
			messages: $messages
			resources: $resources
			web_socket_events: $web_socket_events
			errors: $errors
			is_beacon: $is_beacon
			has_session_unloaded: $has_session_unloaded
			highlight_logs: $highlight_logs
		)
	}
`,El=Ze`
	mutation PushSessionEvents(
		$session_secure_id: String!
		$payload_id: Int64ID!
		$data: String!
	) {
		pushSessionEvents(
			session_secure_id: $session_secure_id
			payload_id: $payload_id
			data: $data
		)
	}
`,Vh=Ze`
	mutation identifySession(
		$session_secure_id: String!
		$user_identifier: String!
		$user_object: Any
	) {
		identifySession(
			session_secure_id: $session_secure_id
			user_identifier: $user_identifier
			user_object: $user_object
		)
	}
`,Xh=Ze`
	mutation addSessionProperties(
		$session_secure_id: String!
		$properties_object: Any
	) {
		addSessionProperties(
			session_secure_id: $session_secure_id
			properties_object: $properties_object
		)
	}
`,Ch=Ze`
	mutation pushMetrics($metrics: [MetricInput]!) {
		pushMetrics(metrics: $metrics)
	}
`,Wh=Ze`
	mutation addSessionFeedback(
		$session_secure_id: String!
		$user_name: String
		$user_email: String
		$verbatim: String!
		$timestamp: Timestamp!
	) {
		addSessionFeedback(
			session_secure_id: $session_secure_id
			user_name: $user_name
			user_email: $user_email
			verbatim: $verbatim
			timestamp: $timestamp
		)
	}
`,Rh=Ze`
	mutation initializeSession(
		$session_secure_id: String!
		$session_key: String
		$organization_verbose_id: String!
		$enable_strict_privacy: Boolean!
		$privacy_setting: String!
		$enable_recording_network_contents: Boolean!
		$clientVersion: String!
		$firstloadVersion: String!
		$clientConfig: String!
		$environment: String!
		$id: String!
		$appVersion: String
		$serviceName: String!
		$client_id: String!
		$network_recording_domains: [String!]
		$disable_session_recording: Boolean
	) {
		initializeSession(
			session_secure_id: $session_secure_id
			session_key: $session_key
			organization_verbose_id: $organization_verbose_id
			enable_strict_privacy: $enable_strict_privacy
			enable_recording_network_contents: $enable_recording_network_contents
			clientVersion: $clientVersion
			firstloadVersion: $firstloadVersion
			clientConfig: $clientConfig
			environment: $environment
			appVersion: $appVersion
			serviceName: $serviceName
			fingerprint: $id
			client_id: $client_id
			network_recording_domains: $network_recording_domains
			disable_session_recording: $disable_session_recording
			privacy_setting: $privacy_setting
		) {
			secure_id
			project_id
			sampling {
				spans {
					name {
						...MatchParts
					}
					attributes {
						key {
							...MatchParts
						}
						attribute {
							...MatchParts
						}
					}
					events {
						name {
							...MatchParts
						}
						attributes {
							key {
								...MatchParts
							}
							attribute {
								...MatchParts
							}
						}
					}
					samplingRatio
				}
				logs {
					message {
						...MatchParts
					}
					severityText {
						...MatchParts
					}
					attributes {
						key {
							...MatchParts
						}
						attribute {
							...MatchParts
						}
					}
					samplingRatio
				}
			}
		}
	}
	${Ml}
`,kh=Ze`
	query Ignore($id: ID!) {
		ignore(id: $id)
	}
`,wh=Ze`
	query GetSamplingConfig($organization_verbose_id: String!) {
		sampling(organization_verbose_id: $organization_verbose_id) {
			spans {
				name {
					...MatchParts
				}
				attributes {
					key {
						...MatchParts
					}
					attribute {
						...MatchParts
					}
				}
				events {
					name {
						...MatchParts
					}
					attributes {
						key {
							...MatchParts
						}
						attribute {
							...MatchParts
						}
					}
				}
				samplingRatio
			}
			logs {
				message {
					...MatchParts
				}
				severityText {
					...MatchParts
				}
				attributes {
					key {
						...MatchParts
					}
					attribute {
						...MatchParts
					}
				}
				samplingRatio
			}
		}
	}
	${Ml}
`,vh=(e,t,s,i)=>e();function xh(e,t=vh){return{PushPayload(s,i){return t(n=>e.request(Sh,s,Q(Q({},i),n)),"PushPayload","mutation",s)},PushSessionEvents(s,i){return t(n=>e.request(El,s,Q(Q({},i),n)),"PushSessionEvents","mutation",s)},identifySession(s,i){return t(n=>e.request(Vh,s,Q(Q({},i),n)),"identifySession","mutation",s)},addSessionProperties(s,i){return t(n=>e.request(Xh,s,Q(Q({},i),n)),"addSessionProperties","mutation",s)},pushMetrics(s,i){return t(n=>e.request(Ch,s,Q(Q({},i),n)),"pushMetrics","mutation",s)},addSessionFeedback(s,i){return t(n=>e.request(Wh,s,Q(Q({},i),n)),"addSessionFeedback","mutation",s)},initializeSession(s,i){return t(n=>e.request(Rh,s,Q(Q({},i),n)),"initializeSession","mutation",s)},Ignore(s,i){return t(n=>e.request(kh,s,Q(Q({},i),n)),"Ignore","query",s)},GetSamplingConfig(s,i){return t(n=>e.request(wh,s,Q(Q({},i),n)),"GetSamplingConfig","query",s)}}}function Th(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function Nh(){return Th()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const Lh="telemetry.sdk.name",Jh="telemetry.sdk.version",qr=1e3,Yh=1e3*2,Fh=4*60*60*1e3,mr=15*60*1e3,eo={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Uh=100,to="app.highlight.io",Kh="https://app.launchdarkly.com",Oh={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},Mh="/projects/default",Eh=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.5 | MIT */function Xs(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)e[i]=s[i]}return e}var zh={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Vn(e,t){function s(n,r,l){if(typeof document<"u"){l=Xs({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in l)l[a]&&(o+="; "+a,l[a]!==!0&&(o+="="+l[a].split(";")[0]));return document.cookie=n+"="+e.write(r,n)+o}}function i(n){if(!(typeof document>"u"||arguments.length&&!n)){for(var r=document.cookie?document.cookie.split("; "):[],l={},o=0;o<r.length;o++){var a=r[o].split("="),c=a.slice(1).join("=");try{var u=decodeURIComponent(a[0]);if(l[u]=e.read(c,u),n===u)break}catch{}}return n?l[n]:l}}return Object.create({set:s,get:i,remove:function(n,r){s(n,"",Xs({},r,{expires:-1}))},withAttributes:function(n){return Vn(this.converter,Xs({},this.attributes,n))},withConverter:function(n){return Vn(Xs({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var _i=Vn(zh,{path:"/"}),Xn=(e=>(e.CLIENT_ID="highlightClientID",e))(Xn||{});let ui="localStorage",Cn=!0,Hh=class{constructor(){is(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var t;return(t=Object.keys(this.storage)[e])!=null?t:null}getItem(e){var t;return(t=this.storage[e])!=null?t:""}setItem(e,t){this.storage[e]=t}removeItem(e){delete this.storage[e]}},Ph=class{getItem(e){var t;return(t=_i.get(e))!=null?t:""}setItem(e,t){if(!Cn)return;const s=new Date;s.setTime(s.getTime()+mr),_i.set(e,t,{expires:s})}removeItem(e){Cn&&_i.remove(e)}};const Ct=new Hh,hi=new Ph,rs=()=>{let e=null;if(typeof window>"u")return Ct;try{switch(ui){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(ot("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${ui}; using global storage`),e=Ct)}catch(t){ot("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=Ct}return e},Bh=e=>{ui=e},so=e=>{Cn=e},Xe=e=>{try{return rs().getItem(e)}catch(t){return ot("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),Ct.getItem(e)}},$e=(e,t)=>{hi.setItem(e,t);try{return rs().setItem(e,t)}catch(s){return ot("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),Ct.setItem(e,t)}},di=e=>{hi.removeItem(e);try{return rs().removeItem(e)}catch(t){return ot("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),Ct.removeItem(e)}},Dh=e=>{if(ui==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[s,i]=arguments;e({keyName:s,keyValue:i}),t.apply(this,[s,i])}};var Ve=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(Ve||{});const Ni=e=>`${Ve.SESSION_DATA}_${e}`,jh=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:zl()},Qh=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},zl=()=>{var e;return(e=Xe(Ve.SESSION_ID))!=null?e:""},At=e=>{$e(Ve.SESSION_ID,e)},Ah=e=>{const t=Ni(e);return JSON.parse(Xe(t)||"{}")},_s=e=>{e||(e=zl());let t=Ah(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<mr)return t;di(Ni(e))},nt=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;Qh(t);const s=Ni(t);$e(s,JSON.stringify(e)),$h(s)},_h=function(){const e=hi.getItem(Ve.SESSION_ID);At(e);const t=Ni(e),s=hi.getItem(t);try{nt(JSON.parse(s))}catch{}};function $h(e){const t=`${Ve.SESSION_DATA}_`;for(let s=rs().length-1;s>=0;s--){const i=rs().key(s);if(i&&i.startsWith(t)&&i!==e)try{const n=JSON.parse(Xe(i)||"{}");n.lastPushTime!==void 0&&Date.now()-n.lastPushTime>=mr&&(ot("highlightSession","pruneSessionData","debug",`removing session data for stale key ${i}`),di(i))}catch(n){ot("highlightSession","pruneSessionData","error",`failed to parse session data for key ${i}`,n)}}}var Hl=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Hl||{});const qh=3,ed=1e3,td=500,sd=[Hl.BillingQuotaExceeded.toString()],id=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>sd.includes(s.message)))===void 0},nd=()=>{const e=(t,s,i,n,r=0)=>Wt(void 0,null,function*(){try{return yield t()}catch(l){if(l instanceof Xt&&!id(l))throw l;if(r<qh)return yield new Promise(o=>setTimeout(o,ed+td*Math.pow(2,r))),yield e(t,s,i,n,r+1);throw console.error(`highlight.io: data request failed after ${r} retries`),l}});return e},Pl="feature_flag",Bl="launchdarkly",rd=`${Pl}.set.id`,od=`${Pl}.provider.name`,ld=`${Bl}.application.id`,ad=`${Bl}.application.version`,cd="$ld:telemetry:session:init",io="$ld:telemetry:track";function no(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Dl(e){return e.kind==="multi"}function ro(e){return Dl(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${no(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${no(e.key)}`:e.key}function ud(e){return Dl(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>Q(Q({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let hd=class{constructor(e,t){is(this,"client"),is(this,"metadata"),this.client=e,this.metadata=t}getHooks(e){return[]}init(e){this.client.track(cd,{sessionID:e})}recordGauge(e,t){}identify(e,t,s={},i){}error(e,t){}track(e,t){const s=t.event;this.client.track(s?`${io}:${s}`:io,oi(Q({},t),{sessionID:e}))}},dd=class extends Vl{constructor(e,t){super(),is(this,"client"),this.client=new hd(e,t)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(t,s,i)=>(this.load(this.client),s)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,t){return this._bufferCall("recordGauge",[e,t])}identify(e,t,s={},i){return this._bufferCall("identify",[e,t,s,i])}error(e,t){return this._bufferCall("error",[e,t])}track(e,t){return this._bufferCall("track",[e,t])}};const pd="9.23.0",md={version:pd},bd=md.version;function jl(e,t){return yd(e)}function fd(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const s of e.classList)t.push(`.${s}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const yd=e=>{let t="";const s=e.getAttribute("class"),i=e.getAttribute("id");return i&&(t=t.concat(oo(i,"#"))),s&&(t=t.concat(oo(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},oo=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,gd=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var i,n;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(n=(i=window.screen.orientation)==null?void 0:i.angle)!=null?n:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var Ql={exports:{}};/**
 * @preserve
 * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
 *
 * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
 * @see http://github.com/homebrewing/brauhaus-diff
 * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
 * @see http://github.com/garycourt/murmurhash-js
 * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
 * @see http://sites.google.com/site/murmurhash/
 */(function(e){(function(){var t;function s(i,n){var r=this instanceof s?this:t;if(r.reset(n),typeof i=="string"&&i.length>0&&r.hash(i),r!==this)return r}s.prototype.hash=function(i){var n,r,l,o,a;switch(a=i.length,this.len+=a,r=this.k1,l=0,this.rem){case 0:r^=a>l?i.charCodeAt(l++)&65535:0;case 1:r^=a>l?(i.charCodeAt(l++)&65535)<<8:0;case 2:r^=a>l?(i.charCodeAt(l++)&65535)<<16:0;case 3:r^=a>l?(i.charCodeAt(l)&255)<<24:0,r^=a>l?(i.charCodeAt(l++)&65280)>>8:0}if(this.rem=a+this.rem&3,a-=this.rem,a>0){for(n=this.h1;r=r*11601+(r&65535)*3432906752&4294967295,r=r<<15|r>>>17,r=r*13715+(r&65535)*461832192&4294967295,n^=r,n=n<<13|n>>>19,n=n*5+3864292196&4294967295,!(l>=a);)r=i.charCodeAt(l++)&65535^(i.charCodeAt(l++)&65535)<<8^(i.charCodeAt(l++)&65535)<<16,o=i.charCodeAt(l++),r^=(o&255)<<24^(o&65280)>>8;switch(r=0,this.rem){case 3:r^=(i.charCodeAt(l+2)&65535)<<16;case 2:r^=(i.charCodeAt(l+1)&65535)<<8;case 1:r^=i.charCodeAt(l)&65535}this.h1=n}return this.k1=r,this},s.prototype.result=function(){var i,n;return i=this.k1,n=this.h1,i>0&&(i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,n^=i),n^=this.len,n^=n>>>16,n=n*51819+(n&65535)*2246770688&4294967295,n^=n>>>13,n=n*44597+(n&65535)*3266445312&4294967295,n^=n>>>16,n>>>0},s.prototype.reset=function(i){return this.h1=typeof i=="number"?i:0,this.rem=this.k1=this.len=0,this},t=new s,e.exports=s})()})(Ql);var Zd=Ql.exports;const Id=pr(Zd),$i=28,ft="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Gd=2246822507,_t=e=>{var t,s="";if(e){const i=Id(e).result();for(let n=0;n<$i;n++){const r=((i^n*Gd)>>>0)%ft.length;s+=ft.charAt(r)}}else{const i=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),n=new Uint32Array($i);i&&window.crypto.getRandomValues(n);for(let r=0;r<$i;r++)i?s+=ft.charAt(n[r]%ft.length):s+=ft.charAt(Math.floor(Math.random()*ft.length))}return s};let Sd=class{constructor(e){is(this,"sessionSecureID");try{e!=null&&e.storageMode&&Bh(e==null?void 0:e.storageMode),so(!!(e!=null&&e.sessionCookie)),e!=null&&e.sessionCookie?_h():so(!1)}catch(t){Se("Error initializing @launchdarkly observability plugin","error",t)}}configureSession(e,t){try{const s=jh();let i=_s(s);i!=null&&i.sessionSecureID?this.sessionSecureID=i.sessionSecureID:(t!=null&&t.sessionKey?this.sessionSecureID=_t(`${e}-${t.sessionKey}`):this.sessionSecureID=_t(),At(this.sessionSecureID),nt({sessionSecureID:this.sessionSecureID,sessionKey:t==null?void 0:t.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(s){Se("Error configuring session in @launchdarkly observability plugin","error",s)}}};var Vd=(e,t,s)=>new Promise((i,n)=>{var r=a=>{try{o(s.next(a))}catch(c){n(c)}},l=a=>{try{o(s.throw(a))}catch(c){n(c)}},o=a=>a.done?i(a.value):Promise.resolve(a.value).then(r,l);o((s=s.apply(e,t)).next())});class lo extends Vl{getSession(){return this._isLoaded?this._bufferCall("getSession",[]):null}start(t){return Vd(this,null,function*(){return this._sdk.start(t)})}stop(){return this._sdk.stop()}addSessionProperties(t){return this._bufferCall("addSessionProperties",[t])}getRecordingState(){return this._isLoaded?this._bufferCall("getRecordingState",[]):"NotRecording"}snapshot(t){return this._isLoaded?this._bufferCall("snapshot",[t]):Promise.resolve(void 0)}register(t,s){return this._bufferCall("register",[t,s])}}let Gt;typeof globalThis<"u"?globalThis.LDRecord?Gt=globalThis.LDRecord:(Gt=new lo,globalThis.LDRecord=Gt):Gt=new lo;var Xd=Object.defineProperty,Cd=Object.defineProperties,Wd=Object.getOwnPropertyDescriptors,pi=Object.getOwnPropertySymbols,Al=Object.prototype.hasOwnProperty,_l=Object.prototype.propertyIsEnumerable,Wn=(e,t,s)=>t in e?Xd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Y=(e,t)=>{for(var s in t||(t={}))Al.call(t,s)&&Wn(e,s,t[s]);if(pi)for(var s of pi(t))_l.call(t,s)&&Wn(e,s,t[s]);return e},Ie=(e,t)=>Cd(e,Wd(t)),Rt=(e,t)=>{var s={};for(var i in e)Al.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&pi)for(var i of pi(e))t.indexOf(i)<0&&_l.call(e,i)&&(s[i]=e[i]);return s},U=(e,t,s)=>Wn(e,typeof t!="symbol"?t+"":t,s),fe=(e,t,s)=>new Promise((i,n)=>{var r=a=>{try{o(s.next(a))}catch(c){n(c)}},l=a=>{try{o(s.throw(a))}catch(c){n(c)}},o=a=>a.done?i(a.value):Promise.resolve(a.value).then(r,l);o((s=s.apply(e,t)).next())});const Rd={key:"_sid"},kd="rrweb/sequential-id@1",wd=e=>{const t=Rd;let s=0;return{name:kd,eventProcessor(i){return Object.assign(i,{[t.key]:++s}),i},options:t}};var vd=Object.defineProperty,xd=(e,t,s)=>t in e?vd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,C=(e,t,s)=>xd(e,typeof t!="symbol"?t+"":t,s),ao,Td=Object.defineProperty,Nd=(e,t,s)=>t in e?Td(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,co=(e,t,s)=>Nd(e,typeof t!="symbol"?t+"":t,s),ae=(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))(ae||{});const uo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ho={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Cs={},Ld=()=>!!globalThis.Zone;function br(e){if(Cs[e])return Cs[e];const t=globalThis[e],s=t.prototype,i=e in uo?uo[e]:void 0,n=!!(i&&i.every(o=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(s,o))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),r=e in ho?ho[e]:void 0,l=!!(r&&r.every(o=>{var a;return typeof s[o]=="function"&&((a=s[o])==null?void 0:a.toString().includes("[native code]"))}));if(n&&l&&!Ld())return Cs[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const a=o.contentWindow;if(!a)return t.prototype;const c=a[e].prototype;return document.body.removeChild(o),c?Cs[e]=c:s}catch{return s}}const qi={};function qe(e,t,s){var i;const n=`${e}.${String(s)}`;if(qi[n])return qi[n].call(t);const r=br(e),l=(i=Object.getOwnPropertyDescriptor(r,s))==null?void 0:i.get;return l?(qi[n]=l,l.call(t)):t[s]}const en={};function $l(e,t,s){const i=`${e}.${String(s)}`;if(en[i])return en[i].bind(t);const n=br(e)[s];return typeof n!="function"?t[s]:(en[i]=n,n.bind(t))}function Jd(e){return qe("Node",e,"childNodes")}function Yd(e){return qe("Node",e,"parentNode")}function Fd(e){return qe("Node",e,"parentElement")}function Ud(e){return qe("Node",e,"textContent")}function Kd(e,t){return $l("Node",e,"contains")(t)}function Od(e){return $l("Node",e,"getRootNode")()}function Md(e){return!e||!("host"in e)?null:qe("ShadowRoot",e,"host")}function Ed(e){return e.styleSheets}function zd(e){return!e||!("shadowRoot"in e)?null:qe("Element",e,"shadowRoot")}function Hd(e,t){return qe("Element",e,"querySelector")(t)}function Pd(e,t){return qe("Element",e,"querySelectorAll")(t)}function Bd(){return br("MutationObserver").constructor}function Dd(e,t,s){try{if(!(t in e))return()=>{};const i=e[t],n=s(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch{return()=>{}}}const de={childNodes:Jd,parentNode:Yd,parentElement:Fd,textContent:Ud,contains:Kd,getRootNode:Od,host:Md,styleSheets:Ed,shadowRoot:zd,querySelector:Hd,querySelectorAll:Pd,mutationObserver:Bd,patch:Dd};function ql(e){return e.nodeType===e.ELEMENT_NODE}function $t(e){const t=e&&"host"in e&&"mode"in e&&de.host(e)||null;return!!(t&&"shadowRoot"in t&&de.shadowRoot(t)===e)}function qt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function jd(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Qd(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}function Rn(e){try{const t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const i=Array.from(t,n=>ea(n,s)).join("");return jd(i)}catch{return null}}function ea(e,t){if(_d(e)){let s;try{s=Rn(e.styleSheet)||Qd(e)}catch{s=e.cssText}return e.styleSheet.href?fi(s,e.styleSheet.href):s}else{let s=e.cssText;return $d(e)&&e.selectorText.includes(":")&&(s=Ad(s)),t?fi(s,t):s}}function Ad(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function _d(e){return"styleSheet"in e}function $d(e){return"selectorText"in e}class ta{constructor(){co(this,"idNodeMap",new Map),co(this,"nodeMetaMap",new WeakMap)}getId(t){var s;return t?((s=this.getMeta(t))==null?void 0:s.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const i=s.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,s)}replace(t,s){const i=this.getNode(t);if(i){const n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(s,n)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function qd(){return new ta}function mi({element:e,maskInputOptions:t,tagName:s,type:i,value:n,overwriteRecord:r,maskInputFn:l}){let o=n||"";return na({maskInputOptions:t,tagName:s,type:i,overwriteRecord:r})&&(l?o=l(o,e):o="*".repeat(o.length)),o}function kt(e){return e.toLowerCase()}const po="__rrweb_original__";function ep(e){const t=e.getContext("2d");if(!t)return!0;const s=50;for(let i=0;i<e.width;i+=s)for(let n=0;n<e.height;n+=s){const r=t.getImageData,l=po in r?r[po]:r;if(new Uint32Array(l.call(t,i,n,Math.min(s,e.width-i),Math.min(s,e.height-n)).data.buffer).some(o=>o!==0))return!1}return!0}function bi(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?kt(t):null}function sa(e,t){var s;let i;try{i=new URL(e,window.location.href)}catch{return null}const n=/\.([0-9a-z]+)(?:$)/i,r=i.pathname.match(n);return(s=r==null?void 0:r[1])!=null?s:null}function tp(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const sp=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ip=/^(?:[a-z+]+:)?\/\//i,np=/^www\..*/i,rp=/^(data:)([^,]*),(.*)/i;function fi(e,t){return(e||"").replace(sp,(s,i,n,r,l,o)=>{const a=n||l||o,c=i||r||"";if(!a)return s;if(ip.test(a)||np.test(a))return`url(${c}${a}${c})`;if(rp.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${tp(t)+a}${c})`;const u=t.split("/"),d=a.split("/");u.pop();for(const p of d)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}function Ws(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function op(e,t,s=!1){const i=Array.from(t.childNodes),n=[];let r=0;if(i.length>1&&e&&typeof e=="string"){let l=Ws(e,s);const o=l.length/e.length;for(let a=1;a<i.length;a++)if(i[a].textContent&&typeof i[a].textContent=="string"){const c=Ws(i[a].textContent,s),u=100;let d=3;for(;d<c.length&&(c[d].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,d),1)!==-1);d++);for(;d<c.length;d++){let p=c.substring(0,d),m=l.split(p),b=-1;if(m.length===2)b=m[0].length;else if(m.length>2&&m[0]===""&&i[a-1].textContent!=="")b=l.indexOf(p,1);else if(m.length===1){if(p=p.substring(0,p.length-1),m=l.split(p),m.length<=1)return n.push(e),n;d=u+1}else d===c.length-1&&(b=l.indexOf(p));if(m.length>=2&&d>u){const h=i[a-1].textContent;if(h&&typeof h=="string"){const G=Ws(h).length;b=l.indexOf(p,G)}b===-1&&(b=m[0].length)}if(b!==-1){let h=Math.floor(b/o);for(;h>0&&h<e.length;){if(r+=1,r>50*i.length)return n.push(e),n;const G=Ws(e.substring(0,h),s);if(G.length===b){n.push(e.substring(0,h)),e=e.substring(h),l=l.substring(b);break}else G.length<b?h+=Math.max(1,Math.floor((b-G.length)/o)):h-=Math.max(1,Math.floor((G.length-b)*o))}break}}}}return n.push(e),n}function lp(e,t){return op(e,t).join("/* rr_split */")}function fr(e){return e=e.replace(/[^ -~]+/g,""),e=(e==null?void 0:e.split(" ").map(t=>Math.random().toString(20).substring(2,t.length)).join(" "))||"",e}function kn(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const ap=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),cp=new RegExp(/[0-9]{9,16}/),up=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),hp=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),dp=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),pp=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),mp=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),bp=[ap,cp,up,hp,dp,pp,mp];function ia(e){return e?bp.some(t=>t.test(e)):!1}const na=({maskInputOptions:e,tagName:t,type:s,overwriteRecord:i})=>{const n=s&&s.toLowerCase();return i!=="true"&&(!!e[t.toLowerCase()]||!!(n&&e[n]))};let fp=1;const yp=new RegExp("[^a-z0-9-_:]"),os=-2;function ra(){return fp++}function gp(e){if(e instanceof HTMLFormElement)return"form";const t=kt(e.tagName);return yp.test(t)?"div":t}let yt,mo;const Zp=/^[^ \t\n\r\u000c]+/,Ip=/^[, \t\n\r\u000c]+/;function Gp(e,t){if(t.trim()==="")return t;let s=0;function i(r){let l;const o=r.exec(t.substring(s));return o?(l=o[0],s+=l.length,l):""}const n=[];for(;i(Ip),!(s>=t.length);){let r=i(Zp);if(r.slice(-1)===",")r=yi(e,r.substring(0,r.length-1)),n.push(r);else{let l="";r=yi(e,r);let o=!1;for(;;){const a=t.charAt(s);if(a===""){n.push((r+l).trim());break}else if(o)a===")"&&(o=!1);else if(a===","){s+=1,n.push((r+l).trim());break}else a==="("&&(o=!0);l+=a,s+=1}}}return n.join(", ")}const bo=new WeakMap;function yi(e,t){return!t||t.trim()===""?t:yr(e,t)}function Sp(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function yr(e,t){let s=bo.get(e);if(s||(s=e.createElement("a"),bo.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function oa(e,t,s,i){return i&&(s==="src"||s==="href"&&!(t==="use"&&i[0]==="#")||s==="xlink:href"&&i[0]!=="#"||s==="background"&&(t==="table"||t==="td"||t==="th")?yi(e,i):s==="srcset"?Gp(e,i):s==="style"?fi(i,yr(e)):t==="object"&&s==="data"?yi(e,i):i)}function la(e,t,s){return(e==="video"||e==="audio")&&t==="autoplay"}function fo(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}if(s)return e.matches(s)}catch{}return!1}function gi(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?gi(de.parentNode(e),t,s):!1;for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}return s?gi(de.parentNode(e),t,s):!1}function aa(e,t,s,i){let n;if(ql(e)){if(n=e,!de.childNodes(n).length)return!1}else{if(de.parentElement(e)===null)return!1;n=de.parentElement(e)}try{if(typeof t=="string"){if(i){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(gi(n,t,i))return!0;if(s){if(i){if(n.closest(s))return!0}else if(n.matches(s))return!0}}catch{}return!1}function Vp(e,t,s){const i=e.contentWindow;if(!i)return;let n=!1,r;try{r=i.document.readyState}catch{return}if(r!=="complete"){const o=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()});return}const l="about:blank";if(i.location.href!==l||e.src===l||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Xp(e,t,s){let i=!1,n;try{n=e.sheet}catch{return}if(n)return;const r=setTimeout(()=>{i||(t(),i=!0)},s);e.addEventListener("load",()=>{clearTimeout(r),i=!0,t()})}function Cp(e,t){const{doc:s,mirror:i,blockClass:n,blockSelector:r,needsMask:l,inlineStylesheet:o,maskInputOptions:a={},maskTextClass:c,maskTextFn:u,maskInputFn:d,dataURLOptions:p={},inlineImages:m,inlineVideos:b,recordCanvas:h,keepIframeSrcFn:G,newlyAddedElement:I=!1,cssCaptured:V=!1,privacySetting:W}=t,X=Wp(s,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ae.Document,childNodes:[],compatMode:e.compatMode}:{type:ae.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ae.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:X};case e.ELEMENT_NODE:return kp(e,{doc:s,blockClass:n,blockSelector:r,inlineStylesheet:o,maskInputOptions:a,maskInputFn:d,maskTextClass:c,dataURLOptions:p,inlineImages:m,inlineVideos:b,recordCanvas:h,keepIframeSrcFn:G,newlyAddedElement:I,privacySetting:W,rootId:X});case e.TEXT_NODE:return Rp(e,{doc:s,needsMask:l,maskTextFn:u,privacySetting:W,rootId:X,cssCaptured:V});case e.CDATA_SECTION_NODE:return{type:ae.CDATA,textContent:"",rootId:X};case e.COMMENT_NODE:return{type:ae.Comment,textContent:de.textContent(e)||"",rootId:X};default:return!1}}function Wp(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return s===1?void 0:s}function Rp(e,t){var s;const{needsMask:i,maskTextFn:n,privacySetting:r,rootId:l,cssCaptured:o}=t,a=de.parentNode(e),c=a&&a.tagName;let u="";const d=c==="STYLE"?!0:void 0,p=c==="SCRIPT"?!0:void 0;p?u="SCRIPT_PLACEHOLDER":o||(u=de.textContent(e),d&&u&&(u=fi(u,yr(t.doc)))),!d&&!p&&u&&i&&(u=n?n(u,de.parentElement(e)):u.replace(/[\S]/g,"*"));const m=r==="strict",b=(s=e.parentElement)==null?void 0:s.getAttribute("data-hl-record"),h=r==="default"&&ia(u);return(m||h)&&!b&&c&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(c)&&u&&(u=fr(u)),{type:ae.Text,textContent:u||"",rootId:l}}function kp(e,t){const{doc:s,blockClass:i,blockSelector:n,inlineStylesheet:r,maskInputOptions:l={},maskInputFn:o,maskTextClass:a,dataURLOptions:c={},inlineImages:u,inlineVideos:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:b=!1,privacySetting:h,rootId:G}=t;let I=fo(e,i,n);const V=fo(e,a,null),W=h==="strict";let X=gp(e),S={};const k=e.attributes.length;for(let g=0;g<k;g++){const R=e.attributes[g];la(X,R.name)||(S[R.name]=oa(s,X,kt(R.name),R.value))}if(X==="link"&&r){const g=Array.from(s.styleSheets).find(J=>J.href===e.href);let R=null;g&&(R=Rn(g)),R&&(delete S.rel,delete S.href,S._cssText=R)}if(X==="style"&&e.sheet){let g=Rn(e.sheet);g&&(e.childNodes.length>1&&(g=lp(g,e)),S._cssText=g)}if(X==="input"||X==="textarea"||X==="select"){const g=e.value,R=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&g?S.value=mi({element:e,type:bi(e),tagName:X,value:g,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:l,maskInputFn:o}):R&&(S.checked=R)}if(X==="option"&&(e.selected&&!l.select?S.selected=!0:delete S.selected),X==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),X==="canvas"&&p){if(e.__context==="2d")ep(e);else if(!("__context"in e)){const g=e.toDataURL(c.type,c.quality),R=s.createElement("canvas");R.width=e.width,R.height=e.height;const J=R.toDataURL(c.type,c.quality);g!==J&&(S.rr_dataURL=g)}}if(X==="img"&&u&&!I&&!V&&!W){yt||(yt=s.createElement("canvas"),mo=yt.getContext("2d"));const g=e,R=g.currentSrc||g.getAttribute("src")||"<unknown-src>",J=g.crossOrigin,E=()=>{g.removeEventListener("load",E);try{yt.width=g.naturalWidth,yt.height=g.naturalHeight,mo.drawImage(g,0,0),S.rr_dataURL=yt.toDataURL(c.type,c.quality)}catch(_){if(g.crossOrigin!=="anonymous"){g.crossOrigin="anonymous",g.complete&&g.naturalWidth!==0?E():g.addEventListener("load",E);return}else console.warn(`Cannot inline img src=${R}! Error: ${_}`)}g.crossOrigin==="anonymous"&&(J?S.crossOrigin=J:g.removeAttribute("crossorigin"))};g.complete&&g.naturalWidth!==0?E():g.addEventListener("load",E)}if(X==="audio"||X==="video"){const g=S;g.rr_mediaState=e.paused?"paused":"played",g.rr_mediaCurrentTime=e.currentTime,g.rr_mediaPlaybackRate=e.playbackRate,g.rr_mediaMuted=e.muted,g.rr_mediaLoop=e.loop,g.rr_mediaVolume=e.volume}if(b||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),I||V||W&&kn(X)){const{width:g,height:R}=e.getBoundingClientRect();S={class:S.class,rr_width:`${g}px`,rr_height:`${R}px`}}W&&kn(X)&&(I=!0),X==="iframe"&&!m(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let w;try{customElements.get(X)&&(w=!0)}catch{}const v=g=>{const{width:R,height:J}=g.getBoundingClientRect();S={width:R,height:J,rr_width:`${R}px`,rr_height:`${J}px`,rr_inlined_video:!0,class:S.class,style:S.style},X="canvas";const E=s.createElement("canvas");E.width=e.width,E.height=e.height,S.rr_dataURL=E.toDataURL(c.type,c.quality)};if(X==="video"){const g=e;u&&(g.src===""||g.src.indexOf("blob:")!==-1)&&v(g),d&&g.src!==""&&g.src.indexOf("blob:")===-1&&v(g)}return{type:ae.Element,tagName:X,attributes:S,childNodes:[],isSVG:Sp(e)||void 0,needBlock:I,needMask:V,rootId:G,isCustom:w}}function se(e){return e==null?"":e.toLowerCase()}function wp(e,t){return!!(t.comment&&e.type===ae.Comment||e.type===ae.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&sa(e.attributes.href)==="js")||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(se(e.attributes.name).match(/^msapplication-tile(image|color)$/)||se(e.attributes.name)==="application-name"||se(e.attributes.rel)==="icon"||se(e.attributes.rel)==="apple-touch-icon"||se(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&se(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(se(e.attributes.property).match(/^(og|twitter|fb):/)||se(e.attributes.name).match(/^(og|twitter):/)||se(e.attributes.name)==="pinterest")||t.headMetaRobots&&(se(e.attributes.name)==="robots"||se(e.attributes.name)==="googlebot"||se(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(se(e.attributes.name)==="author"||se(e.attributes.name)==="generator"||se(e.attributes.name)==="framework"||se(e.attributes.name)==="publisher"||se(e.attributes.name)==="progid"||se(e.attributes.property).match(/^article:/)||se(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(se(e.attributes.name)==="google-site-verification"||se(e.attributes.name)==="yandex-verification"||se(e.attributes.name)==="csrf-token"||se(e.attributes.name)==="p:domain_verify"||se(e.attributes.name)==="verify-v1"||se(e.attributes.name)==="verification"||se(e.attributes.name)==="shopify-checkout-api-token"))))}function St(e,t){const{doc:s,mirror:i,blockClass:n,blockSelector:r,maskTextClass:l,maskTextSelector:o,skipChild:a=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:b={},inlineImages:h=!1,inlineVideos:G=!1,recordCanvas:I=!1,onSerialize:V,onIframeLoad:W,iframeLoadTimeout:X=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:v=!1,cssCaptured:g=!1,privacySetting:R}=t;let{needsMask:J}=t,{preserveWhiteSpace:E=!0}=t;J||(J=aa(e,l,o,J===void 0));const _=Cp(e,{doc:s,mirror:i,blockClass:n,blockSelector:r,needsMask:J,inlineStylesheet:c,maskInputOptions:u,maskTextClass:l,maskTextFn:d,maskInputFn:p,dataURLOptions:b,inlineImages:h,inlineVideos:G,recordCanvas:I,keepIframeSrcFn:w,newlyAddedElement:v,cssCaptured:g,privacySetting:R});if(!_)return console.warn(e,"not serialized"),null;let f;i.hasNode(e)?f=i.getId(e):wp(_,m)||!E&&_.type===ae.Text&&!_.textContent.replace(/^\s+|\s+$/gm,"").length?f=os:f=ra();const y=Object.assign(_,{id:f});if(i.add(e,y),f===os)return null;V&&V(e);let T=!a,K=R,F=R==="strict";if(y.type===ae.Element){if(T=T&&!y.needBlock,F||(F=!!y.needBlock||!!y.needMask),K=F?"strict":K,F&&kn(y.tagName)){const D=e.cloneNode();D.src="",i.add(D,y)}delete y.needBlock,delete y.needMask;const A=de.shadowRoot(e);A&&qt(A)&&(y.isShadowHost=!0)}if((y.type===ae.Document||y.type===ae.Element)&&T){m.headWhitespace&&y.type===ae.Element&&y.tagName==="head"&&(E=!1);const A={doc:s,mirror:i,blockClass:n,blockSelector:r,needsMask:J,maskTextClass:l,maskTextSelector:o,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:b,inlineImages:h,inlineVideos:G,recordCanvas:I,preserveWhiteSpace:E,onSerialize:V,onIframeLoad:W,iframeLoadTimeout:X,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:w,cssCaptured:!1,privacySetting:K};if(!(y.type===ae.Element&&y.tagName==="textarea"&&y.attributes.value!==void 0)){y.type===ae.Element&&y.attributes._cssText!==void 0&&typeof y.attributes._cssText=="string"&&(A.cssCaptured=!0);for(const he of Array.from(de.childNodes(e))){const me=St(he,A);me&&y.childNodes.push(me)}}let D=null;if(ql(e)&&(D=de.shadowRoot(e)))for(const he of Array.from(de.childNodes(D))){const me=St(he,A);me&&(qt(D)&&(me.isShadow=!0),y.childNodes.push(me))}}const N=de.parentNode(e);return N&&$t(N)&&qt(N)&&(y.isShadow=!0),y.type===ae.Element&&y.tagName==="iframe"&&Vp(e,()=>{const A=e.contentDocument;if(A&&W){const D=St(A,{doc:A,mirror:i,blockClass:n,blockSelector:r,needsMask:J,maskTextClass:l,maskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:b,inlineImages:h,inlineVideos:G,recordCanvas:I,preserveWhiteSpace:E,onSerialize:V,onIframeLoad:W,iframeLoadTimeout:X,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:w,privacySetting:R});D&&W(e,D)}},X),y.type===ae.Element&&y.tagName==="link"&&typeof y.attributes.rel=="string"&&(y.attributes.rel==="stylesheet"||y.attributes.rel==="preload"&&typeof y.attributes.href=="string"&&sa(y.attributes.href)==="css")&&Xp(e,()=>{if(S){const A=St(e,{doc:s,mirror:i,blockClass:n,blockSelector:r,needsMask:J,maskTextClass:l,maskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:b,inlineImages:h,inlineVideos:G,recordCanvas:I,preserveWhiteSpace:E,onSerialize:V,onIframeLoad:W,iframeLoadTimeout:X,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:w,privacySetting:R});A&&S(e,A)}},k),y}function vp(e,t){const{mirror:s=new ta,blockClass:i="highlight-block",blockSelector:n=null,maskTextClass:r="highlight-mask",maskTextSelector:l=null,inlineStylesheet:o=!0,inlineImages:a=!1,inlineVideos:c=!1,recordCanvas:u=!1,maskAllInputs:d=!1,maskTextFn:p,maskInputFn:m,slimDOM:b=!1,dataURLOptions:h,preserveWhiteSpace:G,onSerialize:I,onIframeLoad:V,iframeLoadTimeout:W,onStylesheetLoad:X,stylesheetLoadTimeout:S,keepIframeSrcFn:k=()=>!1,privacySetting:w="default"}=t||{};return St(e,{doc:e,mirror:s,blockClass:i,blockSelector:n,maskTextClass:r,maskTextSelector:l,skipChild:!1,inlineStylesheet:o,maskInputOptions:d===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d===!1?{password:!0}:d,maskTextFn:p,maskInputFn:m,slimDOMOptions:b||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b||{},dataURLOptions:h,inlineImages:a,inlineVideos:c,recordCanvas:u,preserveWhiteSpace:G,onSerialize:I,onIframeLoad:V,iframeLoadTimeout:W,onStylesheetLoad:X,stylesheetLoadTimeout:S,keepIframeSrcFn:k,newlyAddedElement:!1,privacySetting:w})}function xp(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(s,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),s}var gr={exports:{}},O=String,ca=function(){return{isColorSupported:!1,reset:O,bold:O,dim:O,italic:O,underline:O,inverse:O,hidden:O,strikethrough:O,black:O,red:O,green:O,yellow:O,blue:O,magenta:O,cyan:O,white:O,gray:O,bgBlack:O,bgRed:O,bgGreen:O,bgYellow:O,bgBlue:O,bgMagenta:O,bgCyan:O,bgWhite:O,blackBright:O,redBright:O,greenBright:O,yellowBright:O,blueBright:O,magentaBright:O,cyanBright:O,whiteBright:O,bgBlackBright:O,bgRedBright:O,bgGreenBright:O,bgYellowBright:O,bgBlueBright:O,bgMagentaBright:O,bgCyanBright:O,bgWhiteBright:O}};gr.exports=ca();gr.exports.createColors=ca;var Tp=gr.exports;const Np={},Lp=Object.freeze(Object.defineProperty({__proto__:null,default:Np},Symbol.toStringTag,{value:"Module"})),Ne=xp(Lp);let yo=Tp,go=Ne,wn=class ua extends Error{constructor(t,s,i,n,r,l){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),n&&(this.source=n),l&&(this.plugin=l),typeof s<"u"&&typeof i<"u"&&(typeof s=="number"?(this.line=s,this.column=i):(this.line=s.line,this.column=s.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ua)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let s=this.source;t==null&&(t=yo.isColorSupported);let i=u=>u,n=u=>u,r=u=>u;if(t){let{bold:u,gray:d,red:p}=yo.createColors(!0);n=m=>u(p(m)),i=m=>d(m),go&&(r=m=>go(m))}let l=s.split(/\r?\n/),o=Math.max(this.line-3,0),a=Math.min(this.line+2,l.length),c=String(a).length;return l.slice(o,a).map((u,d)=>{let p=o+1+d,m=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let h=20,G=Math.max(0,this.column-h),I=Math.max(this.column+h,this.endColumn+h),V=u.slice(G,I),W=i(m.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,h-1)).replace(/[^\t]/g," ");return n(">")+i(m)+r(V)+`
 `+W+n("^")}let b=i(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(m)+r(u)+`
 `+b+n("^")}return" "+i(m)+r(u)}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`

`+t+`
`),this.name+": "+this.message+t}};var Zr=wn;wn.default=wn;const Zo={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function Jp(e){return e[0].toUpperCase()+e.slice(1)}let vn=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?s+=e.raws.afterName:i&&(s+=" "),e.nodes)this.block(e,s+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+i+n,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(s.includes(`
`)){let r=this.raw(e,null,"indent");if(r.length)for(let l=0;l<n;l++)s+=r}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let s=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],r=this.raw(n,"before");r&&this.builder(r),this.stringify(n,t!==i||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),i=e.prop+s+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,s){let i;if(s||(s=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Zo[s];let r=e.root();if(r.rawCache||(r.rawCache={}),typeof r.rawCache[s]<"u")return r.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let l="raw"+Jp(s);this[l]?i=this[l](r,e):r.walk(o=>{if(i=o.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Zo[s]),r.rawCache[s]=i,i}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return t=s.raws.after,t.includes(`
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(i=>{if(typeof i.raws.before<"u")return s=i.raws.before,s.includes(`
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return s=i.raws.before,s.includes(`
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before<"u")return t=s.raws.before,t.includes(`
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between<"u")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let i=s.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof s.raws.before<"u"){let n=s.raws.before.split(`
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let s=e[t],i=e.raws[t];return i&&i.value===s?i.raw:s}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 ha=vn;vn.default=vn;let Yp=ha;function xn(e,t){new Yp(t).stringify(e)}var Li=xn;xn.default=xn;var ys={};ys.isClean=Symbol("isClean");ys.my=Symbol("my");let Fp=Zr,Up=ha,Kp=Li,{isClean:Ot,my:Op}=ys;function Tn(e,t){let s=new e.constructor;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i)||i==="proxyCache")continue;let n=e[i],r=typeof n;i==="parent"&&r==="object"?t&&(s[i]=t):i==="source"?s[i]=n:Array.isArray(n)?s[i]=n.map(l=>Tn(l,s)):(r==="object"&&n!==null&&(n=Tn(n)),s[i]=n)}return s}function Oe(e,t){if(t&&typeof t.offset<"u")return t.offset;let s=1,i=1,n=0;for(let r=0;r<e.length;r++){if(i===t.line&&s===t.column){n=r;break}e[r]===`
`?(s=1,i+=1):s+=1}return n}let Nn=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ot]=!1,this[Op]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}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=Tn(this);for(let s in e)t[s]=e[s];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:s,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:s.column,line:s.line},t)}return new Fp(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Ot]=!0}markDirty(){if(this[Ot]){this[Ot]=!1;let e=this;for(;e=e.parent;)e[Ot]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,i=s.slice(Oe(s,this.source.start),Oe(s,this.source.end)).indexOf(e.word);i!==-1&&(t=this.positionInside(i))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=Oe(i,this.source.start),r=n+e;for(let l=n;l<r;l++)i[l]===`
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:Oe(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Oe(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let n=t.slice(Oe(t,this.source.start),Oe(t,this.source.end)).indexOf(e.word);n!==-1&&(s=this.positionInside(n),i=this.positionInside(n+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Oe(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Oe(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<s.line||i.line===s.line&&i.column<=s.column)&&(i={column:s.column+1,line:s.line,offset:s.offset+1}),{end:i,start:s}}raw(e,t){return new Up().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,s=!1;for(let i of e)i===this?s=!0:s?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},i=t==null;t=t||new Map;let n=0;for(let r in this){if(!Object.prototype.hasOwnProperty.call(this,r)||r==="parent"||r==="proxyCache")continue;let l=this[r];if(Array.isArray(l))s[r]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)s[r]=l.toJSON(null,t);else if(r==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),s[r]={end:l.end,inputId:o,start:l.start}}else s[r]=l}return i&&(s.inputs=[...t.keys()].map(r=>r.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Kp){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let i={node:this};for(let n in s)i[n]=s[n];return e.warn(t,i)}};var Ji=Nn;Nn.default=Nn;let Mp=Ji,Ln=class extends Mp{constructor(e){super(e),this.type="comment"}};var Yi=Ln;Ln.default=Ln;let Ep=Ji,Jn=class extends Ep{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e=Ie(Y({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Fi=Jn;Jn.default=Jn;let da=Yi,pa=Fi,zp=Ji,{isClean:ma,my:ba}=ys,Ir,fa,ya,Gr;function ga(e){return e.map(t=>(t.nodes&&(t.nodes=ga(t.nodes)),delete t.source,t))}function Za(e){if(e[ma]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Za(t)}let Be=class Ia extends zp{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]}append(...t){for(let s of t){let i=this.normalize(s,this.last);for(let n of i)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let s of this.nodes)s.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let s=this.getIterator(),i,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(i=this.indexes[s],n=t(this.proxyOf.nodes[i],i),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,s){return s==="proxyOf"?t:t[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...i)=>t[s](...i.map(n=>typeof n=="function"?(r,l)=>n(r.toProxy(),l):n)):s==="every"||s==="some"?i=>t[s]((n,...r)=>i(n.toProxy(),...r)):s==="root"?()=>t.root().toProxy():s==="nodes"?t.nodes.map(i=>i.toProxy()):s==="first"||s==="last"?t[s].toProxy():t[s]:t[s]},set(t,s,i){return t[s]===i||(t[s]=i,(s==="name"||s==="params"||s==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,s){let i=this.index(t),n=this.normalize(s,this.proxyOf.nodes[i]).reverse();i=this.index(t);for(let l of n)this.proxyOf.nodes.splice(i+1,0,l);let r;for(let l in this.indexes)r=this.indexes[l],i<r&&(this.indexes[l]=r+n.length);return this.markDirty(),this}insertBefore(t,s){let i=this.index(t),n=i===0?"prepend":!1,r=this.normalize(s,this.proxyOf.nodes[i],n).reverse();i=this.index(t);for(let o of r)this.proxyOf.nodes.splice(i,0,o);let l;for(let o in this.indexes)l=this.indexes[o],i<=l&&(this.indexes[o]=l+r.length);return this.markDirty(),this}normalize(t,s){if(typeof t=="string")t=ga(fa(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new pa(t)]}else if(t.selector||t.selectors)t=[new Gr(t)];else if(t.name)t=[new Ir(t)];else if(t.text)t=[new da(t)];else throw new Error("Unknown node type in node creation");return t.map(i=>(i[ba]||Ia.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ma]&&Za(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(i.raws.before=s.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...t){t=t.reverse();for(let s of t){let i=this.normalize(s,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let s;for(let i in this.indexes)s=this.indexes[i],s>=t&&(this.indexes[i]=s-1);return this.markDirty(),this}replaceValues(t,s,i){return i||(i=s,s={}),this.walkDecls(n=>{s.props&&!s.props.includes(n.prop)||s.fast&&!n.value.includes(s.fast)||(n.value=n.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((s,i)=>{let n;try{n=t(s,i)}catch(r){throw s.addToError(r)}return n!==!1&&s.walk&&(n=s.walk(t)),n})}walkAtRules(t,s){return s?t instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&t.test(i.name))return s(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===t)return s(i,n)}):(s=t,this.walk((i,n)=>{if(i.type==="atrule")return s(i,n)}))}walkComments(t){return this.walk((s,i)=>{if(s.type==="comment")return t(s,i)})}walkDecls(t,s){return s?t instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&t.test(i.prop))return s(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===t)return s(i,n)}):(s=t,this.walk((i,n)=>{if(i.type==="decl")return s(i,n)}))}walkRules(t,s){return s?t instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&t.test(i.selector))return s(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===t)return s(i,n)}):(s=t,this.walk((i,n)=>{if(i.type==="rule")return s(i,n)}))}};Be.registerParse=e=>{fa=e};Be.registerRule=e=>{Gr=e};Be.registerAtRule=e=>{Ir=e};Be.registerRoot=e=>{ya=e};var ct=Be;Be.default=Be;Be.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Ir.prototype):e.type==="rule"?Object.setPrototypeOf(e,Gr.prototype):e.type==="decl"?Object.setPrototypeOf(e,pa.prototype):e.type==="comment"?Object.setPrototypeOf(e,da.prototype):e.type==="root"&&Object.setPrototypeOf(e,ya.prototype),e[ba]=!0,e.nodes&&e.nodes.forEach(t=>{Be.rebuild(t)})};let Ga=ct,Zi=class extends Ga{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 Sr=Zi;Zi.default=Zi;Ga.registerAtRule(Zi);let Hp=ct,Sa,Va,ls=class extends Hp{constructor(e){super(Y({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Sa(new Va,this,e).stringify()}};ls.registerLazyResult=e=>{Sa=e};ls.registerProcessor=e=>{Va=e};var Vr=ls;ls.default=ls;let Pp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Bp=(e=21)=>{let t="",s=e|0;for(;s--;)t+=Pp[Math.random()*64|0];return t};var Dp={nanoid:Bp};let{existsSync:jp,readFileSync:Qp}=Ne,{dirname:tn,join:Ap}=Ne,{SourceMapConsumer:Io,SourceMapGenerator:Go}=Ne;function _p(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let Yn=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,i=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=tn(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Io(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,r=e.match(i)||e.match(n);if(r)return decodeURIComponent(e.substr(r[0].length));let l=e.match(t)||e.match(s);if(l)return _p(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),i=e.indexOf("*/",s);s>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,i)))}loadFile(e){if(this.root=tn(e),jp(e))return this.mapFile=e,Qp(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let i=this.loadFile(s);if(!i)throw new Error("Unable to load previous source map: "+s.toString());return i}}else{if(t instanceof Io)return Go.fromSourceMap(t).toString();if(t instanceof Go)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Ap(tn(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Xa=Yn;Yn.default=Yn;let{nanoid:$p}=Dp,{isAbsolute:Fn,resolve:Un}=Ne,{SourceMapConsumer:qp,SourceMapGenerator:em}=Ne,{fileURLToPath:So,pathToFileURL:Rs}=Ne,Vo=Zr,tm=Xa,sn=Ne,nn=Symbol("lineToIndexCache"),sm=!!(qp&&em),Xo=!!(Un&&Fn);function Co(e){if(e[nn])return e[nn];let t=e.css.split(`
`),s=new Array(t.length),i=0;for(let n=0,r=t.length;n<r;n++)s[n]=i,i+=t[n].length+1;return e[nn]=s,s}let Ii=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Xo||/^\w+:\/\//.test(t.from)||Fn(t.from)?this.file=t.from:this.file=Un(t.from)),Xo&&sm){let s=new tm(this.css,t);if(s.text){this.map=s;let i=s.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+$p(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,i={}){let n,r,l,o,a;if(t&&typeof t=="object"){let u=t,d=s;if(typeof u.offset=="number"){o=u.offset;let p=this.fromOffset(o);t=p.line,s=p.col}else t=u.line,s=u.column,o=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let p=this.fromOffset(l);r=p.line,n=p.col}else r=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)o=this.fromLineAndColumn(t,s);else{o=t;let u=this.fromOffset(o);t=u.line,s=u.col}let c=this.origin(t,s,r,n);return c?a=new Vo(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):a=new Vo(e,r===void 0?t:{column:s,line:t},r===void 0?s:{column:n,line:r},this.css,this.file,i.plugin),a.input={column:s,endColumn:n,endLine:r,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Rs&&(a.input.url=Rs(this.file).toString()),a.input.file=this.file),a}fromLineAndColumn(e,t){return Co(this)[e-1]+t-1}fromOffset(e){let t=Co(this),s=t[t.length-1],i=0;if(e>=s)i=t.length-1;else{let n=t.length-2,r;for(;i<n;)if(r=i+(n-i>>1),e<t[r])n=r-1;else if(e>=t[r+1])i=r+1;else{i=r;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Un(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,i){if(!this.map)return!1;let n=this.map.consumer(),r=n.originalPositionFor({column:t,line:e});if(!r.source)return!1;let l;typeof s=="number"&&(l=n.originalPositionFor({column:i,line:s}));let o;Fn(r.source)?o=Rs(r.source):o=new URL(r.source,this.map.consumer().sourceRoot||Rs(this.map.mapFile));let a={column:r.column,endColumn:l&&l.column,endLine:l&&l.line,line:r.line,url:o.toString()};if(o.protocol==="file:")if(So)a.file=So(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(r.source);return c&&(a.source=c),a}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=Y({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Ui=Ii;Ii.default=Ii;sn&&sn.registerInput&&sn.registerInput(Ii);let Ca=ct,Wa,Ra,wt=class extends Ca{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let i=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Wa(new Ra,this,e).stringify()}};wt.registerLazyResult=e=>{Wa=e};wt.registerProcessor=e=>{Ra=e};var gs=wt;wt.default=wt;Ca.registerRoot(wt);let as={comma(e){return as.split(e,[","],!0)},space(e){let t=[" ",`
`,"	"];return as.split(e,t)},split(e,t,s){let i=[],n="",r=!1,l=0,o=!1,a="",c=!1;for(let u of e)c?c=!1:u==="\\"?c=!0:o?u===a&&(o=!1):u==='"'||u==="'"?(o=!0,a=u):u==="("?l+=1:u===")"?l>0&&(l-=1):l===0&&t.includes(u)&&(r=!0),r?(n!==""&&i.push(n.trim()),n="",r=!1):n+=u;return(s||n!=="")&&i.push(n.trim()),i}};var ka=as;as.default=as;let wa=ct,im=ka,Gi=class extends wa{get selectors(){return im.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Xr=Gi;Gi.default=Gi;wa.registerRule(Gi);let nm=Sr,rm=Yi,om=Fi,lm=Ui,am=Xa,cm=gs,um=Xr;function cs(e,t){if(Array.isArray(e))return e.map(r=>cs(r));let s=e,{inputs:i}=s,n=Rt(s,["inputs"]);if(i){t=[];for(let r of i){let l=Ie(Y({},r),{__proto__:lm.prototype});l.map&&(l.map=Ie(Y({},l.map),{__proto__:am.prototype})),t.push(l)}}if(n.nodes&&(n.nodes=e.nodes.map(r=>cs(r,t))),n.source){let r=n.source,{inputId:l}=r,o=Rt(r,["inputId"]);n.source=o,l!=null&&(n.source.input=t[l])}if(n.type==="root")return new cm(n);if(n.type==="decl")return new om(n);if(n.type==="rule")return new um(n);if(n.type==="comment")return new rm(n);if(n.type==="atrule")return new nm(n);throw new Error("Unknown node type: "+e.type)}var hm=cs;cs.default=cs;let{dirname:$s,relative:va,resolve:xa,sep:Ta}=Ne,{SourceMapConsumer:Na,SourceMapGenerator:qs}=Ne,{pathToFileURL:Wo}=Ne,dm=Ui,pm=!!(Na&&qs),mm=!!($s&&xa&&va&&Ta),bm=class{constructor(e,t,s,i){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
`;this.css.includes(`\r
`)&&(t=`\r
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||$s(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Na(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),mm&&pm&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=qs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new qs({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 qs({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,r;this.stringify(this.root,(l,o,a)=>{if(this.css+=l,o&&a!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),r=l.match(/\n/g),r?(e+=r.length,n=l.lastIndexOf(`
`),t=l.length-n):t+=l.length,o&&a!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?$s(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=$s(xa(s,this.mapOpts.annotation)));let i=va(s,e);return this.memoizedPaths.set(e,i),i}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 dm(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let i=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,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(Wo){let s=Wo(e).toString();return this.memoizedFileURLs.set(e,s),s}else 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;Ta==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var La=bm;const rn=39,Ro=34,ks=92,ko=47,ws=10,Mt=32,vs=12,xs=9,Ts=13,fm=91,ym=93,gm=40,Zm=41,Im=123,Gm=125,Sm=59,Vm=42,Xm=58,Cm=64,Ns=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ls=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Wm=/.[\r\n"'(/\\]/,wo=/[\da-f]/i;var Rm=function(e,t={}){let s=e.css.valueOf(),i=t.ignoreErrors,n,r,l,o,a,c,u,d,p,m,b=s.length,h=0,G=[],I=[];function V(){return h}function W(w){throw e.error("Unclosed "+w,h)}function X(){return I.length===0&&h>=b}function S(w){if(I.length)return I.pop();if(h>=b)return;let v=w?w.ignoreUnclosed:!1;switch(n=s.charCodeAt(h),n){case ws:case Mt:case xs:case Ts:case vs:{o=h;do o+=1,n=s.charCodeAt(o);while(n===Mt||n===ws||n===xs||n===Ts||n===vs);c=["space",s.slice(h,o)],h=o-1;break}case fm:case ym:case Im:case Gm:case Xm:case Sm:case Zm:{let g=String.fromCharCode(n);c=[g,g,h];break}case gm:{if(m=G.length?G.pop()[1]:"",p=s.charCodeAt(h+1),m==="url"&&p!==rn&&p!==Ro&&p!==Mt&&p!==ws&&p!==xs&&p!==vs&&p!==Ts){o=h;do{if(u=!1,o=s.indexOf(")",o+1),o===-1)if(i||v){o=h;break}else W("bracket");for(d=o;s.charCodeAt(d-1)===ks;)d-=1,u=!u}while(u);c=["brackets",s.slice(h,o+1),h,o],h=o}else o=s.indexOf(")",h+1),r=s.slice(h,o+1),o===-1||Wm.test(r)?c=["(","(",h]:(c=["brackets",r,h,o],h=o);break}case rn:case Ro:{a=n===rn?"'":'"',o=h;do{if(u=!1,o=s.indexOf(a,o+1),o===-1)if(i||v){o=h+1;break}else W("string");for(d=o;s.charCodeAt(d-1)===ks;)d-=1,u=!u}while(u);c=["string",s.slice(h,o+1),h,o],h=o;break}case Cm:{Ns.lastIndex=h+1,Ns.test(s),Ns.lastIndex===0?o=s.length-1:o=Ns.lastIndex-2,c=["at-word",s.slice(h,o+1),h,o],h=o;break}case ks:{for(o=h,l=!0;s.charCodeAt(o+1)===ks;)o+=1,l=!l;if(n=s.charCodeAt(o+1),l&&n!==ko&&n!==Mt&&n!==ws&&n!==xs&&n!==Ts&&n!==vs&&(o+=1,wo.test(s.charAt(o)))){for(;wo.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Mt&&(o+=1)}c=["word",s.slice(h,o+1),h,o],h=o;break}default:{n===ko&&s.charCodeAt(h+1)===Vm?(o=s.indexOf("*/",h+2)+1,o===0&&(i||v?o=s.length:W("comment")),c=["comment",s.slice(h,o+1),h,o],h=o):(Ls.lastIndex=h+1,Ls.test(s),Ls.lastIndex===0?o=s.length-1:o=Ls.lastIndex-2,c=["word",s.slice(h,o+1),h,o],G.push(c),h=o);break}}return h++,c}function k(w){I.push(w)}return{back:k,endOfFile:X,nextToken:S,position:V}};let km=Sr,wm=Yi,vm=Fi,xm=gs,vo=Xr,Tm=Rm;const xo={empty:!0,space:!0};function Nm(e){for(let t=e.length-1;t>=0;t--){let s=e[t],i=s[3]||s[2];if(i)return i}}let Lm=class{constructor(e){this.input=e,this.root=new xm,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new km;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,i,n,r=!1,l=!1,o=[],a=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?a.push(s==="("?")":"]"):s==="{"&&a.length>0?a.push("}"):s===a[a.length-1]&&a.pop(),a.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){l=!0;break}else if(s==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){r=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),r&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,s,i,n;for(let[r,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(i);else{if(s[0]==="word"&&s[1]==="progid")continue;return r}s=i}return!1}comment(e){let t=new wm;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let i=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Tm(this.input)}decl(e,t){let s=new vm;this.init(s,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(i[3]||i[2]||Nm(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let o=e[0][0];if(o===":"||o==="space"||o==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let r=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)r.push(e.shift());this.precheckMissedSemicolon(e);for(let o=e.length-1;o>=0;o--){if(n=e[o],n[1].toLowerCase()==="!important"){s.important=!0;let a=this.stringFrom(e,o);a=this.spacesFromEnd(e)+a,a!==" !important"&&(s.raws.important=a);break}else if(n[1].toLowerCase()==="important"){let a=e.slice(0),c="";for(let u=o;u>0;u--){let d=a[u][0];if(c.trim().startsWith("!")&&d!=="space")break;c=a.pop()[1]+c}c.trim().startsWith("!")&&(s.important=!0,s.raws.important=c,e=a)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(o=>o[0]!=="space"&&o[0]!=="comment")&&(s.raws.between+=r.map(o=>o[1]).join(""),r=[]),this.raw(s,"value",r.concat(e),t),s.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 vo;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 t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,i=!1,n=null,r=[],l=e[1].startsWith("--"),o=[],a=e;for(;a;){if(s=a[0],o.push(a),s==="("||s==="[")n||(n=a),r.push(s==="("?")":"]");else if(l&&i&&s==="{")n||(n=a),r.push("}");else if(r.length===0)if(s===";")if(i){this.decl(o,l);return}else break;else if(s==="{"){this.rule(o);return}else if(s==="}"){this.tokenizer.back(o.pop()),t=!0;break}else s===":"&&(i=!0);else s===r[r.length-1]&&(r.pop(),r.length===0&&(n=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),r.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(a=o[o.length-1][0],!(a!=="space"&&a!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,i){let n,r,l=s.length,o="",a=!0,c,u;for(let d=0;d<l;d+=1)n=s[d],r=n[0],r==="space"&&d===l-1&&!i?a=!1:r==="comment"?(u=s[d-1]?s[d-1][0]:"empty",c=s[d+1]?s[d+1][0]:"empty",!xo[u]&&!xo[c]?o.slice(-1)===","?a=!1:o+=n[1]:a=!1):o+=n[1];if(!a){let d=s.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new vo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let i=t;i<e.length;i++)s+=e[i][1];return e.splice(t,e.length-t),s}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 "+e[0][1],{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})}};var Jm=Lm;let Ym=ct,Fm=Ui,Um=Jm;function Si(e,t){let s=new Fm(e,t),i=new Um(s);try{i.parse()}catch(n){throw n}return i.root}var Cr=Si;Si.default=Si;Ym.registerParse(Si);let Kn=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}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 Ja=Kn;Kn.default=Kn;let Km=Ja,On=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new Km(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Wr=On;On.default=On;let Om=ct,Mm=Vr,Em=La,zm=Cr,To=Wr,Hm=gs,Pm=Li,{isClean:Ye,my:Bm}=ys;const Dm={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},jm={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},Qm={Once:!0,postcssPlugin:!0,prepare:!0},vt=0;function Et(e){return typeof e=="object"&&typeof e.then=="function"}function Ya(e){let t=!1,s=Dm[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,vt,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,vt,s+"Exit"]:[s,s+"Exit"]}function No(e){let t;return e.type==="document"?t=["Document",vt,"DocumentExit"]:e.type==="root"?t=["Root",vt,"RootExit"]:t=Ya(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Mn(e){return e[Ye]=!1,e.nodes&&e.nodes.forEach(t=>Mn(t)),e}let En={},xt=class Fa{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"}constructor(t,s,i){this.stringified=!1,this.processed=!1;let n;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))n=Mn(s);else if(s instanceof Fa||s instanceof To)n=Mn(s.root),s.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=s.map);else{let r=zm;i.syntax&&(r=i.syntax.parse),i.parser&&(r=i.parser),r.parse&&(r=r.parse);try{n=r(s,i)}catch(l){this.processed=!0,this.error=l}n&&!n[Bm]&&Om.rebuild(n)}this.result=new To(t,n,i),this.helpers=Ie(Y({},En),{postcss:En,result:this.result}),this.plugins=this.processor.plugins.map(r=>typeof r=="object"&&r.prepare?Y(Y({},r),r.prepare(this.result)):r)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,s){let i=this.result.lastPlugin;try{s&&s.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=i.postcssPlugin,t.setMessage()):i.postcssVersion}catch(n){console&&console.error&&console.error(n)}return t}prepareVisitors(){this.listeners={};let t=(s,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([s,n])};for(let s of this.plugins)if(typeof s=="object")for(let i in s){if(!jm[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Qm[i])if(typeof s[i]=="object")for(let n in s[i])n==="*"?t(s,i,s[i][n]):t(s,i+"-"+n.toLowerCase(),s[i][n]);else typeof s[i]=="function"&&t(s,i,s[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return fe(this,null,function*(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let s=this.plugins[t],i=this.runOnRoot(s);if(Et(i))try{yield i}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ye];){t[Ye]=!0;let s=[No(t)];for(;s.length>0;){let i=this.visitTick(s);if(Et(i))try{yield i}catch(n){let r=s[s.length-1].node;throw this.handleError(n,r)}}}if(this.listeners.OnceExit)for(let[s,i]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(t.type==="document"){let n=t.nodes.map(r=>i(r,this.helpers));yield Promise.all(n)}else yield i(t,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()})}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(i=>t.Once(i,this.helpers));return Et(s[0])?Promise.all(s):s}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,s=Pm;t.syntax&&(s=t.syntax.stringify),t.stringifier&&(s=t.stringifier),s.stringify&&(s=s.stringify);let i=new Em(s,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let s=this.runOnRoot(t);if(Et(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ye];)t[Ye]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let s of t.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,s){return this.async().then(t,s)}toString(){return this.css}visitSync(t,s){for(let[i,n]of t){this.result.lastPlugin=i;let r;try{r=n(s,this.helpers)}catch(l){throw this.handleError(l,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(Et(r))throw this.getAsyncError()}}visitTick(t){let s=t[t.length-1],{node:i,visitors:n}=s;if(i.type!=="root"&&i.type!=="document"&&!i.parent){t.pop();return}if(n.length>0&&s.visitorIndex<n.length){let[l,o]=n[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===n.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=l;try{return o(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(s.iterator!==0){let l=s.iterator,o;for(;o=i.nodes[i.indexes[l]];)if(i.indexes[l]+=1,!o[Ye]){o[Ye]=!0,t.push(No(o));return}s.iterator=0,delete i.indexes[l]}let r=s.events;for(;s.eventIndex<r.length;){let l=r[s.eventIndex];if(s.eventIndex+=1,l===vt){i.nodes&&i.nodes.length&&(i[Ye]=!0,s.iterator=i.getIterator());return}else if(this.listeners[l]){s.visitors=this.listeners[l];return}}t.pop()}walkSync(t){t[Ye]=!0;let s=Ya(t);for(let i of s)if(i===vt)t.nodes&&t.each(n=>{n[Ye]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}};xt.registerPostcss=e=>{En=e};var Ua=xt;xt.default=xt;Hm.registerLazyResult(xt);Mm.registerLazyResult(xt);let Am=La,_m=Cr;const $m=Wr;let qm=Li,zn=class{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(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let i,n=qm;this.result=new $m(this._processor,i,this._opts),this.result.css=t;let r=this;Object.defineProperty(this.result,"root",{get(){return r.root}});let l=new Am(n,i,this._opts,t);if(l.isMap()){let[o,a]=l.generate();o&&(this.result.css=o),a&&(this.result.map=a)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var eb=zn;zn.default=zn;let tb=Vr,sb=Ua,ib=eb,nb=gs,us=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ib(this,e,t):new sb(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var rb=us;us.default=us;nb.registerProcessor(us);tb.registerProcessor(us);let Ka=Sr,Oa=Yi,ob=ct,lb=Zr,Ma=Fi,Ea=Vr,ab=hm,cb=Ui,ub=Ua,hb=ka,db=Ji,pb=Cr,Rr=rb,mb=Wr,za=gs,Ha=Xr,bb=Li,fb=Ja;function q(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Rr(e)}q.plugin=function(e,t){let s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),ni.LANG&&ni.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
https://www.w3ctech.com/topic/2226`));let l=t(...r);return l.postcssPlugin=e,l.postcssVersion=new Rr().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(r,l,o){return q([i(o)]).process(r,l)},i};q.stringify=bb;q.parse=pb;q.fromJSON=ab;q.list=hb;q.comment=e=>new Oa(e);q.atRule=e=>new Ka(e);q.decl=e=>new Ma(e);q.rule=e=>new Ha(e);q.root=e=>new za(e);q.document=e=>new Ea(e);q.CssSyntaxError=lb;q.Declaration=Ma;q.Container=ob;q.Processor=Rr;q.Document=Ea;q.Comment=Oa;q.Warning=fb;q.AtRule=Ka;q.Result=mb;q.Input=cb;q.Rule=Ha;q.Root=za;q.Node=db;ub.registerPostcss(q);q.default=q;var yb=Object.defineProperty,gb=(e,t,s)=>t in e?yb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Re=(e,t,s)=>gb(e,typeof t!="symbol"?t+"":t,s);function Zb(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(s,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),s}var kr={exports:{}},M=String,Pa=function(){return{isColorSupported:!1,reset:M,bold:M,dim:M,italic:M,underline:M,inverse:M,hidden:M,strikethrough:M,black:M,red:M,green:M,yellow:M,blue:M,magenta:M,cyan:M,white:M,gray:M,bgBlack:M,bgRed:M,bgGreen:M,bgYellow:M,bgBlue:M,bgMagenta:M,bgCyan:M,bgWhite:M,blackBright:M,redBright:M,greenBright:M,yellowBright:M,blueBright:M,magentaBright:M,cyanBright:M,whiteBright:M,bgBlackBright:M,bgRedBright:M,bgGreenBright:M,bgYellowBright:M,bgBlueBright:M,bgMagentaBright:M,bgCyanBright:M,bgWhiteBright:M}};kr.exports=Pa();kr.exports.createColors=Pa;var Ib=kr.exports;const Gb={},Sb=Object.freeze(Object.defineProperty({__proto__:null,default:Gb},Symbol.toStringTag,{value:"Module"})),Le=Zb(Sb);let Lo=Ib,Jo=Le,Hn=class Ba extends Error{constructor(t,s,i,n,r,l){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),n&&(this.source=n),l&&(this.plugin=l),typeof s<"u"&&typeof i<"u"&&(typeof s=="number"?(this.line=s,this.column=i):(this.line=s.line,this.column=s.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ba)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let s=this.source;t==null&&(t=Lo.isColorSupported);let i=u=>u,n=u=>u,r=u=>u;if(t){let{bold:u,gray:d,red:p}=Lo.createColors(!0);n=m=>u(p(m)),i=m=>d(m),Jo&&(r=m=>Jo(m))}let l=s.split(/\r?\n/),o=Math.max(this.line-3,0),a=Math.min(this.line+2,l.length),c=String(a).length;return l.slice(o,a).map((u,d)=>{let p=o+1+d,m=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let h=20,G=Math.max(0,this.column-h),I=Math.max(this.column+h,this.endColumn+h),V=u.slice(G,I),W=i(m.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,h-1)).replace(/[^\t]/g," ");return n(">")+i(m)+r(V)+`
 `+W+n("^")}let b=i(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(m)+r(u)+`
 `+b+n("^")}return" "+i(m)+r(u)}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`

`+t+`
`),this.name+": "+this.message+t}};var wr=Hn;Hn.default=Hn;const Yo={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function Vb(e){return e[0].toUpperCase()+e.slice(1)}let Pn=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?s+=e.raws.afterName:i&&(s+=" "),e.nodes)this.block(e,s+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+i+n,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(s.includes(`
`)){let r=this.raw(e,null,"indent");if(r.length)for(let l=0;l<n;l++)s+=r}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let s=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],r=this.raw(n,"before");r&&this.builder(r),this.stringify(n,t!==i||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),i=e.prop+s+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,s){let i;if(s||(s=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Yo[s];let r=e.root();if(r.rawCache||(r.rawCache={}),typeof r.rawCache[s]<"u")return r.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let l="raw"+Vb(s);this[l]?i=this[l](r,e):r.walk(o=>{if(i=o.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Yo[s]),r.rawCache[s]=i,i}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return t=s.raws.after,t.includes(`
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(i=>{if(typeof i.raws.before<"u")return s=i.raws.before,s.includes(`
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return s=i.raws.before,s.includes(`
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before<"u")return t=s.raws.before,t.includes(`
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between<"u")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let i=s.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof s.raws.before<"u"){let n=s.raws.before.split(`
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let s=e[t],i=e.raws[t];return i&&i.value===s?i.raw:s}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 Da=Pn;Pn.default=Pn;let Xb=Da;function Bn(e,t){new Xb(t).stringify(e)}var Ki=Bn;Bn.default=Bn;var Zs={};Zs.isClean=Symbol("isClean");Zs.my=Symbol("my");let Cb=wr,Wb=Da,Rb=Ki,{isClean:zt,my:kb}=Zs;function Dn(e,t){let s=new e.constructor;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i)||i==="proxyCache")continue;let n=e[i],r=typeof n;i==="parent"&&r==="object"?t&&(s[i]=t):i==="source"?s[i]=n:Array.isArray(n)?s[i]=n.map(l=>Dn(l,s)):(r==="object"&&n!==null&&(n=Dn(n)),s[i]=n)}return s}function Me(e,t){if(t&&typeof t.offset<"u")return t.offset;let s=1,i=1,n=0;for(let r=0;r<e.length;r++){if(i===t.line&&s===t.column){n=r;break}e[r]===`
`?(s=1,i+=1):s+=1}return n}let jn=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[zt]=!1,this[kb]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}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=Dn(this);for(let s in e)t[s]=e[s];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:s,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:s.column,line:s.line},t)}return new Cb(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[zt]=!0}markDirty(){if(this[zt]){this[zt]=!1;let e=this;for(;e=e.parent;)e[zt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,i=s.slice(Me(s,this.source.start),Me(s,this.source.end)).indexOf(e.word);i!==-1&&(t=this.positionInside(i))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=Me(i,this.source.start),r=n+e;for(let l=n;l<r;l++)i[l]===`
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:Me(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Me(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let n=t.slice(Me(t,this.source.start),Me(t,this.source.end)).indexOf(e.word);n!==-1&&(s=this.positionInside(n),i=this.positionInside(n+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Me(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Me(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<s.line||i.line===s.line&&i.column<=s.column)&&(i={column:s.column+1,line:s.line,offset:s.offset+1}),{end:i,start:s}}raw(e,t){return new Wb().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,s=!1;for(let i of e)i===this?s=!0:s?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},i=t==null;t=t||new Map;let n=0;for(let r in this){if(!Object.prototype.hasOwnProperty.call(this,r)||r==="parent"||r==="proxyCache")continue;let l=this[r];if(Array.isArray(l))s[r]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)s[r]=l.toJSON(null,t);else if(r==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),s[r]={end:l.end,inputId:o,start:l.start}}else s[r]=l}return i&&(s.inputs=[...t.keys()].map(r=>r.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Rb){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let i={node:this};for(let n in s)i[n]=s[n];return e.warn(t,i)}};var Oi=jn;jn.default=jn;let wb=Oi,Qn=class extends wb{constructor(e){super(e),this.type="comment"}};var Mi=Qn;Qn.default=Qn;let vb=Oi,An=class extends vb{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e=Ie(Y({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Ei=An;An.default=An;let ja=Mi,Qa=Ei,xb=Oi,{isClean:Aa,my:_a}=Zs,vr,$a,qa,xr;function ec(e){return e.map(t=>(t.nodes&&(t.nodes=ec(t.nodes)),delete t.source,t))}function tc(e){if(e[Aa]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)tc(t)}let De=class sc extends xb{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]}append(...t){for(let s of t){let i=this.normalize(s,this.last);for(let n of i)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let s of this.nodes)s.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let s=this.getIterator(),i,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(i=this.indexes[s],n=t(this.proxyOf.nodes[i],i),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,s){return s==="proxyOf"?t:t[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...i)=>t[s](...i.map(n=>typeof n=="function"?(r,l)=>n(r.toProxy(),l):n)):s==="every"||s==="some"?i=>t[s]((n,...r)=>i(n.toProxy(),...r)):s==="root"?()=>t.root().toProxy():s==="nodes"?t.nodes.map(i=>i.toProxy()):s==="first"||s==="last"?t[s].toProxy():t[s]:t[s]},set(t,s,i){return t[s]===i||(t[s]=i,(s==="name"||s==="params"||s==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,s){let i=this.index(t),n=this.normalize(s,this.proxyOf.nodes[i]).reverse();i=this.index(t);for(let l of n)this.proxyOf.nodes.splice(i+1,0,l);let r;for(let l in this.indexes)r=this.indexes[l],i<r&&(this.indexes[l]=r+n.length);return this.markDirty(),this}insertBefore(t,s){let i=this.index(t),n=i===0?"prepend":!1,r=this.normalize(s,this.proxyOf.nodes[i],n).reverse();i=this.index(t);for(let o of r)this.proxyOf.nodes.splice(i,0,o);let l;for(let o in this.indexes)l=this.indexes[o],i<=l&&(this.indexes[o]=l+r.length);return this.markDirty(),this}normalize(t,s){if(typeof t=="string")t=ec($a(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Qa(t)]}else if(t.selector||t.selectors)t=[new xr(t)];else if(t.name)t=[new vr(t)];else if(t.text)t=[new ja(t)];else throw new Error("Unknown node type in node creation");return t.map(i=>(i[_a]||sc.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Aa]&&tc(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(i.raws.before=s.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...t){t=t.reverse();for(let s of t){let i=this.normalize(s,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let s;for(let i in this.indexes)s=this.indexes[i],s>=t&&(this.indexes[i]=s-1);return this.markDirty(),this}replaceValues(t,s,i){return i||(i=s,s={}),this.walkDecls(n=>{s.props&&!s.props.includes(n.prop)||s.fast&&!n.value.includes(s.fast)||(n.value=n.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((s,i)=>{let n;try{n=t(s,i)}catch(r){throw s.addToError(r)}return n!==!1&&s.walk&&(n=s.walk(t)),n})}walkAtRules(t,s){return s?t instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&t.test(i.name))return s(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===t)return s(i,n)}):(s=t,this.walk((i,n)=>{if(i.type==="atrule")return s(i,n)}))}walkComments(t){return this.walk((s,i)=>{if(s.type==="comment")return t(s,i)})}walkDecls(t,s){return s?t instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&t.test(i.prop))return s(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===t)return s(i,n)}):(s=t,this.walk((i,n)=>{if(i.type==="decl")return s(i,n)}))}walkRules(t,s){return s?t instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&t.test(i.selector))return s(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===t)return s(i,n)}):(s=t,this.walk((i,n)=>{if(i.type==="rule")return s(i,n)}))}};De.registerParse=e=>{$a=e};De.registerRule=e=>{xr=e};De.registerAtRule=e=>{vr=e};De.registerRoot=e=>{qa=e};var ut=De;De.default=De;De.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,vr.prototype):e.type==="rule"?Object.setPrototypeOf(e,xr.prototype):e.type==="decl"?Object.setPrototypeOf(e,Qa.prototype):e.type==="comment"?Object.setPrototypeOf(e,ja.prototype):e.type==="root"&&Object.setPrototypeOf(e,qa.prototype),e[_a]=!0,e.nodes&&e.nodes.forEach(t=>{De.rebuild(t)})};let ic=ut,Vi=class extends ic{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 Tr=Vi;Vi.default=Vi;ic.registerAtRule(Vi);let Tb=ut,nc,rc,hs=class extends Tb{constructor(e){super(Y({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new nc(new rc,this,e).stringify()}};hs.registerLazyResult=e=>{nc=e};hs.registerProcessor=e=>{rc=e};var Nr=hs;hs.default=hs;let Nb="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Lb=(e=21)=>{let t="",s=e|0;for(;s--;)t+=Nb[Math.random()*64|0];return t};var Jb={nanoid:Lb};let{existsSync:Yb,readFileSync:Fb}=Le,{dirname:on,join:Ub}=Le,{SourceMapConsumer:Fo,SourceMapGenerator:Uo}=Le;function Kb(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let _n=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,i=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=on(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Fo(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,r=e.match(i)||e.match(n);if(r)return decodeURIComponent(e.substr(r[0].length));let l=e.match(t)||e.match(s);if(l)return Kb(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),i=e.indexOf("*/",s);s>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,i)))}loadFile(e){if(this.root=on(e),Yb(e))return this.mapFile=e,Fb(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let i=this.loadFile(s);if(!i)throw new Error("Unable to load previous source map: "+s.toString());return i}}else{if(t instanceof Fo)return Uo.fromSourceMap(t).toString();if(t instanceof Uo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Ub(on(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var oc=_n;_n.default=_n;let{nanoid:Ob}=Jb,{isAbsolute:$n,resolve:qn}=Le,{SourceMapConsumer:Mb,SourceMapGenerator:Eb}=Le,{fileURLToPath:Ko,pathToFileURL:Js}=Le,Oo=wr,zb=oc,ln=Le,an=Symbol("lineToIndexCache"),Hb=!!(Mb&&Eb),Mo=!!(qn&&$n);function Eo(e){if(e[an])return e[an];let t=e.css.split(`
`),s=new Array(t.length),i=0;for(let n=0,r=t.length;n<r;n++)s[n]=i,i+=t[n].length+1;return e[an]=s,s}let Xi=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Mo||/^\w+:\/\//.test(t.from)||$n(t.from)?this.file=t.from:this.file=qn(t.from)),Mo&&Hb){let s=new zb(this.css,t);if(s.text){this.map=s;let i=s.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Ob(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,i={}){let n,r,l,o,a;if(t&&typeof t=="object"){let u=t,d=s;if(typeof u.offset=="number"){o=u.offset;let p=this.fromOffset(o);t=p.line,s=p.col}else t=u.line,s=u.column,o=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let p=this.fromOffset(l);r=p.line,n=p.col}else r=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)o=this.fromLineAndColumn(t,s);else{o=t;let u=this.fromOffset(o);t=u.line,s=u.col}let c=this.origin(t,s,r,n);return c?a=new Oo(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):a=new Oo(e,r===void 0?t:{column:s,line:t},r===void 0?s:{column:n,line:r},this.css,this.file,i.plugin),a.input={column:s,endColumn:n,endLine:r,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Js&&(a.input.url=Js(this.file).toString()),a.input.file=this.file),a}fromLineAndColumn(e,t){return Eo(this)[e-1]+t-1}fromOffset(e){let t=Eo(this),s=t[t.length-1],i=0;if(e>=s)i=t.length-1;else{let n=t.length-2,r;for(;i<n;)if(r=i+(n-i>>1),e<t[r])n=r-1;else if(e>=t[r+1])i=r+1;else{i=r;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:qn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,i){if(!this.map)return!1;let n=this.map.consumer(),r=n.originalPositionFor({column:t,line:e});if(!r.source)return!1;let l;typeof s=="number"&&(l=n.originalPositionFor({column:i,line:s}));let o;$n(r.source)?o=Js(r.source):o=new URL(r.source,this.map.consumer().sourceRoot||Js(this.map.mapFile));let a={column:r.column,endColumn:l&&l.column,endLine:l&&l.line,line:r.line,url:o.toString()};if(o.protocol==="file:")if(Ko)a.file=Ko(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(r.source);return c&&(a.source=c),a}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=Y({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var zi=Xi;Xi.default=Xi;ln&&ln.registerInput&&ln.registerInput(Xi);let lc=ut,ac,cc,Tt=class extends lc{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let i=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new ac(new cc,this,e).stringify()}};Tt.registerLazyResult=e=>{ac=e};Tt.registerProcessor=e=>{cc=e};var Is=Tt;Tt.default=Tt;lc.registerRoot(Tt);let ds={comma(e){return ds.split(e,[","],!0)},space(e){let t=[" ",`
`,"	"];return ds.split(e,t)},split(e,t,s){let i=[],n="",r=!1,l=0,o=!1,a="",c=!1;for(let u of e)c?c=!1:u==="\\"?c=!0:o?u===a&&(o=!1):u==='"'||u==="'"?(o=!0,a=u):u==="("?l+=1:u===")"?l>0&&(l-=1):l===0&&t.includes(u)&&(r=!0),r?(n!==""&&i.push(n.trim()),n="",r=!1):n+=u;return(s||n!=="")&&i.push(n.trim()),i}};var uc=ds;ds.default=ds;let hc=ut,Pb=uc,Ci=class extends hc{get selectors(){return Pb.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Lr=Ci;Ci.default=Ci;hc.registerRule(Ci);let Bb=Tr,Db=Mi,jb=Ei,Qb=zi,Ab=oc,_b=Is,$b=Lr;function ps(e,t){if(Array.isArray(e))return e.map(r=>ps(r));let s=e,{inputs:i}=s,n=Rt(s,["inputs"]);if(i){t=[];for(let r of i){let l=Ie(Y({},r),{__proto__:Qb.prototype});l.map&&(l.map=Ie(Y({},l.map),{__proto__:Ab.prototype})),t.push(l)}}if(n.nodes&&(n.nodes=e.nodes.map(r=>ps(r,t))),n.source){let r=n.source,{inputId:l}=r,o=Rt(r,["inputId"]);n.source=o,l!=null&&(n.source.input=t[l])}if(n.type==="root")return new _b(n);if(n.type==="decl")return new jb(n);if(n.type==="rule")return new $b(n);if(n.type==="comment")return new Db(n);if(n.type==="atrule")return new Bb(n);throw new Error("Unknown node type: "+e.type)}var qb=ps;ps.default=ps;let{dirname:ei,relative:dc,resolve:pc,sep:mc}=Le,{SourceMapConsumer:bc,SourceMapGenerator:ti}=Le,{pathToFileURL:zo}=Le,ef=zi,tf=!!(bc&&ti),sf=!!(ei&&pc&&dc&&mc),nf=class{constructor(e,t,s,i){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
`;this.css.includes(`\r
`)&&(t=`\r
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||ei(e.file),i;this.mapOpts.sourcesContent===!1?(i=new bc(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),sf&&tf&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=ti.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ti({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 ti({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,r;this.stringify(this.root,(l,o,a)=>{if(this.css+=l,o&&a!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),r=l.match(/\n/g),r?(e+=r.length,n=l.lastIndexOf(`
`),t=l.length-n):t+=l.length,o&&a!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ei(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=ei(pc(s,this.mapOpts.annotation)));let i=dc(s,e);return this.memoizedPaths.set(e,i),i}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 ef(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let i=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,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(zo){let s=zo(e).toString();return this.memoizedFileURLs.set(e,s),s}else 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;mc==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var fc=nf;const cn=39,Ho=34,Ys=92,Po=47,Fs=10,Ht=32,Us=12,Ks=9,Os=13,rf=91,of=93,lf=40,af=41,cf=123,uf=125,hf=59,df=42,pf=58,mf=64,Ms=/[\t\n\f\r "#'()/;[\\\]{}]/g,Es=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,bf=/.[\r\n"'(/\\]/,Bo=/[\da-f]/i;var ff=function(e,t={}){let s=e.css.valueOf(),i=t.ignoreErrors,n,r,l,o,a,c,u,d,p,m,b=s.length,h=0,G=[],I=[];function V(){return h}function W(w){throw e.error("Unclosed "+w,h)}function X(){return I.length===0&&h>=b}function S(w){if(I.length)return I.pop();if(h>=b)return;let v=w?w.ignoreUnclosed:!1;switch(n=s.charCodeAt(h),n){case Fs:case Ht:case Ks:case Os:case Us:{o=h;do o+=1,n=s.charCodeAt(o);while(n===Ht||n===Fs||n===Ks||n===Os||n===Us);c=["space",s.slice(h,o)],h=o-1;break}case rf:case of:case cf:case uf:case pf:case hf:case af:{let g=String.fromCharCode(n);c=[g,g,h];break}case lf:{if(m=G.length?G.pop()[1]:"",p=s.charCodeAt(h+1),m==="url"&&p!==cn&&p!==Ho&&p!==Ht&&p!==Fs&&p!==Ks&&p!==Us&&p!==Os){o=h;do{if(u=!1,o=s.indexOf(")",o+1),o===-1)if(i||v){o=h;break}else W("bracket");for(d=o;s.charCodeAt(d-1)===Ys;)d-=1,u=!u}while(u);c=["brackets",s.slice(h,o+1),h,o],h=o}else o=s.indexOf(")",h+1),r=s.slice(h,o+1),o===-1||bf.test(r)?c=["(","(",h]:(c=["brackets",r,h,o],h=o);break}case cn:case Ho:{a=n===cn?"'":'"',o=h;do{if(u=!1,o=s.indexOf(a,o+1),o===-1)if(i||v){o=h+1;break}else W("string");for(d=o;s.charCodeAt(d-1)===Ys;)d-=1,u=!u}while(u);c=["string",s.slice(h,o+1),h,o],h=o;break}case mf:{Ms.lastIndex=h+1,Ms.test(s),Ms.lastIndex===0?o=s.length-1:o=Ms.lastIndex-2,c=["at-word",s.slice(h,o+1),h,o],h=o;break}case Ys:{for(o=h,l=!0;s.charCodeAt(o+1)===Ys;)o+=1,l=!l;if(n=s.charCodeAt(o+1),l&&n!==Po&&n!==Ht&&n!==Fs&&n!==Ks&&n!==Os&&n!==Us&&(o+=1,Bo.test(s.charAt(o)))){for(;Bo.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Ht&&(o+=1)}c=["word",s.slice(h,o+1),h,o],h=o;break}default:{n===Po&&s.charCodeAt(h+1)===df?(o=s.indexOf("*/",h+2)+1,o===0&&(i||v?o=s.length:W("comment")),c=["comment",s.slice(h,o+1),h,o],h=o):(Es.lastIndex=h+1,Es.test(s),Es.lastIndex===0?o=s.length-1:o=Es.lastIndex-2,c=["word",s.slice(h,o+1),h,o],G.push(c),h=o);break}}return h++,c}function k(w){I.push(w)}return{back:k,endOfFile:X,nextToken:S,position:V}};let yf=Tr,gf=Mi,Zf=Ei,If=Is,Do=Lr,Gf=ff;const jo={empty:!0,space:!0};function Sf(e){for(let t=e.length-1;t>=0;t--){let s=e[t],i=s[3]||s[2];if(i)return i}}let Vf=class{constructor(e){this.input=e,this.root=new If,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new yf;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,i,n,r=!1,l=!1,o=[],a=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?a.push(s==="("?")":"]"):s==="{"&&a.length>0?a.push("}"):s===a[a.length-1]&&a.pop(),a.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){l=!0;break}else if(s==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){r=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),r&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,s,i,n;for(let[r,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(i);else{if(s[0]==="word"&&s[1]==="progid")continue;return r}s=i}return!1}comment(e){let t=new gf;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let i=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Gf(this.input)}decl(e,t){let s=new Zf;this.init(s,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(i[3]||i[2]||Sf(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let o=e[0][0];if(o===":"||o==="space"||o==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let r=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)r.push(e.shift());this.precheckMissedSemicolon(e);for(let o=e.length-1;o>=0;o--){if(n=e[o],n[1].toLowerCase()==="!important"){s.important=!0;let a=this.stringFrom(e,o);a=this.spacesFromEnd(e)+a,a!==" !important"&&(s.raws.important=a);break}else if(n[1].toLowerCase()==="important"){let a=e.slice(0),c="";for(let u=o;u>0;u--){let d=a[u][0];if(c.trim().startsWith("!")&&d!=="space")break;c=a.pop()[1]+c}c.trim().startsWith("!")&&(s.important=!0,s.raws.important=c,e=a)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(o=>o[0]!=="space"&&o[0]!=="comment")&&(s.raws.between+=r.map(o=>o[1]).join(""),r=[]),this.raw(s,"value",r.concat(e),t),s.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 Do;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 t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,i=!1,n=null,r=[],l=e[1].startsWith("--"),o=[],a=e;for(;a;){if(s=a[0],o.push(a),s==="("||s==="[")n||(n=a),r.push(s==="("?")":"]");else if(l&&i&&s==="{")n||(n=a),r.push("}");else if(r.length===0)if(s===";")if(i){this.decl(o,l);return}else break;else if(s==="{"){this.rule(o);return}else if(s==="}"){this.tokenizer.back(o.pop()),t=!0;break}else s===":"&&(i=!0);else s===r[r.length-1]&&(r.pop(),r.length===0&&(n=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),r.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(a=o[o.length-1][0],!(a!=="space"&&a!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,i){let n,r,l=s.length,o="",a=!0,c,u;for(let d=0;d<l;d+=1)n=s[d],r=n[0],r==="space"&&d===l-1&&!i?a=!1:r==="comment"?(u=s[d-1]?s[d-1][0]:"empty",c=s[d+1]?s[d+1][0]:"empty",!jo[u]&&!jo[c]?o.slice(-1)===","?a=!1:o+=n[1]:a=!1):o+=n[1];if(!a){let d=s.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new Do;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let i=t;i<e.length;i++)s+=e[i][1];return e.splice(t,e.length-t),s}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 "+e[0][1],{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})}};var Xf=Vf;let Cf=ut,Wf=zi,Rf=Xf;function Wi(e,t){let s=new Wf(e,t),i=new Rf(s);try{i.parse()}catch(n){throw n}return i.root}var Jr=Wi;Wi.default=Wi;Cf.registerParse(Wi);let er=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}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 yc=er;er.default=er;let kf=yc,tr=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new kf(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Yr=tr;tr.default=tr;let wf=ut,vf=Nr,xf=fc,Tf=Jr,Qo=Yr,Nf=Is,Lf=Ki,{isClean:Fe,my:Jf}=Zs;const Yf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ff={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},Uf={Once:!0,postcssPlugin:!0,prepare:!0},Nt=0;function Pt(e){return typeof e=="object"&&typeof e.then=="function"}function gc(e){let t=!1,s=Yf[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,Nt,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,Nt,s+"Exit"]:[s,s+"Exit"]}function Ao(e){let t;return e.type==="document"?t=["Document",Nt,"DocumentExit"]:e.type==="root"?t=["Root",Nt,"RootExit"]:t=gc(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function sr(e){return e[Fe]=!1,e.nodes&&e.nodes.forEach(t=>sr(t)),e}let ir={},Lt=class Zc{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"}constructor(t,s,i){this.stringified=!1,this.processed=!1;let n;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))n=sr(s);else if(s instanceof Zc||s instanceof Qo)n=sr(s.root),s.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=s.map);else{let r=Tf;i.syntax&&(r=i.syntax.parse),i.parser&&(r=i.parser),r.parse&&(r=r.parse);try{n=r(s,i)}catch(l){this.processed=!0,this.error=l}n&&!n[Jf]&&wf.rebuild(n)}this.result=new Qo(t,n,i),this.helpers=Ie(Y({},ir),{postcss:ir,result:this.result}),this.plugins=this.processor.plugins.map(r=>typeof r=="object"&&r.prepare?Y(Y({},r),r.prepare(this.result)):r)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,s){let i=this.result.lastPlugin;try{s&&s.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=i.postcssPlugin,t.setMessage()):i.postcssVersion}catch(n){console&&console.error&&console.error(n)}return t}prepareVisitors(){this.listeners={};let t=(s,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([s,n])};for(let s of this.plugins)if(typeof s=="object")for(let i in s){if(!Ff[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Uf[i])if(typeof s[i]=="object")for(let n in s[i])n==="*"?t(s,i,s[i][n]):t(s,i+"-"+n.toLowerCase(),s[i][n]);else typeof s[i]=="function"&&t(s,i,s[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return fe(this,null,function*(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let s=this.plugins[t],i=this.runOnRoot(s);if(Pt(i))try{yield i}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Fe];){t[Fe]=!0;let s=[Ao(t)];for(;s.length>0;){let i=this.visitTick(s);if(Pt(i))try{yield i}catch(n){let r=s[s.length-1].node;throw this.handleError(n,r)}}}if(this.listeners.OnceExit)for(let[s,i]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(t.type==="document"){let n=t.nodes.map(r=>i(r,this.helpers));yield Promise.all(n)}else yield i(t,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()})}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(i=>t.Once(i,this.helpers));return Pt(s[0])?Promise.all(s):s}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,s=Lf;t.syntax&&(s=t.syntax.stringify),t.stringifier&&(s=t.stringifier),s.stringify&&(s=s.stringify);let i=new xf(s,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let s=this.runOnRoot(t);if(Pt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Fe];)t[Fe]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let s of t.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,s){return this.async().then(t,s)}toString(){return this.css}visitSync(t,s){for(let[i,n]of t){this.result.lastPlugin=i;let r;try{r=n(s,this.helpers)}catch(l){throw this.handleError(l,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(Pt(r))throw this.getAsyncError()}}visitTick(t){let s=t[t.length-1],{node:i,visitors:n}=s;if(i.type!=="root"&&i.type!=="document"&&!i.parent){t.pop();return}if(n.length>0&&s.visitorIndex<n.length){let[l,o]=n[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===n.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=l;try{return o(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(s.iterator!==0){let l=s.iterator,o;for(;o=i.nodes[i.indexes[l]];)if(i.indexes[l]+=1,!o[Fe]){o[Fe]=!0,t.push(Ao(o));return}s.iterator=0,delete i.indexes[l]}let r=s.events;for(;s.eventIndex<r.length;){let l=r[s.eventIndex];if(s.eventIndex+=1,l===Nt){i.nodes&&i.nodes.length&&(i[Fe]=!0,s.iterator=i.getIterator());return}else if(this.listeners[l]){s.visitors=this.listeners[l];return}}t.pop()}walkSync(t){t[Fe]=!0;let s=gc(t);for(let i of s)if(i===Nt)t.nodes&&t.each(n=>{n[Fe]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}};Lt.registerPostcss=e=>{ir=e};var Ic=Lt;Lt.default=Lt;Nf.registerLazyResult(Lt);vf.registerLazyResult(Lt);let Kf=fc,Of=Jr;const Mf=Yr;let Ef=Ki,nr=class{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=Of;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let i,n=Ef;this.result=new Mf(this._processor,i,this._opts),this.result.css=t;let r=this;Object.defineProperty(this.result,"root",{get(){return r.root}});let l=new Kf(n,i,this._opts,t);if(l.isMap()){let[o,a]=l.generate();o&&(this.result.css=o),a&&(this.result.map=a)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var zf=nr;nr.default=nr;let Hf=Nr,Pf=Ic,Bf=zf,Df=Is,ms=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Bf(this,e,t):new Pf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var jf=ms;ms.default=ms;Df.registerProcessor(ms);Hf.registerProcessor(ms);let Gc=Tr,Sc=Mi,Qf=ut,Af=wr,Vc=Ei,Xc=Nr,_f=qb,$f=zi,qf=Ic,ey=uc,ty=Oi,sy=Jr,Fr=jf,iy=Yr,Cc=Is,Wc=Lr,ny=Ki,ry=yc;function ee(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Fr(e)}ee.plugin=function(e,t){let s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),ni.LANG&&ni.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
https://www.w3ctech.com/topic/2226`));let l=t(...r);return l.postcssPlugin=e,l.postcssVersion=new Fr().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(r,l,o){return ee([i(o)]).process(r,l)},i};ee.stringify=ny;ee.parse=sy;ee.fromJSON=_f;ee.list=ey;ee.comment=e=>new Sc(e);ee.atRule=e=>new Gc(e);ee.decl=e=>new Vc(e);ee.rule=e=>new Wc(e);ee.root=e=>new Cc(e);ee.document=e=>new Xc(e);ee.CssSyntaxError=Af;ee.Declaration=Vc;ee.Container=Qf;ee.Processor=Fr;ee.Document=Xc;ee.Comment=Sc;ee.Warning=ry;ee.AtRule=Gc;ee.Result=iy;ee.Input=$f;ee.Rule=Wc;ee.Root=Cc;ee.Node=ty;qf.registerPostcss(ee);ee.default=ee;class Ur{constructor(...t){Re(this,"parentElement",null),Re(this,"parentNode",null),Re(this,"ownerDocument"),Re(this,"firstChild",null),Re(this,"lastChild",null),Re(this,"previousSibling",null),Re(this,"nextSibling",null),Re(this,"ELEMENT_NODE",1),Re(this,"TEXT_NODE",3),Re(this,"nodeType"),Re(this,"nodeName"),Re(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof Ur){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const _o={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},$o={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},zs={},oy=()=>!!globalThis.Zone;function Kr(e){if(zs[e])return zs[e];const t=globalThis[e],s=t.prototype,i=e in _o?_o[e]:void 0,n=!!(i&&i.every(o=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(s,o))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),r=e in $o?$o[e]:void 0,l=!!(r&&r.every(o=>{var a;return typeof s[o]=="function"&&((a=s[o])==null?void 0:a.toString().includes("[native code]"))}));if(n&&l&&!oy())return zs[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const a=o.contentWindow;if(!a)return t.prototype;const c=a[e].prototype;return document.body.removeChild(o),c?zs[e]=c:s}catch{return s}}const un={};function et(e,t,s){var i;const n=`${e}.${String(s)}`;if(un[n])return un[n].call(t);const r=Kr(e),l=(i=Object.getOwnPropertyDescriptor(r,s))==null?void 0:i.get;return l?(un[n]=l,l.call(t)):t[s]}const hn={};function Rc(e,t,s){const i=`${e}.${String(s)}`;if(hn[i])return hn[i].bind(t);const n=Kr(e)[s];return typeof n!="function"?t[s]:(hn[i]=n,n.bind(t))}function ly(e){return et("Node",e,"childNodes")}function ay(e){return et("Node",e,"parentNode")}function cy(e){return et("Node",e,"parentElement")}function uy(e){return et("Node",e,"textContent")}function hy(e,t){return Rc("Node",e,"contains")(t)}function dy(e){return Rc("Node",e,"getRootNode")()}function py(e){return!e||!("host"in e)?null:et("ShadowRoot",e,"host")}function my(e){return e.styleSheets}function by(e){return!e||!("shadowRoot"in e)?null:et("Element",e,"shadowRoot")}function fy(e,t){return et("Element",e,"querySelector")(t)}function yy(e,t){return et("Element",e,"querySelectorAll")(t)}function kc(){return Kr("MutationObserver").constructor}function ht(e,t,s){try{if(!(t in e))return()=>{};const i=e[t],n=s(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch{return()=>{}}}const H={childNodes:ly,parentNode:ay,parentElement:cy,textContent:uy,contains:hy,getRootNode:dy,host:py,styleSheets:my,shadowRoot:by,querySelector:fy,querySelectorAll:yy,mutationObserver:kc,patch:ht};function ge(e,t,s=document){const i={capture:!0};return s.addEventListener(e,t,i),()=>s.removeEventListener(e,t,i)}const gt=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let qo={map:{},getId(){return console.error(gt),-1},getNode(){return console.error(gt),null},removeNodeFromMap(){console.error(gt)},has(){return console.error(gt),!1},reset(){console.error(gt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(qo=new Proxy(qo,{get(e,t,s){return t==="map"&&console.error(gt),Reflect.get(e,t,s)}}));function bs(e,t,s={}){let i=null,n=0;return function(...r){const l=Date.now();!n&&s.leading===!1&&(n=l);const o=t-(l-n),a=this;o<=0||o>t?(i&&(clearTimeout(i),i=null),n=l,e.apply(a,r)):!i&&s.trailing!==!1&&(i=setTimeout(()=>{n=s.leading===!1?0:Date.now(),i=null,e.apply(a,r)},o))}}function Hi(e,t,s,i,n=window){const r=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?s:{set(l){setTimeout(()=>{s.set.call(this,l)},0),r&&r.set&&r.set.call(this,l)}}),()=>Hi(e,t,r||{},!0)}let Ri=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ri=()=>new Date().getTime());function wc(e){var t,s,i,n;const r=e.document;return{left:r.scrollingElement?r.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:r.documentElement.scrollLeft||(r==null?void 0:r.body)&&((t=H.parentElement(r.body))==null?void 0:t.scrollLeft)||((s=r==null?void 0:r.body)==null?void 0:s.scrollLeft)||0,top:r.scrollingElement?r.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(r==null?void 0:r.documentElement.scrollTop)||(r==null?void 0:r.body)&&((i=H.parentElement(r.body))==null?void 0:i.scrollTop)||((n=r==null?void 0:r.body)==null?void 0:n.scrollTop)||0}}function vc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Tc(e){return e?e.nodeType===e.ELEMENT_NODE?e:H.parentElement(e):null}const gy=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function pe(e,t,s,i){if(!e)return!1;const n=Tc(e);if(!n)return!1;try{if(typeof t=="string"){if(n.classList.contains(t)||i&&n.closest("."+t)!==null)return!0}else if(gi(n,t,i))return!0}catch{}return!!(s&&(n.matches(s)||i&&n.closest(s)!==null))}function Zy(e,t){return t.getId(e)!==-1}function dn(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===os}function Nc(e,t){if($t(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const i=H.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?!1:i?Nc(i,t):!0}function rr(e){return!!e.changedTouches}function Iy(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 Lc(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Jc(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function or(e){return e?e instanceof Ur&&"shadowRoot"in e?!!e.shadowRoot:!!H.shadowRoot(e):!1}class Gy{constructor(){C(this,"id",1),C(this,"styleIDMap",new WeakMap),C(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let i;return s===void 0?i=this.id++:i=s,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Yc(e){var t;let s=null;return"getRootNode"in e&&((t=H.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(e))&&(s=H.host(H.getRootNode(e))),s}function Sy(e){let t=e,s;for(;s=Yc(t);)t=s;return t}function Vy(e){const t=e.ownerDocument;if(!t)return!1;const s=Sy(e);return H.contains(t,s)}function Fc(e){const t=e.ownerDocument;return t?H.contains(t,e)||Vy(e):!1}var j=(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))(j||{}),P=(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))(P||{}),Ge=(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))(Ge||{}),Ae=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ae||{}),Jt=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Jt||{}),Zt=(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))(Zt||{}),Uc=(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))(Uc||{});function el(e){return"__ln"in e}class Xy{constructor(){C(this,"length",0),C(this,"head",null),C(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let i=0;i<t;i++)s=(s==null?void 0:s.next)||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&el(t.previousSibling)){const i=t.previousSibling.__ln.next;s.next=i,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,i&&(i.previous=s)}else if(t.nextSibling&&el(t.nextSibling)&&t.nextSibling.__ln.previous){const i=t.nextSibling.__ln.previous;s.previous=i,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,i&&(i.next=s)}else this.head&&(this.head.previous=s),s.next=this.head,this.head=s;s.next===null&&(this.tail=s),this.length++}removeNode(t){const s=t.__ln;this.head&&(s.previous?(s.previous.next=s.next,s.next?s.next.previous=s.previous:this.tail=s.previous):(this.head=s.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const tl=(e,t)=>`${e}@${t}`;class Cy{constructor(){C(this,"frozen",!1),C(this,"locked",!1),C(this,"texts",[]),C(this,"attributes",[]),C(this,"attributeMap",new WeakMap),C(this,"removes",[]),C(this,"mapRemoves",[]),C(this,"movedMap",{}),C(this,"addedSet",new Set),C(this,"movedSet",new Set),C(this,"droppedSet",new Set),C(this,"removesSubTreeCache",new Set),C(this,"mutationCb"),C(this,"blockClass"),C(this,"blockSelector"),C(this,"maskTextClass"),C(this,"maskTextSelector"),C(this,"inlineStylesheet"),C(this,"maskInputOptions"),C(this,"maskTextFn"),C(this,"maskInputFn"),C(this,"keepIframeSrcFn"),C(this,"recordCanvas"),C(this,"inlineImages"),C(this,"inlineVideos"),C(this,"privacySetting"),C(this,"slimDOMOptions"),C(this,"dataURLOptions"),C(this,"doc"),C(this,"mirror"),C(this,"iframeManager"),C(this,"stylesheetManager"),C(this,"shadowDomManager"),C(this,"canvasManager"),C(this,"processedNodeManager"),C(this,"unattachedDoc"),C(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),C(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,i=new Xy,n=a=>{let c=a,u=os;for(;u===os;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},r=a=>{const c=H.parentNode(a);if(!c||!Fc(a))return;let u=!1;if(a.nodeType===Node.TEXT_NODE){const b=c.tagName;if(b==="TEXTAREA")return;b==="STYLE"&&this.addedSet.has(c)&&(u=!0)}const d=$t(c)?this.mirror.getId(Yc(a)):this.mirror.getId(c),p=n(a);if(d===-1||p===-1)return i.addNode(a);const m=St(a,{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,inlineVideos:this.inlineVideos,privacySetting:this.privacySetting,onSerialize:b=>{Lc(b,this.mirror)&&this.iframeManager.addIframe(b),Jc(b,this.mirror)&&this.stylesheetManager.trackLinkElement(b),or(a)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(a),this.doc)},onIframeLoad:(b,h)=>{this.iframeManager.attachIframe(b,h),this.shadowDomManager.observeAttachShadow(b)},onStylesheetLoad:(b,h)=>{this.stylesheetManager.attachLinkElement(b,h)},cssCaptured:u});m&&(t.push({parentId:d,nextId:p,node:m}),s.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)sl(this.removesSubTreeCache,a)&&!this.movedSet.has(H.parentNode(a))||r(a);for(const a of this.addedSet)!il(this.droppedSet,a)&&!sl(this.removesSubTreeCache,a)||il(this.movedSet,a)?r(a):this.droppedSet.add(a);let l=null;for(;i.length;){let a=null;if(l){const c=this.mirror.getId(H.parentNode(l.value)),u=n(l.value);c!==-1&&u!==-1&&(a=l)}if(!a){let c=i.tail;for(;c;){const u=c;if(c=c.previous,u){const d=this.mirror.getId(H.parentNode(u.value));if(n(u.value)===-1)continue;if(d!==-1){a=u;break}else{const p=u.value,m=H.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const b=H.host(m);if(this.mirror.getId(b)!==-1){a=u;break}}}}}}if(!a){for(;i.head;)i.removeNode(i.head.value);break}l=a.previous,i.removeNode(a.value),r(a.value)}const o={texts:this.texts.map(a=>{var c,u;const d=a.node,p=H.parentNode(d);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);let m=a.value;const b=this.privacySetting==="strict",h=this.privacySetting==="default"&&ia(m),G=(u=(c=a.node)==null?void 0:c.parentElement)==null?void 0:u.getAttribute("data-hl-record");return(b||h)&&!G&&m&&(m=fr(m)),{id:this.mirror.getId(d),value:m}}).filter(a=>!s.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:c}=a;if(typeof c.style=="string"){const u=JSON.stringify(a.styleDiff),d=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:c}}).filter(a=>!s.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(o))}),C(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s));const i=Array.from(H.childNodes(t),n=>H.textContent(n)||"").join("");s.attributes.value=mi({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:bi(t),value:i,maskInputFn:this.maskInputFn})}),C(this,"processMutation",t=>{if(!dn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=H.textContent(t.target);!pe(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:aa(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,Tc(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let i=t.attributeName,n=t.target.getAttribute(i);if(i==="value"){const l=bi(s);n=mi({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:l,value:n,overwriteRecord:s.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(pe(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;let r=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(n))if(!s.contentDocument)i="rr_src";else return;if(r||(r={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t.target,r)),i==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!la(s.tagName,i)){if(t.target.tagName==="INPUT"){const l=t.target;if(l.type==="password"){r.attributes.value="*".repeat(l.value.length);break}}if(r.attributes[i]=oa(this.doc,kt(s.tagName),kt(i),n),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(const o of Array.from(s.style)){const a=s.style.getPropertyValue(o),c=s.style.getPropertyPriority(o);a!==l.style.getPropertyValue(o)||c!==l.style.getPropertyPriority(o)?c===""?r.styleDiff[o]=a:r.styleDiff[o]=[a,c]:r._unchangedStyles[o]=[a,c]}for(const o of Array.from(l.style))s.style.getPropertyValue(o)===""&&(r.styleDiff[o]=!1)}else i==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal")}break}case"childList":{if(pe(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{const i=this.mirror.getId(s),n=$t(t.target)?this.mirror.getId(H.host(t.target)):this.mirror.getId(t.target);pe(t.target,this.blockClass,this.blockSelector,!1)||dn(s,this.mirror,this.slimDOMOptions)||!Zy(s,this.mirror)||(this.addedSet.has(s)?(lr(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&i===-1||Nc(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[tl(i,n)]?lr(this.movedSet,s):(this.removes.push({parentId:n,id:i,isShadow:$t(t.target)&&qt(t.target)?!0:void 0}),Wy(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),C(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(dn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;s&&this.mirror.hasNode(s)&&(i=this.mirror.getId(s)),i&&i!==-1&&(this.movedMap[tl(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);pe(t,this.blockClass,this.blockSelector,!1)||(H.childNodes(t).forEach(i=>this.genAdds(i)),or(t)&&H.childNodes(H.shadowRoot(t)).forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}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 lr(e,t){e.delete(t),H.childNodes(t).forEach(s=>lr(e,s))}function Wy(e,t){const s=[e];for(;s.length;){const i=s.pop();t.has(i)||(t.add(i),H.childNodes(i).forEach(n=>s.push(n)))}}function sl(e,t,s){return e.size===0?!1:Ry(e,t)}function Ry(e,t,s){const i=H.parentNode(t);return i?e.has(i):!1}function il(e,t){return e.size===0?!1:Kc(e,t)}function Kc(e,t){const s=H.parentNode(t);return s?e.has(s)?!0:Kc(e,s):!1}let es;function ky(e){es=e}function wy(){es=void 0}const B=e=>es?(...t)=>{try{return e(...t)}catch(s){if(es&&es(s)===!0)return;throw s}}:e,rt=[];function Gs(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 Oc(e,t){const s=new Cy;rt.push(s),s.init(e);const i=new(kc())(B(s.processMutations.bind(s)));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function vy({mousemoveCb:e,sampling:t,doc:s,mirror:i}){if(t.mousemove===!1)return()=>{};const n=typeof t.mousemove=="number"?t.mousemove:50,r=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let l=[],o;const a=bs(B(d=>{const p=Date.now()-o;e(l.map(m=>(m.timeOffset-=p,m)),d),l=[],o=null}),r),c=B(bs(B(d=>{const p=Gs(d),{clientX:m,clientY:b}=rr(d)?d.changedTouches[0]:d;o||(o=Ri()),l.push({x:m,y:b,id:i.getId(p),timeOffset:Ri()-o}),a(typeof DragEvent<"u"&&d instanceof DragEvent?P.Drag:d instanceof MouseEvent?P.MouseMove:P.TouchMove)}),n,{trailing:!1})),u=[ge("mousemove",c,s),ge("touchmove",c,s),ge("drag",c,s)];return B(()=>{u.forEach(d=>d())})}function xy({mouseInteractionCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,sampling:r}){if(r.mouseInteraction===!1)return()=>{};const l=r.mouseInteraction===!0||r.mouseInteraction===void 0?{}:r.mouseInteraction,o=[];let a=null;const c=u=>d=>{const p=Gs(d);if(pe(p,i,n,!0)||gy(p))return;let m=null,b=u;if("pointerType"in d){switch(d.pointerType){case"mouse":m=Ae.Mouse;break;case"touch":m=Ae.Touch;break;case"pen":m=Ae.Pen;break}m===Ae.Touch&&(Ge[u]===Ge.MouseDown?b="TouchStart":Ge[u]===Ge.MouseUp&&(b="TouchEnd"))}else rr(d)&&(m=Ae.Touch);m!==null?(a=m,(b.startsWith("Touch")&&m===Ae.Touch||b.startsWith("Mouse")&&m===Ae.Mouse)&&(m=null)):Ge[u]===Ge.Click&&(m=a,a=null);const h=rr(d)?d.changedTouches[0]:d;if(!h)return;const G=s.getId(p),{clientX:I,clientY:V}=h;B(e)(Y({type:Ge[b],id:G,x:I,y:V},m!==null&&{pointerType:m}))};return Object.keys(Ge).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&l[u]!==!1).forEach(u=>{let d=kt(u);const p=c(u);if(window.PointerEvent)switch(Ge[u]){case Ge.MouseDown:case Ge.MouseUp:d=d.replace("mouse","pointer");break;case Ge.TouchStart:case Ge.TouchEnd:return}o.push(ge(d,p,t))}),B(()=>{o.forEach(u=>u())})}function Mc({scrollCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,sampling:r}){const l=B(bs(B(o=>{const a=Gs(o);if(!a||pe(a,i,n,!0))return;const c=s.getId(a);if(a===t&&t.defaultView){const u=wc(t.defaultView);e({id:c,x:u.left,y:u.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),r.scroll||100));return ge("scroll",l,t)}function Ty({viewportResizeCb:e},{win:t}){let s=-1,i=-1;const n=B(bs(B(()=>{const r=vc(),l=xc();(s!==r||i!==l)&&(e({width:Number(l),height:Number(r)}),s=r,i=l)}),200));return ge("resize",n,t)}const Ny=["INPUT","TEXTAREA","SELECT"],nl=new WeakMap;function Ly({inputCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,ignoreClass:r,ignoreSelector:l,maskInputOptions:o,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function d(I){let V=Gs(I);const W=I.isTrusted,X=V&&V.tagName;if(V&&X==="OPTION"&&(V=H.parentElement(V)),!V||!X||Ny.indexOf(X)<0||pe(V,i,n,!0)||V.classList.contains(r)||l&&V.matches(l))return;let S=V.value,k=!1;const w=bi(V)||"",v=V.getAttribute("data-hl-record");w==="radio"||w==="checkbox"?k=V.checked:na({maskInputOptions:o,type:w,tagName:X,overwriteRecord:v})&&(S=mi({element:V,maskInputOptions:o,tagName:X,type:w,value:S,overwriteRecord:v,maskInputFn:a})),p(V,u?{text:S,isChecked:k,userTriggered:W}:{text:S,isChecked:k});const g=V.name;w==="radio"&&g&&k&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(R=>{if(R!==V){const J=R.value;p(R,u?{text:J,isChecked:!k,userTriggered:!1}:{text:J,isChecked:!k})}})}function p(I,V){const W=nl.get(I);if(!W||W.text!==V.text||W.isChecked!==V.isChecked){nl.set(I,V);const X=s.getId(I);B(e)(Ie(Y({},V),{id:X}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(I=>ge(I,B(d),t)),b=t.defaultView;if(!b)return()=>{m.forEach(I=>I())};const h=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),G=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return h&&h.set&&m.push(...G.map(I=>Hi(I[0],I[1],{set(){B(d)({target:this,isTrusted:!1})}},!1,b))),B(()=>{m.forEach(I=>I())})}function ki(e){const t=[];function s(i,n){if(Hs("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||Hs("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||Hs("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||Hs("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const r=Array.from(i.parentRule.cssRules).indexOf(i);n.unshift(r)}else if(i.parentStyleSheet){const r=Array.from(i.parentStyleSheet.cssRules).indexOf(i);n.unshift(r)}return n}return s(e,t)}function _e(e,t,s){let i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=s.getId(e),{styleId:n,id:i}):{}}function Jy({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const n=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:B((u,d,p)=>{const[m,b]=p,{id:h,styleId:G}=_e(d,t,s.styleMirror);return(h&&h!==-1||G&&G!==-1)&&e({id:h,styleId:G,adds:[{rule:m,index:b}]}),u.apply(d,p)})}),i.CSSStyleSheet.prototype.addRule=function(u,d,p=this.cssRules.length){const m=`${u} { ${d} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[m,p])};const r=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(r,{apply:B((u,d,p)=>{const[m]=p,{id:b,styleId:h}=_e(d,t,s.styleMirror);return(b&&b!==-1||h&&h!==-1)&&e({id:b,styleId:h,removes:[{index:m}]}),u.apply(d,p)})}),i.CSSStyleSheet.prototype.removeRule=function(u){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let l;i.CSSStyleSheet.prototype.replace&&(l=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:B((u,d,p)=>{const[m]=p,{id:b,styleId:h}=_e(d,t,s.styleMirror);return(b&&b!==-1||h&&h!==-1)&&e({id:b,styleId:h,replace:m}),u.apply(d,p)})}));let o;i.CSSStyleSheet.prototype.replaceSync&&(o=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:B((u,d,p)=>{const[m]=p,{id:b,styleId:h}=_e(d,t,s.styleMirror);return(b&&b!==-1||h&&h!==-1)&&e({id:b,styleId:h,replaceSync:m}),u.apply(d,p)})}));const a={};Ps("CSSGroupingRule")?a.CSSGroupingRule=i.CSSGroupingRule:(Ps("CSSMediaRule")&&(a.CSSMediaRule=i.CSSMediaRule),Ps("CSSConditionRule")&&(a.CSSConditionRule=i.CSSConditionRule),Ps("CSSSupportsRule")&&(a.CSSSupportsRule=i.CSSSupportsRule));const c={};return Object.entries(a).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:B((p,m,b)=>{const[h,G]=b,{id:I,styleId:V}=_e(m.parentStyleSheet,t,s.styleMirror);return(I&&I!==-1||V&&V!==-1)&&e({id:I,styleId:V,adds:[{rule:h,index:[...ki(m),G||0]}]}),p.apply(m,b)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:B((p,m,b)=>{const[h]=b,{id:G,styleId:I}=_e(m.parentStyleSheet,t,s.styleMirror);return(G&&G!==-1||I&&I!==-1)&&e({id:G,styleId:I,removes:[{index:[...ki(m),h]}]}),p.apply(m,b)})})}),B(()=>{i.CSSStyleSheet.prototype.insertRule=n,i.CSSStyleSheet.prototype.deleteRule=r,l&&(i.CSSStyleSheet.prototype.replace=l),o&&(i.CSSStyleSheet.prototype.replaceSync=o),Object.entries(a).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function Ec({mirror:e,stylesheetManager:t},s){var i,n,r;let l=null;s.nodeName==="#document"?l=e.getId(s):l=e.getId(H.host(s));const o=s.nodeName==="#document"?(i=s.defaultView)==null?void 0:i.Document:(r=(n=s.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.ShadowRoot,a=o!=null&&o.prototype?Object.getOwnPropertyDescriptor(o==null?void 0:o.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!o||!a?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var u;const d=(u=a.set)==null?void 0:u.call(this,c);if(l!==null&&l!==-1)try{t.adoptStyleSheets(c,l)}catch{}return d}}),B(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Yy({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:i},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(r,{apply:B((o,a,c)=>{var u;const[d,p,m]=c;if(s.has(d))return r.apply(a,[d,p,m]);const{id:b,styleId:h}=_e((u=a.parentRule)==null?void 0:u.parentStyleSheet,t,i.styleMirror);return(b&&b!==-1||h&&h!==-1)&&e({id:b,styleId:h,set:{property:d,value:p,priority:m},index:ki(a.parentRule)}),o.apply(a,c)})});const l=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:B((o,a,c)=>{var u;const[d]=c;if(s.has(d))return l.apply(a,[d]);const{id:p,styleId:m}=_e((u=a.parentRule)==null?void 0:u.parentStyleSheet,t,i.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,remove:{property:d},index:ki(a.parentRule)}),o.apply(a,c)})}),B(()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=l})}function Fy({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:i,sampling:n,doc:r}){const l=B(a=>bs(B(c=>{const u=Gs(c);if(!u||pe(u,t,s,!0))return;const{currentTime:d,volume:p,muted:m,playbackRate:b,loop:h}=u;e({type:a,id:i.getId(u),currentTime:d,volume:p,muted:m,playbackRate:b,loop:h})}),n.media||500)),o=[ge("play",l(Zt.Play),r),ge("pause",l(Zt.Pause),r),ge("seeked",l(Zt.Seeked),r),ge("volumechange",l(Zt.VolumeChange),r),ge("ratechange",l(Zt.RateChange),r)];return B(()=>{o.forEach(a=>a())})}function Uy({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const i=[],n=new WeakMap,r=s.FontFace;s.FontFace=function(o,a,c){const u=new r(o,a,c);return n.set(u,{family:o,buffer:typeof a!="string",descriptors:c,fontSource:typeof a=="string"?a:JSON.stringify(Array.from(new Uint8Array(a)))}),u};const l=ht(t.fonts,"add",function(o){return function(a){return setTimeout(B(()=>{const c=n.get(a);c&&(e(c),n.delete(a))}),0),o.apply(this,[a])}});return i.push(()=>{s.FontFace=r}),i.push(l),B(()=>{i.forEach(o=>o())})}function Ky(e){const{doc:t,mirror:s,blockClass:i,blockSelector:n,selectionCb:r}=e;let l=!0;const o=B(()=>{const a=t.getSelection();if(!a||l&&a!=null&&a.isCollapsed)return;l=a.isCollapsed||!1;const c=[],u=a.rangeCount||0;for(let d=0;d<u;d++){const p=a.getRangeAt(d),{startContainer:m,startOffset:b,endContainer:h,endOffset:G}=p;pe(m,i,n,!0)||pe(h,i,n,!0)||c.push({start:s.getId(m),startOffset:b,end:s.getId(h),endOffset:G})}r({ranges:c})});return o(),ge("selectionchange",o)}function Oy({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:ht(s.customElements,"define",function(i){return function(n,r,l){try{t({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,r,l])}})}function My(e,t){const{mutationCb:s,mousemoveCb:i,mouseInteractionCb:n,scrollCb:r,viewportResizeCb:l,inputCb:o,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p,selectionCb:m,customElementCb:b}=e;e.mutationCb=(...h)=>{t.mutation&&t.mutation(...h),s(...h)},e.mousemoveCb=(...h)=>{t.mousemove&&t.mousemove(...h),i(...h)},e.mouseInteractionCb=(...h)=>{t.mouseInteraction&&t.mouseInteraction(...h),n(...h)},e.scrollCb=(...h)=>{t.scroll&&t.scroll(...h),r(...h)},e.viewportResizeCb=(...h)=>{t.viewportResize&&t.viewportResize(...h),l(...h)},e.inputCb=(...h)=>{t.input&&t.input(...h),o(...h)},e.mediaInteractionCb=(...h)=>{t.mediaInteaction&&t.mediaInteaction(...h),a(...h)},e.styleSheetRuleCb=(...h)=>{t.styleSheetRule&&t.styleSheetRule(...h),c(...h)},e.styleDeclarationCb=(...h)=>{t.styleDeclaration&&t.styleDeclaration(...h),u(...h)},e.canvasMutationCb=(...h)=>{t.canvasMutation&&t.canvasMutation(...h),d(...h)},e.fontCb=(...h)=>{t.font&&t.font(...h),p(...h)},e.selectionCb=(...h)=>{t.selection&&t.selection(...h),m(...h)},e.customElementCb=(...h)=>{t.customElement&&t.customElement(...h),b(...h)}}function Ey(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};My(e,t);let i;e.recordDOM&&(i=Oc(e,e.doc));const n=vy(e),r=xy(e),l=Mc(e),o=Ty(e,{win:s}),a=Ly(e),c=Fy(e);let u=()=>{},d=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(u=Jy(e,{win:s}),d=Ec(e,e.doc),p=Yy(e,{win:s}),e.collectFonts&&(m=Uy(e)));const b=Ky(e),h=Oy(e),G=[];for(const I of e.plugins)G.push(I.observer(I.callback,s,I.options));return B(()=>{rt.forEach(I=>I.reset()),i==null||i.disconnect(),n(),r(),l(),o(),a(),c(),u(),d(),p(),m(),b(),h(),G.forEach(I=>I())})}function Hs(e){return typeof window[e]<"u"}function Ps(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class rl{constructor(t){C(this,"iframeIdToRemoteIdMap",new WeakMap),C(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,i,n){const r=i||this.getIdToRemoteIdMap(t),l=n||this.getRemoteIdToIdMap(t);let o=r.get(s);return o||(o=this.generateIdFn(),r.set(s,o),l.set(o,s)),o}getIds(t,s){const i=this.getIdToRemoteIdMap(t),n=this.getRemoteIdToIdMap(t);return s.map(r=>this.getId(t,r,i,n))}getRemoteId(t,s,i){const n=i||this.getRemoteIdToIdMap(t);return typeof s!="number"?s:n.get(s)||-1}getRemoteIds(t,s){const i=this.getRemoteIdToIdMap(t);return s.map(n=>this.getRemoteId(t,n,i))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}}class zy{constructor(t){C(this,"iframes",new WeakMap),C(this,"crossOriginIframeMap",new WeakMap),C(this,"crossOriginIframeMirror",new rl(ra)),C(this,"crossOriginIframeStyleMirror"),C(this,"crossOriginIframeRootIdMap",new WeakMap),C(this,"mirror"),C(this,"mutationCb"),C(this,"wrappedEmit"),C(this,"loadListener"),C(this,"stylesheetManager"),C(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new rl(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,s){var i,n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(n=this.loadListener)==null||n.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin)return;const i=t.source;if(!i)return;const n=this.crossOriginIframeMap.get(i);if(!n)return;const r=this.transformCrossOriginEvent(n,s.data.event);r&&this.wrappedEmit(r,s.data.isCheckout)}transformCrossOriginEvent(t,s){var i;switch(s.type){case j.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const n=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(s.data.node,n),{timestamp:s.timestamp,type:j.IncrementalSnapshot,data:{source:P.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case j.Meta:case j.Load:case j.DomContentLoaded:return!1;case j.Plugin:return s;case j.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case j.IncrementalSnapshot:switch(s.data.source){case P.Mutation:return s.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);const r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(n.node,r)}),s.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),s.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),s.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),s;case P.Drag:case P.TouchMove:case P.MouseMove:return s.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),s;case P.ViewportResize:return!1;case P.MediaInteraction:case P.MouseInteraction:case P.Scroll:case P.CanvasMutation:case P.Input:return this.replaceIds(s.data,t,["id"]),s;case P.StyleSheetRule:case P.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case P.Font:return s;case P.Selection:return s.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),s;case P.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(i=s.data.styles)==null||i.forEach(n=>{this.replaceStyleIds(n,t,["styleId"])}),s}}return!1}replace(t,s,i,n){for(const r of n)!Array.isArray(s[r])&&typeof s[r]!="number"||(Array.isArray(s[r])?s[r]=t.getIds(i,s[r]):s[r]=t.getId(i,s[r]));return s}replaceIds(t,s,i){return this.replace(this.crossOriginIframeMirror,t,s,i)}replaceStyleIds(t,s,i){return this.replace(this.crossOriginIframeStyleMirror,t,s,i)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,s)})}patchRootIdOnNode(t,s){t.type!==Uc.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,s)})}}class Hy{constructor(t){C(this,"shadowDoms",new WeakSet),C(this,"mutationCb"),C(this,"scrollCb"),C(this,"bypassOptions"),C(this,"mirror"),C(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,s){if(!qt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const i=Oc(Ie(Y({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(Mc(Ie(Y({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(H.host(t))),this.restoreHandlers.push(Ec({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const i=this;this.restoreHandlers.push(ht(t.prototype,"attachShadow",function(n){return function(r){const l=n.call(this,r),o=H.shadowRoot(this);return o&&Fc(this)&&i.addShadowRoot(o,s),l}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Py=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bs=0;Bs<Vt.length;Bs++)Py[Vt.charCodeAt(Bs)]=Bs;var By=function(e){var t=new Uint8Array(e),s,i=t.length,n="";for(s=0;s<i;s+=3)n+=Vt[t[s]>>2],n+=Vt[(t[s]&3)<<4|t[s+1]>>4],n+=Vt[(t[s+1]&15)<<2|t[s+2]>>6],n+=Vt[t[s+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n};const ol=new Map;function Dy(e,t){let s=ol.get(e);return s||(s=new Map,ol.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const zc=(e,t,s)=>{if(!e||!(Pc(e,t)||typeof e=="object"))return;const i=e.constructor.name,n=Dy(s,i);let r=n.indexOf(e);return r===-1&&(r=n.length,n.push(e)),r};function si(e,t,s){if(e instanceof Array)return e.map(i=>si(i,t,s));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const i=e.constructor.name,n=By(e);return{rr_type:i,base64:n}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[si(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:n}=e;return{rr_type:i,src:n}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",n=e.toDataURL();return{rr_type:i,src:n}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[si(e.data,t,s),e.width,e.height]};if(Pc(e,t)||typeof e=="object"){const i=e.constructor.name,n=zc(e,t,s);return{rr_type:i,index:n}}}}return e}const Hc=(e,t,s)=>e.map(i=>si(i,t,s)),Pc=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function jy(e,t,s,i){const n=[],r=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of r)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const o=ht(t.CanvasRenderingContext2D.prototype,l,function(a){return function(...c){return pe(this.canvas,s,i,!0)||setTimeout(()=>{const u=Hc(c,t,this);e(this.canvas,{type:Jt["2D"],property:l,args:u})},0),a.apply(this,c)}});n.push(o)}catch{const o=Hi(t.CanvasRenderingContext2D.prototype,l,{set(a){e(this.canvas,{type:Jt["2D"],property:l,args:[a],setter:!0})}});n.push(o)}return()=>{n.forEach(l=>l())}}function Qy(e){return e==="experimental-webgl"?"webgl":e}function ll(e,t,s,i){const n=[];try{const r=ht(e.HTMLCanvasElement.prototype,"getContext",function(l){return function(o,...a){if(!pe(this,t,s,!0)){const c=Qy(o);if("__context"in this||(this.__context=c),i&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){const u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[o,...a])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function al(e,t,s,i,n,r){const l=[],o=Object.getOwnPropertyNames(e);for(const a of o)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof e[a]!="function")continue;const c=ht(e,a,function(u){return function(...d){const p=u.apply(this,d);if(zc(p,r,this),"tagName"in this.canvas&&!pe(this.canvas,i,n,!0)){const m=Hc(d,r,this),b={type:t,property:a,args:m};s(this.canvas,b)}return p}});l.push(c)}catch{const c=Hi(e,a,{set(u){s(this.canvas,{type:t,property:a,args:[u],setter:!0})}});l.push(c)}return l}function Ay(e,t,s,i){const n=[];return n.push(...al(t.WebGLRenderingContext.prototype,Jt.WebGL,e,s,i,t)),typeof t.WebGL2RenderingContext<"u"&&n.push(...al(t.WebGL2RenderingContext.prototype,Jt.WebGL2,e,s,i,t)),()=>{n.forEach(r=>r())}}const Bc=" ",_y=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),cl=typeof self<"u"&&self.Blob&&new Blob([_y(Bc)],{type:"text/javascript;charset=utf-8"});function $y(e){let t;try{if(t=cl&&(self.URL||self.webkitURL).createObjectURL(cl),!t)throw"";const s=new Worker(t,{name:e==null?void 0:e.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;base64,"+Bc,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class qy{constructor(t){C(this,"pendingCanvasMutations",new Map),C(this,"rafStamps",{latestId:0,invokeId:null}),C(this,"mirror"),C(this,"logger"),C(this,"worker"),C(this,"snapshotInProgressMap",new Map),C(this,"lastSnapshotTime",new Map),C(this,"options"),C(this,"mutationCb"),C(this,"resetObservers"),C(this,"frozen",!1),C(this,"locked",!1),C(this,"processMutation",(d,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(p)});const{sampling:s,win:i,blockClass:n,blockSelector:r,recordCanvas:l,recordLocalVideos:o,recordRemoteVideos:a,initialSnapshotDelay:c,dataURLOptions:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new $y,this.worker.onmessage=d=>{const{id:p}=d.data;if(this.snapshotInProgressMap.set(p,!1),!("base64"in d.data)){this.debug(null,"canvas worker received empty message",{id:p,data:d.data,status:d.data.status});return}const{base64:m,type:b,dx:h,dy:G,dw:I,dh:V}=d.data,W={id:p,type:Jt["2D"],commands:[{property:"clearRect",args:[h,G,I,V]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:b}]},h,G,I,V]}]};this.debug(null,"canvas worker recording mutation",W),this.mutationCb(W)},this.options=t,l&&s==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:s}),this.initCanvasMutationObserver(i,n,r)):l&&typeof s=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:s}),this.initCanvasFPSObserver(o,a,s,i,n,r,{initialSnapshotDelay:c,dataURLOptions:u},t.resizeFactor,t.maxSnapshotDimension))}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}debug(t,...s){if(!this.logger)return;const i=this.mirror.getId(t);let n="[highlight-canvas-manager]";t&&(n=`[highlight-canvas] [id:${i}]`,t.tagName.toLowerCase()==="canvas"&&(n+=` [ctx:${t.__context}]`)),this.logger.debug(n,t,...s)}snapshot(t){return fe(this,null,function*(){var s;const i=this.mirror.getId(t);if(this.snapshotInProgressMap.get(i)){this.debug(t,"snapshotting already in progress for",i);return}const n=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),r=this.lastSnapshotTime.get(i);if(!(r&&new Date().getTime()-r<n)){if(this.debug(t,"starting snapshotting"),t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}this.lastSnapshotTime.set(i,new Date().getTime()),this.snapshotInProgressMap.set(i,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const u=t.getContext(t.__context);((s=u==null?void 0:u.getContextAttributes())==null?void 0:s.preserveDrawingBuffer)===!1&&(u.clear(u.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:u==null?void 0:u.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let l=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const u=Math.max(t.width,t.height);l=Math.min(l,this.options.maxSnapshotDimension/u)}const o=t.width*l,a=t.height*l,c=yield createImageBitmap(t,{resizeWidth:o,resizeHeight:a});this.debug(t,"created image bitmap",{width:c.width,height:c.height}),this.worker.postMessage({id:i,bitmap:c,width:o,height:a,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[c]),this.debug(t,"sent message")}catch(l){this.debug(t,"failed to snapshot",l)}finally{this.snapshotInProgressMap.set(i,!1)}}})}initCanvasFPSObserver(t,s,i,n,r,l,o,a,c){const u=ll(n,r,l,!0),d=1e3/i;let p=0,m;const b=new Map,h=(W,X)=>{const S=[];W.querySelectorAll(X).forEach(v=>S.push(v));const k=document.createNodeIterator(W,Node.ELEMENT_NODE);let w;for(;w=k.nextNode();)w!=null&&w.shadowRoot&&S.push(...h(w.shadowRoot,X));return S},G=W=>{const X=[];return h(n.document,"canvas").forEach(S=>{if(!pe(S,r,l,!0)){this.debug(S,"discovered canvas"),X.push(S);const k=this.mirror.getId(S);b.has(k)||b.set(k,W)}}),X},I=W=>{const X=[];return(t||s)&&h(n.document,"video").forEach(S=>{if(!(!s&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!t&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!pe(S,r,l,!0)){X.push(S);const k=this.mirror.getId(S);b.has(k)||b.set(k,W)}}),X},V=W=>fe(this,null,function*(){if(p&&W-p<d){m=requestAnimationFrame(V);return}p=W;const X=k=>{const w=this.mirror.getId(k),v=b.get(w),g=!o.initialSnapshotDelay||W-v>o.initialSnapshotDelay;return this.debug(k,{delay:o.initialSnapshotDelay,delta:W-v,hadLoadingTime:g}),g},S=[];S.push(...G(W).filter(X).map(k=>this.snapshot(k))),S.push(...I(W).filter(X).map(k=>fe(this,null,function*(){this.debug(k,"starting video snapshotting");const w=this.mirror.getId(k);if(this.snapshotInProgressMap.get(w)){this.debug(k,"video snapshotting already in progress for",w);return}this.snapshotInProgressMap.set(w,!0);try{const{width:v,height:g}=k.getBoundingClientRect(),{actualWidth:R,actualHeight:J}={actualWidth:k.videoWidth,actualHeight:k.videoHeight},E=Math.max(R,J);if(E===0){this.debug(k,"not yet ready",{width:k.width,height:k.height,actualWidth:R,actualHeight:J,boxWidth:v,boxHeight:g});return}let _=a||1;c&&(_=Math.min(_,c/E));const f=R*_,y=J*_,T=yield createImageBitmap(k,{resizeWidth:f,resizeHeight:y}),K=Math.max(v,g)/E,F=R*K,N=J*K,A=(v-F)/2,D=(g-N)/2;this.debug(k,"created image bitmap",{actualWidth:R,actualHeight:J,boxWidth:v,boxHeight:g,outputWidth:F,outputHeight:N,resizeWidth:f,resizeHeight:y,scale:_,outputScale:K,offsetX:A,offsetY:D}),this.worker.postMessage({id:w,bitmap:T,width:f,height:y,dx:A,dy:D,dw:F,dh:N,dataURLOptions:o.dataURLOptions,logDebug:!!this.logger},[T]),this.debug(k,"send message")}catch(v){this.debug(k,"failed to snapshot",v)}finally{this.snapshotInProgressMap.set(w,!1)}}))),yield Promise.all(S).catch(console.error),m=requestAnimationFrame(V)});m=requestAnimationFrame(V),this.resetObservers=()=>{u(),m&&cancelAnimationFrame(m)}}initCanvasMutationObserver(t,s,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=ll(t,s,i,!1),r=jy(this.processMutation.bind(this),t,s,i),l=Ay(this.processMutation.bind(this),t,s,i);this.resetObservers=()=>{n(),r(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const i=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||s===-1)return;const n=i.map(l=>Rt(l,["type"])),{type:r}=i[0];this.mutationCb({id:s,type:r,commands:n}),this.pendingCanvasMutations.delete(t)}}class eg{constructor(t){C(this,"trackedLinkElements",new WeakSet),C(this,"mutationCb"),C(this,"adoptedStyleSheetCb"),C(this,"styleMirror",new Gy),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;const i={id:s,styleIds:[]},n=[];for(const r of t){let l;this.styleMirror.has(r)?l=this.styleMirror.getId(r):(l=this.styleMirror.add(r),n.push({styleId:l,rules:Array.from(r.rules||CSSRule,(o,a)=>({rule:ea(o,r.href),index:a}))})),i.styleIds.push(l)}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class tg{constructor(){C(this,"nodeMap",new WeakMap),C(this,"active",!1)}inOtherBuffer(t,s){const i=this.nodeMap.get(t);return i&&Array.from(i).some(n=>n!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}}let oe,ii,ts,wi=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ao=e.contentWindow)==null?void 0:ao.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Te=qd();function Pe(e={}){var t,s,i,n,r,l,o,a;const{emit:c,checkoutEveryNms:u,checkoutEveryNth:d,blockClass:p="highlight-block",blockSelector:m=null,ignoreClass:b="highlight-ignore",ignoreSelector:h=null,maskTextClass:G="highlight-mask",maskTextSelector:I=null,inlineStylesheet:V=!0,maskAllInputs:W,maskInputOptions:X,slimDOMOptions:S,maskInputFn:k,maskTextFn:w=fr,hooks:v,packFn:g,sampling:R={},mousemoveWait:J,recordDOM:E=!0,recordCanvas:_=!1,recordCrossOriginIframes:f=!1,recordAfter:y=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:T=!1,collectFonts:K=!1,inlineImages:F=!1,inlineVideos:N=!1,plugins:A,keepIframeSrcFn:D=()=>!1,privacySetting:he="default",ignoreCSSAttributes:me=new Set([]),errorHandler:We,logger:ce}=e,we=Y(Y({},e.dataURLOptions),(s=(t=e.sampling)==null?void 0:t.canvas)==null?void 0:s.dataURLOptions);ky(We);const tt=f?window.parent===window:!0;let Ke=!1;if(!tt)try{window.parent.document&&(Ke=!1)}catch{Ke=!0}if(tt&&!c)throw new Error("emit function is required");if(!tt&&!Ke)return()=>{};J!==void 0&&R.mousemove===void 0&&(R.mousemove=J),Te.reset();const Ft=W===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:X!==void 0?X:{password:!0},dt=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all",headTitleMutations:S==="all"}:S||{};Iy();let Ut,pt=0;const mt=$=>{for(const ve of A||[])ve.eventProcessor&&($=ve.eventProcessor($));return g&&!Ke&&($=g($)),$};oe=($,ve)=>{var ne;const re=$;if(re.timestamp=Ri(),(ne=rt[0])!=null&&ne.isFrozen()&&re.type!==j.FullSnapshot&&!(re.type===j.IncrementalSnapshot&&re.data.source===P.Mutation)&&rt.forEach(Je=>Je.unfreeze()),tt)c==null||c(mt(re),ve);else if(Ke){const Je={type:"rrweb",event:mt(re),origin:window.location.origin,isCheckout:ve};window.parent.postMessage(Je,"*")}if(re.type===j.FullSnapshot)Ut=re,pt=0;else if(re.type===j.IncrementalSnapshot){if(re.data.source===P.Mutation&&re.data.isAttachIframe)return;pt++;const Je=d&&pt>=d,te=u&&re.timestamp-Ut.timestamp>u;(Je||te)&&ii(!0)}};const je=$=>{oe({type:j.IncrementalSnapshot,data:Y({source:P.Mutation},$)})},zr=$=>oe({type:j.IncrementalSnapshot,data:Y({source:P.Scroll},$)}),Hr=$=>oe({type:j.IncrementalSnapshot,data:Y({source:P.CanvasMutation},$)}),su=$=>oe({type:j.IncrementalSnapshot,data:Y({source:P.AdoptedStyleSheet},$)}),st=new eg({mutationCb:je,adoptedStyleSheetCb:su}),it=new zy({mirror:Te,mutationCb:je,stylesheetManager:st,recordCrossOriginIframes:f,wrappedEmit:oe});for(const $ of A||[])$.getMirror&&$.getMirror({nodeMirror:Te,crossOriginIframeMirror:it.crossOriginIframeMirror,crossOriginIframeStyleMirror:it.crossOriginIframeStyleMirror});const Pi=new tg;ts=new qy({recordCanvas:_,recordLocalVideos:F,recordRemoteVideos:N,mutationCb:Hr,win:window,blockClass:p,blockSelector:m,mirror:Te,sampling:(i=R==null?void 0:R.canvas)==null?void 0:i.fps,samplingManual:(n=R==null?void 0:R.canvas)==null?void 0:n.fpsManual,clearWebGLBuffer:(r=R==null?void 0:R.canvas)==null?void 0:r.clearWebGLBuffer,initialSnapshotDelay:(l=R==null?void 0:R.canvas)==null?void 0:l.initialSnapshotDelay,dataURLOptions:we,resizeFactor:(o=R==null?void 0:R.canvas)==null?void 0:o.resizeFactor,maxSnapshotDimension:(a=R==null?void 0:R.canvas)==null?void 0:a.maxSnapshotDimension,logger:ce});const Ss=new Hy({mutationCb:je,scrollCb:zr,bypassOptions:{blockClass:p,blockSelector:m,maskTextClass:G,maskTextSelector:I,inlineStylesheet:V,maskInputOptions:Ft,dataURLOptions:we,maskTextFn:w,maskInputFn:k,recordCanvas:_,inlineImages:F,inlineVideos:N,privacySetting:he,sampling:R,slimDOMOptions:dt,iframeManager:it,stylesheetManager:st,canvasManager:ts,keepIframeSrcFn:D,processedNodeManager:Pi},mirror:Te});ii=($=!1)=>{if(!E)return;oe({type:j.Meta,data:{href:window.location.href,width:xc(),height:vc()}},$),st.reset(),Ss.init(),rt.forEach(ne=>ne.lock());const ve=vp(document,{mirror:Te,blockClass:p,blockSelector:m,maskTextClass:G,maskTextSelector:I,inlineStylesheet:V,maskAllInputs:Ft,maskTextFn:w,maskInputFn:k,slimDOM:dt,dataURLOptions:we,recordCanvas:_,inlineImages:F,inlineVideos:N,privacySetting:he,onSerialize:ne=>{Lc(ne,Te)&&it.addIframe(ne),Jc(ne,Te)&&st.trackLinkElement(ne),or(ne)&&Ss.addShadowRoot(H.shadowRoot(ne),document)},onIframeLoad:(ne,re)=>{it.attachIframe(ne,re),Ss.observeAttachShadow(ne)},onStylesheetLoad:(ne,re)=>{st.attachLinkElement(ne,re)},keepIframeSrcFn:D});if(!ve)return console.warn("Failed to snapshot the document");oe({type:j.FullSnapshot,data:{node:ve,initialOffset:wc(window)}},$),rt.forEach(ne=>ne.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&st.adoptStyleSheets(document.adoptedStyleSheets,Te.getId(document))};try{const $=[],ve=re=>{var Je;return B(Ey)({mutationCb:je,mousemoveCb:(te,Bi)=>oe({type:j.IncrementalSnapshot,data:{source:Bi,positions:te}}),mouseInteractionCb:te=>oe({type:j.IncrementalSnapshot,data:Y({source:P.MouseInteraction},te)}),scrollCb:zr,viewportResizeCb:te=>oe({type:j.IncrementalSnapshot,data:Y({source:P.ViewportResize},te)}),inputCb:te=>oe({type:j.IncrementalSnapshot,data:Y({source:P.Input},te)}),mediaInteractionCb:te=>oe({type:j.IncrementalSnapshot,data:Y({source:P.MediaInteraction},te)}),styleSheetRuleCb:te=>oe({type:j.IncrementalSnapshot,data:Y({source:P.StyleSheetRule},te)}),styleDeclarationCb:te=>oe({type:j.IncrementalSnapshot,data:Y({source:P.StyleDeclaration},te)}),canvasMutationCb:Hr,fontCb:te=>oe({type:j.IncrementalSnapshot,data:Y({source:P.Font},te)}),selectionCb:te=>{oe({type:j.IncrementalSnapshot,data:Y({source:P.Selection},te)})},customElementCb:te=>{oe({type:j.IncrementalSnapshot,data:Y({source:P.CustomElement},te)})},blockClass:p,ignoreClass:b,ignoreSelector:h,maskTextClass:G,maskTextSelector:I,maskInputOptions:Ft,inlineStylesheet:V,sampling:R,recordDOM:E,recordCanvas:_,inlineImages:F,inlineVideos:N,userTriggeredOnInput:T,collectFonts:K,doc:re,maskInputFn:k,maskTextFn:w,keepIframeSrcFn:D,blockSelector:m,slimDOMOptions:dt,dataURLOptions:we,mirror:Te,iframeManager:it,stylesheetManager:st,shadowDomManager:Ss,processedNodeManager:Pi,canvasManager:ts,ignoreCSSAttributes:me,privacySetting:he,plugins:((Je=A==null?void 0:A.filter(te=>te.observer))==null?void 0:Je.map(te=>({observer:te.observer,options:te.options,callback:Bi=>oe({type:j.Plugin,data:{plugin:te.name,payload:Bi}})})))||[]},v)};it.addLoadListener(re=>{try{$.push(ve(re.contentDocument))}catch(Je){console.warn(Je)}});const ne=()=>{ii(),$.push(ve(document)),wi=!0};return document.readyState==="interactive"||document.readyState==="complete"?ne():($.push(ge("DOMContentLoaded",()=>{oe({type:j.DomContentLoaded,data:{}}),y==="DOMContentLoaded"&&ne()})),$.push(ge("load",()=>{oe({type:j.Load,data:{}}),y==="load"&&ne()},window))),()=>{$.forEach(re=>re()),Pi.destroy(),wi=!1,wy()}}catch($){console.warn($)}}Pe.addCustomEvent=(e,t)=>{wi&&oe({type:j.Custom,data:{tag:e,payload:t}})};Pe.freezePage=()=>{rt.forEach(e=>e.freeze())};Pe.takeFullSnapshot=e=>{if(!wi)throw new Error("please take full snapshot after start recording");ii(e)};Pe.snapshotCanvas=e=>fe(void 0,null,function*(){if(!ts)throw new Error("canvas manager is not initialized");yield ts.snapshot(e)});Pe.mirror=Te;var ul;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ul||(ul={}));const{addCustomEvent:hl}=Pe,sg=e=>{e(window.location.href);const t=history.pushState;history.pushState=(r=>function(){var l=r.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),l})(history.pushState);const s=history.replaceState;history.replaceState=(r=>function(){var l=r.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),l})(history.replaceState);const i=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",i);const n=function(){e(window.location.href)};return window.addEventListener("locationchange",n),()=>{window.removeEventListener("popstate",i),window.removeEventListener("locationchange",n),history.pushState=t,history.replaceState=s}},ig=e=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},ng=e=>{const t=s=>{if(s.target){const i=s.target,n=jl(i);e(n,s)}};return window.addEventListener("click",t),()=>window.removeEventListener("click",t)},rg=e=>{const t=s=>{if(s.target){const i=jl(s.target);e(i)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},og=e=>{let t,s;if(typeof document.hidden<"u"?(t="hidden",s="visibilitychange"):typeof document.msHidden<"u"?(t="msHidden",s="msvisibilitychange"):typeof document.webkitHidden<"u"&&(t="webkitHidden",s="webkitvisibilitychange"),s===void 0)return()=>{};if(t===void 0)return()=>{};const i=t,n=()=>{const l=document[i];e(!!l)};document.addEventListener(s,n);const r=s;return()=>document.removeEventListener(r,n)},lg=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(r){setTimeout(()=>{var l,o;try{o=JSON.parse((l=r==null?void 0:r.toString())!=null?l:"")}catch{return}(o.type==="track"||o.type==="identify")&&pn(o)&&e(o)},100),t.call(this,r)};const s=r=>{if(r.key==="ajs_user_id"||r.key==="ajs_anonymous_id"||r.key==="ajs_user_traits"){const{userId:l,userTraits:o}=dl();if(l){let a={};o&&(a=JSON.parse(o));const c={type:"identify",userId:l.toString(),traits:a};pn(c)&&e(c)}}},{userId:i,userTraits:n}=dl();if(i){let r={};n&&(r=JSON.parse(n));const l={type:"identify",userId:i.toString(),traits:r};pn(l)&&e(l)}return window.addEventListener("storage",s),Dh(({keyName:r})=>{s({key:r})}),()=>{window.removeEventListener("storage",s),XMLHttpRequest.prototype.send=t}},dl=()=>{const e=Xe("ajs_user_id"),t=Xe("ajs_user_traits"),s=Xe("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:s}},pn=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch{return!1}const s=ag(t),i=Xe(Ve.SEGMENT_LAST_SENT_HASH_KEY);return i===void 0||s!==i?($e(Ve.SEGMENT_LAST_SENT_HASH_KEY,s),!0):!1},ag=e=>{var t=0,s=e.length,i=0;if(s>0)for(;i<s;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t.toString()},cg=(e,t)=>{const s=ug(e);let i=[];const n=!1,r=!0;for(let l=0;l<s.length;l++){let o=s[l].split("+");i=[],o.length>1&&(i=pg(Dc,o)),o=o[o.length-1],o=o==="*"?"*":dg(o),o in Ue||(Ue[o]=[]),Ue[o].push({mods:i,shortcut:s[l],key:s[l],method:t,keyup:n,keydown:r,scope:"all",splitKey:"+"})}mg(document,"keydown",l=>{fg(l)})};let be=[];function ug(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let s=t.lastIndexOf("");for(;s>=0;)t[s-1]+=",",t.splice(s,1),s=t.lastIndexOf("");return t}const Ue={},mn=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,hg={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":mn?173:189,"=":mn?61:187,";":mn?59:186,"'":222,"[":219,"]":221,"\\":220},pl={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},ye={16:!1,18:!1,17:!1,91:!1},Dc={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},dg=e=>hg[e.toLowerCase()]||Dc[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function pg(e,t){const s=t.slice(0,t.length-1);for(let i=0;i<s.length;i++)s[i]=e[s[i].toLowerCase()];return s}function mg(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{s(window.event)})}function bg(e,t,s){let i;if(t.scope===s||t.scope==="all"){i=t.mods.length>0;for(const n in ye)Object.prototype.hasOwnProperty.call(ye,n)&&(!ye[n]&&t.mods.indexOf(+n)>-1||ye[n]&&t.mods.indexOf(+n)===-1)&&(i=!1);(t.mods.length===0&&!ye[16]&&!ye[18]&&!ye[17]&&!ye[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function fg(e){const t=Ue["*"];let s=e.keyCode||e.which||e.charCode;if((s===93||s===224)&&(s=91),be.indexOf(s)===-1&&s!==229&&be.push(s),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{const n=pl[i];e[i]&&be.indexOf(n)===-1?be.push(n):!e[i]&&be.indexOf(n)>-1?be.splice(be.indexOf(n),1):i==="metaKey"&&e[i]&&be.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(be=be.slice(be.indexOf(n))))}),!(s in ye&&(ye[s]=!0,!t))){for(const i in ye)Object.prototype.hasOwnProperty.call(ye,i)&&(ye[i]=e[pl[i]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(be.indexOf(17)===-1&&be.push(17),be.indexOf(18)===-1&&be.push(18),ye[17]=!0,ye[18]=!0),s in Ue){for(let i=0;i<Ue[s].length;i++)if((e.type==="keydown"&&Ue[s][i].keydown||e.type==="keyup"&&Ue[s][i].keyup)&&Ue[s][i].key){const n=Ue[s][i];bg(e,n,"all")}}}}const ml="iframe parent ready",bl="iframe ok",fs="highlightLogs",yg=e=>{let t=Xe(fs)||"";t=t+"["+new Date().getTime()+"] "+e+`
`,$e(fs,t)},gg=()=>Xe(fs)||"",Zg=e=>{if(!e)return;let t=Xe(fs)||"";t&&(t.startsWith(e)?(t=t.slice(e.length),$e(fs,t)):yg("Unable to clear logs "+e.replace(`
`," ")+" from "+t.replace(`
`," ")))};var Ce=Uint8Array,ke=Uint16Array,Or=Int32Array,Mr=new Ce([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]),Er=new Ce([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]),fl=new Ce([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),jc=function(e,t){for(var s=new ke(31),i=0;i<31;++i)s[i]=t+=1<<e[i-1];for(var n=new Or(s[30]),i=1;i<30;++i)for(var r=s[i];r<s[i+1];++r)n[r]=r-s[i]<<5|i;return{b:s,r:n}},Qc=jc(Mr,2),Ig=Qc.b,ar=Qc.r;Ig[28]=258,ar[258]=28;var Gg=jc(Er,0),yl=Gg.r,Ac=new ke(32768);for(var ie=0;ie<32768;++ie){var Qe=(ie&43690)>>1|(ie&21845)<<1;Qe=(Qe&52428)>>2|(Qe&13107)<<2,Qe=(Qe&61680)>>4|(Qe&3855)<<4,Ac[ie]=((Qe&65280)>>8|(Qe&255)<<8)>>1}var ss=function(e,t,s){for(var i=e.length,n=0,r=new ke(t);n<i;++n)e[n]&&++r[e[n]-1];var l=new ke(t);for(n=1;n<t;++n)l[n]=l[n-1]+r[n-1]<<1;var o;for(o=new ke(i),n=0;n<i;++n)e[n]&&(o[n]=Ac[l[e[n]-1]++]>>15-e[n]);return o},at=new Ce(288);for(var ie=0;ie<144;++ie)at[ie]=8;for(var ie=144;ie<256;++ie)at[ie]=9;for(var ie=256;ie<280;++ie)at[ie]=7;for(var ie=280;ie<288;++ie)at[ie]=8;var vi=new Ce(32);for(var ie=0;ie<32;++ie)vi[ie]=5;var Sg=ss(at,9),Vg=ss(vi,5),_c=function(e){return(e+7)/8|0},$c=function(e,t,s){return(s==null||s>e.length)&&(s=e.length),new Ce(e.subarray(t,s))},Ee=function(e,t,s){s<<=t&7;var i=t/8|0;e[i]|=s,e[i+1]|=s>>8},Bt=function(e,t,s){s<<=t&7;var i=t/8|0;e[i]|=s,e[i+1]|=s>>8,e[i+2]|=s>>16},bn=function(e,t){for(var s=[],i=0;i<e.length;++i)e[i]&&s.push({s:i,f:e[i]});var n=s.length,r=s.slice();if(!n)return{t:eu,l:0};if(n==1){var l=new Ce(s[0].s+1);return l[s[0].s]=1,{t:l,l:1}}s.sort(function(S,k){return S.f-k.f}),s.push({s:-1,f:25001});var o=s[0],a=s[1],c=0,u=1,d=2;for(s[0]={s:-1,f:o.f+a.f,l:o,r:a};u!=n-1;)o=s[s[c].f<s[d].f?c++:d++],a=s[c!=u&&s[c].f<s[d].f?c++:d++],s[u++]={s:-1,f:o.f+a.f,l:o,r:a};for(var p=r[0].s,i=1;i<n;++i)r[i].s>p&&(p=r[i].s);var m=new ke(p+1),b=cr(s[u-1],m,0);if(b>t){var i=0,h=0,G=b-t,I=1<<G;for(r.sort(function(k,w){return m[w.s]-m[k.s]||k.f-w.f});i<n;++i){var V=r[i].s;if(m[V]>t)h+=I-(1<<b-m[V]),m[V]=t;else break}for(h>>=G;h>0;){var W=r[i].s;m[W]<t?h-=1<<t-m[W]++-1:++i}for(;i>=0&&h;--i){var X=r[i].s;m[X]==t&&(--m[X],++h)}b=t}return{t:new Ce(m),l:b}},cr=function(e,t,s){return e.s==-1?Math.max(cr(e.l,t,s+1),cr(e.r,t,s+1)):t[e.s]=s},gl=function(e){for(var t=e.length;t&&!e[--t];);for(var s=new ke(++t),i=0,n=e[0],r=1,l=function(a){s[i++]=a},o=1;o<=t;++o)if(e[o]==n&&o!=t)++r;else{if(!n&&r>2){for(;r>138;r-=138)l(32754);r>2&&(l(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(l(n),--r;r>6;r-=6)l(8304);r>2&&(l(r-3<<5|8208),r=0)}for(;r--;)l(n);r=1,n=e[o]}return{c:s.subarray(0,i),n:t}},Dt=function(e,t){for(var s=0,i=0;i<t.length;++i)s+=e[i]*t[i];return s},qc=function(e,t,s){var i=s.length,n=_c(t+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var r=0;r<i;++r)e[n+r+4]=s[r];return(n+4+i)*8},Zl=function(e,t,s,i,n,r,l,o,a,c,u){Ee(t,u++,s),++n[256];for(var d=bn(n,15),p=d.t,m=d.l,b=bn(r,15),h=b.t,G=b.l,I=gl(p),V=I.c,W=I.n,X=gl(h),S=X.c,k=X.n,w=new ke(19),v=0;v<V.length;++v)++w[V[v]&31];for(var v=0;v<S.length;++v)++w[S[v]&31];for(var g=bn(w,7),R=g.t,J=g.l,E=19;E>4&&!R[fl[E-1]];--E);var _=c+5<<3,f=Dt(n,at)+Dt(r,vi)+l,y=Dt(n,p)+Dt(r,h)+l+14+3*E+Dt(w,R)+2*w[16]+3*w[17]+7*w[18];if(a>=0&&_<=f&&_<=y)return qc(t,u,e.subarray(a,a+c));var T,K,F,N;if(Ee(t,u,1+(y<f)),u+=2,y<f){T=ss(p,m),K=p,F=ss(h,G),N=h;var A=ss(R,J);Ee(t,u,W-257),Ee(t,u+5,k-1),Ee(t,u+10,E-4),u+=14;for(var v=0;v<E;++v)Ee(t,u+3*v,R[fl[v]]);u+=3*E;for(var D=[V,S],he=0;he<2;++he)for(var me=D[he],v=0;v<me.length;++v){var We=me[v]&31;Ee(t,u,A[We]),u+=R[We],We>15&&(Ee(t,u,me[v]>>5&127),u+=me[v]>>12)}}else T=Sg,K=at,F=Vg,N=vi;for(var v=0;v<o;++v){var ce=i[v];if(ce>255){var We=ce>>18&31;Bt(t,u,T[We+257]),u+=K[We+257],We>7&&(Ee(t,u,ce>>23&31),u+=Mr[We]);var we=ce&31;Bt(t,u,F[we]),u+=N[we],we>3&&(Bt(t,u,ce>>5&8191),u+=Er[we])}else Bt(t,u,T[ce]),u+=K[ce]}return Bt(t,u,T[256]),u+K[256]},Xg=new Or([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),eu=new Ce(0),Cg=function(e,t,s,i,n,r){var l=r.z||e.length,o=new Ce(i+l+5*(1+Math.ceil(l/7e3))+n),a=o.subarray(i,o.length-n),c=r.l,u=(r.r||0)&7;if(t){u&&(a[0]=r.r>>3);for(var d=Xg[t-1],p=d>>13,m=d&8191,b=(1<<s)-1,h=r.p||new ke(32768),G=r.h||new ke(b+1),I=Math.ceil(s/3),V=2*I,W=function(je){return(e[je]^e[je+1]<<I^e[je+2]<<V)&b},X=new Or(25e3),S=new ke(288),k=new ke(32),w=0,v=0,g=r.i||0,R=0,J=r.w||0,E=0;g+2<l;++g){var _=W(g),f=g&32767,y=G[_];if(h[f]=y,G[_]=f,J<=g){var T=l-g;if((w>7e3||R>24576)&&(T>423||!c)){u=Zl(e,a,0,X,S,k,v,R,E,g-E,u),R=w=v=0,E=g;for(var K=0;K<286;++K)S[K]=0;for(var K=0;K<30;++K)k[K]=0}var F=2,N=0,A=m,D=f-y&32767;if(T>2&&_==W(g-D))for(var he=Math.min(p,T)-1,me=Math.min(32767,g),We=Math.min(258,T);D<=me&&--A&&f!=y;){if(e[g+F]==e[g+F-D]){for(var ce=0;ce<We&&e[g+ce]==e[g+ce-D];++ce);if(ce>F){if(F=ce,N=D,ce>he)break;for(var we=Math.min(D,ce-2),tt=0,K=0;K<we;++K){var Ke=g-D+K&32767,Ft=h[Ke],dt=Ke-Ft&32767;dt>tt&&(tt=dt,y=Ke)}}}f=y,y=h[f],D+=f-y&32767}if(N){X[R++]=268435456|ar[F]<<18|yl[N];var Ut=ar[F]&31,pt=yl[N]&31;v+=Mr[Ut]+Er[pt],++S[257+Ut],++k[pt],J=g+F,++w}else X[R++]=e[g],++S[e[g]]}}for(g=Math.max(g,J);g<l;++g)X[R++]=e[g],++S[e[g]];u=Zl(e,a,c,X,S,k,v,R,E,g-E,u),c||(r.r=u&7|a[u/8|0]<<3,u-=7,r.h=G,r.p=h,r.i=g,r.w=J)}else{for(var g=r.w||0;g<l+c;g+=65535){var mt=g+65535;mt>=l&&(a[u/8|0]=c,mt=l),u=qc(a,u+1,e.subarray(g,mt))}r.i=l}return $c(o,0,i+_c(u)+n)},Wg=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var s=t,i=9;--i;)s=(s&1&&-306674912)^s>>>1;e[t]=s}return e}(),Rg=function(){var e=-1;return{p:function(t){for(var s=e,i=0;i<t.length;++i)s=Wg[s&255^t[i]]^s>>>8;e=s},d:function(){return~e}}},kg=function(e,t,s,i,n){if(!n&&(n={l:1},t.dictionary)){var r=t.dictionary.subarray(-32768),l=new Ce(r.length+e.length);l.set(r),l.set(e,r.length),e=l,n.w=r.length}return Cg(e,t.level==null?6:t.level,t.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,s,i,n)},ur=function(e,t,s){for(;s;++t)e[t]=s,s>>>=8},wg=function(e,t){var s=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&ur(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),s){e[3]=8;for(var i=0;i<=s.length;++i)e[i+10]=s.charCodeAt(i)}},vg=function(e){return 10+(e.filename?e.filename.length+1:0)};function xg(e,t){t||(t={});var s=Rg(),i=e.length;s.p(e);var n=kg(e,t,vg(t),8),r=n.length;return wg(n,t),ur(n,r-8,s.d()),ur(n,r-4,i),n}var Il=typeof TextEncoder<"u"&&new TextEncoder,Tg=typeof TextDecoder<"u"&&new TextDecoder;try{Tg.decode(eu,{stream:!0})}catch{}function Ng(e,t){var s;if(Il)return Il.encode(e);for(var i=e.length,n=new Ce(e.length+(e.length>>1)),r=0,l=function(u){n[r++]=u},s=0;s<i;++s){if(r+5>n.length){var o=new Ce(r+8+(i-s<<1));o.set(n),n=o}var a=e.charCodeAt(s);a<128||t?l(a):a<2048?(l(192|a>>6),l(128|a&63)):a>55295&&a<57344?(a=65536+(a&1047552)|e.charCodeAt(++s)&1023,l(240|a>>18),l(128|a>>12&63),l(128|a>>6&63),l(128|a&63)):(l(224|a>>12),l(128|a>>6&63),l(128|a&63))}return $c(n,0,r)}function Lg(e){return fe(this,null,function*(){const t=Ng(JSON.stringify(e)),s=xg(t),i=yield new Promise(n=>{const r=new FileReader;r.onload=()=>n(r.result),r.readAsDataURL(new Blob([new Uint8Array(s)]))});return{compressedBase64:i.slice(i.indexOf(",")+1),compressedSize:s.length,bufferLength:t.length}})}const tu=" ",Jg=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Gl=typeof self<"u"&&self.Blob&&new Blob([Jg(tu)],{type:"text/javascript;charset=utf-8"});function Yg(e){let t;try{if(t=Gl&&(self.URL||self.webkitURL).createObjectURL(Gl),!t)throw"";const s=new Worker(t,{name:e==null?void 0:e.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;base64,"+tu,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var ze=(e=>(e[e.Initialize=0]="Initialize",e[e.AsyncEvents=1]="AsyncEvents",e[e.Identify=2]="Identify",e[e.Properties=3]="Properties",e[e.Metrics=4]="Metrics",e[e.Feedback=5]="Feedback",e[e.CustomEvent=6]="CustomEvent",e[e.Stop=7]="Stop",e))(ze||{});const Fg=({apiKey:e})=>{(function(t,s){var i=t.amplitude||{_q:[],_iq:{}},n=s.createElement("script");n.type="text/javascript",n.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",n.crossOrigin="anonymous",n.async=!0,n.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",n.onload=function(){t.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(e)};var r=s.getElementsByTagName("script")[0];r.parentNode.insertBefore(n,r);function l(h,G){h.prototype[G]=function(){return this._q.push([G].concat(Array.prototype.slice.call(arguments,0))),this}}for(var o=function(){return this._q=[],this},a=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],c=0;c<a.length;c++)l(o,a[c]);i.Identify=o;for(var u=function(){return this._q=[],this},d=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],p=0;p<d.length;p++)l(u,d[p]);i.Revenue=u;var m=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function b(h){function G(V){h[V]=function(){h._q.push([V].concat(Array.prototype.slice.call(arguments,0)))}}for(var I=0;I<m.length;I++)G(m[I])}b(i),i.getInstance=function(h){return h=(!h||h.length===0?"$default_instance":h).toLowerCase(),Object.prototype.hasOwnProperty.call(i._iq,h)||(i._iq[h]={_q:[]},b(i._iq[h])),i._iq[h]},t.amplitude=i})(window,document)},Ug=({projectToken:e})=>{if(window.mixpanel)return;(function(s,i){if(!i.__SV){var n,r;window.mixpanel=i,i._i=[],i.init=function(l,o,a){function c(p,m){var b=m.split(".");b.length==2&&(p=p[b[0]],m=b[1]),p[m]=function(){p.push([m].concat(Array.prototype.slice.call(arguments,0)))}}var u=i;for(typeof a<"u"?u=i[a]=[]:a="mixpanel",u.people=u.people||[],u.toString=function(p){var m="mixpanel";return a!=="mixpanel"&&(m+="."+a),p||(m+=" (stub)"),m},u.people.toString=function(){return u.toString(1)+".people (stub)"},n="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),r=0;r<n.length;r++)c(u,n[r]);var d="set set_once union unset remove delete".split(" ");u.get_group=function(){function p(G){m[G]=function(){call2_args=arguments,call2=[G].concat(Array.prototype.slice.call(call2_args,0)),u.push([b,call2])}}for(var m={},b=["get_group"].concat(Array.prototype.slice.call(arguments,0)),h=0;h<d.length;h++)p(d[h]);return m},i._i.push([l,o,a])},i.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=Kg,document.head.appendChild(t),t.addEventListener("load",()=>{var s;(s=window.mixpanel)==null||s.init(e)})},Kg="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";class Og{constructor(t){U(this,"options"),U(this,"isRunningOnHighlight"),U(this,"organizationID"),U(this,"graphqlSDK"),U(this,"events"),U(this,"sessionData"),U(this,"ready"),U(this,"manualStopped"),U(this,"state"),U(this,"logger"),U(this,"enableSegmentIntegration"),U(this,"privacySetting"),U(this,"enableCanvasRecording"),U(this,"samplingStrategy"),U(this,"inlineImages"),U(this,"inlineVideos"),U(this,"inlineStylesheet"),U(this,"debugOptions"),U(this,"listeners"),U(this,"firstloadVersion"),U(this,"environment"),U(this,"sessionShortcut"),U(this,"appVersion"),U(this,"serviceName"),U(this,"_worker"),U(this,"_optionsInternal"),U(this,"_backendUrl"),U(this,"_recordingStartTime"),U(this,"_isOnLocalHost"),U(this,"_onToggleFeedbackFormVisibility"),U(this,"_isCrossOriginIframe"),U(this,"_eventBytesSinceSnapshot"),U(this,"_lastSnapshotTime"),U(this,"_lastVisibilityChangeTime"),U(this,"pushPayloadTimerId"),U(this,"hasSessionUnloaded"),U(this,"hasPushedData"),U(this,"reloaded"),U(this,"_hasPreviouslyInitialized"),U(this,"_recordStop"),U(this,"_integrations",[]);var s,i,n,r,l;this.options=t,typeof((s=this.options)==null?void 0:s.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(n=(i=this.options)==null?void 0:i.debug)!=null?n:{},this.logger=new Sl(this.debugOptions.clientInteractions),this._worker=new Yg,this._worker.onmessage=a=>{var c,u,d;((c=a.data.response)==null?void 0:c.type)===ze.AsyncEvents?(this._eventBytesSinceSnapshot+=a.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${a.data.response.id} size ${a.data.response.eventsSize} bytes, compression ratio ${a.data.response.eventsSize/a.data.response.compressedSize}.
                Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((u=a.data.response)==null?void 0:u.type)===ze.CustomEvent?this.addCustomEvent(a.data.response.tag,a.data.response.payload):((d=a.data.response)==null?void 0:d.type)===ze.Stop&&(Se("worker.onmessage","warn","Stopping recording due to worker failure",a.data.response),this.stop(!1))};let o=_s();if(this.reloaded=!1,!((r=this.sessionData)!=null&&r.sessionSecureID)&&o!=null&&o.sessionSecureID)this.sessionData=o,this.options.sessionSecureID=o.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const a of Object.values(Ve))di(a);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1;try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch{this._isCrossOriginIframe=(l=this.options.recordCrossOriginIframe)!=null?l:!0}this._initMembers(this.options)}_reset(t){return fe(this,arguments,function*({forceNew:s,sessionKey:i}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let n,r;if(!s)try{n=Xe(Ve.USER_IDENTIFIER);const l=Xe(Ve.USER_OBJECT);l&&(r=JSON.parse(l))}catch{}for(const l of Object.values(Ve))di(l);this.sessionData.sessionSecureID=i?_t(`${this.organizationID}-${i}`):_t(),this.sessionData.sessionKey=i,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),yield this.start(),n&&r&&this.identify(n,r)})}_initMembers(t){var s,i,n,r,l,o,a,c,u;this.sessionShortcut=!1,this._recordingStartTime=0,this._isOnLocalHost=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname==="",this.ready=!1,this.state="NotRecording",this.manualStopped=!1,this.enableSegmentIntegration=!!t.enableSegmentIntegration,this.privacySetting=(s=t.privacySetting)!=null?s:"default",this.enableCanvasRecording=(i=t.enableCanvasRecording)!=null?i:!1,this.inlineImages=(n=t.inlineImages)!=null?n:this._isOnLocalHost,this.inlineVideos=(r=t.inlineVideos)!=null?r:this._isOnLocalHost,this.inlineStylesheet=(l=t.inlineStylesheet)!=null?l:this._isOnLocalHost,this.samplingStrategy=Y({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:Nh()},(o=t.samplingStrategy)!=null?o:{canvas:2}),this._backendUrl=(a=t==null?void 0:t.backendUrl)!=null?a:"https://pub.observability.app.launchdarkly.com",this._backendUrl[0]==="/"&&(this._backendUrl=new URL(this._backendUrl,document.baseURI).href);const d=new ch(`${this._backendUrl}`,{headers:{}});this.graphqlSDK=xh(d,nd()),this.environment=(c=t.environment)!=null?c:"production",this.appVersion=t.appVersion,this.serviceName=(u=t.serviceName)!=null?u:"browser",typeof t.organizationID=="string"?this.organizationID=t.organizationID:this.organizationID=t.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=t.firstloadVersion||"unknown",this.sessionShortcut=t.sessionShortcut||!1,this._onToggleFeedbackFormVisibility=()=>{};const p=t,m=Rt(p,["firstloadVersion"]);this._optionsInternal=m,this.listeners=[],this.events=[],this.hasSessionUnloaded=!1,this.hasPushedData=!1,window.Intercom&&window.Intercom("onShow",()=>{window.Intercom("update",{highlightSessionURL:this.getCurrentSessionURLWithTimestamp()}),this.addProperties({event:"Intercom onShow"})}),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime(),this._lastVisibilityChangeTime=new Date().getTime()}identify(t,s={},i){if(!t||t===""){Se("identify","warn","Highlight's identify() call was passed an empty identifier.",{user_identifier:t,user_object:s});return}this.sessionData.userIdentifier=t.toString(),this.sessionData.userObject=s,$e(Ve.USER_IDENTIFIER,t.toString()),$e(Ve.USER_OBJECT,JSON.stringify(s)),this._worker.postMessage({message:{type:ze.Identify,userIdentifier:t,userObject:s,source:i}})}track(t,s){this.addProperties(Ie(Y({},s),{event:t}))}addProperties(t={},s){const i=Y({},t);Object.entries(i).forEach(([n,r])=>{try{structuredClone(r)}catch{delete i[n]}}),this._worker.postMessage({message:{type:ze.Properties,propertiesObject:i,propertyType:s}})}addSessionProperties(t){this.addProperties(t,{type:"session"})}start(t){return fe(this,null,function*(){var s,i,n,r,l,o,a,c,u,d;if(!((s=navigator==null?void 0:navigator.userAgent)!=null&&s.includes("Googlebot")||(i=navigator==null?void 0:navigator.userAgent)!=null&&i.includes("AdsBot")))try{if(t!=null&&t.forceNew){yield this._reset(t);return}if(t!=null&&t.sessionKey&&(t==null?void 0:t.sessionKey)!==this.sessionData.sessionKey){yield this._reset(Ie(Y({},t),{forceNew:!0}));return}this.logger.log("Initializing...",t,this.sessionData,this.options),this.sessionData=(n=_s(this.sessionData.sessionSecureID))!=null?n:this.sessionData,(r=this.sessionData)!=null&&r.sessionStartTime?this._recordingStartTime=(l=this.sessionData)==null?void 0:l.sessionStartTime:(this._recordingStartTime=new Date().getTime(),this.sessionData.sessionStartTime=this._recordingStartTime);let p=Xe(Xn.CLIENT_ID);p||(p=_t(),$e(Xn.CLIENT_ID,p));let m;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?m=!1:m=((o=this.options.networkRecording)==null?void 0:o.recordHeadersAndBody)||!1;let b=[];if(typeof this.options.networkRecording=="object"&&(a=this.options.networkRecording.destinationDomains)!=null&&a.length&&(b=this.options.networkRecording.destinationDomains),this._isCrossOriginIframe)yield this._setupCrossOriginIframe();else{const W=yield this.graphqlSDK.initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:m,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this._optionsInternal),environment:this.environment,id:p,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,session_key:this.sessionData.sessionKey,client_id:p,network_recording_domains:b,disable_session_recording:this.options.disableSessionRecording});if(W.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${W.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=W.initializeSession.secure_id,this.sessionData.projectID=parseInt(((c=W==null?void 0:W.initializeSession)==null?void 0:c.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){console.error("Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}At(""),nt(this.sessionData),this.logger.log(`Loaded Highlight
Remote: ${this._backendUrl}
Project ID: ${this.sessionData.projectID}
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:ze.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const W of this._integrations)W.init(this.sessionData.sessionSecureID);if(this.sessionData.userIdentifier&&this.identify(this.sessionData.userIdentifier,this.sessionData.userObject),this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this._isCrossOriginIframe||(this.pushPayloadTimerId=setTimeout(()=>{this._save()},qr)),this.options.disableSessionRecording){this.logger.log("Highlight is NOT RECORDING a session replay per H.init setting."),this.ready=!0,this.state="Recording",this.manualStopped=!1;return}const h=(W,X)=>{X&&this.logger.log("received isCheckout emit",{event:W}),this.events.push(W)};h.bind(this);const G=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[I,V]=ig(this.privacySetting);this._recordStop=Pe({ignoreClass:(u=this.options.ignoreClass)!=null?u:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(d=this.options.blockClass)!=null?d:"highlight-block",blockSelector:this.options.blockSelector,emit:h,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:I,maskInputOptions:V,maskTextClass:this.options.maskTextClass,maskTextSelector:this.options.maskTextSelector,recordCanvas:this.enableCanvasRecording,sampling:{canvas:{fps:this.samplingStrategy.canvas,fpsManual:this.samplingStrategy.canvasManualSnapshot,resizeFactor:this.samplingStrategy.canvasFactor,clearWebGLBuffer:this.samplingStrategy.canvasClearWebGLBuffer,initialSnapshotDelay:this.samplingStrategy.canvasInitialSnapshotDelay,dataURLOptions:this.samplingStrategy.dataUrlOptions,maxSnapshotDimension:this.samplingStrategy.canvasMaxSnapshotDimension}},keepIframeSrcFn:W=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,plugins:[wd()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:Se.bind("RecordSDK","warn")}:void 0}),G||this.options.recordCrossOriginIframe&&this._setupCrossOriginIframeParent(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.sessionData.sessionKey&&this.addProperties({sessionKey:this.sessionData.sessionKey},{type:"session"}),this._setupWindowListeners(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(p){Se("initializeSession _setupWindowListeners","warn",p)}})}_visibilityHandler(t){return fe(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<Uh||(this._lastVisibilityChangeTime=new Date().getTime(),this.logger.log(`Detected window ${t?"hidden":"visible"}.`),t?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}_setupCrossOriginIframe(){return fe(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const s=i=>{if(i.data.highlight===ml){const n=i.data;this.logger.log("highlight got window message ",n),this.sessionData.projectID=n.projectID,this.sessionData.sessionSecureID=n.sessionSecureID,window.parent.postMessage({highlight:bl},"*"),window.removeEventListener("message",s),t()}};window.addEventListener("message",s)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var s;(s=t.contentWindow)==null||s.postMessage({highlight:ml,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},qr),window.addEventListener("message",t=>{t.data.highlight===bl&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var t;try{const i=this;this.enableSegmentIntegration&&this.listeners.push(lg(r=>{if(r.type==="track"){const l={};l["segment-event"]=r.event,i.addProperties(l,{type:"track",source:"segment"})}else if(r.type==="identify"){const l=r.userId.replace(/^"(.*)"$/,"$1");i.identify(l,r.traits,"segment")}})),this.listeners.push(sg(r=>{this.reloaded?(this.addCustomEvent("Reload",r),this.reloaded=!1,i.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",r)})),this.listeners.push(gd(r=>{this.addCustomEvent("Viewport",r)})),this.listeners.push(ng((r,l)=>{let o=null,a=null;if(l&&l.target){const c=l.target;o=fd(c),a=c.textContent,a&&a.length>2e3&&(a=a.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:r,clickTextContent:a,clickSelector:o})})),this.listeners.push(rg(r=>{r&&this.addCustomEvent("Focus",r)})),this.sessionShortcut&&cg(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this._hasPreviouslyInitialized||((t=window.electron)!=null&&t.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:r})=>{this._visibilityHandler(!r)}),this.logger.log("Set up Electron highlight.run events.")):(og(r=>this._visibilityHandler(r)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const n=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n))}catch(i){Se("initializeSession _setupWindowListeners","warn",i)}const s=()=>{this.addCustomEvent("Page Unload",""),At(this.sessionData.sessionSecureID),nt(this.sessionData)};if(window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const i=()=>{this.addCustomEvent("Page Unload",""),At(this.sessionData.sessionSecureID),nt(this.sessionData)};window.addEventListener("pagehide",i),this.listeners.push(()=>window.removeEventListener("beforeunload",i))}}stop(t){this.manualStopped=!!t,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",t&&this._recordStop&&(this._recordStop(),this._recordStop=void 0),this.listeners.forEach(s=>s()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:s,sessionSecureID:i}=this.sessionData,n=(t-this._recordingStartTime)/1e3;return`https://${to}/${s}/sessions/${i}?ts=${n}`}getCurrentSessionURL(){const t=this.sessionData.projectID,s=this.sessionData.sessionSecureID;return t&&s?`https://${to}/${t}/sessions/${s}`:null}snapshot(t){return fe(this,null,function*(){yield Pe.snapshotCanvas(t)})}addSessionFeedback({timestamp:t,verbatim:s,user_email:i,user_name:n}){var r;this._worker.postMessage({message:{type:ze.Feedback,verbatim:s,timestamp:t,userName:n||this.sessionData.userIdentifier,userEmail:i||((r=this.sessionData.userObject)==null?void 0:r.name)}})}_save(){return fe(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>Fh&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let s;((t=this.options)==null?void 0:t.sendMode)==="local"&&(s=i=>fe(this,null,function*(){let n=new Blob([JSON.stringify({query:Ul(El),variables:i})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:n}),0})),yield this._sendPayload({sendFn:s}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),nt(this.sessionData)}catch(s){Se("_save","warn",s)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},Yh))})}addCustomEvent(t,s){if(this.state==="NotRecording"){let i;const n=()=>{clearInterval(i),this.state==="Recording"&&this.events.length>0?hl(t,s):i=setTimeout(n,500)};i=setTimeout(n,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&hl(t,s)}_sendPayload(t){return fe(this,arguments,function*({sendFn:s}){const i=[...this.events],{bytes:n,time:r}=this.enableCanvasRecording?eo.canvas:eo.normal;this._eventBytesSinceSnapshot>=n&&new Date().getTime()-this._lastSnapshotTime>=r&&this.takeFullSnapshot(),this.logger.log(`Sending: ${i.length} events, 
To: ${this._backendUrl}
Org: ${this.organizationID}
SessionSecureID: ${this.sessionData.sessionSecureID}`);const l=new Date().getTime(),o=gg();if(s){const a={session_secure_id:this.sessionData.sessionSecureID,payload_id:l.toString(),events:{events:i},messages:ph({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:o||void 0},{compressedBase64:c}=yield Lg(a);yield s({session_secure_id:this.sessionData.sessionSecureID,payload_id:l.toString(),data:c})}else this._worker.postMessage({message:{type:ze.AsyncEvents,id:l,events:i,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:o}});nt(this.sessionData),this.events=this.events.slice(i.length),Zg(o)})}takeFullSnapshot(){if(!this._recordStop){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this._eventBytesSinceSnapshot,lastSnapshotTime:this._lastSnapshotTime}),Pe.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}register(t,s){this._integrations.push(new dd(t,s))}getHooks(t){return this._integrations.flatMap(s=>{var i,n;return(n=(i=s.getHooks)==null?void 0:i.call(s,t))!=null?n:[]})}getRecordingState(){var t;return(t=this==null?void 0:this.state)!=null?t:"NotRecording"}getSession(){const t=this.sessionData.sessionSecureID,s=_s(t);if(!s)return null;const i=`${this.getFrontendUrl()}/sessions/${t}`;if(!i||!(s!=null&&s.sessionStartTime))return null;const n=new Date().getTime();let r;try{r=new URL(i)}catch(a){return Se("identify","warn",`failed to construct session url from ${i}`,a),null}const l=new URL(r),o=(n-this._recordingStartTime)/1e3;return l.searchParams.set("ts",o.toString()),{url:r.toString(),urlWithTimestamp:l.toString(),sessionSecureID:t}}getFrontendUrl(){var t,s;const i=this._backendUrl.match(Eh);if(i&&(t=i==null?void 0:i.groups)!=null&&t.domain){const n=(s=i.groups.domain)!=null?s:"";return`https://${Oh[n]}${Mh}`}return Kh}}class Mg extends Sd{constructor(t){super(t),U(this,"record"),U(this,"options"),this.options=t}initialize(t,s){var i,n,r,l,o,a,c,u,d;try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker>"u"){console.warn("@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!t){console.warn("@launchdarkly/session-replay is not initializing because the SDK credential is undefined.");return}this.configureSession(t,s);const p=Ie(Y({},s),{organizationID:t,firstloadVersion:bd,environment:(s==null?void 0:s.environment)||"production",appVersion:s==null?void 0:s.version,sessionSecureID:this.sessionSecureID,privacySetting:(i=s==null?void 0:s.privacySetting)!=null?i:"strict"});this.record=new Og(p),s!=null&&s.manualStart||this.record.start(),Gt.load(this.record),!((r=(n=s==null?void 0:s.integrations)==null?void 0:n.mixpanel)!=null&&r.disabled)&&(o=(l=s==null?void 0:s.integrations)==null?void 0:l.mixpanel)!=null&&o.projectToken&&Ug(s.integrations.mixpanel),!((c=(a=s==null?void 0:s.integrations)==null?void 0:a.amplitude)!=null&&c.disabled)&&(d=(u=s==null?void 0:s.integrations)==null?void 0:u.amplitude)!=null&&d.apiKey&&Fg(s.integrations.amplitude)}catch(p){Se("Error initializing @launchdarkly/session-replay SDK","error",p)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(t,s){var i;(i=this.record)==null||i.register(t,s)}getHooks(t){var s,i,n,r;const l=Y(Y({[Lh]:t.sdk.name,[Jh]:t.sdk.version,[rd]:t.clientSideId,[od]:"LaunchDarkly"},(s=t.application)!=null&&s.id?{[ld]:t.application.id}:{}),(i=t.application)!=null&&i.version?{[ad]:t.application.version}:{});return this.initialize((r=(n=t.sdkKey)!=null?n:t.mobileKey)!=null?r:t.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(o,a,c)=>{var u,d,p,m,b,h,G,I;for(const V of(p=(d=(u=this.record)==null?void 0:u.getHooks)==null?void 0:d.call(u,t))!=null?p:[])(m=V.afterIdentify)==null||m.call(V,o,a,c);if(c.status==="completed"){const V=Ie(Y({},ud(o.context)),{key:(G=(h=(b=this.options)==null?void 0:b.contextFriendlyName)==null?void 0:h.call(b,o.context))!=null?G:ro(o.context),canonicalKey:ro(o.context)});(I=this.record)==null||I.identify(V.key,Y(Y({},l),V),"LaunchDarkly")}return a},afterEvaluation:(o,a,c)=>{var u,d,p,m;for(const b of(p=(d=(u=this.record)==null?void 0:u.getHooks)==null?void 0:d.call(u,t))!=null?p:[])(m=b.afterEvaluation)==null||m.call(b,o,a,c);return a},afterTrack:o=>{var a,c,u,d,p;for(const m of(u=(c=(a=this.record)==null?void 0:a.getHooks)==null?void 0:c.call(a,t))!=null?u:[])(d=m.afterTrack)==null||d.call(m,o);(p=this.record)==null||p.track(o.key,{data:o.data,value:o.metricValue})}}]}}const zg=Object.freeze(Object.defineProperty({__proto__:null,get LDRecord(){return Gt},default:Mg},Symbol.toStringTag,{value:"Module"}));export{Vl as X,zg as s};
//# sourceMappingURL=session-replay-DmEeei04.js.map
