@launchdarkly/o11y 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/{common-1QcQF8EE.js → common-C6gSg2Rq.js} +649 -635
- package/dist/{common-1QcQF8EE.js.map → common-C6gSg2Rq.js.map} +1 -1
- package/dist/index.d.ts +49 -0
- package/dist/index.js +5 -5
- package/dist/index.umd.js +74 -74
- package/dist/index.umd.js.map +1 -1
- package/dist/{observe-TWCqC5wb.js → observe-CL-A2YiL.js} +1807 -1687
- package/dist/observe-CL-A2YiL.js.map +1 -0
- package/dist/observe.d.ts +49 -0
- package/dist/observe.js +2 -2
- package/dist/{record-Bgkzgi9x.js → record-BpTfYU5r.js} +2 -2
- package/dist/{record-Bgkzgi9x.js.map → record-BpTfYU5r.js.map} +1 -1
- package/dist/record.d.ts +49 -0
- package/dist/record.js +2 -2
- package/package.json +1 -1
- package/dist/observe-TWCqC5wb.js.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(A,j){typeof exports=="object"&&typeof module!="undefined"?j(exports):typeof define=="function"&&define.amd?define(["exports"],j):(A=typeof globalThis!="undefined"?globalThis:A||self,j(A.LD={}))})(this,function(A){"use strict";var
|
|
2
|
-
`,h=n.split(/\r\n|[\n\r]/g),c=h[i];if(c.length>120){const f=Math.floor(u/80),d=u%80,p=[];for(let m=0;m<c.length;m+=80)p.push(c.slice(m,m+80));return a+
|
|
3
|
-
`)}function
|
|
1
|
+
(function(A,j){typeof exports=="object"&&typeof module!="undefined"?j(exports):typeof define=="function"&&define.amd?define(["exports"],j):(A=typeof globalThis!="undefined"?globalThis:A||self,j(A.LD={}))})(this,function(A){"use strict";var MO=Object.defineProperty,AO=Object.defineProperties;var UO=Object.getOwnPropertyDescriptors;var co=Object.getOwnPropertySymbols,DO=Object.getPrototypeOf,yb=Object.prototype.hasOwnProperty,bb=Object.prototype.propertyIsEnumerable,FO=Reflect.get;var wc=(A,j)=>(j=Symbol[A])?j:Symbol.for("Symbol."+A),Rc=A=>{throw TypeError(A)};var _c=(A,j,le)=>j in A?MO(A,j,{enumerable:!0,configurable:!0,writable:!0,value:le}):A[j]=le,x=(A,j)=>{for(var le in j||(j={}))yb.call(j,le)&&_c(A,le,j[le]);if(co)for(var le of co(j))bb.call(j,le)&&_c(A,le,j[le]);return A},Y=(A,j)=>AO(A,UO(j));var rt=(A,j)=>{var le={};for(var Le in A)yb.call(A,Le)&&j.indexOf(Le)<0&&(le[Le]=A[Le]);if(A!=null&&co)for(var Le of co(A))j.indexOf(Le)<0&&bb.call(A,Le)&&(le[Le]=A[Le]);return le};var L=(A,j,le)=>_c(A,typeof j!="symbol"?j+"":j,le),vb=(A,j,le)=>j.has(A)||Rc("Cannot "+le);var ho=(A,j,le)=>(vb(A,j,"read from private field"),le?le.call(A):j.get(A)),fo=(A,j,le)=>j.has(A)?Rc("Cannot add the same private member more than once"):j instanceof WeakSet?j.add(A):j.set(A,le),po=(A,j,le,Le)=>(vb(A,j,"write to private field"),Le?Le.call(A,le):j.set(A,le),le);var Tc=(A,j,le)=>FO(DO(A),le,j);var z=(A,j,le)=>new Promise((Le,nt)=>{var ze=ut=>{try{cr(le.next(ut))}catch(dr){nt(dr)}},Xt=ut=>{try{cr(le.throw(ut))}catch(dr){nt(dr)}},cr=ut=>ut.done?Le(ut.value):Promise.resolve(ut.value).then(ze,Xt);cr((le=le.apply(A,j)).next())}),JO=function(A,j){this[0]=A,this[1]=j};var Ec=A=>{var j=A[wc("asyncIterator")],le=!1,Le,nt={};return j==null?(j=A[wc("iterator")](),Le=ze=>nt[ze]=Xt=>j[ze](Xt)):(j=j.call(A),Le=ze=>nt[ze]=Xt=>{if(le){if(le=!1,ze==="throw")throw Xt;return Xt}return le=!0,{done:!1,value:new JO(new Promise(cr=>{var ut=j[ze](Xt);ut instanceof Object||Rc("Object expected"),cr(ut)}),1)}}),nt[wc("iterator")]=()=>nt,Le("next"),"throw"in j?Le("throw"):nt.throw=ze=>{throw ze},"return"in j&&Le("return"),nt};var ci,di,hi;const j={key:"_sid"},le="rrweb/sequential-id@1",Le=e=>{const t=j;let r=0;return{name:le,eventProcessor(n){return Object.assign(n,{[t.key]:++r}),n},options:t}};var nt=(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[e.Asset=7]="Asset",e))(nt||{});function ze(e,t){if(!!!e)throw new Error(t)}function Xt(e){return typeof e=="object"&&e!==null}function cr(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const ut=/\r\n|[\n\r]/g;function dr(e,t){let r=0,n=1;for(const i of e.body.matchAll(ut)){if(typeof i.index=="number"||cr(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function Sb(e){return Ic(e.source,dr(e.source,e.start))}function Ic(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,l=t.line===1?r:0,u=t.column+l,a=`${e.name}:${o}:${u}
|
|
2
|
+
`,h=n.split(/\r\n|[\n\r]/g),c=h[i];if(c.length>120){const f=Math.floor(u/80),d=u%80,p=[];for(let m=0;m<c.length;m+=80)p.push(c.slice(m,m+80));return a+Cc([[`${o} |`,p[0]],...p.slice(1,f+1).map(m=>["|",m]),["|","^".padStart(d)],["|",p[f+1]]])}return a+Cc([[`${o-1} |`,h[i-1]],[`${o} |`,c],["|","^".padStart(u)],[`${o+1} |`,h[i+1]]])}function Cc(e){const t=e.filter(([n,i])=>i!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,i])=>n.padStart(r)+(i?" "+i:"")).join(`
|
|
3
|
+
`)}function wb(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}class mo extends Error{constructor(t,...r){var n,i,s;const{nodes:o,source:l,positions:u,path:a,originalError:h,extensions:c}=wb(r);super(t),this.name="GraphQLError",this.path=a!=null?a:void 0,this.originalError=h!=null?h:void 0,this.nodes=Zc(Array.isArray(o)?o:o?[o]:void 0);const f=Zc((n=this.nodes)===null||n===void 0?void 0:n.map(p=>p.loc).filter(p=>p!=null));this.source=l!=null?l:f==null||(i=f[0])===null||i===void 0?void 0:i.source,this.positions=u!=null?u:f==null?void 0:f.map(p=>p.start),this.locations=u&&l?u.map(p=>dr(l,p)):f==null?void 0:f.map(p=>dr(p.source,p.start));const d=Xt(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=c!=null?c:d)!==null&&s!==void 0?s: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}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,mo):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 r of this.nodes)r.loc&&(t+=`
|
|
4
4
|
|
|
5
|
-
`+
|
|
5
|
+
`+Sb(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=`
|
|
6
6
|
|
|
7
|
-
`+
|
|
7
|
+
`+Ic(this.source,r);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 Zc(e){return e===void 0||e.length===0?void 0:e}function Me(e,t,r){return new mo(`Syntax Error: ${r}`,{source:e,positions:[t]})}class _b{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Lc{constructor(t,r,n,i,s,o){this.kind=t,this.start=r,this.end=n,this.line=i,this.column=s,this.value=o,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 xc={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"]},Rb=new Set(Object.keys(xc));function Nc(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&Rb.has(t)}var Wr;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Wr||(Wr={}));var go;(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"})(go||(go={}));var ee;(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"})(ee||(ee={}));function yo(e){return e===9||e===32}function hn(e){return e>=48&&e<=57}function Oc(e){return e>=97&&e<=122||e>=65&&e<=90}function Gc(e){return Oc(e)||e===95}function Tb(e){return Oc(e)||hn(e)||e===95}function Eb(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let o=0;o<e.length;++o){var s;const l=e[o],u=Ib(l);u!==l.length&&(n=(s=n)!==null&&s!==void 0?s:o,i=o,o!==0&&u<r&&(r=u))}return e.map((o,l)=>l===0?o:o.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,i+1)}function Ib(e){let t=0;for(;t<e.length&&yo(e.charCodeAt(t));)++t;return t}function Cb(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,s=n.length>1&&n.slice(1).every(d=>d.length===0||yo(d.charCodeAt(0))),o=r.endsWith('\\"""'),l=e.endsWith('"')&&!o,u=e.endsWith("\\"),a=l||u,h=!i||e.length>70||a||s||o;let c="";const f=i&&yo(e.charCodeAt(0));return(h&&!f||s)&&(c+=`
|
|
8
8
|
`),c+=r,(h||a)&&(c+=`
|
|
9
|
-
`),'"""'+c+'"""'}var G;(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"})(G||(G={}));class
|
|
10
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Me(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function
|
|
11
|
-
`));return e.line+=u.length-1,e.lineStart=i,h}if(a===92&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34&&r.charCodeAt(s+3)===34){l+=r.slice(o,s),o=s+1,s+=4;continue}if(a===10||a===13){l+=r.slice(o,s),u.push(l),a===13&&r.charCodeAt(s+1)===10?s+=2:++s,l="",o=s,i=s;continue}if(Pr(a))++s;else if(
|
|
9
|
+
`),'"""'+c+'"""'}var G;(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"})(G||(G={}));class Zb{constructor(t){const r=new Lc(G.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==G.EOF)do if(t.next)t=t.next;else{const r=xb(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===G.COMMENT);return t}}function Lb(e){return e===G.BANG||e===G.DOLLAR||e===G.AMP||e===G.PAREN_L||e===G.PAREN_R||e===G.SPREAD||e===G.COLON||e===G.EQUALS||e===G.AT||e===G.BRACKET_L||e===G.BRACKET_R||e===G.BRACE_L||e===G.PIPE||e===G.BRACE_R}function Pr(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function fi(e,t){return Vc(e.charCodeAt(t))&&kc(e.charCodeAt(t+1))}function Vc(e){return e>=55296&&e<=56319}function kc(e){return e>=56320&&e<=57343}function hr(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return G.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function ke(e,t,r,n,i){const s=e.line,o=1+r-e.lineStart;return new Lc(t,r,n,s,o,i)}function xb(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const s=r.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Nb(e,i);case 33:return ke(e,G.BANG,i,i+1);case 36:return ke(e,G.DOLLAR,i,i+1);case 38:return ke(e,G.AMP,i,i+1);case 40:return ke(e,G.PAREN_L,i,i+1);case 41:return ke(e,G.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return ke(e,G.SPREAD,i,i+3);break;case 58:return ke(e,G.COLON,i,i+1);case 61:return ke(e,G.EQUALS,i,i+1);case 64:return ke(e,G.AT,i,i+1);case 91:return ke(e,G.BRACKET_L,i,i+1);case 93:return ke(e,G.BRACKET_R,i,i+1);case 123:return ke(e,G.BRACE_L,i,i+1);case 124:return ke(e,G.PIPE,i,i+1);case 125:return ke(e,G.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?Wb(e,i):Gb(e,i)}if(hn(s)||s===45)return Ob(e,i,s);if(Gc(s))return Pb(e,i);throw Me(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Pr(s)||fi(r,i)?`Unexpected character: ${hr(e,i)}.`:`Invalid character: ${hr(e,i)}.`)}return ke(e,G.EOF,n,n)}function Nb(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const s=r.charCodeAt(i);if(s===10||s===13)break;if(Pr(s))++i;else if(fi(r,i))i+=2;else break}return ke(e,G.COMMENT,t,i,r.slice(t+1,i))}function Ob(e,t,r){const n=e.source.body;let i=t,s=r,o=!1;if(s===45&&(s=n.charCodeAt(++i)),s===48){if(s=n.charCodeAt(++i),hn(s))throw Me(e.source,i,`Invalid number, unexpected digit after 0: ${hr(e,i)}.`)}else i=bo(e,i,s),s=n.charCodeAt(i);if(s===46&&(o=!0,s=n.charCodeAt(++i),i=bo(e,i,s),s=n.charCodeAt(i)),(s===69||s===101)&&(o=!0,s=n.charCodeAt(++i),(s===43||s===45)&&(s=n.charCodeAt(++i)),i=bo(e,i,s),s=n.charCodeAt(i)),s===46||Gc(s))throw Me(e.source,i,`Invalid number, expected digit but got: ${hr(e,i)}.`);return ke(e,o?G.FLOAT:G.INT,t,i,n.slice(t,i))}function bo(e,t,r){if(!hn(r))throw Me(e.source,t,`Invalid number, expected digit but got: ${hr(e,t)}.`);const n=e.source.body;let i=t+1;for(;hn(n.charCodeAt(i));)++i;return i}function Gb(e,t){const r=e.source.body,n=r.length;let i=t+1,s=i,o="";for(;i<n;){const l=r.charCodeAt(i);if(l===34)return o+=r.slice(s,i),ke(e,G.STRING,t,i+1,o);if(l===92){o+=r.slice(s,i);const u=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?Vb(e,i):kb(e,i):Xb(e,i);o+=u.value,i+=u.size,s=i;continue}if(l===10||l===13)break;if(Pr(l))++i;else if(fi(r,i))i+=2;else throw Me(e.source,i,`Invalid character within String: ${hr(e,i)}.`)}throw Me(e.source,i,"Unterminated string.")}function Vb(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const s=r.charCodeAt(t+i++);if(s===125){if(i<5||!Pr(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|fn(s),n<0)break}throw Me(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function kb(e,t){const r=e.source.body,n=Xc(r,t+2);if(Pr(n))return{value:String.fromCodePoint(n),size:6};if(Vc(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=Xc(r,t+8);if(kc(i))return{value:String.fromCodePoint(n,i),size:12}}throw Me(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function Xc(e,t){return fn(e.charCodeAt(t))<<12|fn(e.charCodeAt(t+1))<<8|fn(e.charCodeAt(t+2))<<4|fn(e.charCodeAt(t+3))}function fn(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Xb(e,t){const r=e.source.body;switch(r.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:`
|
|
10
|
+
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Me(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function Wb(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,s=t+3,o=s,l="";const u=[];for(;s<n;){const a=r.charCodeAt(s);if(a===34&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34){l+=r.slice(o,s),u.push(l);const h=ke(e,G.BLOCK_STRING,t,s+3,Eb(u).join(`
|
|
11
|
+
`));return e.line+=u.length-1,e.lineStart=i,h}if(a===92&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34&&r.charCodeAt(s+3)===34){l+=r.slice(o,s),o=s+1,s+=4;continue}if(a===10||a===13){l+=r.slice(o,s),u.push(l),a===13&&r.charCodeAt(s+1)===10?s+=2:++s,l="",o=s,i=s;continue}if(Pr(a))++s;else if(fi(r,s))s+=2;else throw Me(e.source,s,`Invalid character within String: ${hr(e,s)}.`)}throw Me(e.source,s,"Unterminated string.")}function Pb(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const s=r.charCodeAt(i);if(Tb(s))++i;else break}return ke(e,G.NAME,t,i,r.slice(t,i))}const Mb=10,Wc=2;function vo(e){return pi(e,[])}function pi(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Ab(e,t);default:return String(e)}}function Ab(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(Ub(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:pi(n,r)}else if(Array.isArray(e))return Fb(e,r);return Db(e,r)}function Ub(e){return typeof e.toJSON=="function"}function Db(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>Wc?"["+Jb(e)+"]":"{ "+r.map(([i,s])=>i+": "+pi(s,t)).join(", ")+" }"}function Fb(e,t){if(e.length===0)return"[]";if(t.length>Wc)return"[Array]";const r=Math.min(Mb,e.length),n=e.length-r,i=[];for(let s=0;s<r;++s)i.push(pi(e[s],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function Jb(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const Hb=globalThis.process&&process.env.NODE_ENV==="production"?function(t,r){return t instanceof r}:function(t,r){if(t instanceof r)return!0;if(typeof t=="object"&&t!==null){var n;const i=r.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(i===s){const o=vo(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm.
|
|
12
12
|
|
|
13
13
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
14
14
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -19,17 +19,17 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
19
19
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
20
20
|
versions may have different capabilities and behavior. The data from one
|
|
21
21
|
version used in the function from another could produce confusing and
|
|
22
|
-
spurious results.`)}}return!1};class Wc{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||ze(!1,`Body must be a string. Received: ${yo(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||ze(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ze(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Db(e){return Ub(e,Wc)}function Pc(e,t){const r=new Fb(e,t),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}class Fb{constructor(t,r={}){const n=Db(t)?t:new Wc(t);this._lexer=new Tb(n),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(G.NAME);return this.node(t,{kind:ee.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ee.DOCUMENT,definitions:this.many(G.SOF,this.parseDefinition,G.EOF)})}parseDefinition(){if(this.peek(G.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===G.NAME){switch(r.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(t)throw Me(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(G.BRACE_L))return this.node(t,{kind:ee.OPERATION_DEFINITION,operation:Wr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(G.NAME)&&(n=this.parseName()),this.node(t,{kind:ee.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(G.NAME);switch(t.value){case"query":return Wr.QUERY;case"mutation":return Wr.MUTATION;case"subscription":return Wr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(G.PAREN_L,this.parseVariableDefinition,G.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ee.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(G.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(G.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(G.DOLLAR),this.node(t,{kind:ee.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ee.SELECTION_SET,selections:this.many(G.BRACE_L,this.parseSelection,G.BRACE_R)})}parseSelection(){return this.peek(G.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(G.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:ee.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(G.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(G.PAREN_L,r,G.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(G.COLON),this.node(r,{kind:ee.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(G.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(G.NAME)?this.node(t,{kind:ee.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ee.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ee.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(t){const r=this._lexer.token;switch(r.kind){case G.BRACKET_L:return this.parseList(t);case G.BRACE_L:return this.parseObject(t);case G.INT:return this.advanceLexer(),this.node(r,{kind:ee.INT,value:r.value});case G.FLOAT:return this.advanceLexer(),this.node(r,{kind:ee.FLOAT,value:r.value});case G.STRING:case G.BLOCK_STRING:return this.parseStringLiteral();case G.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:ee.BOOLEAN,value:!0});case"false":return this.node(r,{kind:ee.BOOLEAN,value:!1});case"null":return this.node(r,{kind:ee.NULL});default:return this.node(r,{kind:ee.ENUM,value:r.value})}case G.DOLLAR:if(t)if(this.expectToken(G.DOLLAR),this._lexer.token.kind===G.NAME){const n=this._lexer.token.value;throw Me(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ee.STRING,value:t.value,block:t.kind===G.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ee.LIST,values:this.any(G.BRACKET_L,r,G.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ee.OBJECT,fields:this.any(G.BRACE_L,r,G.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(G.COLON),this.node(r,{kind:ee.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(G.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(G.AT),this.node(r,{kind:ee.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(G.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(G.BRACKET_R),r=this.node(t,{kind:ee.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(G.BANG)?this.node(t,{kind:ee.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:ee.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(G.STRING)||this.peek(G.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(G.BRACE_L,this.parseOperationTypeDefinition,G.BRACE_R);return this.node(t,{kind:ee.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(G.COLON);const n=this.parseNamedType();return this.node(t,{kind:ee.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ee.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ee.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(G.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(G.BRACE_L,this.parseFieldDefinition,G.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(G.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ee.FIELD_DEFINITION,description:r,name:n,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(G.PAREN_L,this.parseInputValueDef,G.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(G.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(G.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:ee.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ee.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:ee.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(G.EQUALS)?this.delimitedMany(G.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:ee.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(G.BRACE_L,this.parseEnumValueDefinition,G.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ee.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Me(this._lexer.source,this._lexer.token.start,`${pi(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:ee.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(G.BRACE_L,this.parseInputValueDef,G.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===G.NAME)switch(t.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(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(G.BRACE_L,this.parseOperationTypeDefinition,G.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:ee.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:ee.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:ee.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:ee.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ee.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ee.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ee.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(G.AT);const n=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:ee.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(G.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(po,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new bb(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw Me(this._lexer.source,r.start,`Expected ${Mc(t)}, found ${pi(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===G.NAME&&r.value===t)this.advanceLexer();else throw Me(this._lexer.source,r.start,`Expected "${t}", found ${pi(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===G.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t!=null?t:this._lexer.token;return Me(this._lexer.source,r.start,`Unexpected ${pi(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(r.kind!==G.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw Me(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function pi(e){const t=e.value;return Mc(e.kind)+(t!=null?` "${t}"`:"")}function Mc(e){return Eb(e)?`"${e}"`:e}function Jb(e){return`"${e.replace(Hb,Yb)}"`}const Hb=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Yb(e){return Bb[e.charCodeAt(0)]}const Bb=["\\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"],zb=Object.freeze({});function Kb(e,t,r=Lc){const n=new Map;for(const v of Object.values(ee))n.set(v,jb(t,v));let i,s=Array.isArray(e),o=[e],l=-1,u=[],a=e,h,c;const f=[],d=[];do{l++;const v=l===o.length,y=v&&u.length!==0;if(v){if(h=d.length===0?void 0:f[f.length-1],a=c,c=d.pop(),y)if(s){a=a.slice();let _=0;for(const[S,b]of u){const R=S-_;b===null?(a.splice(R,1),_++):a[R]=b}}else{a=x({},a);for(const[_,S]of u)a[_]=S}l=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(c){if(h=s?l:o[l],a=c[h],a==null)continue;f.push(h)}let w;if(!Array.isArray(a)){var p,m;xc(a)||ze(!1,`Invalid AST Node: ${yo(a)}.`);const _=v?(p=n.get(a.kind))===null||p===void 0?void 0:p.leave:(m=n.get(a.kind))===null||m===void 0?void 0:m.enter;if(w=_==null?void 0:_.call(t,a,h,c,f,d),w===zb)break;if(w===!1){if(!v){f.pop();continue}}else if(w!==void 0&&(u.push([h,w]),!v))if(xc(w))a=w;else{f.pop();continue}}if(w===void 0&&y&&u.push([h,a]),v)f.pop();else{var g;i={inArray:s,index:l,keys:o,edits:u,prev:i},s=Array.isArray(a),o=s?a:(g=r[a.kind])!==null&&g!==void 0?g:[],l=-1,u=[],c&&d.push(c),c=a}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function jb(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function bo(e){return Kb(e,$b)}const Qb=80,$b={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>F(e.definitions,`
|
|
22
|
+
spurious results.`)}}return!1};class Pc{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||ze(!1,`Body must be a string. Received: ${vo(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||ze(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ze(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Yb(e){return Hb(e,Pc)}function Mc(e,t){const r=new Bb(e,t),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}class Bb{constructor(t,r={}){const n=Yb(t)?t:new Pc(t);this._lexer=new Zb(n),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(G.NAME);return this.node(t,{kind:ee.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ee.DOCUMENT,definitions:this.many(G.SOF,this.parseDefinition,G.EOF)})}parseDefinition(){if(this.peek(G.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===G.NAME){switch(r.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(t)throw Me(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(G.BRACE_L))return this.node(t,{kind:ee.OPERATION_DEFINITION,operation:Wr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(G.NAME)&&(n=this.parseName()),this.node(t,{kind:ee.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(G.NAME);switch(t.value){case"query":return Wr.QUERY;case"mutation":return Wr.MUTATION;case"subscription":return Wr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(G.PAREN_L,this.parseVariableDefinition,G.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ee.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(G.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(G.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(G.DOLLAR),this.node(t,{kind:ee.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ee.SELECTION_SET,selections:this.many(G.BRACE_L,this.parseSelection,G.BRACE_R)})}parseSelection(){return this.peek(G.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(G.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:ee.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(G.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(G.PAREN_L,r,G.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(G.COLON),this.node(r,{kind:ee.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(G.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(G.NAME)?this.node(t,{kind:ee.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ee.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ee.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(t){const r=this._lexer.token;switch(r.kind){case G.BRACKET_L:return this.parseList(t);case G.BRACE_L:return this.parseObject(t);case G.INT:return this.advanceLexer(),this.node(r,{kind:ee.INT,value:r.value});case G.FLOAT:return this.advanceLexer(),this.node(r,{kind:ee.FLOAT,value:r.value});case G.STRING:case G.BLOCK_STRING:return this.parseStringLiteral();case G.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:ee.BOOLEAN,value:!0});case"false":return this.node(r,{kind:ee.BOOLEAN,value:!1});case"null":return this.node(r,{kind:ee.NULL});default:return this.node(r,{kind:ee.ENUM,value:r.value})}case G.DOLLAR:if(t)if(this.expectToken(G.DOLLAR),this._lexer.token.kind===G.NAME){const n=this._lexer.token.value;throw Me(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ee.STRING,value:t.value,block:t.kind===G.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ee.LIST,values:this.any(G.BRACKET_L,r,G.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ee.OBJECT,fields:this.any(G.BRACE_L,r,G.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(G.COLON),this.node(r,{kind:ee.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(G.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(G.AT),this.node(r,{kind:ee.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(G.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(G.BRACKET_R),r=this.node(t,{kind:ee.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(G.BANG)?this.node(t,{kind:ee.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:ee.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(G.STRING)||this.peek(G.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(G.BRACE_L,this.parseOperationTypeDefinition,G.BRACE_R);return this.node(t,{kind:ee.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(G.COLON);const n=this.parseNamedType();return this.node(t,{kind:ee.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ee.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ee.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(G.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(G.BRACE_L,this.parseFieldDefinition,G.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(G.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ee.FIELD_DEFINITION,description:r,name:n,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(G.PAREN_L,this.parseInputValueDef,G.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(G.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(G.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:ee.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ee.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:ee.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(G.EQUALS)?this.delimitedMany(G.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:ee.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(G.BRACE_L,this.parseEnumValueDefinition,G.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ee.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Me(this._lexer.source,this._lexer.token.start,`${mi(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:ee.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(G.BRACE_L,this.parseInputValueDef,G.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===G.NAME)switch(t.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(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(G.BRACE_L,this.parseOperationTypeDefinition,G.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:ee.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:ee.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:ee.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:ee.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ee.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ee.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ee.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(G.AT);const n=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:ee.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(G.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(go,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new _b(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw Me(this._lexer.source,r.start,`Expected ${Ac(t)}, found ${mi(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===G.NAME&&r.value===t)this.advanceLexer();else throw Me(this._lexer.source,r.start,`Expected "${t}", found ${mi(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===G.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t!=null?t:this._lexer.token;return Me(this._lexer.source,r.start,`Unexpected ${mi(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(r.kind!==G.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw Me(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function mi(e){const t=e.value;return Ac(e.kind)+(t!=null?` "${t}"`:"")}function Ac(e){return Lb(e)?`"${e}"`:e}function zb(e){return`"${e.replace(Kb,jb)}"`}const Kb=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function jb(e){return Qb[e.charCodeAt(0)]}const Qb=["\\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"],$b=Object.freeze({});function qb(e,t,r=xc){const n=new Map;for(const v of Object.values(ee))n.set(v,ev(t,v));let i,s=Array.isArray(e),o=[e],l=-1,u=[],a=e,h,c;const f=[],d=[];do{l++;const v=l===o.length,y=v&&u.length!==0;if(v){if(h=d.length===0?void 0:f[f.length-1],a=c,c=d.pop(),y)if(s){a=a.slice();let R=0;for(const[S,b]of u){const _=S-R;b===null?(a.splice(_,1),R++):a[_]=b}}else{a=x({},a);for(const[R,S]of u)a[R]=S}l=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(c){if(h=s?l:o[l],a=c[h],a==null)continue;f.push(h)}let w;if(!Array.isArray(a)){var p,m;Nc(a)||ze(!1,`Invalid AST Node: ${vo(a)}.`);const R=v?(p=n.get(a.kind))===null||p===void 0?void 0:p.leave:(m=n.get(a.kind))===null||m===void 0?void 0:m.enter;if(w=R==null?void 0:R.call(t,a,h,c,f,d),w===$b)break;if(w===!1){if(!v){f.pop();continue}}else if(w!==void 0&&(u.push([h,w]),!v))if(Nc(w))a=w;else{f.pop();continue}}if(w===void 0&&y&&u.push([h,a]),v)f.pop();else{var g;i={inArray:s,index:l,keys:o,edits:u,prev:i},s=Array.isArray(a),o=s?a:(g=r[a.kind])!==null&&g!==void 0?g:[],l=-1,u=[],c&&d.push(c),c=a}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function ev(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function So(e){return qb(e,rv)}const tv=80,rv={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>F(e.definitions,`
|
|
23
23
|
|
|
24
|
-
`)},OperationDefinition:{leave(e){const t=de("(",F(e.variableDefinitions,", "),")"),r=F([e.operation,F([e.name,t]),F(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+de(" = ",r)+de(" ",F(n," "))},SelectionSet:{leave:({selections:e})=>wt(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const s=de("",e,": ")+t;let o=s+de("(",F(r,", "),")");return o.length>
|
|
25
|
-
`,
|
|
24
|
+
`)},OperationDefinition:{leave(e){const t=de("(",F(e.variableDefinitions,", "),")"),r=F([e.operation,F([e.name,t]),F(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+de(" = ",r)+de(" ",F(n," "))},SelectionSet:{leave:({selections:e})=>wt(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const s=de("",e,": ")+t;let o=s+de("(",F(r,", "),")");return o.length>tv&&(o=s+de(`(
|
|
25
|
+
`,gi(F(r,`
|
|
26
26
|
`)),`
|
|
27
|
-
)`)),F([o,F(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+de(" ",F(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>F(["...",de("on ",e),F(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${de("(",F(r,", "),")")} on ${t} ${de("",F(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?
|
|
27
|
+
)`)),F([o,F(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+de(" ",F(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>F(["...",de("on ",e),F(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${de("(",F(r,", "),")")} on ${t} ${de("",F(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Cb(e):zb(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+F(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+F(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+de("(",F(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>de("",e,`
|
|
28
28
|
`)+F(["schema",F(t," "),wt(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>de("",e,`
|
|
29
29
|
`)+F(["scalar",t,F(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>de("",e,`
|
|
30
30
|
`)+F(["type",t,de("implements ",F(r," & ")),F(n," "),wt(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>de("",e,`
|
|
31
|
-
`)+t+(
|
|
32
|
-
`,
|
|
31
|
+
`)+t+(Uc(r)?de(`(
|
|
32
|
+
`,gi(F(r,`
|
|
33
33
|
`)),`
|
|
34
34
|
)`):de("(",F(r,", "),")"))+": "+n+de(" ",F(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>de("",e,`
|
|
35
35
|
`)+F([t+": "+r,de("= ",n),F(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>de("",e,`
|
|
@@ -38,21 +38,21 @@ spurious results.`)}}return!1};class Wc{constructor(t,r="GraphQL request",n={lin
|
|
|
38
38
|
`)+F(["enum",t,F(r," "),wt(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>de("",e,`
|
|
39
39
|
`)+F([t,F(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>de("",e,`
|
|
40
40
|
`)+F(["input",t,F(r," "),wt(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>de("",e,`
|
|
41
|
-
`)+"directive @"+t+(
|
|
42
|
-
`,
|
|
41
|
+
`)+"directive @"+t+(Uc(r)?de(`(
|
|
42
|
+
`,gi(F(r,`
|
|
43
43
|
`)),`
|
|
44
44
|
)`):de("(",F(r,", "),")"))+(n?" repeatable":"")+" on "+F(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>F(["extend schema",F(e," "),wt(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>F(["extend scalar",e,F(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>F(["extend type",e,de("implements ",F(t," & ")),F(r," "),wt(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>F(["extend interface",e,de("implements ",F(t," & ")),F(r," "),wt(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>F(["extend union",e,F(t," "),de("= ",F(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>F(["extend enum",e,F(t," "),wt(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>F(["extend input",e,F(t," "),wt(r)]," ")}};function F(e,t=""){var r;return(r=e==null?void 0:e.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function wt(e){return de(`{
|
|
45
|
-
`,
|
|
45
|
+
`,gi(F(e,`
|
|
46
46
|
`)),`
|
|
47
|
-
}`)}function de(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function
|
|
48
|
-
`))}function
|
|
49
|
-
`)))!==null&&t!==void 0?t:!1}const vo=JSON,qb=e=>e.toUpperCase(),ev=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},tv=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},rv=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},nv=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Uc=e=>{var n,i;let t;const r=e.definitions.filter(s=>s.kind==="OperationDefinition");return r.length===1&&(t=(i=(n=r[0])==null?void 0:n.name)==null?void 0:i.value),t},So=e=>{if(typeof e=="string"){let r;try{const n=Pc(e);r=Uc(n)}catch(n){}return{query:e,operationName:r}}const t=Uc(e);return{query:bo(e),operationName:t}};class Mr extends Error{constructor(t,r){const n=`${Mr.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Mr.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Mr)}static extractMessage(t){var r,n,i;return(i=(n=(r=t.errors)==null?void 0:r[0])==null?void 0:n.message)!=null?i:`GraphQL Error (Code: ${t.status})`}}var wo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ro={exports:{}};(function(e,t){var r=typeof self!="undefined"?self:wo,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch(Z){return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(Z){return Z&&DataView.prototype.isPrototypeOf(Z)}if(l.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(Z){return Z&&a.indexOf(Object.prototype.toString.call(Z))>-1};function c(Z){if(typeof Z!="string"&&(Z=String(Z)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(Z))throw new TypeError("Invalid character in header field name");return Z.toLowerCase()}function f(Z){return typeof Z!="string"&&(Z=String(Z)),Z}function d(Z){var T={next:function(){var W=Z.shift();return{done:W===void 0,value:W}}};return l.iterable&&(T[Symbol.iterator]=function(){return T}),T}function p(Z){this.map={},Z instanceof p?Z.forEach(function(T,W){this.append(W,T)},this):Array.isArray(Z)?Z.forEach(function(T){this.append(T[0],T[1])},this):Z&&Object.getOwnPropertyNames(Z).forEach(function(T){this.append(T,Z[T])},this)}p.prototype.append=function(Z,T){Z=c(Z),T=f(T);var W=this.map[Z];this.map[Z]=W?W+", "+T:T},p.prototype.delete=function(Z){delete this.map[c(Z)]},p.prototype.get=function(Z){return Z=c(Z),this.has(Z)?this.map[Z]:null},p.prototype.has=function(Z){return this.map.hasOwnProperty(c(Z))},p.prototype.set=function(Z,T){this.map[c(Z)]=f(T)},p.prototype.forEach=function(Z,T){for(var W in this.map)this.map.hasOwnProperty(W)&&Z.call(T,this.map[W],W,this)},p.prototype.keys=function(){var Z=[];return this.forEach(function(T,W){Z.push(W)}),d(Z)},p.prototype.values=function(){var Z=[];return this.forEach(function(T){Z.push(T)}),d(Z)},p.prototype.entries=function(){var Z=[];return this.forEach(function(T,W){Z.push([W,T])}),d(Z)},l.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(Z){if(Z.bodyUsed)return Promise.reject(new TypeError("Already read"));Z.bodyUsed=!0}function g(Z){return new Promise(function(T,W){Z.onload=function(){T(Z.result)},Z.onerror=function(){W(Z.error)}})}function v(Z){var T=new FileReader,W=g(T);return T.readAsArrayBuffer(Z),W}function y(Z){var T=new FileReader,W=g(T);return T.readAsText(Z),W}function w(Z){for(var T=new Uint8Array(Z),W=new Array(T.length),k=0;k<T.length;k++)W[k]=String.fromCharCode(T[k]);return W.join("")}function _(Z){if(Z.slice)return Z.slice(0);var T=new Uint8Array(Z.byteLength);return T.set(new Uint8Array(Z)),T.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(Z){this._bodyInit=Z,Z?typeof Z=="string"?this._bodyText=Z:l.blob&&Blob.prototype.isPrototypeOf(Z)?this._bodyBlob=Z:l.formData&&FormData.prototype.isPrototypeOf(Z)?this._bodyFormData=Z:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(Z)?this._bodyText=Z.toString():l.arrayBuffer&&l.blob&&u(Z)?(this._bodyArrayBuffer=_(Z.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(Z)||h(Z))?this._bodyArrayBuffer=_(Z):this._bodyText=Z=Object.prototype.toString.call(Z):this._bodyText="",this.headers.get("content-type")||(typeof Z=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(Z)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var Z=m(this);if(Z)return Z;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?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var Z=m(this);if(Z)return Z;if(this._bodyBlob)return y(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)},l.formData&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(Z){var T=Z.toUpperCase();return b.indexOf(T)>-1?T:Z}function I(Z,T){T=T||{};var W=T.body;if(Z instanceof I){if(Z.bodyUsed)throw new TypeError("Already read");this.url=Z.url,this.credentials=Z.credentials,T.headers||(this.headers=new p(Z.headers)),this.method=Z.method,this.mode=Z.mode,this.signal=Z.signal,!W&&Z._bodyInit!=null&&(W=Z._bodyInit,Z.bodyUsed=!0)}else this.url=String(Z);if(this.credentials=T.credentials||this.credentials||"same-origin",(T.headers||!this.headers)&&(this.headers=new p(T.headers)),this.method=R(T.method||this.method||"GET"),this.mode=T.mode||this.mode||null,this.signal=T.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(W)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function E(Z){var T=new FormData;return Z.trim().split("&").forEach(function(W){if(W){var k=W.split("="),P=k.shift().replace(/\+/g," "),M=k.join("=").replace(/\+/g," ");T.append(decodeURIComponent(P),decodeURIComponent(M))}}),T}function C(Z){var T=new p,W=Z.replace(/\r?\n[\t ]+/g," ");return W.split(/\r?\n/).forEach(function(k){var P=k.split(":"),M=P.shift().trim();if(M){var B=P.join(":").trim();T.append(M,B)}}),T}S.call(I.prototype);function O(Z,T){T||(T={}),this.type="default",this.status=T.status===void 0?200:T.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in T?T.statusText:"OK",this.headers=new p(T.headers),this.url=T.url||"",this._initBody(Z)}S.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},O.error=function(){var Z=new O(null,{status:0,statusText:""});return Z.type="error",Z};var V=[301,302,303,307,308];O.redirect=function(Z,T){if(V.indexOf(T)===-1)throw new RangeError("Invalid status code");return new O(null,{status:T,headers:{location:Z}})},o.DOMException=s.DOMException;try{new o.DOMException}catch(Z){o.DOMException=function(T,W){this.message=T,this.name=W;var k=Error(T);this.stack=k.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function q(Z,T){return new Promise(function(W,k){var P=new I(Z,T);if(P.signal&&P.signal.aborted)return k(new o.DOMException("Aborted","AbortError"));var M=new XMLHttpRequest;function B(){M.abort()}M.onload=function(){var $={status:M.status,statusText:M.statusText,headers:C(M.getAllResponseHeaders()||"")};$.url="responseURL"in M?M.responseURL:$.headers.get("X-Request-URL");var te="response"in M?M.response:M.responseText;W(new O(te,$))},M.onerror=function(){k(new TypeError("Network request failed"))},M.ontimeout=function(){k(new TypeError("Network request failed"))},M.onabort=function(){k(new o.DOMException("Aborted","AbortError"))},M.open(P.method,P.url,!0),P.credentials==="include"?M.withCredentials=!0:P.credentials==="omit"&&(M.withCredentials=!1),"responseType"in M&&l.blob&&(M.responseType="blob"),P.headers.forEach(function($,te){M.setRequestHeader(te,$)}),P.signal&&(P.signal.addEventListener("abort",B),M.onreadystatechange=function(){M.readyState===4&&P.signal.removeEventListener("abort",B)}),M.send(typeof P._bodyInit=="undefined"?null:P._bodyInit)})}return q.polyfill=!0,s.fetch||(s.fetch=q,s.Headers=p,s.Request=I,s.Response=O),o.Headers=p,o.Request=I,o.Response=O,o.fetch=q,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(Ro,Ro.exports);var _o=Ro.exports;const yi=gi(_o),iv=Object.freeze(Object.defineProperty({__proto__:null,default:yi},Symbol.toStringTag,{value:"Module"})),Ar=e=>{let t={};return e&&(typeof Headers!="undefined"&&e instanceof Headers||iv&&_o.Headers&&e instanceof _o.Headers?t=ev(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},Dc=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),sv=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(Dc(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables!="undefined"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,s)=>(n.push({query:Dc(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},ov=e=>t=>z(this,null,function*(){var m;const{url:r,query:n,variables:i,operationName:s,fetch:o,fetchOptions:l,middleware:u}=t,a=x({},t.headers);let h="",c;e==="POST"?(c=av(n,i,s,l.jsonSerializer),typeof c=="string"&&(a["Content-Type"]="application/json")):h=sv({query:n,variables:i,operationName:s,jsonSerializer:(m=l.jsonSerializer)!=null?m:vo});const f=x({method:e,headers:a,body:c},l);let d=r,p=f;if(u){const g=yield Promise.resolve(u(Y(x({},f),{url:r,operationName:s,variables:i}))),{url:y}=g,w=rt(g,["url"]);d=y,p=w}return h&&(d=`${d}?${h}`),yield o(d,p)});class To{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=(...n)=>z(this,null,function*(){const[i,s,o]=n,l=rv(i,s,o),g=this.requestConfig,{headers:u,fetch:a=yi,method:h="POST",requestMiddleware:c,responseMiddleware:f}=g,d=rt(g,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;l.signal!==void 0&&(d.signal=l.signal);const{operationName:m}=So(l.query);return Eo({url:p,query:l.query,variables:l.variables,headers:x(x({},Ar(Io(u))),Ar(l.requestHeaders)),operationName:m,fetch:a,method:h,fetchOptions:d,middleware:c}).then(v=>(f&&f(v),v)).catch(v=>{throw f&&f(v),v})})}request(t,...r){return z(this,null,function*(){const[n,i]=r,s=tv(t,n,i),m=this.requestConfig,{headers:o,fetch:l=yi,method:u="POST",requestMiddleware:a,responseMiddleware:h}=m,c=rt(m,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:f}=this;s.signal!==void 0&&(c.signal=s.signal);const{query:d,operationName:p}=So(s.document);return Eo({url:f,query:d,variables:s.variables,headers:x(x({},Ar(Io(o))),Ar(s.requestHeaders)),operationName:p,fetch:l,method:u,fetchOptions:c,middleware:a}).then(g=>(h&&h(g),g.data)).catch(g=>{throw h&&h(g),g})})}batchRequests(t,r){var a;const n=nv(t,r),u=this.requestConfig,{headers:i}=u,s=rt(u,["headers"]);n.signal!==void 0&&(s.signal=n.signal);const o=n.documents.map(({document:h})=>So(h).query),l=n.documents.map(({variables:h})=>h);return Eo({url:this.url,query:o,variables:l,headers:x(x({},Ar(Io(i))),Ar(n.requestHeaders)),operationName:void 0,fetch:(a=this.requestConfig.fetch)!=null?a:yi,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const Eo=e=>z(this,null,function*(){var h,c;const{query:t,variables:r,fetchOptions:n}=e,i=ov(qb((h=e.method)!=null?h:"post")),s=Array.isArray(e.query),o=yield i(e),l=yield lv(o,(c=n.jsonSerializer)!=null?c:vo),u=Array.isArray(l)?!l.some(({data:d})=>!d):!!l.data,a=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(o.ok&&a&&u){const f=(Array.isArray(l),l),{errors:d}=f,p=rt(f,["errors"]),m=n.errorPolicy==="ignore"?p:l;return Y(x({},s?{data:m}:m),{headers:o.headers,status:o.status})}else{const d=typeof l=="string"?{error:l}:l;throw new Mr(Y(x({},d),{status:o.status,headers:o.headers}),{query:t,variables:r})}}),av=(e,t,r,n)=>{const i=n!=null?n:vo;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t!="undefined"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const s=e.reduce((o,l,u)=>(o.push({query:l,variables:t?t[u]:void 0}),o),[]);return i.stringify(s)},lv=(e,t)=>z(this,null,function*(){let r;return e.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(yield e.text()):e.text()}),Io=e=>typeof e=="function"?e():e;var Co={exports:{}};(function(e,t){t=e.exports=r,t.getSerialize=n;function r(i,s,o,l){return JSON.stringify(i,n(s,l),o)}function n(i,s){var o=[],l=[];return s==null&&(s=function(u,a){return o[0]===a?"[Circular ~]":"[Circular ~."+l.slice(0,o.indexOf(a)).join(".")+"]"}),function(u,a){if(o.length>0){var h=o.indexOf(this);~h?o.splice(h+1):o.push(this),~h?l.splice(h,1/0,u):l.push(u),~o.indexOf(a)&&(a=s.call(this,u,a))}else o.push(a);return i==null?a:i.call(this,u,a)}}})(Co,Co.exports);var uv=Co.exports;const Rt=gi(uv);var cv=Object.defineProperty,dv=(e,t,r)=>t in e?cv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X=(e,t,r)=>dv(e,typeof t!="symbol"?t+"":t,r),Fc,hv=Object.defineProperty,fv=(e,t,r)=>t in e?hv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jc=(e,t,r)=>fv(e,typeof t!="symbol"?t+"":t,r),Xe=(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))(Xe||{});const bi=new Map,Hc=new WeakSet;function Yc(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function pv(e){if(Hc.has(e))return;Hc.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...n){const i=bi.get(e);i&&(i.cancelled=!0);const s=()=>{n.length===2&&Yc(r)&&n.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...n)};if(Yc(r)&&!r.complete){const o={cancelled:!1};bi.set(e,o);const l=()=>{o.cancelled||(bi.delete(e),s())},u=()=>{if(!o.cancelled){bi.delete(e);try{s()}catch(a){}}};r.onload=l,r.onerror=u}else s()}}const Bc={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},zc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vi={},Kc={},mv=()=>!!globalThis.Zone;function Zo(e){if(vi[e])return vi[e];const t=globalThis[e],r=t.prototype,n=e in Bc?Bc[e]:void 0,i=!!(n&&n.every(l=>{var u,a;return!!((a=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&a.toString().includes("[native code]"))})),s=e in zc?zc[e]:void 0,o=!!(s&&s.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o&&!mv())return vi[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const a=u[e].prototype;if(!a)return l.remove(),r;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),Kc[e]=()=>l.remove()):l.remove(),vi[e]=a}catch(l){return r}}const Lo={};function Wt(e,t,r){var n;const i=`${e}.${String(r)}`;if(Lo[i])return Lo[i].call(t);const s=Zo(e),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(Lo[i]=o,o.call(t)):t[r]}const xo={};function jc(e,t,r){const n=`${e}.${String(r)}`;if(xo[n])return xo[n].bind(t);const s=Zo(e)[r];return typeof s!="function"?t[r]:(xo[n]=s,s.bind(t))}function gv(e){return Wt("Node",e,"ownerDocument")}function yv(e){return Wt("Node",e,"childNodes")}function bv(e){return Wt("Node",e,"parentNode")}function vv(e){return Wt("Node",e,"parentElement")}function Sv(e){return Wt("Node",e,"textContent")}function wv(e,t){return jc("Node",e,"contains")(t)}function Rv(e){return jc("Node",e,"getRootNode")()}function _v(e){return!e||!("host"in e)?null:Wt("ShadowRoot",e,"host")}function Tv(e){return e.styleSheets}function Ev(e){return!e||!("shadowRoot"in e)?null:Wt("Element",e,"shadowRoot")}function Iv(e,t){return Wt("Element",e,"querySelector")(t)}function Cv(e,t){return Wt("Element",e,"querySelectorAll")(t)}function Zv(){var e;return[Zo("MutationObserver").constructor,(e=Kc.MutationObserver)!=null?e:()=>{}]}let Qc=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Qc=()=>new Date().getTime());function Lv(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}const Fe={ownerDocument:gv,childNodes:yv,parentNode:bv,parentElement:vv,textContent:Sv,contains:wv,getRootNode:Rv,host:_v,styleSheets:Tv,shadowRoot:Ev,querySelector:Iv,querySelectorAll:Cv,nowTimestamp:Qc,mutationObserverCtor:Zv,patch:Lv,wrapCanvasContextDrawImage:pv};function $c(e){return e.nodeType===e.ELEMENT_NODE}function pn(e){const t=e&&"host"in e&&"mode"in e&&Fe.host(e)||null;return!!(t&&"shadowRoot"in t&&Fe.shadowRoot(t)===e)}function mn(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function xv(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 Nv(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function No(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const n=Array.from(t,i=>qc(i,r)).join("");return xv(n)}catch(t){return null}}function qc(e,t){if(ed(e)){let r;try{r=No(e.styleSheet)||Nv(e)}catch(n){r=e.cssText}return e.styleSheet.href?Ri(r,e.styleSheet.href):r}else{let r=e.cssText;return Gv(e)&&e.selectorText.includes(":")&&(r=Ov(r)),t?Ri(r,t):r}}function Ov(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ed(e){return"styleSheet"in e}function Gv(e){return"selectorText"in e}class td{constructor(){Jc(this,"idNodeMap",new Map),Jc(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-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 r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Vv(){return new td}function Si({element:e,maskInputOptions:t,tagName:r,type:n,value:i,overwriteRecord:s,maskInputFn:o}){let l=i||"";return sd({maskInputOptions:t,tagName:r,type:n,overwriteRecord:s})&&(o?l=o(l,e):l="*".repeat(l.length)),l}function fr(e){return e.toLowerCase()}const rd="__rrweb_original__";function kv(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let i=0;i<e.height;i+=r){const s=t.getImageData,o=rd in s?s[rd]:s;if(new Uint32Array(o.call(t,n,i,Math.min(r,e.width-n),Math.min(r,e.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function wi(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?fr(t):null}function nd(e,t){var s;let r;try{r=new URL(e,window.location.href)}catch(o){return null}const n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return(s=i==null?void 0:i[1])!=null?s:null}function Xv(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Wv=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pv=/^(?:[a-z+]+:)?\/\//i,Mv=/^www\..*/i,Av=/^(data:)([^,]*),(.*)/i;function Ri(e,t){return(e||"").replace(Wv,(r,n,i,s,o,l)=>{const u=i||o||l,a=n||s||"";if(!u)return r;if(Pv.test(u)||Mv.test(u))return`url(${a}${u}${a})`;if(Av.test(u))return`url(${a}${u}${a})`;if(u[0]==="/")return`url(${a}${Xv(t)+u}${a})`;const h=u.split("#")[0],c=u.substring(h.length),f=t.split("#")[0].split("/"),d=h.split("/");f.pop();for(const p of d)p!=="."&&(p===".."?f.pop():f.push(p));return`url(${a}${f.join("/")}${c}${a})`})}function _i(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Uv(e,t,r=!1){const n=Array.from(t.childNodes),i=[];let s=0;if(n.length>1&&e&&typeof e=="string"){let o=_i(e,r);const l=o.length/e.length;for(let u=1;u<n.length;u++)if(n[u].textContent&&typeof n[u].textContent=="string"){const a=_i(n[u].textContent,r),h=100;let c=3;for(;c<a.length&&(a[c].match(/[a-zA-Z0-9]/)||a.indexOf(a.substring(0,c),1)!==-1);c++);for(;c<a.length;c++){let f=a.substring(0,c),d=o.split(f),p=-1;if(d.length===2)p=d[0].length;else if(d.length>2&&d[0]===""&&n[u-1].textContent!=="")p=o.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=o.split(f),d.length<=1)return i.push(e),i;c=h+1}else c===a.length-1&&(p=o.indexOf(f));if(d.length>=2&&c>h){const m=n[u-1].textContent;if(m&&typeof m=="string"){const g=_i(m).length;p=o.indexOf(f,g)}p===-1&&(p=d[0].length)}if(p!==-1){let m=Math.floor(p/l);for(;m>0&&m<e.length;){if(s+=1,s>50*n.length)return i.push(e),i;const g=_i(e.substring(0,m),r);if(g.length===p){i.push(e.substring(0,m)),e=e.substring(m),o=o.substring(p);break}else g.length<p?m+=Math.max(1,Math.floor((p-g.length)/l)):m-=Math.max(1,Math.floor((g.length-p)*l))}break}}}}return i.push(e),i}function Dv(e,t){return Uv(e,t).join("/* rr_split */")}function Oo(e){return e=e.replace(/[^ -~]+/g,""),e=(e==null?void 0:e.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" "))||"",e}function Go(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Fv=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),Jv=new RegExp(/[0-9]{9,16}/),Hv=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),Yv=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),Bv=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),zv=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),Kv=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),jv=[Fv,Jv,Hv,Yv,Bv,zv,Kv];function id(e){return e?jv.some(t=>t.test(e)):!1}const sd=({maskInputOptions:e,tagName:t,type:r,overwriteRecord:n})=>{const i=r&&r.toLowerCase();return n!=="true"&&(!!e[t.toLowerCase()]||!!(i&&e[i]))};let Qv=1;const $v=new RegExp("[^a-z0-9-_:]"),gn=-2;function od(){return Qv++}function qv(e){if(e instanceof HTMLFormElement)return"form";const t=fr(e.tagName);return $v.test(t)?"div":t}let Ur,ad;const eS=/^[^ \t\n\r\u000c]+/,tS=/^[, \t\n\r\u000c]+/;function rS(e,t){if(t.trim()==="")return t;let r=0;function n(s){let o;const l=s.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;n(tS),!(r>=t.length);){let s=n(eS);if(s.slice(-1)===",")s=Dr(e,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Dr(e,s);let l=!1;for(;;){const u=t.charAt(r);if(u===""){i.push((s+o).trim());break}else if(l)u===")"&&(l=!1);else if(u===","){r+=1,i.push((s+o).trim());break}else u==="("&&(l=!0);o+=u,r+=1}}}return i.join(", ")}const ld=new WeakMap;function Dr(e,t){return!t||t.trim()===""?t:Vo(e,t)}function nS(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Vo(e,t){let r=ld.get(e);if(r||(r=e.createElement("a"),ld.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function ud(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Dr(e,n):r==="srcset"?rS(e,n):r==="style"?Ri(n,Vo(e)):t==="object"&&r==="data"?Dr(e,n):n)}function cd(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function dd(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch(n){}return!1}function Ti(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ti(Fe.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}return r?Ti(Fe.parentNode(e),t,r):!1}function hd(e,t,r,n){let i;if($c(e)){if(i=e,!Fe.childNodes(i).length)return!1}else{if(Fe.parentElement(e)===null)return!1;i=Fe.parentElement(e)}try{if(typeof t=="string"){if(n){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ti(i,t,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(s){}return!1}function iS(e,t,r){const n=e.contentWindow;if(!n)return;let i=!1,s;try{s=n.document.readyState}catch(l){return}if(s!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(n.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function sS(e,t,r){let n=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const s=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(s),n=!0,t()})}function oS(e,t){const{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:l,maskInputOptions:u={},maskTextClass:a,maskTextFn:h,maskInputFn:c,dataURLOptions:f={},inlineImages:d,inlineVideos:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v=!1,cssCaptured:y=!1,privacySetting:w}=t,_=aS(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Xe.Document,childNodes:[],compatMode:e.compatMode}:{type:Xe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Xe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return uS(e,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:l,maskInputOptions:u,maskInputFn:c,maskTextClass:a,dataURLOptions:f,inlineImages:d,inlineVideos:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v,privacySetting:w,rootId:_});case e.TEXT_NODE:return lS(e,{doc:r,needsMask:o,maskTextFn:h,privacySetting:w,rootId:_,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:Xe.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:Xe.Comment,textContent:Fe.textContent(e)||"",rootId:_};default:return!1}}function aS(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function lS(e,t){var r;const{needsMask:n,maskTextFn:i,privacySetting:s,rootId:o,cssCaptured:l}=t,u=Fe.parentNode(e),a=u&&u.tagName;let h="";const c=a==="STYLE"?!0:void 0,f=a==="SCRIPT"?!0:void 0;f?h="SCRIPT_PLACEHOLDER":l||(h=Fe.textContent(e),c&&h&&(h=Ri(h,Vo(t.doc)))),!c&&!f&&h&&n&&(h=i?i(h,Fe.parentElement(e)):h.replace(/[\S]/g,"*"));const d=s==="strict",p=(r=e.parentElement)==null?void 0:r.getAttribute("data-hl-record"),m=s==="default"&&id(h);return(d||m)&&!p&&a&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(a)&&h&&(h=Oo(h)),{type:Xe.Text,textContent:h||"",rootId:o}}function uS(e,t){const{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:l,maskTextClass:u,dataURLOptions:a={},inlineImages:h,inlineVideos:c,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:p=!1,privacySetting:m,rootId:g}=t;let v=dd(e,n,i);const y=dd(e,u,null),w=m==="strict";let _=qv(e),S={};const b=e.attributes.length;for(let E=0;E<b;E++){const C=e.attributes[E];cd(_,C.name)||(S[C.name]=ud(r,_,fr(C.name),C.value))}if(_==="link"&&s){const E=Array.from(r.styleSheets).find(O=>O.href===e.href);let C=null;E&&(C=No(E)),C&&(delete S.rel,delete S.href,S._cssText=C)}if(_==="style"&&e.sheet){let E=No(e.sheet);E&&(e.childNodes.length>1&&(E=Dv(E,e)),S._cssText=E)}if(["input","textarea","select"].includes(_)){const E=e.value,C=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&E?S.value=Si({element:e,type:wi(e),tagName:_,value:E,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:o,maskInputFn:l}):C&&(S.checked=C)}if(_==="option"&&(e.selected&&!o.select?S.selected=!0:delete S.selected),_==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),_==="canvas"&&f){if(e.__context==="2d")kv(e);else if(!("__context"in e)){const E=e.toDataURL(a.type,a.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const O=C.toDataURL(a.type,a.quality);E!==O&&(S.rr_dataURL=E)}}if(_==="img"&&h&&!v&&!y&&!w){Ur||(Ur=r.createElement("canvas"),ad=Ur.getContext("2d"));const E=e,C=E.currentSrc||E.getAttribute("src")||"<unknown-src>",O=E.crossOrigin,V=()=>{E.removeEventListener("load",V);try{Ur.width=E.naturalWidth,Ur.height=E.naturalHeight,ad.drawImage(E,0,0),S.rr_dataURL=Ur.toDataURL(a.type,a.quality)}catch(q){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?V():E.addEventListener("load",V);return}else console.warn(`Cannot inline img src=${C}! Error: ${q}`)}E.crossOrigin==="anonymous"&&(O?S.crossOrigin=O:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?V():E.addEventListener("load",V)}if(["audio","video"].includes(_)){const E=S;E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime,E.rr_mediaPlaybackRate=e.playbackRate,E.rr_mediaMuted=e.muted,E.rr_mediaLoop=e.loop,E.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),v||y||w&&Go(_)){const{width:E,height:C}=e.getBoundingClientRect();S={class:S.class,rr_width:`${E}px`,rr_height:`${C}px`}}w&&Go(_)&&(v=!0),_==="iframe"&&!d(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let R;try{customElements.get(_)&&(R=!0)}catch(E){}const I=E=>{const{width:C,height:O}=E.getBoundingClientRect();S={width:C,height:O,rr_width:`${C}px`,rr_height:`${O}px`,rr_inlined_video:!0,class:S.class,style:S.style},_="canvas";const V=r.createElement("canvas");V.width=e.width,V.height=e.height,S.rr_dataURL=V.toDataURL(a.type,a.quality)};if(_==="video"){const E=e;h&&(E.src===""||E.src.indexOf("blob:")!==-1)&&I(E),c&&E.src!==""&&E.src.indexOf("blob:")===-1&&I(E)}return{type:Xe.Element,tagName:_,attributes:S,childNodes:[],isSVG:nS(e)||void 0,needBlock:v,needMask:y,rootId:g,isCustom:R}}function Re(e){return e==null?"":e.toLowerCase()}function fd(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function cS(e,t){if(t.comment&&e.type===Xe.Comment)return!0;if(e.type===Xe.Element){if(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"&&nd(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Re(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Re(e.attributes.name)==="application-name"||Re(e.attributes.rel)==="icon"||Re(e.attributes.rel)==="apple-touch-icon"||Re(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Re(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Re(e.attributes.property).match(/^(og|twitter|fb):/)||Re(e.attributes.name).match(/^(og|twitter):/)||Re(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Re(e.attributes.name)==="robots"||Re(e.attributes.name)==="googlebot"||Re(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Re(e.attributes.name)==="author"||Re(e.attributes.name)==="generator"||Re(e.attributes.name)==="framework"||Re(e.attributes.name)==="publisher"||Re(e.attributes.name)==="progid"||Re(e.attributes.property).match(/^article:/)||Re(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Re(e.attributes.name)==="google-site-verification"||Re(e.attributes.name)==="yandex-verification"||Re(e.attributes.name)==="csrf-token"||Re(e.attributes.name)==="p:domain_verify"||Re(e.attributes.name)==="verify-v1"||Re(e.attributes.name)==="verification"||Re(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Fr(e,t){const{doc:r,mirror:n,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:l,skipChild:u=!1,inlineStylesheet:a=!0,maskInputOptions:h={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,inlineVideos:g=!1,recordCanvas:v=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:I=!1,cssCaptured:E=!1,privacySetting:C}=t;let{needsMask:O}=t,{preserveWhiteSpace:V=!0}=t;O||(O=hd(e,o,l,O===void 0));const q=oS(e,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:O,inlineStylesheet:a,maskInputOptions:h,maskTextClass:o,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,keepIframeSrcFn:R,newlyAddedElement:I,cssCaptured:E,privacySetting:C});if(!q)return console.warn(e,"not serialized"),null;let Z;n.hasNode(e)?Z=n.getId(e):cS(q,d)||!V&&q.type===Xe.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?Z=gn:Z=od();const T=Object.assign(q,{id:Z});if(n.add(e,T),Z===gn)return null;y&&y(e);let W=!u,k=C,P=C==="strict";if(T.type===Xe.Element){if(W=W&&!T.needBlock,P||(P=!!T.needBlock||!!T.needMask),k=P?"strict":k,P&&Go(T.tagName)){const $=e.cloneNode();$.src="",n.add($,T)}delete T.needBlock,delete T.needMask;const B=Fe.shadowRoot(e);B&&mn(B)&&(T.isShadowHost=!0)}if((T.type===Xe.Document||T.type===Xe.Element)&&W){d.headWhitespace&&T.type===Xe.Element&&T.tagName==="head"&&(V=!1);const B={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:l,skipChild:u,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,cssCaptured:!1,privacySetting:k};if(!(T.type===Xe.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===Xe.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(B.cssCaptured=!0);for(const te of Array.from(Fe.childNodes(e))){const N=Fr(te,B);N&&T.childNodes.push(N)}}let $=null;if($c(e)&&($=Fe.shadowRoot(e)))for(const te of Array.from(Fe.childNodes($))){const N=Fr(te,B);N&&(mn($)&&(N.isShadow=!0),T.childNodes.push(N))}}const M=Fe.parentNode(e);return M&&pn(M)&&mn(M)&&(T.isShadow=!0),T.type===Xe.Element&&T.tagName==="iframe"&&iS(e,()=>{const B=e.contentDocument;if(B&&w){const $=Fr(B,{doc:B,mirror:n,blockClass:i,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,privacySetting:C});$&&w(e,$)}},_),T.type===Xe.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&nd(T.attributes.href)==="css")&&sS(e,()=>{if(S){const B=Fr(e,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,privacySetting:C});B&&S(e,B)}},b),T}function dS(e,t){const{mirror:r=new td,blockClass:n="highlight-block",blockSelector:i=null,maskTextClass:s="highlight-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:u=!1,inlineVideos:a=!1,recordCanvas:h=!1,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:g,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:_,stylesheetLoadTimeout:S,keepIframeSrcFn:b=()=>!1,privacySetting:R="default"}=t||{},I=c===!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}:c===!1?{password:!0}:c,E=fd(p);return Fr(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:d,slimDOMOptions:E,dataURLOptions:m,inlineImages:u,inlineVideos:a,recordCanvas:h,preserveWhiteSpace:g,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:_,stylesheetLoadTimeout:S,keepIframeSrcFn:b,newlyAddedElement:!1,privacySetting:R})}function hS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Ei={exports:{}},pd;function fS(){if(pd)return Ei.exports;pd=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ei.exports=t(),Ei.exports.createColors=t,Ei.exports}const _t=hS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ko,md;function Xo(){if(md)return ko;md=1;let e=fS(),t=_t;class r extends Error{constructor(i,s,o,l,u,a){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),a&&(this.plugin=a),typeof s!="undefined"&&typeof o!="undefined"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=e.isColorSupported);let o=d=>d,l=d=>d,u=d=>d;if(i){let{bold:d,gray:p,red:m}=e.createColors(!0);l=g=>d(m(g)),o=g=>p(g),t&&(u=g=>t(g))}let a=s.split(/\r?\n/),h=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),f=String(c).length;return a.slice(h,c).map((d,p)=>{let m=h+1+p,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(d.length>160){let y=20,w=Math.max(0,this.column-y),_=Math.max(this.column+y,this.endColumn+y),S=d.slice(w,_),b=o(g.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+u(S)+`
|
|
47
|
+
}`)}function de(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function gi(e){return de(" ",e.replace(/\n/g,`
|
|
48
|
+
`))}function Uc(e){var t;return(t=e==null?void 0:e.some(r=>r.includes(`
|
|
49
|
+
`)))!==null&&t!==void 0?t:!1}const wo=JSON,nv=e=>e.toUpperCase(),iv=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},sv=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},ov=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},av=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Dc=e=>{var n,i;let t;const r=e.definitions.filter(s=>s.kind==="OperationDefinition");return r.length===1&&(t=(i=(n=r[0])==null?void 0:n.name)==null?void 0:i.value),t},_o=e=>{if(typeof e=="string"){let r;try{const n=Mc(e);r=Dc(n)}catch(n){}return{query:e,operationName:r}}const t=Dc(e);return{query:So(e),operationName:t}};class Mr extends Error{constructor(t,r){const n=`${Mr.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Mr.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Mr)}static extractMessage(t){var r,n,i;return(i=(n=(r=t.errors)==null?void 0:r[0])==null?void 0:n.message)!=null?i:`GraphQL Error (Code: ${t.status})`}}var Ro=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function yi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var To={exports:{}};(function(e,t){var r=typeof self!="undefined"?self:Ro,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch(Z){return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(Z){return Z&&DataView.prototype.isPrototypeOf(Z)}if(l.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(Z){return Z&&a.indexOf(Object.prototype.toString.call(Z))>-1};function c(Z){if(typeof Z!="string"&&(Z=String(Z)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(Z))throw new TypeError("Invalid character in header field name");return Z.toLowerCase()}function f(Z){return typeof Z!="string"&&(Z=String(Z)),Z}function d(Z){var T={next:function(){var W=Z.shift();return{done:W===void 0,value:W}}};return l.iterable&&(T[Symbol.iterator]=function(){return T}),T}function p(Z){this.map={},Z instanceof p?Z.forEach(function(T,W){this.append(W,T)},this):Array.isArray(Z)?Z.forEach(function(T){this.append(T[0],T[1])},this):Z&&Object.getOwnPropertyNames(Z).forEach(function(T){this.append(T,Z[T])},this)}p.prototype.append=function(Z,T){Z=c(Z),T=f(T);var W=this.map[Z];this.map[Z]=W?W+", "+T:T},p.prototype.delete=function(Z){delete this.map[c(Z)]},p.prototype.get=function(Z){return Z=c(Z),this.has(Z)?this.map[Z]:null},p.prototype.has=function(Z){return this.map.hasOwnProperty(c(Z))},p.prototype.set=function(Z,T){this.map[c(Z)]=f(T)},p.prototype.forEach=function(Z,T){for(var W in this.map)this.map.hasOwnProperty(W)&&Z.call(T,this.map[W],W,this)},p.prototype.keys=function(){var Z=[];return this.forEach(function(T,W){Z.push(W)}),d(Z)},p.prototype.values=function(){var Z=[];return this.forEach(function(T){Z.push(T)}),d(Z)},p.prototype.entries=function(){var Z=[];return this.forEach(function(T,W){Z.push([W,T])}),d(Z)},l.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(Z){if(Z.bodyUsed)return Promise.reject(new TypeError("Already read"));Z.bodyUsed=!0}function g(Z){return new Promise(function(T,W){Z.onload=function(){T(Z.result)},Z.onerror=function(){W(Z.error)}})}function v(Z){var T=new FileReader,W=g(T);return T.readAsArrayBuffer(Z),W}function y(Z){var T=new FileReader,W=g(T);return T.readAsText(Z),W}function w(Z){for(var T=new Uint8Array(Z),W=new Array(T.length),k=0;k<T.length;k++)W[k]=String.fromCharCode(T[k]);return W.join("")}function R(Z){if(Z.slice)return Z.slice(0);var T=new Uint8Array(Z.byteLength);return T.set(new Uint8Array(Z)),T.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(Z){this._bodyInit=Z,Z?typeof Z=="string"?this._bodyText=Z:l.blob&&Blob.prototype.isPrototypeOf(Z)?this._bodyBlob=Z:l.formData&&FormData.prototype.isPrototypeOf(Z)?this._bodyFormData=Z:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(Z)?this._bodyText=Z.toString():l.arrayBuffer&&l.blob&&u(Z)?(this._bodyArrayBuffer=R(Z.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(Z)||h(Z))?this._bodyArrayBuffer=R(Z):this._bodyText=Z=Object.prototype.toString.call(Z):this._bodyText="",this.headers.get("content-type")||(typeof Z=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(Z)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var Z=m(this);if(Z)return Z;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?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var Z=m(this);if(Z)return Z;if(this._bodyBlob)return y(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)},l.formData&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(Z){var T=Z.toUpperCase();return b.indexOf(T)>-1?T:Z}function I(Z,T){T=T||{};var W=T.body;if(Z instanceof I){if(Z.bodyUsed)throw new TypeError("Already read");this.url=Z.url,this.credentials=Z.credentials,T.headers||(this.headers=new p(Z.headers)),this.method=Z.method,this.mode=Z.mode,this.signal=Z.signal,!W&&Z._bodyInit!=null&&(W=Z._bodyInit,Z.bodyUsed=!0)}else this.url=String(Z);if(this.credentials=T.credentials||this.credentials||"same-origin",(T.headers||!this.headers)&&(this.headers=new p(T.headers)),this.method=_(T.method||this.method||"GET"),this.mode=T.mode||this.mode||null,this.signal=T.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(W)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function E(Z){var T=new FormData;return Z.trim().split("&").forEach(function(W){if(W){var k=W.split("="),P=k.shift().replace(/\+/g," "),M=k.join("=").replace(/\+/g," ");T.append(decodeURIComponent(P),decodeURIComponent(M))}}),T}function C(Z){var T=new p,W=Z.replace(/\r?\n[\t ]+/g," ");return W.split(/\r?\n/).forEach(function(k){var P=k.split(":"),M=P.shift().trim();if(M){var B=P.join(":").trim();T.append(M,B)}}),T}S.call(I.prototype);function O(Z,T){T||(T={}),this.type="default",this.status=T.status===void 0?200:T.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in T?T.statusText:"OK",this.headers=new p(T.headers),this.url=T.url||"",this._initBody(Z)}S.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},O.error=function(){var Z=new O(null,{status:0,statusText:""});return Z.type="error",Z};var V=[301,302,303,307,308];O.redirect=function(Z,T){if(V.indexOf(T)===-1)throw new RangeError("Invalid status code");return new O(null,{status:T,headers:{location:Z}})},o.DOMException=s.DOMException;try{new o.DOMException}catch(Z){o.DOMException=function(T,W){this.message=T,this.name=W;var k=Error(T);this.stack=k.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function q(Z,T){return new Promise(function(W,k){var P=new I(Z,T);if(P.signal&&P.signal.aborted)return k(new o.DOMException("Aborted","AbortError"));var M=new XMLHttpRequest;function B(){M.abort()}M.onload=function(){var $={status:M.status,statusText:M.statusText,headers:C(M.getAllResponseHeaders()||"")};$.url="responseURL"in M?M.responseURL:$.headers.get("X-Request-URL");var te="response"in M?M.response:M.responseText;W(new O(te,$))},M.onerror=function(){k(new TypeError("Network request failed"))},M.ontimeout=function(){k(new TypeError("Network request failed"))},M.onabort=function(){k(new o.DOMException("Aborted","AbortError"))},M.open(P.method,P.url,!0),P.credentials==="include"?M.withCredentials=!0:P.credentials==="omit"&&(M.withCredentials=!1),"responseType"in M&&l.blob&&(M.responseType="blob"),P.headers.forEach(function($,te){M.setRequestHeader(te,$)}),P.signal&&(P.signal.addEventListener("abort",B),M.onreadystatechange=function(){M.readyState===4&&P.signal.removeEventListener("abort",B)}),M.send(typeof P._bodyInit=="undefined"?null:P._bodyInit)})}return q.polyfill=!0,s.fetch||(s.fetch=q,s.Headers=p,s.Request=I,s.Response=O),o.Headers=p,o.Request=I,o.Response=O,o.fetch=q,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(To,To.exports);var Eo=To.exports;const bi=yi(Eo),lv=Object.freeze(Object.defineProperty({__proto__:null,default:bi},Symbol.toStringTag,{value:"Module"})),Ar=e=>{let t={};return e&&(typeof Headers!="undefined"&&e instanceof Headers||lv&&Eo.Headers&&e instanceof Eo.Headers?t=iv(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},Fc=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),uv=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(Fc(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables!="undefined"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,s)=>(n.push({query:Fc(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},cv=e=>t=>z(this,null,function*(){var m;const{url:r,query:n,variables:i,operationName:s,fetch:o,fetchOptions:l,middleware:u}=t,a=x({},t.headers);let h="",c;e==="POST"?(c=dv(n,i,s,l.jsonSerializer),typeof c=="string"&&(a["Content-Type"]="application/json")):h=uv({query:n,variables:i,operationName:s,jsonSerializer:(m=l.jsonSerializer)!=null?m:wo});const f=x({method:e,headers:a,body:c},l);let d=r,p=f;if(u){const g=yield Promise.resolve(u(Y(x({},f),{url:r,operationName:s,variables:i}))),{url:y}=g,w=rt(g,["url"]);d=y,p=w}return h&&(d=`${d}?${h}`),yield o(d,p)});class Io{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=(...n)=>z(this,null,function*(){const[i,s,o]=n,l=ov(i,s,o),g=this.requestConfig,{headers:u,fetch:a=bi,method:h="POST",requestMiddleware:c,responseMiddleware:f}=g,d=rt(g,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;l.signal!==void 0&&(d.signal=l.signal);const{operationName:m}=_o(l.query);return Co({url:p,query:l.query,variables:l.variables,headers:x(x({},Ar(Zo(u))),Ar(l.requestHeaders)),operationName:m,fetch:a,method:h,fetchOptions:d,middleware:c}).then(v=>(f&&f(v),v)).catch(v=>{throw f&&f(v),v})})}request(t,...r){return z(this,null,function*(){const[n,i]=r,s=sv(t,n,i),m=this.requestConfig,{headers:o,fetch:l=bi,method:u="POST",requestMiddleware:a,responseMiddleware:h}=m,c=rt(m,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:f}=this;s.signal!==void 0&&(c.signal=s.signal);const{query:d,operationName:p}=_o(s.document);return Co({url:f,query:d,variables:s.variables,headers:x(x({},Ar(Zo(o))),Ar(s.requestHeaders)),operationName:p,fetch:l,method:u,fetchOptions:c,middleware:a}).then(g=>(h&&h(g),g.data)).catch(g=>{throw h&&h(g),g})})}batchRequests(t,r){var a;const n=av(t,r),u=this.requestConfig,{headers:i}=u,s=rt(u,["headers"]);n.signal!==void 0&&(s.signal=n.signal);const o=n.documents.map(({document:h})=>_o(h).query),l=n.documents.map(({variables:h})=>h);return Co({url:this.url,query:o,variables:l,headers:x(x({},Ar(Zo(i))),Ar(n.requestHeaders)),operationName:void 0,fetch:(a=this.requestConfig.fetch)!=null?a:bi,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const Co=e=>z(this,null,function*(){var h,c;const{query:t,variables:r,fetchOptions:n}=e,i=cv(nv((h=e.method)!=null?h:"post")),s=Array.isArray(e.query),o=yield i(e),l=yield hv(o,(c=n.jsonSerializer)!=null?c:wo),u=Array.isArray(l)?!l.some(({data:d})=>!d):!!l.data,a=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(o.ok&&a&&u){const f=(Array.isArray(l),l),{errors:d}=f,p=rt(f,["errors"]),m=n.errorPolicy==="ignore"?p:l;return Y(x({},s?{data:m}:m),{headers:o.headers,status:o.status})}else{const d=typeof l=="string"?{error:l}:l;throw new Mr(Y(x({},d),{status:o.status,headers:o.headers}),{query:t,variables:r})}}),dv=(e,t,r,n)=>{const i=n!=null?n:wo;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t!="undefined"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const s=e.reduce((o,l,u)=>(o.push({query:l,variables:t?t[u]:void 0}),o),[]);return i.stringify(s)},hv=(e,t)=>z(this,null,function*(){let r;return e.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(yield e.text()):e.text()}),Zo=e=>typeof e=="function"?e():e;var Lo={exports:{}};(function(e,t){t=e.exports=r,t.getSerialize=n;function r(i,s,o,l){return JSON.stringify(i,n(s,l),o)}function n(i,s){var o=[],l=[];return s==null&&(s=function(u,a){return o[0]===a?"[Circular ~]":"[Circular ~."+l.slice(0,o.indexOf(a)).join(".")+"]"}),function(u,a){if(o.length>0){var h=o.indexOf(this);~h?o.splice(h+1):o.push(this),~h?l.splice(h,1/0,u):l.push(u),~o.indexOf(a)&&(a=s.call(this,u,a))}else o.push(a);return i==null?a:i.call(this,u,a)}}})(Lo,Lo.exports);var fv=Lo.exports;const _t=yi(fv);var pv=Object.defineProperty,mv=(e,t,r)=>t in e?pv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X=(e,t,r)=>mv(e,typeof t!="symbol"?t+"":t,r),Jc,gv=Object.defineProperty,yv=(e,t,r)=>t in e?gv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hc=(e,t,r)=>yv(e,typeof t!="symbol"?t+"":t,r),Xe=(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))(Xe||{});const vi=new Map,Yc=new WeakSet;function Bc(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function bv(e){if(Yc.has(e))return;Yc.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...n){const i=vi.get(e);i&&(i.cancelled=!0);const s=()=>{n.length===2&&Bc(r)&&n.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...n)};if(Bc(r)&&!r.complete){const o={cancelled:!1};vi.set(e,o);const l=()=>{o.cancelled||(vi.delete(e),s())},u=()=>{if(!o.cancelled){vi.delete(e);try{s()}catch(a){}}};r.onload=l,r.onerror=u}else s()}}const zc={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Kc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Si={},jc={},vv=()=>!!globalThis.Zone;function xo(e){if(Si[e])return Si[e];const t=globalThis[e],r=t.prototype,n=e in zc?zc[e]:void 0,i=!!(n&&n.every(l=>{var u,a;return!!((a=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&a.toString().includes("[native code]"))})),s=e in Kc?Kc[e]:void 0,o=!!(s&&s.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o&&!vv())return Si[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const a=u[e].prototype;if(!a)return l.remove(),r;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),jc[e]=()=>l.remove()):l.remove(),Si[e]=a}catch(l){return r}}const No={};function Wt(e,t,r){var n;const i=`${e}.${String(r)}`;if(No[i])return No[i].call(t);const s=xo(e),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(No[i]=o,o.call(t)):t[r]}const Oo={};function Qc(e,t,r){const n=`${e}.${String(r)}`;if(Oo[n])return Oo[n].bind(t);const s=xo(e)[r];return typeof s!="function"?t[r]:(Oo[n]=s,s.bind(t))}function Sv(e){return Wt("Node",e,"ownerDocument")}function wv(e){return Wt("Node",e,"childNodes")}function _v(e){return Wt("Node",e,"parentNode")}function Rv(e){return Wt("Node",e,"parentElement")}function Tv(e){return Wt("Node",e,"textContent")}function Ev(e,t){return Qc("Node",e,"contains")(t)}function Iv(e){return Qc("Node",e,"getRootNode")()}function Cv(e){return!e||!("host"in e)?null:Wt("ShadowRoot",e,"host")}function Zv(e){return e.styleSheets}function Lv(e){return!e||!("shadowRoot"in e)?null:Wt("Element",e,"shadowRoot")}function xv(e,t){return Wt("Element",e,"querySelector")(t)}function Nv(e,t){return Wt("Element",e,"querySelectorAll")(t)}function Ov(){var e;return[xo("MutationObserver").constructor,(e=jc.MutationObserver)!=null?e:()=>{}]}let $c=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||($c=()=>new Date().getTime());function Gv(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}const Fe={ownerDocument:Sv,childNodes:wv,parentNode:_v,parentElement:Rv,textContent:Tv,contains:Ev,getRootNode:Iv,host:Cv,styleSheets:Zv,shadowRoot:Lv,querySelector:xv,querySelectorAll:Nv,nowTimestamp:$c,mutationObserverCtor:Ov,patch:Gv,wrapCanvasContextDrawImage:bv};function qc(e){return e.nodeType===e.ELEMENT_NODE}function pn(e){const t=e&&"host"in e&&"mode"in e&&Fe.host(e)||null;return!!(t&&"shadowRoot"in t&&Fe.shadowRoot(t)===e)}function mn(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Vv(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 kv(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Go(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const n=Array.from(t,i=>ed(i,r)).join("");return Vv(n)}catch(t){return null}}function ed(e,t){if(td(e)){let r;try{r=Go(e.styleSheet)||kv(e)}catch(n){r=e.cssText}return e.styleSheet.href?Ri(r,e.styleSheet.href):r}else{let r=e.cssText;return Wv(e)&&e.selectorText.includes(":")&&(r=Xv(r)),t?Ri(r,t):r}}function Xv(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function td(e){return"styleSheet"in e}function Wv(e){return"selectorText"in e}class rd{constructor(){Hc(this,"idNodeMap",new Map),Hc(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-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 r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Pv(){return new rd}function wi({element:e,maskInputOptions:t,tagName:r,type:n,value:i,overwriteRecord:s,maskInputFn:o}){let l=i||"";return od({maskInputOptions:t,tagName:r,type:n,overwriteRecord:s})&&(o?l=o(l,e):l="*".repeat(l.length)),l}function fr(e){return e.toLowerCase()}const nd="__rrweb_original__";function Mv(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let i=0;i<e.height;i+=r){const s=t.getImageData,o=nd in s?s[nd]:s;if(new Uint32Array(o.call(t,n,i,Math.min(r,e.width-n),Math.min(r,e.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function _i(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?fr(t):null}function id(e,t){var s;let r;try{r=new URL(e,window.location.href)}catch(o){return null}const n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return(s=i==null?void 0:i[1])!=null?s:null}function Av(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Uv=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Dv=/^(?:[a-z+]+:)?\/\//i,Fv=/^www\..*/i,Jv=/^(data:)([^,]*),(.*)/i;function Ri(e,t){return(e||"").replace(Uv,(r,n,i,s,o,l)=>{const u=i||o||l,a=n||s||"";if(!u)return r;if(Dv.test(u)||Fv.test(u))return`url(${a}${u}${a})`;if(Jv.test(u))return`url(${a}${u}${a})`;if(u[0]==="/")return`url(${a}${Av(t)+u}${a})`;const h=u.split("#")[0],c=u.substring(h.length),f=t.split("#")[0].split("/"),d=h.split("/");f.pop();for(const p of d)p!=="."&&(p===".."?f.pop():f.push(p));return`url(${a}${f.join("/")}${c}${a})`})}function Ti(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Hv(e,t,r=!1){const n=Array.from(t.childNodes),i=[];let s=0;if(n.length>1&&e&&typeof e=="string"){let o=Ti(e,r);const l=o.length/e.length;for(let u=1;u<n.length;u++)if(n[u].textContent&&typeof n[u].textContent=="string"){const a=Ti(n[u].textContent,r),h=100;let c=3;for(;c<a.length&&(a[c].match(/[a-zA-Z0-9]/)||a.indexOf(a.substring(0,c),1)!==-1);c++);for(;c<a.length;c++){let f=a.substring(0,c),d=o.split(f),p=-1;if(d.length===2)p=d[0].length;else if(d.length>2&&d[0]===""&&n[u-1].textContent!=="")p=o.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=o.split(f),d.length<=1)return i.push(e),i;c=h+1}else c===a.length-1&&(p=o.indexOf(f));if(d.length>=2&&c>h){const m=n[u-1].textContent;if(m&&typeof m=="string"){const g=Ti(m).length;p=o.indexOf(f,g)}p===-1&&(p=d[0].length)}if(p!==-1){let m=Math.floor(p/l);for(;m>0&&m<e.length;){if(s+=1,s>50*n.length)return i.push(e),i;const g=Ti(e.substring(0,m),r);if(g.length===p){i.push(e.substring(0,m)),e=e.substring(m),o=o.substring(p);break}else g.length<p?m+=Math.max(1,Math.floor((p-g.length)/l)):m-=Math.max(1,Math.floor((g.length-p)*l))}break}}}}return i.push(e),i}function Yv(e,t){return Hv(e,t).join("/* rr_split */")}function Vo(e){return e=e.replace(/[^ -~]+/g,""),e=(e==null?void 0:e.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" "))||"",e}function ko(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Bv=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),zv=new RegExp(/[0-9]{9,16}/),Kv=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),jv=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),Qv=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),$v=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),qv=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),eS=[Bv,zv,Kv,jv,Qv,$v,qv];function sd(e){return e?eS.some(t=>t.test(e)):!1}const od=({maskInputOptions:e,tagName:t,type:r,overwriteRecord:n})=>{const i=r&&r.toLowerCase();return n!=="true"&&(!!e[t.toLowerCase()]||!!(i&&e[i]))};let tS=1;const rS=new RegExp("[^a-z0-9-_:]"),gn=-2;function ad(){return tS++}function nS(e){if(e instanceof HTMLFormElement)return"form";const t=fr(e.tagName);return rS.test(t)?"div":t}let Ur,ld;const iS=/^[^ \t\n\r\u000c]+/,sS=/^[, \t\n\r\u000c]+/;function oS(e,t){if(t.trim()==="")return t;let r=0;function n(s){let o;const l=s.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;n(sS),!(r>=t.length);){let s=n(iS);if(s.slice(-1)===",")s=Dr(e,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Dr(e,s);let l=!1;for(;;){const u=t.charAt(r);if(u===""){i.push((s+o).trim());break}else if(l)u===")"&&(l=!1);else if(u===","){r+=1,i.push((s+o).trim());break}else u==="("&&(l=!0);o+=u,r+=1}}}return i.join(", ")}const ud=new WeakMap;function Dr(e,t){return!t||t.trim()===""?t:Xo(e,t)}function aS(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Xo(e,t){let r=ud.get(e);if(r||(r=e.createElement("a"),ud.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function cd(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Dr(e,n):r==="srcset"?oS(e,n):r==="style"?Ri(n,Xo(e)):t==="object"&&r==="data"?Dr(e,n):n)}function dd(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function hd(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch(n){}return!1}function Ei(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ei(Fe.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}return r?Ei(Fe.parentNode(e),t,r):!1}function fd(e,t,r,n){let i;if(qc(e)){if(i=e,!Fe.childNodes(i).length)return!1}else{if(Fe.parentElement(e)===null)return!1;i=Fe.parentElement(e)}try{if(typeof t=="string"){if(n){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ei(i,t,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(s){}return!1}function lS(e,t,r){const n=e.contentWindow;if(!n)return;let i=!1,s;try{s=n.document.readyState}catch(l){return}if(s!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(n.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function uS(e,t,r){let n=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const s=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(s),n=!0,t()})}function cS(e,t){const{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:l,maskInputOptions:u={},maskTextClass:a,maskTextFn:h,maskInputFn:c,dataURLOptions:f={},inlineImages:d,inlineVideos:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v=!1,cssCaptured:y=!1,privacySetting:w}=t,R=dS(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Xe.Document,childNodes:[],compatMode:e.compatMode}:{type:Xe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Xe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return fS(e,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:l,maskInputOptions:u,maskInputFn:c,maskTextClass:a,dataURLOptions:f,inlineImages:d,inlineVideos:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v,privacySetting:w,rootId:R});case e.TEXT_NODE:return hS(e,{doc:r,needsMask:o,maskTextFn:h,privacySetting:w,rootId:R,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:Xe.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:Xe.Comment,textContent:Fe.textContent(e)||"",rootId:R};default:return!1}}function dS(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function hS(e,t){var r;const{needsMask:n,maskTextFn:i,privacySetting:s,rootId:o,cssCaptured:l}=t,u=Fe.parentNode(e),a=u&&u.tagName;let h="";const c=a==="STYLE"?!0:void 0,f=a==="SCRIPT"?!0:void 0;f?h="SCRIPT_PLACEHOLDER":l||(h=Fe.textContent(e),c&&h&&(h=Ri(h,Xo(t.doc)))),!c&&!f&&h&&n&&(h=i?i(h,Fe.parentElement(e)):h.replace(/[\S]/g,"*"));const d=s==="strict",p=(r=e.parentElement)==null?void 0:r.getAttribute("data-hl-record"),m=s==="default"&&sd(h);return(d||m)&&!p&&a&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(a)&&h&&(h=Vo(h)),{type:Xe.Text,textContent:h||"",rootId:o}}function fS(e,t){const{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:l,maskTextClass:u,dataURLOptions:a={},inlineImages:h,inlineVideos:c,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:p=!1,privacySetting:m,rootId:g}=t;let v=hd(e,n,i);const y=hd(e,u,null),w=m==="strict";let R=nS(e),S={};const b=e.attributes.length;for(let E=0;E<b;E++){const C=e.attributes[E];dd(R,C.name)||(S[C.name]=cd(r,R,fr(C.name),C.value))}if(R==="link"&&s){const E=Array.from(r.styleSheets).find(O=>O.href===e.href);let C=null;E&&(C=Go(E)),C&&(delete S.rel,delete S.href,S._cssText=C)}if(R==="style"&&e.sheet){let E=Go(e.sheet);E&&(e.childNodes.length>1&&(E=Yv(E,e)),S._cssText=E)}if(["input","textarea","select"].includes(R)){const E=e.value,C=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&E?S.value=wi({element:e,type:_i(e),tagName:R,value:E,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:o,maskInputFn:l}):C&&(S.checked=C)}if(R==="option"&&(e.selected&&!o.select?S.selected=!0:delete S.selected),R==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),R==="canvas"&&f){if(e.__context==="2d")Mv(e);else if(!("__context"in e)){const E=e.toDataURL(a.type,a.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const O=C.toDataURL(a.type,a.quality);E!==O&&(S.rr_dataURL=E)}}if(R==="img"&&h&&!v&&!y&&!w){Ur||(Ur=r.createElement("canvas"),ld=Ur.getContext("2d"));const E=e,C=E.currentSrc||E.getAttribute("src")||"<unknown-src>",O=E.crossOrigin,V=()=>{E.removeEventListener("load",V);try{Ur.width=E.naturalWidth,Ur.height=E.naturalHeight,ld.drawImage(E,0,0),S.rr_dataURL=Ur.toDataURL(a.type,a.quality)}catch(q){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?V():E.addEventListener("load",V);return}else console.warn(`Cannot inline img src=${C}! Error: ${q}`)}E.crossOrigin==="anonymous"&&(O?S.crossOrigin=O:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?V():E.addEventListener("load",V)}if(["audio","video"].includes(R)){const E=S;E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime,E.rr_mediaPlaybackRate=e.playbackRate,E.rr_mediaMuted=e.muted,E.rr_mediaLoop=e.loop,E.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),v||y||w&&ko(R)){const{width:E,height:C}=e.getBoundingClientRect();S={class:S.class,rr_width:`${E}px`,rr_height:`${C}px`}}w&&ko(R)&&(v=!0),R==="iframe"&&!d(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let _;try{customElements.get(R)&&(_=!0)}catch(E){}const I=E=>{const{width:C,height:O}=E.getBoundingClientRect();S={width:C,height:O,rr_width:`${C}px`,rr_height:`${O}px`,rr_inlined_video:!0,class:S.class,style:S.style},R="canvas";const V=r.createElement("canvas");V.width=e.width,V.height=e.height,S.rr_dataURL=V.toDataURL(a.type,a.quality)};if(R==="video"){const E=e;h&&(E.src===""||E.src.indexOf("blob:")!==-1)&&I(E),c&&E.src!==""&&E.src.indexOf("blob:")===-1&&I(E)}return{type:Xe.Element,tagName:R,attributes:S,childNodes:[],isSVG:aS(e)||void 0,needBlock:v,needMask:y,rootId:g,isCustom:_}}function _e(e){return e==null?"":e.toLowerCase()}function pd(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function pS(e,t){if(t.comment&&e.type===Xe.Comment)return!0;if(e.type===Xe.Element){if(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"&&id(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(_e(e.attributes.name).match(/^msapplication-tile(image|color)$/)||_e(e.attributes.name)==="application-name"||_e(e.attributes.rel)==="icon"||_e(e.attributes.rel)==="apple-touch-icon"||_e(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&_e(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(_e(e.attributes.property).match(/^(og|twitter|fb):/)||_e(e.attributes.name).match(/^(og|twitter):/)||_e(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(_e(e.attributes.name)==="robots"||_e(e.attributes.name)==="googlebot"||_e(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(_e(e.attributes.name)==="author"||_e(e.attributes.name)==="generator"||_e(e.attributes.name)==="framework"||_e(e.attributes.name)==="publisher"||_e(e.attributes.name)==="progid"||_e(e.attributes.property).match(/^article:/)||_e(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(_e(e.attributes.name)==="google-site-verification"||_e(e.attributes.name)==="yandex-verification"||_e(e.attributes.name)==="csrf-token"||_e(e.attributes.name)==="p:domain_verify"||_e(e.attributes.name)==="verify-v1"||_e(e.attributes.name)==="verification"||_e(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Fr(e,t){const{doc:r,mirror:n,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:l,skipChild:u=!1,inlineStylesheet:a=!0,maskInputOptions:h={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,inlineVideos:g=!1,recordCanvas:v=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:R=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:I=!1,cssCaptured:E=!1,privacySetting:C}=t;let{needsMask:O}=t,{preserveWhiteSpace:V=!0}=t;O||(O=fd(e,o,l,O===void 0));const q=cS(e,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:O,inlineStylesheet:a,maskInputOptions:h,maskTextClass:o,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:I,cssCaptured:E,privacySetting:C});if(!q)return console.warn(e,"not serialized"),null;let Z;n.hasNode(e)?Z=n.getId(e):pS(q,d)||!V&&q.type===Xe.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?Z=gn:Z=ad();const T=Object.assign(q,{id:Z});if(n.add(e,T),Z===gn)return null;y&&y(e);let W=!u,k=C,P=C==="strict";if(T.type===Xe.Element){if(W=W&&!T.needBlock,P||(P=!!T.needBlock||!!T.needMask),k=P?"strict":k,P&&ko(T.tagName)){const $=e.cloneNode();$.src="",n.add($,T)}delete T.needBlock,delete T.needMask;const B=Fe.shadowRoot(e);B&&mn(B)&&(T.isShadowHost=!0)}if((T.type===Xe.Document||T.type===Xe.Element)&&W){d.headWhitespace&&T.type===Xe.Element&&T.tagName==="head"&&(V=!1);const B={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:l,skipChild:u,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:_,cssCaptured:!1,privacySetting:k};if(!(T.type===Xe.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===Xe.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(B.cssCaptured=!0);for(const te of Array.from(Fe.childNodes(e))){const N=Fr(te,B);N&&T.childNodes.push(N)}}let $=null;if(qc(e)&&($=Fe.shadowRoot(e)))for(const te of Array.from(Fe.childNodes($))){const N=Fr(te,B);N&&(mn($)&&(N.isShadow=!0),T.childNodes.push(N))}}const M=Fe.parentNode(e);return M&&pn(M)&&mn(M)&&(T.isShadow=!0),T.type===Xe.Element&&T.tagName==="iframe"&&lS(e,()=>{const B=e.contentDocument;if(B&&w){const $=Fr(B,{doc:B,mirror:n,blockClass:i,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:_,privacySetting:C});$&&w(e,$)}},R),T.type===Xe.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&id(T.attributes.href)==="css")&&uS(e,()=>{if(S){const B=Fr(e,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:_,privacySetting:C});B&&S(e,B)}},b),T}function mS(e,t){const{mirror:r=new rd,blockClass:n="highlight-block",blockSelector:i=null,maskTextClass:s="highlight-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:u=!1,inlineVideos:a=!1,recordCanvas:h=!1,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:g,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:R,stylesheetLoadTimeout:S,keepIframeSrcFn:b=()=>!1,privacySetting:_="default"}=t||{},I=c===!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}:c===!1?{password:!0}:c,E=pd(p);return Fr(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:d,slimDOMOptions:E,dataURLOptions:m,inlineImages:u,inlineVideos:a,recordCanvas:h,preserveWhiteSpace:g,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:R,stylesheetLoadTimeout:S,keepIframeSrcFn:b,newlyAddedElement:!1,privacySetting:_})}function gS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Ii={exports:{}},md;function yS(){if(md)return Ii.exports;md=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ii.exports=t(),Ii.exports.createColors=t,Ii.exports}const Rt=gS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Wo,gd;function Po(){if(gd)return Wo;gd=1;let e=yS(),t=Rt;class r extends Error{constructor(i,s,o,l,u,a){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),a&&(this.plugin=a),typeof s!="undefined"&&typeof o!="undefined"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=e.isColorSupported);let o=d=>d,l=d=>d,u=d=>d;if(i){let{bold:d,gray:p,red:m}=e.createColors(!0);l=g=>d(m(g)),o=g=>p(g),t&&(u=g=>t(g))}let a=s.split(/\r?\n/),h=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),f=String(c).length;return a.slice(h,c).map((d,p)=>{let m=h+1+p,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(d.length>160){let y=20,w=Math.max(0,this.column-y),R=Math.max(this.column+y,this.endColumn+y),S=d.slice(w,R),b=o(g.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+u(S)+`
|
|
50
50
|
`+b+l("^")}let v=o(g.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+u(d)+`
|
|
51
51
|
`+v+l("^")}return" "+o(g)+u(d)}).join(`
|
|
52
52
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
53
53
|
|
|
54
54
|
`+i+`
|
|
55
|
-
`),this.name+": "+this.message+i}}return
|
|
55
|
+
`),this.name+": "+this.message+i}}return Wo=r,r.default=r,Wo}var Mo,yd;function bd(){if(yd)return Mo;yd=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function n(h){return typeof h!="string"||!h.includes("<")?h:h.replace(e,"\\3c $2").replace(t,"\\3c $2")}const i={after:`
|
|
56
56
|
`,beforeClose:`
|
|
57
57
|
`,beforeComment:`
|
|
58
58
|
`,beforeDecl:`
|
|
@@ -63,27 +63,27 @@ spurious results.`)}}return!1};class Wc{constructor(t,r="GraphQL request",n={lin
|
|
|
63
63
|
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeDecl"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeDecl(c,f){let d;return c.walkDecls(p=>{if(typeof p.raws.before!="undefined")return d=p.raws.before,d.includes(`
|
|
64
64
|
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeRule"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeOpen(c){let f;return c.walk(d=>{if(d.type!=="decl"&&(f=d.raws.between,typeof f!="undefined"))return!1}),f}rawBeforeRule(c){let f;return c.walk(d=>{if(d.nodes&&(d.parent!==c||c.first!==d)&&typeof d.raws.before!="undefined")return f=d.raws.before,f.includes(`
|
|
65
65
|
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawColon(c){let f;return c.walkDecls(d=>{if(typeof d.raws.between!="undefined")return f=d.raws.between.replace(/[^\s:]/g,""),!1}),f}rawEmptyBody(c){let f;return c.walk(d=>{if(d.nodes&&d.nodes.length===0&&(f=d.raws.after,typeof f!="undefined"))return!1}),f}rawIndent(c){if(c.raws.indent)return c.raws.indent;let f;return c.walk(d=>{let p=d.parent;if(p&&p!==c&&p.parent&&p.parent===c&&typeof d.raws.before!="undefined"){let m=d.raws.before.split(`
|
|
66
|
-
`);return f=m[m.length-1],f=f.replace(/\S/g,""),!1}}),f}rawSemicolon(c){let f;return c.walk(d=>{if(d.nodes&&d.nodes.length&&d.last.type==="decl"&&(f=d.raws.semicolon,typeof f!="undefined"))return!1}),f}rawValue(c,f){let d=c[f],p=c.raws[f];return p&&p.value===d?p.raw:d}root(c){if(c.source&&c.source.input.hasBOM&&this.builder("\uFEFF",c,"start"),this.body(c),c.raws.after){let f=c.raws.after,d=c.parent&&c.parent.type==="document";this.builder(d?f:n(f))}}rule(c){this.block(c,this.rawValue(c,"selector")),c.raws.ownSemicolon&&this.builder(n(c.raws.ownSemicolon),c,"end")}stringify(c,f){if(!this[c.type])throw new Error("Unknown AST node type "+c.type+". Maybe you need to change PostCSS stringifier.");this[c.type](c,f)}}return
|
|
66
|
+
`);return f=m[m.length-1],f=f.replace(/\S/g,""),!1}}),f}rawSemicolon(c){let f;return c.walk(d=>{if(d.nodes&&d.nodes.length&&d.last.type==="decl"&&(f=d.raws.semicolon,typeof f!="undefined"))return!1}),f}rawValue(c,f){let d=c[f],p=c.raws[f];return p&&p.value===d?p.raw:d}root(c){if(c.source&&c.source.input.hasBOM&&this.builder("\uFEFF",c,"start"),this.body(c),c.raws.after){let f=c.raws.after,d=c.parent&&c.parent.type==="document";this.builder(d?f:n(f))}}rule(c){this.block(c,this.rawValue(c,"selector")),c.raws.ownSemicolon&&this.builder(n(c.raws.ownSemicolon),c,"end")}stringify(c,f){if(!this[c.type])throw new Error("Unknown AST node type "+c.type+". Maybe you need to change PostCSS stringifier.");this[c.type](c,f)}}return Mo=a,a.default=a,Mo}var Ao,vd;function Ci(){if(vd)return Ao;vd=1;let e=bd();function t(r,n){new e(n).stringify(r)}return Ao=t,t.default=t,Ao}var Zi={},Sd;function Li(){return Sd||(Sd=1,Zi.isClean=Symbol("isClean"),Zi.my=Symbol("my")),Zi}var Uo,wd;function xi(){if(wd)return Uo;wd=1;let e=Po(),t=bd(),r=Ci(),{isClean:n,my:i}=Li();function s(u,a){let h=new u.constructor,c=[[u,h,a]];for(;c.length>0;){let[f,d,p]=c.pop();for(let m in f){if(!Object.prototype.hasOwnProperty.call(f,m)||m==="proxyCache")continue;let g=f[m],v=typeof g;if(m==="parent"&&v==="object")p&&(d[m]=p);else if(m==="source")d[m]=g;else if(Array.isArray(g)){let y=[];d[m]=y;for(let w of g){let R=new w.constructor;y.push(R),c.push([w,R,d])}}else{if(v==="object"&&g!==null){let y=new g.constructor;c.push([g,y,void 0]),g=y}d[m]=g}}}return h}function o(u,a){if(a&&typeof a.offset!="undefined")return a.offset;let h=1,c=1,f=0;for(let d=0;d<u.length;d++){if(c===a.line&&h===a.column){f=d;break}u[d]===`
|
|
67
67
|
`?(h=1,c+=1):h+=1}return f}class l{get proxyOf(){return this}constructor(a={}){this.raws={},this[n]=!1,this[i]=!0;for(let h of Object.keys(a))if(h!=="__proto__")if(h==="nodes"){this.nodes=[];for(let c of a[h])typeof c.clone=="function"&&c.parent?this.append(c.clone()):this.append(c)}else this[h]=a[h]}addToError(a){if(a.postcssNode=this,a.stack&&this.source&&/\n\s{4}at /.test(a.stack)){let h=this.source;a.stack=a.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return a}after(a){return this.parent.insertAfter(this,a),this}assign(a={}){for(let h in a)this[h]=a[h];return this}before(a){return this.parent.insertBefore(this,a),this}cleanRaws(a){delete this.raws.before,delete this.raws.after,a||delete this.raws.between}clone(a={}){let h=s(this);for(let c in a)h[c]=a[c];return h}cloneAfter(a={}){let h=this.clone(a);return this.parent.insertAfter(this,h),h}cloneBefore(a={}){let h=this.clone(a);return this.parent.insertBefore(this,h),h}error(a,h={}){if(this.source){let{end:c,start:f}=this.rangeBy(h);return this.source.input.error(a,{column:f.column,line:f.line},{column:c.column,line:c.line},h)}return new e(a)}getProxyProcessor(){return{get(a,h){return h==="proxyOf"?a:h==="root"?()=>a.root().toProxy():a[h]},set(a,h,c){return a[h]===c||(a[h]=c,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&a.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let a=this;for(;a=a.parent;)a[n]=!1}}next(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a+1]}positionBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)};if(a.index)c=this.positionInside(a.index);else if(a.word){let d=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);d!==-1&&(c=this.positionInside(d))}return c}positionInside(a){let h=this.source.start.column,c=this.source.start.line,f="document"in this.source.input?this.source.input.document:this.source.input.css,d=o(f,this.source.start),p=d+a;for(let m=d;m<p;m++)f[m]===`
|
|
68
|
-
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:p}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)},f=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:o(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(a.word){let p=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);p!==-1&&(c=this.positionInside(p),f=this.positionInside(p+a.word.length))}else a.start?c={column:a.start.column,line:a.start.line,offset:o(h,a.start)}:typeof a.index=="number"&&(c=this.positionInside(a.index)),a.end?f={column:a.end.column,line:a.end.line,offset:o(h,a.end)}:typeof a.endIndex=="number"?f=this.positionInside(a.endIndex):typeof a.index=="number"&&(f=this.positionInside(a.index+1));return(f.line<c.line||f.line===c.line&&f.column<=c.column)&&(f={column:c.column+1,line:c.line,offset:c.offset+1}),{end:f,start:c}}raw(a,h){return new t().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,c=!1;for(let f of a)f===this?c=!0:c?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);c||this.remove()}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let c=h==null;h=h||new Map;let f=[],d=[[this,f,0]];for(let m=0;m<d.length;m++){let[g,v,y]=d[m],w={};v[y]=w;for(let _ in g){if(!Object.prototype.hasOwnProperty.call(g,_)||_==="parent"||_==="proxyCache")continue;let S=g[_];if(Array.isArray(S)){let b=[];w[_]=b;for(let R=0;R<S.length;R++){let I=S[R];typeof I=="object"&&I.toJSON?I.toJSON===l.prototype.toJSON?d.push([I,b,R]):b[R]=I.toJSON(null,h):b[R]=I}}else if(typeof S=="object"&&S.toJSON)S.toJSON===l.prototype.toJSON?d.push([S,w,_]):w[_]=S.toJSON(null,h);else if(_==="source"){if(S==null)continue;let b=h.get(S.input);b==null&&(b=h.size,h.set(S.input,b)),w[_]={end:S.end,inputId:b,start:S.start}}else w[_]=S}}let p=f[0];return c&&(p.inputs=[...h.keys()].map(m=>m.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=r){a.stringify&&(a=a.stringify);let h="";return a(this,c=>{h+=c}),h}warn(a,h,c={}){let f={node:this};for(let d in c)f[d]=c[d];return a.warn(h,f)}}return Mo=l,l.default=l,Mo}var Ao,wd;function xi(){if(wd)return Ao;wd=1;let e=Li();class t extends e{constructor(n){super(n),this.type="comment"}}return Ao=t,t.default=t,Ao}var Uo,Rd;function Ni(){if(Rd)return Uo;Rd=1;let e=Li();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value!="undefined"&&typeof n.value!="string"&&(n=Y(x({},n),{value:String(n.value)})),super(n),this.type="decl"}}return Uo=t,t.default=t,Uo}var Do,_d;function zt(){if(_d)return Do;_d=1;let e=xi(),t=Ni(),r=Li(),{isClean:n,my:i}=Zi(),s,o,l,u;function a(f){let d=f.slice();for(;d.length>0;){let p=d.pop();if(delete p.source,p.nodes){p.nodes=p.nodes.slice();for(let m of p.nodes)d.push(m)}}return f.slice()}function h(f){let d=[f];for(;d.length>0;){let p=d.pop();if(p[n]=!1,p.proxyOf.nodes)for(let m of p.proxyOf.nodes)d.push(m)}}class c extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...d){for(let p of d){let m=this.normalize(p,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){let p=[this];for(;p.length>0;){let m=p.pop();if(m!==this&&m.cleanRaws!==c.prototype.cleanRaws){m.cleanRaws(d);continue}if(r.prototype.cleanRaws.call(m,d),m.nodes)for(let g of m.nodes)p.push(g)}}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),m,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(m=this.indexes[p],g=d(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...m)=>d[p](...m.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):p==="every"||p==="some"?m=>d[p]((g,...v)=>m(g.toProxy(),...v)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(m=>m.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,m){return d[p]===m||(d[p]=m,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let m=this.index(d),g=this.normalize(p,this.proxyOf.nodes[m]).reverse();m=this.index(d);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],m<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(d,p){let m=this.index(d),g=m===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[m],g).reverse();m=this.index(d);for(let w of v)this.proxyOf.nodes.splice(m,0,w);let y;for(let w in this.indexes)y=this.indexes[w],m<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=a(o(d).nodes);else if(typeof d=="undefined")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value=="undefined")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new t(d)]}else if(d.selector||d.selectors)d=[new u(d)];else if(d.name)d=[new s(d)];else if(d.text)d=[new e(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&h(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let m=this.normalize(p,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let m in this.indexes)p=this.indexes[m],p>=d&&(this.indexes[m]=p-1);return this.markDirty(),this}replaceValues(d,p,m){return m||(m=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,m))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){if(!this.proxyOf.nodes)return;let p=[{iterator:this.getIterator(),node:this.proxyOf}];for(;p.length>0;){let{iterator:m,node:g}=p[p.length-1],v=g.indexes[m];if(v>=g.proxyOf.nodes.length){delete g.indexes[m],p.pop();let _=p[p.length-1];_&&(_.node.indexes[_.iterator]+=1);continue}let y=g.proxyOf.nodes[v],w;try{w=d(y,v)}catch(_){throw y.addToError(_)}if(w===!1){for(let _ of p)delete _.node.indexes[_.iterator];return!1}y.walk&&y.proxyOf.nodes?p.push({iterator:y.getIterator(),node:y}):g.indexes[m]+=1}}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&d.test(m.name))return p(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="atrule")return p(m,g)}))}walkComments(d){return this.walk((p,m)=>{if(p.type==="comment")return d(p,m)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&d.test(m.prop))return p(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="decl")return p(m,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&d.test(m.selector))return p(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="rule")return p(m,g)}))}}return c.registerParse=f=>{o=f},c.registerRule=f=>{u=f},c.registerAtRule=f=>{s=f},c.registerRoot=f=>{l=f},Do=c,c.default=c,c.rebuild=f=>{let d=[f];for(;d.length>0;){let p=d.pop();if(p.type==="atrule"?Object.setPrototypeOf(p,s.prototype):p.type==="rule"?Object.setPrototypeOf(p,u.prototype):p.type==="decl"?Object.setPrototypeOf(p,t.prototype):p.type==="comment"?Object.setPrototypeOf(p,e.prototype):p.type==="root"&&Object.setPrototypeOf(p,l.prototype),p[i]=!0,p.nodes)for(let m of p.nodes)d.push(m)}},Do}var Fo,Td;function Jo(){if(Td)return Fo;Td=1;let e=zt();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Fo=t,t.default=t,e.registerAtRule(t),Fo}var Ho,Ed;function Yo(){if(Ed)return Ho;Ed=1;let e=zt(),t,r;class n extends e{constructor(s){super(x({type:"document"},s)),this.nodes||(this.nodes=[])}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Ho=n,n.default=n,Ho}var Bo,Id;function pS(){if(Id)return Bo;Id=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Bo={nanoid:(n=21)=>{let i="",s=n|0;for(;s-- >0;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s|0;for(;l-- >0;)o+=n[Math.random()*n.length|0];return o}},Bo}var zo,Cd;function Zd(){if(Cd)return zo;Cd=1;let{existsSync:e,readFileSync:t,realpathSync:r}=_t,{dirname:n,isAbsolute:i,join:s,relative:o,sep:l}=_t,{SourceMapConsumer:u,SourceMapGenerator:a}=_t;function h(d){try{return r(d)}catch(p){return d}}function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class f{constructor(p,m){if(m.map===!1)return;m.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(p),this.inline=this.startWith(this.annotation,"data:");let g=m.map?m.map.prev:void 0,v=this.loadMap(m.from,g);!this.mapFile&&m.from&&(this.mapFile=m.from),this.mapFile&&(this.root=n(this.mapFile)),v&&(this.text=v)}consumer(){return this.consumerCache||(this.consumerCache=new u(this.json||this.text)),this.consumerCache}decodeInline(p){let m=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,v=/^data:application\/json;charset=utf-?8,/,y=/^data:application\/json,/,w=p.match(v)||p.match(y);if(w)return decodeURIComponent(p.substr(w[0].length));let _=p.match(m)||p.match(g);if(_)return c(p.substr(_[0].length));let S=p.slice(22);throw S=S.slice(0,S.indexOf(",")),new Error("Unsupported source map encoding "+S)}getAnnotationURL(p){return p.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(p){return typeof p!="object"?!1:typeof p.mappings=="string"||typeof p._mappings=="string"||Array.isArray(p.sections)}loadAnnotation(p){let m=p.match(/\/\*\s*# sourceMappingURL=/g);if(!m)return;let g=p.lastIndexOf(m.pop()),v=p.indexOf("*/",g);g>-1&&v>-1&&(this.annotation=this.getAnnotationURL(p.substring(g,v)))}loadFile(p,m,g){if(!g&&!this.unsafeMap){if(!/\.map$/i.test(p)||!m)return;let v=o(h(n(m)),h(p));if(v===".."||v.startsWith(".."+l)||i(v))return}if(this.root=n(p),e(p))return this.mapFile=p,t(p,"utf-8").toString().trim()}loadMap(p,m){if(m===!1)return!1;if(m){if(typeof m=="string")return m;if(typeof m=="function"){let g=m(p);if(g){let v=this.loadFile(g,p,!0);if(!v)throw new Error("Unable to load previous source map: "+g.toString());return v}}else{if(m instanceof u)return a.fromSourceMap(m).toString();if(m instanceof a)return m.toString();if(this.isMap(m))return JSON.stringify(m);throw new Error("Unsupported previous source map format: "+m.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;p&&(g=s(n(p),g));let v=this.loadFile(g,p,!1);if(v)try{this.json=JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}catch(y){return}return v}}}startWith(p,m){return p?p.substr(0,m.length)===m:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return zo=f,f.default=f,zo}var Ko,Ld;function Oi(){if(Ld)return Ko;Ld=1;let{nanoid:e}=pS(),{isAbsolute:t,resolve:r}=_t,{SourceMapConsumer:n,SourceMapGenerator:i}=_t,{fileURLToPath:s,pathToFileURL:o}=_t,l=Xo(),u=Zd(),a=_t,h=Symbol("lineToIndexCache"),c=!!(n&&i),f=!!(r&&t);function d(m){if(m[h])return m[h];let g=m.css.split(`
|
|
69
|
-
`),v=new Array(g.length),y=0;for(let w=0,
|
|
70
|
-
`," "];return e.split(t,r)},split(t,r,n){if(typeof t!="string")return[];let i=[],s="",o=!1,l=0,u=!1,a="",h=!1;for(let c of t)h?h=!1:c==="\\"?h=!0:u?c===a&&(u=!1):c==='"'||c==="'"?(u=!0,a=c):c==="("?l+=1:c===")"?l>0&&(l-=1):l===0&&r.includes(c)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=c;return(n||s!=="")&&i.push(s.trim()),i}};return
|
|
68
|
+
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:p}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)},f=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:o(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(a.word){let p=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);p!==-1&&(c=this.positionInside(p),f=this.positionInside(p+a.word.length))}else a.start?c={column:a.start.column,line:a.start.line,offset:o(h,a.start)}:typeof a.index=="number"&&(c=this.positionInside(a.index)),a.end?f={column:a.end.column,line:a.end.line,offset:o(h,a.end)}:typeof a.endIndex=="number"?f=this.positionInside(a.endIndex):typeof a.index=="number"&&(f=this.positionInside(a.index+1));return(f.line<c.line||f.line===c.line&&f.column<=c.column)&&(f={column:c.column+1,line:c.line,offset:c.offset+1}),{end:f,start:c}}raw(a,h){return new t().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,c=!1;for(let f of a)f===this?c=!0:c?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);c||this.remove()}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let c=h==null;h=h||new Map;let f=[],d=[[this,f,0]];for(let m=0;m<d.length;m++){let[g,v,y]=d[m],w={};v[y]=w;for(let R in g){if(!Object.prototype.hasOwnProperty.call(g,R)||R==="parent"||R==="proxyCache")continue;let S=g[R];if(Array.isArray(S)){let b=[];w[R]=b;for(let _=0;_<S.length;_++){let I=S[_];typeof I=="object"&&I.toJSON?I.toJSON===l.prototype.toJSON?d.push([I,b,_]):b[_]=I.toJSON(null,h):b[_]=I}}else if(typeof S=="object"&&S.toJSON)S.toJSON===l.prototype.toJSON?d.push([S,w,R]):w[R]=S.toJSON(null,h);else if(R==="source"){if(S==null)continue;let b=h.get(S.input);b==null&&(b=h.size,h.set(S.input,b)),w[R]={end:S.end,inputId:b,start:S.start}}else w[R]=S}}let p=f[0];return c&&(p.inputs=[...h.keys()].map(m=>m.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=r){a.stringify&&(a=a.stringify);let h="";return a(this,c=>{h+=c}),h}warn(a,h,c={}){let f={node:this};for(let d in c)f[d]=c[d];return a.warn(h,f)}}return Uo=l,l.default=l,Uo}var Do,_d;function Ni(){if(_d)return Do;_d=1;let e=xi();class t extends e{constructor(n){super(n),this.type="comment"}}return Do=t,t.default=t,Do}var Fo,Rd;function Oi(){if(Rd)return Fo;Rd=1;let e=xi();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value!="undefined"&&typeof n.value!="string"&&(n=Y(x({},n),{value:String(n.value)})),super(n),this.type="decl"}}return Fo=t,t.default=t,Fo}var Jo,Td;function zt(){if(Td)return Jo;Td=1;let e=Ni(),t=Oi(),r=xi(),{isClean:n,my:i}=Li(),s,o,l,u;function a(f){let d=f.slice();for(;d.length>0;){let p=d.pop();if(delete p.source,p.nodes){p.nodes=p.nodes.slice();for(let m of p.nodes)d.push(m)}}return f.slice()}function h(f){let d=[f];for(;d.length>0;){let p=d.pop();if(p[n]=!1,p.proxyOf.nodes)for(let m of p.proxyOf.nodes)d.push(m)}}class c extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...d){for(let p of d){let m=this.normalize(p,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){let p=[this];for(;p.length>0;){let m=p.pop();if(m!==this&&m.cleanRaws!==c.prototype.cleanRaws){m.cleanRaws(d);continue}if(r.prototype.cleanRaws.call(m,d),m.nodes)for(let g of m.nodes)p.push(g)}}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),m,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(m=this.indexes[p],g=d(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...m)=>d[p](...m.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):p==="every"||p==="some"?m=>d[p]((g,...v)=>m(g.toProxy(),...v)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(m=>m.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,m){return d[p]===m||(d[p]=m,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let m=this.index(d),g=this.normalize(p,this.proxyOf.nodes[m]).reverse();m=this.index(d);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],m<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(d,p){let m=this.index(d),g=m===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[m],g).reverse();m=this.index(d);for(let w of v)this.proxyOf.nodes.splice(m,0,w);let y;for(let w in this.indexes)y=this.indexes[w],m<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=a(o(d).nodes);else if(typeof d=="undefined")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value=="undefined")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new t(d)]}else if(d.selector||d.selectors)d=[new u(d)];else if(d.name)d=[new s(d)];else if(d.text)d=[new e(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&h(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let m=this.normalize(p,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let m in this.indexes)p=this.indexes[m],p>=d&&(this.indexes[m]=p-1);return this.markDirty(),this}replaceValues(d,p,m){return m||(m=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,m))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){if(!this.proxyOf.nodes)return;let p=[{iterator:this.getIterator(),node:this.proxyOf}];for(;p.length>0;){let{iterator:m,node:g}=p[p.length-1],v=g.indexes[m];if(v>=g.proxyOf.nodes.length){delete g.indexes[m],p.pop();let R=p[p.length-1];R&&(R.node.indexes[R.iterator]+=1);continue}let y=g.proxyOf.nodes[v],w;try{w=d(y,v)}catch(R){throw y.addToError(R)}if(w===!1){for(let R of p)delete R.node.indexes[R.iterator];return!1}y.walk&&y.proxyOf.nodes?p.push({iterator:y.getIterator(),node:y}):g.indexes[m]+=1}}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&d.test(m.name))return p(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="atrule")return p(m,g)}))}walkComments(d){return this.walk((p,m)=>{if(p.type==="comment")return d(p,m)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&d.test(m.prop))return p(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="decl")return p(m,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&d.test(m.selector))return p(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="rule")return p(m,g)}))}}return c.registerParse=f=>{o=f},c.registerRule=f=>{u=f},c.registerAtRule=f=>{s=f},c.registerRoot=f=>{l=f},Jo=c,c.default=c,c.rebuild=f=>{let d=[f];for(;d.length>0;){let p=d.pop();if(p.type==="atrule"?Object.setPrototypeOf(p,s.prototype):p.type==="rule"?Object.setPrototypeOf(p,u.prototype):p.type==="decl"?Object.setPrototypeOf(p,t.prototype):p.type==="comment"?Object.setPrototypeOf(p,e.prototype):p.type==="root"&&Object.setPrototypeOf(p,l.prototype),p[i]=!0,p.nodes)for(let m of p.nodes)d.push(m)}},Jo}var Ho,Ed;function Yo(){if(Ed)return Ho;Ed=1;let e=zt();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Ho=t,t.default=t,e.registerAtRule(t),Ho}var Bo,Id;function zo(){if(Id)return Bo;Id=1;let e=zt(),t,r;class n extends e{constructor(s){super(x({type:"document"},s)),this.nodes||(this.nodes=[])}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Bo=n,n.default=n,Bo}var Ko,Cd;function bS(){if(Cd)return Ko;Cd=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ko={nanoid:(n=21)=>{let i="",s=n|0;for(;s-- >0;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s|0;for(;l-- >0;)o+=n[Math.random()*n.length|0];return o}},Ko}var jo,Zd;function Ld(){if(Zd)return jo;Zd=1;let{existsSync:e,readFileSync:t,realpathSync:r}=Rt,{dirname:n,isAbsolute:i,join:s,relative:o,sep:l}=Rt,{SourceMapConsumer:u,SourceMapGenerator:a}=Rt;function h(d){try{return r(d)}catch(p){return d}}function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class f{constructor(p,m){if(m.map===!1)return;m.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(p),this.inline=this.startWith(this.annotation,"data:");let g=m.map?m.map.prev:void 0,v=this.loadMap(m.from,g);!this.mapFile&&m.from&&(this.mapFile=m.from),this.mapFile&&(this.root=n(this.mapFile)),v&&(this.text=v)}consumer(){return this.consumerCache||(this.consumerCache=new u(this.json||this.text)),this.consumerCache}decodeInline(p){let m=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,v=/^data:application\/json;charset=utf-?8,/,y=/^data:application\/json,/,w=p.match(v)||p.match(y);if(w)return decodeURIComponent(p.substr(w[0].length));let R=p.match(m)||p.match(g);if(R)return c(p.substr(R[0].length));let S=p.slice(22);throw S=S.slice(0,S.indexOf(",")),new Error("Unsupported source map encoding "+S)}getAnnotationURL(p){return p.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(p){return typeof p!="object"?!1:typeof p.mappings=="string"||typeof p._mappings=="string"||Array.isArray(p.sections)}loadAnnotation(p){let m=p.match(/\/\*\s*# sourceMappingURL=/g);if(!m)return;let g=p.lastIndexOf(m.pop()),v=p.indexOf("*/",g);g>-1&&v>-1&&(this.annotation=this.getAnnotationURL(p.substring(g,v)))}loadFile(p,m,g){if(!g&&!this.unsafeMap){if(!/\.map$/i.test(p)||!m)return;let v=o(h(n(m)),h(p));if(v===".."||v.startsWith(".."+l)||i(v))return}if(this.root=n(p),e(p))return this.mapFile=p,t(p,"utf-8").toString().trim()}loadMap(p,m){if(m===!1)return!1;if(m){if(typeof m=="string")return m;if(typeof m=="function"){let g=m(p);if(g){let v=this.loadFile(g,p,!0);if(!v)throw new Error("Unable to load previous source map: "+g.toString());return v}}else{if(m instanceof u)return a.fromSourceMap(m).toString();if(m instanceof a)return m.toString();if(this.isMap(m))return JSON.stringify(m);throw new Error("Unsupported previous source map format: "+m.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;p&&(g=s(n(p),g));let v=this.loadFile(g,p,!1);if(v)try{this.json=JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}catch(y){return}return v}}}startWith(p,m){return p?p.substr(0,m.length)===m:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return jo=f,f.default=f,jo}var Qo,xd;function Gi(){if(xd)return Qo;xd=1;let{nanoid:e}=bS(),{isAbsolute:t,resolve:r}=Rt,{SourceMapConsumer:n,SourceMapGenerator:i}=Rt,{fileURLToPath:s,pathToFileURL:o}=Rt,l=Po(),u=Ld(),a=Rt,h=Symbol("lineToIndexCache"),c=!!(n&&i),f=!!(r&&t);function d(m){if(m[h])return m[h];let g=m.css.split(`
|
|
69
|
+
`),v=new Array(g.length),y=0;for(let w=0,R=g.length;w<R;w++)v[w]=y,y+=g[w].length+1;return m[h]=v,v}class p{get from(){return this.file||this.id}constructor(g,v={}){if(g===null||typeof g=="undefined"||typeof g=="object"&&!g.toString)throw new Error(`PostCSS received ${g} instead of CSS string`);if(this.css=g.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,v.document&&(this.document=v.document.toString()),v.from&&(!f||/^\w+:\/\//.test(v.from)||t(v.from)?this.file=v.from:this.file=r(v.from)),f&&c){let y=new u(this.css,v);if(y.text){this.map=y;let w=y.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(g,v,y,w={}){let R,S,b,_,I;if(v&&typeof v=="object"){let C=v,O=y;if(typeof C.offset=="number"){_=C.offset;let V=this.fromOffset(_);v=V.line,y=V.col}else v=C.line,y=C.column,_=this.fromLineAndColumn(v,y);if(typeof O.offset=="number"){b=O.offset;let V=this.fromOffset(b);S=V.line,R=V.col}else S=O.line,R=O.column,b=this.fromLineAndColumn(O.line,O.column)}else if(y)_=this.fromLineAndColumn(v,y);else{_=v;let C=this.fromOffset(_);v=C.line,y=C.col}let E=this.origin(v,y,S,R);return E?I=new l(g,E.endLine===void 0?E.line:{column:E.column,line:E.line},E.endLine===void 0?E.column:{column:E.endColumn,line:E.endLine},E.source,E.file,w.plugin):I=new l(g,S===void 0?v:{column:y,line:v},S===void 0?y:{column:R,line:S},this.css,this.file,w.plugin),I.input={column:y,endColumn:R,endLine:S,endOffset:b,line:v,offset:_,source:this.css},this.file&&(o&&(I.input.url=o(this.file).toString()),I.input.file=this.file),I}fromLineAndColumn(g,v){return d(this)[g-1]+v-1}fromOffset(g){let v=d(this),y=v[v.length-1],w=0;if(g>=y)w=v.length-1;else{let R=v.length-2,S;for(;w<R;)if(S=w+(R-w>>1),g<v[S])R=S-1;else if(g>=v[S+1])w=S+1;else{w=S;break}}return{col:g-v[w]+1,line:w+1}}mapResolve(g){return/^\w+:\/\//.test(g)?g:r(this.map.consumer().sourceRoot||this.map.root||".",g)}origin(g,v,y,w){if(!this.map)return!1;let R=this.map.consumer(),S=R.originalPositionFor({column:v-1,line:g});if(!S.source)return!1;let b;if(typeof y=="number"){let C=R.originalPositionFor({column:w-1,line:y});C.source&&(b=C)}let _;t(S.source)?_=o(S.source):_=new URL(S.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let I={column:S.column+1,endColumn:b&&b.column+1,endLine:b&&b.line,line:S.line,url:_.toString()};if(_.protocol==="file:")if(s)I.file=s(_);else throw new Error("file: protocol is not available in this PostCSS build");let E=R.sourceContentFor(S.source);return E&&(I.source=E),I}toJSON(){let g={};for(let v of["hasBOM","css","file","id"])this[v]!=null&&(g[v]=this[v]);return this.map&&(g.map=x({},this.map),g.map.consumerCache&&(g.map.consumerCache=void 0)),g}}return Qo=p,p.default=p,a&&a.registerInput&&a.registerInput(p),Qo}var $o,Nd;function yn(){if(Nd)return $o;Nd=1;let e=zt(),t,r;class n extends e{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let u=new Set;for(let h of Array.isArray(s)?s:[s])h&&typeof h=="object"&&!h.parent&&h.raws&&typeof h.raws.before!="undefined"&&u.add(h.raws);let a=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let h of a)u.has(h.raws)||(h.raws.before=o.raws.before)}return a}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},$o=n,n.default=n,e.registerRoot(n),$o}var qo,Od;function Gd(){if(Od)return qo;Od=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
70
|
+
`," "];return e.split(t,r)},split(t,r,n){if(typeof t!="string")return[];let i=[],s="",o=!1,l=0,u=!1,a="",h=!1;for(let c of t)h?h=!1:c==="\\"?h=!0:u?c===a&&(u=!1):c==='"'||c==="'"?(u=!0,a=c):c==="("?l+=1:c===")"?l>0&&(l-=1):l===0&&r.includes(c)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=c;return(n||s!=="")&&i.push(s.trim()),i}};return qo=e,e.default=e,qo}var ea,Vd;function ta(){if(Vd)return ea;Vd=1;let e=zt(),t=Gd();class r extends e{get selectors(){return t.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}}return ea=r,r.default=r,e.registerRule(r),ea}var ra,kd;function vS(){if(kd)return ra;kd=1;let e=Yo(),t=Ni(),r=Oi(),n=Gi(),i=Ld(),s=yn(),o=ta();function l(h,c){return h.inputs?h.inputs.map(f=>{let d=Y(x({},f),{__proto__:n.prototype});return d.map&&(d.map=Y(x({},d.map),{__proto__:i.prototype})),d}):c}function u(h,c,f){let d=x({},h);if(delete d.inputs,delete d.nodes,d.source){let m=d.source,{inputId:g}=m,v=rt(m,["inputId"]);d.source=v,g!=null&&(d.source.input=c[g])}let p;if(d.type==="root")p=new s(d);else if(d.type==="decl")p=new r(d);else if(d.type==="rule")p=new o(d);else if(d.type==="comment")p=new t(d);else if(d.type==="atrule")p=new e(d);else throw new Error("Unknown node type: "+h.type);if(f){p.nodes=f;for(let g of f)g.parent=p}return p}function a(h,c){if(Array.isArray(h))return h.map(p=>a(p));let f,d=[{childIndex:0,children:[],inputs:l(h,c),json:h}];for(;d.length>0;){let p=d[d.length-1],m=p.json.nodes;if(m&&p.childIndex<m.length){let v=m[p.childIndex];p.childIndex+=1,d.push({childIndex:0,children:[],inputs:l(v,p.inputs),json:v});continue}d.pop();let g=u(p.json,p.inputs,m?p.children:void 0);d.length>0?d[d.length-1].children.push(g):f=g}return f}return ra=a,a.default=a,ra}var na,Xd;function Wd(){if(Xd)return na;Xd=1;let{dirname:e,relative:t,resolve:r,sep:n}=Rt,{SourceMapConsumer:i,SourceMapGenerator:s}=Rt,{pathToFileURL:o}=Rt,l=Gi(),u=!!(i&&s),a=!!(e&&r&&t&&n);class h{constructor(f,d,p,m){this.stringify=f,this.mapOpts=p.map||{},this.root=d,this.opts=p,this.css=m,this.originalCSS=m,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let d=`
|
|
71
71
|
`;this.css.includes(`\r
|
|
72
72
|
`)&&(d=`\r
|
|
73
73
|
`),this.css+=d+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let d=this.toUrl(this.path(f.file)),p=f.root||e(f.file),m;this.mapOpts.sourcesContent===!1?(m=new i(f.text),m.sourcesContent&&(m.sourcesContent=null)):m=f.consumer(),this.map.applySourceMap(m,d,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let f;for(let d=this.root.nodes.length-1;d>=0;d--)f=this.root.nodes[d],f.type==="comment"&&f.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(d)}else if(this.css){let f;for(;(f=this.css.lastIndexOf("/*#"))!==-1;){let d=this.css.indexOf("*/",f+3);if(d===-1)break;for(;f>0&&this.css[f-1]===`
|
|
74
|
-
`;)f--;this.css=this.css.slice(0,f)+this.css.slice(d+2)}}}}generate(){if(this.clearAnnotation(),a&&u&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=s.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,
|
|
75
|
-
`),d=y.length-g):d+=y.length,w&&_!=="start"){let S=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==S.last||S.raws.semicolon)&&(w.source&&w.source.end?(m.source=this.sourcePath(w),m.original.line=w.source.end.line,m.original.column=w.source.end.column-1,m.generated.line=f,m.generated.column=d-2,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=d-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(r(p,this.mapOpts.annotation)));let m=t(p,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let m=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(m,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(o){let p=o(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;n==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return ta=h,ta}var ra,Wd;function gS(){if(Wd)return ra;Wd=1;const e=39,t=34,r=92,n=47,i=10,s=32,o=12,l=9,u=13,a=91,h=93,c=40,f=41,d=123,p=125,m=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return ra=function(I,E={}){let C=I.css.valueOf(),O=E.ignoreErrors,V,q,Z,T,W,k,P,M,B,$,te=C.length,N=0,ye=[],he=[],ve=-1;function U(){return N}function D(K){throw I.error("Unclosed "+K,N)}function J(){return he.length===0&&N>=te}function Q(K){if(he.length)return he.pop();if(N>=te)return;let se=K?K.ignoreUnclosed:!1;switch(V=C.charCodeAt(N),V){case i:case s:case l:case u:case o:{T=N;do T+=1,V=C.charCodeAt(T);while(V===s||V===i||V===l||V===u||V===o);k=["space",C.slice(N,T)],N=T-1;break}case a:case h:case d:case p:case v:case m:case f:{let ce=String.fromCharCode(V);k=[ce,ce,N];break}case c:{if($=ye.length?ye.pop()[1]:"",B=C.charCodeAt(N+1),$==="url"&&B!==e&&B!==t&&B!==s&&B!==i&&B!==l&&B!==o&&B!==u){T=N;do{if(P=!1,T=C.indexOf(")",T+1),T===-1)if(O||se){T=N;break}else D("bracket");for(M=T;C.charCodeAt(M-1)===r;)M-=1,P=!P}while(P);k=["brackets",C.slice(N,T+1),N,T],N=T}else N<=ve?k=["(","(",N]:(T=C.indexOf(")",N+1),q=C.slice(N,T+1),T===-1||S.test(q)?(ve=T===-1?te:T,k=["(","(",N]):(k=["brackets",q,N,T],N=T));break}case e:case t:{W=V===e?"'":'"',T=N;do{if(P=!1,T=C.indexOf(W,T+1),T===-1)if(O||se){T=N+1;break}else D("string");for(M=T;C.charCodeAt(M-1)===r;)M-=1,P=!P}while(P);k=["string",C.slice(N,T+1),N,T],N=T;break}case y:{w.lastIndex=N+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,k=["at-word",C.slice(N,T+1),N,T],N=T;break}case r:{for(T=N,Z=!0;C.charCodeAt(T+1)===r;)T+=1,Z=!Z;if(V=C.charCodeAt(T+1),Z&&V!==n&&V!==s&&V!==i&&V!==l&&V!==u&&V!==o&&(T+=1,b.test(C.charAt(T)))){for(;b.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===s&&(T+=1)}k=["word",C.slice(N,T+1),N,T],N=T;break}default:{V===n&&C.charCodeAt(N+1)===g?(T=C.indexOf("*/",N+2)+1,T===0&&(O||se?T=C.length:D("comment")),k=["comment",C.slice(N,T+1),N,T],N=T):(_.lastIndex=N+1,_.test(C),_.lastIndex===0?T=C.length-1:T=_.lastIndex-2,k=["word",C.slice(N,T+1),N,T],ye.push(k),N=T);break}}return N++,k}function re(K){he.push(K)}return{back:re,endOfFile:J,nextToken:Q,position:U}},ra}var na,Pd;function yS(){if(Pd)return na;Pd=1;let e=Jo(),t=xi(),r=Ni(),n=yn(),i=qo(),s=gS();const o={empty:!0,space:!0};function l(h){for(let c=h.length-1;c>=0;c--){let f=h[c],d=f[3]||f[2];if(d)return d}}function u(h,c,f){let d="";for(let p=c;p<f;p++)d+=h[p][1];return d}class a{constructor(c){this.input=c,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let f=new e;f.name=c[1].slice(1),f.name===""&&this.unnamedAtrule(f,c),this.init(f,c[2]);let d,p,m,g=!1,v=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),d=c[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){f.source.end=this.getPosition(c[2]),f.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){v=!0;break}else if(d==="}"){if(y.length>0){for(m=y.length-1,p=y[m];p&&p[0]==="space";)p=y[--m];p&&(f.source.end=this.getPosition(p[3]||p[2]),f.source.end.offset++)}this.end(c);break}else y.push(c);else y.push(c);if(this.tokenizer.endOfFile()){g=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),g&&(c=y[y.length-1],f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),v&&(f.nodes=[],this.current=f)}checkMissedSemicolon(c){let f=this.colon(c);if(f===!1)return;let d=0,p;for(let m=f-1;m>=0&&(p=c[m],!(p[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(c){let f=0,d,p,m;for(let[g,v]of c.entries()){if(p=v,m=p[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!d)this.doubleColon(p);else{if(d[0]==="word"&&d[1]==="progid")continue;return g}d=p}return!1}comment(c){let f=new t;this.init(f,c[2]),f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++;let d=c[1].slice(2,-2);if(!d.trim())f.text="",f.raws.left=d,f.raws.right="";else{let p=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=p[2],f.raws.left=p[1],f.raws.right=p[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(c,f){let d=new r;this.init(d,c[0][2]);let p=c[c.length-1];p[0]===";"&&(this.semicolon=!0,c.pop()),d.source.end=this.getPosition(p[3]||p[2]||l(c)),d.source.end.offset++;let m=0;for(;c[m][0]!=="word";)m===c.length-1&&this.unknownWord([c[m]]),m++;d.raws.before+=u(c,0,m),d.source.start=this.getPosition(c[m][2]);let g=m;for(;m<c.length;){let b=c[m][0];if(b===":"||b==="space"||b==="comment")break;m++}d.prop=u(c,g,m);let v=m,y;for(;m<c.length&&(y=c[m],m++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);d.raws.between=u(c,v,m),(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let w=m;for(;m<c.length;){let b=c[m][0];if(b!=="space"&&b!=="comment")break;m++}let _=c.slice(w,m);c=c.slice(m),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(y=c[b],y[1].toLowerCase()==="!important"){d.important=!0;let R=this.stringFrom(c,b);R=this.spacesFromEnd(c)+R,R!==" !important"&&(d.raws.important=R);break}else if(y[1].toLowerCase()==="important"){let R=c.slice(0),I="";for(let E=b;E>0;E--){let C=R[E][0];if(I.trim().startsWith("!")&&C!=="space")break;I=R.pop()[1]+I}I.trim().startsWith("!")&&(d.important=!0,d.raws.important=I,c=R)}if(y[0]!=="space"&&y[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(d.raws.between+=_.map(b=>b[1]).join(""),_=[]),this.raw(d,"value",_.concat(c),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let f=new i;this.init(f,c[2]),f.selector="",f.raws.between="",this.current=f}end(c){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(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}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(c){if(this.spaces+=c[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="",f.source.end=this.getPosition(c[2]),f.source.end.offset+=f.raws.ownSemicolon.length)}}getPosition(c){let f=this.input.fromOffset(c);return{column:f.col,line:f.line,offset:c}}init(c,f){this.current.push(c),c.source={input:this.input,start:this.getPosition(f)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let f=!1,d=null,p=!1,m=null,g=[],v=c[1].startsWith("--"),y=[],w=c;for(;w;){if(d=w[0],y.push(w),d==="("||d==="[")m||(m=w),g.push(d==="("?")":"]");else if(v&&p&&d==="{")m||(m=w),g.push("}");else if(g.length===0)if(d===";")if(p){this.decl(y,v);return}else break;else if(d==="{"){this.rule(y);return}else if(d==="}"){this.tokenizer.back(y.pop()),f=!0;break}else d===":"&&(p=!0);else d===g[g.length-1]&&(g.pop(),g.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),g.length>0&&this.unclosedBracket(m),f&&p){if(!v)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,v)}else this.unknownWord(y)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,f,d,p){let m,g,v=d.length,y="",w=!0,_,S;for(let b=0;b<v;b+=1)m=d[b],g=m[0],g==="space"&&b===v-1&&!p?w=!1:g==="comment"?(S=d[b-1]?d[b-1][0]:"empty",_=d[b+1]?d[b+1][0]:"empty",!o[S]&&!o[_]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let b=d.reduce((R,I)=>R+I[1],"");c.raws[f]={raw:b,value:y}}c[f]=y}rule(c){c.pop();let f=new i;this.init(f,c[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(f,"selector",c),this.current=f}spacesAndCommentsFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)d=c.pop()[1]+d;return d}spacesAndCommentsFromStart(c){let f,d="";for(;c.length&&(f=c[0][0],!(f!=="space"&&f!=="comment"));)d+=c.shift()[1];return d}spacesFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],f==="space");)d=c.pop()[1]+d;return d}stringFrom(c,f){let d="";for(let p=f;p<c.length;p++)d+=c[p][1];return c.splice(f,c.length-f),d}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return na=a,na}var ia,Md;function sa(){if(Md)return ia;Md=1;let e=zt(),t=Oi(),r=yS();function n(i,s){let o=new t(i,s),l=new r(o);try{l.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?u.message+=`
|
|
74
|
+
`;)f--;this.css=this.css.slice(0,f)+this.css.slice(d+2)}}}}generate(){if(this.clearAnnotation(),a&&u&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=s.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,R)=>{if(this.css+=y,w&&R!=="end"&&(m.generated.line=f,m.generated.column=d-1,w.source&&w.source.start?(m.source=this.sourcePath(w),m.original.line=w.source.start.line,m.original.column=w.source.start.column-1,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,this.map.addMapping(m))),v=y.match(/\n/g),v?(f+=v.length,g=y.lastIndexOf(`
|
|
75
|
+
`),d=y.length-g):d+=y.length,w&&R!=="start"){let S=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==S.last||S.raws.semicolon)&&(w.source&&w.source.end?(m.source=this.sourcePath(w),m.original.line=w.source.end.line,m.original.column=w.source.end.column-1,m.generated.line=f,m.generated.column=d-2,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=d-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(r(p,this.mapOpts.annotation)));let m=t(p,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let m=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(m,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(o){let p=o(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;n==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return na=h,na}var ia,Pd;function SS(){if(Pd)return ia;Pd=1;const e=39,t=34,r=92,n=47,i=10,s=32,o=12,l=9,u=13,a=91,h=93,c=40,f=41,d=123,p=125,m=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return ia=function(I,E={}){let C=I.css.valueOf(),O=E.ignoreErrors,V,q,Z,T,W,k,P,M,B,$,te=C.length,N=0,ye=[],he=[],ve=-1;function U(){return N}function D(K){throw I.error("Unclosed "+K,N)}function J(){return he.length===0&&N>=te}function Q(K){if(he.length)return he.pop();if(N>=te)return;let se=K?K.ignoreUnclosed:!1;switch(V=C.charCodeAt(N),V){case i:case s:case l:case u:case o:{T=N;do T+=1,V=C.charCodeAt(T);while(V===s||V===i||V===l||V===u||V===o);k=["space",C.slice(N,T)],N=T-1;break}case a:case h:case d:case p:case v:case m:case f:{let ce=String.fromCharCode(V);k=[ce,ce,N];break}case c:{if($=ye.length?ye.pop()[1]:"",B=C.charCodeAt(N+1),$==="url"&&B!==e&&B!==t&&B!==s&&B!==i&&B!==l&&B!==o&&B!==u){T=N;do{if(P=!1,T=C.indexOf(")",T+1),T===-1)if(O||se){T=N;break}else D("bracket");for(M=T;C.charCodeAt(M-1)===r;)M-=1,P=!P}while(P);k=["brackets",C.slice(N,T+1),N,T],N=T}else N<=ve?k=["(","(",N]:(T=C.indexOf(")",N+1),q=C.slice(N,T+1),T===-1||S.test(q)?(ve=T===-1?te:T,k=["(","(",N]):(k=["brackets",q,N,T],N=T));break}case e:case t:{W=V===e?"'":'"',T=N;do{if(P=!1,T=C.indexOf(W,T+1),T===-1)if(O||se){T=N+1;break}else D("string");for(M=T;C.charCodeAt(M-1)===r;)M-=1,P=!P}while(P);k=["string",C.slice(N,T+1),N,T],N=T;break}case y:{w.lastIndex=N+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,k=["at-word",C.slice(N,T+1),N,T],N=T;break}case r:{for(T=N,Z=!0;C.charCodeAt(T+1)===r;)T+=1,Z=!Z;if(V=C.charCodeAt(T+1),Z&&V!==n&&V!==s&&V!==i&&V!==l&&V!==u&&V!==o&&(T+=1,b.test(C.charAt(T)))){for(;b.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===s&&(T+=1)}k=["word",C.slice(N,T+1),N,T],N=T;break}default:{V===n&&C.charCodeAt(N+1)===g?(T=C.indexOf("*/",N+2)+1,T===0&&(O||se?T=C.length:D("comment")),k=["comment",C.slice(N,T+1),N,T],N=T):(R.lastIndex=N+1,R.test(C),R.lastIndex===0?T=C.length-1:T=R.lastIndex-2,k=["word",C.slice(N,T+1),N,T],ye.push(k),N=T);break}}return N++,k}function re(K){he.push(K)}return{back:re,endOfFile:J,nextToken:Q,position:U}},ia}var sa,Md;function wS(){if(Md)return sa;Md=1;let e=Yo(),t=Ni(),r=Oi(),n=yn(),i=ta(),s=SS();const o={empty:!0,space:!0};function l(h){for(let c=h.length-1;c>=0;c--){let f=h[c],d=f[3]||f[2];if(d)return d}}function u(h,c,f){let d="";for(let p=c;p<f;p++)d+=h[p][1];return d}class a{constructor(c){this.input=c,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let f=new e;f.name=c[1].slice(1),f.name===""&&this.unnamedAtrule(f,c),this.init(f,c[2]);let d,p,m,g=!1,v=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),d=c[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){f.source.end=this.getPosition(c[2]),f.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){v=!0;break}else if(d==="}"){if(y.length>0){for(m=y.length-1,p=y[m];p&&p[0]==="space";)p=y[--m];p&&(f.source.end=this.getPosition(p[3]||p[2]),f.source.end.offset++)}this.end(c);break}else y.push(c);else y.push(c);if(this.tokenizer.endOfFile()){g=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),g&&(c=y[y.length-1],f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),v&&(f.nodes=[],this.current=f)}checkMissedSemicolon(c){let f=this.colon(c);if(f===!1)return;let d=0,p;for(let m=f-1;m>=0&&(p=c[m],!(p[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(c){let f=0,d,p,m;for(let[g,v]of c.entries()){if(p=v,m=p[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!d)this.doubleColon(p);else{if(d[0]==="word"&&d[1]==="progid")continue;return g}d=p}return!1}comment(c){let f=new t;this.init(f,c[2]),f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++;let d=c[1].slice(2,-2);if(!d.trim())f.text="",f.raws.left=d,f.raws.right="";else{let p=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=p[2],f.raws.left=p[1],f.raws.right=p[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(c,f){let d=new r;this.init(d,c[0][2]);let p=c[c.length-1];p[0]===";"&&(this.semicolon=!0,c.pop()),d.source.end=this.getPosition(p[3]||p[2]||l(c)),d.source.end.offset++;let m=0;for(;c[m][0]!=="word";)m===c.length-1&&this.unknownWord([c[m]]),m++;d.raws.before+=u(c,0,m),d.source.start=this.getPosition(c[m][2]);let g=m;for(;m<c.length;){let b=c[m][0];if(b===":"||b==="space"||b==="comment")break;m++}d.prop=u(c,g,m);let v=m,y;for(;m<c.length&&(y=c[m],m++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);d.raws.between=u(c,v,m),(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let w=m;for(;m<c.length;){let b=c[m][0];if(b!=="space"&&b!=="comment")break;m++}let R=c.slice(w,m);c=c.slice(m),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(y=c[b],y[1].toLowerCase()==="!important"){d.important=!0;let _=this.stringFrom(c,b);_=this.spacesFromEnd(c)+_,_!==" !important"&&(d.raws.important=_);break}else if(y[1].toLowerCase()==="important"){let _=c.slice(0),I="";for(let E=b;E>0;E--){let C=_[E][0];if(I.trim().startsWith("!")&&C!=="space")break;I=_.pop()[1]+I}I.trim().startsWith("!")&&(d.important=!0,d.raws.important=I,c=_)}if(y[0]!=="space"&&y[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(d.raws.between+=R.map(b=>b[1]).join(""),R=[]),this.raw(d,"value",R.concat(c),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let f=new i;this.init(f,c[2]),f.selector="",f.raws.between="",this.current=f}end(c){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(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}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(c){if(this.spaces+=c[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="",f.source.end=this.getPosition(c[2]),f.source.end.offset+=f.raws.ownSemicolon.length)}}getPosition(c){let f=this.input.fromOffset(c);return{column:f.col,line:f.line,offset:c}}init(c,f){this.current.push(c),c.source={input:this.input,start:this.getPosition(f)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let f=!1,d=null,p=!1,m=null,g=[],v=c[1].startsWith("--"),y=[],w=c;for(;w;){if(d=w[0],y.push(w),d==="("||d==="[")m||(m=w),g.push(d==="("?")":"]");else if(v&&p&&d==="{")m||(m=w),g.push("}");else if(g.length===0)if(d===";")if(p){this.decl(y,v);return}else break;else if(d==="{"){this.rule(y);return}else if(d==="}"){this.tokenizer.back(y.pop()),f=!0;break}else d===":"&&(p=!0);else d===g[g.length-1]&&(g.pop(),g.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),g.length>0&&this.unclosedBracket(m),f&&p){if(!v)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,v)}else this.unknownWord(y)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,f,d,p){let m,g,v=d.length,y="",w=!0,R,S;for(let b=0;b<v;b+=1)m=d[b],g=m[0],g==="space"&&b===v-1&&!p?w=!1:g==="comment"?(S=d[b-1]?d[b-1][0]:"empty",R=d[b+1]?d[b+1][0]:"empty",!o[S]&&!o[R]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let b=d.reduce((_,I)=>_+I[1],"");c.raws[f]={raw:b,value:y}}c[f]=y}rule(c){c.pop();let f=new i;this.init(f,c[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(f,"selector",c),this.current=f}spacesAndCommentsFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)d=c.pop()[1]+d;return d}spacesAndCommentsFromStart(c){let f,d="";for(;c.length&&(f=c[0][0],!(f!=="space"&&f!=="comment"));)d+=c.shift()[1];return d}spacesFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],f==="space");)d=c.pop()[1]+d;return d}stringFrom(c,f){let d="";for(let p=f;p<c.length;p++)d+=c[p][1];return c.splice(f,c.length-f),d}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return sa=a,sa}var oa,Ad;function aa(){if(Ad)return oa;Ad=1;let e=zt(),t=Gi(),r=wS();function n(i,s){let o=new t(i,s),l=new r(o);try{l.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?u.message+=`
|
|
76
76
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?u.message+=`
|
|
77
77
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(u.message+=`
|
|
78
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return l.root}return ia=n,n.default=n,e.registerParse(n),ia}var oa,Ad;function Ud(){if(Ad)return oa;Ad=1;let e=zt(),{my:t}=Zi();class r{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){s.node[t]||e.rebuild(s.node);let o=s.node.rangeBy(s);this.line=o.start.line,this.column=o.start.column,this.endLine=o.end.line,this.endColumn=o.end.column}for(let o in s)this[o]=s[o]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return oa=r,r.default=r,oa}var aa,Dd;function la(){if(Dd)return aa;Dd=1;let e=Ud();class t{get content(){return this.css}constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new e(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}}return aa=t,t.default=t,aa}var ua,Fd;function Jd(){if(Fd)return ua;Fd=1;let e={};return ua=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},ua}var ca,Hd;function Yd(){if(Hd)return ca;Hd=1;let e=zt(),t=Yo(),r=Xd(),n=sa(),i=la(),s=yn(),o=Ii(),{isClean:l,my:u}=Zi(),a=Jd();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(_){return typeof _=="object"&&typeof _.then=="function"}function m(_){let S=!1,b=h[_.type];return _.type==="decl"?S=_.prop.toLowerCase():_.type==="atrule"&&(S=_.name.toLowerCase()),S&&_.append?[b,b+"-"+S,d,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:_.append?[b,d,b+"Exit"]:[b,b+"Exit"]}function g(_){let S;return _.type==="document"?S=["Document",d,"DocumentExit"]:_.type==="root"?S=["Root",d,"RootExit"]:S=m(_),{eventIndex:0,events:S,iterator:0,node:_,visitorIndex:0,visitors:[]}}function v(_){let S=[_];for(;S.length>0;){let b=S.pop();if(b[l]=!1,b.nodes)for(let R of b.nodes)S.push(R)}return _}let y={};class w{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(S,b,R){this.stringified=!1,this.processed=!1;let I;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))I=v(b);else if(b instanceof w||b instanceof i)I=v(b.root),b.map&&(typeof R.map=="undefined"&&(R.map={}),R.map.inline||(R.map.inline=!1),R.map.prev=b.map);else{let E=n;R.syntax&&(E=R.syntax.parse),R.parser&&(E=R.parser),E.parse&&(E=E.parse);try{I=E(b,R)}catch(C){this.processed=!0,this.error=C}I&&!I[u]&&e.rebuild(I)}this.result=new i(S,I,R),this.helpers=Y(x({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?x(x({},E),E.prepare(this.result)):E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let R=this.result.lastPlugin;try{if(b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=R.postcssPlugin,S.setMessage();else if(R.postcssVersion&&process.env.NODE_ENV!=="production"){let I=R.postcssPlugin,E=R.postcssVersion,C=this.result.processor.version,O=E.split("."),V=C.split(".");(O[0]!==V[0]||parseInt(O[1])>parseInt(V[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+C+", but "+I+" uses "+E+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(b,R,I)=>{this.listeners[R]||(this.listeners[R]=[]),this.listeners[R].push([b,I])};for(let b of this.plugins)if(typeof b=="object")for(let R in b){if(!c[R]&&/^[A-Z]/.test(R))throw new Error(`Unknown event ${R} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[R])if(typeof b[R]=="object")for(let I in b[R])I==="*"?S(b,R,b[R][I]):S(b,R+"-"+I.toLowerCase(),b[R][I]);else typeof b[R]=="function"&&S(b,R,b[R])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return z(this,null,function*(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],R=this.runOnRoot(b);if(p(R))try{yield R}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];){S[l]=!0;let b=[g(S)];for(;b.length>0;){let R=this.visitTick(b);if(p(R))try{yield R}catch(I){let E=b[b.length-1].node;throw this.handleError(I,E)}}}if(this.listeners.OnceExit)for(let[b,R]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let I=S.nodes.map(E=>R(E,this.helpers));yield Promise.all(I)}else yield R(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()})}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(R=>S.Once(R,this.helpers));return p(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=o;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let R=this.result.root.source;if(S.map===void 0&&!(R&&R.input&&R.input.map)){let C="";return b(this.result.root,O=>{C+=O}),this.result.css=C,this.result}let E=new r(b,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[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 S of this.plugins){let b=this.runOnRoot(S);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];)S[l]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return process.env.NODE_ENV!=="production"&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[R,I]of S){this.result.lastPlugin=R;let E;try{E=I(b,this.helpers)}catch(C){throw this.handleError(C,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(E))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:R,visitors:I}=b;if(R.type!=="root"&&R.type!=="document"&&!R.parent){S.pop();return}if(I.length>0&&b.visitorIndex<I.length){let[C,O]=I[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===I.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=C;try{return O(R.toProxy(),this.helpers)}catch(V){throw this.handleError(V,R)}}if(b.iterator!==0){let C=b.iterator;b.descending&&(b.descending=!1,R.indexes[C]+=1);let O;for(;O=R.nodes[R.indexes[C]];){if(!O[l]){O[l]=!0,b.descending=!0,S.push(g(O));return}R.indexes[C]+=1}b.iterator=0,delete R.indexes[C]}let E=b.events;for(;b.eventIndex<E.length;){let C=E[b.eventIndex];if(b.eventIndex+=1,C===d){R.nodes&&R.nodes.length&&(R[l]=!0,b.iterator=R.getIterator());return}else if(this.listeners[C]){b.visitors=this.listeners[C];return}}S.pop()}walkSync(S){S[l]=!0;let b=[{eventIndex:0,events:m(S),iterator:0,node:S}];for(;b.length>0;){let R=b[b.length-1],I=R.node;if(R.iterator!==0){let E=R.iterator;R.descending&&(R.descending=!1,I.indexes[E]+=1);let C,O=!1;for(;C=I.nodes[I.indexes[E]];){if(!C[l]){C[l]=!0,R.descending=!0,b.push({eventIndex:0,events:m(C),iterator:0,node:C}),O=!0;break}I.indexes[E]+=1}if(O)continue;R.iterator=0,delete I.indexes[E]}if(R.eventIndex<R.events.length){let E=R.events[R.eventIndex];if(R.eventIndex+=1,E===d)I.nodes&&I.nodes.length&&(R.iterator=I.getIterator());else{let C=this.listeners[E];C&&this.visitSync(C,I.toProxy())&&b.pop()}continue}b.pop()}}warnings(){return this.sync().warnings()}}return w.registerPostcss=_=>{y=_},ca=w,w.default=w,s.registerLazyResult(w),t.registerLazyResult(w),ca}var da,Bd;function bS(){if(Bd)return da;Bd=1;let e=Xd(),t=sa(),r=la(),n=Ii(),i=Jd();class s{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 l,u=t;try{l=u(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,u,a){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=a,this._map=void 0;let h=n;this.result=new r(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new e(h,void 0,this._opts,u);if(f.isMap()){let[d,p]=f.generate();d&&(this.result.css=d),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(l,u)}toString(){return this._css}warnings(){return[]}}return da=s,s.default=s,da}var ha,zd;function vS(){if(zd)return ha;zd=1;let e=Yo(),t=Yd(),r=bS(),n=yn();class i{constructor(o=[]){this.version="8.5.26",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(typeof u=="object"&&(u.parse||u.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return ha=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),ha}var fa,Kd;function SS(){if(Kd)return fa;Kd=1;let e=Jo(),t=xi(),r=zt(),n=Xo(),i=Ni(),s=Yo(),o=mS(),l=Oi(),u=Yd(),a=Od(),h=Li(),c=sa(),f=vS(),d=la(),p=yn(),m=qo(),g=Ii(),v=Ud();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new f(w)}return y.plugin=function(_,S){let b=!1;function R(...E){console&&console.warn&&!b&&(b=!0,console.warn(_+`: postcss.plugin was deprecated. Migration guide:
|
|
79
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
80
|
-
https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=
|
|
78
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return l.root}return oa=n,n.default=n,e.registerParse(n),oa}var la,Ud;function Dd(){if(Ud)return la;Ud=1;let e=zt(),{my:t}=Li();class r{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){s.node[t]||e.rebuild(s.node);let o=s.node.rangeBy(s);this.line=o.start.line,this.column=o.start.column,this.endLine=o.end.line,this.endColumn=o.end.column}for(let o in s)this[o]=s[o]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return la=r,r.default=r,la}var ua,Fd;function ca(){if(Fd)return ua;Fd=1;let e=Dd();class t{get content(){return this.css}constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new e(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}}return ua=t,t.default=t,ua}var da,Jd;function Hd(){if(Jd)return da;Jd=1;let e={};return da=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},da}var ha,Yd;function Bd(){if(Yd)return ha;Yd=1;let e=zt(),t=zo(),r=Wd(),n=aa(),i=ca(),s=yn(),o=Ci(),{isClean:l,my:u}=Li(),a=Hd();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(R){return typeof R=="object"&&typeof R.then=="function"}function m(R){let S=!1,b=h[R.type];return R.type==="decl"?S=R.prop.toLowerCase():R.type==="atrule"&&(S=R.name.toLowerCase()),S&&R.append?[b,b+"-"+S,d,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:R.append?[b,d,b+"Exit"]:[b,b+"Exit"]}function g(R){let S;return R.type==="document"?S=["Document",d,"DocumentExit"]:R.type==="root"?S=["Root",d,"RootExit"]:S=m(R),{eventIndex:0,events:S,iterator:0,node:R,visitorIndex:0,visitors:[]}}function v(R){let S=[R];for(;S.length>0;){let b=S.pop();if(b[l]=!1,b.nodes)for(let _ of b.nodes)S.push(_)}return R}let y={};class w{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(S,b,_){this.stringified=!1,this.processed=!1;let I;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))I=v(b);else if(b instanceof w||b instanceof i)I=v(b.root),b.map&&(typeof _.map=="undefined"&&(_.map={}),_.map.inline||(_.map.inline=!1),_.map.prev=b.map);else{let E=n;_.syntax&&(E=_.syntax.parse),_.parser&&(E=_.parser),E.parse&&(E=E.parse);try{I=E(b,_)}catch(C){this.processed=!0,this.error=C}I&&!I[u]&&e.rebuild(I)}this.result=new i(S,I,_),this.helpers=Y(x({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?x(x({},E),E.prepare(this.result)):E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let _=this.result.lastPlugin;try{if(b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=_.postcssPlugin,S.setMessage();else if(_.postcssVersion&&process.env.NODE_ENV!=="production"){let I=_.postcssPlugin,E=_.postcssVersion,C=this.result.processor.version,O=E.split("."),V=C.split(".");(O[0]!==V[0]||parseInt(O[1])>parseInt(V[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+C+", but "+I+" uses "+E+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(b,_,I)=>{this.listeners[_]||(this.listeners[_]=[]),this.listeners[_].push([b,I])};for(let b of this.plugins)if(typeof b=="object")for(let _ in b){if(!c[_]&&/^[A-Z]/.test(_))throw new Error(`Unknown event ${_} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[_])if(typeof b[_]=="object")for(let I in b[_])I==="*"?S(b,_,b[_][I]):S(b,_+"-"+I.toLowerCase(),b[_][I]);else typeof b[_]=="function"&&S(b,_,b[_])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return z(this,null,function*(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],_=this.runOnRoot(b);if(p(_))try{yield _}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];){S[l]=!0;let b=[g(S)];for(;b.length>0;){let _=this.visitTick(b);if(p(_))try{yield _}catch(I){let E=b[b.length-1].node;throw this.handleError(I,E)}}}if(this.listeners.OnceExit)for(let[b,_]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let I=S.nodes.map(E=>_(E,this.helpers));yield Promise.all(I)}else yield _(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()})}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(_=>S.Once(_,this.helpers));return p(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=o;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let _=this.result.root.source;if(S.map===void 0&&!(_&&_.input&&_.input.map)){let C="";return b(this.result.root,O=>{C+=O}),this.result.css=C,this.result}let E=new r(b,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[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 S of this.plugins){let b=this.runOnRoot(S);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];)S[l]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return process.env.NODE_ENV!=="production"&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[_,I]of S){this.result.lastPlugin=_;let E;try{E=I(b,this.helpers)}catch(C){throw this.handleError(C,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(E))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:_,visitors:I}=b;if(_.type!=="root"&&_.type!=="document"&&!_.parent){S.pop();return}if(I.length>0&&b.visitorIndex<I.length){let[C,O]=I[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===I.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=C;try{return O(_.toProxy(),this.helpers)}catch(V){throw this.handleError(V,_)}}if(b.iterator!==0){let C=b.iterator;b.descending&&(b.descending=!1,_.indexes[C]+=1);let O;for(;O=_.nodes[_.indexes[C]];){if(!O[l]){O[l]=!0,b.descending=!0,S.push(g(O));return}_.indexes[C]+=1}b.iterator=0,delete _.indexes[C]}let E=b.events;for(;b.eventIndex<E.length;){let C=E[b.eventIndex];if(b.eventIndex+=1,C===d){_.nodes&&_.nodes.length&&(_[l]=!0,b.iterator=_.getIterator());return}else if(this.listeners[C]){b.visitors=this.listeners[C];return}}S.pop()}walkSync(S){S[l]=!0;let b=[{eventIndex:0,events:m(S),iterator:0,node:S}];for(;b.length>0;){let _=b[b.length-1],I=_.node;if(_.iterator!==0){let E=_.iterator;_.descending&&(_.descending=!1,I.indexes[E]+=1);let C,O=!1;for(;C=I.nodes[I.indexes[E]];){if(!C[l]){C[l]=!0,_.descending=!0,b.push({eventIndex:0,events:m(C),iterator:0,node:C}),O=!0;break}I.indexes[E]+=1}if(O)continue;_.iterator=0,delete I.indexes[E]}if(_.eventIndex<_.events.length){let E=_.events[_.eventIndex];if(_.eventIndex+=1,E===d)I.nodes&&I.nodes.length&&(_.iterator=I.getIterator());else{let C=this.listeners[E];C&&this.visitSync(C,I.toProxy())&&b.pop()}continue}b.pop()}}warnings(){return this.sync().warnings()}}return w.registerPostcss=R=>{y=R},ha=w,w.default=w,s.registerLazyResult(w),t.registerLazyResult(w),ha}var fa,zd;function _S(){if(zd)return fa;zd=1;let e=Wd(),t=aa(),r=ca(),n=Ci(),i=Hd();class s{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 l,u=t;try{l=u(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,u,a){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=a,this._map=void 0;let h=n;this.result=new r(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new e(h,void 0,this._opts,u);if(f.isMap()){let[d,p]=f.generate();d&&(this.result.css=d),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(l,u)}toString(){return this._css}warnings(){return[]}}return fa=s,s.default=s,fa}var pa,Kd;function RS(){if(Kd)return pa;Kd=1;let e=zo(),t=Bd(),r=_S(),n=yn();class i{constructor(o=[]){this.version="8.5.26",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(typeof u=="object"&&(u.parse||u.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return pa=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),pa}var ma,jd;function TS(){if(jd)return ma;jd=1;let e=Yo(),t=Ni(),r=zt(),n=Po(),i=Oi(),s=zo(),o=vS(),l=Gi(),u=Bd(),a=Gd(),h=xi(),c=aa(),f=RS(),d=ca(),p=yn(),m=ta(),g=Ci(),v=Dd();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new f(w)}return y.plugin=function(R,S){let b=!1;function _(...E){console&&console.warn&&!b&&(b=!0,console.warn(R+`: postcss.plugin was deprecated. Migration guide:
|
|
79
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(R+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
80
|
+
https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=R,C.postcssVersion=new f().version,C}let I;return Object.defineProperty(_,"postcss",{get(){return I||(I=_()),I}}),_.process=function(E,C,O){return y([_(O)]).process(E,C)},_},y.stringify=g,y.parse=c,y.fromJSON=o,y.list=a,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new m(w),y.root=w=>new p(w),y.document=w=>new s(w),y.CssSyntaxError=n,y.Declaration=i,y.Container=r,y.Processor=f,y.Document=s,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=d,y.Input=l,y.Rule=m,y.Root=p,y.Node=h,u.registerPostcss(y),ma=y,y.default=y,ma}TS();var ES=Object.defineProperty,IS=(e,t,r)=>t in e?ES(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ct=(e,t,r)=>IS(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();function CS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Vi={exports:{}},Qd;function ZS(){if(Qd)return Vi.exports;Qd=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Vi.exports=t(),Vi.exports.createColors=t,Vi.exports}const Tt=CS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ga,$d;function ya(){if($d)return ga;$d=1;let e=ZS(),t=Tt;class r extends Error{constructor(i,s,o,l,u,a){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),a&&(this.plugin=a),typeof s!="undefined"&&typeof o!="undefined"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=e.isColorSupported);let o=d=>d,l=d=>d,u=d=>d;if(i){let{bold:d,gray:p,red:m}=e.createColors(!0);l=g=>d(m(g)),o=g=>p(g),t&&(u=g=>t(g))}let a=s.split(/\r?\n/),h=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),f=String(c).length;return a.slice(h,c).map((d,p)=>{let m=h+1+p,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(d.length>160){let y=20,w=Math.max(0,this.column-y),R=Math.max(this.column+y,this.endColumn+y),S=d.slice(w,R),b=o(g.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+u(S)+`
|
|
81
81
|
`+b+l("^")}let v=o(g.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+u(d)+`
|
|
82
82
|
`+v+l("^")}return" "+o(g)+u(d)}).join(`
|
|
83
83
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
84
84
|
|
|
85
85
|
`+i+`
|
|
86
|
-
`),this.name+": "+this.message+i}}return
|
|
86
|
+
`),this.name+": "+this.message+i}}return ga=r,r.default=r,ga}var ba,qd;function eh(){if(qd)return ba;qd=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function n(h){return typeof h!="string"||!h.includes("<")?h:h.replace(e,"\\3c $2").replace(t,"\\3c $2")}const i={after:`
|
|
87
87
|
`,beforeClose:`
|
|
88
88
|
`,beforeComment:`
|
|
89
89
|
`,beforeDecl:`
|
|
@@ -94,23 +94,23 @@ https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=_,C.p
|
|
|
94
94
|
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeDecl"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeDecl(c,f){let d;return c.walkDecls(p=>{if(typeof p.raws.before!="undefined")return d=p.raws.before,d.includes(`
|
|
95
95
|
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeRule"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeOpen(c){let f;return c.walk(d=>{if(d.type!=="decl"&&(f=d.raws.between,typeof f!="undefined"))return!1}),f}rawBeforeRule(c){let f;return c.walk(d=>{if(d.nodes&&(d.parent!==c||c.first!==d)&&typeof d.raws.before!="undefined")return f=d.raws.before,f.includes(`
|
|
96
96
|
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawColon(c){let f;return c.walkDecls(d=>{if(typeof d.raws.between!="undefined")return f=d.raws.between.replace(/[^\s:]/g,""),!1}),f}rawEmptyBody(c){let f;return c.walk(d=>{if(d.nodes&&d.nodes.length===0&&(f=d.raws.after,typeof f!="undefined"))return!1}),f}rawIndent(c){if(c.raws.indent)return c.raws.indent;let f;return c.walk(d=>{let p=d.parent;if(p&&p!==c&&p.parent&&p.parent===c&&typeof d.raws.before!="undefined"){let m=d.raws.before.split(`
|
|
97
|
-
`);return f=m[m.length-1],f=f.replace(/\S/g,""),!1}}),f}rawSemicolon(c){let f;return c.walk(d=>{if(d.nodes&&d.nodes.length&&d.last.type==="decl"&&(f=d.raws.semicolon,typeof f!="undefined"))return!1}),f}rawValue(c,f){let d=c[f],p=c.raws[f];return p&&p.value===d?p.raw:d}root(c){if(c.source&&c.source.input.hasBOM&&this.builder("\uFEFF",c,"start"),this.body(c),c.raws.after){let f=c.raws.after,d=c.parent&&c.parent.type==="document";this.builder(d?f:n(f))}}rule(c){this.block(c,this.rawValue(c,"selector")),c.raws.ownSemicolon&&this.builder(n(c.raws.ownSemicolon),c,"end")}stringify(c,f){if(!this[c.type])throw new Error("Unknown AST node type "+c.type+". Maybe you need to change PostCSS stringifier.");this[c.type](c,f)}}return
|
|
97
|
+
`);return f=m[m.length-1],f=f.replace(/\S/g,""),!1}}),f}rawSemicolon(c){let f;return c.walk(d=>{if(d.nodes&&d.nodes.length&&d.last.type==="decl"&&(f=d.raws.semicolon,typeof f!="undefined"))return!1}),f}rawValue(c,f){let d=c[f],p=c.raws[f];return p&&p.value===d?p.raw:d}root(c){if(c.source&&c.source.input.hasBOM&&this.builder("\uFEFF",c,"start"),this.body(c),c.raws.after){let f=c.raws.after,d=c.parent&&c.parent.type==="document";this.builder(d?f:n(f))}}rule(c){this.block(c,this.rawValue(c,"selector")),c.raws.ownSemicolon&&this.builder(n(c.raws.ownSemicolon),c,"end")}stringify(c,f){if(!this[c.type])throw new Error("Unknown AST node type "+c.type+". Maybe you need to change PostCSS stringifier.");this[c.type](c,f)}}return ba=a,a.default=a,ba}var va,th;function ki(){if(th)return va;th=1;let e=eh();function t(r,n){new e(n).stringify(r)}return va=t,t.default=t,va}var Xi={},rh;function Wi(){return rh||(rh=1,Xi.isClean=Symbol("isClean"),Xi.my=Symbol("my")),Xi}var Sa,nh;function Pi(){if(nh)return Sa;nh=1;let e=ya(),t=eh(),r=ki(),{isClean:n,my:i}=Wi();function s(u,a){let h=new u.constructor,c=[[u,h,a]];for(;c.length>0;){let[f,d,p]=c.pop();for(let m in f){if(!Object.prototype.hasOwnProperty.call(f,m)||m==="proxyCache")continue;let g=f[m],v=typeof g;if(m==="parent"&&v==="object")p&&(d[m]=p);else if(m==="source")d[m]=g;else if(Array.isArray(g)){let y=[];d[m]=y;for(let w of g){let R=new w.constructor;y.push(R),c.push([w,R,d])}}else{if(v==="object"&&g!==null){let y=new g.constructor;c.push([g,y,void 0]),g=y}d[m]=g}}}return h}function o(u,a){if(a&&typeof a.offset!="undefined")return a.offset;let h=1,c=1,f=0;for(let d=0;d<u.length;d++){if(c===a.line&&h===a.column){f=d;break}u[d]===`
|
|
98
98
|
`?(h=1,c+=1):h+=1}return f}class l{get proxyOf(){return this}constructor(a={}){this.raws={},this[n]=!1,this[i]=!0;for(let h of Object.keys(a))if(h!=="__proto__")if(h==="nodes"){this.nodes=[];for(let c of a[h])typeof c.clone=="function"&&c.parent?this.append(c.clone()):this.append(c)}else this[h]=a[h]}addToError(a){if(a.postcssNode=this,a.stack&&this.source&&/\n\s{4}at /.test(a.stack)){let h=this.source;a.stack=a.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return a}after(a){return this.parent.insertAfter(this,a),this}assign(a={}){for(let h in a)this[h]=a[h];return this}before(a){return this.parent.insertBefore(this,a),this}cleanRaws(a){delete this.raws.before,delete this.raws.after,a||delete this.raws.between}clone(a={}){let h=s(this);for(let c in a)h[c]=a[c];return h}cloneAfter(a={}){let h=this.clone(a);return this.parent.insertAfter(this,h),h}cloneBefore(a={}){let h=this.clone(a);return this.parent.insertBefore(this,h),h}error(a,h={}){if(this.source){let{end:c,start:f}=this.rangeBy(h);return this.source.input.error(a,{column:f.column,line:f.line},{column:c.column,line:c.line},h)}return new e(a)}getProxyProcessor(){return{get(a,h){return h==="proxyOf"?a:h==="root"?()=>a.root().toProxy():a[h]},set(a,h,c){return a[h]===c||(a[h]=c,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&a.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let a=this;for(;a=a.parent;)a[n]=!1}}next(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a+1]}positionBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)};if(a.index)c=this.positionInside(a.index);else if(a.word){let d=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);d!==-1&&(c=this.positionInside(d))}return c}positionInside(a){let h=this.source.start.column,c=this.source.start.line,f="document"in this.source.input?this.source.input.document:this.source.input.css,d=o(f,this.source.start),p=d+a;for(let m=d;m<p;m++)f[m]===`
|
|
99
|
-
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:p}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)},f=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:o(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(a.word){let p=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);p!==-1&&(c=this.positionInside(p),f=this.positionInside(p+a.word.length))}else a.start?c={column:a.start.column,line:a.start.line,offset:o(h,a.start)}:typeof a.index=="number"&&(c=this.positionInside(a.index)),a.end?f={column:a.end.column,line:a.end.line,offset:o(h,a.end)}:typeof a.endIndex=="number"?f=this.positionInside(a.endIndex):typeof a.index=="number"&&(f=this.positionInside(a.index+1));return(f.line<c.line||f.line===c.line&&f.column<=c.column)&&(f={column:c.column+1,line:c.line,offset:c.offset+1}),{end:f,start:c}}raw(a,h){return new t().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,c=!1;for(let f of a)f===this?c=!0:c?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);c||this.remove()}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let c=h==null;h=h||new Map;let f=[],d=[[this,f,0]];for(let m=0;m<d.length;m++){let[g,v,y]=d[m],w={};v[y]=w;for(let _ in g){if(!Object.prototype.hasOwnProperty.call(g,_)||_==="parent"||_==="proxyCache")continue;let S=g[_];if(Array.isArray(S)){let b=[];w[_]=b;for(let R=0;R<S.length;R++){let I=S[R];typeof I=="object"&&I.toJSON?I.toJSON===l.prototype.toJSON?d.push([I,b,R]):b[R]=I.toJSON(null,h):b[R]=I}}else if(typeof S=="object"&&S.toJSON)S.toJSON===l.prototype.toJSON?d.push([S,w,_]):w[_]=S.toJSON(null,h);else if(_==="source"){if(S==null)continue;let b=h.get(S.input);b==null&&(b=h.size,h.set(S.input,b)),w[_]={end:S.end,inputId:b,start:S.start}}else w[_]=S}}let p=f[0];return c&&(p.inputs=[...h.keys()].map(m=>m.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=r){a.stringify&&(a=a.stringify);let h="";return a(this,c=>{h+=c}),h}warn(a,h,c={}){let f={node:this};for(let d in c)f[d]=c[d];return a.warn(h,f)}}return ba=l,l.default=l,ba}var va,nh;function Pi(){if(nh)return va;nh=1;let e=Wi();class t extends e{constructor(n){super(n),this.type="comment"}}return va=t,t.default=t,va}var Sa,ih;function Mi(){if(ih)return Sa;ih=1;let e=Wi();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value!="undefined"&&typeof n.value!="string"&&(n=Y(x({},n),{value:String(n.value)})),super(n),this.type="decl"}}return Sa=t,t.default=t,Sa}var wa,sh;function Kt(){if(sh)return wa;sh=1;let e=Pi(),t=Mi(),r=Wi(),{isClean:n,my:i}=Xi(),s,o,l,u;function a(f){let d=f.slice();for(;d.length>0;){let p=d.pop();if(delete p.source,p.nodes){p.nodes=p.nodes.slice();for(let m of p.nodes)d.push(m)}}return f.slice()}function h(f){let d=[f];for(;d.length>0;){let p=d.pop();if(p[n]=!1,p.proxyOf.nodes)for(let m of p.proxyOf.nodes)d.push(m)}}class c extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...d){for(let p of d){let m=this.normalize(p,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){let p=[this];for(;p.length>0;){let m=p.pop();if(m!==this&&m.cleanRaws!==c.prototype.cleanRaws){m.cleanRaws(d);continue}if(r.prototype.cleanRaws.call(m,d),m.nodes)for(let g of m.nodes)p.push(g)}}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),m,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(m=this.indexes[p],g=d(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...m)=>d[p](...m.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):p==="every"||p==="some"?m=>d[p]((g,...v)=>m(g.toProxy(),...v)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(m=>m.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,m){return d[p]===m||(d[p]=m,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let m=this.index(d),g=this.normalize(p,this.proxyOf.nodes[m]).reverse();m=this.index(d);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],m<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(d,p){let m=this.index(d),g=m===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[m],g).reverse();m=this.index(d);for(let w of v)this.proxyOf.nodes.splice(m,0,w);let y;for(let w in this.indexes)y=this.indexes[w],m<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=a(o(d).nodes);else if(typeof d=="undefined")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value=="undefined")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new t(d)]}else if(d.selector||d.selectors)d=[new u(d)];else if(d.name)d=[new s(d)];else if(d.text)d=[new e(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&h(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let m=this.normalize(p,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let m in this.indexes)p=this.indexes[m],p>=d&&(this.indexes[m]=p-1);return this.markDirty(),this}replaceValues(d,p,m){return m||(m=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,m))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){if(!this.proxyOf.nodes)return;let p=[{iterator:this.getIterator(),node:this.proxyOf}];for(;p.length>0;){let{iterator:m,node:g}=p[p.length-1],v=g.indexes[m];if(v>=g.proxyOf.nodes.length){delete g.indexes[m],p.pop();let _=p[p.length-1];_&&(_.node.indexes[_.iterator]+=1);continue}let y=g.proxyOf.nodes[v],w;try{w=d(y,v)}catch(_){throw y.addToError(_)}if(w===!1){for(let _ of p)delete _.node.indexes[_.iterator];return!1}y.walk&&y.proxyOf.nodes?p.push({iterator:y.getIterator(),node:y}):g.indexes[m]+=1}}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&d.test(m.name))return p(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="atrule")return p(m,g)}))}walkComments(d){return this.walk((p,m)=>{if(p.type==="comment")return d(p,m)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&d.test(m.prop))return p(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="decl")return p(m,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&d.test(m.selector))return p(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="rule")return p(m,g)}))}}return c.registerParse=f=>{o=f},c.registerRule=f=>{u=f},c.registerAtRule=f=>{s=f},c.registerRoot=f=>{l=f},wa=c,c.default=c,c.rebuild=f=>{let d=[f];for(;d.length>0;){let p=d.pop();if(p.type==="atrule"?Object.setPrototypeOf(p,s.prototype):p.type==="rule"?Object.setPrototypeOf(p,u.prototype):p.type==="decl"?Object.setPrototypeOf(p,t.prototype):p.type==="comment"?Object.setPrototypeOf(p,e.prototype):p.type==="root"&&Object.setPrototypeOf(p,l.prototype),p[i]=!0,p.nodes)for(let m of p.nodes)d.push(m)}},wa}var Ra,oh;function _a(){if(oh)return Ra;oh=1;let e=Kt();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Ra=t,t.default=t,e.registerAtRule(t),Ra}var Ta,ah;function Ea(){if(ah)return Ta;ah=1;let e=Kt(),t,r;class n extends e{constructor(s){super(x({type:"document"},s)),this.nodes||(this.nodes=[])}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Ta=n,n.default=n,Ta}var Ia,lh;function ES(){if(lh)return Ia;lh=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ia={nanoid:(n=21)=>{let i="",s=n|0;for(;s-- >0;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s|0;for(;l-- >0;)o+=n[Math.random()*n.length|0];return o}},Ia}var Ca,uh;function ch(){if(uh)return Ca;uh=1;let{existsSync:e,readFileSync:t,realpathSync:r}=Tt,{dirname:n,isAbsolute:i,join:s,relative:o,sep:l}=Tt,{SourceMapConsumer:u,SourceMapGenerator:a}=Tt;function h(d){try{return r(d)}catch(p){return d}}function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class f{constructor(p,m){if(m.map===!1)return;m.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(p),this.inline=this.startWith(this.annotation,"data:");let g=m.map?m.map.prev:void 0,v=this.loadMap(m.from,g);!this.mapFile&&m.from&&(this.mapFile=m.from),this.mapFile&&(this.root=n(this.mapFile)),v&&(this.text=v)}consumer(){return this.consumerCache||(this.consumerCache=new u(this.json||this.text)),this.consumerCache}decodeInline(p){let m=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,v=/^data:application\/json;charset=utf-?8,/,y=/^data:application\/json,/,w=p.match(v)||p.match(y);if(w)return decodeURIComponent(p.substr(w[0].length));let _=p.match(m)||p.match(g);if(_)return c(p.substr(_[0].length));let S=p.slice(22);throw S=S.slice(0,S.indexOf(",")),new Error("Unsupported source map encoding "+S)}getAnnotationURL(p){return p.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(p){return typeof p!="object"?!1:typeof p.mappings=="string"||typeof p._mappings=="string"||Array.isArray(p.sections)}loadAnnotation(p){let m=p.match(/\/\*\s*# sourceMappingURL=/g);if(!m)return;let g=p.lastIndexOf(m.pop()),v=p.indexOf("*/",g);g>-1&&v>-1&&(this.annotation=this.getAnnotationURL(p.substring(g,v)))}loadFile(p,m,g){if(!g&&!this.unsafeMap){if(!/\.map$/i.test(p)||!m)return;let v=o(h(n(m)),h(p));if(v===".."||v.startsWith(".."+l)||i(v))return}if(this.root=n(p),e(p))return this.mapFile=p,t(p,"utf-8").toString().trim()}loadMap(p,m){if(m===!1)return!1;if(m){if(typeof m=="string")return m;if(typeof m=="function"){let g=m(p);if(g){let v=this.loadFile(g,p,!0);if(!v)throw new Error("Unable to load previous source map: "+g.toString());return v}}else{if(m instanceof u)return a.fromSourceMap(m).toString();if(m instanceof a)return m.toString();if(this.isMap(m))return JSON.stringify(m);throw new Error("Unsupported previous source map format: "+m.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;p&&(g=s(n(p),g));let v=this.loadFile(g,p,!1);if(v)try{this.json=JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}catch(y){return}return v}}}startWith(p,m){return p?p.substr(0,m.length)===m:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ca=f,f.default=f,Ca}var Za,dh;function Ai(){if(dh)return Za;dh=1;let{nanoid:e}=ES(),{isAbsolute:t,resolve:r}=Tt,{SourceMapConsumer:n,SourceMapGenerator:i}=Tt,{fileURLToPath:s,pathToFileURL:o}=Tt,l=ma(),u=ch(),a=Tt,h=Symbol("lineToIndexCache"),c=!!(n&&i),f=!!(r&&t);function d(m){if(m[h])return m[h];let g=m.css.split(`
|
|
100
|
-
`),v=new Array(g.length),y=0;for(let w=0,
|
|
101
|
-
`," "];return e.split(t,r)},split(t,r,n){if(typeof t!="string")return[];let i=[],s="",o=!1,l=0,u=!1,a="",h=!1;for(let c of t)h?h=!1:c==="\\"?h=!0:u?c===a&&(u=!1):c==='"'||c==="'"?(u=!0,a=c):c==="("?l+=1:c===")"?l>0&&(l-=1):l===0&&r.includes(c)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=c;return(n||s!=="")&&i.push(s.trim()),i}};return
|
|
99
|
+
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:p}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)},f=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:o(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(a.word){let p=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);p!==-1&&(c=this.positionInside(p),f=this.positionInside(p+a.word.length))}else a.start?c={column:a.start.column,line:a.start.line,offset:o(h,a.start)}:typeof a.index=="number"&&(c=this.positionInside(a.index)),a.end?f={column:a.end.column,line:a.end.line,offset:o(h,a.end)}:typeof a.endIndex=="number"?f=this.positionInside(a.endIndex):typeof a.index=="number"&&(f=this.positionInside(a.index+1));return(f.line<c.line||f.line===c.line&&f.column<=c.column)&&(f={column:c.column+1,line:c.line,offset:c.offset+1}),{end:f,start:c}}raw(a,h){return new t().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,c=!1;for(let f of a)f===this?c=!0:c?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);c||this.remove()}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let c=h==null;h=h||new Map;let f=[],d=[[this,f,0]];for(let m=0;m<d.length;m++){let[g,v,y]=d[m],w={};v[y]=w;for(let R in g){if(!Object.prototype.hasOwnProperty.call(g,R)||R==="parent"||R==="proxyCache")continue;let S=g[R];if(Array.isArray(S)){let b=[];w[R]=b;for(let _=0;_<S.length;_++){let I=S[_];typeof I=="object"&&I.toJSON?I.toJSON===l.prototype.toJSON?d.push([I,b,_]):b[_]=I.toJSON(null,h):b[_]=I}}else if(typeof S=="object"&&S.toJSON)S.toJSON===l.prototype.toJSON?d.push([S,w,R]):w[R]=S.toJSON(null,h);else if(R==="source"){if(S==null)continue;let b=h.get(S.input);b==null&&(b=h.size,h.set(S.input,b)),w[R]={end:S.end,inputId:b,start:S.start}}else w[R]=S}}let p=f[0];return c&&(p.inputs=[...h.keys()].map(m=>m.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=r){a.stringify&&(a=a.stringify);let h="";return a(this,c=>{h+=c}),h}warn(a,h,c={}){let f={node:this};for(let d in c)f[d]=c[d];return a.warn(h,f)}}return Sa=l,l.default=l,Sa}var wa,ih;function Mi(){if(ih)return wa;ih=1;let e=Pi();class t extends e{constructor(n){super(n),this.type="comment"}}return wa=t,t.default=t,wa}var _a,sh;function Ai(){if(sh)return _a;sh=1;let e=Pi();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value!="undefined"&&typeof n.value!="string"&&(n=Y(x({},n),{value:String(n.value)})),super(n),this.type="decl"}}return _a=t,t.default=t,_a}var Ra,oh;function Kt(){if(oh)return Ra;oh=1;let e=Mi(),t=Ai(),r=Pi(),{isClean:n,my:i}=Wi(),s,o,l,u;function a(f){let d=f.slice();for(;d.length>0;){let p=d.pop();if(delete p.source,p.nodes){p.nodes=p.nodes.slice();for(let m of p.nodes)d.push(m)}}return f.slice()}function h(f){let d=[f];for(;d.length>0;){let p=d.pop();if(p[n]=!1,p.proxyOf.nodes)for(let m of p.proxyOf.nodes)d.push(m)}}class c extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...d){for(let p of d){let m=this.normalize(p,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){let p=[this];for(;p.length>0;){let m=p.pop();if(m!==this&&m.cleanRaws!==c.prototype.cleanRaws){m.cleanRaws(d);continue}if(r.prototype.cleanRaws.call(m,d),m.nodes)for(let g of m.nodes)p.push(g)}}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),m,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(m=this.indexes[p],g=d(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...m)=>d[p](...m.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):p==="every"||p==="some"?m=>d[p]((g,...v)=>m(g.toProxy(),...v)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(m=>m.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,m){return d[p]===m||(d[p]=m,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let m=this.index(d),g=this.normalize(p,this.proxyOf.nodes[m]).reverse();m=this.index(d);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],m<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(d,p){let m=this.index(d),g=m===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[m],g).reverse();m=this.index(d);for(let w of v)this.proxyOf.nodes.splice(m,0,w);let y;for(let w in this.indexes)y=this.indexes[w],m<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=a(o(d).nodes);else if(typeof d=="undefined")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value=="undefined")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new t(d)]}else if(d.selector||d.selectors)d=[new u(d)];else if(d.name)d=[new s(d)];else if(d.text)d=[new e(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&h(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let m=this.normalize(p,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let m in this.indexes)p=this.indexes[m],p>=d&&(this.indexes[m]=p-1);return this.markDirty(),this}replaceValues(d,p,m){return m||(m=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,m))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){if(!this.proxyOf.nodes)return;let p=[{iterator:this.getIterator(),node:this.proxyOf}];for(;p.length>0;){let{iterator:m,node:g}=p[p.length-1],v=g.indexes[m];if(v>=g.proxyOf.nodes.length){delete g.indexes[m],p.pop();let R=p[p.length-1];R&&(R.node.indexes[R.iterator]+=1);continue}let y=g.proxyOf.nodes[v],w;try{w=d(y,v)}catch(R){throw y.addToError(R)}if(w===!1){for(let R of p)delete R.node.indexes[R.iterator];return!1}y.walk&&y.proxyOf.nodes?p.push({iterator:y.getIterator(),node:y}):g.indexes[m]+=1}}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&d.test(m.name))return p(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="atrule")return p(m,g)}))}walkComments(d){return this.walk((p,m)=>{if(p.type==="comment")return d(p,m)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&d.test(m.prop))return p(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="decl")return p(m,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&d.test(m.selector))return p(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="rule")return p(m,g)}))}}return c.registerParse=f=>{o=f},c.registerRule=f=>{u=f},c.registerAtRule=f=>{s=f},c.registerRoot=f=>{l=f},Ra=c,c.default=c,c.rebuild=f=>{let d=[f];for(;d.length>0;){let p=d.pop();if(p.type==="atrule"?Object.setPrototypeOf(p,s.prototype):p.type==="rule"?Object.setPrototypeOf(p,u.prototype):p.type==="decl"?Object.setPrototypeOf(p,t.prototype):p.type==="comment"?Object.setPrototypeOf(p,e.prototype):p.type==="root"&&Object.setPrototypeOf(p,l.prototype),p[i]=!0,p.nodes)for(let m of p.nodes)d.push(m)}},Ra}var Ta,ah;function Ea(){if(ah)return Ta;ah=1;let e=Kt();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Ta=t,t.default=t,e.registerAtRule(t),Ta}var Ia,lh;function Ca(){if(lh)return Ia;lh=1;let e=Kt(),t,r;class n extends e{constructor(s){super(x({type:"document"},s)),this.nodes||(this.nodes=[])}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Ia=n,n.default=n,Ia}var Za,uh;function LS(){if(uh)return Za;uh=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Za={nanoid:(n=21)=>{let i="",s=n|0;for(;s-- >0;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s|0;for(;l-- >0;)o+=n[Math.random()*n.length|0];return o}},Za}var La,ch;function dh(){if(ch)return La;ch=1;let{existsSync:e,readFileSync:t,realpathSync:r}=Tt,{dirname:n,isAbsolute:i,join:s,relative:o,sep:l}=Tt,{SourceMapConsumer:u,SourceMapGenerator:a}=Tt;function h(d){try{return r(d)}catch(p){return d}}function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class f{constructor(p,m){if(m.map===!1)return;m.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(p),this.inline=this.startWith(this.annotation,"data:");let g=m.map?m.map.prev:void 0,v=this.loadMap(m.from,g);!this.mapFile&&m.from&&(this.mapFile=m.from),this.mapFile&&(this.root=n(this.mapFile)),v&&(this.text=v)}consumer(){return this.consumerCache||(this.consumerCache=new u(this.json||this.text)),this.consumerCache}decodeInline(p){let m=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,v=/^data:application\/json;charset=utf-?8,/,y=/^data:application\/json,/,w=p.match(v)||p.match(y);if(w)return decodeURIComponent(p.substr(w[0].length));let R=p.match(m)||p.match(g);if(R)return c(p.substr(R[0].length));let S=p.slice(22);throw S=S.slice(0,S.indexOf(",")),new Error("Unsupported source map encoding "+S)}getAnnotationURL(p){return p.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(p){return typeof p!="object"?!1:typeof p.mappings=="string"||typeof p._mappings=="string"||Array.isArray(p.sections)}loadAnnotation(p){let m=p.match(/\/\*\s*# sourceMappingURL=/g);if(!m)return;let g=p.lastIndexOf(m.pop()),v=p.indexOf("*/",g);g>-1&&v>-1&&(this.annotation=this.getAnnotationURL(p.substring(g,v)))}loadFile(p,m,g){if(!g&&!this.unsafeMap){if(!/\.map$/i.test(p)||!m)return;let v=o(h(n(m)),h(p));if(v===".."||v.startsWith(".."+l)||i(v))return}if(this.root=n(p),e(p))return this.mapFile=p,t(p,"utf-8").toString().trim()}loadMap(p,m){if(m===!1)return!1;if(m){if(typeof m=="string")return m;if(typeof m=="function"){let g=m(p);if(g){let v=this.loadFile(g,p,!0);if(!v)throw new Error("Unable to load previous source map: "+g.toString());return v}}else{if(m instanceof u)return a.fromSourceMap(m).toString();if(m instanceof a)return m.toString();if(this.isMap(m))return JSON.stringify(m);throw new Error("Unsupported previous source map format: "+m.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;p&&(g=s(n(p),g));let v=this.loadFile(g,p,!1);if(v)try{this.json=JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}catch(y){return}return v}}}startWith(p,m){return p?p.substr(0,m.length)===m:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return La=f,f.default=f,La}var xa,hh;function Ui(){if(hh)return xa;hh=1;let{nanoid:e}=LS(),{isAbsolute:t,resolve:r}=Tt,{SourceMapConsumer:n,SourceMapGenerator:i}=Tt,{fileURLToPath:s,pathToFileURL:o}=Tt,l=ya(),u=dh(),a=Tt,h=Symbol("lineToIndexCache"),c=!!(n&&i),f=!!(r&&t);function d(m){if(m[h])return m[h];let g=m.css.split(`
|
|
100
|
+
`),v=new Array(g.length),y=0;for(let w=0,R=g.length;w<R;w++)v[w]=y,y+=g[w].length+1;return m[h]=v,v}class p{get from(){return this.file||this.id}constructor(g,v={}){if(g===null||typeof g=="undefined"||typeof g=="object"&&!g.toString)throw new Error(`PostCSS received ${g} instead of CSS string`);if(this.css=g.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,v.document&&(this.document=v.document.toString()),v.from&&(!f||/^\w+:\/\//.test(v.from)||t(v.from)?this.file=v.from:this.file=r(v.from)),f&&c){let y=new u(this.css,v);if(y.text){this.map=y;let w=y.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(g,v,y,w={}){let R,S,b,_,I;if(v&&typeof v=="object"){let C=v,O=y;if(typeof C.offset=="number"){_=C.offset;let V=this.fromOffset(_);v=V.line,y=V.col}else v=C.line,y=C.column,_=this.fromLineAndColumn(v,y);if(typeof O.offset=="number"){b=O.offset;let V=this.fromOffset(b);S=V.line,R=V.col}else S=O.line,R=O.column,b=this.fromLineAndColumn(O.line,O.column)}else if(y)_=this.fromLineAndColumn(v,y);else{_=v;let C=this.fromOffset(_);v=C.line,y=C.col}let E=this.origin(v,y,S,R);return E?I=new l(g,E.endLine===void 0?E.line:{column:E.column,line:E.line},E.endLine===void 0?E.column:{column:E.endColumn,line:E.endLine},E.source,E.file,w.plugin):I=new l(g,S===void 0?v:{column:y,line:v},S===void 0?y:{column:R,line:S},this.css,this.file,w.plugin),I.input={column:y,endColumn:R,endLine:S,endOffset:b,line:v,offset:_,source:this.css},this.file&&(o&&(I.input.url=o(this.file).toString()),I.input.file=this.file),I}fromLineAndColumn(g,v){return d(this)[g-1]+v-1}fromOffset(g){let v=d(this),y=v[v.length-1],w=0;if(g>=y)w=v.length-1;else{let R=v.length-2,S;for(;w<R;)if(S=w+(R-w>>1),g<v[S])R=S-1;else if(g>=v[S+1])w=S+1;else{w=S;break}}return{col:g-v[w]+1,line:w+1}}mapResolve(g){return/^\w+:\/\//.test(g)?g:r(this.map.consumer().sourceRoot||this.map.root||".",g)}origin(g,v,y,w){if(!this.map)return!1;let R=this.map.consumer(),S=R.originalPositionFor({column:v-1,line:g});if(!S.source)return!1;let b;if(typeof y=="number"){let C=R.originalPositionFor({column:w-1,line:y});C.source&&(b=C)}let _;t(S.source)?_=o(S.source):_=new URL(S.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let I={column:S.column+1,endColumn:b&&b.column+1,endLine:b&&b.line,line:S.line,url:_.toString()};if(_.protocol==="file:")if(s)I.file=s(_);else throw new Error("file: protocol is not available in this PostCSS build");let E=R.sourceContentFor(S.source);return E&&(I.source=E),I}toJSON(){let g={};for(let v of["hasBOM","css","file","id"])this[v]!=null&&(g[v]=this[v]);return this.map&&(g.map=x({},this.map),g.map.consumerCache&&(g.map.consumerCache=void 0)),g}}return xa=p,p.default=p,a&&a.registerInput&&a.registerInput(p),xa}var Na,fh;function bn(){if(fh)return Na;fh=1;let e=Kt(),t,r;class n extends e{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let u=new Set;for(let h of Array.isArray(s)?s:[s])h&&typeof h=="object"&&!h.parent&&h.raws&&typeof h.raws.before!="undefined"&&u.add(h.raws);let a=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let h of a)u.has(h.raws)||(h.raws.before=o.raws.before)}return a}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Na=n,n.default=n,e.registerRoot(n),Na}var Oa,ph;function mh(){if(ph)return Oa;ph=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
101
|
+
`," "];return e.split(t,r)},split(t,r,n){if(typeof t!="string")return[];let i=[],s="",o=!1,l=0,u=!1,a="",h=!1;for(let c of t)h?h=!1:c==="\\"?h=!0:u?c===a&&(u=!1):c==='"'||c==="'"?(u=!0,a=c):c==="("?l+=1:c===")"?l>0&&(l-=1):l===0&&r.includes(c)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=c;return(n||s!=="")&&i.push(s.trim()),i}};return Oa=e,e.default=e,Oa}var Ga,gh;function Va(){if(gh)return Ga;gh=1;let e=Kt(),t=mh();class r extends e{get selectors(){return t.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}}return Ga=r,r.default=r,e.registerRule(r),Ga}var ka,yh;function xS(){if(yh)return ka;yh=1;let e=Ea(),t=Mi(),r=Ai(),n=Ui(),i=dh(),s=bn(),o=Va();function l(h,c){return h.inputs?h.inputs.map(f=>{let d=Y(x({},f),{__proto__:n.prototype});return d.map&&(d.map=Y(x({},d.map),{__proto__:i.prototype})),d}):c}function u(h,c,f){let d=x({},h);if(delete d.inputs,delete d.nodes,d.source){let m=d.source,{inputId:g}=m,v=rt(m,["inputId"]);d.source=v,g!=null&&(d.source.input=c[g])}let p;if(d.type==="root")p=new s(d);else if(d.type==="decl")p=new r(d);else if(d.type==="rule")p=new o(d);else if(d.type==="comment")p=new t(d);else if(d.type==="atrule")p=new e(d);else throw new Error("Unknown node type: "+h.type);if(f){p.nodes=f;for(let g of f)g.parent=p}return p}function a(h,c){if(Array.isArray(h))return h.map(p=>a(p));let f,d=[{childIndex:0,children:[],inputs:l(h,c),json:h}];for(;d.length>0;){let p=d[d.length-1],m=p.json.nodes;if(m&&p.childIndex<m.length){let v=m[p.childIndex];p.childIndex+=1,d.push({childIndex:0,children:[],inputs:l(v,p.inputs),json:v});continue}d.pop();let g=u(p.json,p.inputs,m?p.children:void 0);d.length>0?d[d.length-1].children.push(g):f=g}return f}return ka=a,a.default=a,ka}var Xa,bh;function vh(){if(bh)return Xa;bh=1;let{dirname:e,relative:t,resolve:r,sep:n}=Tt,{SourceMapConsumer:i,SourceMapGenerator:s}=Tt,{pathToFileURL:o}=Tt,l=Ui(),u=!!(i&&s),a=!!(e&&r&&t&&n);class h{constructor(f,d,p,m){this.stringify=f,this.mapOpts=p.map||{},this.root=d,this.opts=p,this.css=m,this.originalCSS=m,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let d=`
|
|
102
102
|
`;this.css.includes(`\r
|
|
103
103
|
`)&&(d=`\r
|
|
104
104
|
`),this.css+=d+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let d=this.toUrl(this.path(f.file)),p=f.root||e(f.file),m;this.mapOpts.sourcesContent===!1?(m=new i(f.text),m.sourcesContent&&(m.sourcesContent=null)):m=f.consumer(),this.map.applySourceMap(m,d,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let f;for(let d=this.root.nodes.length-1;d>=0;d--)f=this.root.nodes[d],f.type==="comment"&&f.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(d)}else if(this.css){let f;for(;(f=this.css.lastIndexOf("/*#"))!==-1;){let d=this.css.indexOf("*/",f+3);if(d===-1)break;for(;f>0&&this.css[f-1]===`
|
|
105
|
-
`;)f--;this.css=this.css.slice(0,f)+this.css.slice(d+2)}}}}generate(){if(this.clearAnnotation(),a&&u&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=s.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,
|
|
106
|
-
`),d=y.length-g):d+=y.length,w&&_!=="start"){let S=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==S.last||S.raws.semicolon)&&(w.source&&w.source.end?(m.source=this.sourcePath(w),m.original.line=w.source.end.line,m.original.column=w.source.end.column-1,m.generated.line=f,m.generated.column=d-2,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=d-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(r(p,this.mapOpts.annotation)));let m=t(p,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let m=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(m,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(o){let p=o(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;n==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return Va=h,Va}var ka,vh;function CS(){if(vh)return ka;vh=1;const e=39,t=34,r=92,n=47,i=10,s=32,o=12,l=9,u=13,a=91,h=93,c=40,f=41,d=123,p=125,m=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return ka=function(I,E={}){let C=I.css.valueOf(),O=E.ignoreErrors,V,q,Z,T,W,k,P,M,B,$,te=C.length,N=0,ye=[],he=[],ve=-1;function U(){return N}function D(K){throw I.error("Unclosed "+K,N)}function J(){return he.length===0&&N>=te}function Q(K){if(he.length)return he.pop();if(N>=te)return;let se=K?K.ignoreUnclosed:!1;switch(V=C.charCodeAt(N),V){case i:case s:case l:case u:case o:{T=N;do T+=1,V=C.charCodeAt(T);while(V===s||V===i||V===l||V===u||V===o);k=["space",C.slice(N,T)],N=T-1;break}case a:case h:case d:case p:case v:case m:case f:{let ce=String.fromCharCode(V);k=[ce,ce,N];break}case c:{if($=ye.length?ye.pop()[1]:"",B=C.charCodeAt(N+1),$==="url"&&B!==e&&B!==t&&B!==s&&B!==i&&B!==l&&B!==o&&B!==u){T=N;do{if(P=!1,T=C.indexOf(")",T+1),T===-1)if(O||se){T=N;break}else D("bracket");for(M=T;C.charCodeAt(M-1)===r;)M-=1,P=!P}while(P);k=["brackets",C.slice(N,T+1),N,T],N=T}else N<=ve?k=["(","(",N]:(T=C.indexOf(")",N+1),q=C.slice(N,T+1),T===-1||S.test(q)?(ve=T===-1?te:T,k=["(","(",N]):(k=["brackets",q,N,T],N=T));break}case e:case t:{W=V===e?"'":'"',T=N;do{if(P=!1,T=C.indexOf(W,T+1),T===-1)if(O||se){T=N+1;break}else D("string");for(M=T;C.charCodeAt(M-1)===r;)M-=1,P=!P}while(P);k=["string",C.slice(N,T+1),N,T],N=T;break}case y:{w.lastIndex=N+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,k=["at-word",C.slice(N,T+1),N,T],N=T;break}case r:{for(T=N,Z=!0;C.charCodeAt(T+1)===r;)T+=1,Z=!Z;if(V=C.charCodeAt(T+1),Z&&V!==n&&V!==s&&V!==i&&V!==l&&V!==u&&V!==o&&(T+=1,b.test(C.charAt(T)))){for(;b.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===s&&(T+=1)}k=["word",C.slice(N,T+1),N,T],N=T;break}default:{V===n&&C.charCodeAt(N+1)===g?(T=C.indexOf("*/",N+2)+1,T===0&&(O||se?T=C.length:D("comment")),k=["comment",C.slice(N,T+1),N,T],N=T):(_.lastIndex=N+1,_.test(C),_.lastIndex===0?T=C.length-1:T=_.lastIndex-2,k=["word",C.slice(N,T+1),N,T],ye.push(k),N=T);break}}return N++,k}function re(K){he.push(K)}return{back:re,endOfFile:J,nextToken:Q,position:U}},ka}var Xa,Sh;function ZS(){if(Sh)return Xa;Sh=1;let e=_a(),t=Pi(),r=Mi(),n=bn(),i=Oa(),s=CS();const o={empty:!0,space:!0};function l(h){for(let c=h.length-1;c>=0;c--){let f=h[c],d=f[3]||f[2];if(d)return d}}function u(h,c,f){let d="";for(let p=c;p<f;p++)d+=h[p][1];return d}class a{constructor(c){this.input=c,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let f=new e;f.name=c[1].slice(1),f.name===""&&this.unnamedAtrule(f,c),this.init(f,c[2]);let d,p,m,g=!1,v=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),d=c[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){f.source.end=this.getPosition(c[2]),f.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){v=!0;break}else if(d==="}"){if(y.length>0){for(m=y.length-1,p=y[m];p&&p[0]==="space";)p=y[--m];p&&(f.source.end=this.getPosition(p[3]||p[2]),f.source.end.offset++)}this.end(c);break}else y.push(c);else y.push(c);if(this.tokenizer.endOfFile()){g=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),g&&(c=y[y.length-1],f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),v&&(f.nodes=[],this.current=f)}checkMissedSemicolon(c){let f=this.colon(c);if(f===!1)return;let d=0,p;for(let m=f-1;m>=0&&(p=c[m],!(p[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(c){let f=0,d,p,m;for(let[g,v]of c.entries()){if(p=v,m=p[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!d)this.doubleColon(p);else{if(d[0]==="word"&&d[1]==="progid")continue;return g}d=p}return!1}comment(c){let f=new t;this.init(f,c[2]),f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++;let d=c[1].slice(2,-2);if(!d.trim())f.text="",f.raws.left=d,f.raws.right="";else{let p=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=p[2],f.raws.left=p[1],f.raws.right=p[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(c,f){let d=new r;this.init(d,c[0][2]);let p=c[c.length-1];p[0]===";"&&(this.semicolon=!0,c.pop()),d.source.end=this.getPosition(p[3]||p[2]||l(c)),d.source.end.offset++;let m=0;for(;c[m][0]!=="word";)m===c.length-1&&this.unknownWord([c[m]]),m++;d.raws.before+=u(c,0,m),d.source.start=this.getPosition(c[m][2]);let g=m;for(;m<c.length;){let b=c[m][0];if(b===":"||b==="space"||b==="comment")break;m++}d.prop=u(c,g,m);let v=m,y;for(;m<c.length&&(y=c[m],m++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);d.raws.between=u(c,v,m),(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let w=m;for(;m<c.length;){let b=c[m][0];if(b!=="space"&&b!=="comment")break;m++}let _=c.slice(w,m);c=c.slice(m),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(y=c[b],y[1].toLowerCase()==="!important"){d.important=!0;let R=this.stringFrom(c,b);R=this.spacesFromEnd(c)+R,R!==" !important"&&(d.raws.important=R);break}else if(y[1].toLowerCase()==="important"){let R=c.slice(0),I="";for(let E=b;E>0;E--){let C=R[E][0];if(I.trim().startsWith("!")&&C!=="space")break;I=R.pop()[1]+I}I.trim().startsWith("!")&&(d.important=!0,d.raws.important=I,c=R)}if(y[0]!=="space"&&y[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(d.raws.between+=_.map(b=>b[1]).join(""),_=[]),this.raw(d,"value",_.concat(c),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let f=new i;this.init(f,c[2]),f.selector="",f.raws.between="",this.current=f}end(c){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(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}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(c){if(this.spaces+=c[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="",f.source.end=this.getPosition(c[2]),f.source.end.offset+=f.raws.ownSemicolon.length)}}getPosition(c){let f=this.input.fromOffset(c);return{column:f.col,line:f.line,offset:c}}init(c,f){this.current.push(c),c.source={input:this.input,start:this.getPosition(f)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let f=!1,d=null,p=!1,m=null,g=[],v=c[1].startsWith("--"),y=[],w=c;for(;w;){if(d=w[0],y.push(w),d==="("||d==="[")m||(m=w),g.push(d==="("?")":"]");else if(v&&p&&d==="{")m||(m=w),g.push("}");else if(g.length===0)if(d===";")if(p){this.decl(y,v);return}else break;else if(d==="{"){this.rule(y);return}else if(d==="}"){this.tokenizer.back(y.pop()),f=!0;break}else d===":"&&(p=!0);else d===g[g.length-1]&&(g.pop(),g.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),g.length>0&&this.unclosedBracket(m),f&&p){if(!v)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,v)}else this.unknownWord(y)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,f,d,p){let m,g,v=d.length,y="",w=!0,_,S;for(let b=0;b<v;b+=1)m=d[b],g=m[0],g==="space"&&b===v-1&&!p?w=!1:g==="comment"?(S=d[b-1]?d[b-1][0]:"empty",_=d[b+1]?d[b+1][0]:"empty",!o[S]&&!o[_]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let b=d.reduce((R,I)=>R+I[1],"");c.raws[f]={raw:b,value:y}}c[f]=y}rule(c){c.pop();let f=new i;this.init(f,c[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(f,"selector",c),this.current=f}spacesAndCommentsFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)d=c.pop()[1]+d;return d}spacesAndCommentsFromStart(c){let f,d="";for(;c.length&&(f=c[0][0],!(f!=="space"&&f!=="comment"));)d+=c.shift()[1];return d}spacesFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],f==="space");)d=c.pop()[1]+d;return d}stringFrom(c,f){let d="";for(let p=f;p<c.length;p++)d+=c[p][1];return c.splice(f,c.length-f),d}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return Xa=a,Xa}var Wa,wh;function Pa(){if(wh)return Wa;wh=1;let e=Kt(),t=Ai(),r=ZS();function n(i,s){let o=new t(i,s),l=new r(o);try{l.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?u.message+=`
|
|
105
|
+
`;)f--;this.css=this.css.slice(0,f)+this.css.slice(d+2)}}}}generate(){if(this.clearAnnotation(),a&&u&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=s.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,R)=>{if(this.css+=y,w&&R!=="end"&&(m.generated.line=f,m.generated.column=d-1,w.source&&w.source.start?(m.source=this.sourcePath(w),m.original.line=w.source.start.line,m.original.column=w.source.start.column-1,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,this.map.addMapping(m))),v=y.match(/\n/g),v?(f+=v.length,g=y.lastIndexOf(`
|
|
106
|
+
`),d=y.length-g):d+=y.length,w&&R!=="start"){let S=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==S.last||S.raws.semicolon)&&(w.source&&w.source.end?(m.source=this.sourcePath(w),m.original.line=w.source.end.line,m.original.column=w.source.end.column-1,m.generated.line=f,m.generated.column=d-2,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=d-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(r(p,this.mapOpts.annotation)));let m=t(p,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let m=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(m,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(o){let p=o(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;n==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return Xa=h,Xa}var Wa,Sh;function NS(){if(Sh)return Wa;Sh=1;const e=39,t=34,r=92,n=47,i=10,s=32,o=12,l=9,u=13,a=91,h=93,c=40,f=41,d=123,p=125,m=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Wa=function(I,E={}){let C=I.css.valueOf(),O=E.ignoreErrors,V,q,Z,T,W,k,P,M,B,$,te=C.length,N=0,ye=[],he=[],ve=-1;function U(){return N}function D(K){throw I.error("Unclosed "+K,N)}function J(){return he.length===0&&N>=te}function Q(K){if(he.length)return he.pop();if(N>=te)return;let se=K?K.ignoreUnclosed:!1;switch(V=C.charCodeAt(N),V){case i:case s:case l:case u:case o:{T=N;do T+=1,V=C.charCodeAt(T);while(V===s||V===i||V===l||V===u||V===o);k=["space",C.slice(N,T)],N=T-1;break}case a:case h:case d:case p:case v:case m:case f:{let ce=String.fromCharCode(V);k=[ce,ce,N];break}case c:{if($=ye.length?ye.pop()[1]:"",B=C.charCodeAt(N+1),$==="url"&&B!==e&&B!==t&&B!==s&&B!==i&&B!==l&&B!==o&&B!==u){T=N;do{if(P=!1,T=C.indexOf(")",T+1),T===-1)if(O||se){T=N;break}else D("bracket");for(M=T;C.charCodeAt(M-1)===r;)M-=1,P=!P}while(P);k=["brackets",C.slice(N,T+1),N,T],N=T}else N<=ve?k=["(","(",N]:(T=C.indexOf(")",N+1),q=C.slice(N,T+1),T===-1||S.test(q)?(ve=T===-1?te:T,k=["(","(",N]):(k=["brackets",q,N,T],N=T));break}case e:case t:{W=V===e?"'":'"',T=N;do{if(P=!1,T=C.indexOf(W,T+1),T===-1)if(O||se){T=N+1;break}else D("string");for(M=T;C.charCodeAt(M-1)===r;)M-=1,P=!P}while(P);k=["string",C.slice(N,T+1),N,T],N=T;break}case y:{w.lastIndex=N+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,k=["at-word",C.slice(N,T+1),N,T],N=T;break}case r:{for(T=N,Z=!0;C.charCodeAt(T+1)===r;)T+=1,Z=!Z;if(V=C.charCodeAt(T+1),Z&&V!==n&&V!==s&&V!==i&&V!==l&&V!==u&&V!==o&&(T+=1,b.test(C.charAt(T)))){for(;b.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===s&&(T+=1)}k=["word",C.slice(N,T+1),N,T],N=T;break}default:{V===n&&C.charCodeAt(N+1)===g?(T=C.indexOf("*/",N+2)+1,T===0&&(O||se?T=C.length:D("comment")),k=["comment",C.slice(N,T+1),N,T],N=T):(R.lastIndex=N+1,R.test(C),R.lastIndex===0?T=C.length-1:T=R.lastIndex-2,k=["word",C.slice(N,T+1),N,T],ye.push(k),N=T);break}}return N++,k}function re(K){he.push(K)}return{back:re,endOfFile:J,nextToken:Q,position:U}},Wa}var Pa,wh;function OS(){if(wh)return Pa;wh=1;let e=Ea(),t=Mi(),r=Ai(),n=bn(),i=Va(),s=NS();const o={empty:!0,space:!0};function l(h){for(let c=h.length-1;c>=0;c--){let f=h[c],d=f[3]||f[2];if(d)return d}}function u(h,c,f){let d="";for(let p=c;p<f;p++)d+=h[p][1];return d}class a{constructor(c){this.input=c,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let f=new e;f.name=c[1].slice(1),f.name===""&&this.unnamedAtrule(f,c),this.init(f,c[2]);let d,p,m,g=!1,v=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),d=c[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){f.source.end=this.getPosition(c[2]),f.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){v=!0;break}else if(d==="}"){if(y.length>0){for(m=y.length-1,p=y[m];p&&p[0]==="space";)p=y[--m];p&&(f.source.end=this.getPosition(p[3]||p[2]),f.source.end.offset++)}this.end(c);break}else y.push(c);else y.push(c);if(this.tokenizer.endOfFile()){g=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),g&&(c=y[y.length-1],f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),v&&(f.nodes=[],this.current=f)}checkMissedSemicolon(c){let f=this.colon(c);if(f===!1)return;let d=0,p;for(let m=f-1;m>=0&&(p=c[m],!(p[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(c){let f=0,d,p,m;for(let[g,v]of c.entries()){if(p=v,m=p[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!d)this.doubleColon(p);else{if(d[0]==="word"&&d[1]==="progid")continue;return g}d=p}return!1}comment(c){let f=new t;this.init(f,c[2]),f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++;let d=c[1].slice(2,-2);if(!d.trim())f.text="",f.raws.left=d,f.raws.right="";else{let p=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=p[2],f.raws.left=p[1],f.raws.right=p[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(c,f){let d=new r;this.init(d,c[0][2]);let p=c[c.length-1];p[0]===";"&&(this.semicolon=!0,c.pop()),d.source.end=this.getPosition(p[3]||p[2]||l(c)),d.source.end.offset++;let m=0;for(;c[m][0]!=="word";)m===c.length-1&&this.unknownWord([c[m]]),m++;d.raws.before+=u(c,0,m),d.source.start=this.getPosition(c[m][2]);let g=m;for(;m<c.length;){let b=c[m][0];if(b===":"||b==="space"||b==="comment")break;m++}d.prop=u(c,g,m);let v=m,y;for(;m<c.length&&(y=c[m],m++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);d.raws.between=u(c,v,m),(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let w=m;for(;m<c.length;){let b=c[m][0];if(b!=="space"&&b!=="comment")break;m++}let R=c.slice(w,m);c=c.slice(m),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(y=c[b],y[1].toLowerCase()==="!important"){d.important=!0;let _=this.stringFrom(c,b);_=this.spacesFromEnd(c)+_,_!==" !important"&&(d.raws.important=_);break}else if(y[1].toLowerCase()==="important"){let _=c.slice(0),I="";for(let E=b;E>0;E--){let C=_[E][0];if(I.trim().startsWith("!")&&C!=="space")break;I=_.pop()[1]+I}I.trim().startsWith("!")&&(d.important=!0,d.raws.important=I,c=_)}if(y[0]!=="space"&&y[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(d.raws.between+=R.map(b=>b[1]).join(""),R=[]),this.raw(d,"value",R.concat(c),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let f=new i;this.init(f,c[2]),f.selector="",f.raws.between="",this.current=f}end(c){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(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}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(c){if(this.spaces+=c[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="",f.source.end=this.getPosition(c[2]),f.source.end.offset+=f.raws.ownSemicolon.length)}}getPosition(c){let f=this.input.fromOffset(c);return{column:f.col,line:f.line,offset:c}}init(c,f){this.current.push(c),c.source={input:this.input,start:this.getPosition(f)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let f=!1,d=null,p=!1,m=null,g=[],v=c[1].startsWith("--"),y=[],w=c;for(;w;){if(d=w[0],y.push(w),d==="("||d==="[")m||(m=w),g.push(d==="("?")":"]");else if(v&&p&&d==="{")m||(m=w),g.push("}");else if(g.length===0)if(d===";")if(p){this.decl(y,v);return}else break;else if(d==="{"){this.rule(y);return}else if(d==="}"){this.tokenizer.back(y.pop()),f=!0;break}else d===":"&&(p=!0);else d===g[g.length-1]&&(g.pop(),g.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),g.length>0&&this.unclosedBracket(m),f&&p){if(!v)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,v)}else this.unknownWord(y)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,f,d,p){let m,g,v=d.length,y="",w=!0,R,S;for(let b=0;b<v;b+=1)m=d[b],g=m[0],g==="space"&&b===v-1&&!p?w=!1:g==="comment"?(S=d[b-1]?d[b-1][0]:"empty",R=d[b+1]?d[b+1][0]:"empty",!o[S]&&!o[R]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let b=d.reduce((_,I)=>_+I[1],"");c.raws[f]={raw:b,value:y}}c[f]=y}rule(c){c.pop();let f=new i;this.init(f,c[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(f,"selector",c),this.current=f}spacesAndCommentsFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)d=c.pop()[1]+d;return d}spacesAndCommentsFromStart(c){let f,d="";for(;c.length&&(f=c[0][0],!(f!=="space"&&f!=="comment"));)d+=c.shift()[1];return d}spacesFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],f==="space");)d=c.pop()[1]+d;return d}stringFrom(c,f){let d="";for(let p=f;p<c.length;p++)d+=c[p][1];return c.splice(f,c.length-f),d}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return Pa=a,Pa}var Ma,_h;function Aa(){if(_h)return Ma;_h=1;let e=Kt(),t=Ui(),r=OS();function n(i,s){let o=new t(i,s),l=new r(o);try{l.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?u.message+=`
|
|
107
107
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?u.message+=`
|
|
108
108
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(u.message+=`
|
|
109
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return l.root}return Wa=n,n.default=n,e.registerParse(n),Wa}var Ma,Rh;function _h(){if(Rh)return Ma;Rh=1;let e=Kt(),{my:t}=Xi();class r{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){s.node[t]||e.rebuild(s.node);let o=s.node.rangeBy(s);this.line=o.start.line,this.column=o.start.column,this.endLine=o.end.line,this.endColumn=o.end.column}for(let o in s)this[o]=s[o]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ma=r,r.default=r,Ma}var Aa,Th;function Ua(){if(Th)return Aa;Th=1;let e=_h();class t{get content(){return this.css}constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new e(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}}return Aa=t,t.default=t,Aa}var Da,Eh;function Ih(){if(Eh)return Da;Eh=1;let e={};return Da=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Da}var Fa,Ch;function Zh(){if(Ch)return Fa;Ch=1;let e=Kt(),t=Ea(),r=bh(),n=Pa(),i=Ua(),s=bn(),o=Vi(),{isClean:l,my:u}=Xi(),a=Ih();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(_){return typeof _=="object"&&typeof _.then=="function"}function m(_){let S=!1,b=h[_.type];return _.type==="decl"?S=_.prop.toLowerCase():_.type==="atrule"&&(S=_.name.toLowerCase()),S&&_.append?[b,b+"-"+S,d,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:_.append?[b,d,b+"Exit"]:[b,b+"Exit"]}function g(_){let S;return _.type==="document"?S=["Document",d,"DocumentExit"]:_.type==="root"?S=["Root",d,"RootExit"]:S=m(_),{eventIndex:0,events:S,iterator:0,node:_,visitorIndex:0,visitors:[]}}function v(_){let S=[_];for(;S.length>0;){let b=S.pop();if(b[l]=!1,b.nodes)for(let R of b.nodes)S.push(R)}return _}let y={};class w{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(S,b,R){this.stringified=!1,this.processed=!1;let I;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))I=v(b);else if(b instanceof w||b instanceof i)I=v(b.root),b.map&&(typeof R.map=="undefined"&&(R.map={}),R.map.inline||(R.map.inline=!1),R.map.prev=b.map);else{let E=n;R.syntax&&(E=R.syntax.parse),R.parser&&(E=R.parser),E.parse&&(E=E.parse);try{I=E(b,R)}catch(C){this.processed=!0,this.error=C}I&&!I[u]&&e.rebuild(I)}this.result=new i(S,I,R),this.helpers=Y(x({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?x(x({},E),E.prepare(this.result)):E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let R=this.result.lastPlugin;try{if(b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=R.postcssPlugin,S.setMessage();else if(R.postcssVersion&&process.env.NODE_ENV!=="production"){let I=R.postcssPlugin,E=R.postcssVersion,C=this.result.processor.version,O=E.split("."),V=C.split(".");(O[0]!==V[0]||parseInt(O[1])>parseInt(V[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+C+", but "+I+" uses "+E+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(b,R,I)=>{this.listeners[R]||(this.listeners[R]=[]),this.listeners[R].push([b,I])};for(let b of this.plugins)if(typeof b=="object")for(let R in b){if(!c[R]&&/^[A-Z]/.test(R))throw new Error(`Unknown event ${R} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[R])if(typeof b[R]=="object")for(let I in b[R])I==="*"?S(b,R,b[R][I]):S(b,R+"-"+I.toLowerCase(),b[R][I]);else typeof b[R]=="function"&&S(b,R,b[R])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return z(this,null,function*(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],R=this.runOnRoot(b);if(p(R))try{yield R}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];){S[l]=!0;let b=[g(S)];for(;b.length>0;){let R=this.visitTick(b);if(p(R))try{yield R}catch(I){let E=b[b.length-1].node;throw this.handleError(I,E)}}}if(this.listeners.OnceExit)for(let[b,R]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let I=S.nodes.map(E=>R(E,this.helpers));yield Promise.all(I)}else yield R(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()})}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(R=>S.Once(R,this.helpers));return p(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=o;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let R=this.result.root.source;if(S.map===void 0&&!(R&&R.input&&R.input.map)){let C="";return b(this.result.root,O=>{C+=O}),this.result.css=C,this.result}let E=new r(b,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[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 S of this.plugins){let b=this.runOnRoot(S);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];)S[l]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return process.env.NODE_ENV!=="production"&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[R,I]of S){this.result.lastPlugin=R;let E;try{E=I(b,this.helpers)}catch(C){throw this.handleError(C,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(E))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:R,visitors:I}=b;if(R.type!=="root"&&R.type!=="document"&&!R.parent){S.pop();return}if(I.length>0&&b.visitorIndex<I.length){let[C,O]=I[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===I.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=C;try{return O(R.toProxy(),this.helpers)}catch(V){throw this.handleError(V,R)}}if(b.iterator!==0){let C=b.iterator;b.descending&&(b.descending=!1,R.indexes[C]+=1);let O;for(;O=R.nodes[R.indexes[C]];){if(!O[l]){O[l]=!0,b.descending=!0,S.push(g(O));return}R.indexes[C]+=1}b.iterator=0,delete R.indexes[C]}let E=b.events;for(;b.eventIndex<E.length;){let C=E[b.eventIndex];if(b.eventIndex+=1,C===d){R.nodes&&R.nodes.length&&(R[l]=!0,b.iterator=R.getIterator());return}else if(this.listeners[C]){b.visitors=this.listeners[C];return}}S.pop()}walkSync(S){S[l]=!0;let b=[{eventIndex:0,events:m(S),iterator:0,node:S}];for(;b.length>0;){let R=b[b.length-1],I=R.node;if(R.iterator!==0){let E=R.iterator;R.descending&&(R.descending=!1,I.indexes[E]+=1);let C,O=!1;for(;C=I.nodes[I.indexes[E]];){if(!C[l]){C[l]=!0,R.descending=!0,b.push({eventIndex:0,events:m(C),iterator:0,node:C}),O=!0;break}I.indexes[E]+=1}if(O)continue;R.iterator=0,delete I.indexes[E]}if(R.eventIndex<R.events.length){let E=R.events[R.eventIndex];if(R.eventIndex+=1,E===d)I.nodes&&I.nodes.length&&(R.iterator=I.getIterator());else{let C=this.listeners[E];C&&this.visitSync(C,I.toProxy())&&b.pop()}continue}b.pop()}}warnings(){return this.sync().warnings()}}return w.registerPostcss=_=>{y=_},Fa=w,w.default=w,s.registerLazyResult(w),t.registerLazyResult(w),Fa}var Ja,Lh;function LS(){if(Lh)return Ja;Lh=1;let e=bh(),t=Pa(),r=Ua(),n=Vi(),i=Ih();class s{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 l,u=t;try{l=u(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,u,a){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=a,this._map=void 0;let h=n;this.result=new r(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new e(h,void 0,this._opts,u);if(f.isMap()){let[d,p]=f.generate();d&&(this.result.css=d),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(l,u)}toString(){return this._css}warnings(){return[]}}return Ja=s,s.default=s,Ja}var Ha,xh;function xS(){if(xh)return Ha;xh=1;let e=Ea(),t=Zh(),r=LS(),n=bn();class i{constructor(o=[]){this.version="8.5.26",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(typeof u=="object"&&(u.parse||u.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Ha=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),Ha}var Ya,Nh;function NS(){if(Nh)return Ya;Nh=1;let e=_a(),t=Pi(),r=Kt(),n=ma(),i=Mi(),s=Ea(),o=IS(),l=Ai(),u=Zh(),a=ph(),h=Wi(),c=Pa(),f=xS(),d=Ua(),p=bn(),m=Oa(),g=Vi(),v=_h();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new f(w)}return y.plugin=function(_,S){let b=!1;function R(...E){console&&console.warn&&!b&&(b=!0,console.warn(_+`: postcss.plugin was deprecated. Migration guide:
|
|
110
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
111
|
-
https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=
|
|
109
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return l.root}return Ma=n,n.default=n,e.registerParse(n),Ma}var Ua,Rh;function Th(){if(Rh)return Ua;Rh=1;let e=Kt(),{my:t}=Wi();class r{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){s.node[t]||e.rebuild(s.node);let o=s.node.rangeBy(s);this.line=o.start.line,this.column=o.start.column,this.endLine=o.end.line,this.endColumn=o.end.column}for(let o in s)this[o]=s[o]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ua=r,r.default=r,Ua}var Da,Eh;function Fa(){if(Eh)return Da;Eh=1;let e=Th();class t{get content(){return this.css}constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new e(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}}return Da=t,t.default=t,Da}var Ja,Ih;function Ch(){if(Ih)return Ja;Ih=1;let e={};return Ja=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Ja}var Ha,Zh;function Lh(){if(Zh)return Ha;Zh=1;let e=Kt(),t=Ca(),r=vh(),n=Aa(),i=Fa(),s=bn(),o=ki(),{isClean:l,my:u}=Wi(),a=Ch();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(R){return typeof R=="object"&&typeof R.then=="function"}function m(R){let S=!1,b=h[R.type];return R.type==="decl"?S=R.prop.toLowerCase():R.type==="atrule"&&(S=R.name.toLowerCase()),S&&R.append?[b,b+"-"+S,d,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:R.append?[b,d,b+"Exit"]:[b,b+"Exit"]}function g(R){let S;return R.type==="document"?S=["Document",d,"DocumentExit"]:R.type==="root"?S=["Root",d,"RootExit"]:S=m(R),{eventIndex:0,events:S,iterator:0,node:R,visitorIndex:0,visitors:[]}}function v(R){let S=[R];for(;S.length>0;){let b=S.pop();if(b[l]=!1,b.nodes)for(let _ of b.nodes)S.push(_)}return R}let y={};class w{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(S,b,_){this.stringified=!1,this.processed=!1;let I;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))I=v(b);else if(b instanceof w||b instanceof i)I=v(b.root),b.map&&(typeof _.map=="undefined"&&(_.map={}),_.map.inline||(_.map.inline=!1),_.map.prev=b.map);else{let E=n;_.syntax&&(E=_.syntax.parse),_.parser&&(E=_.parser),E.parse&&(E=E.parse);try{I=E(b,_)}catch(C){this.processed=!0,this.error=C}I&&!I[u]&&e.rebuild(I)}this.result=new i(S,I,_),this.helpers=Y(x({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?x(x({},E),E.prepare(this.result)):E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let _=this.result.lastPlugin;try{if(b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=_.postcssPlugin,S.setMessage();else if(_.postcssVersion&&process.env.NODE_ENV!=="production"){let I=_.postcssPlugin,E=_.postcssVersion,C=this.result.processor.version,O=E.split("."),V=C.split(".");(O[0]!==V[0]||parseInt(O[1])>parseInt(V[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+C+", but "+I+" uses "+E+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(b,_,I)=>{this.listeners[_]||(this.listeners[_]=[]),this.listeners[_].push([b,I])};for(let b of this.plugins)if(typeof b=="object")for(let _ in b){if(!c[_]&&/^[A-Z]/.test(_))throw new Error(`Unknown event ${_} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[_])if(typeof b[_]=="object")for(let I in b[_])I==="*"?S(b,_,b[_][I]):S(b,_+"-"+I.toLowerCase(),b[_][I]);else typeof b[_]=="function"&&S(b,_,b[_])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return z(this,null,function*(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],_=this.runOnRoot(b);if(p(_))try{yield _}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];){S[l]=!0;let b=[g(S)];for(;b.length>0;){let _=this.visitTick(b);if(p(_))try{yield _}catch(I){let E=b[b.length-1].node;throw this.handleError(I,E)}}}if(this.listeners.OnceExit)for(let[b,_]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let I=S.nodes.map(E=>_(E,this.helpers));yield Promise.all(I)}else yield _(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()})}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(_=>S.Once(_,this.helpers));return p(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=o;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let _=this.result.root.source;if(S.map===void 0&&!(_&&_.input&&_.input.map)){let C="";return b(this.result.root,O=>{C+=O}),this.result.css=C,this.result}let E=new r(b,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[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 S of this.plugins){let b=this.runOnRoot(S);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];)S[l]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return process.env.NODE_ENV!=="production"&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[_,I]of S){this.result.lastPlugin=_;let E;try{E=I(b,this.helpers)}catch(C){throw this.handleError(C,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(E))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:_,visitors:I}=b;if(_.type!=="root"&&_.type!=="document"&&!_.parent){S.pop();return}if(I.length>0&&b.visitorIndex<I.length){let[C,O]=I[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===I.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=C;try{return O(_.toProxy(),this.helpers)}catch(V){throw this.handleError(V,_)}}if(b.iterator!==0){let C=b.iterator;b.descending&&(b.descending=!1,_.indexes[C]+=1);let O;for(;O=_.nodes[_.indexes[C]];){if(!O[l]){O[l]=!0,b.descending=!0,S.push(g(O));return}_.indexes[C]+=1}b.iterator=0,delete _.indexes[C]}let E=b.events;for(;b.eventIndex<E.length;){let C=E[b.eventIndex];if(b.eventIndex+=1,C===d){_.nodes&&_.nodes.length&&(_[l]=!0,b.iterator=_.getIterator());return}else if(this.listeners[C]){b.visitors=this.listeners[C];return}}S.pop()}walkSync(S){S[l]=!0;let b=[{eventIndex:0,events:m(S),iterator:0,node:S}];for(;b.length>0;){let _=b[b.length-1],I=_.node;if(_.iterator!==0){let E=_.iterator;_.descending&&(_.descending=!1,I.indexes[E]+=1);let C,O=!1;for(;C=I.nodes[I.indexes[E]];){if(!C[l]){C[l]=!0,_.descending=!0,b.push({eventIndex:0,events:m(C),iterator:0,node:C}),O=!0;break}I.indexes[E]+=1}if(O)continue;_.iterator=0,delete I.indexes[E]}if(_.eventIndex<_.events.length){let E=_.events[_.eventIndex];if(_.eventIndex+=1,E===d)I.nodes&&I.nodes.length&&(_.iterator=I.getIterator());else{let C=this.listeners[E];C&&this.visitSync(C,I.toProxy())&&b.pop()}continue}b.pop()}}warnings(){return this.sync().warnings()}}return w.registerPostcss=R=>{y=R},Ha=w,w.default=w,s.registerLazyResult(w),t.registerLazyResult(w),Ha}var Ya,xh;function GS(){if(xh)return Ya;xh=1;let e=vh(),t=Aa(),r=Fa(),n=ki(),i=Ch();class s{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 l,u=t;try{l=u(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,u,a){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=a,this._map=void 0;let h=n;this.result=new r(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new e(h,void 0,this._opts,u);if(f.isMap()){let[d,p]=f.generate();d&&(this.result.css=d),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(l,u)}toString(){return this._css}warnings(){return[]}}return Ya=s,s.default=s,Ya}var Ba,Nh;function VS(){if(Nh)return Ba;Nh=1;let e=Ca(),t=Lh(),r=GS(),n=bn();class i{constructor(o=[]){this.version="8.5.26",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(typeof u=="object"&&(u.parse||u.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Ba=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),Ba}var za,Oh;function kS(){if(Oh)return za;Oh=1;let e=Ea(),t=Mi(),r=Kt(),n=ya(),i=Ai(),s=Ca(),o=xS(),l=Ui(),u=Lh(),a=mh(),h=Pi(),c=Aa(),f=VS(),d=Fa(),p=bn(),m=Va(),g=ki(),v=Th();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new f(w)}return y.plugin=function(R,S){let b=!1;function _(...E){console&&console.warn&&!b&&(b=!0,console.warn(R+`: postcss.plugin was deprecated. Migration guide:
|
|
110
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(R+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
111
|
+
https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=R,C.postcssVersion=new f().version,C}let I;return Object.defineProperty(_,"postcss",{get(){return I||(I=_()),I}}),_.process=function(E,C,O){return y([_(O)]).process(E,C)},_},y.stringify=g,y.parse=c,y.fromJSON=o,y.list=a,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new m(w),y.root=w=>new p(w),y.document=w=>new s(w),y.CssSyntaxError=n,y.Declaration=i,y.Container=r,y.Processor=f,y.Document=s,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=d,y.Input=l,y.Rule=m,y.Root=p,y.Node=h,u.registerPostcss(y),za=y,y.default=y,za}kS();class Ka{constructor(...t){ct(this,"parentElement",null),ct(this,"parentNode",null),ct(this,"ownerDocument"),ct(this,"firstChild",null),ct(this,"lastChild",null),ct(this,"previousSibling",null),ct(this,"nextSibling",null),ct(this,"ELEMENT_NODE",1),ct(this,"TEXT_NODE",3),ct(this,"nodeType"),ct(this,"nodeName"),ct(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof Ka){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,r){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"}}Date.now().toString();const Di=new Map,Gh=new WeakSet;function Vh(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function XS(e){if(Gh.has(e))return;Gh.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...n){const i=Di.get(e);i&&(i.cancelled=!0);const s=()=>{n.length===2&&Vh(r)&&n.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...n)};if(Vh(r)&&!r.complete){const o={cancelled:!1};Di.set(e,o);const l=()=>{o.cancelled||(Di.delete(e),s())},u=()=>{if(!o.cancelled){Di.delete(e);try{s()}catch(a){}}};r.onload=l,r.onerror=u}else s()}}const kh={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xh={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Fi={},Wh={},WS=()=>!!globalThis.Zone;function ja(e){if(Fi[e])return Fi[e];const t=globalThis[e],r=t.prototype,n=e in kh?kh[e]:void 0,i=!!(n&&n.every(l=>{var u,a;return!!((a=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&a.toString().includes("[native code]"))})),s=e in Xh?Xh[e]:void 0,o=!!(s&&s.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o&&!WS())return Fi[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const a=u[e].prototype;if(!a)return l.remove(),r;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),Wh[e]=()=>l.remove()):l.remove(),Fi[e]=a}catch(l){return r}}const Qa={};function Pt(e,t,r){var n;const i=`${e}.${String(r)}`;if(Qa[i])return Qa[i].call(t);const s=ja(e),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(Qa[i]=o,o.call(t)):t[r]}const $a={};function Ph(e,t,r){const n=`${e}.${String(r)}`;if($a[n])return $a[n].bind(t);const s=ja(e)[r];return typeof s!="function"?t[r]:($a[n]=s,s.bind(t))}function PS(e){return Pt("Node",e,"ownerDocument")}function MS(e){return Pt("Node",e,"childNodes")}function AS(e){return Pt("Node",e,"parentNode")}function US(e){return Pt("Node",e,"parentElement")}function DS(e){return Pt("Node",e,"textContent")}function FS(e,t){return Ph("Node",e,"contains")(t)}function JS(e){return Ph("Node",e,"getRootNode")()}function HS(e){return!e||!("host"in e)?null:Pt("ShadowRoot",e,"host")}function YS(e){return e.styleSheets}function BS(e){return!e||!("shadowRoot"in e)?null:Pt("Element",e,"shadowRoot")}function zS(e,t){return Pt("Element",e,"querySelector")(t)}function KS(e,t){return Pt("Element",e,"querySelectorAll")(t)}function Mh(){var e;return[ja("MutationObserver").constructor,(e=Wh.MutationObserver)!=null?e:()=>{}]}let vn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(vn=()=>new Date().getTime());function pr(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}const ue={ownerDocument:PS,childNodes:MS,parentNode:AS,parentElement:US,textContent:DS,contains:FS,getRootNode:JS,host:HS,styleSheets:YS,shadowRoot:BS,querySelector:zS,querySelectorAll:KS,nowTimestamp:vn,mutationObserverCtor:Mh,patch:pr,wrapCanvasContextDrawImage:XS};function Ke(e,t,r=document){const n={capture:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const Jr=`Please stop import mirror directly. Instead of that,\r
|
|
112
112
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
113
|
-
or you can use record.mirror to access the mirror instance during recording.`;let Mh={map:{},getId(){return console.error(Jr),-1},getNode(){return console.error(Jr),null},removeNodeFromMap(){console.error(Jr)},has(){return console.error(Jr),!1},reset(){console.error(Jr)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Mh=new Proxy(Mh,{get(e,t,r){return t==="map"&&console.error(Jr),Reflect.get(e,t,r)}}));function Sn(e,t,r={}){let n=null,i=0;return function(...s){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),u=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),i=o,e.apply(u,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,e.apply(u,s)},l))}}function Fi(e,t,r,n,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>Fi(e,t,s||{},!0)}function Ah(e){var t,r,n,i;const s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:s.documentElement.scrollLeft||(s==null?void 0:s.body)&&((t=ue.parentElement(s.body))==null?void 0:t.scrollLeft)||((r=s==null?void 0:s.body)==null?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(s==null?void 0:s.documentElement.scrollTop)||(s==null?void 0:s.body)&&((n=ue.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s==null?void 0:s.body)==null?void 0:i.scrollTop)||0}}function Uh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Dh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Fh(e){return e?e.nodeType===e.ELEMENT_NODE?e:ue.parentElement(e):null}const YS=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch(t){return!1}return!1};function Je(e,t,r,n){if(!e)return!1;const i=Fh(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(Ti(i,t,n))return!0}catch(s){}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function BS(e,t){return t.getId(e)!==-1}function Qa(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===gn}function Jh(e,t){if(pn(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const n=ue.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Jh(n,t):!0}function $a(e){return!!e.changedTouches}function zS(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 Hh(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Yh(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function qa(e){return e?e instanceof Ba&&"shadowRoot"in e?!!e.shadowRoot:!!ue.shadowRoot(e):!1}class KS{constructor(){X(this,"id",1),X(this,"styleIDMap",new WeakMap),X(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}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 Bh(e){var t;let r=null;return"getRootNode"in e&&((t=ue.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ue.host(ue.getRootNode(e))&&(r=ue.host(ue.getRootNode(e))),r}function jS(e){let t=e,r;for(;r=Bh(t);)t=r;return t}function QS(e){const t=ue.ownerDocument(e);if(!t)return!1;const r=jS(e);return ue.contains(t,r)}function zh(e){const t=ue.ownerDocument(e);return t?ue.contains(t,e)||QS(e):!1}var ge=(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[e.Asset=7]="Asset",e))(ge||{}),fe=(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))(fe||{}),et=(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))(et||{}),jt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(jt||{}),Hr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Hr||{}),Yr=(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))(Yr||{}),Kh=(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))(Kh||{});function jh(e){return"__ln"in e}class $S{constructor(){X(this,"length",0),X(this,"head",null),X(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&jh(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&jh(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Qh=(e,t)=>`${e}@${t}`;class qS{constructor(){X(this,"frozen",!1),X(this,"locked",!1),X(this,"texts",[]),X(this,"attributes",[]),X(this,"attributeMap",new WeakMap),X(this,"removes",[]),X(this,"mapRemoves",[]),X(this,"movedMap",{}),X(this,"addedSet",new Set),X(this,"movedSet",new Set),X(this,"droppedSet",new Set),X(this,"removesSubTreeCache",new Set),X(this,"mutationCb"),X(this,"blockClass"),X(this,"blockSelector"),X(this,"maskTextClass"),X(this,"maskTextSelector"),X(this,"inlineStylesheet"),X(this,"maskInputOptions"),X(this,"maskTextFn"),X(this,"maskInputFn"),X(this,"keepIframeSrcFn"),X(this,"recordCanvas"),X(this,"inlineImages"),X(this,"inlineVideos"),X(this,"privacySetting"),X(this,"slimDOMOptions"),X(this,"dataURLOptions"),X(this,"doc"),X(this,"mirror"),X(this,"iframeManager"),X(this,"stylesheetManager"),X(this,"shadowDomManager"),X(this,"canvasManager"),X(this,"processedNodeManager"),X(this,"unattachedDoc"),X(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),X(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new $S,i=u=>{let a=u,h=gn;for(;h===gn;)a=a&&a.nextSibling,h=a&&this.mirror.getId(a);return h},s=u=>{const a=ue.parentNode(u);if(!a||!zh(u))return;let h=!1;if(u.nodeType===Node.TEXT_NODE){const p=a.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(a)&&(h=!0)}const c=pn(a)?this.mirror.getId(Bh(u)):this.mirror.getId(a),f=i(u);if(c===-1||f===-1)return n.addNode(u);const d=Fr(u,{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:p=>{Hh(p,this.mirror)&&this.iframeManager.addIframe(p),Yh(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),qa(u)&&this.shadowDomManager.addShadowRoot(ue.shadowRoot(u),this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},cssCaptured:h});d&&(t.push({parentId:c,nextId:f,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)$h(this.removesSubTreeCache,u)&&!this.movedSet.has(ue.parentNode(u))||s(u);for(const u of this.addedSet)!qh(this.droppedSet,u)&&!$h(this.removesSubTreeCache,u)||qh(this.movedSet,u)?s(u):this.droppedSet.add(u);let o=null;for(;n.length;){let u=null;if(o){const a=this.mirror.getId(ue.parentNode(o.value)),h=i(o.value);a!==-1&&h!==-1&&(u=o)}if(!u){let a=n.tail;for(;a;){const h=a;if(a=a.previous,h){const c=this.mirror.getId(ue.parentNode(h.value));if(i(h.value)===-1)continue;if(c!==-1){u=h;break}else{const d=h.value,p=ue.parentNode(d);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=ue.host(p);if(this.mirror.getId(m)!==-1){u=h;break}}}}}}if(!u){for(;n.head;)n.removeNode(n.head.value);break}o=u.previous,n.removeNode(u.value),s(u.value)}const l={texts:this.texts.map(u=>{var a,h;const c=u.node,f=ue.parentNode(c);f&&f.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(f);let d=u.value;const p=this.privacySetting==="strict",m=this.privacySetting==="default"&&id(d),g=(h=(a=u.node)==null?void 0:a.parentElement)==null?void 0:h.getAttribute("data-hl-record");return(p||m)&&!g&&d&&(d=Oo(d)),{id:this.mirror.getId(c),value:d}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:a}=u;if(typeof a.style=="string"){const h=JSON.stringify(u.styleDiff),c=JSON.stringify(u._unchangedStyles);h.length<a.style.length&&(h+c).split("var(").length===a.style.split("var(").length&&(a.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:a}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l))}),X(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));const n=Array.from(ue.childNodes(t),i=>ue.textContent(i)||"").join("");r.attributes.value=Si({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:wi(t),value:n,maskInputFn:this.maskInputFn})}),X(this,"processMutation",t=>{if(!Qa(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=ue.textContent(t.target);!Je(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:hd(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Fh(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.attributeName,i=t.target.getAttribute(n);if(n==="value"){const o=wi(r);i=Si({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,overwriteRecord:r.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Je(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)n="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!cd(r.tagName,n)){if(t.target.tagName==="INPUT"){const l=t.target;if(l.type==="password"){s.attributes.value="*".repeat(l.value.length);break}}if(s.attributes[n]=ud(this.doc,fr(r.tagName),fr(n),i),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const a=r.style.getPropertyValue(u),h=r.style.getPropertyPriority(u);a!==l.style.getPropertyValue(u)||h!==l.style.getPropertyPriority(u)?h===""?s.styleDiff[u]=a:s.styleDiff[u]=[a,h]:s._unchangedStyles[u]=[a,h]}for(const u of Array.from(l.style))r.style.getPropertyValue(u)===""&&(s.styleDiff[u]=!1)}else n==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Je(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),i=pn(t.target)?this.mirror.getId(ue.host(t.target)):this.mirror.getId(t.target);Je(t.target,this.blockClass,this.blockSelector,!1)||Qa(r,this.mirror,this.slimDOMOptions)||!BS(r,this.mirror)||(this.addedSet.has(r)?(el(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Jh(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Qh(n,i)]?el(this.movedSet,r):(this.removes.push({parentId:i,id:n,isShadow:pn(t.target)&&mn(t.target)?!0:void 0}),e0(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),X(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Qa(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Qh(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Je(t,this.blockClass,this.blockSelector,!1)||(ue.childNodes(t).forEach(n=>this.genAdds(n)),qa(t)&&ue.childNodes(ue.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,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(r=>{this[r]=t[r]})}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 el(e,t){e.delete(t),ue.childNodes(t).forEach(r=>el(e,r))}function e0(e,t){const r=[e];for(;r.length;){const n=r.pop();t.has(n)||(t.add(n),ue.childNodes(n).forEach(i=>r.push(i)))}}function $h(e,t,r){return e.size===0?!1:t0(e,t)}function t0(e,t,r){const n=ue.parentNode(t);return n?e.has(n):!1}function qh(e,t){return e.size===0?!1:ef(e,t)}function ef(e,t){const r=ue.parentNode(t);return r?e.has(r)?!0:ef(e,r):!1}let wn;function r0(e){wn=e}function n0(){wn=void 0}const pe=e=>wn?(...r)=>{try{return e(...r)}catch(n){if(wn&&wn(n)===!0)return;throw n}}:e,mr=[];function Rn(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(t){}return e&&e.target}function tf(e,t){const r=new qS;mr.push(r),r.init(e);const[n,i]=Ph(),s=new n(pe(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[s,i]}function i0({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const u=Sn(pe(c=>{const f=Date.now()-l;e(o.map(d=>(d.timeOffset-=f,d)),c),o=[],l=null}),s),a=pe(Sn(pe(c=>{const f=Rn(c),{clientX:d,clientY:p}=$a(c)?c.changedTouches[0]:c;l||(l=vn()),o.push({x:d,y:p,id:n.getId(f),timeOffset:vn()-l}),u(typeof DragEvent!="undefined"&&c instanceof DragEvent?fe.Drag:c instanceof MouseEvent?fe.MouseMove:fe.TouchMove)}),i,{trailing:!1})),h=[Ke("mousemove",a,r),Ke("touchmove",a,r),Ke("drag",a,r)];return pe(()=>{h.forEach(c=>c())})}function s0({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let u=null;const a=h=>c=>{const f=Rn(c);if(Je(f,n,i,!0)||YS(f))return;let d=null,p=h;if("pointerType"in c){switch(c.pointerType){case"mouse":d=jt.Mouse;break;case"touch":d=jt.Touch;break;case"pen":d=jt.Pen;break}d===jt.Touch&&(et[h]===et.MouseDown?p="TouchStart":et[h]===et.MouseUp&&(p="TouchEnd"))}else $a(c)&&(d=jt.Touch);d!==null?(u=d,(p.startsWith("Touch")&&d===jt.Touch||p.startsWith("Mouse")&&d===jt.Mouse)&&(d=null)):et[h]===et.Click&&(d=u,u=null);const m=$a(c)?c.changedTouches[0]:c;if(!m)return;const g=r.getId(f),{clientX:v,clientY:y}=m;pe(e)(x({type:et[p],id:g,x:v,y},d!==null&&{pointerType:d}))};return Object.keys(et).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&o[h]!==!1).forEach(h=>{let c=fr(h);const f=a(h);if(window.PointerEvent)switch(et[h]){case et.MouseDown:case et.MouseUp:c=c.replace("mouse","pointer");break;case et.TouchStart:case et.TouchEnd:return}l.push(Ke(c,f,t))}),pe(()=>{l.forEach(h=>h())})}function rf({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){const o=pe(Sn(pe(l=>{const u=Rn(l);if(!u||Je(u,n,i,!0))return;const a=r.getId(u);if(u===t&&t.defaultView){const h=Ah(t.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return Ke("scroll",o,t)}function o0({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const i=pe(Sn(pe(()=>{const s=Uh(),o=Dh();(r!==s||n!==o)&&(e({width:Number(o),height:Number(s)}),r=s,n=o)}),200));return Ke("resize",i,t)}const a0=["INPUT","TEXTAREA","SELECT"],nf=new WeakMap;function l0({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:l,maskInputFn:u,sampling:a,userTriggeredOnInput:h}){function c(y){let w=Rn(y);const _=y.isTrusted,S=w&&w.tagName;if(w&&S==="OPTION"&&(w=ue.parentElement(w)),!w||!S||a0.indexOf(S)<0||Je(w,n,i,!0)||w.classList.contains(s)||o&&w.matches(o))return;let b=w.value,R=!1;const I=wi(w)||"",E=w.getAttribute("data-hl-record");I==="radio"||I==="checkbox"?R=w.checked:sd({maskInputOptions:l,type:I,tagName:S,overwriteRecord:E})&&(b=Si({element:w,maskInputOptions:l,tagName:S,type:I,value:b,overwriteRecord:E,maskInputFn:u})),f(w,h?{text:b,isChecked:R,userTriggered:_}:{text:b,isChecked:R});const C=w.name;I==="radio"&&C&&R&&t.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(O=>{if(O!==w){const V=O.value;f(O,h?{text:V,isChecked:!R,userTriggered:!1}:{text:V,isChecked:!R})}})}function f(y,w){const _=nf.get(y);if(!_||_.text!==w.text||_.isChecked!==w.isChecked){nf.set(y,w);const S=r.getId(y);pe(e)(Y(x({},w),{id:S}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(y=>Ke(y,pe(c),t)),m=t.defaultView;if(!m)return()=>{p.forEach(y=>y())};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...v.map(y=>Fi(y[0],y[1],{set(){pe(c)({target:this,isTrusted:!1})}},!1,m))),pe(()=>{p.forEach(y=>y())})}function Ji(e){const t=[];function r(n,i){if(Hi("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Hi("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Hi("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Hi("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const o=Array.from(n.parentRule.cssRules).indexOf(n);return i.unshift(o),r(n.parentRule,i)}else if(n.parentStyleSheet){const o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o)}return i}return r(e,t)}function Qt(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function $t(e,t,r,n){e[t]===r&&(e[t]=n)}const u0=5;function c0({styleSheetRuleCb:e,mirror:t,stylesheetManager:r,doc:n,styleSheetResyncInterval:i},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const o=new WeakMap,l=new WeakSet;let u=!1,a=!1,h=!1,c,f=!1,d=!1,p=!1;const m=(U,D,J)=>{const Q=o.get(U),re=U.cssRules[J];!Q||!re||Q.splice(Math.min(D!=null?D:0,Q.length),0,re)},g=(U,D)=>{const J=o.get(U);J&&D>=0&&D<J.length&&J.splice(D,1)},v=U=>new Proxy(U,{apply:pe((D,J,Q)=>{if(u)return a=!0,D.apply(J,Q);if(f||d)return D.apply(J,Q);const[re,K]=Q,{id:se,styleId:ce}=Qt(J,t,r.styleMirror),Ce=se&&se!==-1||ce&&ce!==-1;Ce&&e({id:se,styleId:ce,adds:[{rule:re,index:K}]}),d=!0;let at;try{at=D.apply(J,Q)}finally{d=!1}return Ce&&m(J,K,typeof at=="number"?at:K!=null?K:0),at})}),y=U=>new Proxy(U,{apply:pe((D,J,Q)=>{if(u)return h=!0,D.apply(J,Q);if(f||p)return D.apply(J,Q);const[re]=Q,{id:K,styleId:se}=Qt(J,t,r.styleMirror),ce=K&&K!==-1||se&&se!==-1;ce&&e({id:K,styleId:se,removes:[{index:re}]}),p=!0;let Ce;try{Ce=D.apply(J,Q)}finally{p=!1}return ce&&g(J,re),Ce})}),w=s.CSSStyleSheet.prototype.insertRule;let _=v(w),S=w;s.CSSStyleSheet.prototype.insertRule=_;const b=s.CSSStyleSheet.prototype.addRule,R=function(U,D,J=this.cssRules.length){const Q=`${U} { ${D} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[Q,J])};s.CSSStyleSheet.prototype.addRule=R;const I=s.CSSStyleSheet.prototype.deleteRule;let E=y(I),C=I;s.CSSStyleSheet.prototype.deleteRule=E;const O=s.CSSStyleSheet.prototype.removeRule,V=function(U){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[U])};s.CSSStyleSheet.prototype.removeRule=V;let q,Z;s.CSSStyleSheet.prototype.replace&&(q=s.CSSStyleSheet.prototype.replace,Z=new Proxy(q,{apply:pe((U,D,J)=>{if(f)return U.apply(D,J);const[Q]=J,{id:re,styleId:K}=Qt(D,t,r.styleMirror);return(re&&re!==-1||K&&K!==-1)&&e({id:re,styleId:K,replace:Q}),U.apply(D,J)})}),s.CSSStyleSheet.prototype.replace=Z);let T,W;s.CSSStyleSheet.prototype.replaceSync&&(T=s.CSSStyleSheet.prototype.replaceSync,W=new Proxy(T,{apply:pe((U,D,J)=>{if(f)return U.apply(D,J);const[Q]=J,{id:re,styleId:K}=Qt(D,t,r.styleMirror);return(re&&re!==-1||K&&K!==-1)&&e({id:re,styleId:K,replaceSync:Q}),U.apply(D,J)})}),s.CSSStyleSheet.prototype.replaceSync=W);const k={};Yi("CSSGroupingRule")?k.CSSGroupingRule=s.CSSGroupingRule:(Yi("CSSMediaRule")&&(k.CSSMediaRule=s.CSSMediaRule),Yi("CSSConditionRule")&&(k.CSSConditionRule=s.CSSConditionRule),Yi("CSSSupportsRule")&&(k.CSSSupportsRule=s.CSSSupportsRule));const P={},M={};Object.entries(k).forEach(([U,D])=>{P[U]={insertRule:D.prototype.insertRule,deleteRule:D.prototype.deleteRule},M[U]={},M[U].insertRule=new Proxy(P[U].insertRule,{apply:pe((J,Q,re)=>{if(f)return J.apply(Q,re);const[K,se]=re,{id:ce,styleId:Ce}=Qt(Q.parentStyleSheet,t,r.styleMirror);return(ce&&ce!==-1||Ce&&Ce!==-1)&&e({id:ce,styleId:Ce,adds:[{rule:K,index:[...Ji(Q),se||0]}]}),J.apply(Q,re)})}),M[U].deleteRule=new Proxy(P[U].deleteRule,{apply:pe((J,Q,re)=>{if(f)return J.apply(Q,re);const[K]=re,{id:se,styleId:ce}=Qt(Q.parentStyleSheet,t,r.styleMirror);return(se&&se!==-1||ce&&ce!==-1)&&e({id:se,styleId:ce,removes:[{index:[...Ji(Q),K]}]}),J.apply(Q,re)})}),D.prototype.insertRule=M[U].insertRule,D.prototype.deleteRule=M[U].deleteRule});const B=()=>{u=!0,a=!1,h=!1;try{const U=c!=null?c:c=new s.CSSStyleSheet;U.insertRule(":root {}",0),U.deleteRule(0)}catch(U){return{insertRule:s.CSSStyleSheet.prototype.insertRule===_,deleteRule:s.CSSStyleSheet.prototype.deleteRule===E}}finally{u=!1}return{insertRule:a,deleteRule:h}};let $=0;const te=U=>{$>=u0||($+=1,U.insertRule||(S=s.CSSStyleSheet.prototype.insertRule,_=v(S),s.CSSStyleSheet.prototype.insertRule=_),U.deleteRule||(C=s.CSSStyleSheet.prototype.deleteRule,E=y(C),s.CSSStyleSheet.prototype.deleteRule=E))},N=U=>{for(let D=0;D<n.styleSheets.length;D++){const J=n.styleSheets[D];if(l.has(J))continue;const Q=J.ownerNode;if(!Q||fr(Q.nodeName)!=="style"||(Q.textContent||"").trim().length)continue;const re=t.getId(Q);if(!re||re===-1)continue;let K;try{K=J.cssRules}catch(ce){continue}const se=o.get(J);if(!se){if(Array.from(K).some(ce=>ed(ce))){l.add(J);continue}if(o.set(J,Array.from(K)),U)continue;he(re,K);continue}U&&K.length===se.length||ye(re,J,se,K)}};function ye(U,D,J,Q){const re=Array.from(Q);if(re.length===J.length&&re.every((ae,Pe)=>ae===J[Pe]))return;const K=new Map(re.map((ae,Pe)=>[ae,Pe])),se=new Set;let ce=-1;const Ce=[];J.forEach((ae,Pe)=>{const Te=K.get(ae);Te!==void 0&&Te>ce&&!se.has(ae)?(se.add(ae),ce=Te):Ce.push({index:Pe})}),Ce.reverse();const at=[];re.forEach((ae,Pe)=>{se.has(ae)||at.push({rule:ae.cssText,index:Pe})}),Ce.length&&e({id:U,removes:Ce}),at.length&&e({id:U,adds:at}),o.set(D,re)}function he(U,D){const J=[];for(let Q=D.length-1;Q>=0;Q--)J.push({index:Q});J.length&&e({id:U,removes:J}),e({id:U,adds:Array.from(D,(Q,re)=>({rule:Q.cssText,index:re}))})}let ve;return i>0&&(ve=s.setInterval(pe(()=>{const U=B(),D=U.insertRule&&U.deleteRule;D||te(U),N(D)}),i)),pe(()=>{ve!==void 0&&s.clearInterval(ve),f=!0;const U=s.CSSStyleSheet.prototype;$t(U,"insertRule",_,S),$t(U,"deleteRule",E,C),$t(U,"addRule",R,b),$t(U,"removeRule",V,O),Z&&$t(U,"replace",Z,q),W&&$t(U,"replaceSync",W,T),Object.entries(k).forEach(([D,J])=>{$t(J.prototype,"insertRule",M[D].insertRule,P[D].insertRule),$t(J.prototype,"deleteRule",M[D].deleteRule,P[D].deleteRule)})})}function sf({mirror:e,stylesheetManager:t},r){var n,i,s;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(ue.host(r));const l=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,u=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!u?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var a;return(a=u.get)==null?void 0:a.call(this)},set(a){var h;const c=(h=u.set)==null?void 0:h.call(this,a);if(o!==null&&o!==-1)try{t.adoptStyleSheets(a,o)}catch(f){}return c}}),pe(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function d0({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:pe((l,u,a)=>{var h;const[c,f,d]=a;if(r.has(c))return s.apply(u,[c,f,d]);const{id:p,styleId:m}=Qt((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:c,value:f,priority:d},index:Ji(u.parentRule)}),l.apply(u,a)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:pe((l,u,a)=>{var h;const[c]=a;if(r.has(c))return o.apply(u,[c]);const{id:f,styleId:d}=Qt((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||d&&d!==-1)&&e({id:f,styleId:d,remove:{property:c},index:Ji(u.parentRule)}),l.apply(u,a)})}),pe(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function h0({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i,doc:s}){const o=pe(u=>Sn(pe(a=>{const h=Rn(a);if(!h||Je(h,t,r,!0))return;const{currentTime:c,volume:f,muted:d,playbackRate:p,loop:m}=h;e({type:u,id:n.getId(h),currentTime:c,volume:f,muted:d,playbackRate:p,loop:m})}),i.media||500)),l=[Ke("play",o(Yr.Play),s),Ke("pause",o(Yr.Pause),s),Ke("seeked",o(Yr.Seeked),s),Ke("volumechange",o(Yr.VolumeChange),s),Ke("ratechange",o(Yr.RateChange),s)];return pe(()=>{l.forEach(u=>u())})}function f0({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(u,a,h){const c=new s(u,a,h);return i.set(c,{family:u,buffer:typeof a!="string",descriptors:h,fontSource:typeof a=="string"?a:JSON.stringify(Array.from(new Uint8Array(a)))}),c};const o=pr(t.fonts,"add",function(l){return function(u){return setTimeout(pe(()=>{const a=i.get(u);a&&(e(a),i.delete(u))}),0),l.apply(this,[u])}});return n.push(()=>{r.FontFace=s}),n.push(o),pe(()=>{n.forEach(l=>l())})}function p0(e){const{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:s}=e;let o=!0;const l=pe(()=>{const u=t.getSelection();if(!u||o&&(u!=null&&u.isCollapsed))return;o=u.isCollapsed||!1;const a=[],h=u.rangeCount||0;for(let c=0;c<h;c++){const f=u.getRangeAt(c),{startContainer:d,startOffset:p,endContainer:m,endOffset:g}=f;Je(d,n,i,!0)||Je(m,n,i,!0)||a.push({start:r.getId(d),startOffset:p,end:r.getId(m),endOffset:g})}s({ranges:a})});return l(),Ke("selectionchange",l)}function m0({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:pr(r.customElements,"define",function(i){return function(s,o,l){try{t({define:{name:s}})}catch(u){console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,l])}})}function g0(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:a,styleDeclarationCb:h,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:p}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),r(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),n(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),i(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),s(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),o(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),u(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),a(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),h(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),c(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),f(...m)},e.selectionCb=(...m)=>{t.selection&&t.selection(...m),d(...m)},e.customElementCb=(...m)=>{t.customElement&&t.customElement(...m),p(...m)}}function y0(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};g0(e,t);let n,i=()=>{};e.recordDOM&&([n,i]=tf(e,e.doc));const s=i0(e),o=s0(e),l=rf(e),u=o0(e,{win:r}),a=l0(e),h=h0(e);let c=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(c=c0(e,{win:r}),f=sf(e,e.doc),d=d0(e,{win:r}),e.collectFonts&&(p=f0(e)));const m=p0(e),g=m0(e),v=[];for(const y of e.plugins)v.push(y.observer(y.callback,r,y.options));return pe(()=>{mr.forEach(y=>y.reset()),n==null||n.disconnect(),i(),s(),o(),l(),u(),a(),h(),c(),f(),d(),p(),m(),g(),v.forEach(y=>y())})}function Hi(e){return typeof window[e]!="undefined"}function Yi(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class of{constructor(t){X(this,"iframeIdToRemoteIdMap",new WeakMap),X(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,i){const s=n||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=s.get(r);return l||(l=this.generateIdFn(),s.set(r,l),o.set(l,r)),l}getIds(t,r){const n=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(s=>this.getId(t,s,n,i))}getRemoteId(t,r,n){const i=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const s=i.get(r);return s||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class b0{constructor(t){X(this,"iframes",new WeakMap),X(this,"crossOriginIframeMap",new WeakMap),X(this,"crossOriginIframeMirror",new of(od)),X(this,"crossOriginIframeStyleMirror"),X(this,"crossOriginIframeRootIdMap",new WeakMap),X(this,"mirror"),X(this,"mutationCb"),X(this,"wrappedEmit"),X(this,"loadListener"),X(this,"stylesheetManager"),X(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new of(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,r){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.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 r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin)return;const n=t.source;if(!n)return;const i=this.crossOriginIframeMap.get(n);if(!i)return;const s=this.transformCrossOriginEvent(i,r.data.event);s&&this.wrappedEmit(s,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case ge.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:ge.IncrementalSnapshot,data:{source:fe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ge.Meta:case ge.Load:case ge.DomContentLoaded:return!1;case ge.Plugin:return r;case ge.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case ge.IncrementalSnapshot:switch(r.data.source){case fe.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(i.node,s)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case fe.Drag:case fe.TouchMove:case fe.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case fe.ViewportResize:return!1;case fe.MediaInteraction:case fe.MouseInteraction:case fe.Scroll:case fe.CanvasMutation:case fe.Input:return this.replaceIds(r.data,t,["id"]),r;case fe.StyleSheetRule:case fe.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case fe.Font:return r;case fe.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case fe.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,n,i){for(const s of i)!Array.isArray(r[s])&&typeof r[s]!="number"||(Array.isArray(r[s])?r[s]=t.getIds(n,r[s]):r[s]=t.getId(n,r[s]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Kh.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class v0{constructor(t){X(this,"shadowDoms",new WeakSet),X(this,"mutationCb"),X(this,"scrollCb"),X(this,"bypassOptions"),X(this,"mirror"),X(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,r){if(!mn(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[n]=tf(Y(x({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(rf(Y(x({},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(ue.host(t))),this.restoreHandlers.push(sf({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(pr(t.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s),l=ue.shadowRoot(this);return l&&zh(this)&&n.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S0=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Bi=0;Bi<Br.length;Bi++)S0[Br.charCodeAt(Bi)]=Bi;var w0=function(e){var t=new Uint8Array(e),r,n=t.length,i="";for(r=0;r<n;r+=3)i+=Br[t[r]>>2],i+=Br[(t[r]&3)<<4|t[r+1]>>4],i+=Br[(t[r+1]&15)<<2|t[r+2]>>6],i+=Br[t[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const af=new Map;function R0(e,t){let r=af.get(e);return r||(r=new Map,af.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const lf=(e,t,r)=>{if(!e||!(cf(e,t)||typeof e=="object"))return;const n=e.constructor.name,i=R0(r,n);let s=i.indexOf(e);return s===-1&&(s=i.length,i.push(e)),s};function zi(e,t,r){if(e instanceof Array)return e.map(n=>zi(n,t,r));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 n=e.constructor.name,i=w0(e);return{rr_type:n,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[zi(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",i=e.toDataURL();return{rr_type:n,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[zi(e.data,t,r),e.width,e.height]};if(cf(e,t)||typeof e=="object"){const n=e.constructor.name,i=lf(e,t,r);return{rr_type:n,index:i}}}}return e}const uf=(e,t,r)=>e.map(n=>zi(n,t,r)),cf=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function _0(e,t,r,n){const i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=pr(t.CanvasRenderingContext2D.prototype,o,function(u){return function(...a){return Je(this.canvas,r,n,!0)||setTimeout(()=>{const h=uf(a,t,this);e(this.canvas,{type:Hr["2D"],property:o,args:h})},0),u.apply(this,a)}});i.push(l)}catch(l){const u=Fi(t.CanvasRenderingContext2D.prototype,o,{set(a){e(this.canvas,{type:Hr["2D"],property:o,args:[a],setter:!0})}});i.push(u)}return()=>{i.forEach(o=>o())}}function T0(e){return e==="experimental-webgl"?"webgl":e}function df(e,t,r,n){const i=[];try{const s=pr(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...u){if(!Je(this,t,r,!0)){const a=T0(l);if("__context"in this||(this.__context=a),n&&["webgl","webgl2"].includes(a))if(u[0]&&typeof u[0]=="object"){const h=u[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...u])}});i.push(s)}catch(s){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function hf(e,t,r,n,i,s){const o=[],l=Object.getOwnPropertyNames(e);for(const u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const a=pr(e,u,function(h){return function(...c){const f=h.apply(this,c);if(lf(f,s,this),"tagName"in this.canvas&&!Je(this.canvas,n,i,!0)){const d=uf(c,s,this),p={type:t,property:u,args:d};r(this.canvas,p)}return f}});o.push(a)}catch(a){const h=Fi(e,u,{set(c){r(this.canvas,{type:t,property:u,args:[c],setter:!0})}});o.push(h)}return o}function E0(e,t,r,n){const i=[];return typeof t.WebGLRenderingContext!="undefined"&&i.push(...hf(t.WebGLRenderingContext.prototype,Hr.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...hf(t.WebGL2RenderingContext.prototype,Hr.WebGL2,e,r,n,t)),()=>{i.forEach(s=>s())}}const ff=`(function() {
|
|
113
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Ah={map:{},getId(){return console.error(Jr),-1},getNode(){return console.error(Jr),null},removeNodeFromMap(){console.error(Jr)},has(){return console.error(Jr),!1},reset(){console.error(Jr)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Ah=new Proxy(Ah,{get(e,t,r){return t==="map"&&console.error(Jr),Reflect.get(e,t,r)}}));function Sn(e,t,r={}){let n=null,i=0;return function(...s){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),u=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),i=o,e.apply(u,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,e.apply(u,s)},l))}}function Ji(e,t,r,n,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>Ji(e,t,s||{},!0)}function Uh(e){var t,r,n,i;const s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:s.documentElement.scrollLeft||(s==null?void 0:s.body)&&((t=ue.parentElement(s.body))==null?void 0:t.scrollLeft)||((r=s==null?void 0:s.body)==null?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(s==null?void 0:s.documentElement.scrollTop)||(s==null?void 0:s.body)&&((n=ue.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s==null?void 0:s.body)==null?void 0:i.scrollTop)||0}}function Dh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Fh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Jh(e){return e?e.nodeType===e.ELEMENT_NODE?e:ue.parentElement(e):null}const jS=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch(t){return!1}return!1};function Je(e,t,r,n){if(!e)return!1;const i=Jh(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(Ei(i,t,n))return!0}catch(s){}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function QS(e,t){return t.getId(e)!==-1}function qa(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===gn}function Hh(e,t){if(pn(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const n=ue.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Hh(n,t):!0}function el(e){return!!e.changedTouches}function $S(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 Yh(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Bh(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function tl(e){return e?e instanceof Ka&&"shadowRoot"in e?!!e.shadowRoot:!!ue.shadowRoot(e):!1}class qS{constructor(){X(this,"id",1),X(this,"styleIDMap",new WeakMap),X(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}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 zh(e){var t;let r=null;return"getRootNode"in e&&((t=ue.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ue.host(ue.getRootNode(e))&&(r=ue.host(ue.getRootNode(e))),r}function e0(e){let t=e,r;for(;r=zh(t);)t=r;return t}function t0(e){const t=ue.ownerDocument(e);if(!t)return!1;const r=e0(e);return ue.contains(t,r)}function Kh(e){const t=ue.ownerDocument(e);return t?ue.contains(t,e)||t0(e):!1}var ge=(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[e.Asset=7]="Asset",e))(ge||{}),fe=(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))(fe||{}),et=(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))(et||{}),jt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(jt||{}),Hr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Hr||{}),Yr=(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))(Yr||{}),jh=(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))(jh||{});function Qh(e){return"__ln"in e}class r0{constructor(){X(this,"length",0),X(this,"head",null),X(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Qh(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&Qh(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const $h=(e,t)=>`${e}@${t}`;class n0{constructor(){X(this,"frozen",!1),X(this,"locked",!1),X(this,"texts",[]),X(this,"attributes",[]),X(this,"attributeMap",new WeakMap),X(this,"removes",[]),X(this,"mapRemoves",[]),X(this,"movedMap",{}),X(this,"addedSet",new Set),X(this,"movedSet",new Set),X(this,"droppedSet",new Set),X(this,"removesSubTreeCache",new Set),X(this,"mutationCb"),X(this,"blockClass"),X(this,"blockSelector"),X(this,"maskTextClass"),X(this,"maskTextSelector"),X(this,"inlineStylesheet"),X(this,"maskInputOptions"),X(this,"maskTextFn"),X(this,"maskInputFn"),X(this,"keepIframeSrcFn"),X(this,"recordCanvas"),X(this,"inlineImages"),X(this,"inlineVideos"),X(this,"privacySetting"),X(this,"slimDOMOptions"),X(this,"dataURLOptions"),X(this,"doc"),X(this,"mirror"),X(this,"iframeManager"),X(this,"stylesheetManager"),X(this,"shadowDomManager"),X(this,"canvasManager"),X(this,"processedNodeManager"),X(this,"unattachedDoc"),X(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),X(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new r0,i=u=>{let a=u,h=gn;for(;h===gn;)a=a&&a.nextSibling,h=a&&this.mirror.getId(a);return h},s=u=>{const a=ue.parentNode(u);if(!a||!Kh(u))return;let h=!1;if(u.nodeType===Node.TEXT_NODE){const p=a.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(a)&&(h=!0)}const c=pn(a)?this.mirror.getId(zh(u)):this.mirror.getId(a),f=i(u);if(c===-1||f===-1)return n.addNode(u);const d=Fr(u,{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:p=>{Yh(p,this.mirror)&&this.iframeManager.addIframe(p),Bh(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),tl(u)&&this.shadowDomManager.addShadowRoot(ue.shadowRoot(u),this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},cssCaptured:h});d&&(t.push({parentId:c,nextId:f,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)qh(this.removesSubTreeCache,u)&&!this.movedSet.has(ue.parentNode(u))||s(u);for(const u of this.addedSet)!ef(this.droppedSet,u)&&!qh(this.removesSubTreeCache,u)||ef(this.movedSet,u)?s(u):this.droppedSet.add(u);let o=null;for(;n.length;){let u=null;if(o){const a=this.mirror.getId(ue.parentNode(o.value)),h=i(o.value);a!==-1&&h!==-1&&(u=o)}if(!u){let a=n.tail;for(;a;){const h=a;if(a=a.previous,h){const c=this.mirror.getId(ue.parentNode(h.value));if(i(h.value)===-1)continue;if(c!==-1){u=h;break}else{const d=h.value,p=ue.parentNode(d);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=ue.host(p);if(this.mirror.getId(m)!==-1){u=h;break}}}}}}if(!u){for(;n.head;)n.removeNode(n.head.value);break}o=u.previous,n.removeNode(u.value),s(u.value)}const l={texts:this.texts.map(u=>{var a,h;const c=u.node,f=ue.parentNode(c);f&&f.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(f);let d=u.value;const p=this.privacySetting==="strict",m=this.privacySetting==="default"&&sd(d),g=(h=(a=u.node)==null?void 0:a.parentElement)==null?void 0:h.getAttribute("data-hl-record");return(p||m)&&!g&&d&&(d=Vo(d)),{id:this.mirror.getId(c),value:d}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:a}=u;if(typeof a.style=="string"){const h=JSON.stringify(u.styleDiff),c=JSON.stringify(u._unchangedStyles);h.length<a.style.length&&(h+c).split("var(").length===a.style.split("var(").length&&(a.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:a}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l))}),X(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));const n=Array.from(ue.childNodes(t),i=>ue.textContent(i)||"").join("");r.attributes.value=wi({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:_i(t),value:n,maskInputFn:this.maskInputFn})}),X(this,"processMutation",t=>{if(!qa(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=ue.textContent(t.target);!Je(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:fd(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Jh(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.attributeName,i=t.target.getAttribute(n);if(n==="value"){const o=_i(r);i=wi({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,overwriteRecord:r.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Je(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)n="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!dd(r.tagName,n)){if(t.target.tagName==="INPUT"){const l=t.target;if(l.type==="password"){s.attributes.value="*".repeat(l.value.length);break}}if(s.attributes[n]=cd(this.doc,fr(r.tagName),fr(n),i),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const a=r.style.getPropertyValue(u),h=r.style.getPropertyPriority(u);a!==l.style.getPropertyValue(u)||h!==l.style.getPropertyPriority(u)?h===""?s.styleDiff[u]=a:s.styleDiff[u]=[a,h]:s._unchangedStyles[u]=[a,h]}for(const u of Array.from(l.style))r.style.getPropertyValue(u)===""&&(s.styleDiff[u]=!1)}else n==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Je(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),i=pn(t.target)?this.mirror.getId(ue.host(t.target)):this.mirror.getId(t.target);Je(t.target,this.blockClass,this.blockSelector,!1)||qa(r,this.mirror,this.slimDOMOptions)||!QS(r,this.mirror)||(this.addedSet.has(r)?(rl(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Hh(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[$h(n,i)]?rl(this.movedSet,r):(this.removes.push({parentId:i,id:n,isShadow:pn(t.target)&&mn(t.target)?!0:void 0}),i0(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),X(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(qa(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[$h(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Je(t,this.blockClass,this.blockSelector,!1)||(ue.childNodes(t).forEach(n=>this.genAdds(n)),tl(t)&&ue.childNodes(ue.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,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(r=>{this[r]=t[r]})}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 rl(e,t){e.delete(t),ue.childNodes(t).forEach(r=>rl(e,r))}function i0(e,t){const r=[e];for(;r.length;){const n=r.pop();t.has(n)||(t.add(n),ue.childNodes(n).forEach(i=>r.push(i)))}}function qh(e,t,r){return e.size===0?!1:s0(e,t)}function s0(e,t,r){const n=ue.parentNode(t);return n?e.has(n):!1}function ef(e,t){return e.size===0?!1:tf(e,t)}function tf(e,t){const r=ue.parentNode(t);return r?e.has(r)?!0:tf(e,r):!1}let wn;function o0(e){wn=e}function a0(){wn=void 0}const pe=e=>wn?(...r)=>{try{return e(...r)}catch(n){if(wn&&wn(n)===!0)return;throw n}}:e,mr=[];function _n(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(t){}return e&&e.target}function rf(e,t){const r=new n0;mr.push(r),r.init(e);const[n,i]=Mh(),s=new n(pe(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[s,i]}function l0({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const u=Sn(pe(c=>{const f=Date.now()-l;e(o.map(d=>(d.timeOffset-=f,d)),c),o=[],l=null}),s),a=pe(Sn(pe(c=>{const f=_n(c),{clientX:d,clientY:p}=el(c)?c.changedTouches[0]:c;l||(l=vn()),o.push({x:d,y:p,id:n.getId(f),timeOffset:vn()-l}),u(typeof DragEvent!="undefined"&&c instanceof DragEvent?fe.Drag:c instanceof MouseEvent?fe.MouseMove:fe.TouchMove)}),i,{trailing:!1})),h=[Ke("mousemove",a,r),Ke("touchmove",a,r),Ke("drag",a,r)];return pe(()=>{h.forEach(c=>c())})}function u0({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let u=null;const a=h=>c=>{const f=_n(c);if(Je(f,n,i,!0)||jS(f))return;let d=null,p=h;if("pointerType"in c){switch(c.pointerType){case"mouse":d=jt.Mouse;break;case"touch":d=jt.Touch;break;case"pen":d=jt.Pen;break}d===jt.Touch&&(et[h]===et.MouseDown?p="TouchStart":et[h]===et.MouseUp&&(p="TouchEnd"))}else el(c)&&(d=jt.Touch);d!==null?(u=d,(p.startsWith("Touch")&&d===jt.Touch||p.startsWith("Mouse")&&d===jt.Mouse)&&(d=null)):et[h]===et.Click&&(d=u,u=null);const m=el(c)?c.changedTouches[0]:c;if(!m)return;const g=r.getId(f),{clientX:v,clientY:y}=m;pe(e)(x({type:et[p],id:g,x:v,y},d!==null&&{pointerType:d}))};return Object.keys(et).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&o[h]!==!1).forEach(h=>{let c=fr(h);const f=a(h);if(window.PointerEvent)switch(et[h]){case et.MouseDown:case et.MouseUp:c=c.replace("mouse","pointer");break;case et.TouchStart:case et.TouchEnd:return}l.push(Ke(c,f,t))}),pe(()=>{l.forEach(h=>h())})}function nf({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){const o=pe(Sn(pe(l=>{const u=_n(l);if(!u||Je(u,n,i,!0))return;const a=r.getId(u);if(u===t&&t.defaultView){const h=Uh(t.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return Ke("scroll",o,t)}function c0({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const i=pe(Sn(pe(()=>{const s=Dh(),o=Fh();(r!==s||n!==o)&&(e({width:Number(o),height:Number(s)}),r=s,n=o)}),200));return Ke("resize",i,t)}const d0=["INPUT","TEXTAREA","SELECT"],sf=new WeakMap;function h0({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:l,maskInputFn:u,sampling:a,userTriggeredOnInput:h}){function c(y){let w=_n(y);const R=y.isTrusted,S=w&&w.tagName;if(w&&S==="OPTION"&&(w=ue.parentElement(w)),!w||!S||d0.indexOf(S)<0||Je(w,n,i,!0)||w.classList.contains(s)||o&&w.matches(o))return;let b=w.value,_=!1;const I=_i(w)||"",E=w.getAttribute("data-hl-record");I==="radio"||I==="checkbox"?_=w.checked:od({maskInputOptions:l,type:I,tagName:S,overwriteRecord:E})&&(b=wi({element:w,maskInputOptions:l,tagName:S,type:I,value:b,overwriteRecord:E,maskInputFn:u})),f(w,h?{text:b,isChecked:_,userTriggered:R}:{text:b,isChecked:_});const C=w.name;I==="radio"&&C&&_&&t.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(O=>{if(O!==w){const V=O.value;f(O,h?{text:V,isChecked:!_,userTriggered:!1}:{text:V,isChecked:!_})}})}function f(y,w){const R=sf.get(y);if(!R||R.text!==w.text||R.isChecked!==w.isChecked){sf.set(y,w);const S=r.getId(y);pe(e)(Y(x({},w),{id:S}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(y=>Ke(y,pe(c),t)),m=t.defaultView;if(!m)return()=>{p.forEach(y=>y())};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...v.map(y=>Ji(y[0],y[1],{set(){pe(c)({target:this,isTrusted:!1})}},!1,m))),pe(()=>{p.forEach(y=>y())})}function Hi(e){const t=[];function r(n,i){if(Yi("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Yi("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Yi("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Yi("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const o=Array.from(n.parentRule.cssRules).indexOf(n);return i.unshift(o),r(n.parentRule,i)}else if(n.parentStyleSheet){const o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o)}return i}return r(e,t)}function Qt(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function $t(e,t,r,n){e[t]===r&&(e[t]=n)}const f0=5;function p0({styleSheetRuleCb:e,mirror:t,stylesheetManager:r,doc:n,styleSheetResyncInterval:i},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const o=new WeakMap,l=new WeakSet;let u=!1,a=!1,h=!1,c,f=!1,d=!1,p=!1;const m=(U,D,J)=>{const Q=o.get(U),re=U.cssRules[J];!Q||!re||Q.splice(Math.min(D!=null?D:0,Q.length),0,re)},g=(U,D)=>{const J=o.get(U);J&&D>=0&&D<J.length&&J.splice(D,1)},v=U=>new Proxy(U,{apply:pe((D,J,Q)=>{if(u)return a=!0,D.apply(J,Q);if(f||d)return D.apply(J,Q);const[re,K]=Q,{id:se,styleId:ce}=Qt(J,t,r.styleMirror),Ze=se&&se!==-1||ce&&ce!==-1;Ze&&e({id:se,styleId:ce,adds:[{rule:re,index:K}]}),d=!0;let at;try{at=D.apply(J,Q)}finally{d=!1}return Ze&&m(J,K,typeof at=="number"?at:K!=null?K:0),at})}),y=U=>new Proxy(U,{apply:pe((D,J,Q)=>{if(u)return h=!0,D.apply(J,Q);if(f||p)return D.apply(J,Q);const[re]=Q,{id:K,styleId:se}=Qt(J,t,r.styleMirror),ce=K&&K!==-1||se&&se!==-1;ce&&e({id:K,styleId:se,removes:[{index:re}]}),p=!0;let Ze;try{Ze=D.apply(J,Q)}finally{p=!1}return ce&&g(J,re),Ze})}),w=s.CSSStyleSheet.prototype.insertRule;let R=v(w),S=w;s.CSSStyleSheet.prototype.insertRule=R;const b=s.CSSStyleSheet.prototype.addRule,_=function(U,D,J=this.cssRules.length){const Q=`${U} { ${D} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[Q,J])};s.CSSStyleSheet.prototype.addRule=_;const I=s.CSSStyleSheet.prototype.deleteRule;let E=y(I),C=I;s.CSSStyleSheet.prototype.deleteRule=E;const O=s.CSSStyleSheet.prototype.removeRule,V=function(U){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[U])};s.CSSStyleSheet.prototype.removeRule=V;let q,Z;s.CSSStyleSheet.prototype.replace&&(q=s.CSSStyleSheet.prototype.replace,Z=new Proxy(q,{apply:pe((U,D,J)=>{if(f)return U.apply(D,J);const[Q]=J,{id:re,styleId:K}=Qt(D,t,r.styleMirror);return(re&&re!==-1||K&&K!==-1)&&e({id:re,styleId:K,replace:Q}),U.apply(D,J)})}),s.CSSStyleSheet.prototype.replace=Z);let T,W;s.CSSStyleSheet.prototype.replaceSync&&(T=s.CSSStyleSheet.prototype.replaceSync,W=new Proxy(T,{apply:pe((U,D,J)=>{if(f)return U.apply(D,J);const[Q]=J,{id:re,styleId:K}=Qt(D,t,r.styleMirror);return(re&&re!==-1||K&&K!==-1)&&e({id:re,styleId:K,replaceSync:Q}),U.apply(D,J)})}),s.CSSStyleSheet.prototype.replaceSync=W);const k={};Bi("CSSGroupingRule")?k.CSSGroupingRule=s.CSSGroupingRule:(Bi("CSSMediaRule")&&(k.CSSMediaRule=s.CSSMediaRule),Bi("CSSConditionRule")&&(k.CSSConditionRule=s.CSSConditionRule),Bi("CSSSupportsRule")&&(k.CSSSupportsRule=s.CSSSupportsRule));const P={},M={};Object.entries(k).forEach(([U,D])=>{P[U]={insertRule:D.prototype.insertRule,deleteRule:D.prototype.deleteRule},M[U]={},M[U].insertRule=new Proxy(P[U].insertRule,{apply:pe((J,Q,re)=>{if(f)return J.apply(Q,re);const[K,se]=re,{id:ce,styleId:Ze}=Qt(Q.parentStyleSheet,t,r.styleMirror);return(ce&&ce!==-1||Ze&&Ze!==-1)&&e({id:ce,styleId:Ze,adds:[{rule:K,index:[...Hi(Q),se||0]}]}),J.apply(Q,re)})}),M[U].deleteRule=new Proxy(P[U].deleteRule,{apply:pe((J,Q,re)=>{if(f)return J.apply(Q,re);const[K]=re,{id:se,styleId:ce}=Qt(Q.parentStyleSheet,t,r.styleMirror);return(se&&se!==-1||ce&&ce!==-1)&&e({id:se,styleId:ce,removes:[{index:[...Hi(Q),K]}]}),J.apply(Q,re)})}),D.prototype.insertRule=M[U].insertRule,D.prototype.deleteRule=M[U].deleteRule});const B=()=>{u=!0,a=!1,h=!1;try{const U=c!=null?c:c=new s.CSSStyleSheet;U.insertRule(":root {}",0),U.deleteRule(0)}catch(U){return{insertRule:s.CSSStyleSheet.prototype.insertRule===R,deleteRule:s.CSSStyleSheet.prototype.deleteRule===E}}finally{u=!1}return{insertRule:a,deleteRule:h}};let $=0;const te=U=>{$>=f0||($+=1,U.insertRule||(S=s.CSSStyleSheet.prototype.insertRule,R=v(S),s.CSSStyleSheet.prototype.insertRule=R),U.deleteRule||(C=s.CSSStyleSheet.prototype.deleteRule,E=y(C),s.CSSStyleSheet.prototype.deleteRule=E))},N=U=>{for(let D=0;D<n.styleSheets.length;D++){const J=n.styleSheets[D];if(l.has(J))continue;const Q=J.ownerNode;if(!Q||fr(Q.nodeName)!=="style"||(Q.textContent||"").trim().length)continue;const re=t.getId(Q);if(!re||re===-1)continue;let K;try{K=J.cssRules}catch(ce){continue}const se=o.get(J);if(!se){if(Array.from(K).some(ce=>td(ce))){l.add(J);continue}if(o.set(J,Array.from(K)),U)continue;he(re,K);continue}U&&K.length===se.length||ye(re,J,se,K)}};function ye(U,D,J,Q){const re=Array.from(Q);if(re.length===J.length&&re.every((ae,Pe)=>ae===J[Pe]))return;const K=new Map(re.map((ae,Pe)=>[ae,Pe])),se=new Set;let ce=-1;const Ze=[];J.forEach((ae,Pe)=>{const Te=K.get(ae);Te!==void 0&&Te>ce&&!se.has(ae)?(se.add(ae),ce=Te):Ze.push({index:Pe})}),Ze.reverse();const at=[];re.forEach((ae,Pe)=>{se.has(ae)||at.push({rule:ae.cssText,index:Pe})}),Ze.length&&e({id:U,removes:Ze}),at.length&&e({id:U,adds:at}),o.set(D,re)}function he(U,D){const J=[];for(let Q=D.length-1;Q>=0;Q--)J.push({index:Q});J.length&&e({id:U,removes:J}),e({id:U,adds:Array.from(D,(Q,re)=>({rule:Q.cssText,index:re}))})}let ve;return i>0&&(ve=s.setInterval(pe(()=>{const U=B(),D=U.insertRule&&U.deleteRule;D||te(U),N(D)}),i)),pe(()=>{ve!==void 0&&s.clearInterval(ve),f=!0;const U=s.CSSStyleSheet.prototype;$t(U,"insertRule",R,S),$t(U,"deleteRule",E,C),$t(U,"addRule",_,b),$t(U,"removeRule",V,O),Z&&$t(U,"replace",Z,q),W&&$t(U,"replaceSync",W,T),Object.entries(k).forEach(([D,J])=>{$t(J.prototype,"insertRule",M[D].insertRule,P[D].insertRule),$t(J.prototype,"deleteRule",M[D].deleteRule,P[D].deleteRule)})})}function of({mirror:e,stylesheetManager:t},r){var n,i,s;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(ue.host(r));const l=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,u=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!u?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var a;return(a=u.get)==null?void 0:a.call(this)},set(a){var h;const c=(h=u.set)==null?void 0:h.call(this,a);if(o!==null&&o!==-1)try{t.adoptStyleSheets(a,o)}catch(f){}return c}}),pe(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function m0({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:pe((l,u,a)=>{var h;const[c,f,d]=a;if(r.has(c))return s.apply(u,[c,f,d]);const{id:p,styleId:m}=Qt((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:c,value:f,priority:d},index:Hi(u.parentRule)}),l.apply(u,a)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:pe((l,u,a)=>{var h;const[c]=a;if(r.has(c))return o.apply(u,[c]);const{id:f,styleId:d}=Qt((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||d&&d!==-1)&&e({id:f,styleId:d,remove:{property:c},index:Hi(u.parentRule)}),l.apply(u,a)})}),pe(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function g0({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i,doc:s}){const o=pe(u=>Sn(pe(a=>{const h=_n(a);if(!h||Je(h,t,r,!0))return;const{currentTime:c,volume:f,muted:d,playbackRate:p,loop:m}=h;e({type:u,id:n.getId(h),currentTime:c,volume:f,muted:d,playbackRate:p,loop:m})}),i.media||500)),l=[Ke("play",o(Yr.Play),s),Ke("pause",o(Yr.Pause),s),Ke("seeked",o(Yr.Seeked),s),Ke("volumechange",o(Yr.VolumeChange),s),Ke("ratechange",o(Yr.RateChange),s)];return pe(()=>{l.forEach(u=>u())})}function y0({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(u,a,h){const c=new s(u,a,h);return i.set(c,{family:u,buffer:typeof a!="string",descriptors:h,fontSource:typeof a=="string"?a:JSON.stringify(Array.from(new Uint8Array(a)))}),c};const o=pr(t.fonts,"add",function(l){return function(u){return setTimeout(pe(()=>{const a=i.get(u);a&&(e(a),i.delete(u))}),0),l.apply(this,[u])}});return n.push(()=>{r.FontFace=s}),n.push(o),pe(()=>{n.forEach(l=>l())})}function b0(e){const{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:s}=e;let o=!0;const l=pe(()=>{const u=t.getSelection();if(!u||o&&(u!=null&&u.isCollapsed))return;o=u.isCollapsed||!1;const a=[],h=u.rangeCount||0;for(let c=0;c<h;c++){const f=u.getRangeAt(c),{startContainer:d,startOffset:p,endContainer:m,endOffset:g}=f;Je(d,n,i,!0)||Je(m,n,i,!0)||a.push({start:r.getId(d),startOffset:p,end:r.getId(m),endOffset:g})}s({ranges:a})});return l(),Ke("selectionchange",l)}function v0({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:pr(r.customElements,"define",function(i){return function(s,o,l){try{t({define:{name:s}})}catch(u){console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,l])}})}function S0(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:a,styleDeclarationCb:h,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:p}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),r(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),n(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),i(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),s(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),o(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),u(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),a(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),h(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),c(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),f(...m)},e.selectionCb=(...m)=>{t.selection&&t.selection(...m),d(...m)},e.customElementCb=(...m)=>{t.customElement&&t.customElement(...m),p(...m)}}function w0(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};S0(e,t);let n,i=()=>{};e.recordDOM&&([n,i]=rf(e,e.doc));const s=l0(e),o=u0(e),l=nf(e),u=c0(e,{win:r}),a=h0(e),h=g0(e);let c=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(c=p0(e,{win:r}),f=of(e,e.doc),d=m0(e,{win:r}),e.collectFonts&&(p=y0(e)));const m=b0(e),g=v0(e),v=[];for(const y of e.plugins)v.push(y.observer(y.callback,r,y.options));return pe(()=>{mr.forEach(y=>y.reset()),n==null||n.disconnect(),i(),s(),o(),l(),u(),a(),h(),c(),f(),d(),p(),m(),g(),v.forEach(y=>y())})}function Yi(e){return typeof window[e]!="undefined"}function Bi(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class af{constructor(t){X(this,"iframeIdToRemoteIdMap",new WeakMap),X(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,i){const s=n||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=s.get(r);return l||(l=this.generateIdFn(),s.set(r,l),o.set(l,r)),l}getIds(t,r){const n=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(s=>this.getId(t,s,n,i))}getRemoteId(t,r,n){const i=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const s=i.get(r);return s||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class _0{constructor(t){X(this,"iframes",new WeakMap),X(this,"crossOriginIframeMap",new WeakMap),X(this,"crossOriginIframeMirror",new af(ad)),X(this,"crossOriginIframeStyleMirror"),X(this,"crossOriginIframeRootIdMap",new WeakMap),X(this,"mirror"),X(this,"mutationCb"),X(this,"wrappedEmit"),X(this,"loadListener"),X(this,"stylesheetManager"),X(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new af(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,r){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.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 r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin)return;const n=t.source;if(!n)return;const i=this.crossOriginIframeMap.get(n);if(!i)return;const s=this.transformCrossOriginEvent(i,r.data.event);s&&this.wrappedEmit(s,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case ge.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:ge.IncrementalSnapshot,data:{source:fe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ge.Meta:case ge.Load:case ge.DomContentLoaded:return!1;case ge.Plugin:return r;case ge.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case ge.IncrementalSnapshot:switch(r.data.source){case fe.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(i.node,s)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case fe.Drag:case fe.TouchMove:case fe.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case fe.ViewportResize:return!1;case fe.MediaInteraction:case fe.MouseInteraction:case fe.Scroll:case fe.CanvasMutation:case fe.Input:return this.replaceIds(r.data,t,["id"]),r;case fe.StyleSheetRule:case fe.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case fe.Font:return r;case fe.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case fe.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,n,i){for(const s of i)!Array.isArray(r[s])&&typeof r[s]!="number"||(Array.isArray(r[s])?r[s]=t.getIds(n,r[s]):r[s]=t.getId(n,r[s]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==jh.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class R0{constructor(t){X(this,"shadowDoms",new WeakSet),X(this,"mutationCb"),X(this,"scrollCb"),X(this,"bypassOptions"),X(this,"mirror"),X(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,r){if(!mn(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[n]=rf(Y(x({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(nf(Y(x({},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(ue.host(t))),this.restoreHandlers.push(of({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(pr(t.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s),l=ue.shadowRoot(this);return l&&Kh(this)&&n.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T0=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),zi=0;zi<Br.length;zi++)T0[Br.charCodeAt(zi)]=zi;var E0=function(e){var t=new Uint8Array(e),r,n=t.length,i="";for(r=0;r<n;r+=3)i+=Br[t[r]>>2],i+=Br[(t[r]&3)<<4|t[r+1]>>4],i+=Br[(t[r+1]&15)<<2|t[r+2]>>6],i+=Br[t[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const lf=new Map;function I0(e,t){let r=lf.get(e);return r||(r=new Map,lf.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const uf=(e,t,r)=>{if(!e||!(df(e,t)||typeof e=="object"))return;const n=e.constructor.name,i=I0(r,n);let s=i.indexOf(e);return s===-1&&(s=i.length,i.push(e)),s};function Ki(e,t,r){if(e instanceof Array)return e.map(n=>Ki(n,t,r));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 n=e.constructor.name,i=E0(e);return{rr_type:n,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ki(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",i=e.toDataURL();return{rr_type:n,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ki(e.data,t,r),e.width,e.height]};if(df(e,t)||typeof e=="object"){const n=e.constructor.name,i=uf(e,t,r);return{rr_type:n,index:i}}}}return e}const cf=(e,t,r)=>e.map(n=>Ki(n,t,r)),df=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function C0(e,t,r,n){const i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=pr(t.CanvasRenderingContext2D.prototype,o,function(u){return function(...a){return Je(this.canvas,r,n,!0)||setTimeout(()=>{const h=cf(a,t,this);e(this.canvas,{type:Hr["2D"],property:o,args:h})},0),u.apply(this,a)}});i.push(l)}catch(l){const u=Ji(t.CanvasRenderingContext2D.prototype,o,{set(a){e(this.canvas,{type:Hr["2D"],property:o,args:[a],setter:!0})}});i.push(u)}return()=>{i.forEach(o=>o())}}function Z0(e){return e==="experimental-webgl"?"webgl":e}function hf(e,t,r,n){const i=[];try{const s=pr(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...u){if(!Je(this,t,r,!0)){const a=Z0(l);if("__context"in this||(this.__context=a),n&&["webgl","webgl2"].includes(a))if(u[0]&&typeof u[0]=="object"){const h=u[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...u])}});i.push(s)}catch(s){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function ff(e,t,r,n,i,s){const o=[],l=Object.getOwnPropertyNames(e);for(const u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const a=pr(e,u,function(h){return function(...c){const f=h.apply(this,c);if(uf(f,s,this),"tagName"in this.canvas&&!Je(this.canvas,n,i,!0)){const d=cf(c,s,this),p={type:t,property:u,args:d};r(this.canvas,p)}return f}});o.push(a)}catch(a){const h=Ji(e,u,{set(c){r(this.canvas,{type:t,property:u,args:[c],setter:!0})}});o.push(h)}return o}function L0(e,t,r,n){const i=[];return typeof t.WebGLRenderingContext!="undefined"&&i.push(...ff(t.WebGLRenderingContext.prototype,Hr.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...ff(t.WebGL2RenderingContext.prototype,Hr.WebGL2,e,r,n,t)),()=>{i.forEach(s=>s())}}const pf=`(function() {
|
|
114
114
|
"use strict";
|
|
115
115
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
116
116
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -210,14 +210,14 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
210
210
|
};
|
|
211
211
|
})();
|
|
212
212
|
//# sourceMappingURL=image-bitmap-data-url-worker-DwtK8A0z.js.map
|
|
213
|
-
`,pf=typeof self!="undefined"&&self.Blob&&new Blob([ff],{type:"text/javascript;charset=utf-8"});function I0(e){let t;try{if(t=pf&&(self.URL||self.webkitURL).createObjectURL(pf),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ff),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class C0{constructor(t){X(this,"pendingCanvasMutations",new Map),X(this,"rafStamps",{latestId:0,invokeId:null}),X(this,"mirror"),X(this,"logger"),X(this,"worker"),X(this,"snapshotInProgressMap",new Map),X(this,"lastSnapshotTime",new Map),X(this,"options"),X(this,"mutationCb"),X(this,"resetObservers"),X(this,"frozen",!1),X(this,"locked",!1),X(this,"processMutation",(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)});const{sampling:r,win:n,blockClass:i,blockSelector:s,recordCanvas:o,recordLocalVideos:l,recordRemoteVideos:u,initialSnapshotDelay:a,dataURLOptions:h}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new I0,this.worker.onmessage=c=>{const{id:f}=c.data;if(this.snapshotInProgressMap.set(f,!1),!("base64"in c.data)){this.debug(null,"canvas worker received empty message",{id:f,data:c.data,status:c.data.status});return}const{base64:d,type:p,dx:m,dy:g,dw:v,dh:y}=c.data,w={id:f,type:Hr["2D"],commands:[{property:"clearRect",args:[m,g,v,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:p}]},m,g,v,y]}]};this.debug(null,"canvas worker recording mutation",w),this.mutationCb(w)},this.options=t,o&&r==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:r}),this.initCanvasMutationObserver(n,i,s)):o&&typeof r=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:r}),this.initCanvasFPSObserver(l,u,r,n,i,s,{initialSnapshotDelay:a,dataURLOptions:h},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,...r){if(!this.logger)return;const n=this.mirror.getId(t);let i="[highlight-canvas-manager]";t&&(i=`[highlight-canvas] [id:${n}]`,t.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${t.__context}]`)),this.logger.debug(i,t,...r)}snapshot(t){return z(this,null,function*(){var r;const n=this.mirror.getId(t);if(this.snapshotInProgressMap.get(n)){this.debug(t,"snapshotting already in progress for",n);return}const i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),s=this.lastSnapshotTime.get(n);if(!(s&&new Date().getTime()-s<i)){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(n,new Date().getTime()),this.snapshotInProgressMap.set(n,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const h=t.getContext(t.__context);((r=h==null?void 0:h.getContextAttributes())==null?void 0:r.preserveDrawingBuffer)===!1&&(h.clear(h.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:h==null?void 0:h.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let o=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const h=Math.max(t.width,t.height);o=Math.min(o,this.options.maxSnapshotDimension/h)}const l=t.width*o,u=t.height*o,a=yield createImageBitmap(t,{resizeWidth:l,resizeHeight:u});this.debug(t,"created image bitmap",{width:a.width,height:a.height}),this.worker.postMessage({id:n,bitmap:a,width:l,height:u,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[a]),this.debug(t,"sent message")}catch(o){this.debug(t,"failed to snapshot",o)}finally{this.snapshotInProgressMap.set(n,!1)}}})}initCanvasFPSObserver(t,r,n,i,s,o,l,u,a){const h=df(i,s,o,!0),c=1e3/n;let f=0,d;const p=new Map,m=(w,_)=>{const S=[];w.querySelectorAll(_).forEach(I=>S.push(I));const b=document.createNodeIterator(w,Node.ELEMENT_NODE);let R;for(;R=b.nextNode();)R!=null&&R.shadowRoot&&S.push(...m(R.shadowRoot,_));return S},g=w=>{const _=[];return m(i.document,"canvas").forEach(S=>{if(!Je(S,s,o,!0)){this.debug(S,"discovered canvas"),_.push(S);const b=this.mirror.getId(S);p.has(b)||p.set(b,w)}}),_},v=w=>{const _=[];return(t||r)&&m(i.document,"video").forEach(S=>{if(!(!r&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!t&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!Je(S,s,o,!0)){_.push(S);const b=this.mirror.getId(S);p.has(b)||p.set(b,w)}}),_},y=w=>z(this,null,function*(){if(f&&w-f<c){d=requestAnimationFrame(b=>void y(b));return}f=w;const _=b=>{const R=this.mirror.getId(b),I=p.get(R),E=!l.initialSnapshotDelay||w-I>l.initialSnapshotDelay;return this.debug(b,{delay:l.initialSnapshotDelay,delta:w-I,hadLoadingTime:E}),E},S=[];S.push(...g(w).filter(_).map(b=>this.snapshot(b))),S.push(...v(w).filter(_).map(b=>z(this,null,function*(){this.debug(b,"starting video snapshotting");const R=this.mirror.getId(b);if(this.snapshotInProgressMap.get(R)){this.debug(b,"video snapshotting already in progress for",R);return}this.snapshotInProgressMap.set(R,!0);try{const{width:I,height:E}=b.getBoundingClientRect(),{actualWidth:C,actualHeight:O}={actualWidth:b.videoWidth,actualHeight:b.videoHeight},V=Math.max(C,O);if(V===0){this.debug(b,"not yet ready",{width:b.width,height:b.height,actualWidth:C,actualHeight:O,boxWidth:I,boxHeight:E});return}let q=u||1;a&&(q=Math.min(q,a/V));const Z=C*q,T=O*q,W=yield createImageBitmap(b,{resizeWidth:Z,resizeHeight:T}),k=Math.max(I,E)/V,P=C*k,M=O*k,B=(I-P)/2,$=(E-M)/2;this.debug(b,"created image bitmap",{actualWidth:C,actualHeight:O,boxWidth:I,boxHeight:E,outputWidth:P,outputHeight:M,resizeWidth:Z,resizeHeight:T,scale:q,outputScale:k,offsetX:B,offsetY:$}),this.worker.postMessage({id:R,bitmap:W,width:Z,height:T,dx:B,dy:$,dw:P,dh:M,dataURLOptions:l.dataURLOptions,logDebug:!!this.logger},[W]),this.debug(b,"send message")}catch(I){this.debug(b,"failed to snapshot",I)}finally{this.snapshotInProgressMap.set(R,!1)}}))),yield Promise.all(S).catch(console.error),d=requestAnimationFrame(b=>void y(b))});d=requestAnimationFrame(w=>void y(w)),this.resetObservers=()=>{h(),d&&cancelAnimationFrame(d)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=df(t,r,n,!1),s=_0(this.processMutation.bind(this),t,r,n),o=E0(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const i=n.map(o=>{const a=o,{type:l}=a;return rt(a,["type"])}),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:i}),this.pendingCanvasMutations.delete(t)}}class Z0{constructor(t){X(this,"trackedLinkElements",new WeakSet),X(this,"mutationCb"),X(this,"adoptedStyleSheetCb"),X(this,"styleMirror",new KS),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},i=[];for(const s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(l,u)=>({rule:qc(l,s.href),index:u}))})),n.styleIds.push(o)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class L0{constructor(){X(this,"nodeMap",new WeakMap),X(this,"active",!1)}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let Le,Ki,_n,ji=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Fc=e.contentWindow)==null?void 0:Fc.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Et=Vv();function dt(e={}){var t;const{emit:r,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:s="highlight-block",blockSelector:o=null,ignoreClass:l="highlight-ignore",ignoreSelector:u=null,maskTextClass:a="highlight-mask",maskTextSelector:h=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:p,maskInputFn:m,maskTextFn:g=Oo,hooks:v,packFn:y,sampling:w={},mousemoveWait:_,recordDOM:S=!0,recordCanvas:b=!1,recordCrossOriginIframes:R=!1,recordAfter:I=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:E=!1,collectFonts:C=!1,inlineImages:O=!1,inlineVideos:V=!1,plugins:q,keepIframeSrcFn:Z=()=>!1,privacySetting:T="default",ignoreCSSAttributes:W=new Set([]),styleSheetResyncInterval:k=2e3,errorHandler:P,logger:M}=e,B=x(x({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);r0(P);const $=R?window.parent===window:!0;let te=!1;if(!$)try{window.parent.document&&(te=!1)}catch(ae){te=!0}if($&&!r)throw new Error("emit function is required");if(!$&&!te)return()=>{};_!==void 0&&w.mousemove===void 0&&(w.mousemove=_),Et.reset();const N=f===!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!==void 0?d:{password:!0},ye=fd(p);zS();let he,ve=0;const U=ae=>{for(const Pe of q||[])Pe.eventProcessor&&(ae=Pe.eventProcessor(ae));return y&&!te&&(ae=y(ae)),ae};Le=(ae,Pe)=>{var Te;const Oe=ae;if(Oe.timestamp=vn(),(Te=mr[0])!=null&&Te.isFrozen()&&Oe.type!==ge.FullSnapshot&&!(Oe.type===ge.IncrementalSnapshot&&Oe.data.source===fe.Mutation)&&mr.forEach(lt=>lt.unfreeze()),$)r==null||r(U(Oe),Pe);else if(te){const lt={type:"rrweb",event:U(Oe),origin:window.location.origin,isCheckout:Pe};window.parent.postMessage(lt,"*")}if(Oe.type===ge.FullSnapshot)he=Oe,ve=0;else if(Oe.type===ge.IncrementalSnapshot){if(Oe.data.source===fe.Mutation&&Oe.data.isAttachIframe)return;ve++;const lt=i&&ve>=i,Se=n&&Oe.timestamp-he.timestamp>n;(lt||Se)&&Ki(!0)}};const D=ae=>{Le({type:ge.IncrementalSnapshot,data:x({source:fe.Mutation},ae)})},J=ae=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.Scroll},ae)}),Q=ae=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.CanvasMutation},ae)}),re=ae=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.AdoptedStyleSheet},ae)}),K=new Z0({mutationCb:D,adoptedStyleSheetCb:re}),se=new b0({mirror:Et,mutationCb:D,stylesheetManager:K,recordCrossOriginIframes:R,wrappedEmit:Le});for(const ae of q||[])ae.getMirror&&ae.getMirror({nodeMirror:Et,crossOriginIframeMirror:se.crossOriginIframeMirror,crossOriginIframeStyleMirror:se.crossOriginIframeStyleMirror});const ce=new L0,Ce=typeof(w==null?void 0:w.canvas)=="object"?w.canvas:{fps:w==null?void 0:w.canvas};_n=new C0({recordCanvas:b,recordLocalVideos:O,recordRemoteVideos:V,mutationCb:Q,win:window,blockClass:s,blockSelector:o,mirror:Et,sampling:Ce.fps,samplingManual:Ce.fpsManual,clearWebGLBuffer:Ce.clearWebGLBuffer,initialSnapshotDelay:Ce.initialSnapshotDelay,dataURLOptions:B,resizeFactor:Ce.resizeFactor,maxSnapshotDimension:Ce.maxSnapshotDimension,logger:M});const at=new v0({mutationCb:D,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:c,maskInputOptions:N,dataURLOptions:B,maskTextFn:g,maskInputFn:m,recordCanvas:b,inlineImages:O,inlineVideos:V,privacySetting:T,sampling:w,slimDOMOptions:ye,iframeManager:se,stylesheetManager:K,canvasManager:_n,keepIframeSrcFn:Z,processedNodeManager:ce},mirror:Et});Ki=(ae=!1)=>{if(!S)return;Le({type:ge.Meta,data:{href:window.location.href,width:Dh(),height:Uh()}},ae),K.reset(),at.init(),mr.forEach(Te=>Te.lock());const Pe=dS(document,{mirror:Et,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:c,maskAllInputs:N,maskTextFn:g,maskInputFn:m,slimDOM:ye,dataURLOptions:B,recordCanvas:b,inlineImages:O,inlineVideos:V,privacySetting:T,onSerialize:Te=>{Hh(Te,Et)&&se.addIframe(Te),Yh(Te,Et)&&K.trackLinkElement(Te),qa(Te)&&at.addShadowRoot(ue.shadowRoot(Te),document)},onIframeLoad:(Te,Oe)=>{se.attachIframe(Te,Oe),at.observeAttachShadow(Te)},onStylesheetLoad:(Te,Oe)=>{K.attachLinkElement(Te,Oe)},keepIframeSrcFn:Z});if(!Pe)return console.warn("Failed to snapshot the document");Le({type:ge.FullSnapshot,data:{node:Pe,initialOffset:Ah(window)}},ae),mr.forEach(Te=>Te.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,Et.getId(document))};try{const ae=[],Pe=Oe=>{var lt;return pe(y0)({mutationCb:D,mousemoveCb:(Se,vc)=>Le({type:ge.IncrementalSnapshot,data:{source:vc,positions:Se}}),mouseInteractionCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.MouseInteraction},Se)}),scrollCb:J,viewportResizeCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.ViewportResize},Se)}),inputCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.Input},Se)}),mediaInteractionCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.MediaInteraction},Se)}),styleSheetRuleCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.StyleSheetRule},Se)}),styleDeclarationCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.StyleDeclaration},Se)}),canvasMutationCb:Q,fontCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:fe.Font},Se)}),selectionCb:Se=>{Le({type:ge.IncrementalSnapshot,data:x({source:fe.Selection},Se)})},customElementCb:Se=>{Le({type:ge.IncrementalSnapshot,data:x({source:fe.CustomElement},Se)})},blockClass:s,ignoreClass:l,ignoreSelector:u,maskTextClass:a,maskTextSelector:h,maskInputOptions:N,inlineStylesheet:c,sampling:w,recordDOM:S,recordCanvas:b,inlineImages:O,inlineVideos:V,userTriggeredOnInput:E,collectFonts:C,doc:Oe,maskInputFn:m,maskTextFn:g,keepIframeSrcFn:Z,blockSelector:o,slimDOMOptions:ye,dataURLOptions:B,mirror:Et,iframeManager:se,stylesheetManager:K,shadowDomManager:at,processedNodeManager:ce,canvasManager:_n,ignoreCSSAttributes:W,styleSheetResyncInterval:k,privacySetting:T,plugins:((lt=q==null?void 0:q.filter(Se=>Se.observer))==null?void 0:lt.map(Se=>({observer:Se.observer,options:Se.options,callback:vc=>Le({type:ge.Plugin,data:{plugin:Se.name,payload:vc}})})))||[]},v)};se.addLoadListener(Oe=>{try{ae.push(Pe(Oe.contentDocument))}catch(lt){console.warn(lt)}});const Te=()=>{Ki(),ae.push(Pe(document)),ji=!0};return["interactive","complete"].includes(document.readyState)?Te():(ae.push(Ke("DOMContentLoaded",()=>{Le({type:ge.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&Te()})),ae.push(Ke("load",()=>{Le({type:ge.Load,data:{}}),I==="load"&&Te()},window))),()=>{ae.forEach(Oe=>{try{Oe()}catch(lt){String(lt).toLowerCase().includes("cross-origin")||console.warn(lt)}}),ce.destroy(),ji=!1,n0()}}catch(ae){console.warn(ae)}}dt.addCustomEvent=(e,t)=>{ji&&Le({type:ge.Custom,data:{tag:e,payload:t}})},dt.freezePage=()=>{mr.forEach(e=>e.freeze())},dt.takeFullSnapshot=e=>{if(!ji)throw new Error("please take full snapshot after start recording");Ki(e)},dt.snapshotCanvas=e=>z(this,null,function*(){if(!_n)throw new Error("canvas manager is not initialized");yield _n.snapshot(e)}),dt.mirror=Et;var mf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(mf||(mf={}));const{addCustomEvent:Qi}=dt;var $i=function(){return $i=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},$i.apply(this,arguments)},qi=new Map,tl=new Map,gf=!0,es=!1;function yf(e){return e.replace(/[\s,]+/g," ").trim()}function x0(e){return yf(e.source.body.substring(e.start,e.end))}function N0(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,s=x0(n.loc),o=tl.get(i);o&&!o.has(s)?gf&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
213
|
+
`,mf=typeof self!="undefined"&&self.Blob&&new Blob([pf],{type:"text/javascript;charset=utf-8"});function x0(e){let t;try{if(t=mf&&(self.URL||self.webkitURL).createObjectURL(mf),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(pf),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class N0{constructor(t){X(this,"pendingCanvasMutations",new Map),X(this,"rafStamps",{latestId:0,invokeId:null}),X(this,"mirror"),X(this,"logger"),X(this,"worker"),X(this,"snapshotInProgressMap",new Map),X(this,"lastSnapshotTime",new Map),X(this,"options"),X(this,"mutationCb"),X(this,"resetObservers"),X(this,"frozen",!1),X(this,"locked",!1),X(this,"processMutation",(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)});const{sampling:r,win:n,blockClass:i,blockSelector:s,recordCanvas:o,recordLocalVideos:l,recordRemoteVideos:u,initialSnapshotDelay:a,dataURLOptions:h}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new x0,this.worker.onmessage=c=>{const{id:f}=c.data;if(this.snapshotInProgressMap.set(f,!1),!("base64"in c.data)){this.debug(null,"canvas worker received empty message",{id:f,data:c.data,status:c.data.status});return}const{base64:d,type:p,dx:m,dy:g,dw:v,dh:y}=c.data,w={id:f,type:Hr["2D"],commands:[{property:"clearRect",args:[m,g,v,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:p}]},m,g,v,y]}]};this.debug(null,"canvas worker recording mutation",w),this.mutationCb(w)},this.options=t,o&&r==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:r}),this.initCanvasMutationObserver(n,i,s)):o&&typeof r=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:r}),this.initCanvasFPSObserver(l,u,r,n,i,s,{initialSnapshotDelay:a,dataURLOptions:h},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,...r){if(!this.logger)return;const n=this.mirror.getId(t);let i="[highlight-canvas-manager]";t&&(i=`[highlight-canvas] [id:${n}]`,t.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${t.__context}]`)),this.logger.debug(i,t,...r)}snapshot(t){return z(this,null,function*(){var r;const n=this.mirror.getId(t);if(this.snapshotInProgressMap.get(n)){this.debug(t,"snapshotting already in progress for",n);return}const i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),s=this.lastSnapshotTime.get(n);if(!(s&&new Date().getTime()-s<i)){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(n,new Date().getTime()),this.snapshotInProgressMap.set(n,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const h=t.getContext(t.__context);((r=h==null?void 0:h.getContextAttributes())==null?void 0:r.preserveDrawingBuffer)===!1&&(h.clear(h.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:h==null?void 0:h.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let o=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const h=Math.max(t.width,t.height);o=Math.min(o,this.options.maxSnapshotDimension/h)}const l=t.width*o,u=t.height*o,a=yield createImageBitmap(t,{resizeWidth:l,resizeHeight:u});this.debug(t,"created image bitmap",{width:a.width,height:a.height}),this.worker.postMessage({id:n,bitmap:a,width:l,height:u,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[a]),this.debug(t,"sent message")}catch(o){this.debug(t,"failed to snapshot",o)}finally{this.snapshotInProgressMap.set(n,!1)}}})}initCanvasFPSObserver(t,r,n,i,s,o,l,u,a){const h=hf(i,s,o,!0),c=1e3/n;let f=0,d;const p=new Map,m=(w,R)=>{const S=[];w.querySelectorAll(R).forEach(I=>S.push(I));const b=document.createNodeIterator(w,Node.ELEMENT_NODE);let _;for(;_=b.nextNode();)_!=null&&_.shadowRoot&&S.push(...m(_.shadowRoot,R));return S},g=w=>{const R=[];return m(i.document,"canvas").forEach(S=>{if(!Je(S,s,o,!0)){this.debug(S,"discovered canvas"),R.push(S);const b=this.mirror.getId(S);p.has(b)||p.set(b,w)}}),R},v=w=>{const R=[];return(t||r)&&m(i.document,"video").forEach(S=>{if(!(!r&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!t&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!Je(S,s,o,!0)){R.push(S);const b=this.mirror.getId(S);p.has(b)||p.set(b,w)}}),R},y=w=>z(this,null,function*(){if(f&&w-f<c){d=requestAnimationFrame(b=>void y(b));return}f=w;const R=b=>{const _=this.mirror.getId(b),I=p.get(_),E=!l.initialSnapshotDelay||w-I>l.initialSnapshotDelay;return this.debug(b,{delay:l.initialSnapshotDelay,delta:w-I,hadLoadingTime:E}),E},S=[];S.push(...g(w).filter(R).map(b=>this.snapshot(b))),S.push(...v(w).filter(R).map(b=>z(this,null,function*(){this.debug(b,"starting video snapshotting");const _=this.mirror.getId(b);if(this.snapshotInProgressMap.get(_)){this.debug(b,"video snapshotting already in progress for",_);return}this.snapshotInProgressMap.set(_,!0);try{const{width:I,height:E}=b.getBoundingClientRect(),{actualWidth:C,actualHeight:O}={actualWidth:b.videoWidth,actualHeight:b.videoHeight},V=Math.max(C,O);if(V===0){this.debug(b,"not yet ready",{width:b.width,height:b.height,actualWidth:C,actualHeight:O,boxWidth:I,boxHeight:E});return}let q=u||1;a&&(q=Math.min(q,a/V));const Z=C*q,T=O*q,W=yield createImageBitmap(b,{resizeWidth:Z,resizeHeight:T}),k=Math.max(I,E)/V,P=C*k,M=O*k,B=(I-P)/2,$=(E-M)/2;this.debug(b,"created image bitmap",{actualWidth:C,actualHeight:O,boxWidth:I,boxHeight:E,outputWidth:P,outputHeight:M,resizeWidth:Z,resizeHeight:T,scale:q,outputScale:k,offsetX:B,offsetY:$}),this.worker.postMessage({id:_,bitmap:W,width:Z,height:T,dx:B,dy:$,dw:P,dh:M,dataURLOptions:l.dataURLOptions,logDebug:!!this.logger},[W]),this.debug(b,"send message")}catch(I){this.debug(b,"failed to snapshot",I)}finally{this.snapshotInProgressMap.set(_,!1)}}))),yield Promise.all(S).catch(console.error),d=requestAnimationFrame(b=>void y(b))});d=requestAnimationFrame(w=>void y(w)),this.resetObservers=()=>{h(),d&&cancelAnimationFrame(d)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=hf(t,r,n,!1),s=C0(this.processMutation.bind(this),t,r,n),o=L0(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const i=n.map(o=>{const a=o,{type:l}=a;return rt(a,["type"])}),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:i}),this.pendingCanvasMutations.delete(t)}}class O0{constructor(t){X(this,"trackedLinkElements",new WeakSet),X(this,"mutationCb"),X(this,"adoptedStyleSheetCb"),X(this,"styleMirror",new qS),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},i=[];for(const s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(l,u)=>({rule:ed(l,s.href),index:u}))})),n.styleIds.push(o)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class G0{constructor(){X(this,"nodeMap",new WeakMap),X(this,"active",!1)}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let xe,ji,Rn,Qi=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Jc=e.contentWindow)==null?void 0:Jc.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Et=Pv();function dt(e={}){var t;const{emit:r,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:s="highlight-block",blockSelector:o=null,ignoreClass:l="highlight-ignore",ignoreSelector:u=null,maskTextClass:a="highlight-mask",maskTextSelector:h=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:p,maskInputFn:m,maskTextFn:g=Vo,hooks:v,packFn:y,sampling:w={},mousemoveWait:R,recordDOM:S=!0,recordCanvas:b=!1,recordCrossOriginIframes:_=!1,recordAfter:I=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:E=!1,collectFonts:C=!1,inlineImages:O=!1,inlineVideos:V=!1,plugins:q,keepIframeSrcFn:Z=()=>!1,privacySetting:T="default",ignoreCSSAttributes:W=new Set([]),styleSheetResyncInterval:k=2e3,errorHandler:P,logger:M}=e,B=x(x({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);o0(P);const $=_?window.parent===window:!0;let te=!1;if(!$)try{window.parent.document&&(te=!1)}catch(ae){te=!0}if($&&!r)throw new Error("emit function is required");if(!$&&!te)return()=>{};R!==void 0&&w.mousemove===void 0&&(w.mousemove=R),Et.reset();const N=f===!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!==void 0?d:{password:!0},ye=pd(p);$S();let he,ve=0;const U=ae=>{for(const Pe of q||[])Pe.eventProcessor&&(ae=Pe.eventProcessor(ae));return y&&!te&&(ae=y(ae)),ae};xe=(ae,Pe)=>{var Te;const Ge=ae;if(Ge.timestamp=vn(),(Te=mr[0])!=null&&Te.isFrozen()&&Ge.type!==ge.FullSnapshot&&!(Ge.type===ge.IncrementalSnapshot&&Ge.data.source===fe.Mutation)&&mr.forEach(lt=>lt.unfreeze()),$)r==null||r(U(Ge),Pe);else if(te){const lt={type:"rrweb",event:U(Ge),origin:window.location.origin,isCheckout:Pe};window.parent.postMessage(lt,"*")}if(Ge.type===ge.FullSnapshot)he=Ge,ve=0;else if(Ge.type===ge.IncrementalSnapshot){if(Ge.data.source===fe.Mutation&&Ge.data.isAttachIframe)return;ve++;const lt=i&&ve>=i,Se=n&&Ge.timestamp-he.timestamp>n;(lt||Se)&&ji(!0)}};const D=ae=>{xe({type:ge.IncrementalSnapshot,data:x({source:fe.Mutation},ae)})},J=ae=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.Scroll},ae)}),Q=ae=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.CanvasMutation},ae)}),re=ae=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.AdoptedStyleSheet},ae)}),K=new O0({mutationCb:D,adoptedStyleSheetCb:re}),se=new _0({mirror:Et,mutationCb:D,stylesheetManager:K,recordCrossOriginIframes:_,wrappedEmit:xe});for(const ae of q||[])ae.getMirror&&ae.getMirror({nodeMirror:Et,crossOriginIframeMirror:se.crossOriginIframeMirror,crossOriginIframeStyleMirror:se.crossOriginIframeStyleMirror});const ce=new G0,Ze=typeof(w==null?void 0:w.canvas)=="object"?w.canvas:{fps:w==null?void 0:w.canvas};Rn=new N0({recordCanvas:b,recordLocalVideos:O,recordRemoteVideos:V,mutationCb:Q,win:window,blockClass:s,blockSelector:o,mirror:Et,sampling:Ze.fps,samplingManual:Ze.fpsManual,clearWebGLBuffer:Ze.clearWebGLBuffer,initialSnapshotDelay:Ze.initialSnapshotDelay,dataURLOptions:B,resizeFactor:Ze.resizeFactor,maxSnapshotDimension:Ze.maxSnapshotDimension,logger:M});const at=new R0({mutationCb:D,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:c,maskInputOptions:N,dataURLOptions:B,maskTextFn:g,maskInputFn:m,recordCanvas:b,inlineImages:O,inlineVideos:V,privacySetting:T,sampling:w,slimDOMOptions:ye,iframeManager:se,stylesheetManager:K,canvasManager:Rn,keepIframeSrcFn:Z,processedNodeManager:ce},mirror:Et});ji=(ae=!1)=>{if(!S)return;xe({type:ge.Meta,data:{href:window.location.href,width:Fh(),height:Dh()}},ae),K.reset(),at.init(),mr.forEach(Te=>Te.lock());const Pe=mS(document,{mirror:Et,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:c,maskAllInputs:N,maskTextFn:g,maskInputFn:m,slimDOM:ye,dataURLOptions:B,recordCanvas:b,inlineImages:O,inlineVideos:V,privacySetting:T,onSerialize:Te=>{Yh(Te,Et)&&se.addIframe(Te),Bh(Te,Et)&&K.trackLinkElement(Te),tl(Te)&&at.addShadowRoot(ue.shadowRoot(Te),document)},onIframeLoad:(Te,Ge)=>{se.attachIframe(Te,Ge),at.observeAttachShadow(Te)},onStylesheetLoad:(Te,Ge)=>{K.attachLinkElement(Te,Ge)},keepIframeSrcFn:Z});if(!Pe)return console.warn("Failed to snapshot the document");xe({type:ge.FullSnapshot,data:{node:Pe,initialOffset:Uh(window)}},ae),mr.forEach(Te=>Te.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,Et.getId(document))};try{const ae=[],Pe=Ge=>{var lt;return pe(w0)({mutationCb:D,mousemoveCb:(Se,Sc)=>xe({type:ge.IncrementalSnapshot,data:{source:Sc,positions:Se}}),mouseInteractionCb:Se=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.MouseInteraction},Se)}),scrollCb:J,viewportResizeCb:Se=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.ViewportResize},Se)}),inputCb:Se=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.Input},Se)}),mediaInteractionCb:Se=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.MediaInteraction},Se)}),styleSheetRuleCb:Se=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.StyleSheetRule},Se)}),styleDeclarationCb:Se=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.StyleDeclaration},Se)}),canvasMutationCb:Q,fontCb:Se=>xe({type:ge.IncrementalSnapshot,data:x({source:fe.Font},Se)}),selectionCb:Se=>{xe({type:ge.IncrementalSnapshot,data:x({source:fe.Selection},Se)})},customElementCb:Se=>{xe({type:ge.IncrementalSnapshot,data:x({source:fe.CustomElement},Se)})},blockClass:s,ignoreClass:l,ignoreSelector:u,maskTextClass:a,maskTextSelector:h,maskInputOptions:N,inlineStylesheet:c,sampling:w,recordDOM:S,recordCanvas:b,inlineImages:O,inlineVideos:V,userTriggeredOnInput:E,collectFonts:C,doc:Ge,maskInputFn:m,maskTextFn:g,keepIframeSrcFn:Z,blockSelector:o,slimDOMOptions:ye,dataURLOptions:B,mirror:Et,iframeManager:se,stylesheetManager:K,shadowDomManager:at,processedNodeManager:ce,canvasManager:Rn,ignoreCSSAttributes:W,styleSheetResyncInterval:k,privacySetting:T,plugins:((lt=q==null?void 0:q.filter(Se=>Se.observer))==null?void 0:lt.map(Se=>({observer:Se.observer,options:Se.options,callback:Sc=>xe({type:ge.Plugin,data:{plugin:Se.name,payload:Sc}})})))||[]},v)};se.addLoadListener(Ge=>{try{ae.push(Pe(Ge.contentDocument))}catch(lt){console.warn(lt)}});const Te=()=>{ji(),ae.push(Pe(document)),Qi=!0};return["interactive","complete"].includes(document.readyState)?Te():(ae.push(Ke("DOMContentLoaded",()=>{xe({type:ge.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&Te()})),ae.push(Ke("load",()=>{xe({type:ge.Load,data:{}}),I==="load"&&Te()},window))),()=>{ae.forEach(Ge=>{try{Ge()}catch(lt){String(lt).toLowerCase().includes("cross-origin")||console.warn(lt)}}),ce.destroy(),Qi=!1,a0()}}catch(ae){console.warn(ae)}}dt.addCustomEvent=(e,t)=>{Qi&&xe({type:ge.Custom,data:{tag:e,payload:t}})},dt.freezePage=()=>{mr.forEach(e=>e.freeze())},dt.takeFullSnapshot=e=>{if(!Qi)throw new Error("please take full snapshot after start recording");ji(e)},dt.snapshotCanvas=e=>z(this,null,function*(){if(!Rn)throw new Error("canvas manager is not initialized");yield Rn.snapshot(e)}),dt.mirror=Et;var gf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(gf||(gf={}));const{addCustomEvent:$i}=dt;var qi=function(){return qi=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},qi.apply(this,arguments)},es=new Map,nl=new Map,yf=!0,ts=!1;function bf(e){return e.replace(/[\s,]+/g," ").trim()}function V0(e){return bf(e.source.body.substring(e.start,e.end))}function k0(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,s=V0(n.loc),o=nl.get(i);o&&!o.has(s)?yf&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
214
214
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
215
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||
|
|
215
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||nl.set(i,o=new Set),o.add(s),t.has(s)||(t.add(s),r.push(n))}else r.push(n)}),qi(qi({},e),{definitions:r})}function X0(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var s=n[i];s&&typeof s=="object"&&t.add(s)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function W0(e){var t=bf(e);if(!es.has(t)){var r=Mc(e,{experimentalFragmentVariables:ts,allowLegacyFragmentVariables:ts});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");es.set(t,X0(k0(r)))}return es.get(t)}function je(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,s){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[s+1]}),W0(n)}function P0(){es.clear(),nl.clear()}function M0(){yf=!1}function A0(){ts=!0}function U0(){ts=!1}var Tn={gql:je,resetCaches:P0,disableFragmentWarnings:M0,enableExperimentalFragmentVariables:A0,disableExperimentalFragmentVariables:U0};(function(e){e.gql=Tn.gql,e.resetCaches=Tn.resetCaches,e.disableFragmentWarnings=Tn.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Tn.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Tn.disableExperimentalFragmentVariables})(je||(je={})),je.default=je;const vf=je`
|
|
216
216
|
fragment MatchParts on MatchConfig {
|
|
217
217
|
regexValue
|
|
218
218
|
matchValue
|
|
219
219
|
}
|
|
220
|
-
`,
|
|
220
|
+
`,D0=je`
|
|
221
221
|
mutation PushPayload(
|
|
222
222
|
$session_secure_id: String!
|
|
223
223
|
$payload_id: ID!
|
|
@@ -243,7 +243,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
243
243
|
highlight_logs: $highlight_logs
|
|
244
244
|
)
|
|
245
245
|
}
|
|
246
|
-
`,
|
|
246
|
+
`,il=je`
|
|
247
247
|
mutation PushSessionEvents(
|
|
248
248
|
$session_secure_id: String!
|
|
249
249
|
$payload_id: Int64ID!
|
|
@@ -255,7 +255,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
255
255
|
data: $data
|
|
256
256
|
)
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,F0=je`
|
|
259
259
|
mutation identifySession(
|
|
260
260
|
$session_secure_id: String!
|
|
261
261
|
$user_identifier: String!
|
|
@@ -267,7 +267,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
267
267
|
user_object: $user_object
|
|
268
268
|
)
|
|
269
269
|
}
|
|
270
|
-
`,
|
|
270
|
+
`,J0=je`
|
|
271
271
|
mutation addSessionProperties(
|
|
272
272
|
$session_secure_id: String!
|
|
273
273
|
$properties_object: Any
|
|
@@ -277,11 +277,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
277
277
|
properties_object: $properties_object
|
|
278
278
|
)
|
|
279
279
|
}
|
|
280
|
-
`,
|
|
280
|
+
`,H0=je`
|
|
281
281
|
mutation pushMetrics($metrics: [MetricInput]!) {
|
|
282
282
|
pushMetrics(metrics: $metrics)
|
|
283
283
|
}
|
|
284
|
-
`,
|
|
284
|
+
`,Y0=je`
|
|
285
285
|
mutation addSessionFeedback(
|
|
286
286
|
$session_secure_id: String!
|
|
287
287
|
$user_name: String
|
|
@@ -297,7 +297,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
297
297
|
timestamp: $timestamp
|
|
298
298
|
)
|
|
299
299
|
}
|
|
300
|
-
`,
|
|
300
|
+
`,B0=je`
|
|
301
301
|
mutation initializeSession(
|
|
302
302
|
$session_secure_id: String!
|
|
303
303
|
$session_key: String
|
|
@@ -384,12 +384,12 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
${
|
|
388
|
-
`,
|
|
387
|
+
${vf}
|
|
388
|
+
`,z0=je`
|
|
389
389
|
query Ignore($id: ID!) {
|
|
390
390
|
ignore(id: $id)
|
|
391
391
|
}
|
|
392
|
-
`,
|
|
392
|
+
`,K0=je`
|
|
393
393
|
query GetSamplingConfig($organization_verbose_id: String!) {
|
|
394
394
|
sampling(organization_verbose_id: $organization_verbose_id) {
|
|
395
395
|
spans {
|
|
@@ -438,8 +438,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
${
|
|
442
|
-
`,
|
|
441
|
+
${vf}
|
|
442
|
+
`,j0=(e,t,r,n)=>e();function sl(e,t=j0){return{PushPayload(r,n){return t(i=>e.request(D0,r,x(x({},n),i)),"PushPayload","mutation",r)},PushSessionEvents(r,n){return t(i=>e.request(il,r,x(x({},n),i)),"PushSessionEvents","mutation",r)},identifySession(r,n){return t(i=>e.request(F0,r,x(x({},n),i)),"identifySession","mutation",r)},addSessionProperties(r,n){return t(i=>e.request(J0,r,x(x({},n),i)),"addSessionProperties","mutation",r)},pushMetrics(r,n){return t(i=>e.request(H0,r,x(x({},n),i)),"pushMetrics","mutation",r)},addSessionFeedback(r,n){return t(i=>e.request(Y0,r,x(x({},n),i)),"addSessionFeedback","mutation",r)},initializeSession(r,n){return t(i=>e.request(B0,r,x(x({},n),i)),"initializeSession","mutation",r)},Ignore(r,n){return t(i=>e.request(z0,r,x(x({},n),i)),"Ignore","query",r)},GetSamplingConfig(r,n){return t(i=>e.request(K0,r,x(x({},n),i)),"GetSamplingConfig","query",r)}}}const ol=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];var We=(e=>(e.DeviceMemory="DeviceMemory",e.ViewportHeight="ViewportHeight",e.ViewportWidth="ViewportWidth",e.ScreenHeight="ScreenHeight",e.ScreenWidth="ScreenWidth",e.ViewportArea="ViewportArea",e))(We||{}),Ne=(e=>(e.Device="Device",e.WebVital="WebVital",e.Performance="Performance",e.Frontend="Frontend",e.Backend="Backend",e))(Ne||{});function Q0(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}function $0(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();let n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(let s=0;s<n.children.length;s++){let o=n.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&i.push(o)}i.length>1&&(r+=":eq("+i.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function al(e){return Object.prototype.toString.call(e)==="[object Object]"}function Sf(e,t){if(t===0)return!0;const r=Object.keys(e);for(const n of r)if(al(e[n])&&Sf(e[n],t-1))return!0;return!1}function ll(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const n=[],i=[];return JSON.stringify(e,function(l,u){if(n.length>0){const a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?i.splice(a,1/0,l):i.push(l),~n.indexOf(u)&&(n[0]===u?u="[Circular ~]":u="[Circular ~."+i.slice(0,n.indexOf(u)).join(".")+"]")}else n.push(u);if(u==null)return u;if(s(u))return o(u);if(u instanceof Event){const a={};for(const h in u){const c=u[h];Array.isArray(c)?a[h]=$0(c.length?c[0]:null):a[h]=c}return a}else{if(u instanceof Node)return u instanceof HTMLElement?u?u.outerHTML:"":u.nodeName;if(u instanceof Error)return u.name+": "+u.message}return u});function s(l){return al(l)&&Object.keys(l).length>r.numOfKeysLimit||typeof l=="function"?!0:l instanceof Event&&l.isTrusted===!1?Object.keys(l).length===1:!!(al(l)&&Sf(l,r.depthOfLimit))}function o(l){let u=l.toString();return r.stringLengthLimit&&u.length>r.stringLengthLimit&&(u=`${u.slice(0,r.stringLengthLimit)}...`),u}}function q0(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function wf(){return q0()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function _f(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}var Rf={exports:{}},ul={exports:{}},Tf;function ew(){return Tf||(Tf=1,function(e,t){(function(r,n){e.exports=n()})(Ro,function(){function r(m){return!isNaN(parseFloat(m))&&isFinite(m)}function n(m){return m.charAt(0).toUpperCase()+m.substring(1)}function i(m){return function(){return this[m]}}var s=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],l=["fileName","functionName","source"],u=["args"],a=["evalOrigin"],h=s.concat(o,l,u,a);function c(m){if(m)for(var g=0;g<h.length;g++)m[h[g]]!==void 0&&this["set"+n(h[g])](m[h[g]])}c.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof c)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new c(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",g=this.getLineNumber()||"",v=this.getColumnNumber()||"",y=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+g+":"+v+")":"[eval]:"+g+":"+v:y?y+" ("+m+":"+g+":"+v+")":m+":"+g+":"+v}},c.fromString=function(g){var v=g.indexOf("("),y=g.lastIndexOf(")"),w=g.substring(0,v),R=g.substring(v+1,y).split(","),S=g.substring(y+1);if(S.indexOf("@")===0)var b=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(S,""),_=b[1],I=b[2],E=b[3];return new c({functionName:w,args:R||void 0,fileName:_,lineNumber:I||void 0,columnNumber:E||void 0})};for(var f=0;f<s.length;f++)c.prototype["get"+n(s[f])]=i(s[f]),c.prototype["set"+n(s[f])]=function(m){return function(g){this[m]=!!g}}(s[f]);for(var d=0;d<o.length;d++)c.prototype["get"+n(o[d])]=i(o[d]),c.prototype["set"+n(o[d])]=function(m){return function(g){if(!r(g))throw new TypeError(m+" must be a Number");this[m]=Number(g)}}(o[d]);for(var p=0;p<l.length;p++)c.prototype["get"+n(l[p])]=i(l[p]),c.prototype["set"+n(l[p])]=function(m){return function(g){this[m]=String(g)}}(l[p]);return c})}(ul)),ul.exports}(function(e,t){(function(r,n){e.exports=n(ew())})(Ro,function(n){var i=/(^|@)\S+:\d+/,s=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(u){if(typeof u.stacktrace!="undefined"||typeof u["opera#sourceloc"]!="undefined")return this.parseOpera(u);if(u.stack&&u.stack.match(s))return this.parseV8OrIE(u);if(u.stack)return this.parseFFOrSafari(u);throw new Error("Cannot parse given Error object")},extractLocation:function(u){if(u.indexOf(":")===-1)return[u];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,h=a.exec(u.replace(/[()]/g,""));return[h[1],h[2]||void 0,h[3]||void 0]},parseV8OrIE:function(u){var a=u.stack.split(`
|
|
443
443
|
`).filter(function(h){return!!h.match(s)},this);return a.map(function(h){h.indexOf("(eval ")>-1&&(h=h.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var c=h.replace(/^\s+/,"").replace(/\(eval code/g,"("),f=c.match(/ (\((.+):(\d+):(\d+)\)$)/);c=f?c.replace(f[0],""):c;var d=c.split(/\s+/).slice(1),p=this.extractLocation(f?f[1]:d.pop()),m=d.join(" ")||void 0,g=["eval","<anonymous>"].indexOf(p[0])>-1?void 0:p[0];return new n({functionName:m,fileName:g,lineNumber:p[1],columnNumber:p[2],source:h})},this)},parseFFOrSafari:function(u){var a=u.stack.split(`
|
|
444
444
|
`).filter(function(h){return!h.match(o)},this);return a.map(function(h){if(h.indexOf(" > eval")>-1&&(h=h.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),h.indexOf("@")===-1&&h.indexOf(":")===-1)return new n({functionName:h});var c=/((.*".+"[^@]*)?[^@]*)(?:@)/,f=h.match(c),d=f&&f[1]?f[1]:void 0,p=this.extractLocation(h.replace(c,""));return new n({functionName:d,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:h})},this)},parseOpera:function(u){return!u.stacktrace||u.message.indexOf(`
|
|
445
445
|
`)>-1&&u.message.split(`
|
|
@@ -447,26 +447,26 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
447
447
|
`).length?this.parseOpera9(u):u.stack?this.parseOpera11(u):this.parseOpera10(u)},parseOpera9:function(u){for(var a=/Line (\d+).*script (?:in )?(\S+)/i,h=u.message.split(`
|
|
448
448
|
`),c=[],f=2,d=h.length;f<d;f+=2){var p=a.exec(h[f]);p&&c.push(new n({fileName:p[2],lineNumber:p[1],source:h[f]}))}return c},parseOpera10:function(u){for(var a=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,h=u.stacktrace.split(`
|
|
449
449
|
`),c=[],f=0,d=h.length;f<d;f+=2){var p=a.exec(h[f]);p&&c.push(new n({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:h[f]}))}return c},parseOpera11:function(u){var a=u.stack.split(`
|
|
450
|
-
`).filter(function(h){return!!h.match(i)&&!h.match(/^Error created at/)},this);return a.map(function(h){var c=h.split("@"),f=this.extractLocation(c.pop()),d=c.shift()||"",p=d.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;d.match(/\(([^)]*)\)/)&&(m=d.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var g=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new n({functionName:p,args:g,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:h})},this)}}})})(Rf);var Q0=Rf.exports;const Tf=gi(Q0),ll={},$0=["debug","log","info","warn","error"],ul=Symbol.for("@launchdarkly/o11y.sdkLogger"),q0=(()=>{try{return(ll==null?void 0:ll.DEBUG)==="true"}catch(e){return!1}})(),zr=(()=>{var r;const e=globalThis,t=(r=e[ul])!=null?r:e[ul]={debugEnabled:!1,suppressDepth:0};return q0&&(t.debugEnabled=!0),t})(),cl=e=>{zr.debugEnabled=e},Ef=()=>zr.debugEnabled,ew=()=>zr.suppressDepth>0,dl=e=>{zr.suppressDepth++;try{return e()}finally{zr.suppressDepth--}},tw=e=>$0.includes(e)?e:"log",_e=(e,...t)=>{zr.debugEnabled&&dl(()=>{var r;try{((r=console[tw(e)])!=null?r:console.log).apply(console,t)}catch(n){}})};function En(e){try{return Tf.parse(e)}catch(t){try{return Tf.parse(new Error)}catch(r){return _e("warn","Highlight Warning: failed to parse error",{originalError:t,secondaryError:r}),[]}}}const If=(e,t,r)=>{const n=ts(t,e.headers,r);return Y(x({},e),{headers:n})},ts=(e,t,r)=>{var i,s;const n=x({},t);return r?((i=Object.keys(n))==null||i.forEach(o=>{[...r].includes(o==null?void 0:o.toLowerCase())||(n[o]="[REDACTED]")}),n):((s=Object.keys(n))==null||s.forEach(o=>{[...rw,...e].includes(o==null?void 0:o.toLowerCase())&&(n[o]="[REDACTED]")}),n)},rw=["authorization","cookie","proxy-authorization","set-cookie","token"],Cf=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com","browser-intake-datadoghq.com","browser-intake-datadoghq.eu","browser-intake-us3-datadoghq.com","browser-intake-us5-datadoghq.com","browser-intake-ap1-datadoghq.com","browser-intake-ddog-gov.com","r.lr-ingest.io","r.lr-in-prod.com","r.logrocket.io","data.pendo.io","ingest.sentry.io","ingest.us.sentry.io","ingest.de.sentry.io","bam.nr-data.net","bam-cell.nr-data.net","rs.fullstory.com","in.hotjar.com","api2.amplitude.com","api.mixpanel.com","api.segment.io/v1","google-analytics.com/g/collect","analytics.google.com/g/collect"],nw=["awsaccesskeyid","signature","sig","x-goog-signature","access_token","id_token","token","code","refresh_token","session_state"],iw=["access_token","id_token","token","code","refresh_token","session_state"],sw=/(\/eval\/[0-9a-f]{24}\/|\/sdk\/evalx?\/[0-9a-f]{24}\/(?:contexts|users)\/)([A-Za-z0-9+_=%-]{8,})/g,rs=e=>typeof e!="string"||!e.includes("eval")?e:e.replace(sw,"$1REDACTED"),Zf=e=>{var t,r;try{return new URL(e)}catch(n){return new URL(e,(r=(t=globalThis.location)==null?void 0:t.origin)!=null?r:"http://example.com")}},ow=e=>{if(!e||e==="#")return"";const t=e.slice(1);if(!t.includes("="))return e;const r=t.indexOf("?"),n=r>=0?t.slice(r+1):t,i=new URLSearchParams(n);for(const s of i.keys())if(iw.includes(s.toLowerCase()))return"";return e},ns=e=>{try{const t=Zf(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED"),t.pathname=rs(t.pathname);const r=t.searchParams;nw.forEach(i=>{for(const s of Array.from(r.keys()))s.toLowerCase()===i&&r.set(s,"REDACTED")});const n=ow(t.hash);if(t.hash=n,!e.includes("://")&&!e.startsWith("//"))return t.pathname+t.search+n;if(e.startsWith("//")){let i="//";return(t.username||t.password)&&(i+=t.username+":"+t.password+"@"),i+=t.host+t.pathname+t.search+n,i}return t.toString()}catch(t){return e}},aw=/^\s*(?:(?:debug|info|warn|error|none):\s*)?\[LaunchDarkly\]/,lw=e=>{const t=e[0];return typeof t=="string"&&aw.test(t)},Lf={level:[...il],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}};function xf(e,t){const r=t.logger;if(!r)return()=>{};let n;typeof r=="string"?n=window[r]:n=r;const i=[];if(t.level.includes("error")&&window){const o=l=>{const{message:u,error:a}=l;let h=[];a&&(h=En(a));const c=[ol(u,t.stringifyOptions)];e({type:"Error",trace:h,time:Date.now(),value:c})};window.addEventListener("error",o),i.push(()=>{window&&window.removeEventListener("error",o)})}for(const o of t.level)i.push(s(n,o));return()=>{i.forEach(o=>o())};function s(o,l){return o[l]?B0(o,l,u=>(...a)=>{if(u.apply(this,a),!ew()&&!(!t.recordLaunchDarklySdkLogs&&lw(a)))try{e(Nf(l,t,...a))}catch(h){u("highlight logger error:",h,...a)}}):()=>{}}}function Nf(e,t,...r){const n=En(new Error),i=(t.serializeConsoleAttributes?r.map(s=>typeof s=="object"?ol(s,t.stringifyOptions):s):r.filter(s=>typeof s!="object").map(s=>`${s}`)).map(s=>typeof s=="string"?rs(s):s);return{type:e,trace:n,value:i,attributes:rs(ol(r.filter(s=>typeof s=="object").reduce((s,o)=>x(x({},s),o),{}),t.stringifyOptions)),time:Date.now()}}const uw={start:0,end:3},cw={start:4,end:5},hl={start:6,end:7},fl={start:8,end:8},dw={start:9,end:9},hw={start:10,end:15};function fw(){if(crypto&&crypto.getRandomValues){const t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(Math.random()*256));return e}function Kr(e,t){let r="";for(let n=t.start;n<=t.end;n+=1)r+=e[n].toString(16).padStart(2,"0");return r}function pw(e){return e[fl.start]=(e[fl.start]|128)&191,e[hl.start]=e[hl.start]&15|64,`${Kr(e,uw)}-${Kr(e,cw)}-${Kr(e,hl)}-${Kr(e,fl)}${Kr(e,dw)}-${Kr(e,hw)}`}function mw(){const e=fw();return pw(e)}function In(){return typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():mw()}function pl(e,t,r,n){var u,a,h,c;let i=n!=null?n:t,s=En(i),o={};if(t instanceof Error){const f=t.cause;t=t.message,f&&(o={"exception.cause":f})}const l=gw(s);e({error:i,event:Rt(t),type:"window.onerror",url:window.location.href,source:r!=null?r:"",lineNumber:(u=l[0])!=null&&u.lineNumber?(a=l[0])==null?void 0:a.lineNumber:0,columnNumber:(h=l[0])!=null&&h.columnNumber?(c=l[0])==null?void 0:c.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),payload:o?Rt(o):void 0,id:In()})}const Of=(e,{enablePromisePatch:t})=>{if(typeof window=="undefined")return()=>{};const r=window.onerror;window.onerror=(o,l,u,a,h)=>{pl(e,o,l,h)};const n=window.onunhandledrejection;window.onunhandledrejection=o=>{if(o.reason){const l=o.promise;l.getStack?pl(e,o.reason,o.type,l.getStack()):pl(e,o.reason,o.type)}};const i=window.Promise,s=class extends i{constructor(u){super(u);L(this,"promiseCreationError");this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const u=typeof window.Zone=="undefined";return t&&u}};return s.shouldPatch()&&(window.Promise=s),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=r}},gw=e=>{var r,n;if(e.length===0)return e;const t=e[0];return(r=t.fileName)!=null&&r.includes("highlight.run")||(n=t.fileName)!=null&&n.includes("highlight.io")||t.functionName==="new highlightPromise"?e.slice(1):e},ml=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],gl=["websocket error",'\\"ResizeObserver loop'];var yw=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},gr="1.9.0",Gf=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function bw(e){var t=new Set([e]),r=new Set,n=e.match(Gf);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(u){return u===e};function s(l){return r.add(l),!1}function o(l){return t.add(l),!0}return function(u){if(t.has(u))return!0;if(r.has(u))return!1;var a=u.match(Gf);if(!a)return s(u);var h={major:+a[1],minor:+a[2],patch:+a[3],prerelease:a[4]};return h.prerelease!=null||i.major!==h.major?s(u):i.major===0?i.minor===h.minor&&i.patch<=h.patch?o(u):s(u):i.minor<=h.minor?o(u):s(u)}}var vw=bw(gr),Sw=gr.split(".")[0],Cn=Symbol.for("opentelemetry.js.api."+Sw),Zn=yw;function Ln(e,t,r,n){var i;n===void 0&&(n=!1);var s=Zn[Cn]=(i=Zn[Cn])!==null&&i!==void 0?i:{version:gr};if(!n&&s[e]){var o=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(o.stack||o.message),!1}if(s.version!==gr){var o=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+e+" does not match previously registered API v"+gr);return r.error(o.stack||o.message),!1}return s[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+gr+"."),!0}function yr(e){var t,r,n=(t=Zn[Cn])===null||t===void 0?void 0:t.version;if(!(!n||!vw(n)))return(r=Zn[Cn])===null||r===void 0?void 0:r[e]}function xn(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+gr+".");var r=Zn[Cn];r&&delete r[e]}var ww=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Rw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},_w=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("verbose",this._namespace,t)},e}();function Nn(e,t,r){var n=yr("diag");if(n)return r.unshift(t),n[e].apply(n,Rw([],ww(r),!1))}var Ne;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Ne||(Ne={}));function Tw(e,t){e<Ne.NONE?e=Ne.NONE:e>Ne.ALL&&(e=Ne.ALL),t=t||{};function r(n,i){var s=t[n];return typeof s=="function"&&e>=i?s.bind(t):function(){}}return{error:r("error",Ne.ERROR),warn:r("warn",Ne.WARN),info:r("info",Ne.INFO),debug:r("debug",Ne.DEBUG),verbose:r("verbose",Ne.VERBOSE)}}var Ew=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Iw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Cw="diag",Lt=function(){function e(){function t(i){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var l=yr("diag");if(l)return l[i].apply(l,Iw([],Ew(s),!1))}}var r=this,n=function(i,s){var o,l,u;if(s===void 0&&(s={logLevel:Ne.INFO}),i===r){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((o=a.stack)!==null&&o!==void 0?o:a.message),!1}typeof s=="number"&&(s={logLevel:s});var h=yr("diag"),c=Tw((l=s.logLevel)!==null&&l!==void 0?l:Ne.INFO,i);if(h&&!s.suppressOverrideMessage){var f=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";h.warn("Current logger will be overwritten from "+f),c.warn("Current logger will overwrite one already registered from "+f)}return Ln("diag",c,r,!0)};r.setLogger=n,r.disable=function(){xn(Cw,r)},r.createComponentLogger=function(i){return new _w(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Zw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Lw=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xw=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var r=this._entries.get(t);if(r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=Zw(t,2),n=r[0],i=r[1];return[n,i]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=new e(this._entries);try{for(var o=Lw(n),l=o.next();!l.done;l=o.next()){var u=l.value;s._entries.delete(u)}}catch(a){t={error:a}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return s},e.prototype.clear=function(){return new e},e}(),Nw=Symbol("BaggageEntryMetadata"),Ow=Lt.instance();function Gw(e){return e===void 0&&(e={}),new xw(new Map(Object.entries(e)))}function Vw(e){return typeof e!="string"&&(Ow.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:Nw,toString:function(){return e}}}function yl(e){return Symbol.for(e)}var kw=function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var s=new e(r._currentContext);return s._currentContext.set(n,i),s},r.deleteValue=function(n){var i=new e(r._currentContext);return i._currentContext.delete(n),i}}return e}(),br=new kw,vr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xw=function(){function e(){}return e.prototype.createGauge=function(t,r){return Hw},e.prototype.createHistogram=function(t,r){return Yw},e.prototype.createCounter=function(t,r){return Jw},e.prototype.createUpDownCounter=function(t,r){return Bw},e.prototype.createObservableGauge=function(t,r){return Kw},e.prototype.createObservableCounter=function(t,r){return zw},e.prototype.createObservableUpDownCounter=function(t,r){return jw},e.prototype.addBatchObservableCallback=function(t,r){},e.prototype.removeBatchObservableCallback=function(t){},e}(),is=function(){function e(){}return e}(),Ww=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(is),Pw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(is),Mw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(is),Aw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(is),bl=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Uw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(bl),Dw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(bl),Fw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(bl),Vf=new Xw,Jw=new Ww,Hw=new Mw,Yw=new Aw,Bw=new Pw,zw=new Uw,Kw=new Dw,jw=new Fw;function Qw(){return Vf}var qt;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(qt||(qt={}));var $w={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},qw={set:function(e,t,r){e!=null&&(e[t]=r)}},eR=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},tR=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},rR=function(){function e(){}return e.prototype.active=function(){return br},e.prototype.with=function(t,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];return r.call.apply(r,tR([n],eR(i),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),nR=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},iR=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},vl="context",sR=new rR,ss=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Ln(vl,t,Lt.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,n){for(var i,s=[],o=3;o<arguments.length;o++)s[o-3]=arguments[o];return(i=this._getContextManager()).with.apply(i,iR([t,r,n],nR(s),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return yr(vl)||sR},e.prototype.disable=function(){this._getContextManager().disable(),xn(vl,Lt.instance())},e}(),Mt;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Mt||(Mt={}));var kf="0000000000000000",Xf="00000000000000000000000000000000",Wf={traceId:Xf,spanId:kf,traceFlags:Mt.NONE},On=function(){function e(t){t===void 0&&(t=Wf),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e}(),Sl=yl("OpenTelemetry Context Key SPAN");function wl(e){return e.getValue(Sl)||void 0}function oR(){return wl(ss.getInstance().active())}function Rl(e,t){return e.setValue(Sl,t)}function aR(e){return e.deleteValue(Sl)}function lR(e,t){return Rl(e,new On(t))}function Pf(e){var t;return(t=wl(e))===null||t===void 0?void 0:t.spanContext()}var uR=/^([0-9a-f]{32})$/i,cR=/^[0-9a-f]{16}$/i;function Mf(e){return uR.test(e)&&e!==Xf}function dR(e){return cR.test(e)&&e!==kf}function os(e){return Mf(e.traceId)&&dR(e.spanId)}function hR(e){return new On(e)}var _l=ss.getInstance(),Af=function(){function e(){}return e.prototype.startSpan=function(t,r,n){n===void 0&&(n=_l.active());var i=!!(r!=null&&r.root);if(i)return new On;var s=n&&Pf(n);return fR(s)&&os(s)?new On(s):new On},e.prototype.startActiveSpan=function(t,r,n,i){var s,o,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,o=n,l=i);var u=o!=null?o:_l.active(),a=this.startSpan(t,s,u),h=Rl(u,a);return _l.with(h,l,void 0,a)}},e}();function fR(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var pR=new Af,mR=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.startSpan=function(t,r,n){return this._getTracer().startSpan(t,r,n)},e.prototype.startActiveSpan=function(t,r,n,i){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):pR},e}(),gR=function(){function e(){}return e.prototype.getTracer=function(t,r,n){return new Af},e}(),yR=new gR,Uf=function(){function e(){}return e.prototype.getTracer=function(t,r,n){var i;return(i=this.getDelegateTracer(t,r,n))!==null&&i!==void 0?i:new mR(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:yR},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,r,n)},e}(),as;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(as||(as={}));var Gn;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Gn||(Gn={}));var ls;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ls||(ls={}));var me=ss.getInstance(),H=Lt.instance(),bR=function(){function e(){}return e.prototype.getMeter=function(t,r,n){return Vf},e}(),vR=new bR,Tl="metrics",SR=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return Ln(Tl,t,Lt.instance())},e.prototype.getMeterProvider=function(){return yr(Tl)||vR},e.prototype.getMeter=function(t,r,n){return this.getMeterProvider().getMeter(t,r,n)},e.prototype.disable=function(){xn(Tl,Lt.instance())},e}(),El=SR.getInstance(),wR=function(){function e(){}return e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}(),Il=yl("OpenTelemetry Baggage Key");function Df(e){return e.getValue(Il)||void 0}function RR(){return Df(ss.getInstance().active())}function _R(e,t){return e.setValue(Il,t)}function TR(e){return e.deleteValue(Il)}var Cl="propagation",ER=new wR,IR=function(){function e(){this.createBaggage=Gw,this.getBaggage=Df,this.getActiveBaggage=RR,this.setBaggage=_R,this.deleteBaggage=TR}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return Ln(Cl,t,Lt.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=qw),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=$w),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){xn(Cl,Lt.instance())},e.prototype._getGlobalPropagator=function(){return yr(Cl)||ER},e}(),ht=IR.getInstance(),Zl="trace",CR=function(){function e(){this._proxyTracerProvider=new Uf,this.wrapSpanContext=hR,this.isSpanContextValid=os,this.deleteSpan=aR,this.getSpan=wl,this.getActiveSpan=oR,this.getSpanContext=Pf,this.setSpan=Rl,this.setSpanContext=lR}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=Ln(Zl,this._proxyTracerProvider,Lt.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return yr(Zl)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){xn(Zl,Lt.instance()),this._proxyTracerProvider=new Uf},e}(),we=CR.getInstance(),Ff=yl("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Jf(e){return e.setValue(Ff,!0)}function Ll(e){return e.getValue(Ff)===!0}var ZR="=",xl=";",Nl=",",Ol="baggage",LR=180,xR=4096,NR=8192,OR=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function GR(e){return e.reduce(function(t,r){var n=""+t+(t!==""?Nl:"")+r;return n.length>NR?t:n},"")}function VR(e){return e.getAllEntries().map(function(t){var r=OR(t,2),n=r[0],i=r[1],s=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(s+=xl+i.metadata.toString()),s})}function kR(e){var t=e.split(xl);if(!(t.length<=0)){var r=t.shift();if(r){var n=r.indexOf(ZR);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),o;return t.length>0&&(o=Vw(t.join(xl))),{key:i,value:s,metadata:o}}}}}var Hf=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=ht.getBaggage(t);if(!(!i||Ll(t))){var s=VR(i).filter(function(l){return l.length<=xR}).slice(0,LR),o=GR(s);o.length>0&&n.set(r,Ol,o)}},e.prototype.extract=function(t,r,n){var i=n.get(r,Ol),s=Array.isArray(i)?i.join(Nl):i;if(!s)return t;var o={};if(s.length===0)return t;var l=s.split(Nl);return l.forEach(function(u){var a=kR(u);if(a){var h={value:a.value};a.metadata&&(h.metadata=a.metadata),o[a.key]=h}}),Object.entries(o).length===0?t:ht.setBaggage(t,ht.createBaggage(o))},e.prototype.fields=function(){return[Ol]},e}(),Yf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},XR=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function us(e){var t,r,n={};if(typeof e!="object"||e==null)return n;try{for(var i=Yf(Object.entries(e)),s=i.next();!s.done;s=i.next()){var o=XR(s.value,2),l=o[0],u=o[1];if(!WR(l)){H.warn("Invalid attribute key: "+l);continue}if(!Bf(u)){H.warn("Invalid attribute value set for key: "+l);continue}Array.isArray(u)?n[l]=u.slice():n[l]=u}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function WR(e){return typeof e=="string"&&e.length>0}function Bf(e){return e==null?!0:Array.isArray(e)?PR(e):zf(e)}function PR(e){var t,r,n;try{for(var i=Yf(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(o!=null){if(!n){if(zf(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}function zf(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function MR(){return function(e){H.error(AR(e))}}function AR(e){return typeof e=="string"?e:JSON.stringify(UR(e))}function UR(e){for(var t={},r=e;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!t[n]){var i=r[n];i&&(t[n]=String(i))}}),r=Object.getPrototypeOf(r);return t}var DR=MR();function er(e){try{DR(e)}catch(t){}}var xt;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(xt||(xt={}));var FR=",",JR=["OTEL_SDK_DISABLED"];function HR(e){return JR.indexOf(e)>-1}var YR=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function BR(e){return YR.indexOf(e)>-1}var zR=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function KR(e){return zR.indexOf(e)>-1}var cs=1/0,ds=128,jR=128,QR=128,Kf={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Ne.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:cs,OTEL_ATTRIBUTE_COUNT_LIMIT:ds,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:cs,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ds,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:cs,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ds,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:jR,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:QR,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:xt.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function $R(e,t,r){if(typeof r[e]!="undefined"){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function qR(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]!="undefined"){var s=Number(r[e]);isNaN(s)||(s<n?t[e]=n:s>i?t[e]=i:t[e]=s)}}function e_(e,t,r,n){n===void 0&&(n=FR);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(s){return s.trim()}))}var t_={ALL:Ne.ALL,VERBOSE:Ne.VERBOSE,DEBUG:Ne.DEBUG,INFO:Ne.INFO,WARN:Ne.WARN,ERROR:Ne.ERROR,NONE:Ne.NONE};function r_(e,t,r){var n=r[e];if(typeof n=="string"){var i=t_[n.toUpperCase()];i!=null&&(t[e]=i)}}function jf(e){var t={};for(var r in Kf){var n=r;switch(n){case"OTEL_LOG_LEVEL":r_(n,t,e);break;default:if(HR(n))$R(n,t,e);else if(BR(n))qR(n,t,e);else if(KR(n))e_(n,t,e);else{var i=e[n];typeof i!="undefined"&&i!==null&&(t[n]=String(i))}}}return t}var Vn=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function jr(){var e=jf(Vn);return Object.assign({},Kf,e)}function n_(){return jf(Vn)}function Qf(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Gl(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n<e.length;n+=2){var i=Qf(e.charCodeAt(n)),s=Qf(e.charCodeAt(n+1));t[r++]=i<<4|s}return t}var ft=performance,i_="1.30.1",s_="process.runtime.name",o_="telemetry.sdk.name",a_="telemetry.sdk.language",l_="telemetry.sdk.version",u_=s_,c_=o_,d_=a_,h_=l_,f_="webjs",p_=f_,Qr,Vl=(Qr={},Qr[c_]="opentelemetry",Qr[u_]="browser",Qr[d_]=p_,Qr[h_]=i_,Qr),m_=9,g_=6,y_=Math.pow(10,g_),hs=Math.pow(10,m_);function pt(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*y_);return[r,n]}function kl(){var e=ft.timeOrigin;if(typeof e!="number"){var t=ft;e=t.timing&&t.timing.fetchStart}return e}function Sr(e){var t=pt(kl()),r=pt(typeof e=="number"?e:ft.now());return qf(t,r)}function kn(e){if(Xl(e))return e;if(typeof e=="number")return e<kl()?Sr(e):pt(e);if(e instanceof Date)return pt(e.getTime());throw TypeError("Invalid input type")}function b_(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=hs),[r,n]}function At(e){return e[0]*hs+e[1]}function fs(e){return e[0]*1e6+e[1]/1e3}function Xl(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function $f(e){return Xl(e)||typeof e=="number"||e instanceof Date}function qf(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=hs&&(r[1]-=hs,r[0]+=1),r}var Ie;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Ie||(Ie={}));var v_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ep=function(){function e(t){t===void 0&&(t={});var r;this._propagators=(r=t.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return e.prototype.inject=function(t,r,n){var i,s;try{for(var o=v_(this._propagators),l=o.next();!l.done;l=o.next()){var u=l.value;try{u.inject(t,r,n)}catch(a){H.warn("Failed to inject with "+u.constructor.name+". Err: "+a.message)}}}catch(a){i={error:a}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,r,n){return this._propagators.reduce(function(i,s){try{return s.extract(i,r,n)}catch(o){H.warn("Failed to extract with "+s.constructor.name+". Err: "+o.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),Wl="[_0-9a-z-*/]",S_="[a-z]"+Wl+"{0,255}",w_="[a-z0-9]"+Wl+"{0,240}@[a-z]"+Wl+"{0,13}",R_=new RegExp("^(?:"+S_+"|"+w_+")$"),__=/^[ -~]{0,255}[!-~]$/,T_=/,|=/;function E_(e){return R_.test(e)}function I_(e){return __.test(e)&&!T_.test(e)}var tp=32,C_=512,rp=",",np="=",Z_=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,r){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n},e.prototype.unset=function(t){var r=this._clone();return r._internalState.delete(t),r},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(r,n){return r.push(n+np+t.get(n)),r},[]).join(rp)},e.prototype._parse=function(t){t.length>C_||(this._internalState=t.split(rp).reverse().reduce(function(r,n){var i=n.trim(),s=i.indexOf(np);if(s!==-1){var o=i.slice(0,s),l=i.slice(s+1,n.length);E_(o)&&I_(l)&&r.set(o,l)}return r},new Map),this._internalState.size>tp&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,tp))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),ps="traceparent",Pl="tracestate",L_="00",x_="(?!ff)[\\da-f]{2}",N_="(?![0]{32})[\\da-f]{32}",O_="(?![0]{16})[\\da-f]{16}",G_="[\\da-f]{2}",V_=new RegExp("^\\s?("+x_+")-("+N_+")-("+O_+")-("+G_+")(-.*)?\\s?$");function k_(e){var t=V_.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var ip=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=we.getSpanContext(t);if(!(!i||Ll(t)||!os(i))){var s=L_+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Mt.NONE).toString(16);n.set(r,ps,s),i.traceState&&n.set(r,Pl,i.traceState.serialize())}},e.prototype.extract=function(t,r,n){var i=n.get(r,ps);if(!i)return t;var s=Array.isArray(i)?i[0]:i;if(typeof s!="string")return t;var o=k_(s);if(!o)return t;o.isRemote=!0;var l=n.get(r,Pl);if(l){var u=Array.isArray(l)?l.join(","):l;o.traceState=new Z_(typeof u=="string"?u:void 0)}return we.setSpanContext(t,o)},e.prototype.fields=function(){return[ps,Pl]},e}(),X_="[object Object]",W_="[object Null]",P_="[object Undefined]",M_=Function.prototype,sp=M_.toString,A_=sp.call(Object),U_=D_(Object.getPrototypeOf,Object),op=Object.prototype,ap=op.hasOwnProperty,wr=Symbol?Symbol.toStringTag:void 0,lp=op.toString;function D_(e,t){return function(r){return e(t(r))}}function up(e){if(!F_(e)||J_(e)!==X_)return!1;var t=U_(e);if(t===null)return!0;var r=ap.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&sp.call(r)===A_}function F_(e){return e!=null&&typeof e=="object"}function J_(e){return e==null?e===void 0?P_:W_:wr&&wr in Object(e)?H_(e):Y_(e)}function H_(e){var t=ap.call(e,wr),r=e[wr],n=!1;try{e[wr]=void 0,n=!0}catch(s){}var i=lp.call(e);return n&&(t?e[wr]=r:delete e[wr]),i}function Y_(e){return lp.call(e)}var B_=20;function cp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=dp(r,e.shift(),0,n);return r}function Ml(e){return ms(e)?e.slice():e}function dp(e,t,r,n){r===void 0&&(r=0);var i;if(!(r>B_)){if(r++,gs(e)||gs(t)||fp(t))i=Ml(t);else if(ms(e)){if(i=e.slice(),ms(t))for(var s=0,o=t.length;s<o;s++)i.push(Ml(t[s]));else if(Xn(t))for(var l=Object.keys(t),s=0,o=l.length;s<o;s++){var u=l[s];i[u]=Ml(t[u])}}else if(Xn(e))if(Xn(t)){if(!z_(e,t))return t;i=Object.assign({},e);for(var l=Object.keys(t),s=0,o=l.length;s<o;s++){var u=l[s],a=t[u];if(gs(a))typeof a=="undefined"?delete i[u]:i[u]=a;else{var h=i[u],c=a;if(hp(e,u,n)||hp(t,u,n))delete i[u];else{if(Xn(h)&&Xn(c)){var f=n.get(h)||[],d=n.get(c)||[];f.push({obj:e,key:u}),d.push({obj:t,key:u}),n.set(h,f),n.set(c,d)}i[u]=dp(i[u],a,r,n)}}}}else i=t;return i}}function hp(e,t,r){for(var n=r.get(e[t])||[],i=0,s=n.length;i<s;i++){var o=n[i];if(o.key===t&&o.obj===e)return!0}return!1}function ms(e){return Array.isArray(e)}function fp(e){return typeof e=="function"}function Xn(e){return!gs(e)&&!ms(e)&&!fp(e)&&typeof e=="object"}function gs(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="undefined"||e instanceof Date||e instanceof RegExp||e===null}function z_(e,t){return!(!up(e)||!up(t))}var K_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function pp(e,t){return typeof t=="string"?e===t:!!e.match(t)}function mp(e,t){var r,n;if(!t)return!1;try{for(var i=K_(t),s=i.next();!s.done;s=i.next()){var o=s.value;if(pp(e,o))return!0}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var j_=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),Q_=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},$_=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},q_=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new j_}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,$_([this._that],Q_(n),!1))).then(function(s){return r._deferred.resolve(s)},function(s){return r._deferred.reject(s)})}catch(s){this._deferred.reject(s)}}return this._deferred.promise},e}();function eT(e,t){return new Promise(function(r){me.with(Jf(me.active()),function(){e.export(t,function(n){r(n)})})})}var tT={_export:eT},gp=function(){function e(){}return e.prototype.emit=function(t){},e}(),rT=new gp,nT=function(){function e(){}return e.prototype.getLogger=function(t,r,n){return new gp},e}(),yp=new nT,iT=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):rT},e}(),bp=function(){function e(){}return e.prototype.getLogger=function(t,r,n){var i;return(i=this.getDelegateLogger(t,r,n))!==null&&i!==void 0?i:new iT(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:yp},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,r,n)},e}(),sT=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ys=Symbol.for("io.opentelemetry.js.api.logs"),Wn=sT;function oT(e,t,r){return function(n){return n===e?t:r}}var vp=1,aT=function(){function e(){this._proxyLoggerProvider=new bp}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Wn[ys]?this.getLoggerProvider():(Wn[ys]=oT(vp,t,yp),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,r;return(r=(t=Wn[ys])===null||t===void 0?void 0:t.call(Wn,vp))!==null&&r!==void 0?r:this._proxyLoggerProvider},e.prototype.getLogger=function(t,r,n){return this.getLoggerProvider().getLogger(t,r,n)},e.prototype.disable=function(){delete Wn[ys],this._proxyLoggerProvider=new bp},e}(),Sp=aT.getInstance();function lT(e,t,r,n){for(var i=0,s=e.length;i<s;i++){var o=e[i];t&&o.setTracerProvider(t),r&&o.setMeterProvider(r),n&&o.setLoggerProvider&&o.setLoggerProvider(n),o.getConfig().enabled||o.enable()}}function uT(e){e.forEach(function(t){return t.disable()})}function cT(e){var t,r,n=e.tracerProvider||we.getTracerProvider(),i=e.meterProvider||El.getMeterProvider(),s=e.loggerProvider||Sp.getLoggerProvider(),o=(r=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&r!==void 0?r:[];return lT(o,n,i,s),function(){uT(o)}}function Al(e){return typeof e=="function"}var Qe=console.error.bind(console);function Pn(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function Mn(e){e&&e.logger&&(Al(e.logger)?Qe=e.logger:Qe("new logger isn't a function, not replacing"))}function wp(e,t,r){if(!e||!e[t]){Qe("no original function "+t+" to wrap");return}if(!r){Qe("no wrapper function"),Qe(new Error().stack);return}if(!Al(e[t])||!Al(r)){Qe("original object and wrapper must be functions");return}var n=e[t],i=r(n,t);return Pn(i,"__original",n),Pn(i,"__unwrap",function(){e[t]===i&&Pn(e,t,n)}),Pn(i,"__wrapped",!0),Pn(e,t,i),i}function dT(e,t,r){if(e)Array.isArray(e)||(e=[e]);else{Qe("must provide one or more modules to patch"),Qe(new Error().stack);return}if(!(t&&Array.isArray(t))){Qe("must provide one or more functions to wrap on modules");return}e.forEach(function(n){t.forEach(function(i){wp(n,i,r)})})}function Rp(e,t){if(!e||!e[t]){Qe("no function to unwrap."),Qe(new Error().stack);return}if(!e[t].__unwrap)Qe("no original to unwrap to -- has "+t+" already been unwrapped?");else return e[t].__unwrap()}function hT(e,t){if(e)Array.isArray(e)||(e=[e]);else{Qe("must provide one or more modules to patch"),Qe(new Error().stack);return}if(!(t&&Array.isArray(t))){Qe("must provide one or more functions to unwrap on modules");return}e.forEach(function(r){t.forEach(function(n){Rp(r,n)})})}Mn.wrap=wp,Mn.massWrap=dT,Mn.unwrap=Rp,Mn.massUnwrap=hT;var bs=Mn,Ul=function(){return Ul=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ul.apply(this,arguments)},fT=function(){function e(t,r,n){this.instrumentationName=t,this.instrumentationVersion=r,this._config={},this._wrap=bs.wrap,this._unwrap=bs.unwrap,this._massWrap=bs.massWrap,this._massUnwrap=bs.massUnwrap,this.setConfig(n),this._diag=H.createComponentLogger({namespace:t}),this._tracer=we.getTracer(t,r),this._meter=El.getMeter(t,r),this._logger=Sp.getLogger(t,r),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,r=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(r)?r:[r]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Ul({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,r,n,i){if(t)try{t(n,i)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}},e}(),pT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),An=function(e){pT(t,e);function t(r,n,i){var s=e.call(this,r,n,i)||this;return s._config.enabled&&s.enable(),s}return t}(fT);function vs(e,t,r){var n,i;try{i=e()}catch(s){n=s}finally{return t(n,i),i}}function Ae(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var mT="exception.type",gT="exception.message",yT="exception.stacktrace",Dl=mT,Fl=gT,bT=yT,vT="exception",Jl=function(){return Jl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Jl.apply(this,arguments)},ST=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_p=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},wT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},RT=function(){function e(t,r,n,i,s,o,l,u,a,h){l===void 0&&(l=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:ls.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=o,this.kind=s,this.links=l;var c=Date.now();this._performanceStartTime=ft.now(),this._performanceOffset=c-(this._performanceStartTime+kl()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u!=null?u:c),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,h!=null&&this.setAttributes(h),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return r==null||this._isSpanEnded()?this:t.length===0?(H.warn("Invalid attribute key: "+t),this):Bf(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this):(H.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var r,n;try{for(var i=ST(Object.entries(t)),s=i.next();!s.done;s=i.next()){var o=_p(s.value,2),l=o[0],u=o[1];this.setAttribute(l,u)}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.addEvent=function(t,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return H.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&H.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),$f(r)&&($f(n)||(n=r),r=void 0);var i=us(r);return this.events.push({name:t,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var r;return(r=this.links).push.apply(r,wT([],_p(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=Jl({},t),this.status.message!=null&&typeof t.message!="string"&&(H.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){H.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(t),this._duration=b_(this.startTime,this.endTime),this._duration[0]<0&&(H.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&H.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=ft.now())return Sr(t+this._performanceOffset);if(typeof t=="number")return pt(t);if(t instanceof Date)return pt(t.getTime());if(Xl(t))return t;if(this._startTimeProvided)return pt(Date.now());var r=ft.now()-this._performanceStartTime;return qf(this.startTime,pt(r))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,r){var n={};typeof t=="string"?n[Fl]=t:t&&(t.code?n[Dl]=t.code.toString():t.name&&(n[Dl]=t.name),t.message&&(n[Fl]=t.message),t.stack&&(n[bT]=t.stack)),n[Dl]||n[Fl]?this.addEvent(vT,n,r):H.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&H.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._truncateToSize=function(t){var r=this,n=this._attributeValueLengthLimit;return n<=0?(H.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):t},e}(),$r;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})($r||($r={}));var Ss=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:$r.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),qr=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:$r.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),Hl=function(){function e(t){var r,n,i,s;this._root=t.root,this._root||(er(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new qr),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new qr,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new Ss,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new qr,this._localParentNotSampled=(s=t.localParentNotSampled)!==null&&s!==void 0?s:new Ss}return e.prototype.shouldSample=function(t,r,n,i,s,o){var l=we.getSpanContext(t);return!l||!os(l)?this._root.shouldSample(t,r,n,i,s,o):l.isRemote?l.traceFlags&Mt.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,i,s,o):this._remoteParentNotSampled.shouldSample(t,r,n,i,s,o):l.traceFlags&Mt.SAMPLED?this._localParentSampled.shouldSample(t,r,n,i,s,o):this._localParentNotSampled.shouldSample(t,r,n,i,s,o)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Tp=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,r){return{decision:Mf(r)&&this._accumulate(r)<this._upperBound?$r.RECORD_AND_SAMPLED:$r.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var r=0,n=0;n<t.length/8;n++){var i=n*8,s=parseInt(t.slice(i,i+8),16);r=(r^s)>>>0}return r},e}(),_T=xt.AlwaysOn,en=1;function Ep(){var e=jr();return{sampler:Ip(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Ip(e){switch(e===void 0&&(e=jr()),e.OTEL_TRACES_SAMPLER){case xt.AlwaysOn:return new qr;case xt.AlwaysOff:return new Ss;case xt.ParentBasedAlwaysOn:return new Hl({root:new qr});case xt.ParentBasedAlwaysOff:return new Hl({root:new Ss});case xt.TraceIdRatio:return new Tp(Cp(e));case xt.ParentBasedTraceIdRatio:return new Hl({root:new Tp(Cp(e))});default:return H.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+_T+'".'),new qr}}function Cp(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return H.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+en+"."),en;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(H.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+en+"."),en):t<0||t>1?(H.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+en+"."),en):t}function TT(e){var t={sampler:Ip()},r=Ep(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function ET(e){var t,r,n,i,s,o,l,u,a,h,c,f,d=Object.assign({},e.spanLimits),p=n_();return d.attributeCountLimit=(o=(s=(i=(r=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&r!==void 0?r:(n=e.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:p.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:p.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:ds,d.attributeValueLengthLimit=(f=(c=(h=(u=(l=e.spanLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:(a=e.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&h!==void 0?h:p.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&c!==void 0?c:p.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:cs,Object.assign({},e,{spanLimits:d})}var IT=function(){function e(t,r){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=jr();this._maxExportBatchSize=typeof(r==null?void 0:r.maxExportBatchSize)=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(r==null?void 0:r.maxQueueSize)=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(r==null?void 0:r.scheduledDelayMillis)=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(r==null?void 0:r.exportTimeoutMillis)=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new q_(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(H.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&Mt.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var t=this;return Promise.resolve().then(function(){return t.onShutdown()}).then(function(){return t._flushAll()}).then(function(){return t._exporter.shutdown()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&H.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(H.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(r,n){for(var i=[],s=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),o=0,l=s;o<l;o++)i.push(t._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},t._exportTimeoutMillis);me.with(Jf(me.active()),function(){var s;t._finishedSpans.length<=t._maxExportBatchSize?(s=t._finishedSpans,t._finishedSpans=[]):s=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var o=function(){return t._exporter.export(s,function(c){var f;clearTimeout(i),c.code===Ie.SUCCESS?r():n((f=c.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},l=null,u=0,a=s.length;u<a;u++){var h=s[u];h.resource.asyncAttributesPending&&h.resource.waitForAsyncAttributes&&(l!=null||(l=[]),l.push(h.resource.waitForAsyncAttributes()))}l===null?o():Promise.all(l).then(o,function(c){er(c),n(c)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var r=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(n){t._isExporting=!1,er(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),CT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zp=function(e){CT(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.onInit(n),i}return t.prototype.onInit=function(r){var n=this;(r==null?void 0:r.disableAutoFlushOnDocumentHide)!==!0&&typeof document!="undefined"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){er(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){er(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document!="undefined"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(IT),ZT=8,LT=16,xT=function(){function e(){this.generateTraceId=Lp(LT),this.generateSpanId=Lp(ZT)}return e}(),ws=Array(32);function Lp(e){return function(){for(var r=0;r<e*2;r++)ws[r]=Math.floor(Math.random()*16)+48,ws[r]>=58&&(ws[r]+=39);return String.fromCharCode.apply(null,ws.slice(0,e*2))}}var NT=function(){function e(t,r,n){this._tracerProvider=n;var i=TT(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new xT,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var i,s,o;r===void 0&&(r={}),n===void 0&&(n=me.active()),r.root&&(n=we.deleteSpan(n));var l=we.getSpan(n);if(Ll(n)){H.debug("Instrumentation suppressed, returning Noop Span");var u=we.wrapSpanContext(Wf);return u}var a=l==null?void 0:l.spanContext(),h=this._idGenerator.generateSpanId(),c,f,d;!a||!we.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,f=a.traceState,d=a.spanId);var p=(i=r.kind)!==null&&i!==void 0?i:Gn.INTERNAL,m=((s=r.links)!==null&&s!==void 0?s:[]).map(function(b){return{context:b.context,attributes:us(b.attributes)}}),g=us(r.attributes),v=this._sampler.shouldSample(n,c,t,p,g,m);f=(o=v.traceState)!==null&&o!==void 0?o:f;var y=v.decision===as.RECORD_AND_SAMPLED?Mt.SAMPLED:Mt.NONE,w={traceId:c,spanId:h,traceFlags:y,traceState:f};if(v.decision===as.NOT_RECORD){H.debug("Recording is off, propagating context in a non-recording span");var u=we.wrapSpanContext(w);return u}var _=us(Object.assign(g,v.attributes)),S=new RT(this,n,t,w,p,d,m,r.startTime,void 0,_);return S},e.prototype.startActiveSpan=function(t,r,n,i){var s,o,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,o=n,l=i);var u=o!=null?o:me.active(),a=this.startSpan(t,s,u),h=we.setSpan(u,a);return me.with(h,l,void 0,a)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),OT="service.name",GT="telemetry.sdk.name",VT="telemetry.sdk.language",kT="telemetry.sdk.version",XT=OT,xp=GT,Np=VT,Op=kT;function WT(){return"unknown_service"}var tr=function(){return tr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},tr.apply(this,arguments)},PT=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},MT=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},AT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Un=function(){function e(t,r){var n=this,i;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r==null?void 0:r.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return H.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[XT]=WT(),t[Np]=Vl[Np],t[xp]=Vl[xp],t[Op]=Vl[Op],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&H.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return PT(this,void 0,void 0,function(){return MT(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r=this,n;if(!t)return this;var i=tr(tr({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var s=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(o){var l,u=AT(o,2),a=u[0],h=u[1];return tr(tr(tr(tr({},r._syncAttributes),a),(l=t._syncAttributes)!==null&&l!==void 0?l:t.attributes),h)});return new e(i,s)},e.EMPTY=new e({}),e}(),Rs=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Gp=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;n.push(o.forceFlush())}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(l){Promise.all(n).then(function(){l()}).catch(function(u){er(u||new Error("MultiSpanProcessor: forceFlush failed")),l()})})},e.prototype.onStart=function(t,r){var n,i;try{for(var s=Rs(this._spanProcessors),o=s.next();!o.done;o=s.next()){var l=o.value;l.onStart(t,r)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(t){var r,n;try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;o.onEnd(t)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.shutdown=function(){var t,r,n=[];try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;n.push(o.shutdown())}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(l,u){Promise.all(n).then(function(){l()},u)})},e}(),UT=function(){function e(){}return e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),DT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},FT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Rr;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(Rr||(Rr={}));var JT=function(){function e(t){t===void 0&&(t={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=cp({},Ep(),ET(t));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:Un.empty(),i.mergeResourceWithDefaults&&(this.resource=Un.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=t.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=FT([],DT(t.spanProcessors),!1),this.activeSpanProcessor=new Gp(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var o=new Zp(s);this.activeSpanProcessor=o}else this.activeSpanProcessor=new UT}}return e.prototype.getTracer=function(t,r,n){var i=t+"@"+(r||"")+":"+((n==null?void 0:n.schemaUrl)||"");return this._tracers.has(i)||this._tracers.set(i,new NT({name:t,version:r,schemaUrl:n==null?void 0:n.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return H.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Gp(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),we.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&me.setGlobalContextManager(t.contextManager),t.propagator&&ht.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var s,o=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),s=Rr.timeout},t);n.forceFlush().then(function(){clearTimeout(o),s!==Rr.timeout&&(s=Rr.resolved,i(s))}).catch(function(l){clearTimeout(o),s=Rr.error,i(l)})})});return new Promise(function(n,i){Promise.all(r).then(function(s){var o=s.filter(function(l){return l!==Rr.resolved});o.length>0?i(o):n()}).catch(function(s){return i([s])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var r;return(r=this.constructor._registeredPropagators.get(t))===null||r===void 0?void 0:r()},e.prototype._getSpanExporter=function(t){var r;return(r=this.constructor._registeredExporters.get(t))===null||r===void 0?void 0:r()},e.prototype._buildPropagatorFromEnv=function(){var t=this,r=Array.from(new Set(jr().OTEL_PROPAGATORS)),n=r.map(function(s){var o=t._getPropagator(s);return o||H.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),i=n.reduce(function(s,o){return o&&s.push(o),s},[]);if(i.length!==0)return r.length===1?i[0]:new ep({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=jr().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var r=this._getSpanExporter(t);return r||H.error('Exporter "'+t+'" requested through environment variable is unavailable.'),r}},e._registeredPropagators=new Map([["tracecontext",function(){return new ip}],["baggage",function(){return new Hf}]]),e._registeredExporters=new Map,e}(),HT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},YT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Vp=function(){function e(){this._enabled=!1,this._currentContext=br}return e.prototype._bindFunction=function(t,r){t===void 0&&(t=br);var n=this,i=function(){for(var s=this,o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return n.with(t,function(){return r.apply(s,o)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):r},e.prototype.disable=function(){return this._currentContext=br,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=br,this)},e.prototype.with=function(t,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];var o=this._currentContext;this._currentContext=t||br;try{return r.call.apply(r,YT([n],HT(i),!1))}finally{this._currentContext=o}},e}(),BT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zT=function(e){BT(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,r)||this;if(r.contextManager)throw"contextManager should be defined in register method not in constructor";if(r.propagator)throw"propagator should be defined in register method not in constructor";return n}return t.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new Vp),r.contextManager&&r.contextManager.enable(),e.prototype.register.call(this,r)},t}(JT),ie;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(ie||(ie={}));var KT="http.response_content_length",jT="http.response_content_length_uncompressed",QT=KT,$T=jT,Yl;function qT(){return Yl||(Yl=document.createElement("a")),Yl}function rr(e,t){return t in e}function Ue(e,t,r,n){var i=void 0,s=void 0;rr(r,t)&&typeof r[t]=="number"&&(i=r[t]);var o=ie.FETCH_START;if(rr(r,o)&&typeof r[o]=="number"&&(s=r[o]),i!==void 0&&s!==void 0&&i>=s)return e.addEvent(t,i),e}function tn(e,t,r){r===void 0&&(r=!1),r||(Ue(e,ie.FETCH_START,t),Ue(e,ie.DOMAIN_LOOKUP_START,t),Ue(e,ie.DOMAIN_LOOKUP_END,t),Ue(e,ie.CONNECT_START,t),rr(t,"name")&&t.name.startsWith("https:")&&Ue(e,ie.SECURE_CONNECTION_START,t),Ue(e,ie.CONNECT_END,t),Ue(e,ie.REQUEST_START,t),Ue(e,ie.RESPONSE_START,t),Ue(e,ie.RESPONSE_END,t));var n=t[ie.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(QT,n);var i=t[ie.DECODED_BODY_SIZE];i!==void 0&&n!==i&&e.setAttribute($T,i)}function eE(e){return e.slice().sort(function(t,r){var n=t[ie.FETCH_START],i=r[ie.FETCH_START];return n>i?1:n<i?-1:0})}function kp(){return typeof location!="undefined"?location.origin:void 0}function Xp(e,t,r,n,i,s){i===void 0&&(i=new WeakSet);var o=Ut(e);e=o.toString();var l=rE(e,t,r,n,i,s);if(l.length===0)return{mainRequest:void 0};if(l.length===1)return{mainRequest:l[0]};var u=eE(l);if(o.origin!==kp()&&u.length>1){var a=u[0],h=tE(u,a[ie.RESPONSE_END],r),c=a[ie.RESPONSE_END],f=h[ie.FETCH_START];return f<c&&(h=a,a=void 0),{corsPreFlightRequest:a,mainRequest:h}}else return{mainRequest:l[0]}}function tE(e,t,r){for(var n=At(r),i=At(kn(t)),s=e[1],o,l=e.length,u=1;u<l;u++){var a=e[u],h=At(kn(a[ie.FETCH_START])),c=At(kn(a[ie.RESPONSE_END])),f=n-c;h>=i&&(!o||f<o)&&(o=f,s=a)}return s}function rE(e,t,r,n,i,s){var o=At(t),l=At(r),u=n.filter(function(a){var h=At(kn(a[ie.FETCH_START])),c=At(kn(a[ie.RESPONSE_END]));return a.initiatorType.toLowerCase()===(s||"xmlhttprequest")&&a.name===e&&h>=o&&c<=l});return u.length>0&&(u=u.filter(function(a){return!i.has(a)})),u}function Ut(e){if(typeof URL=="function")return new URL(e,typeof document!="undefined"?document.baseURI:typeof location!="undefined"?location.href:void 0);var t=qT();return t.href=e,t}function Wp(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var r=iE(e,t);if(t&&r.indexOf("@id")>0)return r;var n="";return e.parentNode&&(n+=Wp(e.parentNode,!1)),n+=r,n}function nE(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return t.indexOf(n.nodeType)>=0&&i===e.localName}),r.length>=1?r.indexOf(e)+1:0}function iE(e,t){var r=e.nodeType,n=nE(e),i="";if(r===Node.ELEMENT_NODE){var s=e.getAttribute("id");if(t&&s)return'//*[@id="'+s+'"]';i=e.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else if(r===Node.COMMENT_NODE)i="comment()";else return"";return i&&n>1?"/"+i+"["+n+"]":"/"+i}function Pp(e,t){var r=t||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=Ut(e);return n.origin===kp()?!0:r.some(function(i){return pp(e,i)})}var Dn;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(Dn||(Dn={}));var sE="0.44.0",oE="@opentelemetry/instrumentation-document-load";const aE="http.method",lE="http.url",uE="http.status_code",cE="http.user_agent",Mp=aE,_r=lE,dE=uE,hE=cE,Bl="exception.message",fE="exception.stacktrace",zl="exception.type",Ap="http.response.status_code",pE="server.address",mE="service.name",gE="service.version",Up="telemetry.sdk.name",Dp="telemetry.sdk.version",nr="url.full",_s="url.path",yE="url.query",bE="user_agent.original";var Ts;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Ts||(Ts={}));var vE=function(){var e,t,r={},n=(t=(e=ft).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(n){var i=Object.values(ie);i.forEach(function(l){if(rr(n,l)){var u=n[l];typeof u=="number"&&(r[l]=u)}})}else{var s=ft,o=s.timing;if(o){var i=Object.values(ie);i.forEach(function(u){if(rr(o,u)){var a=o[u];typeof a=="number"&&(r[u]=a)}})}}return r},Fp={"first-paint":Ts.FIRST_PAINT,"first-contentful-paint":Ts.FIRST_CONTENTFUL_PAINT},SE=function(e){var t,r,n=(r=(t=ft).getEntriesByType)===null||r===void 0?void 0:r.call(t,"paint");n&&n.forEach(function(i){var s=i.name,o=i.startTime;rr(Fp,s)&&e.addEvent(Fp[s],o)})},wE=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),RE=function(e){wE(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,oE,sE,r)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var r=this;window.setTimeout(function(){r._collectPerformance()})},t.prototype._addResourcesSpans=function(r){var n=this,i,s,o=(s=(i=ft).getEntriesByType)===null||s===void 0?void 0:s.call(i,"resource");o&&o.forEach(function(l){n._initResourceSpan(l,r)})},t.prototype._collectPerformance=function(){var r=this,n=Array.from(document.getElementsByTagName("meta")).find(function(o){return o.getAttribute("name")===ps}),i=vE(),s=n&&n.content||"";me.with(ht.extract(br,{traceparent:s}),function(){var o,l=r._startSpan(Dn.DOCUMENT_LOAD,ie.FETCH_START,i);l&&(me.with(we.setSpan(me.active(),l),function(){var u=r._startSpan(Dn.DOCUMENT_FETCH,ie.FETCH_START,i);u&&(u.setAttribute(_r,location.href),me.with(we.setSpan(me.active(),u),function(){var a;r.getConfig().ignoreNetworkEvents||tn(u,i),r._addCustomAttributesOnSpan(u,(a=r.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentFetch),r._endSpan(u,ie.RESPONSE_END,i)}))}),l.setAttribute(_r,location.href),l.setAttribute(hE,navigator.userAgent),r._addResourcesSpans(l),r.getConfig().ignoreNetworkEvents||(Ue(l,ie.FETCH_START,i),Ue(l,ie.UNLOAD_EVENT_START,i),Ue(l,ie.UNLOAD_EVENT_END,i),Ue(l,ie.DOM_INTERACTIVE,i),Ue(l,ie.DOM_CONTENT_LOADED_EVENT_START,i),Ue(l,ie.DOM_CONTENT_LOADED_EVENT_END,i),Ue(l,ie.DOM_COMPLETE,i),Ue(l,ie.LOAD_EVENT_START,i),Ue(l,ie.LOAD_EVENT_END,i)),r.getConfig().ignorePerformancePaintEvents||SE(l),r._addCustomAttributesOnSpan(l,(o=r.getConfig().applyCustomAttributesOnSpan)===null||o===void 0?void 0:o.documentLoad),r._endSpan(l,ie.LOAD_EVENT_END,i))})},t.prototype._endSpan=function(r,n,i){r&&(rr(i,n)?r.end(i[n]):r.end())},t.prototype._initResourceSpan=function(r,n){var i,s=this._startSpan(Dn.RESOURCE_FETCH,ie.FETCH_START,r,n);s&&(s.setAttribute(_r,r.name),this.getConfig().ignoreNetworkEvents||tn(s,r),this._addCustomAttributesOnResourceSpan(s,r,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(s,ie.RESPONSE_END,r))},t.prototype._startSpan=function(r,n,i,s){if(rr(i,n)&&typeof i[n]=="number"){var o=this.tracer.startSpan(r,{startTime:i[n]},s?we.setSpan(me.active(),s):void 0);return o}},t.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(r,n){var i=this;n&&vs(function(){return n(r)},function(s){s&&i._diag.error("addCustomAttributesOnSpan",s)})},t.prototype._addCustomAttributesOnResourceSpan=function(r,n,i){var s=this;i&&vs(function(){return i(r,n)},function(o){o&&s._diag.error("addCustomAttributesOnResourceSpan",o)})},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(An),Es;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})(Es||(Es={}));var _E="http.method",TE="http.url",EE="http.host",IE="http.scheme",CE="http.status_code",ZE="http.user_agent",LE="http.request_content_length_uncompressed",xE=_E,NE=TE,OE=EE,GE=IE,VE=CE,kE=ZE,XE=LE,WE=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},PE=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ME=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},AE=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Jp=H.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function UE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||typeof e[0]=="string"){var r=e[1];if(!(r!=null&&r.body))return Promise.resolve();if(r.body instanceof ReadableStream){var n=DE(r.body),i=n.body,s=n.length;return r.body=i,s}else return Promise.resolve(FE(r.body))}else{var o=e[0];return o!=null&&o.body?o.clone().text().then(function(l){return Kl(l)}):Promise.resolve()}}function DE(e){if(!e.pipeThrough)return Jp.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t=0,r,n=new Promise(function(s){r=s}),i=new TransformStream({start:function(){},transform:function(s,o){return WE(this,void 0,void 0,function(){var l;return PE(this,function(u){switch(u.label){case 0:return[4,s];case 1:return l=u.sent(),t+=l.byteLength,o.enqueue(s),[2]}})})},flush:function(){r(t)}});return{body:e.pipeThrough(i),length:n}}function FE(e){if(typeof Document!="undefined"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return HE(e);if(e instanceof URLSearchParams)return Kl(e.toString());if(typeof e=="string")return Kl(e);Jp.warn("unknown body type")}var JE=new TextEncoder;function Kl(e){return JE.encode(e).byteLength}function HE(e){var t,r,n=0;try{for(var i=ME(e.entries()),s=i.next();!s.done;s=i.next()){var o=AE(s.value,2),l=o[0],u=o[1];n+=l.length,u instanceof Blob?n+=u.size:n+=u.length}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var Hp="0.57.2",YE=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),BE=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},zE=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},jl,KE=300,Yp=typeof process=="object"&&((jl=process.release)===null||jl===void 0?void 0:jl.name)==="node",jE=function(e){YE(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-fetch",Hp,r)||this;return n.component="fetch",n.version=Hp,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return t.prototype.init=function(){},t.prototype._addChildSpan=function(r,n){var i=this.tracer.startSpan("CORS Preflight",{startTime:n[ie.FETCH_START]},we.setSpan(me.active(),r));tn(i,n,this.getConfig().ignoreNetworkEvents),i.end(n[ie.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(r,n){var i=Ut(n.url);r.setAttribute(VE,n.status),n.statusText!=null&&r.setAttribute(Es.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(OE,i.host),r.setAttribute(GE,i.protocol.replace(":","")),typeof navigator!="undefined"&&r.setAttribute(kE,navigator.userAgent)},t.prototype._addHeaders=function(r,n){if(!Pp(n,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};ht.inject(me.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(r instanceof Request)ht.inject(me.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else if(r.headers instanceof Headers)ht.inject(me.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else if(r.headers instanceof Map)ht.inject(me.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else{var i={};ht.inject(me.active(),i),r.headers=Object.assign({},i,r.headers||{})}},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(r,n){var i;if(n===void 0&&(n={}),mp(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var s=(n.method||"GET").toUpperCase(),o="HTTP "+s;return this.tracer.startSpan(o,{kind:Gn.CLIENT,attributes:(i={},i[Es.COMPONENT]=this.moduleName,i[xE]=s,i[NE]=r,i)})},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i){var s=n.entries;if(!s.length){if(!performance.getEntriesByType)return;s=performance.getEntriesByType("resource")}var o=Xp(n.spanUrl,n.startTime,i,s,this._usedResources,"fetch");if(o.mainRequest){var l=o.mainRequest;this._markResourceAsUsed(l);var u=o.corsPreFlightRequest;u&&(this._addChildSpan(r,u),this._markResourceAsUsed(u)),tn(r,l,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._endSpan=function(r,n,i){var s=this,o=pt(Date.now()),l=Sr();this._addFinalSpanAttributes(r,i),setTimeout(function(){var u;(u=n.observer)===null||u===void 0||u.disconnect(),s._findResourceAndAddNetworkEvents(r,n,l),s._tasksCount--,s._clearResources(),r.end(o)},KE)},t.prototype._patchConstructor=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];var u=this,a=Ut(o[0]instanceof Request?o[0].url:String(o[0])).href,h=o[0]instanceof Request?o[0]:o[1]||{},c=i._createSpan(a,h);if(!c)return n.apply(this,o);var f=i._prepareSpanData(a);i.getConfig().measureRequestSize&&UE.apply(void 0,zE([],BE(o),!1)).then(function(v){v&&c.setAttribute(XE,v)}).catch(function(v){i._diag.warn("getFetchBodyLength",v)});function d(v,y){i._applyAttributesAfterFetch(v,h,y),i._endSpan(v,f,{status:y.status||0,statusText:y.message,url:a})}function p(v,y){i._applyAttributesAfterFetch(v,h,y),y.status>=200&&y.status<400?i._endSpan(v,f,y):i._endSpan(v,f,{status:y.status,statusText:y.statusText,url:a})}function m(v,y,w){try{var _=w.clone(),S=w.clone(),b=_.body;if(b){var R=b.getReader(),I=function(){R.read().then(function(E){var C=E.done;C?p(v,S):I()},function(E){d(v,E)})};I()}else p(v,w)}finally{y(w)}}function g(v,y,w){try{d(v,w)}finally{y(w)}}return new Promise(function(v,y){return me.with(we.setSpan(me.active(),c),function(){return i._addHeaders(h,a),i._tasksCount++,n.apply(u,h instanceof Request?[h]:[a,h]).then(m.bind(u,c,v),g.bind(u,c,y))})})}}},t.prototype._applyAttributesAfterFetch=function(r,n,i){var s=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&vs(function(){return o(r,n,i)},function(l){l&&s._diag.error("applyCustomAttributesOnSpan",l)})},t.prototype._prepareSpanData=function(r){var n=Sr(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:n,spanUrl:r};var s=new PerformanceObserver(function(o){var l=o.getEntries();l.forEach(function(u){u.initiatorType==="fetch"&&u.name===r&&i.push(u)})});return s.observe({entryTypes:["resource"]}),{entries:i,observer:s,startTime:n,spanUrl:r}},t.prototype.enable=function(){if(Yp){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Ae(fetch)&&(this._unwrap(Vn,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Vn,"fetch",this._patchConstructor())},t.prototype.disable=function(){Yp||(this._unwrap(Vn,"fetch"),this._usedResources=new WeakSet)},t}(An),QE="http.method",$E="http.url",qE="http.host",eI="http.scheme",tI="http.status_code",rI="http.user_agent",nI="http.request_content_length_uncompressed",iI=QE,sI=$E,oI=qE,aI=eI,lI=tI,uI=rI,cI=nI,Dt;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(Dt||(Dt={}));var dI=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},hI=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},fI=H.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function pI(e){if(typeof Document!="undefined"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return gI(e);if(e instanceof URLSearchParams)return Bp(e.toString());if(typeof e=="string")return Bp(e);fI.warn("unknown body type")}var mI=new TextEncoder;function Bp(e){return mI.encode(e).byteLength}function gI(e){var t,r,n=0;try{for(var i=dI(e.entries()),s=i.next();!s.done;s=i.next()){var o=hI(s.value,2),l=o[0],u=o[1];n+=l.length,u instanceof Blob?n+=u.size:n+=u.length}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var zp="0.57.2",Ql;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(Ql||(Ql={}));var yI=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),bI=300,vI=function(e){yI(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-xml-http-request",zp,r)||this;return n.component="xml-http-request",n.version=zp,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return t.prototype.init=function(){},t.prototype._addHeaders=function(r,n){var i=Ut(n).href;if(!Pp(i,this.getConfig().propagateTraceHeaderCorsUrls)){var s={};ht.inject(me.active(),s),Object.keys(s).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var o={};ht.inject(me.active(),o),Object.keys(o).forEach(function(l){r.setRequestHeader(l,String(o[l]))})},t.prototype._addChildSpan=function(r,n){var i=this;me.with(we.setSpan(me.active(),r),function(){var s=i.tracer.startSpan("CORS Preflight",{startTime:n[ie.FETCH_START]});tn(s,n,i.getConfig().ignoreNetworkEvents),s.end(n[ie.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var s=Ut(i);n.status!==void 0&&r.setAttribute(lI,n.status),n.statusText!==void 0&&r.setAttribute(Ql.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(oI,s.host),r.setAttribute(aI,s.protocol.replace(":","")),r.setAttribute(uI,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(r,n){var i=this,s=this.getConfig().applyCustomAttributesOnSpan;typeof s=="function"&&vs(function(){return s(r,n)},function(o){o&&i._diag.error("applyCustomAttributesOnSpan",o)})},t.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(s){var o=s.getEntries(),l=Ut(n);o.forEach(function(u){u.initiatorType==="xmlhttprequest"&&u.name===l.href&&i.createdResources&&i.createdResources.entries.push(u)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(ft.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i,s,o){if(!(!i||!s||!o||!r.createdResources)){var l=r.createdResources.entries;(!l||!l.length)&&(l=ft.getEntriesByType("resource"));var u=Xp(Ut(i).href,s,o,l,this._usedResources);if(u.mainRequest){var a=u.mainRequest;this._markResourceAsUsed(a);var h=u.corsPreFlightRequest;h&&(this._addChildSpan(n,h),this._markResourceAsUsed(h)),tn(n,a,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},t.prototype._createSpan=function(r,n,i){var s;if(mp(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=i.toUpperCase(),l=this.tracer.startSpan(o,{kind:Gn.CLIENT,attributes:(s={},s[iI]=i,s[sI]=Ut(n).toString(),s)});return l.addEvent(Dt.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:l,spanUrl:n}),l},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];var u=o[0],a=o[1];return i._createSpan(this,a,u),n.apply(this,o)}}},t.prototype._patchSend=function(){var r=this;function n(h,c,f,d){var p=c.callbackToRemoveEvents;typeof p=="function"&&p();var m=c.span,g=c.spanUrl,v=c.sendStartTime;m&&(r._findResourceAndAddNetworkEvents(c,m,g,v,f),m.addEvent(h,d),r._addFinalSpanAttributes(m,c,g),m.end(d),r._tasksCount--),r._clearResources()}function i(h,c){var f=r._xhrMem.get(c);if(f){f.status=c.status,f.statusText=c.statusText,r._xhrMem.delete(c),f.span&&r._applyAttributesAfterXHR(f.span,c);var d=Sr(),p=Date.now();setTimeout(function(){n(h,f,d,p)},bI)}}function s(){i(Dt.EVENT_ERROR,this)}function o(){i(Dt.EVENT_ABORT,this)}function l(){i(Dt.EVENT_TIMEOUT,this)}function u(){this.status<299?i(Dt.EVENT_LOAD,this):i(Dt.EVENT_ERROR,this)}function a(h){h.removeEventListener("abort",o),h.removeEventListener("error",s),h.removeEventListener("load",u),h.removeEventListener("timeout",l);var c=r._xhrMem.get(h);c&&(c.callbackToRemoveEvents=void 0)}return function(h){return function(){for(var f=this,d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];var m=r._xhrMem.get(this);if(!m)return h.apply(this,d);var g=m.span,v=m.spanUrl;if(g&&v){if(r.getConfig().measureRequestSize&&(d!=null&&d[0])){var y=d[0],w=pI(y);w!==void 0&&g.setAttribute(cI,w)}me.with(we.setSpan(me.active(),g),function(){r._tasksCount++,m.sendStartTime=Sr(),g.addEvent(Dt.METHOD_SEND),f.addEventListener("abort",o),f.addEventListener("error",s),f.addEventListener("load",u),f.addEventListener("timeout",l),m.callbackToRemoveEvents=function(){a(f),m.createdResources&&m.createdResources.observer.disconnect()},r._addHeaders(f,v),r._addResourceObserver(f,v)})}return h.apply(this,d)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Ae(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Ae(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(An);const $l=/\b(query|mutation|subscription)\b\s*([A-Za-z_]\w*)?/g;function SI(e){var a;const t=RI(e);if(t===null||typeof t!="object")return null;const r=Array.isArray(t)?t[0]:t;if(!r||typeof r!="object")return null;const n=r,i=typeof n.query=="string"?n.query:void 0,s=typeof n.operationName=="string"?n.operationName:void 0;if(i===void 0&&s===void 0)return null;const o=i?wI(i,s):null,l=(a=o==null?void 0:o[1])!=null?a:_I(i),u=s!=null?s:o==null?void 0:o[2];return u===void 0&&l===void 0?null:{name:u,type:l}}function wI(e,t){$l.lastIndex=0;let r=null;for(let n=$l.exec(e);n!==null;n=$l.exec(e)){if(t===void 0||n[2]===t)return n;r===null&&(r=n)}return r}function RI(e){if(e==null)return null;if(typeof e=="object")return e;if(typeof e!="string")return null;try{return JSON.parse(e)}catch(t){return null}}function _I(e){if(e!==void 0&&/^\s*\{/.test(e))return"query"}const TI=0,Kp=2e3;class EI{constructor(t=TI,r=Kp){this.lastRecordedAt=new Map,this.windowMillis=t,this.maxSize=r>0?r:Kp}shouldRecord(t,r=Date.now()){if(this.windowMillis<=0)return!0;const n=this.lastRecordedAt.get(t);return n===void 0||n<=r-this.windowMillis}markRecorded(t,r=Date.now()){if(!(this.windowMillis<=0))for(this.lastRecordedAt.delete(t),this.lastRecordedAt.set(t,r);this.lastRecordedAt.size>this.maxSize;){const n=this.lastRecordedAt.keys().next().value;if(n===void 0)break;this.lastRecordedAt.delete(n)}}reset(){this.lastRecordedAt.clear()}}const Is=1e3,jp=1e3*2,ql=4*60*60*1e3,eu=15*60*1e3,Cs={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Qp=100,Fn="app.highlight.io",$p="https://app.launchdarkly.com",II={"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"},CI="/projects/default",ZI=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function Zs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)n!=="__proto__"&&(e[n]=r[n])}return e}var LI={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 tu(e,t){function r(i,s,o){if(typeof document!="undefined"){o=Zs({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,o[u]!==!0&&(l+="="+o[u].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+l}}function n(i){if(!(typeof document=="undefined"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},l=0;l<s.length;l++){var u=s[l].split("="),a=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(h in o||(o[h]=e.read(a,h)),i===h)break}catch(c){}}return i?o[i]:o}}return Object.create({set:r,get:n,remove:function(i,s){r(i,"",Zs({},s,{expires:-1}))},withAttributes:function(i){return tu(this.converter,Zs({},this.attributes,i))},withConverter:function(i){return tu(Zs({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Ls=tu(LI,{path:"/"});const qp=Object.create(null),Ge=(e,t,...r)=>{const n=`[@launchdarkly plugins]: (${e}): `;_e(t,n,...r)},It=(e,t,r,...n)=>{qp[`${e}-${t}`]||(qp[`${e}-${t}`]=!0,Ge(e,r,...n))};var Jn=(e=>(e.CLIENT_ID="highlightClientID",e))(Jn||{});let xs="localStorage",ru=!0,Hn;class xI{constructor(){L(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var n;return(n=Object.keys(this.storage)[t])!=null?n:null}getItem(t){var r;return(r=this.storage[t])!=null?r:""}setItem(t,r){this.storage[t]=r}removeItem(t){delete this.storage[t]}}class NI{getItem(t){var r;return(r=Ls.get(t))!=null?r:""}setItem(t,r){if(!ru)return;const n=new Date;n.setTime(n.getTime()+eu),Ls.set(t,r,x({expires:n},Hn?{domain:Hn}:{}))}removeItem(t){ru&&Ls.remove(t,Hn?{domain:Hn}:void 0)}keys(){var t;return Object.keys((t=Ls.get())!=null?t:{})}}const rn=new xI,nn=new NI,Ns=()=>{let e=null;if(typeof window=="undefined")return rn;try{switch(xs){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(It("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${xs}; using global storage`),e=rn)}catch(t){It("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=rn}return e},em=e=>{xs=e},Os=e=>{ru=e},tm=e=>{Hn=e},He=e=>{try{return Ns().getItem(e)}catch(t){return It("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),rn.getItem(e)}},mt=(e,t)=>{nn.setItem(e,t);try{return Ns().setItem(e,t)}catch(r){return It("storage","setItem","debug",`failed to set item ${e}; using global storage`,r),rn.setItem(e,t)}},Tr=e=>{nn.removeItem(e);try{return Ns().removeItem(e)}catch(t){return It("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),rn.removeItem(e)}},OI=e=>{if(xs==="sessionStorage"){It("segment","sessionStorage","warn","highlight.io cannot use local storage; segment integration will not work");return}if(typeof window=="undefined"){It("segment","no-window","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[r,n]=arguments;e({keyName:r,keyValue:n}),t.apply(this,[r,n])}};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 Yn=e=>`${Ve.SESSION_DATA}_${e}`,Nt=()=>{var e;return typeof globalThis!="undefined"&&((e=globalThis.persistentSessionSecureID)!=null&&e.length)?globalThis.persistentSessionSecureID:nu()},GI=e=>{typeof globalThis!="undefined"&&(e!=null&&e.length)&&(globalThis.persistentSessionSecureID=e)},nu=()=>{var e;return(e=He(Ve.SESSION_ID))!=null?e:""},ir=e=>{mt(Ve.SESSION_ID,e)},iu=e=>{const t=Yn(e);return JSON.parse(He(t)||"{}")},rm=(e,t)=>!e.sessionKey&&!!e.sessionStartTime&&t-e.sessionStartTime>ql,Ft=e=>{e||(e=nu());let t=iu(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<eu&&!rm(t,Date.now()))return t;Tr(Yn(e))},VI=e=>{const t=e!=null?e:nu();if(t)try{return iu(t)}catch(r){return}};let nm;const kI=()=>nm,XI=e=>{nm=e},WI=10*1e3;let im=0;const PI=()=>{const e=Date.now();if(!(e-im<WI)){im=e;try{const t=iu(Nt());if(!(t!=null&&t.sessionSecureID))return;if(rm(t,e)){Tr(Yn(t.sessionSecureID));return}it(Y(x({},t),{lastPushTime:e}))}catch(t){It("highlightSession","touchSession","debug","failed to refresh session activity",t)}}},it=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;GI(t);const r=Yn(t);mt(r,JSON.stringify(e)),MI(r)},sm=function(){const e=nn.getItem(Ve.SESSION_ID);ir(e);const t=Yn(e),r=nn.getItem(t);try{it(JSON.parse(r))}catch(n){}};function MI(e){var i;const t=`${Ve.SESSION_DATA}_`,r=new Set,n=Ns();for(let s=n.length-1;s>=0;s--){const o=n.key(s);o&&o.startsWith(t)&&o!==e&&r.add(o)}for(const s of nn.keys())s.startsWith(t)&&s!==e&&r.add(s);for(const s of r){let o=!0;try{const l=He(s)||nn.getItem(s)||"{}",u=JSON.parse(l),a=(i=u.lastPushTime)!=null?i:u.sessionStartTime;o=a===void 0||Date.now()-a>=eu}catch(l){}o&&(It("highlightSession","pruneSessionData","debug",`removing session data for stale key ${s}`),Tr(s))}}const AI=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),UI=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function DI(e){return!!(e.includes("/sdk/evalx")&&e.match(AI)||e.includes("/eval/")&&e.match(UI))}const om="X-Highlight-Request",am=e=>{let t=e;return!e.startsWith("https://")&&!e.startsWith("http://")&&(t=`${window.location.origin}${t}`),t.replace(/\/+$/,"")},FI=(e,{headersToRedact:t,headersToRecord:r,requestResponseSanitizer:n})=>{var u,a;let i=e;if(n){let c=!0;try{i.request.body=JSON.parse(i.request.body)}catch(d){c=!1}let f=!0;try{i.response.body=JSON.parse(i.response.body)}catch(d){f=!1}try{i=n(i)}catch(d){}finally{c=c&&!!((u=i==null?void 0:i.request)!=null&&u.body),f=f&&!!((a=i==null?void 0:i.response)!=null&&a.body),c&&(i.request.body=JSON.stringify(i.request.body)),f&&(i.response.body=JSON.stringify(i.response.body))}if(!i)return null}const h=i,{request:s,response:o}=h,l=rt(h,["request","response"]);return x({request:If(s,t,r),response:If(o,t,r)},l)},lm=(e,t,r,n)=>{e.sort((u,a)=>u.responseEnd-a.responseEnd);const i={xmlhttprequest:{},others:{},fetch:{}},s=e.reduce((u,a)=>{const h=am(a.name);return a.initiatorType===r?u[r][h]=[...u[r][h]||[],a]:u.others[h]=[...u.others[h]||[],a],u},i);let o={};o=t.reduce((u,a)=>{const h=am(a.request.url);return u[h]=[...u[h]||[],a],u},o);for(let u in s[r]){const a=s[r][u],h=o[u];if(!h)continue;const c=Math.max(a.length-h.length,0);for(let f=c;f<a.length;f++)a[f]&&(a[f].requestResponsePair=h[f-c])}let l=[];for(let u in s)for(let a in s[u])l=l.concat(s[u][a]);return l.sort((u,a)=>u.fetchStart-a.fetchStart).reduce((u,a)=>{let h=a.requestResponsePair;return h&&(h=FI(a.requestResponsePair,n),!h)||(a.toJSON=function(){const c=window.performance.timeOrigin;return{initiatorType:this.initiatorType,startTimeAbs:c+this.startTime,connectStartAbs:c+this.connectStart,connectEndAbs:c+this.connectEnd,domainLookupStartAbs:c+this.domainLookupStart,domainLookupEndAbs:c+this.domainLookupEnd,fetchStartAbs:c+this.fetchStart,redirectStartAbs:c+this.redirectStart,redirectEndAbs:c+this.redirectEnd,requestStartAbs:c+this.requestStart,responseStartAbs:c+this.responseStart,responseEndAbs:c+this.responseEnd,secureConnectionStartAbs:c+this.secureConnectionStart,workerStartAbs:c+this.workerStart,name:this.name,transferSize:this.transferSize,encodedBodySize:this.encodedBodySize,decodedBodySize:this.decodedBodySize,nextHopProtocol:this.nextHopProtocol,requestResponsePairs:h}},u.push(a)),u},[])},JI=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),HI=e=>DI(e),YI=(e,t)=>t.some(r=>e.toLocaleLowerCase().includes(r)),Gs=(e,t,r)=>!YI(e,t)&&!HI(e)&&!JI(e),su=(e,t,r)=>{var o;if(r.some(l=>e.toLowerCase().includes(l)))return!1;let n=[];t===!0?(n=["localhost",/^\//],(o=window==null?void 0:window.location)!=null&&o.host&&n.push(um(window.location.host))):t instanceof Array&&(n=t);const i=zI(e);let s=!1;return n.forEach(l=>{i.match(l)&&(s=!0)}),s},BI=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),um=e=>new RegExp("^https?://([^/]+\\.)?"+BI(e)+"([:/?#]|$)"),zI=e=>{if(e.startsWith("/")&&!e.startsWith("//"))return e;try{return new URL(e).origin}catch(t){return e}};function KI(e){for(var t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,i=0;i<e;i++)t+=r.charAt(Math.floor(Math.random()*n));return t}const ou=()=>{const e=KI(10),t=Dx(),r=t==null?void 0:t.spanContext().traceId;return[Nt(),r!=null?r:e]},cm=(e,t)=>e+"/"+t,jI=(e,t,r,n,i,s)=>{const o=XMLHttpRequest.prototype,l=o.open,u=o.send,a=o.setRequestHeader;return o.open=function(h,c){return typeof c=="string"?this._url=c:this._url=c.toString(),this._method=h,this._requestHeaders={},this._shouldRecordHeaderAndBody=!n.some(f=>this._url.toLowerCase().includes(f)),l.apply(this,arguments)},o.setRequestHeader=function(h,c){return this._requestHeaders[h]=c,a.apply(this,arguments)},o.send=function(h){if(!Gs(this._url,t))return u.apply(this,arguments);const[c,f]=ou();su(this._url,r,n)&&this.setRequestHeader(om,cm(c,f));const d=this._shouldRecordHeaderAndBody,p={sessionSecureID:c,id:f,url:this._url,verb:this._method,headers:d?this._requestHeaders:{},body:void 0};if(d&&h){const m=au(h,p.url);m&&(this._body=m,p.body=Ot(m,i,s,p.headers))}return this.addEventListener("load",function(){return z(this,null,function*(){const m={status:this.status,headers:{},body:void 0};if(d){const y=this.getAllResponseHeaders().trim().split(/[\r\n]+/),w={};if(y.forEach(function(_){const S=_.split(": "),b=S.shift();w[b]=S.join(": ")}),m.headers=w,h){const _=au(h,p.url);_&&(p.body=Ot(_,i,s,m.headers))}if(this.responseType===""||this.responseType==="text")m.body=Ot(this.responseText,i,s,m.headers),m.size=this.responseText.length*8;else if(this.responseType==="blob"){if(this.response instanceof Blob)try{const _=yield this.response.text();m.body=Ot(_,i,s,m.headers),m.size=this.response.size}catch(_){}}else try{m.body=Ot(this.response,i,s,m.headers)}catch(_){}}e({request:p,response:m,urlBlocked:!d})})}),this.addEventListener("error",function(){return z(this,null,function*(){const m={status:this.status,headers:void 0,body:void 0};e({request:p,response:m,urlBlocked:!1})})}),u.apply(this,arguments)},()=>{o.open=l,o.send=u,o.setRequestHeader=a}},QI=/^\[object (ArrayBuffer|SharedArrayBuffer|DataView|(?:Ui|I)nt(?:8|16|32)Array|Uint8ClampedArray|Float(?:16|32|64)Array|Big(?:Ui|I)nt64Array|Blob|File|FormData|URLSearchParams|ReadableStream)\]$/,$I=e=>typeof e=="object"&&e!==null&&QI.test(Object.prototype.toString.call(e)),qI=e=>{var r,n;return typeof Blob!="undefined"&&e instanceof Blob?`[Blob type="${e.type}" size=${e.size}]`:typeof FormData!="undefined"&&e instanceof FormData?"[FormData]":typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams?e.toString().slice(0,lu):`[binary size=${(n=(r=e==null?void 0:e.byteLength)!=null?r:e==null?void 0:e.size)!=null?n:0}]`},au=(e,t)=>{if($I(e))return qI(e);if(typeof e=="string"){if(!((t!=null&&t.includes("localhost")||t!=null&&t.includes("highlight.run"))&&(e.includes("pushPayload")||e.includes("pushSessionEvents"))))return e}else if(typeof e=="object"||typeof e=="number"||typeof e=="boolean")return Rt(e);return null},lu=64*1024,eC={"application/json":256*1024,"text/plain":256*1024},dm=(e,t)=>`[body omitted: ${e} bytes exceeds the ${t} byte limit]`,uu=e=>{var r,n;if(!e)return lu;let t="";if(typeof e.get=="function")t=(r=e.get("content-type"))!=null?r:"";else{const i=e,s=Object.keys(i).find(o=>o.toLowerCase()==="content-type");t=s&&i[s]||""}try{t=t.split(";")[0].trim()}catch(i){}return(n=eC[t])!=null?n:lu},hm=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ot=(e,t,r,n)=>{const i=uu(n);if(typeof e=="string"&&e.length>i)return dm(e.length,i);if(e){if(t)try{const s=JSON.parse(e);Array.isArray(s)?s.forEach(o=>{hm(o)&&Object.keys(o).forEach(l=>{t.includes(l.toLocaleLowerCase())&&(o[l]="[REDACTED]")})}):Object.keys(s).forEach(o=>{t.includes(o.toLocaleLowerCase())&&(s[o]="[REDACTED]")}),e=JSON.stringify(s)}catch(s){}if(r)try{const s=JSON.parse(e);Array.isArray(s)?s.forEach((o,l)=>{if(!hm(o)){s[l]="[REDACTED]";return}Object.keys(o).forEach(u=>{r.includes(u.toLocaleLowerCase())||(o[u]="[REDACTED]")})}):Object.keys(s).forEach(o=>{r.includes(o.toLocaleLowerCase())||(s[o]="[REDACTED]")}),e=JSON.stringify(s)}catch(s){}}try{e=e.slice(0,i)}catch(s){}return e},tC=(e,t,r,n,i,s)=>{const o=window._fetchProxy;return window._fetchProxy=function(l,u){const{method:a,url:h}=rC(l,u);if(!Gs(h,t))return o.call(this,l,u);const[c,f]=ou();if(su(h,r,n)){u=u||{};let g=new Headers(u.headers);l instanceof Request&&[...l.headers].forEach(([v,y])=>g.set(v,y)),g.set(om,cm(c,f)),u.headers=Object.fromEntries(g.entries())}const d={sessionSecureID:c,id:f,headers:{},body:void 0,url:h,verb:a},p=!n.some(g=>h.toLowerCase().includes(g));p&&(d.headers=Object.fromEntries(new Headers(u==null?void 0:u.headers).entries()),d.body=Ot(u==null?void 0:u.body,i,s,u==null?void 0:u.headers));let m=o.call(this,l,u);return nC(m,d,e,p,i,s),m},()=>{window._fetchProxy=o}},rC=(e,t)=>{const r=t&&t.method||typeof e=="object"&&"method"in e&&e.method||"GET";let n;return typeof e=="object"?"url"in e&&e.url?n=e.url:n=e.toString():n=e,{method:r,url:n}},nC=(e,t,r,n,i,s)=>{const o=l=>z(this,null,function*(){let u={body:void 0,headers:void 0,status:0,size:0},a=!1,h=!n;"stack"in l||l instanceof Error?(u=Y(x({},u),{body:l.message,status:0,size:void 0}),a=!0):"status"in l&&(u=Y(x({},u),{status:l.status}),n&&(u.body=yield fm(l,s,i),u.headers=Object.fromEntries(l.headers.entries()),u.size=u.body.length*8),(l.type==="opaque"||l.type==="opaqueredirect")&&(h=!0,u=Y(x({},u),{body:"CORS blocked request"})),a=!0),a&&r({request:t,response:u,urlBlocked:h})});e.then(o).catch(()=>{})},fm=(e,t,r)=>z(this,null,function*(){let n;try{const s=e.clone().body;if(s){let o=s.getReader(),l=new TextDecoder,u;const a=uu(e.headers);let h="",c=!1;for(;!(u=yield o.read()).done;){let f=u.value;if(h+=l.decode(f,{stream:!0}),h.length>a){c=!0,o.cancel().catch(()=>{});break}}c||(h+=l.decode()),n=c?dm(Number(e.headers.get("content-length"))||h.length,a):h,n=Ot(n,r,t,e.headers)}else n=""}catch(i){n=`Unable to clone response: ${i}`}return n});var Ct;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(Ct||(Ct={}));var Gt;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(Gt||(Gt={}));var iC=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},mm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},sC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},oC=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},aC=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function lC(e){return e!=null}function gm(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(r){return[r,e[r]]})))}function uC(e){var t,r;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((r=e.schemaUrl)!==null&&r!==void 0?r:"")}var ym=function(e){iC(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error);function Bn(e,t){var r,n=new Promise(function(s,o){r=setTimeout(function(){o(new ym("Operation timed out."))},t)});return Promise.race([e,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}function cC(e){return pm(this,void 0,void 0,function(){var t=this;return mm(this,function(r){return[2,Promise.all(e.map(function(n){return pm(t,void 0,void 0,function(){var i,s;return mm(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,n];case 1:return i=o.sent(),[2,{status:"fulfilled",value:i}];case 2:return s=o.sent(),[2,{status:"rejected",reason:s}];case 3:return[2]}})})}))]})})}function dC(e){return e.status==="rejected"}function bm(e,t){var r=[];return e.forEach(function(n){r.push.apply(r,oC([],sC(t(n)),!1))}),r}function hC(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var i=aC(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(!t.has(o))return!1}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}function fC(e,t){for(var r=0,n=e.length-1,i=e.length;n>=r;){var s=r+Math.trunc((n-r)/2);e[s]<t?r=s+1:(i=s,n=s-1)}return i}function pC(e,t){return e.toLowerCase()===t.toLowerCase()}var Er;(function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Er||(Er={}));var mC=function(){function e(){this.kind=Er.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(t,r){},e.prototype.diff=function(t,r){},e.prototype.toMetricData=function(t,r,n,i){},e}(),oe;(function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(oe||(oe={}));function sr(e,t,r){var n,i,s,o;return vC(e)||H.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:(n=r==null?void 0:r.description)!==null&&n!==void 0?n:"",unit:(i=r==null?void 0:r.unit)!==null&&i!==void 0?i:"",valueType:(s=r==null?void 0:r.valueType)!==null&&s!==void 0?s:qt.DOUBLE,advice:(o=r==null?void 0:r.advice)!==null&&o!==void 0?o:{}}}function gC(e,t){var r,n;return{name:(r=e.name)!==null&&r!==void 0?r:t.name,description:(n=e.description)!==null&&n!==void 0?n:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function yC(e,t){return pC(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var bC=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function vC(e){return e.match(bC)!=null}var SC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function wC(e){var t=e.map(function(){return 0});return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var cu=function(){function e(t,r,n,i){n===void 0&&(n=!0),i===void 0&&(i=wC(r)),this.startTime=t,this._boundaries=r,this._recordMinMax=n,this._current=i}return e.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var r=fC(this._boundaries,t);this._current.buckets.counts[r]+=1}},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),vm=function(){function e(t,r){this._boundaries=t,this._recordMinMax=r,this.kind=Er.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new cu(t,this._boundaries,this._recordMinMax)},e.prototype.merge=function(t,r){for(var n=t.toPointValue(),i=r.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,l=new Array(s.length),u=0;u<s.length;u++)l[u]=s[u]+o[u];var a=1/0,h=-1/0;return this._recordMinMax&&(n.hasMinMax&&i.hasMinMax?(a=Math.min(n.min,i.min),h=Math.max(n.max,i.max)):n.hasMinMax?(a=n.min,h=n.max):i.hasMinMax&&(a=i.min,h=i.max)),new cu(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:l},count:n.count+i.count,sum:n.sum+i.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||i.hasMinMax),min:a,max:h})},e.prototype.diff=function(t,r){for(var n=t.toPointValue(),i=r.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,l=new Array(s.length),u=0;u<s.length;u++)l[u]=o[u]-s[u];return new cu(r.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:l},count:i.count-n.count,sum:i.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.HISTOGRAM,dataPoints:n.map(function(s){var o=SC(s,2),l=o[0],u=o[1],a=u.toPointValue(),h=t.type===oe.GAUGE||t.type===oe.UP_DOWN_COUNTER||t.type===oe.OBSERVABLE_GAUGE||t.type===oe.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:l,startTime:u.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:h?void 0:a.sum,buckets:a.buckets,count:a.count}}})}},e}(),du=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},hu=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Sm=function(){function e(t,r,n,i){t===void 0&&(t=new RC),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.backing=t,this.indexBase=r,this.indexStart=n,this.indexEnd=i}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),e.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(r,n){return t.at(n)})},e.prototype.at=function(t){var r=this.indexBase-this.indexStart;return t<r&&(t+=this.backing.length),t-=r,this.backing.countAt(t)},e.prototype.incrementBucket=function(t,r){this.backing.increment(t,r)},e.prototype.decrementBucket=function(t,r){this.backing.decrement(t,r)},e.prototype.trim=function(){for(var t=0;t<this.length;t++)if(this.at(t)!==0){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(this.at(t)!==0){this.indexEnd-=this.length-t-1;break}this._rotate()},e.prototype.downscale=function(t){this._rotate();for(var r=1+this.indexEnd-this.indexStart,n=1<<t,i=0,s=0,o=this.indexStart;o<=this.indexEnd;){var l=o%n;l<0&&(l+=n);for(var u=l;u<n&&i<r;u++)this._relocateBucket(s,i),i++,o++;s++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var t=this.indexBase-this.indexStart;t!==0&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(t,r){t!==r&&this.incrementBucket(t,this.backing.emptyBucket(r))},e}(),RC=function(){function e(t){t===void 0&&(t=[0]),this._counts=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(t){return this._counts[t]},e.prototype.growTo=function(t,r,n){var i=new Array(t).fill(0);i.splice.apply(i,hu([n,this._counts.length-r],du(this._counts.slice(r)),!1)),i.splice.apply(i,hu([0,r],du(this._counts.slice(0,r)),!1)),this._counts=i},e.prototype.reverse=function(t,r){for(var n=Math.floor((t+r)/2)-t,i=0;i<n;i++){var s=this._counts[t+i];this._counts[t+i]=this._counts[r-i-1],this._counts[r-i-1]=s}},e.prototype.emptyBucket=function(t){var r=this._counts[t];return this._counts[t]=0,r},e.prototype.increment=function(t,r){this._counts[t]+=r},e.prototype.decrement=function(t,r){this._counts[t]>=r?this._counts[t]-=r:this._counts[t]=0},e.prototype.clone=function(){return new e(hu([],du(this._counts),!1))},e}(),_C=52,TC=2146435072,EC=1048575,fu=1023,wm=-fu+1,Rm=fu,pu=Math.pow(2,-1022);function _m(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=(r&TC)>>20;return n-fu}function Tm(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=t.getUint32(4),i=(r&EC)*Math.pow(2,32);return i+n}function mu(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function IC(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var CC=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zn=function(e){CC(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),ZC=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<pu)return this._minNormalLowerBoundaryIndex();var r=_m(t),n=this._rightShift(Tm(t)-1,_C);return r+n>>this._shift},e.prototype.lowerBoundary=function(t){var r=this._minNormalLowerBoundaryIndex();if(t<r)throw new zn("underflow: "+t+" is < minimum lower boundary: "+r);var n=this._maxNormalLowerBoundaryIndex();if(t>n)throw new zn("overflow: "+t+" is > maximum lower boundary: "+n);return mu(1,t<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var t=wm>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return Rm>>this._shift},e.prototype._rightShift=function(t,r){return Math.floor(t*Math.pow(2,-r))},e}(),LC=function(){function e(t){this._scale=t,this._scaleFactor=mu(Math.LOG2E,t),this._inverseFactor=mu(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=pu)return this._minNormalLowerBoundaryIndex()-1;if(Tm(t)===0){var r=_m(t);return(r<<this._scale)-1}var n=Math.floor(Math.log(t)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return n>=i?i:n},e.prototype.lowerBoundary=function(t){var r=this._maxNormalLowerBoundaryIndex();if(t>=r){if(t===r)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new zn("overflow: "+t+" is > maximum lower boundary: "+r)}var n=this._minNormalLowerBoundaryIndex();if(t<=n){if(t===n)return pu;if(t===n-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new zn("overflow: "+t+" is < minimum lower boundary: "+n)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return wm<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(Rm+1<<this._scale)-1},e}(),Em=-10,Im=20,xC=Array.from({length:31},function(e,t){return t>10?new LC(t-10):new ZC(t-10)});function Cm(e){if(e>Im||e<Em)throw new zn("expected scale >= "+Em+" && <= "+Im+", got: "+e);return xC[e+10]}var NC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Vs=function(){function e(t,r){this.low=t,this.high=r}return e.combine=function(t,r){return new e(Math.min(t.low,r.low),Math.max(t.high,r.high))},e}(),OC=20,GC=160,gu=2,VC=function(){function e(t,r,n,i,s,o,l,u,a,h,c){t===void 0&&(t=t),r===void 0&&(r=GC),n===void 0&&(n=!0),i===void 0&&(i=0),s===void 0&&(s=0),o===void 0&&(o=0),l===void 0&&(l=Number.POSITIVE_INFINITY),u===void 0&&(u=Number.NEGATIVE_INFINITY),a===void 0&&(a=new Sm),h===void 0&&(h=new Sm),c===void 0&&(c=Cm(OC)),this.startTime=t,this._maxSize=r,this._recordMinMax=n,this._sum=i,this._count=s,this._zeroCount=o,this._min=l,this._max=u,this._positive=a,this._negative=h,this._mapping=c,this._maxSize<gu&&(H.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+gu),this._maxSize=gu)}return e.prototype.record=function(t){this.updateByIncrement(t,1)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(t,r){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=r,t===0){this._zeroCount+=r;return}this._sum+=t*r,t>0?this._updateBuckets(this._positive,t,r):this._updateBuckets(this._negative,-t,r)}},e.prototype.merge=function(t){this._count===0?(this._min=t.min,this._max=t.max):t.count!==0&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var r=this._minScale(t);this._downscale(this.scale-r),this._mergeBuckets(this.positive,t,t.positive,r),this._mergeBuckets(this.negative,t,t.negative,r)},e.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var r=this._minScale(t);this._downscale(this.scale-r),this._diffBuckets(this.positive,t,t.positive,r),this._diffBuckets(this.negative,t,t.negative,r)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(t,r,n){var i=this._mapping.mapToIndex(r),s=!1,o=0,l=0;if(t.length===0?(t.indexStart=i,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):i<t.indexStart&&t.indexEnd-i>=this._maxSize?(s=!0,l=i,o=t.indexEnd):i>t.indexEnd&&i-t.indexStart>=this._maxSize&&(s=!0,l=t.indexStart,o=i),s){var u=this._changeScale(o,l);this._downscale(u),i=this._mapping.mapToIndex(r)}this._incrementIndexBy(t,i,n)},e.prototype._incrementIndexBy=function(t,r,n){if(n!==0){if(t.length===0&&(t.indexStart=t.indexEnd=t.indexBase=r),r<t.indexStart){var i=t.indexEnd-r;i>=t.backing.length&&this._grow(t,i+1),t.indexStart=r}else if(r>t.indexEnd){var i=r-t.indexStart;i>=t.backing.length&&this._grow(t,i+1),t.indexEnd=r}var s=r-t.indexBase;s<0&&(s+=t.backing.length),t.incrementBucket(s,n)}},e.prototype._grow=function(t,r){var n=t.backing.length,i=t.indexBase-t.indexStart,s=n-i,o=IC(r);o>this._maxSize&&(o=this._maxSize);var l=o-i;t.backing.growTo(o,s,l)},e.prototype._changeScale=function(t,r){for(var n=0;t-r>=this._maxSize;)t>>=1,r>>=1,n++;return n},e.prototype._downscale=function(t){if(t!==0){if(t<0)throw new Error("impossible change of scale: "+this.scale);var r=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Cm(r)}},e.prototype._minScale=function(t){var r=Math.min(this.scale,t.scale),n=Vs.combine(this._highLowAtScale(this.positive,this.scale,r),this._highLowAtScale(t.positive,t.scale,r)),i=Vs.combine(this._highLowAtScale(this.negative,this.scale,r),this._highLowAtScale(t.negative,t.scale,r));return Math.min(r-this._changeScale(n.high,n.low),r-this._changeScale(i.high,i.low))},e.prototype._highLowAtScale=function(t,r,n){if(t.length===0)return new Vs(0,-1);var i=r-n;return new Vs(t.indexStart>>i,t.indexEnd>>i)},e.prototype._mergeBuckets=function(t,r,n,i){for(var s=n.offset,o=r.scale-i,l=0;l<n.length;l++)this._incrementIndexBy(t,s+l>>o,n.at(l))},e.prototype._diffBuckets=function(t,r,n,i){for(var s=n.offset,o=r.scale-i,l=0;l<n.length;l++){var u=s+l>>o,a=u-t.indexBase;a<0&&(a+=t.backing.length),t.decrementBucket(a,n.at(l))}t.trim()},e}(),kC=function(){function e(t,r){this._maxSize=t,this._recordMinMax=r,this.kind=Er.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new VC(t,this._maxSize,this._recordMinMax)},e.prototype.merge=function(t,r){var n=r.clone();return n.merge(t),n},e.prototype.diff=function(t,r){var n=r.clone();return n.diff(t),n},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.EXPONENTIAL_HISTOGRAM,dataPoints:n.map(function(s){var o=NC(s,2),l=o[0],u=o[1],a=u.toPointValue(),h=t.type===oe.GAUGE||t.type===oe.UP_DOWN_COUNTER||t.type===oe.OBSERVABLE_GAUGE||t.type===oe.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:l,startTime:u.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:h?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}})}},e}(),XC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},yu=function(){function e(t,r,n){r===void 0&&(r=0),n===void 0&&(n=[0,0]),this.startTime=t,this._current=r,this.sampleTime=n}return e.prototype.record=function(t){this._current=t,this.sampleTime=pt(Date.now())},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),WC=function(){function e(){this.kind=Er.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new yu(t)},e.prototype.merge=function(t,r){var n=fs(r.sampleTime)>=fs(t.sampleTime)?r:t;return new yu(t.startTime,n.toPointValue(),n.sampleTime)},e.prototype.diff=function(t,r){var n=fs(r.sampleTime)>=fs(t.sampleTime)?r:t;return new yu(r.startTime,n.toPointValue(),n.sampleTime)},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.GAUGE,dataPoints:n.map(function(s){var o=XC(s,2),l=o[0],u=o[1];return{attributes:l,startTime:u.startTime,endTime:i,value:u.toPointValue()}})}},e}(),PC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Kn=function(){function e(t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1),this.startTime=t,this.monotonic=r,this._current=n,this.reset=i}return e.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Zm=function(){function e(t){this.monotonic=t,this.kind=Er.SUM}return e.prototype.createAccumulation=function(t){return new Kn(t,this.monotonic)},e.prototype.merge=function(t,r){var n=t.toPointValue(),i=r.toPointValue();return r.reset?new Kn(r.startTime,this.monotonic,i,r.reset):new Kn(t.startTime,this.monotonic,n+i)},e.prototype.diff=function(t,r){var n=t.toPointValue(),i=r.toPointValue();return this.monotonic&&n>i?new Kn(r.startTime,this.monotonic,i,!0):new Kn(r.startTime,this.monotonic,i-n)},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.SUM,dataPoints:n.map(function(s){var o=PC(s,2),l=o[0],u=o[1];return{attributes:l,startTime:u.startTime,endTime:i,value:u.toPointValue()}}),isMonotonic:this.monotonic}},e}(),Ir=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=function(){function e(){}return e.Drop=function(){return Lm},e.Sum=function(){return xm},e.LastValue=function(){return Nm},e.Histogram=function(){return Om},e.ExponentialHistogram=function(){return YC},e.Default=function(){return BC},e}(),MC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new mC,t}(Jt),AC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){switch(r.type){case oe.COUNTER:case oe.OBSERVABLE_COUNTER:case oe.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new Zm(!0),t.NON_MONOTONIC_INSTANCE=new Zm(!1),t}(Jt),UC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new WC,t}(Jt),DC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new vm([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Jt),FC=function(e){Ir(t,e);function t(r,n){n===void 0&&(n=!0);var i=e.call(this)||this;if(i._recordMinMax=n,r==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");r=r.concat(),r=r.sort(function(l,u){return l-u});var s=r.lastIndexOf(-1/0),o=r.indexOf(1/0);return o===-1&&(o=void 0),i._boundaries=r.slice(s+1,o),i}return t.prototype.createAggregator=function(r){return new vm(this._boundaries,this._recordMinMax)},t}(Jt),JC=function(e){Ir(t,e);function t(r,n){r===void 0&&(r=160),n===void 0&&(n=!0);var i=e.call(this)||this;return i._maxSize=r,i._recordMinMax=n,i}return t.prototype.createAggregator=function(r){return new kC(this._maxSize,this._recordMinMax)},t}(Jt),HC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._resolve=function(r){switch(r.type){case oe.COUNTER:case oe.UP_DOWN_COUNTER:case oe.OBSERVABLE_COUNTER:case oe.OBSERVABLE_UP_DOWN_COUNTER:return xm;case oe.GAUGE:case oe.OBSERVABLE_GAUGE:return Nm;case oe.HISTOGRAM:return r.advice.explicitBucketBoundaries?new FC(r.advice.explicitBucketBoundaries):Om}return H.warn("Unable to recognize instrument type: "+r.type),Lm},t.prototype.createAggregator=function(r){return this._resolve(r).createAggregator(r)},t}(Jt),Lm=new MC,xm=new AC,Nm=new UC,Om=new DC,YC=new JC,BC=new HC,zC=function(e){return Jt.Default()},KC=function(e){return Ct.CUMULATIVE},bu=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},vu=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Gm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},jC=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},QC=function(){function e(t){var r,n,i;this._shutdown=!1,this._aggregationSelector=(r=t==null?void 0:t.aggregationSelector)!==null&&r!==void 0?r:zC,this._aggregationTemporalitySelector=(n=t==null?void 0:t.aggregationTemporalitySelector)!==null&&n!==void 0?n:KC,this._metricProducers=(i=t==null?void 0:t.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=t==null?void 0:t.cardinalitySelector}return e.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(t){return bu(this,void 0,void 0,function(){var r,n,i,s,o,l;return vu(this,function(u){switch(u.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(jC([this._sdkMetricProducer.collect({timeoutMillis:t==null?void 0:t.timeoutMillis})],Gm(this._metricProducers.map(function(a){return a.collect({timeoutMillis:t==null?void 0:t.timeoutMillis})})),!1))];case 1:return r=Gm.apply(void 0,[u.sent()]),n=r[0],i=r.slice(1),s=n.errors.concat(bm(i,function(a){return a.errors})),o=n.resourceMetrics.resource,l=n.resourceMetrics.scopeMetrics.concat(bm(i,function(a){return a.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:o,scopeMetrics:l},errors:s}]}})})},e.prototype.shutdown=function(t){return bu(this,void 0,void 0,function(){return vu(this,function(r){switch(r.label){case 0:return this._shutdown?(H.error("Cannot call shutdown twice."),[2]):(t==null?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return r.sent(),[3,4];case 2:return[4,Bn(this.onShutdown(),t.timeoutMillis)];case 3:r.sent(),r.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return bu(this,void 0,void 0,function(){return vu(this,function(r){switch(r.label){case 0:return this._shutdown?(H.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(t==null?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return r.sent(),[2];case 2:return[4,Bn(this.onForceFlush(),t.timeoutMillis)];case 3:return r.sent(),[2]}})})},e}(),$C=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ks=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Xs=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},qC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},eZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},tZ=function(e){$C(t,e);function t(r){var n,i,s,o,l=e.call(this,{aggregationSelector:(n=r.exporter.selectAggregation)===null||n===void 0?void 0:n.bind(r.exporter),aggregationTemporalitySelector:(i=r.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(r.exporter),metricProducers:r.metricProducers})||this;if(r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<r.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return l._exportInterval=(s=r.exportIntervalMillis)!==null&&s!==void 0?s:6e4,l._exportTimeout=(o=r.exportTimeoutMillis)!==null&&o!==void 0?o:3e4,l._exporter=r.exporter,l}return t.prototype._runOnce=function(){return ks(this,void 0,void 0,function(){var r;return Xs(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,Bn(this._doRun(),this._exportTimeout)];case 1:return n.sent(),[3,3];case 2:return r=n.sent(),r instanceof ym?(H.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(er(r),[3,3]);case 3:return[2]}})})},t.prototype._doRun=function(){var r,n;return ks(this,void 0,void 0,function(){var i,s,o,l,u,a;return Xs(this,function(h){switch(h.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=h.sent(),s=i.resourceMetrics,o=i.errors,o.length>0&&(a=H).error.apply(a,eZ(["PeriodicExportingMetricReader: metrics collection errors"],qC(o),!1)),!s.resource.asyncAttributesPending)return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,(n=(r=s.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(r)];case 3:return h.sent(),[3,5];case 4:return l=h.sent(),H.debug("Error while resolving async portion of resource: ",l),er(l),[3,5];case 5:return s.scopeMetrics.length===0?[2]:[4,tT._export(this._exporter,s)];case 6:if(u=h.sent(),u.code!==Ie.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+u.error+")");return[2]}})})},t.prototype.onInitialized=function(){var r=this;this._interval=setInterval(function(){r._runOnce()},this._exportInterval)},t.prototype.onForceFlush=function(){return ks(this,void 0,void 0,function(){return Xs(this,function(r){switch(r.label){case 0:return[4,this._runOnce()];case 1:return r.sent(),[4,this._exporter.forceFlush()];case 2:return r.sent(),[2]}})})},t.prototype.onShutdown=function(){return ks(this,void 0,void 0,function(){return Xs(this,function(r){switch(r.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return r.sent(),[4,this._exporter.shutdown()];case 2:return r.sent(),[2]}})})},t}(QC),rZ=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,r){var n=this,i=this._registeredViews.filter(function(s){return n._matchInstrument(s.instrumentSelector,t)&&n._matchMeter(s.meterSelector,r)});return i},e.prototype._matchInstrument=function(t,r){return(t.getType()===void 0||r.type===t.getType())&&t.getNameFilter().match(r.name)&&t.getUnitFilter().match(r.unit)},e.prototype._matchMeter=function(t,r){return t.getNameFilter().match(r.name)&&(r.version===void 0||t.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||t.getSchemaUrlFilter().match(r.schemaUrl))},e}(),Cr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ws=function(){function e(t,r){this._writableMetricStorage=t,this._descriptor=r}return e.prototype._record=function(t,r,n){if(r===void 0&&(r={}),n===void 0&&(n=me.active()),typeof t!="number"){H.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===qt.INT&&!Number.isInteger(t)&&(H.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._writableMetricStorage.record(t,r,n,pt(Date.now()))},e}(),nZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,i){this._record(r,n,i)},t}(Ws),iZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,i){if(r<0){H.warn("negative value provided to counter "+this._descriptor.name+": "+r);return}this._record(r,n,i)},t}(Ws),sZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,i){this._record(r,n,i)},t}(Ws),oZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,i){if(r<0){H.warn("negative value provided to histogram "+this._descriptor.name+": "+r);return}this._record(r,n,i)},t}(Ws),Ps=function(){function e(t,r,n){this._observableRegistry=n,this._descriptor=t,this._metricStorages=r}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}(),aZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ps),lZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ps),uZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ps);function Su(e){return e instanceof Ps}var cZ=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,r){var n=sr(t,oe.GAUGE,r),i=this._meterSharedState.registerMetricStorage(n);return new sZ(i,n)},e.prototype.createHistogram=function(t,r){var n=sr(t,oe.HISTOGRAM,r),i=this._meterSharedState.registerMetricStorage(n);return new oZ(i,n)},e.prototype.createCounter=function(t,r){var n=sr(t,oe.COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new iZ(i,n)},e.prototype.createUpDownCounter=function(t,r){var n=sr(t,oe.UP_DOWN_COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new nZ(i,n)},e.prototype.createObservableGauge=function(t,r){var n=sr(t,oe.OBSERVABLE_GAUGE,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new lZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,r){var n=sr(t,oe.OBSERVABLE_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new aZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,r){var n=sr(t,oe.OBSERVABLE_UP_DOWN_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new uZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.addBatchCallback(t,r)},e.prototype.removeBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.removeBatchCallback(t,r)},e}(),Vm=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=sr(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),dZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),km=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},hZ=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,r){return r!=null||(r=this._hash(t)),this._valueMap.get(r)},e.prototype.getOrDefault=function(t,r){var n=this._hash(t);if(this._valueMap.has(n))return this._valueMap.get(n);var i=r();return this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,i),i},e.prototype.set=function(t,r,n){n!=null||(n=this._hash(t)),this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,r)},e.prototype.has=function(t,r){return r!=null||(r=this._hash(t)),this._valueMap.has(r)},e.prototype.keys=function(){var t,r;return km(this,function(n){switch(n.label){case 0:t=this._keyMap.entries(),r=t.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[r.value[1],r.value[0]]];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,r;return km(this,function(n){switch(n.label){case 0:t=this._valueMap.entries(),r=t.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[this._keyMap.get(r.value[0]),r.value[1],r.value[0]]];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}(),Zr=function(e){dZ(t,e);function t(){return e.call(this,gm)||this}return t}(hZ),fZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Xm=function(){function e(t,r){this._aggregator=t,this._activeCollectionStorage=new Zr,this._cumulativeMemoStorage=new Zr,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(r!=null?r:2e3)-1,this._overflowHashCode=gm(this._overflowAttributes)}return e.prototype.record=function(t,r,n,i){var s=this,o=this._activeCollectionStorage.get(r);if(!o){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var l=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return s._aggregator.createAccumulation(i)});l==null||l.record(t);return}o=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(r,o)}o==null||o.record(t)},e.prototype.batchCumulate=function(t,r){var n=this;Array.from(t.entries()).forEach(function(i){var s=fZ(i,3),o=s[0],l=s[1],u=s[2],a=n._aggregator.createAccumulation(r);a==null||a.record(l);var h=a;if(n._cumulativeMemoStorage.has(o,u)){var c=n._cumulativeMemoStorage.get(o,u);h=n._aggregator.diff(c,a)}else if(n._cumulativeMemoStorage.size>=n._cardinalityLimit&&(o=n._overflowAttributes,u=n._overflowHashCode,n._cumulativeMemoStorage.has(o,u))){var c=n._cumulativeMemoStorage.get(o,u);h=n._aggregator.diff(c,a)}if(n._activeCollectionStorage.has(o,u)){var f=n._activeCollectionStorage.get(o,u);h=n._aggregator.merge(f,h)}n._cumulativeMemoStorage.set(o,a,u),n._activeCollectionStorage.set(o,h,u)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Zr,t},e}(),wu=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Wm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Pm=function(){function e(t,r){var n=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(i){n._unreportedAccumulations.set(i,[])})}return e.prototype.buildMetrics=function(t,r,n,i){this._stashAccumulations(n);var s=this._getMergedUnreportedAccumulations(t),o=s,l;if(this._reportHistory.has(t)){var u=this._reportHistory.get(t),a=u.collectionTime;l=u.aggregationTemporality,l===Ct.CUMULATIVE?o=e.merge(u.accumulations,s,this._aggregator):o=e.calibrateStartTime(u.accumulations,s,a)}else l=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:o,collectionTime:i,aggregationTemporality:l});var h=pZ(o);if(h.length!==0)return this._aggregator.toMetricData(r,l,h,i)},e.prototype._stashAccumulations=function(t){var r,n,i=this._unreportedAccumulations.keys();try{for(var s=wu(i),o=s.next();!o.done;o=s.next()){var l=o.value,u=this._unreportedAccumulations.get(l);u===void 0&&(u=[],this._unreportedAccumulations.set(l,u)),u.push(t)}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var r,n,i=new Zr,s=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),s===void 0)return i;try{for(var o=wu(s),l=o.next();!l.done;l=o.next()){var u=l.value;i=e.merge(i,u,this._aggregator)}}catch(a){r={error:a}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e.merge=function(t,r,n){for(var i=t,s=r.entries(),o=s.next();o.done!==!0;){var l=Wm(o.value,3),u=l[0],a=l[1],h=l[2];if(t.has(u,h)){var c=t.get(u,h),f=n.merge(c,a);i.set(u,f,h)}else i.set(u,a,h);o=s.next()}return i},e.calibrateStartTime=function(t,r,n){var i,s;try{for(var o=wu(t.keys()),l=o.next();!l.done;l=o.next()){var u=Wm(l.value,2),a=u[0],h=u[1],c=r.get(a,h);c==null||c.setStartTime(n)}}catch(f){i={error:f}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}return r},e}();function pZ(e){return Array.from(e.entries())}var mZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},yZ=function(e){mZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Xm(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Pm(n,s),l}return t.prototype.record=function(r,n){var i=this,s=new Zr;Array.from(r.entries()).forEach(function(o){var l=gZ(o,2),u=l[0],a=l[1];s.set(i._attributesProcessor.process(u),a)}),this._deltaMetricStorage.batchCumulate(s,n)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(Vm);function Mm(e,t){var r="";return e.unit!==t.unit&&(r+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
450
|
+
`).filter(function(h){return!!h.match(i)&&!h.match(/^Error created at/)},this);return a.map(function(h){var c=h.split("@"),f=this.extractLocation(c.pop()),d=c.shift()||"",p=d.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;d.match(/\(([^)]*)\)/)&&(m=d.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var g=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new n({functionName:p,args:g,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:h})},this)}}})})(Rf);var tw=Rf.exports;const Ef=yi(tw),cl={},rw=["debug","log","info","warn","error"],dl=Symbol.for("@launchdarkly/o11y.sdkLogger"),nw=(()=>{try{return(cl==null?void 0:cl.DEBUG)==="true"}catch(e){return!1}})(),zr=(()=>{var r;const e=globalThis,t=(r=e[dl])!=null?r:e[dl]={debugEnabled:!1,suppressDepth:0};return nw&&(t.debugEnabled=!0),t})(),hl=e=>{zr.debugEnabled=e},If=()=>zr.debugEnabled,iw=()=>zr.suppressDepth>0,fl=e=>{zr.suppressDepth++;try{return e()}finally{zr.suppressDepth--}},sw=e=>rw.includes(e)?e:"log",Re=(e,...t)=>{zr.debugEnabled&&fl(()=>{var r;try{((r=console[sw(e)])!=null?r:console.log).apply(console,t)}catch(n){}})};function En(e){try{return Ef.parse(e)}catch(t){try{return Ef.parse(new Error)}catch(r){return Re("warn","Highlight Warning: failed to parse error",{originalError:t,secondaryError:r}),[]}}}const Cf=(e,t,r)=>{const n=rs(t,e.headers,r);return Y(x({},e),{headers:n})},rs=(e,t,r)=>{var i,s;const n=x({},t);return r?((i=Object.keys(n))==null||i.forEach(o=>{[...r].includes(o==null?void 0:o.toLowerCase())||(n[o]="[REDACTED]")}),n):((s=Object.keys(n))==null||s.forEach(o=>{[...ow,...e].includes(o==null?void 0:o.toLowerCase())&&(n[o]="[REDACTED]")}),n)},ow=["authorization","cookie","proxy-authorization","set-cookie","token"],Zf=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com","browser-intake-datadoghq.com","browser-intake-datadoghq.eu","browser-intake-us3-datadoghq.com","browser-intake-us5-datadoghq.com","browser-intake-ap1-datadoghq.com","browser-intake-ddog-gov.com","r.lr-ingest.io","r.lr-in-prod.com","r.logrocket.io","data.pendo.io","ingest.sentry.io","ingest.us.sentry.io","ingest.de.sentry.io","bam.nr-data.net","bam-cell.nr-data.net","rs.fullstory.com","in.hotjar.com","api2.amplitude.com","api.mixpanel.com","api.segment.io/v1","google-analytics.com/g/collect","analytics.google.com/g/collect"],aw=["awsaccesskeyid","signature","sig","x-goog-signature","access_token","id_token","token","code","refresh_token","session_state"],lw=["access_token","id_token","token","code","refresh_token","session_state"],uw=/(\/eval\/[0-9a-f]{24}\/|\/sdk\/evalx?\/[0-9a-f]{24}\/(?:contexts|users)\/)([A-Za-z0-9+_=%-]{8,})/g,ns=e=>typeof e!="string"||!e.includes("eval")?e:e.replace(uw,"$1REDACTED"),Lf=e=>{var t,r;try{return new URL(e)}catch(n){return new URL(e,(r=(t=globalThis.location)==null?void 0:t.origin)!=null?r:"http://example.com")}},cw=e=>{if(!e||e==="#")return"";const t=e.slice(1);if(!t.includes("="))return e;const r=t.indexOf("?"),n=r>=0?t.slice(r+1):t,i=new URLSearchParams(n);for(const s of i.keys())if(lw.includes(s.toLowerCase()))return"";return e},is=e=>{try{const t=Lf(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED"),t.pathname=ns(t.pathname);const r=t.searchParams;aw.forEach(i=>{for(const s of Array.from(r.keys()))s.toLowerCase()===i&&r.set(s,"REDACTED")});const n=cw(t.hash);if(t.hash=n,!e.includes("://")&&!e.startsWith("//"))return t.pathname+t.search+n;if(e.startsWith("//")){let i="//";return(t.username||t.password)&&(i+=t.username+":"+t.password+"@"),i+=t.host+t.pathname+t.search+n,i}return t.toString()}catch(t){return e}},dw=/^\s*(?:(?:debug|info|warn|error|none):\s*)?\[LaunchDarkly\]/,hw=e=>{const t=e[0];return typeof t=="string"&&dw.test(t)},xf={level:[...ol],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}};function Nf(e,t){const r=t.logger;if(!r)return()=>{};let n;typeof r=="string"?n=window[r]:n=r;const i=[];if(t.level.includes("error")&&window){const o=l=>{const{message:u,error:a}=l;let h=[];a&&(h=En(a));const c=[ll(u,t.stringifyOptions)];e({type:"Error",trace:h,time:Date.now(),value:c})};window.addEventListener("error",o),i.push(()=>{window&&window.removeEventListener("error",o)})}for(const o of t.level)i.push(s(n,o));return()=>{i.forEach(o=>o())};function s(o,l){return o[l]?Q0(o,l,u=>(...a)=>{if(u.apply(this,a),!iw()&&!(!t.recordLaunchDarklySdkLogs&&hw(a)))try{e(Of(l,t,...a))}catch(h){u("highlight logger error:",h,...a)}}):()=>{}}}function Of(e,t,...r){const n=En(new Error),i=(t.serializeConsoleAttributes?r.map(s=>typeof s=="object"?ll(s,t.stringifyOptions):s):r.filter(s=>typeof s!="object").map(s=>`${s}`)).map(s=>typeof s=="string"?ns(s):s);return{type:e,trace:n,value:i,attributes:ns(ll(r.filter(s=>typeof s=="object").reduce((s,o)=>x(x({},s),o),{}),t.stringifyOptions)),time:Date.now()}}const fw={start:0,end:3},pw={start:4,end:5},pl={start:6,end:7},ml={start:8,end:8},mw={start:9,end:9},gw={start:10,end:15};function yw(){if(crypto&&crypto.getRandomValues){const t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(Math.random()*256));return e}function Kr(e,t){let r="";for(let n=t.start;n<=t.end;n+=1)r+=e[n].toString(16).padStart(2,"0");return r}function bw(e){return e[ml.start]=(e[ml.start]|128)&191,e[pl.start]=e[pl.start]&15|64,`${Kr(e,fw)}-${Kr(e,pw)}-${Kr(e,pl)}-${Kr(e,ml)}${Kr(e,mw)}-${Kr(e,gw)}`}function vw(){const e=yw();return bw(e)}function In(){return typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():vw()}function gl(e,t,r,n){var u,a,h,c;let i=n!=null?n:t,s=En(i),o={};if(t instanceof Error){const f=t.cause;t=t.message,f&&(o={"exception.cause":f})}const l=Sw(s);e({error:i,event:_t(t),type:"window.onerror",url:window.location.href,source:r!=null?r:"",lineNumber:(u=l[0])!=null&&u.lineNumber?(a=l[0])==null?void 0:a.lineNumber:0,columnNumber:(h=l[0])!=null&&h.columnNumber?(c=l[0])==null?void 0:c.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),payload:o?_t(o):void 0,id:In()})}const Gf=(e,{enablePromisePatch:t})=>{if(typeof window=="undefined")return()=>{};const r=window.onerror;window.onerror=(o,l,u,a,h)=>{gl(e,o,l,h)};const n=window.onunhandledrejection;window.onunhandledrejection=o=>{if(o.reason){const l=o.promise;l.getStack?gl(e,o.reason,o.type,l.getStack()):gl(e,o.reason,o.type)}};const i=window.Promise,s=class extends i{constructor(u){super(u);L(this,"promiseCreationError");this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const u=typeof window.Zone=="undefined";return t&&u}};return s.shouldPatch()&&(window.Promise=s),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=r}},Sw=e=>{var r,n;if(e.length===0)return e;const t=e[0];return(r=t.fileName)!=null&&r.includes("highlight.run")||(n=t.fileName)!=null&&n.includes("highlight.io")||t.functionName==="new highlightPromise"?e.slice(1):e},yl=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],bl=["websocket error",'\\"ResizeObserver loop'];var ww=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},gr="1.9.0",Vf=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _w(e){var t=new Set([e]),r=new Set,n=e.match(Vf);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(u){return u===e};function s(l){return r.add(l),!1}function o(l){return t.add(l),!0}return function(u){if(t.has(u))return!0;if(r.has(u))return!1;var a=u.match(Vf);if(!a)return s(u);var h={major:+a[1],minor:+a[2],patch:+a[3],prerelease:a[4]};return h.prerelease!=null||i.major!==h.major?s(u):i.major===0?i.minor===h.minor&&i.patch<=h.patch?o(u):s(u):i.minor<=h.minor?o(u):s(u)}}var Rw=_w(gr),Tw=gr.split(".")[0],Cn=Symbol.for("opentelemetry.js.api."+Tw),Zn=ww;function Ln(e,t,r,n){var i;n===void 0&&(n=!1);var s=Zn[Cn]=(i=Zn[Cn])!==null&&i!==void 0?i:{version:gr};if(!n&&s[e]){var o=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(o.stack||o.message),!1}if(s.version!==gr){var o=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+e+" does not match previously registered API v"+gr);return r.error(o.stack||o.message),!1}return s[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+gr+"."),!0}function yr(e){var t,r,n=(t=Zn[Cn])===null||t===void 0?void 0:t.version;if(!(!n||!Rw(n)))return(r=Zn[Cn])===null||r===void 0?void 0:r[e]}function xn(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+gr+".");var r=Zn[Cn];r&&delete r[e]}var Ew=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Iw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Cw=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("verbose",this._namespace,t)},e}();function Nn(e,t,r){var n=yr("diag");if(n)return r.unshift(t),n[e].apply(n,Iw([],Ew(r),!1))}var Oe;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Oe||(Oe={}));function Zw(e,t){e<Oe.NONE?e=Oe.NONE:e>Oe.ALL&&(e=Oe.ALL),t=t||{};function r(n,i){var s=t[n];return typeof s=="function"&&e>=i?s.bind(t):function(){}}return{error:r("error",Oe.ERROR),warn:r("warn",Oe.WARN),info:r("info",Oe.INFO),debug:r("debug",Oe.DEBUG),verbose:r("verbose",Oe.VERBOSE)}}var Lw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},xw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Nw="diag",Lt=function(){function e(){function t(i){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var l=yr("diag");if(l)return l[i].apply(l,xw([],Lw(s),!1))}}var r=this,n=function(i,s){var o,l,u;if(s===void 0&&(s={logLevel:Oe.INFO}),i===r){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((o=a.stack)!==null&&o!==void 0?o:a.message),!1}typeof s=="number"&&(s={logLevel:s});var h=yr("diag"),c=Zw((l=s.logLevel)!==null&&l!==void 0?l:Oe.INFO,i);if(h&&!s.suppressOverrideMessage){var f=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";h.warn("Current logger will be overwritten from "+f),c.warn("Current logger will overwrite one already registered from "+f)}return Ln("diag",c,r,!0)};r.setLogger=n,r.disable=function(){xn(Nw,r)},r.createComponentLogger=function(i){return new Cw(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Ow=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Gw=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Vw=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var r=this._entries.get(t);if(r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=Ow(t,2),n=r[0],i=r[1];return[n,i]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=new e(this._entries);try{for(var o=Gw(n),l=o.next();!l.done;l=o.next()){var u=l.value;s._entries.delete(u)}}catch(a){t={error:a}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return s},e.prototype.clear=function(){return new e},e}(),kw=Symbol("BaggageEntryMetadata"),Xw=Lt.instance();function Ww(e){return e===void 0&&(e={}),new Vw(new Map(Object.entries(e)))}function Pw(e){return typeof e!="string"&&(Xw.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:kw,toString:function(){return e}}}function vl(e){return Symbol.for(e)}var Mw=function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var s=new e(r._currentContext);return s._currentContext.set(n,i),s},r.deleteValue=function(n){var i=new e(r._currentContext);return i._currentContext.delete(n),i}}return e}(),br=new Mw,vr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Aw=function(){function e(){}return e.prototype.createGauge=function(t,r){return Kw},e.prototype.createHistogram=function(t,r){return jw},e.prototype.createCounter=function(t,r){return zw},e.prototype.createUpDownCounter=function(t,r){return Qw},e.prototype.createObservableGauge=function(t,r){return qw},e.prototype.createObservableCounter=function(t,r){return $w},e.prototype.createObservableUpDownCounter=function(t,r){return e_},e.prototype.addBatchObservableCallback=function(t,r){},e.prototype.removeBatchObservableCallback=function(t){},e}(),ss=function(){function e(){}return e}(),Uw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(ss),Dw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(ss),Fw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(ss),Jw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(ss),Sl=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Hw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Sl),Yw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Sl),Bw=function(e){vr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Sl),kf=new Aw,zw=new Uw,Kw=new Fw,jw=new Jw,Qw=new Dw,$w=new Hw,qw=new Yw,e_=new Bw;function t_(){return kf}var qt;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(qt||(qt={}));var r_={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},n_={set:function(e,t,r){e!=null&&(e[t]=r)}},i_=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},s_=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},o_=function(){function e(){}return e.prototype.active=function(){return br},e.prototype.with=function(t,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];return r.call.apply(r,s_([n],i_(i),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),a_=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},l_=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},wl="context",u_=new o_,os=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Ln(wl,t,Lt.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,n){for(var i,s=[],o=3;o<arguments.length;o++)s[o-3]=arguments[o];return(i=this._getContextManager()).with.apply(i,l_([t,r,n],a_(s),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return yr(wl)||u_},e.prototype.disable=function(){this._getContextManager().disable(),xn(wl,Lt.instance())},e}(),Mt;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Mt||(Mt={}));var Xf="0000000000000000",Wf="00000000000000000000000000000000",Pf={traceId:Wf,spanId:Xf,traceFlags:Mt.NONE},On=function(){function e(t){t===void 0&&(t=Pf),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e}(),_l=vl("OpenTelemetry Context Key SPAN");function Rl(e){return e.getValue(_l)||void 0}function c_(){return Rl(os.getInstance().active())}function Tl(e,t){return e.setValue(_l,t)}function d_(e){return e.deleteValue(_l)}function h_(e,t){return Tl(e,new On(t))}function Mf(e){var t;return(t=Rl(e))===null||t===void 0?void 0:t.spanContext()}var f_=/^([0-9a-f]{32})$/i,p_=/^[0-9a-f]{16}$/i;function Af(e){return f_.test(e)&&e!==Wf}function m_(e){return p_.test(e)&&e!==Xf}function as(e){return Af(e.traceId)&&m_(e.spanId)}function g_(e){return new On(e)}var El=os.getInstance(),Uf=function(){function e(){}return e.prototype.startSpan=function(t,r,n){n===void 0&&(n=El.active());var i=!!(r!=null&&r.root);if(i)return new On;var s=n&&Mf(n);return y_(s)&&as(s)?new On(s):new On},e.prototype.startActiveSpan=function(t,r,n,i){var s,o,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,o=n,l=i);var u=o!=null?o:El.active(),a=this.startSpan(t,s,u),h=Tl(u,a);return El.with(h,l,void 0,a)}},e}();function y_(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var b_=new Uf,v_=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.startSpan=function(t,r,n){return this._getTracer().startSpan(t,r,n)},e.prototype.startActiveSpan=function(t,r,n,i){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):b_},e}(),S_=function(){function e(){}return e.prototype.getTracer=function(t,r,n){return new Uf},e}(),w_=new S_,Df=function(){function e(){}return e.prototype.getTracer=function(t,r,n){var i;return(i=this.getDelegateTracer(t,r,n))!==null&&i!==void 0?i:new v_(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:w_},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,r,n)},e}(),ls;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ls||(ls={}));var Gn;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Gn||(Gn={}));var us;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(us||(us={}));var me=os.getInstance(),H=Lt.instance(),__=function(){function e(){}return e.prototype.getMeter=function(t,r,n){return kf},e}(),R_=new __,Il="metrics",T_=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return Ln(Il,t,Lt.instance())},e.prototype.getMeterProvider=function(){return yr(Il)||R_},e.prototype.getMeter=function(t,r,n){return this.getMeterProvider().getMeter(t,r,n)},e.prototype.disable=function(){xn(Il,Lt.instance())},e}(),Cl=T_.getInstance(),E_=function(){function e(){}return e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}(),Zl=vl("OpenTelemetry Baggage Key");function Ff(e){return e.getValue(Zl)||void 0}function I_(){return Ff(os.getInstance().active())}function C_(e,t){return e.setValue(Zl,t)}function Z_(e){return e.deleteValue(Zl)}var Ll="propagation",L_=new E_,x_=function(){function e(){this.createBaggage=Ww,this.getBaggage=Ff,this.getActiveBaggage=I_,this.setBaggage=C_,this.deleteBaggage=Z_}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return Ln(Ll,t,Lt.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=n_),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=r_),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){xn(Ll,Lt.instance())},e.prototype._getGlobalPropagator=function(){return yr(Ll)||L_},e}(),ht=x_.getInstance(),xl="trace",N_=function(){function e(){this._proxyTracerProvider=new Df,this.wrapSpanContext=g_,this.isSpanContextValid=as,this.deleteSpan=d_,this.getSpan=Rl,this.getActiveSpan=c_,this.getSpanContext=Mf,this.setSpan=Tl,this.setSpanContext=h_}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=Ln(xl,this._proxyTracerProvider,Lt.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return yr(xl)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){xn(xl,Lt.instance()),this._proxyTracerProvider=new Df},e}(),we=N_.getInstance(),Jf=vl("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Hf(e){return e.setValue(Jf,!0)}function Nl(e){return e.getValue(Jf)===!0}var O_="=",Ol=";",Gl=",",Vl="baggage",G_=180,V_=4096,k_=8192,X_=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function W_(e){return e.reduce(function(t,r){var n=""+t+(t!==""?Gl:"")+r;return n.length>k_?t:n},"")}function P_(e){return e.getAllEntries().map(function(t){var r=X_(t,2),n=r[0],i=r[1],s=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(s+=Ol+i.metadata.toString()),s})}function M_(e){var t=e.split(Ol);if(!(t.length<=0)){var r=t.shift();if(r){var n=r.indexOf(O_);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),o;return t.length>0&&(o=Pw(t.join(Ol))),{key:i,value:s,metadata:o}}}}}var Yf=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=ht.getBaggage(t);if(!(!i||Nl(t))){var s=P_(i).filter(function(l){return l.length<=V_}).slice(0,G_),o=W_(s);o.length>0&&n.set(r,Vl,o)}},e.prototype.extract=function(t,r,n){var i=n.get(r,Vl),s=Array.isArray(i)?i.join(Gl):i;if(!s)return t;var o={};if(s.length===0)return t;var l=s.split(Gl);return l.forEach(function(u){var a=M_(u);if(a){var h={value:a.value};a.metadata&&(h.metadata=a.metadata),o[a.key]=h}}),Object.entries(o).length===0?t:ht.setBaggage(t,ht.createBaggage(o))},e.prototype.fields=function(){return[Vl]},e}(),Bf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},A_=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function cs(e){var t,r,n={};if(typeof e!="object"||e==null)return n;try{for(var i=Bf(Object.entries(e)),s=i.next();!s.done;s=i.next()){var o=A_(s.value,2),l=o[0],u=o[1];if(!U_(l)){H.warn("Invalid attribute key: "+l);continue}if(!zf(u)){H.warn("Invalid attribute value set for key: "+l);continue}Array.isArray(u)?n[l]=u.slice():n[l]=u}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function U_(e){return typeof e=="string"&&e.length>0}function zf(e){return e==null?!0:Array.isArray(e)?D_(e):Kf(e)}function D_(e){var t,r,n;try{for(var i=Bf(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(o!=null){if(!n){if(Kf(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}function Kf(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function F_(){return function(e){H.error(J_(e))}}function J_(e){return typeof e=="string"?e:JSON.stringify(H_(e))}function H_(e){for(var t={},r=e;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!t[n]){var i=r[n];i&&(t[n]=String(i))}}),r=Object.getPrototypeOf(r);return t}var Y_=F_();function er(e){try{Y_(e)}catch(t){}}var xt;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(xt||(xt={}));var B_=",",z_=["OTEL_SDK_DISABLED"];function K_(e){return z_.indexOf(e)>-1}var j_=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Q_(e){return j_.indexOf(e)>-1}var $_=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function q_(e){return $_.indexOf(e)>-1}var ds=1/0,hs=128,eR=128,tR=128,jf={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Oe.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:ds,OTEL_ATTRIBUTE_COUNT_LIMIT:hs,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ds,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:hs,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ds,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:hs,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:eR,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:tR,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:xt.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function rR(e,t,r){if(typeof r[e]!="undefined"){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function nR(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]!="undefined"){var s=Number(r[e]);isNaN(s)||(s<n?t[e]=n:s>i?t[e]=i:t[e]=s)}}function iR(e,t,r,n){n===void 0&&(n=B_);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(s){return s.trim()}))}var sR={ALL:Oe.ALL,VERBOSE:Oe.VERBOSE,DEBUG:Oe.DEBUG,INFO:Oe.INFO,WARN:Oe.WARN,ERROR:Oe.ERROR,NONE:Oe.NONE};function oR(e,t,r){var n=r[e];if(typeof n=="string"){var i=sR[n.toUpperCase()];i!=null&&(t[e]=i)}}function Qf(e){var t={};for(var r in jf){var n=r;switch(n){case"OTEL_LOG_LEVEL":oR(n,t,e);break;default:if(K_(n))rR(n,t,e);else if(Q_(n))nR(n,t,e);else if(q_(n))iR(n,t,e);else{var i=e[n];typeof i!="undefined"&&i!==null&&(t[n]=String(i))}}}return t}var Vn=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function jr(){var e=Qf(Vn);return Object.assign({},jf,e)}function aR(){return Qf(Vn)}function $f(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function kl(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n<e.length;n+=2){var i=$f(e.charCodeAt(n)),s=$f(e.charCodeAt(n+1));t[r++]=i<<4|s}return t}var ft=performance,lR="1.30.1",uR="process.runtime.name",cR="telemetry.sdk.name",dR="telemetry.sdk.language",hR="telemetry.sdk.version",fR=uR,pR=cR,mR=dR,gR=hR,yR="webjs",bR=yR,Qr,Xl=(Qr={},Qr[pR]="opentelemetry",Qr[fR]="browser",Qr[mR]=bR,Qr[gR]=lR,Qr),vR=9,SR=6,wR=Math.pow(10,SR),fs=Math.pow(10,vR);function pt(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*wR);return[r,n]}function Wl(){var e=ft.timeOrigin;if(typeof e!="number"){var t=ft;e=t.timing&&t.timing.fetchStart}return e}function Sr(e){var t=pt(Wl()),r=pt(typeof e=="number"?e:ft.now());return ep(t,r)}function kn(e){if(Pl(e))return e;if(typeof e=="number")return e<Wl()?Sr(e):pt(e);if(e instanceof Date)return pt(e.getTime());throw TypeError("Invalid input type")}function _R(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=fs),[r,n]}function At(e){return e[0]*fs+e[1]}function ps(e){return e[0]*1e6+e[1]/1e3}function Pl(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function qf(e){return Pl(e)||typeof e=="number"||e instanceof Date}function ep(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=fs&&(r[1]-=fs,r[0]+=1),r}var Ie;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Ie||(Ie={}));var RR=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},tp=function(){function e(t){t===void 0&&(t={});var r;this._propagators=(r=t.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return e.prototype.inject=function(t,r,n){var i,s;try{for(var o=RR(this._propagators),l=o.next();!l.done;l=o.next()){var u=l.value;try{u.inject(t,r,n)}catch(a){H.warn("Failed to inject with "+u.constructor.name+". Err: "+a.message)}}}catch(a){i={error:a}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,r,n){return this._propagators.reduce(function(i,s){try{return s.extract(i,r,n)}catch(o){H.warn("Failed to extract with "+s.constructor.name+". Err: "+o.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),Ml="[_0-9a-z-*/]",TR="[a-z]"+Ml+"{0,255}",ER="[a-z0-9]"+Ml+"{0,240}@[a-z]"+Ml+"{0,13}",IR=new RegExp("^(?:"+TR+"|"+ER+")$"),CR=/^[ -~]{0,255}[!-~]$/,ZR=/,|=/;function LR(e){return IR.test(e)}function xR(e){return CR.test(e)&&!ZR.test(e)}var rp=32,NR=512,np=",",ip="=",OR=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,r){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n},e.prototype.unset=function(t){var r=this._clone();return r._internalState.delete(t),r},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(r,n){return r.push(n+ip+t.get(n)),r},[]).join(np)},e.prototype._parse=function(t){t.length>NR||(this._internalState=t.split(np).reverse().reduce(function(r,n){var i=n.trim(),s=i.indexOf(ip);if(s!==-1){var o=i.slice(0,s),l=i.slice(s+1,n.length);LR(o)&&xR(l)&&r.set(o,l)}return r},new Map),this._internalState.size>rp&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,rp))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),ms="traceparent",Al="tracestate",GR="00",VR="(?!ff)[\\da-f]{2}",kR="(?![0]{32})[\\da-f]{32}",XR="(?![0]{16})[\\da-f]{16}",WR="[\\da-f]{2}",PR=new RegExp("^\\s?("+VR+")-("+kR+")-("+XR+")-("+WR+")(-.*)?\\s?$");function MR(e){var t=PR.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var sp=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=we.getSpanContext(t);if(!(!i||Nl(t)||!as(i))){var s=GR+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Mt.NONE).toString(16);n.set(r,ms,s),i.traceState&&n.set(r,Al,i.traceState.serialize())}},e.prototype.extract=function(t,r,n){var i=n.get(r,ms);if(!i)return t;var s=Array.isArray(i)?i[0]:i;if(typeof s!="string")return t;var o=MR(s);if(!o)return t;o.isRemote=!0;var l=n.get(r,Al);if(l){var u=Array.isArray(l)?l.join(","):l;o.traceState=new OR(typeof u=="string"?u:void 0)}return we.setSpanContext(t,o)},e.prototype.fields=function(){return[ms,Al]},e}(),AR="[object Object]",UR="[object Null]",DR="[object Undefined]",FR=Function.prototype,op=FR.toString,JR=op.call(Object),HR=YR(Object.getPrototypeOf,Object),ap=Object.prototype,lp=ap.hasOwnProperty,wr=Symbol?Symbol.toStringTag:void 0,up=ap.toString;function YR(e,t){return function(r){return e(t(r))}}function cp(e){if(!BR(e)||zR(e)!==AR)return!1;var t=HR(e);if(t===null)return!0;var r=lp.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&op.call(r)===JR}function BR(e){return e!=null&&typeof e=="object"}function zR(e){return e==null?e===void 0?DR:UR:wr&&wr in Object(e)?KR(e):jR(e)}function KR(e){var t=lp.call(e,wr),r=e[wr],n=!1;try{e[wr]=void 0,n=!0}catch(s){}var i=up.call(e);return n&&(t?e[wr]=r:delete e[wr]),i}function jR(e){return up.call(e)}var QR=20;function dp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=hp(r,e.shift(),0,n);return r}function Ul(e){return gs(e)?e.slice():e}function hp(e,t,r,n){r===void 0&&(r=0);var i;if(!(r>QR)){if(r++,ys(e)||ys(t)||pp(t))i=Ul(t);else if(gs(e)){if(i=e.slice(),gs(t))for(var s=0,o=t.length;s<o;s++)i.push(Ul(t[s]));else if(Xn(t))for(var l=Object.keys(t),s=0,o=l.length;s<o;s++){var u=l[s];i[u]=Ul(t[u])}}else if(Xn(e))if(Xn(t)){if(!$R(e,t))return t;i=Object.assign({},e);for(var l=Object.keys(t),s=0,o=l.length;s<o;s++){var u=l[s],a=t[u];if(ys(a))typeof a=="undefined"?delete i[u]:i[u]=a;else{var h=i[u],c=a;if(fp(e,u,n)||fp(t,u,n))delete i[u];else{if(Xn(h)&&Xn(c)){var f=n.get(h)||[],d=n.get(c)||[];f.push({obj:e,key:u}),d.push({obj:t,key:u}),n.set(h,f),n.set(c,d)}i[u]=hp(i[u],a,r,n)}}}}else i=t;return i}}function fp(e,t,r){for(var n=r.get(e[t])||[],i=0,s=n.length;i<s;i++){var o=n[i];if(o.key===t&&o.obj===e)return!0}return!1}function gs(e){return Array.isArray(e)}function pp(e){return typeof e=="function"}function Xn(e){return!ys(e)&&!gs(e)&&!pp(e)&&typeof e=="object"}function ys(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="undefined"||e instanceof Date||e instanceof RegExp||e===null}function $R(e,t){return!(!cp(e)||!cp(t))}var qR=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function mp(e,t){return typeof t=="string"?e===t:!!e.match(t)}function gp(e,t){var r,n;if(!t)return!1;try{for(var i=qR(t),s=i.next();!s.done;s=i.next()){var o=s.value;if(mp(e,o))return!0}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var eT=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),tT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},rT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},nT=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new eT}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,rT([this._that],tT(n),!1))).then(function(s){return r._deferred.resolve(s)},function(s){return r._deferred.reject(s)})}catch(s){this._deferred.reject(s)}}return this._deferred.promise},e}();function iT(e,t){return new Promise(function(r){me.with(Hf(me.active()),function(){e.export(t,function(n){r(n)})})})}var sT={_export:iT},yp=function(){function e(){}return e.prototype.emit=function(t){},e}(),oT=new yp,aT=function(){function e(){}return e.prototype.getLogger=function(t,r,n){return new yp},e}(),bp=new aT,lT=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):oT},e}(),vp=function(){function e(){}return e.prototype.getLogger=function(t,r,n){var i;return(i=this.getDelegateLogger(t,r,n))!==null&&i!==void 0?i:new lT(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:bp},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,r,n)},e}(),uT=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},bs=Symbol.for("io.opentelemetry.js.api.logs"),Wn=uT;function cT(e,t,r){return function(n){return n===e?t:r}}var Sp=1,dT=function(){function e(){this._proxyLoggerProvider=new vp}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Wn[bs]?this.getLoggerProvider():(Wn[bs]=cT(Sp,t,bp),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,r;return(r=(t=Wn[bs])===null||t===void 0?void 0:t.call(Wn,Sp))!==null&&r!==void 0?r:this._proxyLoggerProvider},e.prototype.getLogger=function(t,r,n){return this.getLoggerProvider().getLogger(t,r,n)},e.prototype.disable=function(){delete Wn[bs],this._proxyLoggerProvider=new vp},e}(),wp=dT.getInstance();function hT(e,t,r,n){for(var i=0,s=e.length;i<s;i++){var o=e[i];t&&o.setTracerProvider(t),r&&o.setMeterProvider(r),n&&o.setLoggerProvider&&o.setLoggerProvider(n),o.getConfig().enabled||o.enable()}}function fT(e){e.forEach(function(t){return t.disable()})}function pT(e){var t,r,n=e.tracerProvider||we.getTracerProvider(),i=e.meterProvider||Cl.getMeterProvider(),s=e.loggerProvider||wp.getLoggerProvider(),o=(r=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&r!==void 0?r:[];return hT(o,n,i,s),function(){fT(o)}}function Dl(e){return typeof e=="function"}var Qe=console.error.bind(console);function Pn(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function Mn(e){e&&e.logger&&(Dl(e.logger)?Qe=e.logger:Qe("new logger isn't a function, not replacing"))}function _p(e,t,r){if(!e||!e[t]){Qe("no original function "+t+" to wrap");return}if(!r){Qe("no wrapper function"),Qe(new Error().stack);return}if(!Dl(e[t])||!Dl(r)){Qe("original object and wrapper must be functions");return}var n=e[t],i=r(n,t);return Pn(i,"__original",n),Pn(i,"__unwrap",function(){e[t]===i&&Pn(e,t,n)}),Pn(i,"__wrapped",!0),Pn(e,t,i),i}function mT(e,t,r){if(e)Array.isArray(e)||(e=[e]);else{Qe("must provide one or more modules to patch"),Qe(new Error().stack);return}if(!(t&&Array.isArray(t))){Qe("must provide one or more functions to wrap on modules");return}e.forEach(function(n){t.forEach(function(i){_p(n,i,r)})})}function Rp(e,t){if(!e||!e[t]){Qe("no function to unwrap."),Qe(new Error().stack);return}if(!e[t].__unwrap)Qe("no original to unwrap to -- has "+t+" already been unwrapped?");else return e[t].__unwrap()}function gT(e,t){if(e)Array.isArray(e)||(e=[e]);else{Qe("must provide one or more modules to patch"),Qe(new Error().stack);return}if(!(t&&Array.isArray(t))){Qe("must provide one or more functions to unwrap on modules");return}e.forEach(function(r){t.forEach(function(n){Rp(r,n)})})}Mn.wrap=_p,Mn.massWrap=mT,Mn.unwrap=Rp,Mn.massUnwrap=gT;var vs=Mn,Fl=function(){return Fl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fl.apply(this,arguments)},yT=function(){function e(t,r,n){this.instrumentationName=t,this.instrumentationVersion=r,this._config={},this._wrap=vs.wrap,this._unwrap=vs.unwrap,this._massWrap=vs.massWrap,this._massUnwrap=vs.massUnwrap,this.setConfig(n),this._diag=H.createComponentLogger({namespace:t}),this._tracer=we.getTracer(t,r),this._meter=Cl.getMeter(t,r),this._logger=wp.getLogger(t,r),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,r=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(r)?r:[r]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Fl({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,r,n,i){if(t)try{t(n,i)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}},e}(),bT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),An=function(e){bT(t,e);function t(r,n,i){var s=e.call(this,r,n,i)||this;return s._config.enabled&&s.enable(),s}return t}(yT);function Ss(e,t,r){var n,i;try{i=e()}catch(s){n=s}finally{return t(n,i),i}}function Ae(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var vT="exception.type",ST="exception.message",wT="exception.stacktrace",Jl=vT,Hl=ST,_T=wT,RT="exception",Yl=function(){return Yl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Yl.apply(this,arguments)},TT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Tp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ET=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},IT=function(){function e(t,r,n,i,s,o,l,u,a,h){l===void 0&&(l=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:us.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=o,this.kind=s,this.links=l;var c=Date.now();this._performanceStartTime=ft.now(),this._performanceOffset=c-(this._performanceStartTime+Wl()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u!=null?u:c),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,h!=null&&this.setAttributes(h),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return r==null||this._isSpanEnded()?this:t.length===0?(H.warn("Invalid attribute key: "+t),this):zf(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this):(H.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var r,n;try{for(var i=TT(Object.entries(t)),s=i.next();!s.done;s=i.next()){var o=Tp(s.value,2),l=o[0],u=o[1];this.setAttribute(l,u)}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.addEvent=function(t,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return H.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&H.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),qf(r)&&(qf(n)||(n=r),r=void 0);var i=cs(r);return this.events.push({name:t,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var r;return(r=this.links).push.apply(r,ET([],Tp(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=Yl({},t),this.status.message!=null&&typeof t.message!="string"&&(H.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){H.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(t),this._duration=_R(this.startTime,this.endTime),this._duration[0]<0&&(H.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&H.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=ft.now())return Sr(t+this._performanceOffset);if(typeof t=="number")return pt(t);if(t instanceof Date)return pt(t.getTime());if(Pl(t))return t;if(this._startTimeProvided)return pt(Date.now());var r=ft.now()-this._performanceStartTime;return ep(this.startTime,pt(r))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,r){var n={};typeof t=="string"?n[Hl]=t:t&&(t.code?n[Jl]=t.code.toString():t.name&&(n[Jl]=t.name),t.message&&(n[Hl]=t.message),t.stack&&(n[_T]=t.stack)),n[Jl]||n[Hl]?this.addEvent(RT,n,r):H.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&H.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._truncateToSize=function(t){var r=this,n=this._attributeValueLengthLimit;return n<=0?(H.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):t},e}(),$r;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})($r||($r={}));var ws=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:$r.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),qr=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:$r.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),Bl=function(){function e(t){var r,n,i,s;this._root=t.root,this._root||(er(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new qr),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new qr,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new ws,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new qr,this._localParentNotSampled=(s=t.localParentNotSampled)!==null&&s!==void 0?s:new ws}return e.prototype.shouldSample=function(t,r,n,i,s,o){var l=we.getSpanContext(t);return!l||!as(l)?this._root.shouldSample(t,r,n,i,s,o):l.isRemote?l.traceFlags&Mt.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,i,s,o):this._remoteParentNotSampled.shouldSample(t,r,n,i,s,o):l.traceFlags&Mt.SAMPLED?this._localParentSampled.shouldSample(t,r,n,i,s,o):this._localParentNotSampled.shouldSample(t,r,n,i,s,o)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Ep=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,r){return{decision:Af(r)&&this._accumulate(r)<this._upperBound?$r.RECORD_AND_SAMPLED:$r.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var r=0,n=0;n<t.length/8;n++){var i=n*8,s=parseInt(t.slice(i,i+8),16);r=(r^s)>>>0}return r},e}(),CT=xt.AlwaysOn,en=1;function Ip(){var e=jr();return{sampler:Cp(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Cp(e){switch(e===void 0&&(e=jr()),e.OTEL_TRACES_SAMPLER){case xt.AlwaysOn:return new qr;case xt.AlwaysOff:return new ws;case xt.ParentBasedAlwaysOn:return new Bl({root:new qr});case xt.ParentBasedAlwaysOff:return new Bl({root:new ws});case xt.TraceIdRatio:return new Ep(Zp(e));case xt.ParentBasedTraceIdRatio:return new Bl({root:new Ep(Zp(e))});default:return H.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+CT+'".'),new qr}}function Zp(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return H.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+en+"."),en;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(H.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+en+"."),en):t<0||t>1?(H.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+en+"."),en):t}function ZT(e){var t={sampler:Cp()},r=Ip(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function LT(e){var t,r,n,i,s,o,l,u,a,h,c,f,d=Object.assign({},e.spanLimits),p=aR();return d.attributeCountLimit=(o=(s=(i=(r=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&r!==void 0?r:(n=e.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:p.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:p.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:hs,d.attributeValueLengthLimit=(f=(c=(h=(u=(l=e.spanLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:(a=e.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&h!==void 0?h:p.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&c!==void 0?c:p.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:ds,Object.assign({},e,{spanLimits:d})}var xT=function(){function e(t,r){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=jr();this._maxExportBatchSize=typeof(r==null?void 0:r.maxExportBatchSize)=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(r==null?void 0:r.maxQueueSize)=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(r==null?void 0:r.scheduledDelayMillis)=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(r==null?void 0:r.exportTimeoutMillis)=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new nT(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(H.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&Mt.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var t=this;return Promise.resolve().then(function(){return t.onShutdown()}).then(function(){return t._flushAll()}).then(function(){return t._exporter.shutdown()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&H.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(H.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(r,n){for(var i=[],s=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),o=0,l=s;o<l;o++)i.push(t._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},t._exportTimeoutMillis);me.with(Hf(me.active()),function(){var s;t._finishedSpans.length<=t._maxExportBatchSize?(s=t._finishedSpans,t._finishedSpans=[]):s=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var o=function(){return t._exporter.export(s,function(c){var f;clearTimeout(i),c.code===Ie.SUCCESS?r():n((f=c.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},l=null,u=0,a=s.length;u<a;u++){var h=s[u];h.resource.asyncAttributesPending&&h.resource.waitForAsyncAttributes&&(l!=null||(l=[]),l.push(h.resource.waitForAsyncAttributes()))}l===null?o():Promise.all(l).then(o,function(c){er(c),n(c)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var r=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(n){t._isExporting=!1,er(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),NT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lp=function(e){NT(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.onInit(n),i}return t.prototype.onInit=function(r){var n=this;(r==null?void 0:r.disableAutoFlushOnDocumentHide)!==!0&&typeof document!="undefined"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){er(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){er(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document!="undefined"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(xT),OT=8,GT=16,VT=function(){function e(){this.generateTraceId=xp(GT),this.generateSpanId=xp(OT)}return e}(),_s=Array(32);function xp(e){return function(){for(var r=0;r<e*2;r++)_s[r]=Math.floor(Math.random()*16)+48,_s[r]>=58&&(_s[r]+=39);return String.fromCharCode.apply(null,_s.slice(0,e*2))}}var kT=function(){function e(t,r,n){this._tracerProvider=n;var i=ZT(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new VT,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var i,s,o;r===void 0&&(r={}),n===void 0&&(n=me.active()),r.root&&(n=we.deleteSpan(n));var l=we.getSpan(n);if(Nl(n)){H.debug("Instrumentation suppressed, returning Noop Span");var u=we.wrapSpanContext(Pf);return u}var a=l==null?void 0:l.spanContext(),h=this._idGenerator.generateSpanId(),c,f,d;!a||!we.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,f=a.traceState,d=a.spanId);var p=(i=r.kind)!==null&&i!==void 0?i:Gn.INTERNAL,m=((s=r.links)!==null&&s!==void 0?s:[]).map(function(b){return{context:b.context,attributes:cs(b.attributes)}}),g=cs(r.attributes),v=this._sampler.shouldSample(n,c,t,p,g,m);f=(o=v.traceState)!==null&&o!==void 0?o:f;var y=v.decision===ls.RECORD_AND_SAMPLED?Mt.SAMPLED:Mt.NONE,w={traceId:c,spanId:h,traceFlags:y,traceState:f};if(v.decision===ls.NOT_RECORD){H.debug("Recording is off, propagating context in a non-recording span");var u=we.wrapSpanContext(w);return u}var R=cs(Object.assign(g,v.attributes)),S=new IT(this,n,t,w,p,d,m,r.startTime,void 0,R);return S},e.prototype.startActiveSpan=function(t,r,n,i){var s,o,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,o=n,l=i);var u=o!=null?o:me.active(),a=this.startSpan(t,s,u),h=we.setSpan(u,a);return me.with(h,l,void 0,a)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),XT="service.name",WT="telemetry.sdk.name",PT="telemetry.sdk.language",MT="telemetry.sdk.version",AT=XT,Np=WT,Op=PT,Gp=MT;function UT(){return"unknown_service"}var tr=function(){return tr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},tr.apply(this,arguments)},DT=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},FT=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},JT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Un=function(){function e(t,r){var n=this,i;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r==null?void 0:r.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return H.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[AT]=UT(),t[Op]=Xl[Op],t[Np]=Xl[Np],t[Gp]=Xl[Gp],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&H.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return DT(this,void 0,void 0,function(){return FT(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r=this,n;if(!t)return this;var i=tr(tr({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var s=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(o){var l,u=JT(o,2),a=u[0],h=u[1];return tr(tr(tr(tr({},r._syncAttributes),a),(l=t._syncAttributes)!==null&&l!==void 0?l:t.attributes),h)});return new e(i,s)},e.EMPTY=new e({}),e}(),Rs=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Vp=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;n.push(o.forceFlush())}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(l){Promise.all(n).then(function(){l()}).catch(function(u){er(u||new Error("MultiSpanProcessor: forceFlush failed")),l()})})},e.prototype.onStart=function(t,r){var n,i;try{for(var s=Rs(this._spanProcessors),o=s.next();!o.done;o=s.next()){var l=o.value;l.onStart(t,r)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(t){var r,n;try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;o.onEnd(t)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.shutdown=function(){var t,r,n=[];try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;n.push(o.shutdown())}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(l,u){Promise.all(n).then(function(){l()},u)})},e}(),HT=function(){function e(){}return e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),YT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},BT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},_r;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(_r||(_r={}));var zT=function(){function e(t){t===void 0&&(t={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=dp({},Ip(),LT(t));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:Un.empty(),i.mergeResourceWithDefaults&&(this.resource=Un.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=t.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=BT([],YT(t.spanProcessors),!1),this.activeSpanProcessor=new Vp(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var o=new Lp(s);this.activeSpanProcessor=o}else this.activeSpanProcessor=new HT}}return e.prototype.getTracer=function(t,r,n){var i=t+"@"+(r||"")+":"+((n==null?void 0:n.schemaUrl)||"");return this._tracers.has(i)||this._tracers.set(i,new kT({name:t,version:r,schemaUrl:n==null?void 0:n.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return H.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Vp(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),we.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&me.setGlobalContextManager(t.contextManager),t.propagator&&ht.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var s,o=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),s=_r.timeout},t);n.forceFlush().then(function(){clearTimeout(o),s!==_r.timeout&&(s=_r.resolved,i(s))}).catch(function(l){clearTimeout(o),s=_r.error,i(l)})})});return new Promise(function(n,i){Promise.all(r).then(function(s){var o=s.filter(function(l){return l!==_r.resolved});o.length>0?i(o):n()}).catch(function(s){return i([s])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var r;return(r=this.constructor._registeredPropagators.get(t))===null||r===void 0?void 0:r()},e.prototype._getSpanExporter=function(t){var r;return(r=this.constructor._registeredExporters.get(t))===null||r===void 0?void 0:r()},e.prototype._buildPropagatorFromEnv=function(){var t=this,r=Array.from(new Set(jr().OTEL_PROPAGATORS)),n=r.map(function(s){var o=t._getPropagator(s);return o||H.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),i=n.reduce(function(s,o){return o&&s.push(o),s},[]);if(i.length!==0)return r.length===1?i[0]:new tp({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=jr().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var r=this._getSpanExporter(t);return r||H.error('Exporter "'+t+'" requested through environment variable is unavailable.'),r}},e._registeredPropagators=new Map([["tracecontext",function(){return new sp}],["baggage",function(){return new Yf}]]),e._registeredExporters=new Map,e}(),KT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},jT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},kp=function(){function e(){this._enabled=!1,this._currentContext=br}return e.prototype._bindFunction=function(t,r){t===void 0&&(t=br);var n=this,i=function(){for(var s=this,o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return n.with(t,function(){return r.apply(s,o)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):r},e.prototype.disable=function(){return this._currentContext=br,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=br,this)},e.prototype.with=function(t,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];var o=this._currentContext;this._currentContext=t||br;try{return r.call.apply(r,jT([n],KT(i),!1))}finally{this._currentContext=o}},e}(),QT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),$T=function(e){QT(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,r)||this;if(r.contextManager)throw"contextManager should be defined in register method not in constructor";if(r.propagator)throw"propagator should be defined in register method not in constructor";return n}return t.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new kp),r.contextManager&&r.contextManager.enable(),e.prototype.register.call(this,r)},t}(zT),ie;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(ie||(ie={}));var qT="http.response_content_length",eE="http.response_content_length_uncompressed",tE=qT,rE=eE,zl;function nE(){return zl||(zl=document.createElement("a")),zl}function rr(e,t){return t in e}function Ue(e,t,r,n){var i=void 0,s=void 0;rr(r,t)&&typeof r[t]=="number"&&(i=r[t]);var o=ie.FETCH_START;if(rr(r,o)&&typeof r[o]=="number"&&(s=r[o]),i!==void 0&&s!==void 0&&i>=s)return e.addEvent(t,i),e}function tn(e,t,r){r===void 0&&(r=!1),r||(Ue(e,ie.FETCH_START,t),Ue(e,ie.DOMAIN_LOOKUP_START,t),Ue(e,ie.DOMAIN_LOOKUP_END,t),Ue(e,ie.CONNECT_START,t),rr(t,"name")&&t.name.startsWith("https:")&&Ue(e,ie.SECURE_CONNECTION_START,t),Ue(e,ie.CONNECT_END,t),Ue(e,ie.REQUEST_START,t),Ue(e,ie.RESPONSE_START,t),Ue(e,ie.RESPONSE_END,t));var n=t[ie.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(tE,n);var i=t[ie.DECODED_BODY_SIZE];i!==void 0&&n!==i&&e.setAttribute(rE,i)}function iE(e){return e.slice().sort(function(t,r){var n=t[ie.FETCH_START],i=r[ie.FETCH_START];return n>i?1:n<i?-1:0})}function Xp(){return typeof location!="undefined"?location.origin:void 0}function Wp(e,t,r,n,i,s){i===void 0&&(i=new WeakSet);var o=Ut(e);e=o.toString();var l=oE(e,t,r,n,i,s);if(l.length===0)return{mainRequest:void 0};if(l.length===1)return{mainRequest:l[0]};var u=iE(l);if(o.origin!==Xp()&&u.length>1){var a=u[0],h=sE(u,a[ie.RESPONSE_END],r),c=a[ie.RESPONSE_END],f=h[ie.FETCH_START];return f<c&&(h=a,a=void 0),{corsPreFlightRequest:a,mainRequest:h}}else return{mainRequest:l[0]}}function sE(e,t,r){for(var n=At(r),i=At(kn(t)),s=e[1],o,l=e.length,u=1;u<l;u++){var a=e[u],h=At(kn(a[ie.FETCH_START])),c=At(kn(a[ie.RESPONSE_END])),f=n-c;h>=i&&(!o||f<o)&&(o=f,s=a)}return s}function oE(e,t,r,n,i,s){var o=At(t),l=At(r),u=n.filter(function(a){var h=At(kn(a[ie.FETCH_START])),c=At(kn(a[ie.RESPONSE_END]));return a.initiatorType.toLowerCase()===(s||"xmlhttprequest")&&a.name===e&&h>=o&&c<=l});return u.length>0&&(u=u.filter(function(a){return!i.has(a)})),u}function Ut(e){if(typeof URL=="function")return new URL(e,typeof document!="undefined"?document.baseURI:typeof location!="undefined"?location.href:void 0);var t=nE();return t.href=e,t}function Pp(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var r=lE(e,t);if(t&&r.indexOf("@id")>0)return r;var n="";return e.parentNode&&(n+=Pp(e.parentNode,!1)),n+=r,n}function aE(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return t.indexOf(n.nodeType)>=0&&i===e.localName}),r.length>=1?r.indexOf(e)+1:0}function lE(e,t){var r=e.nodeType,n=aE(e),i="";if(r===Node.ELEMENT_NODE){var s=e.getAttribute("id");if(t&&s)return'//*[@id="'+s+'"]';i=e.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else if(r===Node.COMMENT_NODE)i="comment()";else return"";return i&&n>1?"/"+i+"["+n+"]":"/"+i}function Mp(e,t){var r=t||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=Ut(e);return n.origin===Xp()?!0:r.some(function(i){return mp(e,i)})}var Dn;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(Dn||(Dn={}));var uE="0.44.0",cE="@opentelemetry/instrumentation-document-load";const dE="http.method",hE="http.url",fE="http.status_code",pE="http.user_agent",Ap=dE,Rr=hE,mE=fE,gE=pE,Kl="exception.message",yE="exception.stacktrace",jl="exception.type",Up="http.response.status_code",bE="server.address",vE="service.name",SE="service.version",Dp="telemetry.sdk.name",Fp="telemetry.sdk.version",nr="url.full",Ts="url.path",wE="url.query",_E="user_agent.original";var Es;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Es||(Es={}));var RE=function(){var e,t,r={},n=(t=(e=ft).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(n){var i=Object.values(ie);i.forEach(function(l){if(rr(n,l)){var u=n[l];typeof u=="number"&&(r[l]=u)}})}else{var s=ft,o=s.timing;if(o){var i=Object.values(ie);i.forEach(function(u){if(rr(o,u)){var a=o[u];typeof a=="number"&&(r[u]=a)}})}}return r},Jp={"first-paint":Es.FIRST_PAINT,"first-contentful-paint":Es.FIRST_CONTENTFUL_PAINT},TE=function(e){var t,r,n=(r=(t=ft).getEntriesByType)===null||r===void 0?void 0:r.call(t,"paint");n&&n.forEach(function(i){var s=i.name,o=i.startTime;rr(Jp,s)&&e.addEvent(Jp[s],o)})},EE=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),IE=function(e){EE(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,cE,uE,r)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var r=this;window.setTimeout(function(){r._collectPerformance()})},t.prototype._addResourcesSpans=function(r){var n=this,i,s,o=(s=(i=ft).getEntriesByType)===null||s===void 0?void 0:s.call(i,"resource");o&&o.forEach(function(l){n._initResourceSpan(l,r)})},t.prototype._collectPerformance=function(){var r=this,n=Array.from(document.getElementsByTagName("meta")).find(function(o){return o.getAttribute("name")===ms}),i=RE(),s=n&&n.content||"";me.with(ht.extract(br,{traceparent:s}),function(){var o,l=r._startSpan(Dn.DOCUMENT_LOAD,ie.FETCH_START,i);l&&(me.with(we.setSpan(me.active(),l),function(){var u=r._startSpan(Dn.DOCUMENT_FETCH,ie.FETCH_START,i);u&&(u.setAttribute(Rr,location.href),me.with(we.setSpan(me.active(),u),function(){var a;r.getConfig().ignoreNetworkEvents||tn(u,i),r._addCustomAttributesOnSpan(u,(a=r.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentFetch),r._endSpan(u,ie.RESPONSE_END,i)}))}),l.setAttribute(Rr,location.href),l.setAttribute(gE,navigator.userAgent),r._addResourcesSpans(l),r.getConfig().ignoreNetworkEvents||(Ue(l,ie.FETCH_START,i),Ue(l,ie.UNLOAD_EVENT_START,i),Ue(l,ie.UNLOAD_EVENT_END,i),Ue(l,ie.DOM_INTERACTIVE,i),Ue(l,ie.DOM_CONTENT_LOADED_EVENT_START,i),Ue(l,ie.DOM_CONTENT_LOADED_EVENT_END,i),Ue(l,ie.DOM_COMPLETE,i),Ue(l,ie.LOAD_EVENT_START,i),Ue(l,ie.LOAD_EVENT_END,i)),r.getConfig().ignorePerformancePaintEvents||TE(l),r._addCustomAttributesOnSpan(l,(o=r.getConfig().applyCustomAttributesOnSpan)===null||o===void 0?void 0:o.documentLoad),r._endSpan(l,ie.LOAD_EVENT_END,i))})},t.prototype._endSpan=function(r,n,i){r&&(rr(i,n)?r.end(i[n]):r.end())},t.prototype._initResourceSpan=function(r,n){var i,s=this._startSpan(Dn.RESOURCE_FETCH,ie.FETCH_START,r,n);s&&(s.setAttribute(Rr,r.name),this.getConfig().ignoreNetworkEvents||tn(s,r),this._addCustomAttributesOnResourceSpan(s,r,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(s,ie.RESPONSE_END,r))},t.prototype._startSpan=function(r,n,i,s){if(rr(i,n)&&typeof i[n]=="number"){var o=this.tracer.startSpan(r,{startTime:i[n]},s?we.setSpan(me.active(),s):void 0);return o}},t.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(r,n){var i=this;n&&Ss(function(){return n(r)},function(s){s&&i._diag.error("addCustomAttributesOnSpan",s)})},t.prototype._addCustomAttributesOnResourceSpan=function(r,n,i){var s=this;i&&Ss(function(){return i(r,n)},function(o){o&&s._diag.error("addCustomAttributesOnResourceSpan",o)})},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(An),Is;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})(Is||(Is={}));var CE="http.method",ZE="http.url",LE="http.host",xE="http.scheme",NE="http.status_code",OE="http.user_agent",GE="http.request_content_length_uncompressed",VE=CE,kE=ZE,XE=LE,WE=xE,PE=NE,ME=OE,AE=GE,UE=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},DE=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},FE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},JE=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Hp=H.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function HE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||typeof e[0]=="string"){var r=e[1];if(!(r!=null&&r.body))return Promise.resolve();if(r.body instanceof ReadableStream){var n=YE(r.body),i=n.body,s=n.length;return r.body=i,s}else return Promise.resolve(BE(r.body))}else{var o=e[0];return o!=null&&o.body?o.clone().text().then(function(l){return Ql(l)}):Promise.resolve()}}function YE(e){if(!e.pipeThrough)return Hp.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t=0,r,n=new Promise(function(s){r=s}),i=new TransformStream({start:function(){},transform:function(s,o){return UE(this,void 0,void 0,function(){var l;return DE(this,function(u){switch(u.label){case 0:return[4,s];case 1:return l=u.sent(),t+=l.byteLength,o.enqueue(s),[2]}})})},flush:function(){r(t)}});return{body:e.pipeThrough(i),length:n}}function BE(e){if(typeof Document!="undefined"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return KE(e);if(e instanceof URLSearchParams)return Ql(e.toString());if(typeof e=="string")return Ql(e);Hp.warn("unknown body type")}var zE=new TextEncoder;function Ql(e){return zE.encode(e).byteLength}function KE(e){var t,r,n=0;try{for(var i=FE(e.entries()),s=i.next();!s.done;s=i.next()){var o=JE(s.value,2),l=o[0],u=o[1];n+=l.length,u instanceof Blob?n+=u.size:n+=u.length}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var Yp="0.57.2",jE=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),QE=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},$E=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},$l,qE=300,Bp=typeof process=="object"&&(($l=process.release)===null||$l===void 0?void 0:$l.name)==="node",eI=function(e){jE(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-fetch",Yp,r)||this;return n.component="fetch",n.version=Yp,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return t.prototype.init=function(){},t.prototype._addChildSpan=function(r,n){var i=this.tracer.startSpan("CORS Preflight",{startTime:n[ie.FETCH_START]},we.setSpan(me.active(),r));tn(i,n,this.getConfig().ignoreNetworkEvents),i.end(n[ie.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(r,n){var i=Ut(n.url);r.setAttribute(PE,n.status),n.statusText!=null&&r.setAttribute(Is.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(XE,i.host),r.setAttribute(WE,i.protocol.replace(":","")),typeof navigator!="undefined"&&r.setAttribute(ME,navigator.userAgent)},t.prototype._addHeaders=function(r,n){if(!Mp(n,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};ht.inject(me.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(r instanceof Request)ht.inject(me.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else if(r.headers instanceof Headers)ht.inject(me.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else if(r.headers instanceof Map)ht.inject(me.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else{var i={};ht.inject(me.active(),i),r.headers=Object.assign({},i,r.headers||{})}},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(r,n){var i;if(n===void 0&&(n={}),gp(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var s=(n.method||"GET").toUpperCase(),o="HTTP "+s;return this.tracer.startSpan(o,{kind:Gn.CLIENT,attributes:(i={},i[Is.COMPONENT]=this.moduleName,i[VE]=s,i[kE]=r,i)})},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i){var s=n.entries;if(!s.length){if(!performance.getEntriesByType)return;s=performance.getEntriesByType("resource")}var o=Wp(n.spanUrl,n.startTime,i,s,this._usedResources,"fetch");if(o.mainRequest){var l=o.mainRequest;this._markResourceAsUsed(l);var u=o.corsPreFlightRequest;u&&(this._addChildSpan(r,u),this._markResourceAsUsed(u)),tn(r,l,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._endSpan=function(r,n,i){var s=this,o=pt(Date.now()),l=Sr();this._addFinalSpanAttributes(r,i),setTimeout(function(){var u;(u=n.observer)===null||u===void 0||u.disconnect(),s._findResourceAndAddNetworkEvents(r,n,l),s._tasksCount--,s._clearResources(),r.end(o)},qE)},t.prototype._patchConstructor=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];var u=this,a=Ut(o[0]instanceof Request?o[0].url:String(o[0])).href,h=o[0]instanceof Request?o[0]:o[1]||{},c=i._createSpan(a,h);if(!c)return n.apply(this,o);var f=i._prepareSpanData(a);i.getConfig().measureRequestSize&&HE.apply(void 0,$E([],QE(o),!1)).then(function(v){v&&c.setAttribute(AE,v)}).catch(function(v){i._diag.warn("getFetchBodyLength",v)});function d(v,y){i._applyAttributesAfterFetch(v,h,y),i._endSpan(v,f,{status:y.status||0,statusText:y.message,url:a})}function p(v,y){i._applyAttributesAfterFetch(v,h,y),y.status>=200&&y.status<400?i._endSpan(v,f,y):i._endSpan(v,f,{status:y.status,statusText:y.statusText,url:a})}function m(v,y,w){try{var R=w.clone(),S=w.clone(),b=R.body;if(b){var _=b.getReader(),I=function(){_.read().then(function(E){var C=E.done;C?p(v,S):I()},function(E){d(v,E)})};I()}else p(v,w)}finally{y(w)}}function g(v,y,w){try{d(v,w)}finally{y(w)}}return new Promise(function(v,y){return me.with(we.setSpan(me.active(),c),function(){return i._addHeaders(h,a),i._tasksCount++,n.apply(u,h instanceof Request?[h]:[a,h]).then(m.bind(u,c,v),g.bind(u,c,y))})})}}},t.prototype._applyAttributesAfterFetch=function(r,n,i){var s=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&Ss(function(){return o(r,n,i)},function(l){l&&s._diag.error("applyCustomAttributesOnSpan",l)})},t.prototype._prepareSpanData=function(r){var n=Sr(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:n,spanUrl:r};var s=new PerformanceObserver(function(o){var l=o.getEntries();l.forEach(function(u){u.initiatorType==="fetch"&&u.name===r&&i.push(u)})});return s.observe({entryTypes:["resource"]}),{entries:i,observer:s,startTime:n,spanUrl:r}},t.prototype.enable=function(){if(Bp){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Ae(fetch)&&(this._unwrap(Vn,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Vn,"fetch",this._patchConstructor())},t.prototype.disable=function(){Bp||(this._unwrap(Vn,"fetch"),this._usedResources=new WeakSet)},t}(An),tI="http.method",rI="http.url",nI="http.host",iI="http.scheme",sI="http.status_code",oI="http.user_agent",aI="http.request_content_length_uncompressed",lI=tI,uI=rI,cI=nI,dI=iI,hI=sI,fI=oI,pI=aI,Dt;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(Dt||(Dt={}));var mI=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},gI=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},yI=H.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function bI(e){if(typeof Document!="undefined"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return SI(e);if(e instanceof URLSearchParams)return zp(e.toString());if(typeof e=="string")return zp(e);yI.warn("unknown body type")}var vI=new TextEncoder;function zp(e){return vI.encode(e).byteLength}function SI(e){var t,r,n=0;try{for(var i=mI(e.entries()),s=i.next();!s.done;s=i.next()){var o=gI(s.value,2),l=o[0],u=o[1];n+=l.length,u instanceof Blob?n+=u.size:n+=u.length}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var Kp="0.57.2",ql;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(ql||(ql={}));var wI=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_I=300,RI=function(e){wI(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-xml-http-request",Kp,r)||this;return n.component="xml-http-request",n.version=Kp,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return t.prototype.init=function(){},t.prototype._addHeaders=function(r,n){var i=Ut(n).href;if(!Mp(i,this.getConfig().propagateTraceHeaderCorsUrls)){var s={};ht.inject(me.active(),s),Object.keys(s).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var o={};ht.inject(me.active(),o),Object.keys(o).forEach(function(l){r.setRequestHeader(l,String(o[l]))})},t.prototype._addChildSpan=function(r,n){var i=this;me.with(we.setSpan(me.active(),r),function(){var s=i.tracer.startSpan("CORS Preflight",{startTime:n[ie.FETCH_START]});tn(s,n,i.getConfig().ignoreNetworkEvents),s.end(n[ie.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var s=Ut(i);n.status!==void 0&&r.setAttribute(hI,n.status),n.statusText!==void 0&&r.setAttribute(ql.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(cI,s.host),r.setAttribute(dI,s.protocol.replace(":","")),r.setAttribute(fI,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(r,n){var i=this,s=this.getConfig().applyCustomAttributesOnSpan;typeof s=="function"&&Ss(function(){return s(r,n)},function(o){o&&i._diag.error("applyCustomAttributesOnSpan",o)})},t.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(s){var o=s.getEntries(),l=Ut(n);o.forEach(function(u){u.initiatorType==="xmlhttprequest"&&u.name===l.href&&i.createdResources&&i.createdResources.entries.push(u)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(ft.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i,s,o){if(!(!i||!s||!o||!r.createdResources)){var l=r.createdResources.entries;(!l||!l.length)&&(l=ft.getEntriesByType("resource"));var u=Wp(Ut(i).href,s,o,l,this._usedResources);if(u.mainRequest){var a=u.mainRequest;this._markResourceAsUsed(a);var h=u.corsPreFlightRequest;h&&(this._addChildSpan(n,h),this._markResourceAsUsed(h)),tn(n,a,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},t.prototype._createSpan=function(r,n,i){var s;if(gp(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=i.toUpperCase(),l=this.tracer.startSpan(o,{kind:Gn.CLIENT,attributes:(s={},s[lI]=i,s[uI]=Ut(n).toString(),s)});return l.addEvent(Dt.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:l,spanUrl:n}),l},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];var u=o[0],a=o[1];return i._createSpan(this,a,u),n.apply(this,o)}}},t.prototype._patchSend=function(){var r=this;function n(h,c,f,d){var p=c.callbackToRemoveEvents;typeof p=="function"&&p();var m=c.span,g=c.spanUrl,v=c.sendStartTime;m&&(r._findResourceAndAddNetworkEvents(c,m,g,v,f),m.addEvent(h,d),r._addFinalSpanAttributes(m,c,g),m.end(d),r._tasksCount--),r._clearResources()}function i(h,c){var f=r._xhrMem.get(c);if(f){f.status=c.status,f.statusText=c.statusText,r._xhrMem.delete(c),f.span&&r._applyAttributesAfterXHR(f.span,c);var d=Sr(),p=Date.now();setTimeout(function(){n(h,f,d,p)},_I)}}function s(){i(Dt.EVENT_ERROR,this)}function o(){i(Dt.EVENT_ABORT,this)}function l(){i(Dt.EVENT_TIMEOUT,this)}function u(){this.status<299?i(Dt.EVENT_LOAD,this):i(Dt.EVENT_ERROR,this)}function a(h){h.removeEventListener("abort",o),h.removeEventListener("error",s),h.removeEventListener("load",u),h.removeEventListener("timeout",l);var c=r._xhrMem.get(h);c&&(c.callbackToRemoveEvents=void 0)}return function(h){return function(){for(var f=this,d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];var m=r._xhrMem.get(this);if(!m)return h.apply(this,d);var g=m.span,v=m.spanUrl;if(g&&v){if(r.getConfig().measureRequestSize&&(d!=null&&d[0])){var y=d[0],w=bI(y);w!==void 0&&g.setAttribute(pI,w)}me.with(we.setSpan(me.active(),g),function(){r._tasksCount++,m.sendStartTime=Sr(),g.addEvent(Dt.METHOD_SEND),f.addEventListener("abort",o),f.addEventListener("error",s),f.addEventListener("load",u),f.addEventListener("timeout",l),m.callbackToRemoveEvents=function(){a(f),m.createdResources&&m.createdResources.observer.disconnect()},r._addHeaders(f,v),r._addResourceObserver(f,v)})}return h.apply(this,d)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Ae(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Ae(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(An);const eu=/\b(query|mutation|subscription)\b\s*([A-Za-z_]\w*)?/g;function TI(e){var a;const t=II(e);if(t===null||typeof t!="object")return null;const r=Array.isArray(t)?t[0]:t;if(!r||typeof r!="object")return null;const n=r,i=typeof n.query=="string"?n.query:void 0,s=typeof n.operationName=="string"?n.operationName:void 0;if(i===void 0&&s===void 0)return null;const o=i?EI(i,s):null,l=(a=o==null?void 0:o[1])!=null?a:CI(i),u=s!=null?s:o==null?void 0:o[2];return u===void 0&&l===void 0?null:{name:u,type:l}}function EI(e,t){eu.lastIndex=0;let r=null;for(let n=eu.exec(e);n!==null;n=eu.exec(e)){if(t===void 0||n[2]===t)return n;r===null&&(r=n)}return r}function II(e){if(e==null)return null;if(typeof e=="object")return e;if(typeof e!="string")return null;try{return JSON.parse(e)}catch(t){return null}}function CI(e){if(e!==void 0&&/^\s*\{/.test(e))return"query"}const ZI=0,jp=2e3;class LI{constructor(t=ZI,r=jp){this.lastRecordedAt=new Map,this.windowMillis=t,this.maxSize=r>0?r:jp}shouldRecord(t,r=Date.now()){if(this.windowMillis<=0)return!0;const n=this.lastRecordedAt.get(t);return n===void 0||n<=r-this.windowMillis}markRecorded(t,r=Date.now()){if(!(this.windowMillis<=0))for(this.lastRecordedAt.delete(t),this.lastRecordedAt.set(t,r);this.lastRecordedAt.size>this.maxSize;){const n=this.lastRecordedAt.keys().next().value;if(n===void 0)break;this.lastRecordedAt.delete(n)}}reset(){this.lastRecordedAt.clear()}}const Cs=1e3,Qp=1e3*2,tu=4*60*60*1e3,ru=15*60*1e3,Zs={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},$p=100,Fn="app.highlight.io",qp="https://app.launchdarkly.com",xI={"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"},NI="/projects/default",OI=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function Ls(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)n!=="__proto__"&&(e[n]=r[n])}return e}var GI={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 nu(e,t){function r(i,s,o){if(typeof document!="undefined"){o=Ls({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,o[u]!==!0&&(l+="="+o[u].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+l}}function n(i){if(!(typeof document=="undefined"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},l=0;l<s.length;l++){var u=s[l].split("="),a=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(h in o||(o[h]=e.read(a,h)),i===h)break}catch(c){}}return i?o[i]:o}}return Object.create({set:r,get:n,remove:function(i,s){r(i,"",Ls({},s,{expires:-1}))},withAttributes:function(i){return nu(this.converter,Ls({},this.attributes,i))},withConverter:function(i){return nu(Ls({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var xs=nu(GI,{path:"/"});const em=Object.create(null),Ce=(e,t,...r)=>{const n=`[@launchdarkly plugins]: (${e}): `;Re(t,n,...r)},It=(e,t,r,...n)=>{em[`${e}-${t}`]||(em[`${e}-${t}`]=!0,Ce(e,r,...n))};var Jn=(e=>(e.CLIENT_ID="highlightClientID",e))(Jn||{});let Ns="localStorage",iu=!0,Hn;class VI{constructor(){L(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var n;return(n=Object.keys(this.storage)[t])!=null?n:null}getItem(t){var r;return(r=this.storage[t])!=null?r:""}setItem(t,r){this.storage[t]=r}removeItem(t){delete this.storage[t]}}class kI{getItem(t){var r;return(r=xs.get(t))!=null?r:""}setItem(t,r){if(!iu)return;const n=new Date;n.setTime(n.getTime()+ru),xs.set(t,r,x({expires:n},Hn?{domain:Hn}:{}))}removeItem(t){iu&&xs.remove(t,Hn?{domain:Hn}:void 0)}keys(){var t;return Object.keys((t=xs.get())!=null?t:{})}}const rn=new VI,nn=new kI,Os=()=>{let e=null;if(typeof window=="undefined")return rn;try{switch(Ns){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(It("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Ns}; using global storage`),e=rn)}catch(t){It("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=rn}return e},tm=e=>{Ns=e},Gs=e=>{iu=e},rm=e=>{Hn=e},He=e=>{try{return Os().getItem(e)}catch(t){return It("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),rn.getItem(e)}},mt=(e,t)=>{nn.setItem(e,t);try{return Os().setItem(e,t)}catch(r){return It("storage","setItem","debug",`failed to set item ${e}; using global storage`,r),rn.setItem(e,t)}},Tr=e=>{nn.removeItem(e);try{return Os().removeItem(e)}catch(t){return It("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),rn.removeItem(e)}},XI=e=>{if(Ns==="sessionStorage"){It("segment","sessionStorage","warn","highlight.io cannot use local storage; segment integration will not work");return}if(typeof window=="undefined"){It("segment","no-window","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[r,n]=arguments;e({keyName:r,keyValue:n}),t.apply(this,[r,n])}};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 Yn=e=>`${Ve.SESSION_DATA}_${e}`,Nt=()=>{var e;return typeof globalThis!="undefined"&&((e=globalThis.persistentSessionSecureID)!=null&&e.length)?globalThis.persistentSessionSecureID:su()},WI=e=>{typeof globalThis!="undefined"&&(e!=null&&e.length)&&(globalThis.persistentSessionSecureID=e)},su=()=>{var e;return(e=He(Ve.SESSION_ID))!=null?e:""},ir=e=>{mt(Ve.SESSION_ID,e)},ou=e=>{const t=Yn(e);return JSON.parse(He(t)||"{}")},nm=(e,t)=>!e.sessionKey&&!!e.sessionStartTime&&t-e.sessionStartTime>tu,Ft=e=>{e||(e=su());let t=ou(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<ru&&!nm(t,Date.now()))return t;Tr(Yn(e))},PI=e=>{const t=e!=null?e:su();if(t)try{return ou(t)}catch(r){return}};let im;const MI=()=>im,AI=e=>{im=e},UI=10*1e3;let sm=0;const DI=()=>{const e=Date.now();if(!(e-sm<UI)){sm=e;try{const t=ou(Nt());if(!(t!=null&&t.sessionSecureID))return;if(nm(t,e)){Tr(Yn(t.sessionSecureID));return}it(Y(x({},t),{lastPushTime:e}))}catch(t){It("highlightSession","touchSession","debug","failed to refresh session activity",t)}}},it=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;WI(t);const r=Yn(t);mt(r,JSON.stringify(e)),FI(r)},om=function(){const e=nn.getItem(Ve.SESSION_ID);ir(e);const t=Yn(e),r=nn.getItem(t);try{it(JSON.parse(r))}catch(n){}};function FI(e){var i;const t=`${Ve.SESSION_DATA}_`,r=new Set,n=Os();for(let s=n.length-1;s>=0;s--){const o=n.key(s);o&&o.startsWith(t)&&o!==e&&r.add(o)}for(const s of nn.keys())s.startsWith(t)&&s!==e&&r.add(s);for(const s of r){let o=!0;try{const l=He(s)||nn.getItem(s)||"{}",u=JSON.parse(l),a=(i=u.lastPushTime)!=null?i:u.sessionStartTime;o=a===void 0||Date.now()-a>=ru}catch(l){}o&&(It("highlightSession","pruneSessionData","debug",`removing session data for stale key ${s}`),Tr(s))}}const JI=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),HI=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function YI(e){return!!(e.includes("/sdk/evalx")&&e.match(JI)||e.includes("/eval/")&&e.match(HI))}const am="X-Highlight-Request",lm=e=>{let t=e;return!e.startsWith("https://")&&!e.startsWith("http://")&&(t=`${window.location.origin}${t}`),t.replace(/\/+$/,"")},BI=(e,{headersToRedact:t,headersToRecord:r,requestResponseSanitizer:n})=>{var u,a;let i=e;if(n){let c=!0;try{i.request.body=JSON.parse(i.request.body)}catch(d){c=!1}let f=!0;try{i.response.body=JSON.parse(i.response.body)}catch(d){f=!1}try{i=n(i)}catch(d){}finally{c=c&&!!((u=i==null?void 0:i.request)!=null&&u.body),f=f&&!!((a=i==null?void 0:i.response)!=null&&a.body),c&&(i.request.body=JSON.stringify(i.request.body)),f&&(i.response.body=JSON.stringify(i.response.body))}if(!i)return null}const h=i,{request:s,response:o}=h,l=rt(h,["request","response"]);return x({request:Cf(s,t,r),response:Cf(o,t,r)},l)},um=(e,t,r,n)=>{e.sort((u,a)=>u.responseEnd-a.responseEnd);const i={xmlhttprequest:{},others:{},fetch:{}},s=e.reduce((u,a)=>{const h=lm(a.name);return a.initiatorType===r?u[r][h]=[...u[r][h]||[],a]:u.others[h]=[...u.others[h]||[],a],u},i);let o={};o=t.reduce((u,a)=>{const h=lm(a.request.url);return u[h]=[...u[h]||[],a],u},o);for(let u in s[r]){const a=s[r][u],h=o[u];if(!h)continue;const c=Math.max(a.length-h.length,0);for(let f=c;f<a.length;f++)a[f]&&(a[f].requestResponsePair=h[f-c])}let l=[];for(let u in s)for(let a in s[u])l=l.concat(s[u][a]);return l.sort((u,a)=>u.fetchStart-a.fetchStart).reduce((u,a)=>{let h=a.requestResponsePair;return h&&(h=BI(a.requestResponsePair,n),!h)||(a.toJSON=function(){const c=window.performance.timeOrigin;return{initiatorType:this.initiatorType,startTimeAbs:c+this.startTime,connectStartAbs:c+this.connectStart,connectEndAbs:c+this.connectEnd,domainLookupStartAbs:c+this.domainLookupStart,domainLookupEndAbs:c+this.domainLookupEnd,fetchStartAbs:c+this.fetchStart,redirectStartAbs:c+this.redirectStart,redirectEndAbs:c+this.redirectEnd,requestStartAbs:c+this.requestStart,responseStartAbs:c+this.responseStart,responseEndAbs:c+this.responseEnd,secureConnectionStartAbs:c+this.secureConnectionStart,workerStartAbs:c+this.workerStart,name:this.name,transferSize:this.transferSize,encodedBodySize:this.encodedBodySize,decodedBodySize:this.decodedBodySize,nextHopProtocol:this.nextHopProtocol,requestResponsePairs:h}},u.push(a)),u},[])},zI=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),KI=e=>YI(e),jI=(e,t)=>t.some(r=>e.toLocaleLowerCase().includes(r)),Vs=(e,t,r)=>!jI(e,t)&&!KI(e)&&!zI(e),au=(e,t,r)=>{var o;if(r.some(l=>e.toLowerCase().includes(l)))return!1;let n=[];t===!0?(n=["localhost",/^\//],(o=window==null?void 0:window.location)!=null&&o.host&&n.push(cm(window.location.host))):t instanceof Array&&(n=t);const i=$I(e);let s=!1;return n.forEach(l=>{i.match(l)&&(s=!0)}),s},QI=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),cm=e=>new RegExp("^https?://([^/]+\\.)?"+QI(e)+"([:/?#]|$)"),$I=e=>{if(e.startsWith("/")&&!e.startsWith("//"))return e;try{return new URL(e).origin}catch(t){return e}};function qI(e){for(var t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,i=0;i<e;i++)t+=r.charAt(Math.floor(Math.random()*n));return t}const lu=()=>{const e=qI(10),t=Bx(),r=t==null?void 0:t.spanContext().traceId;return[Nt(),r!=null?r:e]},dm=(e,t)=>e+"/"+t,eC=(e,t,r,n,i,s)=>{const o=XMLHttpRequest.prototype,l=o.open,u=o.send,a=o.setRequestHeader;return o.open=function(h,c){return typeof c=="string"?this._url=c:this._url=c.toString(),this._method=h,this._requestHeaders={},this._shouldRecordHeaderAndBody=!n.some(f=>this._url.toLowerCase().includes(f)),l.apply(this,arguments)},o.setRequestHeader=function(h,c){return this._requestHeaders[h]=c,a.apply(this,arguments)},o.send=function(h){if(!Vs(this._url,t))return u.apply(this,arguments);const[c,f]=lu();au(this._url,r,n)&&this.setRequestHeader(am,dm(c,f));const d=this._shouldRecordHeaderAndBody,p={sessionSecureID:c,id:f,url:this._url,verb:this._method,headers:d?this._requestHeaders:{},body:void 0};if(d&&h){const m=uu(h,p.url);m&&(this._body=m,p.body=Ot(m,i,s,p.headers))}return this.addEventListener("load",function(){return z(this,null,function*(){const m={status:this.status,headers:{},body:void 0};if(d){const y=this.getAllResponseHeaders().trim().split(/[\r\n]+/),w={};if(y.forEach(function(R){const S=R.split(": "),b=S.shift();w[b]=S.join(": ")}),m.headers=w,h){const R=uu(h,p.url);R&&(p.body=Ot(R,i,s,m.headers))}if(this.responseType===""||this.responseType==="text")m.body=Ot(this.responseText,i,s,m.headers),m.size=this.responseText.length*8;else if(this.responseType==="blob"){if(this.response instanceof Blob)try{const R=yield this.response.text();m.body=Ot(R,i,s,m.headers),m.size=this.response.size}catch(R){}}else try{m.body=Ot(this.response,i,s,m.headers)}catch(R){}}e({request:p,response:m,urlBlocked:!d})})}),this.addEventListener("error",function(){return z(this,null,function*(){const m={status:this.status,headers:void 0,body:void 0};e({request:p,response:m,urlBlocked:!1})})}),u.apply(this,arguments)},()=>{o.open=l,o.send=u,o.setRequestHeader=a}},tC=/^\[object (ArrayBuffer|SharedArrayBuffer|DataView|(?:Ui|I)nt(?:8|16|32)Array|Uint8ClampedArray|Float(?:16|32|64)Array|Big(?:Ui|I)nt64Array|Blob|File|FormData|URLSearchParams|ReadableStream)\]$/,rC=e=>typeof e=="object"&&e!==null&&tC.test(Object.prototype.toString.call(e)),nC=e=>{var r,n;return typeof Blob!="undefined"&&e instanceof Blob?`[Blob type="${e.type}" size=${e.size}]`:typeof FormData!="undefined"&&e instanceof FormData?"[FormData]":typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams?e.toString().slice(0,cu):`[binary size=${(n=(r=e==null?void 0:e.byteLength)!=null?r:e==null?void 0:e.size)!=null?n:0}]`},uu=(e,t)=>{if(rC(e))return nC(e);if(typeof e=="string"){if(!((t!=null&&t.includes("localhost")||t!=null&&t.includes("highlight.run"))&&(e.includes("pushPayload")||e.includes("pushSessionEvents"))))return e}else if(typeof e=="object"||typeof e=="number"||typeof e=="boolean")return _t(e);return null},cu=64*1024,iC={"application/json":256*1024,"text/plain":256*1024},hm=(e,t)=>`[body omitted: ${e} bytes exceeds the ${t} byte limit]`,du=e=>{var r,n;if(!e)return cu;let t="";if(typeof e.get=="function")t=(r=e.get("content-type"))!=null?r:"";else{const i=e,s=Object.keys(i).find(o=>o.toLowerCase()==="content-type");t=s&&i[s]||""}try{t=t.split(";")[0].trim()}catch(i){}return(n=iC[t])!=null?n:cu},fm=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ot=(e,t,r,n)=>{const i=du(n);if(typeof e=="string"&&e.length>i)return hm(e.length,i);if(e){if(t)try{const s=JSON.parse(e);Array.isArray(s)?s.forEach(o=>{fm(o)&&Object.keys(o).forEach(l=>{t.includes(l.toLocaleLowerCase())&&(o[l]="[REDACTED]")})}):Object.keys(s).forEach(o=>{t.includes(o.toLocaleLowerCase())&&(s[o]="[REDACTED]")}),e=JSON.stringify(s)}catch(s){}if(r)try{const s=JSON.parse(e);Array.isArray(s)?s.forEach((o,l)=>{if(!fm(o)){s[l]="[REDACTED]";return}Object.keys(o).forEach(u=>{r.includes(u.toLocaleLowerCase())||(o[u]="[REDACTED]")})}):Object.keys(s).forEach(o=>{r.includes(o.toLocaleLowerCase())||(s[o]="[REDACTED]")}),e=JSON.stringify(s)}catch(s){}}try{e=e.slice(0,i)}catch(s){}return e},sC=(e,t,r,n,i,s)=>{const o=window._fetchProxy;return window._fetchProxy=function(l,u){const{method:a,url:h}=oC(l,u);if(!Vs(h,t))return o.call(this,l,u);const[c,f]=lu();if(au(h,r,n)){u=u||{};let g=new Headers(u.headers);l instanceof Request&&[...l.headers].forEach(([v,y])=>g.set(v,y)),g.set(am,dm(c,f)),u.headers=Object.fromEntries(g.entries())}const d={sessionSecureID:c,id:f,headers:{},body:void 0,url:h,verb:a},p=!n.some(g=>h.toLowerCase().includes(g));p&&(d.headers=Object.fromEntries(new Headers(u==null?void 0:u.headers).entries()),d.body=Ot(u==null?void 0:u.body,i,s,u==null?void 0:u.headers));let m=o.call(this,l,u);return aC(m,d,e,p,i,s),m},()=>{window._fetchProxy=o}},oC=(e,t)=>{const r=t&&t.method||typeof e=="object"&&"method"in e&&e.method||"GET";let n;return typeof e=="object"?"url"in e&&e.url?n=e.url:n=e.toString():n=e,{method:r,url:n}},aC=(e,t,r,n,i,s)=>{const o=l=>z(this,null,function*(){let u={body:void 0,headers:void 0,status:0,size:0},a=!1,h=!n;"stack"in l||l instanceof Error?(u=Y(x({},u),{body:l.message,status:0,size:void 0}),a=!0):"status"in l&&(u=Y(x({},u),{status:l.status}),n&&(u.body=yield pm(l,s,i),u.headers=Object.fromEntries(l.headers.entries()),u.size=u.body.length*8),(l.type==="opaque"||l.type==="opaqueredirect")&&(h=!0,u=Y(x({},u),{body:"CORS blocked request"})),a=!0),a&&r({request:t,response:u,urlBlocked:h})});e.then(o).catch(()=>{})},pm=(e,t,r)=>z(this,null,function*(){let n;try{const s=e.clone().body;if(s){let o=s.getReader(),l=new TextDecoder,u;const a=du(e.headers);let h="",c=!1;for(;!(u=yield o.read()).done;){let f=u.value;if(h+=l.decode(f,{stream:!0}),h.length>a){c=!0,o.cancel().catch(()=>{});break}}c||(h+=l.decode()),n=c?hm(Number(e.headers.get("content-length"))||h.length,a):h,n=Ot(n,r,t,e.headers)}else n=""}catch(i){n=`Unable to clone response: ${i}`}return n});var Ct;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(Ct||(Ct={}));var Gt;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(Gt||(Gt={}));var lC=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),mm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},gm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},uC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},cC=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},dC=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function hC(e){return e!=null}function ym(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(r){return[r,e[r]]})))}function fC(e){var t,r;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((r=e.schemaUrl)!==null&&r!==void 0?r:"")}var bm=function(e){lC(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error);function Bn(e,t){var r,n=new Promise(function(s,o){r=setTimeout(function(){o(new bm("Operation timed out."))},t)});return Promise.race([e,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}function pC(e){return mm(this,void 0,void 0,function(){var t=this;return gm(this,function(r){return[2,Promise.all(e.map(function(n){return mm(t,void 0,void 0,function(){var i,s;return gm(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,n];case 1:return i=o.sent(),[2,{status:"fulfilled",value:i}];case 2:return s=o.sent(),[2,{status:"rejected",reason:s}];case 3:return[2]}})})}))]})})}function mC(e){return e.status==="rejected"}function vm(e,t){var r=[];return e.forEach(function(n){r.push.apply(r,cC([],uC(t(n)),!1))}),r}function gC(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var i=dC(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(!t.has(o))return!1}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}function yC(e,t){for(var r=0,n=e.length-1,i=e.length;n>=r;){var s=r+Math.trunc((n-r)/2);e[s]<t?r=s+1:(i=s,n=s-1)}return i}function bC(e,t){return e.toLowerCase()===t.toLowerCase()}var Er;(function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Er||(Er={}));var vC=function(){function e(){this.kind=Er.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(t,r){},e.prototype.diff=function(t,r){},e.prototype.toMetricData=function(t,r,n,i){},e}(),oe;(function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(oe||(oe={}));function sr(e,t,r){var n,i,s,o;return RC(e)||H.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:(n=r==null?void 0:r.description)!==null&&n!==void 0?n:"",unit:(i=r==null?void 0:r.unit)!==null&&i!==void 0?i:"",valueType:(s=r==null?void 0:r.valueType)!==null&&s!==void 0?s:qt.DOUBLE,advice:(o=r==null?void 0:r.advice)!==null&&o!==void 0?o:{}}}function SC(e,t){var r,n;return{name:(r=e.name)!==null&&r!==void 0?r:t.name,description:(n=e.description)!==null&&n!==void 0?n:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function wC(e,t){return bC(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var _C=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function RC(e){return e.match(_C)!=null}var TC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function EC(e){var t=e.map(function(){return 0});return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var hu=function(){function e(t,r,n,i){n===void 0&&(n=!0),i===void 0&&(i=EC(r)),this.startTime=t,this._boundaries=r,this._recordMinMax=n,this._current=i}return e.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var r=yC(this._boundaries,t);this._current.buckets.counts[r]+=1}},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Sm=function(){function e(t,r){this._boundaries=t,this._recordMinMax=r,this.kind=Er.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new hu(t,this._boundaries,this._recordMinMax)},e.prototype.merge=function(t,r){for(var n=t.toPointValue(),i=r.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,l=new Array(s.length),u=0;u<s.length;u++)l[u]=s[u]+o[u];var a=1/0,h=-1/0;return this._recordMinMax&&(n.hasMinMax&&i.hasMinMax?(a=Math.min(n.min,i.min),h=Math.max(n.max,i.max)):n.hasMinMax?(a=n.min,h=n.max):i.hasMinMax&&(a=i.min,h=i.max)),new hu(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:l},count:n.count+i.count,sum:n.sum+i.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||i.hasMinMax),min:a,max:h})},e.prototype.diff=function(t,r){for(var n=t.toPointValue(),i=r.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,l=new Array(s.length),u=0;u<s.length;u++)l[u]=o[u]-s[u];return new hu(r.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:l},count:i.count-n.count,sum:i.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.HISTOGRAM,dataPoints:n.map(function(s){var o=TC(s,2),l=o[0],u=o[1],a=u.toPointValue(),h=t.type===oe.GAUGE||t.type===oe.UP_DOWN_COUNTER||t.type===oe.OBSERVABLE_GAUGE||t.type===oe.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:l,startTime:u.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:h?void 0:a.sum,buckets:a.buckets,count:a.count}}})}},e}(),fu=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},pu=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},wm=function(){function e(t,r,n,i){t===void 0&&(t=new IC),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.backing=t,this.indexBase=r,this.indexStart=n,this.indexEnd=i}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),e.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(r,n){return t.at(n)})},e.prototype.at=function(t){var r=this.indexBase-this.indexStart;return t<r&&(t+=this.backing.length),t-=r,this.backing.countAt(t)},e.prototype.incrementBucket=function(t,r){this.backing.increment(t,r)},e.prototype.decrementBucket=function(t,r){this.backing.decrement(t,r)},e.prototype.trim=function(){for(var t=0;t<this.length;t++)if(this.at(t)!==0){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(this.at(t)!==0){this.indexEnd-=this.length-t-1;break}this._rotate()},e.prototype.downscale=function(t){this._rotate();for(var r=1+this.indexEnd-this.indexStart,n=1<<t,i=0,s=0,o=this.indexStart;o<=this.indexEnd;){var l=o%n;l<0&&(l+=n);for(var u=l;u<n&&i<r;u++)this._relocateBucket(s,i),i++,o++;s++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var t=this.indexBase-this.indexStart;t!==0&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(t,r){t!==r&&this.incrementBucket(t,this.backing.emptyBucket(r))},e}(),IC=function(){function e(t){t===void 0&&(t=[0]),this._counts=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(t){return this._counts[t]},e.prototype.growTo=function(t,r,n){var i=new Array(t).fill(0);i.splice.apply(i,pu([n,this._counts.length-r],fu(this._counts.slice(r)),!1)),i.splice.apply(i,pu([0,r],fu(this._counts.slice(0,r)),!1)),this._counts=i},e.prototype.reverse=function(t,r){for(var n=Math.floor((t+r)/2)-t,i=0;i<n;i++){var s=this._counts[t+i];this._counts[t+i]=this._counts[r-i-1],this._counts[r-i-1]=s}},e.prototype.emptyBucket=function(t){var r=this._counts[t];return this._counts[t]=0,r},e.prototype.increment=function(t,r){this._counts[t]+=r},e.prototype.decrement=function(t,r){this._counts[t]>=r?this._counts[t]-=r:this._counts[t]=0},e.prototype.clone=function(){return new e(pu([],fu(this._counts),!1))},e}(),CC=52,ZC=2146435072,LC=1048575,mu=1023,_m=-mu+1,Rm=mu,gu=Math.pow(2,-1022);function Tm(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=(r&ZC)>>20;return n-mu}function Em(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=t.getUint32(4),i=(r&LC)*Math.pow(2,32);return i+n}function yu(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function xC(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var NC=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zn=function(e){NC(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),OC=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<gu)return this._minNormalLowerBoundaryIndex();var r=Tm(t),n=this._rightShift(Em(t)-1,CC);return r+n>>this._shift},e.prototype.lowerBoundary=function(t){var r=this._minNormalLowerBoundaryIndex();if(t<r)throw new zn("underflow: "+t+" is < minimum lower boundary: "+r);var n=this._maxNormalLowerBoundaryIndex();if(t>n)throw new zn("overflow: "+t+" is > maximum lower boundary: "+n);return yu(1,t<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var t=_m>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return Rm>>this._shift},e.prototype._rightShift=function(t,r){return Math.floor(t*Math.pow(2,-r))},e}(),GC=function(){function e(t){this._scale=t,this._scaleFactor=yu(Math.LOG2E,t),this._inverseFactor=yu(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=gu)return this._minNormalLowerBoundaryIndex()-1;if(Em(t)===0){var r=Tm(t);return(r<<this._scale)-1}var n=Math.floor(Math.log(t)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return n>=i?i:n},e.prototype.lowerBoundary=function(t){var r=this._maxNormalLowerBoundaryIndex();if(t>=r){if(t===r)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new zn("overflow: "+t+" is > maximum lower boundary: "+r)}var n=this._minNormalLowerBoundaryIndex();if(t<=n){if(t===n)return gu;if(t===n-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new zn("overflow: "+t+" is < minimum lower boundary: "+n)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return _m<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(Rm+1<<this._scale)-1},e}(),Im=-10,Cm=20,VC=Array.from({length:31},function(e,t){return t>10?new GC(t-10):new OC(t-10)});function Zm(e){if(e>Cm||e<Im)throw new zn("expected scale >= "+Im+" && <= "+Cm+", got: "+e);return VC[e+10]}var kC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ks=function(){function e(t,r){this.low=t,this.high=r}return e.combine=function(t,r){return new e(Math.min(t.low,r.low),Math.max(t.high,r.high))},e}(),XC=20,WC=160,bu=2,PC=function(){function e(t,r,n,i,s,o,l,u,a,h,c){t===void 0&&(t=t),r===void 0&&(r=WC),n===void 0&&(n=!0),i===void 0&&(i=0),s===void 0&&(s=0),o===void 0&&(o=0),l===void 0&&(l=Number.POSITIVE_INFINITY),u===void 0&&(u=Number.NEGATIVE_INFINITY),a===void 0&&(a=new wm),h===void 0&&(h=new wm),c===void 0&&(c=Zm(XC)),this.startTime=t,this._maxSize=r,this._recordMinMax=n,this._sum=i,this._count=s,this._zeroCount=o,this._min=l,this._max=u,this._positive=a,this._negative=h,this._mapping=c,this._maxSize<bu&&(H.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+bu),this._maxSize=bu)}return e.prototype.record=function(t){this.updateByIncrement(t,1)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(t,r){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=r,t===0){this._zeroCount+=r;return}this._sum+=t*r,t>0?this._updateBuckets(this._positive,t,r):this._updateBuckets(this._negative,-t,r)}},e.prototype.merge=function(t){this._count===0?(this._min=t.min,this._max=t.max):t.count!==0&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var r=this._minScale(t);this._downscale(this.scale-r),this._mergeBuckets(this.positive,t,t.positive,r),this._mergeBuckets(this.negative,t,t.negative,r)},e.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var r=this._minScale(t);this._downscale(this.scale-r),this._diffBuckets(this.positive,t,t.positive,r),this._diffBuckets(this.negative,t,t.negative,r)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(t,r,n){var i=this._mapping.mapToIndex(r),s=!1,o=0,l=0;if(t.length===0?(t.indexStart=i,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):i<t.indexStart&&t.indexEnd-i>=this._maxSize?(s=!0,l=i,o=t.indexEnd):i>t.indexEnd&&i-t.indexStart>=this._maxSize&&(s=!0,l=t.indexStart,o=i),s){var u=this._changeScale(o,l);this._downscale(u),i=this._mapping.mapToIndex(r)}this._incrementIndexBy(t,i,n)},e.prototype._incrementIndexBy=function(t,r,n){if(n!==0){if(t.length===0&&(t.indexStart=t.indexEnd=t.indexBase=r),r<t.indexStart){var i=t.indexEnd-r;i>=t.backing.length&&this._grow(t,i+1),t.indexStart=r}else if(r>t.indexEnd){var i=r-t.indexStart;i>=t.backing.length&&this._grow(t,i+1),t.indexEnd=r}var s=r-t.indexBase;s<0&&(s+=t.backing.length),t.incrementBucket(s,n)}},e.prototype._grow=function(t,r){var n=t.backing.length,i=t.indexBase-t.indexStart,s=n-i,o=xC(r);o>this._maxSize&&(o=this._maxSize);var l=o-i;t.backing.growTo(o,s,l)},e.prototype._changeScale=function(t,r){for(var n=0;t-r>=this._maxSize;)t>>=1,r>>=1,n++;return n},e.prototype._downscale=function(t){if(t!==0){if(t<0)throw new Error("impossible change of scale: "+this.scale);var r=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Zm(r)}},e.prototype._minScale=function(t){var r=Math.min(this.scale,t.scale),n=ks.combine(this._highLowAtScale(this.positive,this.scale,r),this._highLowAtScale(t.positive,t.scale,r)),i=ks.combine(this._highLowAtScale(this.negative,this.scale,r),this._highLowAtScale(t.negative,t.scale,r));return Math.min(r-this._changeScale(n.high,n.low),r-this._changeScale(i.high,i.low))},e.prototype._highLowAtScale=function(t,r,n){if(t.length===0)return new ks(0,-1);var i=r-n;return new ks(t.indexStart>>i,t.indexEnd>>i)},e.prototype._mergeBuckets=function(t,r,n,i){for(var s=n.offset,o=r.scale-i,l=0;l<n.length;l++)this._incrementIndexBy(t,s+l>>o,n.at(l))},e.prototype._diffBuckets=function(t,r,n,i){for(var s=n.offset,o=r.scale-i,l=0;l<n.length;l++){var u=s+l>>o,a=u-t.indexBase;a<0&&(a+=t.backing.length),t.decrementBucket(a,n.at(l))}t.trim()},e}(),MC=function(){function e(t,r){this._maxSize=t,this._recordMinMax=r,this.kind=Er.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new PC(t,this._maxSize,this._recordMinMax)},e.prototype.merge=function(t,r){var n=r.clone();return n.merge(t),n},e.prototype.diff=function(t,r){var n=r.clone();return n.diff(t),n},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.EXPONENTIAL_HISTOGRAM,dataPoints:n.map(function(s){var o=kC(s,2),l=o[0],u=o[1],a=u.toPointValue(),h=t.type===oe.GAUGE||t.type===oe.UP_DOWN_COUNTER||t.type===oe.OBSERVABLE_GAUGE||t.type===oe.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:l,startTime:u.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:h?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}})}},e}(),AC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},vu=function(){function e(t,r,n){r===void 0&&(r=0),n===void 0&&(n=[0,0]),this.startTime=t,this._current=r,this.sampleTime=n}return e.prototype.record=function(t){this._current=t,this.sampleTime=pt(Date.now())},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),UC=function(){function e(){this.kind=Er.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new vu(t)},e.prototype.merge=function(t,r){var n=ps(r.sampleTime)>=ps(t.sampleTime)?r:t;return new vu(t.startTime,n.toPointValue(),n.sampleTime)},e.prototype.diff=function(t,r){var n=ps(r.sampleTime)>=ps(t.sampleTime)?r:t;return new vu(r.startTime,n.toPointValue(),n.sampleTime)},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.GAUGE,dataPoints:n.map(function(s){var o=AC(s,2),l=o[0],u=o[1];return{attributes:l,startTime:u.startTime,endTime:i,value:u.toPointValue()}})}},e}(),DC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Kn=function(){function e(t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1),this.startTime=t,this.monotonic=r,this._current=n,this.reset=i}return e.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Lm=function(){function e(t){this.monotonic=t,this.kind=Er.SUM}return e.prototype.createAccumulation=function(t){return new Kn(t,this.monotonic)},e.prototype.merge=function(t,r){var n=t.toPointValue(),i=r.toPointValue();return r.reset?new Kn(r.startTime,this.monotonic,i,r.reset):new Kn(t.startTime,this.monotonic,n+i)},e.prototype.diff=function(t,r){var n=t.toPointValue(),i=r.toPointValue();return this.monotonic&&n>i?new Kn(r.startTime,this.monotonic,i,!0):new Kn(r.startTime,this.monotonic,i-n)},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.SUM,dataPoints:n.map(function(s){var o=DC(s,2),l=o[0],u=o[1];return{attributes:l,startTime:u.startTime,endTime:i,value:u.toPointValue()}}),isMonotonic:this.monotonic}},e}(),Ir=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=function(){function e(){}return e.Drop=function(){return xm},e.Sum=function(){return Nm},e.LastValue=function(){return Om},e.Histogram=function(){return Gm},e.ExponentialHistogram=function(){return jC},e.Default=function(){return QC},e}(),FC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new vC,t}(Jt),JC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){switch(r.type){case oe.COUNTER:case oe.OBSERVABLE_COUNTER:case oe.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new Lm(!0),t.NON_MONOTONIC_INSTANCE=new Lm(!1),t}(Jt),HC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new UC,t}(Jt),YC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new Sm([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Jt),BC=function(e){Ir(t,e);function t(r,n){n===void 0&&(n=!0);var i=e.call(this)||this;if(i._recordMinMax=n,r==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");r=r.concat(),r=r.sort(function(l,u){return l-u});var s=r.lastIndexOf(-1/0),o=r.indexOf(1/0);return o===-1&&(o=void 0),i._boundaries=r.slice(s+1,o),i}return t.prototype.createAggregator=function(r){return new Sm(this._boundaries,this._recordMinMax)},t}(Jt),zC=function(e){Ir(t,e);function t(r,n){r===void 0&&(r=160),n===void 0&&(n=!0);var i=e.call(this)||this;return i._maxSize=r,i._recordMinMax=n,i}return t.prototype.createAggregator=function(r){return new MC(this._maxSize,this._recordMinMax)},t}(Jt),KC=function(e){Ir(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._resolve=function(r){switch(r.type){case oe.COUNTER:case oe.UP_DOWN_COUNTER:case oe.OBSERVABLE_COUNTER:case oe.OBSERVABLE_UP_DOWN_COUNTER:return Nm;case oe.GAUGE:case oe.OBSERVABLE_GAUGE:return Om;case oe.HISTOGRAM:return r.advice.explicitBucketBoundaries?new BC(r.advice.explicitBucketBoundaries):Gm}return H.warn("Unable to recognize instrument type: "+r.type),xm},t.prototype.createAggregator=function(r){return this._resolve(r).createAggregator(r)},t}(Jt),xm=new FC,Nm=new JC,Om=new HC,Gm=new YC,jC=new zC,QC=new KC,$C=function(e){return Jt.Default()},qC=function(e){return Ct.CUMULATIVE},Su=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},wu=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Vm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},eZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},tZ=function(){function e(t){var r,n,i;this._shutdown=!1,this._aggregationSelector=(r=t==null?void 0:t.aggregationSelector)!==null&&r!==void 0?r:$C,this._aggregationTemporalitySelector=(n=t==null?void 0:t.aggregationTemporalitySelector)!==null&&n!==void 0?n:qC,this._metricProducers=(i=t==null?void 0:t.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=t==null?void 0:t.cardinalitySelector}return e.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(t){return Su(this,void 0,void 0,function(){var r,n,i,s,o,l;return wu(this,function(u){switch(u.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(eZ([this._sdkMetricProducer.collect({timeoutMillis:t==null?void 0:t.timeoutMillis})],Vm(this._metricProducers.map(function(a){return a.collect({timeoutMillis:t==null?void 0:t.timeoutMillis})})),!1))];case 1:return r=Vm.apply(void 0,[u.sent()]),n=r[0],i=r.slice(1),s=n.errors.concat(vm(i,function(a){return a.errors})),o=n.resourceMetrics.resource,l=n.resourceMetrics.scopeMetrics.concat(vm(i,function(a){return a.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:o,scopeMetrics:l},errors:s}]}})})},e.prototype.shutdown=function(t){return Su(this,void 0,void 0,function(){return wu(this,function(r){switch(r.label){case 0:return this._shutdown?(H.error("Cannot call shutdown twice."),[2]):(t==null?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return r.sent(),[3,4];case 2:return[4,Bn(this.onShutdown(),t.timeoutMillis)];case 3:r.sent(),r.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return Su(this,void 0,void 0,function(){return wu(this,function(r){switch(r.label){case 0:return this._shutdown?(H.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(t==null?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return r.sent(),[2];case 2:return[4,Bn(this.onForceFlush(),t.timeoutMillis)];case 3:return r.sent(),[2]}})})},e}(),rZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xs=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Ws=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},nZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},iZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},sZ=function(e){rZ(t,e);function t(r){var n,i,s,o,l=e.call(this,{aggregationSelector:(n=r.exporter.selectAggregation)===null||n===void 0?void 0:n.bind(r.exporter),aggregationTemporalitySelector:(i=r.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(r.exporter),metricProducers:r.metricProducers})||this;if(r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<r.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return l._exportInterval=(s=r.exportIntervalMillis)!==null&&s!==void 0?s:6e4,l._exportTimeout=(o=r.exportTimeoutMillis)!==null&&o!==void 0?o:3e4,l._exporter=r.exporter,l}return t.prototype._runOnce=function(){return Xs(this,void 0,void 0,function(){var r;return Ws(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,Bn(this._doRun(),this._exportTimeout)];case 1:return n.sent(),[3,3];case 2:return r=n.sent(),r instanceof bm?(H.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(er(r),[3,3]);case 3:return[2]}})})},t.prototype._doRun=function(){var r,n;return Xs(this,void 0,void 0,function(){var i,s,o,l,u,a;return Ws(this,function(h){switch(h.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=h.sent(),s=i.resourceMetrics,o=i.errors,o.length>0&&(a=H).error.apply(a,iZ(["PeriodicExportingMetricReader: metrics collection errors"],nZ(o),!1)),!s.resource.asyncAttributesPending)return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,(n=(r=s.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(r)];case 3:return h.sent(),[3,5];case 4:return l=h.sent(),H.debug("Error while resolving async portion of resource: ",l),er(l),[3,5];case 5:return s.scopeMetrics.length===0?[2]:[4,sT._export(this._exporter,s)];case 6:if(u=h.sent(),u.code!==Ie.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+u.error+")");return[2]}})})},t.prototype.onInitialized=function(){var r=this;this._interval=setInterval(function(){r._runOnce()},this._exportInterval)},t.prototype.onForceFlush=function(){return Xs(this,void 0,void 0,function(){return Ws(this,function(r){switch(r.label){case 0:return[4,this._runOnce()];case 1:return r.sent(),[4,this._exporter.forceFlush()];case 2:return r.sent(),[2]}})})},t.prototype.onShutdown=function(){return Xs(this,void 0,void 0,function(){return Ws(this,function(r){switch(r.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return r.sent(),[4,this._exporter.shutdown()];case 2:return r.sent(),[2]}})})},t}(tZ),oZ=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,r){var n=this,i=this._registeredViews.filter(function(s){return n._matchInstrument(s.instrumentSelector,t)&&n._matchMeter(s.meterSelector,r)});return i},e.prototype._matchInstrument=function(t,r){return(t.getType()===void 0||r.type===t.getType())&&t.getNameFilter().match(r.name)&&t.getUnitFilter().match(r.unit)},e.prototype._matchMeter=function(t,r){return t.getNameFilter().match(r.name)&&(r.version===void 0||t.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||t.getSchemaUrlFilter().match(r.schemaUrl))},e}(),Cr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ps=function(){function e(t,r){this._writableMetricStorage=t,this._descriptor=r}return e.prototype._record=function(t,r,n){if(r===void 0&&(r={}),n===void 0&&(n=me.active()),typeof t!="number"){H.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===qt.INT&&!Number.isInteger(t)&&(H.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._writableMetricStorage.record(t,r,n,pt(Date.now()))},e}(),aZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,i){this._record(r,n,i)},t}(Ps),lZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,i){if(r<0){H.warn("negative value provided to counter "+this._descriptor.name+": "+r);return}this._record(r,n,i)},t}(Ps),uZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,i){this._record(r,n,i)},t}(Ps),cZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,i){if(r<0){H.warn("negative value provided to histogram "+this._descriptor.name+": "+r);return}this._record(r,n,i)},t}(Ps),Ms=function(){function e(t,r,n){this._observableRegistry=n,this._descriptor=t,this._metricStorages=r}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}(),dZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ms),hZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ms),fZ=function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ms);function _u(e){return e instanceof Ms}var pZ=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,r){var n=sr(t,oe.GAUGE,r),i=this._meterSharedState.registerMetricStorage(n);return new uZ(i,n)},e.prototype.createHistogram=function(t,r){var n=sr(t,oe.HISTOGRAM,r),i=this._meterSharedState.registerMetricStorage(n);return new cZ(i,n)},e.prototype.createCounter=function(t,r){var n=sr(t,oe.COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new lZ(i,n)},e.prototype.createUpDownCounter=function(t,r){var n=sr(t,oe.UP_DOWN_COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new aZ(i,n)},e.prototype.createObservableGauge=function(t,r){var n=sr(t,oe.OBSERVABLE_GAUGE,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new hZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,r){var n=sr(t,oe.OBSERVABLE_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new dZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,r){var n=sr(t,oe.OBSERVABLE_UP_DOWN_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new fZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.addBatchCallback(t,r)},e.prototype.removeBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.removeBatchCallback(t,r)},e}(),km=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=sr(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),mZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},gZ=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,r){return r!=null||(r=this._hash(t)),this._valueMap.get(r)},e.prototype.getOrDefault=function(t,r){var n=this._hash(t);if(this._valueMap.has(n))return this._valueMap.get(n);var i=r();return this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,i),i},e.prototype.set=function(t,r,n){n!=null||(n=this._hash(t)),this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,r)},e.prototype.has=function(t,r){return r!=null||(r=this._hash(t)),this._valueMap.has(r)},e.prototype.keys=function(){var t,r;return Xm(this,function(n){switch(n.label){case 0:t=this._keyMap.entries(),r=t.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[r.value[1],r.value[0]]];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,r;return Xm(this,function(n){switch(n.label){case 0:t=this._valueMap.entries(),r=t.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[this._keyMap.get(r.value[0]),r.value[1],r.value[0]]];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}(),Zr=function(e){mZ(t,e);function t(){return e.call(this,ym)||this}return t}(gZ),yZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Wm=function(){function e(t,r){this._aggregator=t,this._activeCollectionStorage=new Zr,this._cumulativeMemoStorage=new Zr,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(r!=null?r:2e3)-1,this._overflowHashCode=ym(this._overflowAttributes)}return e.prototype.record=function(t,r,n,i){var s=this,o=this._activeCollectionStorage.get(r);if(!o){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var l=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return s._aggregator.createAccumulation(i)});l==null||l.record(t);return}o=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(r,o)}o==null||o.record(t)},e.prototype.batchCumulate=function(t,r){var n=this;Array.from(t.entries()).forEach(function(i){var s=yZ(i,3),o=s[0],l=s[1],u=s[2],a=n._aggregator.createAccumulation(r);a==null||a.record(l);var h=a;if(n._cumulativeMemoStorage.has(o,u)){var c=n._cumulativeMemoStorage.get(o,u);h=n._aggregator.diff(c,a)}else if(n._cumulativeMemoStorage.size>=n._cardinalityLimit&&(o=n._overflowAttributes,u=n._overflowHashCode,n._cumulativeMemoStorage.has(o,u))){var c=n._cumulativeMemoStorage.get(o,u);h=n._aggregator.diff(c,a)}if(n._activeCollectionStorage.has(o,u)){var f=n._activeCollectionStorage.get(o,u);h=n._aggregator.merge(f,h)}n._cumulativeMemoStorage.set(o,a,u),n._activeCollectionStorage.set(o,h,u)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Zr,t},e}(),Ru=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Pm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Mm=function(){function e(t,r){var n=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(i){n._unreportedAccumulations.set(i,[])})}return e.prototype.buildMetrics=function(t,r,n,i){this._stashAccumulations(n);var s=this._getMergedUnreportedAccumulations(t),o=s,l;if(this._reportHistory.has(t)){var u=this._reportHistory.get(t),a=u.collectionTime;l=u.aggregationTemporality,l===Ct.CUMULATIVE?o=e.merge(u.accumulations,s,this._aggregator):o=e.calibrateStartTime(u.accumulations,s,a)}else l=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:o,collectionTime:i,aggregationTemporality:l});var h=bZ(o);if(h.length!==0)return this._aggregator.toMetricData(r,l,h,i)},e.prototype._stashAccumulations=function(t){var r,n,i=this._unreportedAccumulations.keys();try{for(var s=Ru(i),o=s.next();!o.done;o=s.next()){var l=o.value,u=this._unreportedAccumulations.get(l);u===void 0&&(u=[],this._unreportedAccumulations.set(l,u)),u.push(t)}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var r,n,i=new Zr,s=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),s===void 0)return i;try{for(var o=Ru(s),l=o.next();!l.done;l=o.next()){var u=l.value;i=e.merge(i,u,this._aggregator)}}catch(a){r={error:a}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e.merge=function(t,r,n){for(var i=t,s=r.entries(),o=s.next();o.done!==!0;){var l=Pm(o.value,3),u=l[0],a=l[1],h=l[2];if(t.has(u,h)){var c=t.get(u,h),f=n.merge(c,a);i.set(u,f,h)}else i.set(u,a,h);o=s.next()}return i},e.calibrateStartTime=function(t,r,n){var i,s;try{for(var o=Ru(t.keys()),l=o.next();!l.done;l=o.next()){var u=Pm(l.value,2),a=u[0],h=u[1],c=r.get(a,h);c==null||c.setStartTime(n)}}catch(f){i={error:f}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}return r},e}();function bZ(e){return Array.from(e.entries())}var vZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),SZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},wZ=function(e){vZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Wm(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Mm(n,s),l}return t.prototype.record=function(r,n){var i=this,s=new Zr;Array.from(r.entries()).forEach(function(o){var l=SZ(o,2),u=l[0],a=l[1];s.set(i._attributesProcessor.process(u),a)}),this._deltaMetricStorage.batchCumulate(s,n)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(km);function Am(e,t){var r="";return e.unit!==t.unit&&(r+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
451
451
|
`),e.type!==t.type&&(r+=" - Type '"+e.type+"' does not match '"+t.type+`'
|
|
452
452
|
`),e.valueType!==t.valueType&&(r+=" - Value Type '"+e.valueType+"' does not match '"+t.valueType+`'
|
|
453
453
|
`),e.description!==t.description&&(r+=" - Description '"+e.description+"' does not match '"+t.description+`'
|
|
454
|
-
`),r}function
|
|
454
|
+
`),r}function _Z(e,t){return" - use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function RZ(e,t){return" - use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function TZ(e,t){var r={name:t.name,type:t.type,unit:t.unit},n=JSON.stringify(r);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+n+"'"}function EZ(e,t){var r={name:t.name,type:t.type,unit:t.unit},n=JSON.stringify(r);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+n+`'
|
|
455
455
|
- OR - create a new view with the name `+e.name+" and description '"+e.description+"' and InstrumentSelector "+n+`
|
|
456
|
-
- OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+n}function
|
|
456
|
+
- OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+n}function Um(e,t){return e.valueType!==t.valueType?_Z(e,t):e.unit!==t.unit?RZ(e,t):e.type!==t.type?TZ(e,t):e.description!==t.description?EZ(e,t):""}var Tu=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},IZ=function(){function e(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return e.create=function(){return new e},e.prototype.getStorages=function(t){var r,n,i,s,o=[];try{for(var l=Tu(this._sharedRegistry.values()),u=l.next();!u.done;u=l.next()){var a=u.value;o=o.concat(a)}}catch(d){r={error:d}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}var h=this._perCollectorRegistry.get(t);if(h!=null)try{for(var c=Tu(h.values()),f=c.next();!f.done;f=c.next()){var a=f.value;o=o.concat(a)}}catch(d){i={error:d}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}return o},e.prototype.register=function(t){this._registerStorage(t,this._sharedRegistry)},e.prototype.registerForCollector=function(t,r){var n=this._perCollectorRegistry.get(t);n==null&&(n=new Map,this._perCollectorRegistry.set(t,n)),this._registerStorage(r,n)},e.prototype.findOrUpdateCompatibleStorage=function(t){var r=this._sharedRegistry.get(t.name);return r===void 0?null:this._findOrUpdateCompatibleStorage(t,r)},e.prototype.findOrUpdateCompatibleCollectorStorage=function(t,r){var n=this._perCollectorRegistry.get(t);if(n===void 0)return null;var i=n.get(r.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(r,i)},e.prototype._registerStorage=function(t,r){var n=t.getInstrumentDescriptor(),i=r.get(n.name);if(i===void 0){r.set(n.name,[t]);return}i.push(t)},e.prototype._findOrUpdateCompatibleStorage=function(t,r){var n,i,s=null;try{for(var o=Tu(r),l=o.next();!l.done;l=o.next()){var u=l.value,a=u.getInstrumentDescriptor();wC(a,t)?(a.description!==t.description&&(t.description.length>a.description.length&&u.updateDescription(t.description),H.warn("A view or instrument with the name ",t.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
457
457
|
`,`Details:
|
|
458
|
-
`,
|
|
459
|
-
To resolve the conflict:`,
|
|
458
|
+
`,Am(a,t),`The longer description will be used.
|
|
459
|
+
To resolve the conflict:`,Um(a,t))),s=u):H.warn("A view or instrument with the name ",t.name,` has already been registered and is incompatible with another registered view.
|
|
460
460
|
`,`Details:
|
|
461
|
-
`,
|
|
462
|
-
`,Am(a,t))}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s},e}(),_Z=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,r,n,i){this._backingStorages.forEach(function(s){s.record(t,r,n,i)})},e}(),TZ=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new Zr}return e.prototype.observe=function(t,r){if(r===void 0&&(r={}),typeof t!="number"){H.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===qt.INT&&!Number.isInteger(t)&&(H.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(r,t)},e}(),EZ=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,r,n){if(n===void 0&&(n={}),!!Su(t)){var i=this._buffer.get(t);if(i==null&&(i=new Zr,this._buffer.set(t,i)),typeof r!="number"){H.warn("non-number value provided to metric "+t._descriptor.name+": "+r);return}t._descriptor.valueType===qt.INT&&!Number.isInteger(r)&&(H.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||i.set(n,r)}},e}(),_u=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Tu=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Um=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Dm=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},IZ=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,r){var n=this._findCallback(t,r);n>=0||this._callbacks.push({callback:t,instrument:r})},e.prototype.removeCallback=function(t,r){var n=this._findCallback(t,r);n<0||this._callbacks.splice(n,1)},e.prototype.addBatchCallback=function(t,r){var n=new Set(r.filter(Su));if(n.size===0){H.error("BatchObservableCallback is not associated with valid instruments",r);return}var i=this._findBatchCallback(t,n);i>=0||this._batchCallbacks.push({callback:t,instruments:n})},e.prototype.removeBatchCallback=function(t,r){var n=new Set(r.filter(Su)),i=this._findBatchCallback(t,n);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,r){return _u(this,void 0,void 0,function(){var n,i,s,o;return Tu(this,function(l){switch(l.label){case 0:return n=this._observeCallbacks(t,r),i=this._observeBatchCallbacks(t,r),[4,cC(Dm(Dm([],Um(n),!1),Um(i),!1))];case 1:return s=l.sent(),o=s.filter(dC).map(function(u){return u.reason}),[2,o]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(i){var s=i.callback,o=i.instrument;return _u(n,void 0,void 0,function(){var l,u;return Tu(this,function(a){switch(a.label){case 0:return l=new TZ(o._descriptor.name,o._descriptor.valueType),u=Promise.resolve(s(l)),r!=null&&(u=Bn(u,r)),[4,u];case 1:return a.sent(),o._metricStorages.forEach(function(h){h.record(l._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,r){var n=this;return this._batchCallbacks.map(function(i){var s=i.callback,o=i.instruments;return _u(n,void 0,void 0,function(){var l,u;return Tu(this,function(a){switch(a.label){case 0:return l=new EZ,u=Promise.resolve(s(l)),r!=null&&(u=Bn(u,r)),[4,u];case 1:return a.sent(),o.forEach(function(h){var c=l._buffer.get(h);c!=null&&h._metricStorages.forEach(function(f){f.record(c,t)})}),[2]}})})})},e.prototype._findCallback=function(t,r){return this._callbacks.findIndex(function(n){return n.callback===t&&n.instrument===r})},e.prototype._findBatchCallback=function(t,r){return this._batchCallbacks.findIndex(function(n){return n.callback===t&&hC(n.instruments,r)})},e}(),CZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ZZ=function(e){CZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Xm(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Pm(n,s),l}return t.prototype.record=function(r,n,i,s){n=this._attributesProcessor.process(n,i),this._deltaMetricStorage.record(r,n,i,s)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(Vm),Fm=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Eu=function(){function e(){}return e.Noop=function(){return xZ},e}(),LZ=function(e){Fm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(Eu);(function(e){Fm(t,e);function t(r){var n=e.call(this)||this;return n._allowedAttributeNames=r,n}return t.prototype.process=function(r,n){var i=this,s={};return Object.keys(r).filter(function(o){return i._allowedAttributeNames.includes(o)}).forEach(function(o){return s[o]=r[o]}),s},t})(Eu);var xZ=new LZ,NZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},OZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},GZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},VZ=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new RZ,this.observableRegistry=new IZ,this.meter=new cZ(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,ZZ);return r.length===1?r[0]:new _Z(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,yZ);return r},e.prototype.collect=function(t,r,n){return NZ(this,void 0,void 0,function(){var i,s,o;return OZ(this,function(l){switch(l.label){case 0:return[4,this.observableRegistry.observe(r,n==null?void 0:n.timeoutMillis)];case 1:return i=l.sent(),s=this.metricStorageRegistry.getStorages(t),s.length===0?[2,null]:(o=s.map(function(u){return u.collect(t,r)}).filter(lC),o.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,r){var n=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),s=i.map(function(u){var a=gC(u,t),h=n.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(h!=null)return h;var c=u.aggregation.createAggregator(a),f=new r(a,c,u.attributesProcessor,n._meterProviderSharedState.metricCollectors,u.aggregationCardinalityLimit);return n.metricStorageRegistry.register(f),f});if(s.length===0){var o=this._meterProviderSharedState.selectAggregations(t.type),l=o.map(function(u){var a=GZ(u,2),h=a[0],c=a[1],f=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(h,t);if(f!=null)return f;var d=c.createAggregator(t),p=h.selectCardinalityLimit(t.type),m=new r(t,d,Eu.Noop(),[h],p);return n.metricStorageRegistry.registerForCollector(h,m),m});s=s.concat(l)}return s},e}(),kZ=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},XZ=function(){function e(t){this.resource=t,this.viewRegistry=new rZ,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=uC(t),n=this.meterSharedStates.get(r);return n==null&&(n=new VZ(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,i=[];try{for(var s=kZ(this.metricCollectors),o=s.next();!o.done;o=s.next()){var l=o.value;i.push([l,l.selectAggregation(t)])}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e}(),Ms=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},As=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},WZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},PZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},MZ=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return Ms(this,void 0,void 0,function(){var r,n,i,s,o=this;return As(this,function(l){switch(l.label){case 0:return r=pt(Date.now()),n=[],i=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(function(u){return Ms(o,void 0,void 0,function(){var a;return As(this,function(h){switch(h.label){case 0:return[4,u.collect(this,r,t)];case 1:return a=h.sent(),(a==null?void 0:a.scopeMetrics)!=null&&n.push(a.scopeMetrics),(a==null?void 0:a.errors)!=null&&i.push.apply(i,PZ([],WZ(a.errors),!1)),[2]}})})}),[4,Promise.all(s)];case 1:return l.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}]}})})},e.prototype.forceFlush=function(t){return Ms(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return r.sent(),[2]}})})},e.prototype.shutdown=function(t){return Ms(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return r.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var r,n,i;return(i=(n=(r=this._metricReader).selectCardinalityLimit)===null||n===void 0?void 0:n.call(r,t))!==null&&i!==void 0?i:2e3},e}(),Jm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Hm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ym=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function AZ(e,t){var r=t!=null?t:Un.empty();return e?Un.default().merge(r):r}var UZ=function(){function e(t){var r,n,i,s,o;if(this._shutdown=!1,this._sharedState=new XZ(AZ((o=t==null?void 0:t.mergeResourceWithDefaults)!==null&&o!==void 0?o:!0,t==null?void 0:t.resource)),(t==null?void 0:t.views)!=null&&t.views.length>0)try{for(var l=Ym(t.views),u=l.next();!u.done;u=l.next()){var a=u.value;this._sharedState.viewRegistry.addView(a)}}catch(d){r={error:d}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if((t==null?void 0:t.readers)!=null&&t.readers.length>0)try{for(var h=Ym(t.readers),c=h.next();!c.done;c=h.next()){var f=c.value;this.addMetricReader(f)}}catch(d){i={error:d}}finally{try{c&&!c.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(H.warn("A shutdown MeterProvider cannot provide a Meter"),Qw()):this._sharedState.getMeterSharedState({name:t,version:r,schemaUrl:n.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var r=new MZ(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return Jm(this,void 0,void 0,function(){return Hm(this,function(r){switch(r.label){case 0:return this._shutdown?(H.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.shutdown(t)}))]);case 1:return r.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Jm(this,void 0,void 0,function(){return Hm(this,function(r){switch(r.label){case 0:return this._shutdown?(H.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(t)}))];case 1:return r.sent(),[2]}})})},e}(),jn;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(jn||(jn={}));var Bm=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,r){this._delegate.export(t,r)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),DZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zm=function(e){DZ(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.name="OTLPExporterError",s.data=i,s.code=n,s}return t}(Error);function FZ(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function JZ(e){if(e!=null)return function(){return e}}function HZ(e,t,r){var n,i,s,o,l,u;return{timeoutMillis:FZ((i=(n=e.timeoutMillis)!==null&&n!==void 0?n:t.timeoutMillis)!==null&&i!==void 0?i:r.timeoutMillis),concurrencyLimit:(o=(s=e.concurrencyLimit)!==null&&s!==void 0?s:t.concurrencyLimit)!==null&&o!==void 0?o:r.concurrencyLimit,compression:(u=(l=e.compression)!==null&&l!==void 0?l:t.compression)!==null&&u!==void 0?u:r.compression}}function YZ(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var BZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},zZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},KZ=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var r=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var n=function(){var i=r._sendingPromises.indexOf(t);r._sendingPromises.splice(i,1)};t.then(n,n)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return BZ(this,void 0,void 0,function(){return zZ(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function jZ(e){return new KZ(e.concurrencyLimit)}function QZ(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function $Z(){return{handleResponse:function(e){e==null||!QZ(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||H.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var qZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},eL=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},tL=function(){function e(t,r,n,i,s){this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=s,this._diagLogger=H.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,r){var n=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){r({code:Ie.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){r({code:Ie.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(s){if(s.status==="success"){if(s.data!=null)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(s.data))}catch(o){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",o,s.data)}r({code:Ie.SUCCESS});return}else if(s.status==="failure"&&s.error){r({code:Ie.FAILED,error:s.error});return}else s.status==="retryable"?r({code:Ie.FAILED,error:new zm("Export failed with retryable status")}):r({code:Ie.FAILED,error:new zm("Export failed with unknown error")})},function(s){return r({code:Ie.FAILED,error:s})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return qZ(this,void 0,void 0,function(){return eL(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function rL(e,t){return new tL(e.transport,e.serializer,$Z(),e.promiseHandler,t.timeout)}function Km(e,t,r){return rL({transport:r,serializer:t,promiseHandler:jZ(e)},{timeout:e.timeoutMillis})}var nL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Iu=function(){return Ct.CUMULATIVE},jm=function(e){switch(e){case oe.COUNTER:case oe.OBSERVABLE_COUNTER:case oe.GAUGE:case oe.HISTOGRAM:case oe.OBSERVABLE_GAUGE:return Ct.DELTA;case oe.UP_DOWN_COUNTER:case oe.OBSERVABLE_UP_DOWN_COUNTER:return Ct.CUMULATIVE}},Qm=function(e){switch(e){case oe.COUNTER:case oe.HISTOGRAM:return Ct.DELTA;case oe.GAUGE:case oe.UP_DOWN_COUNTER:case oe.OBSERVABLE_UP_DOWN_COUNTER:case oe.OBSERVABLE_COUNTER:case oe.OBSERVABLE_GAUGE:return Ct.CUMULATIVE}};function iL(){var e=jr(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?Iu:t==="delta"?jm:t==="lowmemory"?Qm:(H.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Iu)}function sL(e){return e!=null?e===jn.DELTA?jm:e===jn.LOWMEMORY?Qm:Iu:iL()}function oL(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Jt.Default()}}var aL=function(e){nL(t,e);function t(r,n){var i=e.call(this,r)||this;return i._aggregationSelector=oL(n),i._aggregationTemporalitySelector=sL(n==null?void 0:n.temporalityPreference),i}return t.prototype.selectAggregation=function(r){return this._aggregationSelector(r)},t.prototype.selectAggregationTemporality=function(r){return this._aggregationTemporalitySelector(r)},t}(Bm);function $m(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function lL(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function qm(e){var t=$m(e);return lL(t)}function uL(e){var t=$m(e);return t.toString()}var cL=typeof BigInt!="undefined"?uL:At;function eg(e){return e}function tg(e){if(e!==void 0)return Gl(e)}var dL={encodeHrTime:qm,encodeSpanContext:Gl,encodeOptionalSpanContext:tg};function rg(e){var t,r;if(e===void 0)return dL;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?qm:cL,encodeSpanContext:i?eg:Gl,encodeOptionalSpanContext:i?eg:tg}}var hL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function ng(e){return{attributes:Lr(e.attributes),droppedAttributesCount:0}}function ig(e){return{name:e.name,version:e.version}}function Lr(e){return Object.keys(e).map(function(t){return sg(t,e[t])})}function sg(e,t){return{key:e,value:og(t)}}function og(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(og)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=hL(r,2),i=n[0],s=n[1];return sg(i,s)})}}:{}}function fL(e,t){var r=rg(t);return{resource:ng(e.resource),schemaUrl:void 0,scopeMetrics:pL(e.scopeMetrics,r)}}function pL(e,t){return Array.from(e.map(function(r){return{scope:ig(r.scope),metrics:r.metrics.map(function(n){return mL(n,t)}),schemaUrl:r.scope.schemaUrl}}))}function mL(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=vL(e.aggregationTemporality);switch(e.dataPointType){case Gt.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:ag(e,t)};break;case Gt.GAUGE:r.gauge={dataPoints:ag(e,t)};break;case Gt.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:yL(e,t)};break;case Gt.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:bL(e,t)};break}return r}function gL(e,t,r){var n={attributes:Lr(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case qt.INT:n.asInt=e.value;break;case qt.DOUBLE:n.asDouble=e.value;break}return n}function ag(e,t){return e.dataPoints.map(function(r){return gL(r,e.descriptor.valueType,t)})}function yL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Lr(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function bL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Lr(r.attributes),count:n.count,min:n.min,max:n.max,sum:n.sum,positive:{offset:n.positive.offset,bucketCounts:n.positive.bucketCounts},negative:{offset:n.negative.offset,bucketCounts:n.negative.bucketCounts},scale:n.scale,zeroCount:n.zeroCount,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function vL(e){switch(e){case Ct.DELTA:return 1;case Ct.CUMULATIVE:return 2}}function SL(e,t){return{resourceMetrics:e.map(function(r){return fL(r,t)})}}var wL=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},RL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function _L(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Lr(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(s){return EL(s,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(s){return TL(s,t)}),droppedLinksCount:e.droppedLinksCount}}function TL(e,t){var r;return{attributes:e.attributes?Lr(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function EL(e,t){return{attributes:e.attributes?Lr(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function IL(e,t){var r=rg(t);return{resourceSpans:ZL(e,r)}}function CL(e){var t,r,n=new Map;try{for(var i=wL(e),s=i.next();!s.done;s=i.next()){var o=s.value,l=n.get(o.resource);l||(l=new Map,n.set(o.resource,l));var u=o.instrumentationLibrary.name+"@"+(o.instrumentationLibrary.version||"")+":"+(o.instrumentationLibrary.schemaUrl||""),a=l.get(u);a||(a=[],l.set(u,a)),a.push(o)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function ZL(e,t){for(var r=CL(e),n=[],i=r.entries(),s=i.next();!s.done;){for(var o=RL(s.value,2),l=o[0],u=o[1],a=[],h=u.values(),c=h.next();!c.done;){var f=c.value;if(f.length>0){var d=f.map(function(m){return _L(m,t)});a.push({scope:ig(f[0].instrumentationLibrary),spans:d,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}c=h.next()}var p={resource:ng(l),scopeSpans:a,schemaUrl:void 0};n.push(p),s=i.next()}return n}var lg={serializeRequest:function(e){var t=SL([e],{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},ug={serializeRequest:function(e){var t=IL(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},LL=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},xL=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},NL=5,OL=1e3,GL=5e3,VL=1.5,cg=.2;function kL(){return Math.random()*(2*cg)-cg}var XL=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,r,n){var i=this;return new Promise(function(s,o){setTimeout(function(){i._transport.send(t,r).then(s,o)},n)})},e.prototype.send=function(t,r){var n;return LL(this,void 0,void 0,function(){var i,s,o,l,u,a,h;return xL(this,function(c){switch(c.label){case 0:return i=Date.now()+r,[4,this._transport.send(t,r)];case 1:s=c.sent(),o=NL,l=OL,c.label=2;case 2:return s.status==="retryable"&&o>0?(o--,u=Math.max(Math.min(l,GL)+kL(),0),l=l*VL,a=(n=s.retryInMillis)!==null&&n!==void 0?n:u,h=i-Date.now(),a>h?[2,s]:[4,this.retry(t,h,a)]):[3,4];case 3:return s=c.sent(),[3,2];case 4:return[2,s]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function dg(e){return new XL(e.transport)}function WL(e){var t=[429,502,503,504];return t.includes(e)}function PL(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}var ML=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},AL=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,r){var n=this;return new Promise(function(i){var s=new XMLHttpRequest;s.timeout=r,s.open("POST",n._parameters.url);var o=n._parameters.headers();Object.entries(o).forEach(function(l){var u=ML(l,2),a=u[0],h=u[1];s.setRequestHeader(a,h)}),s.ontimeout=function(l){i({status:"failure",error:new Error("XHR request timed out")})},s.onreadystatechange=function(){s.status>=200&&s.status<=299?(H.debug("XHR success"),i({status:"success"})):s.status&&WL(s.status)?i({status:"retryable",retryInMillis:PL(s.getResponseHeader("Retry-After"))}):s.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},s.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},s.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},s.send(t)})},e.prototype.shutdown=function(){},e}();function UL(e){return new AL(e)}var DL=function(){function e(t){this._params=t}return e.prototype.send=function(t){var r=this;return new Promise(function(n){navigator.sendBeacon(r._params.url,new Blob([t],{type:r._params.blobType}))?(H.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function FL(e){return new DL(e)}function JL(e,t){return Km(e,t,dg({transport:UL(e)}))}function HL(e,t){return Km(e,t,dg({transport:FL({url:e.url,blobType:e.headers()["Content-Type"]})}))}var YL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function BL(e){return function(){var t,r={};return Object.entries((t=e==null?void 0:e())!==null&&t!==void 0?t:{}).forEach(function(n){var i=YL(n,2),s=i[0],o=i[1];typeof o!="undefined"?r[s]=String(o):H.warn('Header "'+s+'" has invalid value ('+o+") and will be ignored")}),r}}var xr=function(){return xr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},xr.apply(this,arguments)};function zL(e,t,r){var n=xr({},r()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,n)}}function KL(e){if(e!=null)try{return new URL(e),e}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function jL(e,t,r){var n,i,s,o;return xr(xr({},HZ(e,t,r)),{headers:zL(BL(e.headers),t.headers,r.headers),url:(i=(n=KL(e.url))!==null&&n!==void 0?n:t.url)!==null&&i!==void 0?i:r.url,agentOptions:(o=(s=e.agentOptions)!==null&&s!==void 0?s:t.agentOptions)!==null&&o!==void 0?o:r.agentOptions})}function QL(e,t){return xr(xr({},YZ()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function $L(e,t,r){return jL({url:e.url,timeoutMillis:e.timeoutMillis,headers:JZ(e.headers),concurrencyLimit:e.concurrencyLimit},{},QL(r,t))}function hg(e,t,r,n){var i=!!e.headers||typeof navigator.sendBeacon!="function",s=$L(e,r,n);return i?JL(s,t):HL(s,t)}var qL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ex=function(e){qL(t,e);function t(r){return e.call(this,hg(r!=null?r:{},lg,"v1/metrics",{"Content-Type":"application/json"}),r)||this}return t}(aL),tx=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),rx=function(e){tx(t,e);function t(r){return r===void 0&&(r={}),e.call(this,hg(r,ug,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(Bm),fg=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(fg||{});const Cu=3,Zu=1e3,Lu=500,nx=[fg.BillingQuotaExceeded.toString()],ix=e=>{var r;return((r=e.response.errors)==null?void 0:r.find(n=>nx.includes(n.message)))===void 0},xu=()=>{const e=(t,r,n,i,s=0)=>z(this,null,function*(){try{return yield t()}catch(o){if(o instanceof Mr&&!ix(o))throw o;if(s<Cu)return yield new Promise(l=>setTimeout(l,Zu+Lu*Math.pow(2,s))),yield e(t,r,n,i,s+1);throw _e("error",`highlight.io: data request failed after ${s} retries`),o}});return e};function sx(e,t){const r=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>r,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:cp(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function ox(e,t){if(!t.isSamplingEnabled())return e;const r=[],n={},i={};for(const s of e){s.parentSpanId&&(i[s.parentSpanId]=i[s.parentSpanId]||[],i[s.parentSpanId].push(s.spanContext().spanId));const o=t.shouldSample(s);o.sample?o.attributes?n[s.spanContext().spanId]=sx(s,o.attributes):n[s.spanContext().spanId]=s:r.push(s.spanContext().spanId)}for(;r.length>0;){const s=r.shift(),o=i[s];if(o)for(const l of o)delete n[l],r.push(l)}return Object.values(n)}const ax=(e,t,r)=>{if(typeof navigator=="undefined"||!navigator.sendBeacon)return!1;try{const n=new Blob([t],{type:r});return navigator.sendBeacon(e,n)}catch(n){return!1}},pg=(e,t,r,n)=>{const i=s=>{if(ax(e,t,r))return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:s})};try{const s=new Blob([t],{type:r});fetch(e,{method:"POST",body:s,keepalive:!0,headers:{"Content-Type":r},credentials:"omit"}).then(o=>{if(o.ok)return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:new Error(`keepalive fetch export failed with status ${o.status}`)})},o=>i(o))}catch(s){i(s)}};class lx extends rx{constructor(r,n){var i;super(Y(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.sampler=n,this.url=(i=r==null?void 0:r.url)!=null?i:""}setUnloading(r){this.unloading=r}export(r,n){const i=ox(r,this.sampler);if(i.length===0)return n({code:Ie.SUCCESS});if(this.unloading){const l=ug.serializeRequest(i);if(!l||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});pg(this.url,l,"application/json",n);return}let s=0;const o=l=>{if(l.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(s++,s>Cu)return n({code:Ie.FAILED,error:l.error});new Promise(u=>setTimeout(u,Zu+Lu*Math.pow(2,s))).then(()=>{super.export(i,o)})};super.export(i,o)}}class ux extends ex{constructor(r){var n;super(Y(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.url=(n=r==null?void 0:r.url)!=null?n:""}setUnloading(r){this.unloading=r}export(r,n){if(this.unloading){const o=lg.serializeRequest(r);if(!o||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});pg(this.url,o,"application/json",n);return}let i=0;const s=o=>{var l;if(o.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(i++,i>Cu)return _e("error",`[@launchdarkly/observability] failed to export OTeL metrics: ${(l=o.error)==null?void 0:l.message}`,o.error),n({code:Ie.FAILED,error:o.error});new Promise(u=>setTimeout(u,Zu+Lu*Math.pow(2,i))).then(()=>{var u;_e("warn",`[@launchdarkly/observability] retry ${i}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(r,s)})};super.export(r,s)}}const cx="OT_ZONE_CONTEXT",dx="Navigation:";function hx(){return!1}const kt=class kt extends An{constructor(r={}){var n,i;super(kt.moduleName,kt.version,r);L(this,"_spansData",new WeakMap);L(this,"_zonePatched");L(this,"_wrappedListeners",new WeakMap);L(this,"_eventsSpanMap",new WeakMap);L(this,"_eventNames");L(this,"_shouldPreventSpanCreation");this._eventNames=new Set((n=r==null?void 0:r.eventNames)!=null?n:[]),((i=r.productAnalyticsEvents)==null?void 0:i.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof(r==null?void 0:r.shouldPreventSpanCreation)=="function"?r.shouldPreventSpanCreation:hx}init(){}_checkForTimeout(r,n){const i=this._spansData.get(n);i&&(r.source==="setTimeout"?i.hrTimeLastTimeout=Sr():r.source!=="Promise.then"&&r.source!=="setTimeout"&&(i.hrTimeLastTimeout=void 0))}_allowEventName(r){return this._eventNames.has(r)}_createSpan(r,n){var l;const i=r==null?void 0:r.target,s=r==null?void 0:r.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(s))return;const o=Wp(i,!0);try{const u=this.tracer.startSpan(s,{attributes:{[nr]:window.location.href,"event.type":s,"event.tag":i.tagName,"event.xpath":o,"event.id":i.id,"event.classname":i.className,"event.text":(l=i.textContent)!=null?l:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?we.setSpan(me.active(),n):void 0);return r instanceof MouseEvent&&(u.setAttribute("event.x",r.clientX),u.setAttribute("event.y",r.clientY),u.setAttribute("event.relativeX",r.clientX/window.innerWidth),u.setAttribute("event.relativeY",r.clientY/window.innerHeight),s==="scroll"&&(u.setAttribute("event.scrollX",window.scrollX),u.setAttribute("event.scrollY",window.scrollY))),this._shouldPreventSpanCreation(s,i,u)===!0?void 0:(this._spansData.set(u,{taskCount:0}),u)}catch(u){this._diag.error("failed to start create new user interaction span",u)}}_decrementTask(r){const n=this._spansData.get(r);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(r,n.hrTimeLastTimeout))}_getCurrentSpan(r){const n=r.get(cx);return n&&we.getSpan(n)}_incrementTask(r){const n=this._spansData.get(r);n&&n.taskCount++}addPatchedListener(r,n,i,s){let o=this._wrappedListeners.get(i);o||(o=new Map,this._wrappedListeners.set(i,o));let l=o.get(n);return l||(l=new Map,o.set(n,l)),l.has(r)?!1:(l.set(r,s),!0)}removePatchedListener(r,n,i){const s=this._wrappedListeners.get(i);if(!s)return;const o=s.get(n);if(!o)return;const l=o.get(r);return l&&(o.delete(r),o.size===0&&(s.delete(n),s.size===0&&this._wrappedListeners.delete(i))),l}_invokeListener(r,n,i){return typeof r=="function"?r.apply(n,i):r.handleEvent(i[0])}_patchAddEventListener(){const r=this;let n=new Map;return i=>function(o,l,u){if(!l)return i.call(this,o,l,u);const a=u&&typeof u=="object"&&u.once,h=function(...c){var m;a&&r.removePatchedListener(this,o,l);let f;const d=c[0];if(!(d!=null&&d.type))return r._invokeListener(l,this,c);if(Date.now()-((m=n.get(d.type))!=null?m:0)<1e3/60)return r._invokeListener(l,this,c);n.set(d.type,Date.now()),d&&(f=r._eventsSpanMap.get(d));const p=r._createSpan(d,f);return p?(d&&r._eventsSpanMap.set(d,p),me.with(we.setSpan(me.active(),p),()=>{const g=r._invokeListener(l,this,c);return p.end(),g})):r._invokeListener(l,this,c)};if(r.addPatchedListener(this,o,l,h))return i.call(this,o,h,u)}}_patchRemoveEventListener(){const r=this;return n=>function(s,o,l){const u=r.removePatchedListener(this,s,o);return u?n.call(this,s,u,l):n.call(this,s,o,l)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const r=this;return n=>function(...s){const o=`${location.pathname}${location.hash}${location.search}`,l=n.apply(this,s),u=`${location.pathname}${location.hash}${location.search}`;return o!==u&&r._updateInteractionName(u),l}}_unpatchHistoryApi(){Ae(history.replaceState)&&this._unwrap(history,"replaceState"),Ae(history.pushState)&&this._unwrap(history,"pushState"),Ae(history.back)&&this._unwrap(history,"back"),Ae(history.forward)&&this._unwrap(history,"forward"),Ae(history.go)&&this._unwrap(history,"go")}_updateInteractionName(r){const n=we.getSpan(me.active());n&&typeof n.updateName=="function"&&n.updateName(`${dx} ${r}`)}_patchZoneCancelTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&r._decrementTask(l),n.call(this,s)}}_patchZoneScheduleTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&(r._incrementTask(l),r._checkForTimeout(s,l)),n.call(this,s)}}_patchZoneRunTask(){const r=this;return n=>function(s,o,l){const u=Array.isArray(l)&&l[0]instanceof Event?l[0]:void 0,a=u==null?void 0:u.target;let h;const c=this;if(a){if(h=r._createSpan(u),h)return r._incrementTask(h),c.run(()=>{try{return me.with(we.setSpan(me.active(),h),()=>{const f=Zone.current;return s._zone=f,n.call(f,s,o,l)})}finally{r._decrementTask(h)}})}else h=r._getCurrentSpan(c);try{return n.call(c,s,o,l)}finally{h&&r._shouldCountTask(s,c)&&r._decrementTask(h)}}}_shouldCountTask(r,n){if(r._zone&&(n=r._zone),!n||!r.data||r.data.isPeriodic)return!1;const i=this._getCurrentSpan(n);return!i||!this._spansData.get(i)?!1:r.type==="macroTask"||r.type==="microTask"}_tryToEndSpan(r,n){r&&this._spansData.get(r)&&(r.end(n),this._spansData.delete(r))}enable(){const r=this._getZoneWithPrototype();this._diag.debug("applying patch to",kt.moduleName,kt.version,"zone:",!!r),r?(Ae(r.prototype.runTask)&&(this._unwrap(r.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),Ae(r.prototype.scheduleTask)&&(this._unwrap(r.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),Ae(r.prototype.cancelTask)&&(this._unwrap(r.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(r.prototype,"runTask",this._patchZoneRunTask()),this._wrap(r.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(r.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&(this._unwrap(i,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),Ae(i.removeEventListener)&&(this._unwrap(i,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(i,"addEventListener",this._patchAddEventListener()),this._wrap(i,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const r=this._getZoneWithPrototype();this._diag.debug("removing patch from",kt.moduleName,kt.version,"zone:",!!r),r&&this._zonePatched?(Ae(r.prototype.runTask)&&this._unwrap(r.prototype,"runTask"),Ae(r.prototype.scheduleTask)&&this._unwrap(r.prototype,"scheduleTask"),Ae(r.prototype.cancelTask)&&this._unwrap(r.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&this._unwrap(i,"addEventListener"),Ae(i.removeEventListener)&&this._unwrap(i,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};L(kt,"version","0.1.1"),L(kt,"moduleName","user-interaction");let Nu=kt;const fx=e=>{if(typeof XMLHttpRequest=="undefined")return()=>{};const t=XMLHttpRequest.prototype,r=t.open,n=t.setRequestHeader,i=t.send,s=a=>!!a&&e.some(h=>a.toLowerCase().includes(h)),o=function(a,h){return this._method=a,this._url=typeof h=="string"?h:String(h),this._requestHeaders={},this._body=void 0,r.apply(this,arguments)},l=function(a,h){return this._requestHeaders||(this._requestHeaders={}),this._requestHeaders[a]=h,n.apply(this,arguments)},u=function(a){if(this._body===void 0&&a!==void 0&&a!==null&&!s(this._url)){const h=au(a,this._url);h&&(this._body=h)}return i.apply(this,arguments)};return t.open=o,t.setRequestHeader=l,t.send=u,()=>{t.open===o&&(t.open=r),t.setRequestHeader===l&&(t.setRequestHeader=n),t.send===u&&(t.send=i)}},px=256*1024,mx=e=>!!e&&e.split(";")[0].trim().toLowerCase()==="multipart/form-data",mg=e=>{if(!e||typeof e!="object")return{};if(typeof Headers!="undefined"&&e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))try{return Object.fromEntries(new Headers(e).entries())}catch(t){return Object.fromEntries(e.map(([r,n])=>[String(r),String(n)]))}return x({},e)},Us=e=>Object.prototype.toString.call(e),gx=e=>typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer||Us(e)==="[object ArrayBuffer]"||Us(e)==="[object SharedArrayBuffer]",gg=e=>{if(typeof File!="undefined"&&e instanceof File||Us(e)==="[object File]"){const t=e;return`[File name="${t.name}" type="${t.type}" size=${t.size}]`}return`[Blob type="${e.type}" size=${e.size}]`},Ou=(e,t,r)=>{const n=e[t];n===void 0?e[t]=r:Array.isArray(n)?n.push(r):e[t]=[n,r]},yx=e=>{const t={};return e.forEach((r,n)=>{Ou(t,n,typeof r=="string"?r:gg(r))}),JSON.stringify(t)},bx=e=>{const t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);if(t.byteLength>px)return`[binary size=${t.byteLength}]`;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch(r){return`[binary size=${t.byteLength}]`}},yg=e=>{if(e==null)return;switch(typeof e){case"string":return e;case"number":case"boolean":case"bigint":return String(e);case"object":break;default:return}const t=Us(e);if(typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams||t==="[object URLSearchParams]")return e.toString();if(typeof FormData!="undefined"&&e instanceof FormData||t==="[object FormData]")return yx(e);if(typeof Blob!="undefined"&&e instanceof Blob||t==="[object Blob]"||t==="[object File]")return gg(e);if(gx(e)||ArrayBuffer.isView(e))return bx(e);if(!(typeof ReadableStream!="undefined"&&e instanceof ReadableStream||t==="[object ReadableStream]")){if(typeof Document!="undefined"&&e instanceof Document)try{return new XMLSerializer().serializeToString(e)}catch(r){return}try{return Rt(e)}catch(r){return}}},Gu=new WeakMap,vx=e=>Gu.get(e),Sx=(e,t)=>z(this,null,function*(){const r=e.getReader(),n=[];let i=0;for(;i<t;){const{done:s,value:o}=yield r.read();if(s)return{chunks:n,byteLength:i,truncated:!1};const l=t-i,u=o.byteLength>l?o.subarray(0,l):o;n.push(u),i+=u.byteLength}return r.cancel().catch(()=>{}),{chunks:n,byteLength:i,truncated:!0}}),wx=({chunks:e,byteLength:t})=>{const r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.byteLength;return r},Rx=e=>{const t=new TextDecoder("utf-8",{fatal:!0});try{let r="";for(const n of e.chunks)r+=t.decode(n,{stream:!0});return e.truncated?r:r+t.decode()}catch(r){return`[binary size${e.truncated?">":"="}${e.byteLength}]`}},Ds=e=>`[multipart/form-data size${e.truncated?">":"="}${e.byteLength}]`,_x=(e,t)=>{var i,s,o,l,u,a,h;const r=/;\s*boundary=(?:"([^"]*)"|([^;]*))/i.exec(t),n=(s=(i=r==null?void 0:r[1])!=null?i:r==null?void 0:r[2])==null?void 0:s.trim();if(!n)return Ds(e);try{const c=wx(e),f=new TextDecoder("windows-1252").decode(c),d=`--${n}`,p={};let m=f.indexOf(d);if(m===-1)return Ds(e);for(;m!==-1&&(m+=d.length,!f.startsWith("--",m));){const g=f.indexOf(`\r
|
|
461
|
+
`,Am(a,t),`To resolve the conflict:
|
|
462
|
+
`,Um(a,t))}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s},e}(),CZ=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,r,n,i){this._backingStorages.forEach(function(s){s.record(t,r,n,i)})},e}(),ZZ=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new Zr}return e.prototype.observe=function(t,r){if(r===void 0&&(r={}),typeof t!="number"){H.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===qt.INT&&!Number.isInteger(t)&&(H.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(r,t)},e}(),LZ=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,r,n){if(n===void 0&&(n={}),!!_u(t)){var i=this._buffer.get(t);if(i==null&&(i=new Zr,this._buffer.set(t,i)),typeof r!="number"){H.warn("non-number value provided to metric "+t._descriptor.name+": "+r);return}t._descriptor.valueType===qt.INT&&!Number.isInteger(r)&&(H.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||i.set(n,r)}},e}(),Eu=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Iu=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Dm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Fm=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},xZ=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,r){var n=this._findCallback(t,r);n>=0||this._callbacks.push({callback:t,instrument:r})},e.prototype.removeCallback=function(t,r){var n=this._findCallback(t,r);n<0||this._callbacks.splice(n,1)},e.prototype.addBatchCallback=function(t,r){var n=new Set(r.filter(_u));if(n.size===0){H.error("BatchObservableCallback is not associated with valid instruments",r);return}var i=this._findBatchCallback(t,n);i>=0||this._batchCallbacks.push({callback:t,instruments:n})},e.prototype.removeBatchCallback=function(t,r){var n=new Set(r.filter(_u)),i=this._findBatchCallback(t,n);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,r){return Eu(this,void 0,void 0,function(){var n,i,s,o;return Iu(this,function(l){switch(l.label){case 0:return n=this._observeCallbacks(t,r),i=this._observeBatchCallbacks(t,r),[4,pC(Fm(Fm([],Dm(n),!1),Dm(i),!1))];case 1:return s=l.sent(),o=s.filter(mC).map(function(u){return u.reason}),[2,o]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(i){var s=i.callback,o=i.instrument;return Eu(n,void 0,void 0,function(){var l,u;return Iu(this,function(a){switch(a.label){case 0:return l=new ZZ(o._descriptor.name,o._descriptor.valueType),u=Promise.resolve(s(l)),r!=null&&(u=Bn(u,r)),[4,u];case 1:return a.sent(),o._metricStorages.forEach(function(h){h.record(l._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,r){var n=this;return this._batchCallbacks.map(function(i){var s=i.callback,o=i.instruments;return Eu(n,void 0,void 0,function(){var l,u;return Iu(this,function(a){switch(a.label){case 0:return l=new LZ,u=Promise.resolve(s(l)),r!=null&&(u=Bn(u,r)),[4,u];case 1:return a.sent(),o.forEach(function(h){var c=l._buffer.get(h);c!=null&&h._metricStorages.forEach(function(f){f.record(c,t)})}),[2]}})})})},e.prototype._findCallback=function(t,r){return this._callbacks.findIndex(function(n){return n.callback===t&&n.instrument===r})},e.prototype._findBatchCallback=function(t,r){return this._batchCallbacks.findIndex(function(n){return n.callback===t&&gC(n.instruments,r)})},e}(),NZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),OZ=function(e){NZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Wm(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Mm(n,s),l}return t.prototype.record=function(r,n,i,s){n=this._attributesProcessor.process(n,i),this._deltaMetricStorage.record(r,n,i,s)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(km),Jm=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cu=function(){function e(){}return e.Noop=function(){return VZ},e}(),GZ=function(e){Jm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(Cu);(function(e){Jm(t,e);function t(r){var n=e.call(this)||this;return n._allowedAttributeNames=r,n}return t.prototype.process=function(r,n){var i=this,s={};return Object.keys(r).filter(function(o){return i._allowedAttributeNames.includes(o)}).forEach(function(o){return s[o]=r[o]}),s},t})(Cu);var VZ=new GZ,kZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},XZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},WZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},PZ=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new IZ,this.observableRegistry=new xZ,this.meter=new pZ(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,OZ);return r.length===1?r[0]:new CZ(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,wZ);return r},e.prototype.collect=function(t,r,n){return kZ(this,void 0,void 0,function(){var i,s,o;return XZ(this,function(l){switch(l.label){case 0:return[4,this.observableRegistry.observe(r,n==null?void 0:n.timeoutMillis)];case 1:return i=l.sent(),s=this.metricStorageRegistry.getStorages(t),s.length===0?[2,null]:(o=s.map(function(u){return u.collect(t,r)}).filter(hC),o.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,r){var n=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),s=i.map(function(u){var a=SC(u,t),h=n.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(h!=null)return h;var c=u.aggregation.createAggregator(a),f=new r(a,c,u.attributesProcessor,n._meterProviderSharedState.metricCollectors,u.aggregationCardinalityLimit);return n.metricStorageRegistry.register(f),f});if(s.length===0){var o=this._meterProviderSharedState.selectAggregations(t.type),l=o.map(function(u){var a=WZ(u,2),h=a[0],c=a[1],f=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(h,t);if(f!=null)return f;var d=c.createAggregator(t),p=h.selectCardinalityLimit(t.type),m=new r(t,d,Cu.Noop(),[h],p);return n.metricStorageRegistry.registerForCollector(h,m),m});s=s.concat(l)}return s},e}(),MZ=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},AZ=function(){function e(t){this.resource=t,this.viewRegistry=new oZ,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=fC(t),n=this.meterSharedStates.get(r);return n==null&&(n=new PZ(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,i=[];try{for(var s=MZ(this.metricCollectors),o=s.next();!o.done;o=s.next()){var l=o.value;i.push([l,l.selectAggregation(t)])}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e}(),As=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Us=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},UZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},DZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},FZ=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return As(this,void 0,void 0,function(){var r,n,i,s,o=this;return Us(this,function(l){switch(l.label){case 0:return r=pt(Date.now()),n=[],i=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(function(u){return As(o,void 0,void 0,function(){var a;return Us(this,function(h){switch(h.label){case 0:return[4,u.collect(this,r,t)];case 1:return a=h.sent(),(a==null?void 0:a.scopeMetrics)!=null&&n.push(a.scopeMetrics),(a==null?void 0:a.errors)!=null&&i.push.apply(i,DZ([],UZ(a.errors),!1)),[2]}})})}),[4,Promise.all(s)];case 1:return l.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}]}})})},e.prototype.forceFlush=function(t){return As(this,void 0,void 0,function(){return Us(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return r.sent(),[2]}})})},e.prototype.shutdown=function(t){return As(this,void 0,void 0,function(){return Us(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return r.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var r,n,i;return(i=(n=(r=this._metricReader).selectCardinalityLimit)===null||n===void 0?void 0:n.call(r,t))!==null&&i!==void 0?i:2e3},e}(),Hm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Ym=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Bm=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function JZ(e,t){var r=t!=null?t:Un.empty();return e?Un.default().merge(r):r}var HZ=function(){function e(t){var r,n,i,s,o;if(this._shutdown=!1,this._sharedState=new AZ(JZ((o=t==null?void 0:t.mergeResourceWithDefaults)!==null&&o!==void 0?o:!0,t==null?void 0:t.resource)),(t==null?void 0:t.views)!=null&&t.views.length>0)try{for(var l=Bm(t.views),u=l.next();!u.done;u=l.next()){var a=u.value;this._sharedState.viewRegistry.addView(a)}}catch(d){r={error:d}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if((t==null?void 0:t.readers)!=null&&t.readers.length>0)try{for(var h=Bm(t.readers),c=h.next();!c.done;c=h.next()){var f=c.value;this.addMetricReader(f)}}catch(d){i={error:d}}finally{try{c&&!c.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(H.warn("A shutdown MeterProvider cannot provide a Meter"),t_()):this._sharedState.getMeterSharedState({name:t,version:r,schemaUrl:n.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var r=new FZ(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return Hm(this,void 0,void 0,function(){return Ym(this,function(r){switch(r.label){case 0:return this._shutdown?(H.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.shutdown(t)}))]);case 1:return r.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Hm(this,void 0,void 0,function(){return Ym(this,function(r){switch(r.label){case 0:return this._shutdown?(H.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(t)}))];case 1:return r.sent(),[2]}})})},e}(),jn;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(jn||(jn={}));var zm=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,r){this._delegate.export(t,r)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),YZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Km=function(e){YZ(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.name="OTLPExporterError",s.data=i,s.code=n,s}return t}(Error);function BZ(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function zZ(e){if(e!=null)return function(){return e}}function KZ(e,t,r){var n,i,s,o,l,u;return{timeoutMillis:BZ((i=(n=e.timeoutMillis)!==null&&n!==void 0?n:t.timeoutMillis)!==null&&i!==void 0?i:r.timeoutMillis),concurrencyLimit:(o=(s=e.concurrencyLimit)!==null&&s!==void 0?s:t.concurrencyLimit)!==null&&o!==void 0?o:r.concurrencyLimit,compression:(u=(l=e.compression)!==null&&l!==void 0?l:t.compression)!==null&&u!==void 0?u:r.compression}}function jZ(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var QZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},$Z=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},qZ=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var r=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var n=function(){var i=r._sendingPromises.indexOf(t);r._sendingPromises.splice(i,1)};t.then(n,n)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return QZ(this,void 0,void 0,function(){return $Z(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function eL(e){return new qZ(e.concurrencyLimit)}function tL(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function rL(){return{handleResponse:function(e){e==null||!tL(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||H.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var nL=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},iL=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},sL=function(){function e(t,r,n,i,s){this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=s,this._diagLogger=H.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,r){var n=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){r({code:Ie.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){r({code:Ie.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(s){if(s.status==="success"){if(s.data!=null)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(s.data))}catch(o){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",o,s.data)}r({code:Ie.SUCCESS});return}else if(s.status==="failure"&&s.error){r({code:Ie.FAILED,error:s.error});return}else s.status==="retryable"?r({code:Ie.FAILED,error:new Km("Export failed with retryable status")}):r({code:Ie.FAILED,error:new Km("Export failed with unknown error")})},function(s){return r({code:Ie.FAILED,error:s})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return nL(this,void 0,void 0,function(){return iL(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function oL(e,t){return new sL(e.transport,e.serializer,rL(),e.promiseHandler,t.timeout)}function jm(e,t,r){return oL({transport:r,serializer:t,promiseHandler:eL(e)},{timeout:e.timeoutMillis})}var aL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zu=function(){return Ct.CUMULATIVE},Qm=function(e){switch(e){case oe.COUNTER:case oe.OBSERVABLE_COUNTER:case oe.GAUGE:case oe.HISTOGRAM:case oe.OBSERVABLE_GAUGE:return Ct.DELTA;case oe.UP_DOWN_COUNTER:case oe.OBSERVABLE_UP_DOWN_COUNTER:return Ct.CUMULATIVE}},$m=function(e){switch(e){case oe.COUNTER:case oe.HISTOGRAM:return Ct.DELTA;case oe.GAUGE:case oe.UP_DOWN_COUNTER:case oe.OBSERVABLE_UP_DOWN_COUNTER:case oe.OBSERVABLE_COUNTER:case oe.OBSERVABLE_GAUGE:return Ct.CUMULATIVE}};function lL(){var e=jr(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?Zu:t==="delta"?Qm:t==="lowmemory"?$m:(H.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Zu)}function uL(e){return e!=null?e===jn.DELTA?Qm:e===jn.LOWMEMORY?$m:Zu:lL()}function cL(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Jt.Default()}}var dL=function(e){aL(t,e);function t(r,n){var i=e.call(this,r)||this;return i._aggregationSelector=cL(n),i._aggregationTemporalitySelector=uL(n==null?void 0:n.temporalityPreference),i}return t.prototype.selectAggregation=function(r){return this._aggregationSelector(r)},t.prototype.selectAggregationTemporality=function(r){return this._aggregationTemporalitySelector(r)},t}(zm);function qm(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function hL(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function eg(e){var t=qm(e);return hL(t)}function fL(e){var t=qm(e);return t.toString()}var pL=typeof BigInt!="undefined"?fL:At;function tg(e){return e}function rg(e){if(e!==void 0)return kl(e)}var mL={encodeHrTime:eg,encodeSpanContext:kl,encodeOptionalSpanContext:rg};function ng(e){var t,r;if(e===void 0)return mL;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?eg:pL,encodeSpanContext:i?tg:kl,encodeOptionalSpanContext:i?tg:rg}}var gL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function ig(e){return{attributes:Lr(e.attributes),droppedAttributesCount:0}}function sg(e){return{name:e.name,version:e.version}}function Lr(e){return Object.keys(e).map(function(t){return og(t,e[t])})}function og(e,t){return{key:e,value:ag(t)}}function ag(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(ag)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=gL(r,2),i=n[0],s=n[1];return og(i,s)})}}:{}}function yL(e,t){var r=ng(t);return{resource:ig(e.resource),schemaUrl:void 0,scopeMetrics:bL(e.scopeMetrics,r)}}function bL(e,t){return Array.from(e.map(function(r){return{scope:sg(r.scope),metrics:r.metrics.map(function(n){return vL(n,t)}),schemaUrl:r.scope.schemaUrl}}))}function vL(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=RL(e.aggregationTemporality);switch(e.dataPointType){case Gt.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:lg(e,t)};break;case Gt.GAUGE:r.gauge={dataPoints:lg(e,t)};break;case Gt.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:wL(e,t)};break;case Gt.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:_L(e,t)};break}return r}function SL(e,t,r){var n={attributes:Lr(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case qt.INT:n.asInt=e.value;break;case qt.DOUBLE:n.asDouble=e.value;break}return n}function lg(e,t){return e.dataPoints.map(function(r){return SL(r,e.descriptor.valueType,t)})}function wL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Lr(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function _L(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Lr(r.attributes),count:n.count,min:n.min,max:n.max,sum:n.sum,positive:{offset:n.positive.offset,bucketCounts:n.positive.bucketCounts},negative:{offset:n.negative.offset,bucketCounts:n.negative.bucketCounts},scale:n.scale,zeroCount:n.zeroCount,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function RL(e){switch(e){case Ct.DELTA:return 1;case Ct.CUMULATIVE:return 2}}function TL(e,t){return{resourceMetrics:e.map(function(r){return yL(r,t)})}}var EL=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},IL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function CL(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Lr(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(s){return LL(s,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(s){return ZL(s,t)}),droppedLinksCount:e.droppedLinksCount}}function ZL(e,t){var r;return{attributes:e.attributes?Lr(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function LL(e,t){return{attributes:e.attributes?Lr(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function xL(e,t){var r=ng(t);return{resourceSpans:OL(e,r)}}function NL(e){var t,r,n=new Map;try{for(var i=EL(e),s=i.next();!s.done;s=i.next()){var o=s.value,l=n.get(o.resource);l||(l=new Map,n.set(o.resource,l));var u=o.instrumentationLibrary.name+"@"+(o.instrumentationLibrary.version||"")+":"+(o.instrumentationLibrary.schemaUrl||""),a=l.get(u);a||(a=[],l.set(u,a)),a.push(o)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function OL(e,t){for(var r=NL(e),n=[],i=r.entries(),s=i.next();!s.done;){for(var o=IL(s.value,2),l=o[0],u=o[1],a=[],h=u.values(),c=h.next();!c.done;){var f=c.value;if(f.length>0){var d=f.map(function(m){return CL(m,t)});a.push({scope:sg(f[0].instrumentationLibrary),spans:d,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}c=h.next()}var p={resource:ig(l),scopeSpans:a,schemaUrl:void 0};n.push(p),s=i.next()}return n}var ug={serializeRequest:function(e){var t=TL([e],{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},cg={serializeRequest:function(e){var t=xL(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},GL=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},VL=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},kL=5,XL=1e3,WL=5e3,PL=1.5,dg=.2;function ML(){return Math.random()*(2*dg)-dg}var AL=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,r,n){var i=this;return new Promise(function(s,o){setTimeout(function(){i._transport.send(t,r).then(s,o)},n)})},e.prototype.send=function(t,r){var n;return GL(this,void 0,void 0,function(){var i,s,o,l,u,a,h;return VL(this,function(c){switch(c.label){case 0:return i=Date.now()+r,[4,this._transport.send(t,r)];case 1:s=c.sent(),o=kL,l=XL,c.label=2;case 2:return s.status==="retryable"&&o>0?(o--,u=Math.max(Math.min(l,WL)+ML(),0),l=l*PL,a=(n=s.retryInMillis)!==null&&n!==void 0?n:u,h=i-Date.now(),a>h?[2,s]:[4,this.retry(t,h,a)]):[3,4];case 3:return s=c.sent(),[3,2];case 4:return[2,s]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function hg(e){return new AL(e.transport)}function UL(e){var t=[429,502,503,504];return t.includes(e)}function DL(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}var FL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},JL=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,r){var n=this;return new Promise(function(i){var s=new XMLHttpRequest;s.timeout=r,s.open("POST",n._parameters.url);var o=n._parameters.headers();Object.entries(o).forEach(function(l){var u=FL(l,2),a=u[0],h=u[1];s.setRequestHeader(a,h)}),s.ontimeout=function(l){i({status:"failure",error:new Error("XHR request timed out")})},s.onreadystatechange=function(){s.status>=200&&s.status<=299?(H.debug("XHR success"),i({status:"success"})):s.status&&UL(s.status)?i({status:"retryable",retryInMillis:DL(s.getResponseHeader("Retry-After"))}):s.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},s.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},s.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},s.send(t)})},e.prototype.shutdown=function(){},e}();function HL(e){return new JL(e)}var YL=function(){function e(t){this._params=t}return e.prototype.send=function(t){var r=this;return new Promise(function(n){navigator.sendBeacon(r._params.url,new Blob([t],{type:r._params.blobType}))?(H.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function BL(e){return new YL(e)}function zL(e,t){return jm(e,t,hg({transport:HL(e)}))}function KL(e,t){return jm(e,t,hg({transport:BL({url:e.url,blobType:e.headers()["Content-Type"]})}))}var jL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function QL(e){return function(){var t,r={};return Object.entries((t=e==null?void 0:e())!==null&&t!==void 0?t:{}).forEach(function(n){var i=jL(n,2),s=i[0],o=i[1];typeof o!="undefined"?r[s]=String(o):H.warn('Header "'+s+'" has invalid value ('+o+") and will be ignored")}),r}}var xr=function(){return xr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},xr.apply(this,arguments)};function $L(e,t,r){var n=xr({},r()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,n)}}function qL(e){if(e!=null)try{return new URL(e),e}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function ex(e,t,r){var n,i,s,o;return xr(xr({},KZ(e,t,r)),{headers:$L(QL(e.headers),t.headers,r.headers),url:(i=(n=qL(e.url))!==null&&n!==void 0?n:t.url)!==null&&i!==void 0?i:r.url,agentOptions:(o=(s=e.agentOptions)!==null&&s!==void 0?s:t.agentOptions)!==null&&o!==void 0?o:r.agentOptions})}function tx(e,t){return xr(xr({},jZ()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function rx(e,t,r){return ex({url:e.url,timeoutMillis:e.timeoutMillis,headers:zZ(e.headers),concurrencyLimit:e.concurrencyLimit},{},tx(r,t))}function fg(e,t,r,n){var i=!!e.headers||typeof navigator.sendBeacon!="function",s=rx(e,r,n);return i?zL(s,t):KL(s,t)}var nx=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ix=function(e){nx(t,e);function t(r){return e.call(this,fg(r!=null?r:{},ug,"v1/metrics",{"Content-Type":"application/json"}),r)||this}return t}(dL),sx=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ox=function(e){sx(t,e);function t(r){return r===void 0&&(r={}),e.call(this,fg(r,cg,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(zm),pg=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(pg||{});const Lu=3,xu=1e3,Nu=500,ax=[pg.BillingQuotaExceeded.toString()],lx=e=>{var r;return((r=e.response.errors)==null?void 0:r.find(n=>ax.includes(n.message)))===void 0},Ou=()=>{const e=(t,r,n,i,s=0)=>z(this,null,function*(){try{return yield t()}catch(o){if(o instanceof Mr&&!lx(o))throw o;if(s<Lu)return yield new Promise(l=>setTimeout(l,xu+Nu*Math.pow(2,s))),yield e(t,r,n,i,s+1);throw Re("error",`highlight.io: data request failed after ${s} retries`),o}});return e};function ux(e,t){const r=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>r,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:dp(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function cx(e,t){if(!t.isSamplingEnabled())return e;const r=[],n={},i={};for(const s of e){s.parentSpanId&&(i[s.parentSpanId]=i[s.parentSpanId]||[],i[s.parentSpanId].push(s.spanContext().spanId));const o=t.shouldSample(s);o.sample?o.attributes?n[s.spanContext().spanId]=ux(s,o.attributes):n[s.spanContext().spanId]=s:r.push(s.spanContext().spanId)}for(;r.length>0;){const s=r.shift(),o=i[s];if(o)for(const l of o)delete n[l],r.push(l)}return Object.values(n)}const dx=(e,t,r)=>{if(typeof navigator=="undefined"||!navigator.sendBeacon)return!1;try{const n=new Blob([t],{type:r});return navigator.sendBeacon(e,n)}catch(n){return!1}},mg=(e,t,r,n)=>{const i=s=>{if(dx(e,t,r))return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:s})};try{const s=new Blob([t],{type:r});fetch(e,{method:"POST",body:s,keepalive:!0,headers:{"Content-Type":r},credentials:"omit"}).then(o=>{if(o.ok)return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:new Error(`keepalive fetch export failed with status ${o.status}`)})},o=>i(o))}catch(s){i(s)}};class hx extends ox{constructor(r,n){var i;super(Y(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.sampler=n,this.url=(i=r==null?void 0:r.url)!=null?i:""}setUnloading(r){this.unloading=r}export(r,n){const i=cx(r,this.sampler);if(i.length===0)return n({code:Ie.SUCCESS});if(this.unloading){const l=cg.serializeRequest(i);if(!l||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});mg(this.url,l,"application/json",n);return}let s=0;const o=l=>{if(l.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(s++,s>Lu)return n({code:Ie.FAILED,error:l.error});new Promise(u=>setTimeout(u,xu+Nu*Math.pow(2,s))).then(()=>{super.export(i,o)})};super.export(i,o)}}class fx extends ix{constructor(r){var n;super(Y(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.url=(n=r==null?void 0:r.url)!=null?n:""}setUnloading(r){this.unloading=r}export(r,n){if(this.unloading){const o=ug.serializeRequest(r);if(!o||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});mg(this.url,o,"application/json",n);return}let i=0;const s=o=>{var l;if(o.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(i++,i>Lu)return Re("error",`[@launchdarkly/observability] failed to export OTeL metrics: ${(l=o.error)==null?void 0:l.message}`,o.error),n({code:Ie.FAILED,error:o.error});new Promise(u=>setTimeout(u,xu+Nu*Math.pow(2,i))).then(()=>{var u;Re("warn",`[@launchdarkly/observability] retry ${i}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(r,s)})};super.export(r,s)}}const px="OT_ZONE_CONTEXT",mx="Navigation:";function gx(){return!1}const kt=class kt extends An{constructor(r={}){var n,i;super(kt.moduleName,kt.version,r);L(this,"_spansData",new WeakMap);L(this,"_zonePatched");L(this,"_wrappedListeners",new WeakMap);L(this,"_eventsSpanMap",new WeakMap);L(this,"_eventNames");L(this,"_shouldPreventSpanCreation");this._eventNames=new Set((n=r==null?void 0:r.eventNames)!=null?n:[]),((i=r.productAnalyticsEvents)==null?void 0:i.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof(r==null?void 0:r.shouldPreventSpanCreation)=="function"?r.shouldPreventSpanCreation:gx}init(){}_checkForTimeout(r,n){const i=this._spansData.get(n);i&&(r.source==="setTimeout"?i.hrTimeLastTimeout=Sr():r.source!=="Promise.then"&&r.source!=="setTimeout"&&(i.hrTimeLastTimeout=void 0))}_allowEventName(r){return this._eventNames.has(r)}_createSpan(r,n){var l;const i=r==null?void 0:r.target,s=r==null?void 0:r.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(s))return;const o=Pp(i,!0);try{const u=this.tracer.startSpan(s,{attributes:{[nr]:window.location.href,"event.type":s,"event.tag":i.tagName,"event.xpath":o,"event.id":i.id,"event.classname":i.className,"event.text":(l=i.textContent)!=null?l:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?we.setSpan(me.active(),n):void 0);return r instanceof MouseEvent&&(u.setAttribute("event.x",r.clientX),u.setAttribute("event.y",r.clientY),u.setAttribute("event.relativeX",r.clientX/window.innerWidth),u.setAttribute("event.relativeY",r.clientY/window.innerHeight),s==="scroll"&&(u.setAttribute("event.scrollX",window.scrollX),u.setAttribute("event.scrollY",window.scrollY))),this._shouldPreventSpanCreation(s,i,u)===!0?void 0:(this._spansData.set(u,{taskCount:0}),u)}catch(u){this._diag.error("failed to start create new user interaction span",u)}}_decrementTask(r){const n=this._spansData.get(r);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(r,n.hrTimeLastTimeout))}_getCurrentSpan(r){const n=r.get(px);return n&&we.getSpan(n)}_incrementTask(r){const n=this._spansData.get(r);n&&n.taskCount++}addPatchedListener(r,n,i,s){let o=this._wrappedListeners.get(i);o||(o=new Map,this._wrappedListeners.set(i,o));let l=o.get(n);return l||(l=new Map,o.set(n,l)),l.has(r)?!1:(l.set(r,s),!0)}removePatchedListener(r,n,i){const s=this._wrappedListeners.get(i);if(!s)return;const o=s.get(n);if(!o)return;const l=o.get(r);return l&&(o.delete(r),o.size===0&&(s.delete(n),s.size===0&&this._wrappedListeners.delete(i))),l}_invokeListener(r,n,i){return typeof r=="function"?r.apply(n,i):r.handleEvent(i[0])}_patchAddEventListener(){const r=this;let n=new Map;return i=>function(o,l,u){if(!l)return i.call(this,o,l,u);const a=u&&typeof u=="object"&&u.once,h=function(...c){var m;a&&r.removePatchedListener(this,o,l);let f;const d=c[0];if(!(d!=null&&d.type))return r._invokeListener(l,this,c);if(Date.now()-((m=n.get(d.type))!=null?m:0)<1e3/60)return r._invokeListener(l,this,c);n.set(d.type,Date.now()),d&&(f=r._eventsSpanMap.get(d));const p=r._createSpan(d,f);return p?(d&&r._eventsSpanMap.set(d,p),me.with(we.setSpan(me.active(),p),()=>{const g=r._invokeListener(l,this,c);return p.end(),g})):r._invokeListener(l,this,c)};if(r.addPatchedListener(this,o,l,h))return i.call(this,o,h,u)}}_patchRemoveEventListener(){const r=this;return n=>function(s,o,l){const u=r.removePatchedListener(this,s,o);return u?n.call(this,s,u,l):n.call(this,s,o,l)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const r=this;return n=>function(...s){const o=`${location.pathname}${location.hash}${location.search}`,l=n.apply(this,s),u=`${location.pathname}${location.hash}${location.search}`;return o!==u&&r._updateInteractionName(u),l}}_unpatchHistoryApi(){Ae(history.replaceState)&&this._unwrap(history,"replaceState"),Ae(history.pushState)&&this._unwrap(history,"pushState"),Ae(history.back)&&this._unwrap(history,"back"),Ae(history.forward)&&this._unwrap(history,"forward"),Ae(history.go)&&this._unwrap(history,"go")}_updateInteractionName(r){const n=we.getSpan(me.active());n&&typeof n.updateName=="function"&&n.updateName(`${mx} ${r}`)}_patchZoneCancelTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&r._decrementTask(l),n.call(this,s)}}_patchZoneScheduleTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&(r._incrementTask(l),r._checkForTimeout(s,l)),n.call(this,s)}}_patchZoneRunTask(){const r=this;return n=>function(s,o,l){const u=Array.isArray(l)&&l[0]instanceof Event?l[0]:void 0,a=u==null?void 0:u.target;let h;const c=this;if(a){if(h=r._createSpan(u),h)return r._incrementTask(h),c.run(()=>{try{return me.with(we.setSpan(me.active(),h),()=>{const f=Zone.current;return s._zone=f,n.call(f,s,o,l)})}finally{r._decrementTask(h)}})}else h=r._getCurrentSpan(c);try{return n.call(c,s,o,l)}finally{h&&r._shouldCountTask(s,c)&&r._decrementTask(h)}}}_shouldCountTask(r,n){if(r._zone&&(n=r._zone),!n||!r.data||r.data.isPeriodic)return!1;const i=this._getCurrentSpan(n);return!i||!this._spansData.get(i)?!1:r.type==="macroTask"||r.type==="microTask"}_tryToEndSpan(r,n){r&&this._spansData.get(r)&&(r.end(n),this._spansData.delete(r))}enable(){const r=this._getZoneWithPrototype();this._diag.debug("applying patch to",kt.moduleName,kt.version,"zone:",!!r),r?(Ae(r.prototype.runTask)&&(this._unwrap(r.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),Ae(r.prototype.scheduleTask)&&(this._unwrap(r.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),Ae(r.prototype.cancelTask)&&(this._unwrap(r.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(r.prototype,"runTask",this._patchZoneRunTask()),this._wrap(r.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(r.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&(this._unwrap(i,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),Ae(i.removeEventListener)&&(this._unwrap(i,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(i,"addEventListener",this._patchAddEventListener()),this._wrap(i,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const r=this._getZoneWithPrototype();this._diag.debug("removing patch from",kt.moduleName,kt.version,"zone:",!!r),r&&this._zonePatched?(Ae(r.prototype.runTask)&&this._unwrap(r.prototype,"runTask"),Ae(r.prototype.scheduleTask)&&this._unwrap(r.prototype,"scheduleTask"),Ae(r.prototype.cancelTask)&&this._unwrap(r.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&this._unwrap(i,"addEventListener"),Ae(i.removeEventListener)&&this._unwrap(i,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};L(kt,"version","0.1.1"),L(kt,"moduleName","user-interaction");let Gu=kt;const yx=e=>{if(typeof XMLHttpRequest=="undefined")return()=>{};const t=XMLHttpRequest.prototype,r=t.open,n=t.setRequestHeader,i=t.send,s=a=>!!a&&e.some(h=>a.toLowerCase().includes(h)),o=function(a,h){return this._method=a,this._url=typeof h=="string"?h:String(h),this._requestHeaders={},this._body=void 0,r.apply(this,arguments)},l=function(a,h){return this._requestHeaders||(this._requestHeaders={}),this._requestHeaders[a]=h,n.apply(this,arguments)},u=function(a){if(this._body===void 0&&a!==void 0&&a!==null&&!s(this._url)){const h=uu(a,this._url);h&&(this._body=h)}return i.apply(this,arguments)};return t.open=o,t.setRequestHeader=l,t.send=u,()=>{t.open===o&&(t.open=r),t.setRequestHeader===l&&(t.setRequestHeader=n),t.send===u&&(t.send=i)}},bx=256*1024,vx=e=>!!e&&e.split(";")[0].trim().toLowerCase()==="multipart/form-data",gg=e=>{if(!e||typeof e!="object")return{};if(typeof Headers!="undefined"&&e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))try{return Object.fromEntries(new Headers(e).entries())}catch(t){return Object.fromEntries(e.map(([r,n])=>[String(r),String(n)]))}return x({},e)},Ds=e=>Object.prototype.toString.call(e),Sx=e=>typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer||Ds(e)==="[object ArrayBuffer]"||Ds(e)==="[object SharedArrayBuffer]",yg=e=>{if(typeof File!="undefined"&&e instanceof File||Ds(e)==="[object File]"){const t=e;return`[File name="${t.name}" type="${t.type}" size=${t.size}]`}return`[Blob type="${e.type}" size=${e.size}]`},Vu=(e,t,r)=>{const n=e[t];n===void 0?e[t]=r:Array.isArray(n)?n.push(r):e[t]=[n,r]},wx=e=>{const t={};return e.forEach((r,n)=>{Vu(t,n,typeof r=="string"?r:yg(r))}),JSON.stringify(t)},_x=e=>{const t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);if(t.byteLength>bx)return`[binary size=${t.byteLength}]`;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch(r){return`[binary size=${t.byteLength}]`}},bg=e=>{if(e==null)return;switch(typeof e){case"string":return e;case"number":case"boolean":case"bigint":return String(e);case"object":break;default:return}const t=Ds(e);if(typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams||t==="[object URLSearchParams]")return e.toString();if(typeof FormData!="undefined"&&e instanceof FormData||t==="[object FormData]")return wx(e);if(typeof Blob!="undefined"&&e instanceof Blob||t==="[object Blob]"||t==="[object File]")return yg(e);if(Sx(e)||ArrayBuffer.isView(e))return _x(e);if(!(typeof ReadableStream!="undefined"&&e instanceof ReadableStream||t==="[object ReadableStream]")){if(typeof Document!="undefined"&&e instanceof Document)try{return new XMLSerializer().serializeToString(e)}catch(r){return}try{return _t(e)}catch(r){return}}},ku=new WeakMap,Rx=e=>ku.get(e),Tx=(e,t)=>z(this,null,function*(){const r=e.getReader(),n=[];let i=0;for(;i<t;){const{done:s,value:o}=yield r.read();if(s)return{chunks:n,byteLength:i,truncated:!1};const l=t-i,u=o.byteLength>l?o.subarray(0,l):o;n.push(u),i+=u.byteLength}return r.cancel().catch(()=>{}),{chunks:n,byteLength:i,truncated:!0}}),Ex=({chunks:e,byteLength:t})=>{const r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.byteLength;return r},Ix=e=>{const t=new TextDecoder("utf-8",{fatal:!0});try{let r="";for(const n of e.chunks)r+=t.decode(n,{stream:!0});return e.truncated?r:r+t.decode()}catch(r){return`[binary size${e.truncated?">":"="}${e.byteLength}]`}},Fs=e=>`[multipart/form-data size${e.truncated?">":"="}${e.byteLength}]`,Cx=(e,t)=>{var i,s,o,l,u,a,h;const r=/;\s*boundary=(?:"([^"]*)"|([^;]*))/i.exec(t),n=(s=(i=r==null?void 0:r[1])!=null?i:r==null?void 0:r[2])==null?void 0:s.trim();if(!n)return Fs(e);try{const c=Ex(e),f=new TextDecoder("windows-1252").decode(c),d=`--${n}`,p={};let m=f.indexOf(d);if(m===-1)return Fs(e);for(;m!==-1&&(m+=d.length,!f.startsWith("--",m));){const g=f.indexOf(`\r
|
|
463
463
|
`,m),v=g===-1?-1:f.indexOf(`\r
|
|
464
464
|
\r
|
|
465
|
-
`,g);if(v===-1)break;const y=new TextDecoder().decode(c.subarray(g+2,v)),w=v+4,
|
|
466
|
-
${d}`,w),S=_===-1,b=S?f.length:_,R=(o=/\bname="([^"]*)"/i.exec(y))==null?void 0:o[1];if(R!==void 0){const I=(l=/\bfilename="([^"]*)"/i.exec(y))==null?void 0:l[1];if(I!==void 0){const E=(h=(a=(u=/^content-type:[ \t]*(.*)$/im.exec(y))==null?void 0:u[1])==null?void 0:a.trim())!=null?h:"",C=b-w;Ou(p,R,`[File name="${I}" type="${E}" size${S?">=":"="}${C}]`)}else Ou(p,R,new TextDecoder().decode(c.subarray(w,b)))}m=S?-1:_+2}return e.truncated&&Object.keys(p).length===0?Ds(e):JSON.stringify(p)}catch(c){return Ds(e)}},Tx=(e,t)=>{try{if(t&&t.body!==void 0&&t.body!==null)return Promise.resolve(yg(t.body));if(!e.body||e.bodyUsed)return Promise.resolve(void 0);const r=e.clone();if(!r.body)return Promise.resolve(void 0);const n=e.headers.get("content-type");return Sx(r.body,uu(e.headers)).then(i=>mx(n)?_x(i,n):Rx(i)).catch(()=>{})}catch(r){return Promise.resolve(void 0)}},Ex=(e=[])=>{if(typeof window=="undefined"||typeof window.fetch!="function"||typeof Request=="undefined")return()=>{};const t=i=>e.some(s=>i.toLowerCase().includes(s)),r=window.fetch,n=function(i,s){return i instanceof Request&&!Gu.has(i)&&!t(i.url)&&Gu.set(i,Tx(i,s)),r.call(this!=null?this:window,i,s)};return window.fetch=n,()=>{window.fetch===n&&(window.fetch=r)}};class Vu{constructor(t,r){L(this,"debug");L(this,"name");this.debug=t,this.name=r}prefix(){let t=`[${Date.now()}]`;return this.name&&(t+=` - ${this.name}`),t}log(...t){this.debug&&dl(()=>console.log.apply(console,[this.prefix(),...t]))}warn(...t){(this.debug||Ef())&&dl(()=>console.warn.apply(console,[this.prefix(),...t]))}}class ku{constructor(){L(this,"_sdk");L(this,"_isLoaded",!1);L(this,"_isReady",!1);L(this,"_callBuffer",[]);L(this,"_capacity",1e5);L(this,"_droppedEvents",0);L(this,"_exceededCapacity",!1);L(this,"_logger",new Vu);L(this,"_pendingStart");L(this,"_lastOp")}_bufferCall(t,r){if(this._isReady)return this._callSdk(t,r);this._enqueue({method:t,args:r})}_callSdk(t,r){try{return this._sdk[t](...r)}catch(n){Ge(`Error executing buffered call to ${t}:`,"error",n)}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,Ge("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t,{ready:r=!0,started:n}={}){this._sdk=t,this._isLoaded=!0;const i=this._pendingStart;this._pendingStart=void 0,r?(this.markReady(),n?this._queueOp("start",()=>z(this,null,function*(){yield n})).catch(o=>{Ge("Error starting the SDK","error",o)}).then(()=>i==null?void 0:i.resolve()):i==null||i.resolve()):i&&this._runPendingStart(i)}_runPendingStart(t){return z(this,null,function*(){try{yield this._start()}catch(r){Ge("Error starting the SDK","error",r)}t.resolve()})}_start(){var t;return this._isLoaded?((t=this._lastOp)==null?void 0:t.kind)==="start"?this._lastOp.promise:this._queueOp("start",()=>z(this,null,function*(){try{yield this._startSdk()}finally{this.markReady()}})):this._deferStart()}_stop(t){return this._isLoaded?this._queueOp("stop",()=>z(this,null,function*(){try{yield t()}catch(r){Ge("Error stopping the SDK","error",r)}})):(this._cancelPendingStart(),Promise.resolve())}_queueOp(t,r){var s;const n=(s=this._lastOp)==null?void 0:s.promise,i=(n?n.then(r,r):r()).finally(()=>{var o;((o=this._lastOp)==null?void 0:o.promise)===i&&(this._lastOp=void 0)});return this._lastOp={kind:t,promise:i},i}_startSdk(){return z(this,null,function*(){})}markReady(){if(!this._isReady){this._isReady=!0;for(const{method:t,args:r}of this._callBuffer)try{this._sdk[t](...r)}catch(n){Ge(`Error executing buffered call to ${t}:`,"error",n)}this._callBuffer=[]}}_deferStart(){if(!this._pendingStart){let t;const r=new Promise(n=>{t=n});this._pendingStart={promise:r,resolve:t}}return this._pendingStart.promise}_cancelPendingStart(){this._pendingStart&&(this._pendingStart.resolve(),this._pendingStart=void 0)}}const Ye="feature_flag",bg="launchdarkly",Xu="evaluation",Ix=`${Ye}.${Xu}`,vg=`${Ye}.set.id`,Sg=`${Ye}.key`,wg=`${Ye}.contextKeys`,Rg=`${Ye}.context.id`,_g=`${Ye}.result.value`,Wu=`${Ye}.provider.name`,Fs={kind:`${Ye}.result.reason.kind`,errorKind:`${Ye}.result.reason.errorKind`,ruleIndex:`${Ye}.result.reason.ruleIndex`,ruleId:`${Ye}.result.reason.ruleId`,prerequisiteKey:`${Ye}.result.reason.prerequisiteKey`,inExperiment:`${Ye}.result.reason.inExperiment`,bigSegmentsStatus:`${Ye}.result.reason.bigSegmentsStatus`},Tg=`${Ye}.result.variationIndex`,Eg=`${bg}.application.id`,Ig=`${bg}.application.version`,Cg="context.contextKeys",Cx="$ld:telemetry:session:init",Zg="$ld:telemetry:track",Zx="launchdarkly.track",Lx="page_view",xx="document_load",Nx="result.status";function Lg(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function xg(e){return e.kind==="multi"}function Nr(e){return xg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Lg(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Lg(e.key)}`:e.key}function Qn(e){return xg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,r)=>x(x({},t),r),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}function Ox(e,t,r){t.addHook({getMetadata:()=>({name:"highlight.run"}),afterIdentify:(n,i,s)=>{var l,u;const o=Y(x({},Qn(n.context)),{key:(u=(l=r==null?void 0:r.contextFriendlyName)==null?void 0:l.call(r,n.context))!=null?u:Nr(n.context)});return e.log("LD.identify","INFO",o),s.status==="completed"&&e.identify(o.key,o,"LaunchDarkly"),i},afterEvaluation:(n,i,s)=>{const o=x({[Wu]:"LaunchDarkly",[Sg]:n.flagKey,[_g]:JSON.stringify(s.value)},s.variationIndex!==void 0&&s.variationIndex!==null?{[Tg]:s.variationIndex}:{});if(s.reason)for(const l in Fs){const u=l,a=s.reason[u];a!=null&&(o[Fs[u]]=a)}return n.context&&(o[wg]=JSON.stringify(Qn(n.context)),o[Rg]=Nr(n.context)),e.startSpan(Xu,l=>{l&&l.addEvent(Ix,o)}),i}})}class Gx{constructor(t,r){L(this,"client");L(this,"metadata");this.client=t,this.metadata=r}getHooks(t){return[]}init(t){this.client.track(Cx,{sessionID:t})}recordGauge(t,r){}identify(t,r,n={},i){}error(t,r){}track(t,r){const n=r.event;this.client.track(n?`${Zg}:${n}`:Zg,Y(x({},r),{sessionID:t}))}}class Js extends ku{constructor(r,n){super();L(this,"client");this.client=new Gx(r,n)}getHooks(r){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,i,s)=>(this.load(this.client),i)}]}init(r){return this._bufferCall("init",[r])}recordGauge(r,n){return this._bufferCall("recordGauge",[r,n])}identify(r,n,i={},s){return this._bufferCall("identify",[r,n,i,s])}error(r,n){return this._bufferCall("error",[r,n])}track(r,n){return this._bufferCall("track",[r,n])}}const Pu=e=>{e(window.location.href);const t=history.pushState;history.pushState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),l})(history.pushState);const r=history.replaceState;history.replaceState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),l})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=r}},dn=class dn extends An{constructor(r={}){super(dn.moduleName,dn.version,r);L(this,"_unlisten");L(this,"_lastUrl","")}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Pu(r=>{const n=this._lastUrl;if(this._lastUrl=r,n!==r)try{this.tracer.startSpan(Lx,{attributes:{[nr]:r,"page_view.previous_url":n,"page_view.url":r}}).end()}catch(i){this._diag.error("failed to create page view span",i)}})}disable(){var r;(r=this._unlisten)==null||r.call(this),this._unlisten=void 0}};L(dn,"version","0.1.0"),L(dn,"moduleName","location-change");let Mu=dn;const Au={version:"1.5.0"}.version;let De={},Ht,Hs,Or,Gr;const Vr="highlight.record",Vx="highlight.session_id",kx="session.previous_id",Ys=new Map,Uu=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,Ng=(e,t,r,n)=>{var i,s,o,l,u;if(e)try{const a=(i=r.attributes)!=null?i:{},h=(o=(s=a[Mp])!=null?s:n==null?void 0:n.method)!=null?o:"",c=(u=(l=a[_r])!=null?l:n==null?void 0:n.url)!=null?u:"";e(r,{type:t,method:String(h).toUpperCase(),url:String(c)})}catch(a){console.warn("onHttpRequestSpan threw an error",a)}},Og="launchdarkly.js.log",Xx="launchdarkly.exception.id",Gg="launchdarkly.sampling.ratio",Vg="log.severity",kg="log.message",Xg=(e,t)=>{var g,v,y,w,_,S,b,R,I,E,C,O,V,q;if(De.tracerProvider||De.meterProvider){_e("warn","OTEL already initialized. Skipping...");return}Ht=e,Ef()&&H.setLogger({verbose:(...Z)=>_e("debug",...Z),debug:(...Z)=>_e("debug",...Z),info:(...Z)=>_e("info",...Z),warn:(...Z)=>_e("warn",...Z),error:(...Z)=>_e("error",...Z)},Ne.WARN);const r=e.backendUrl||void 0||"https://pub.highlight.io",n=[...(v=(g=e.networkRecordingOptions)==null?void 0:g.urlBlocklist)!=null?v:[],...Cf],i=[r,e.otlpEndpoint].filter(Z=>!!Z).map(Z=>Z.toLowerCase()),s=(y=e.environment)!=null?y:"production",o={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},l=new lx(o,t),u=new Bs(l,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:o.timeoutMillis,scheduledDelayMillis:5e3},()=>{var Z,T;return[(Z=e.getLDContextKeyAttributes)==null?void 0:Z.call(e),(T=e.getGlobalAttributes)==null?void 0:T.call(e)]}),a=new Un({[mE]:(w=e.serviceName)!=null?w:"highlight-browser",[gE]:e.serviceVersion,"deployment.environment.name":s,"highlight.project_id":e.projectId,[bE]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Au});De.tracerProvider=new zT({resource:a,mergeResourceWithDefaults:!0,spanProcessors:[u]}),we.setGlobalTracerProvider(De.tracerProvider);const h=Wx(o,e.otlpEndpoint+"/v1/metrics"),c=new tZ({exporter:h,exportIntervalMillis:o.timeoutMillis,exportTimeoutMillis:o.timeoutMillis});De.meterProvider=new UZ({resource:a,readers:[c]}),El.setGlobalMeterProvider(De.meterProvider);let f=[];if(((_=e.instrumentations)==null?void 0:_["@opentelemetry/instrumentation-document-load"])!==!1&&f.push(new RE({applyCustomAttributesOnSpan:{documentLoad:Ug,documentFetch:Ug,resourceFetch:jx}})),((S=e.instrumentations)==null?void 0:S["@opentelemetry/instrumentation-user-interaction"])!==!1&&f.push(new Nu({productAnalyticsEvents:e.productAnalyticsEvents})),((b=e.productAnalyticsEvents)==null?void 0:b.pageViews)!==!1&&f.push(new Mu),(R=e.networkRecordingOptions)!=null&&R.enabled){if(((I=e.instrumentations)==null?void 0:I["@opentelemetry/instrumentation-fetch"])!==!1){const W=new jE({propagateTraceHeaderCorsUrls:Fg(e.tracingOrigins),applyCustomAttributesOnSpan:(k,P,M)=>{var he;if(Ng(e.onHttpRequestSpan,"fetch",k,{method:P.method}),!k.attributes)return;const B=k;if(B.attributes[Vr]===!1)return;const $=typeof Request!="undefined"&&P instanceof Request,te=$?vx(P):void 0;Mg(k,$?void 0:P.body,P.headers,e.networkRecordingOptions);const N=()=>z(this,null,function*(){const ve=yield te;ve!==void 0&&Fx(k,ve,P.headers,e.networkRecordingOptions)}),ye=()=>{var ve;return(ve=e.networkRecordingOptions)!=null&&ve.requestResponseSanitizer&&Ag(k,e.networkRecordingOptions.requestResponseSanitizer),B.attributes[Vr]!==!1};if(!(M instanceof Response)){if(k.setAttributes({"http.response.error":M.message,[Ap]:M.status}),!ye())return;te&&Ys.set(Uu(k),N().then(()=>{ye()}));return}if(ye()&&(he=e.networkRecordingOptions)!=null&&he.recordHeadersAndBody){const ve=z(this,null,function*(){var re,K,se,ce,Ce;yield N();const U=yield fm(M,(re=e.networkRecordingOptions)==null?void 0:re.bodyKeysToRecord,(K=e.networkRecordingOptions)==null?void 0:K.networkBodyKeysToRedact),D=Object.fromEntries(M.headers.entries()),J=ts((ce=(se=e.networkRecordingOptions)==null?void 0:se.networkHeadersToRedact)!=null?ce:[],D,(Ce=e.networkRecordingOptions)==null?void 0:Ce.headerKeysToRecord),Q=Fu(J,"http.response.header");Object.assign(k.attributes,x({"http.response.body":U},Q)),ye()});Ys.set(Uu(k),ve)}}});f.push(W)}((E=e.instrumentations)==null?void 0:E["@opentelemetry/instrumentation-xml-http-request"])!==!1&&f.push(new vI({propagateTraceHeaderCorsUrls:Fg(e.tracingOrigins),applyCustomAttributesOnSpan:(W,k)=>{var B,$,te,N;const P=k;if(Ng(e.onHttpRequestSpan,"xhr",W,{method:P._method,url:P._url}),!(!W.attributes||W.attributes[Vr]===!1)){if(Mg(W,P._body,P._requestHeaders,e.networkRecordingOptions),(B=e.networkRecordingOptions)!=null&&B.recordHeadersAndBody){let ye="";(k.responseType===""||k.responseType==="text")&&(ye=Ot(k.responseText,($=e.networkRecordingOptions)==null?void 0:$.networkBodyKeysToRedact,(te=e.networkRecordingOptions)==null?void 0:te.bodyKeysToRecord,void 0));const he=Jx(k.getAllResponseHeaders());zx(W,he,ye,e.networkRecordingOptions)}(N=e.networkRecordingOptions)!=null&&N.requestResponseSanitizer&&Ag(W,e.networkRecordingOptions.requestResponseSanitizer)}}}))}cT({instrumentations:f}),(C=e.networkRecordingOptions)!=null&&C.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((O=e.instrumentations)==null?void 0:O["@opentelemetry/instrumentation-xml-http-request"])!==!1&&(Or==null||Or(),Or=fx([...n,...i])),(V=e.networkRecordingOptions)!=null&&V.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((q=e.instrumentations)==null?void 0:q["@opentelemetry/instrumentation-fetch"])!==!1&&(Gr==null||Gr(),Gr=Ex([...n,...i]));const m=new Vp;return m.enable(),De.tracerProvider.register({contextManager:m,propagator:new ep({propagators:[new Hf,new Ax({backendUrl:r,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:n})]})}),Hs=Px(l,h,u,()=>De),De},Wx=(e,t)=>new ux(Y(x({},e),{url:t,temporalityPreference:jn.DELTA})),Px=(e,t,r,n)=>{if(typeof document=="undefined"||typeof window=="undefined")return()=>{};const i=()=>{var u,a;e.setUnloading(!0),t.setUnloading(!0),r.setSkipPendingOnFlush(!0);const l=n();(u=l.tracerProvider)==null||u.forceFlush().catch(()=>{}),(a=l.meterProvider)==null||a.forceFlush().catch(()=>{})},s=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),r.setSkipPendingOnFlush(!1))},o=()=>i();return document.addEventListener("visibilitychange",s),window.addEventListener("pagehide",o),()=>{document.removeEventListener("visibilitychange",s),window.removeEventListener("pagehide",o)}},Mx=e=>{e.setAttribute(Vx,Nt());const t=kI();t&&e.setAttribute(kx,t)};class Bs extends Zp{constructor(r,n,i){super(r,n);L(this,"_pendingSpans",new Set);L(this,"_skipPendingOnFlush",!1);this._getDefaultAttributes=i}setSkipPendingOnFlush(r){this._skipPendingOnFlush=r}onStart(r,n){var i,s;Mx(r);for(const o of(s=(i=this._getDefaultAttributes)==null?void 0:i.call(this))!=null?s:[])for(const l in o)r.attributes[l]===void 0&&r.setAttribute(l,o[l]);super.onStart(r,n)}onEnd(r){if(r.attributes[Vr]===!1)return;PI();const n=Uu(r),i=Ys.get(n);if(i){const s=i.catch(o=>{_e("warn","[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{Ys.delete(n),this._pendingSpans.delete(s),r.attributes[Vr]!==!1&&super.onEnd(r)});this._pendingSpans.add(s);return}super.onEnd(r)}shutdown(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),_c(Bs.prototype,this,"shutdown").call(this)})}forceFlush(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),_c(Bs.prototype,this,"forceFlush").call(this)})}}class Ax extends ip{constructor(r){super();L(this,"highlightEndpoints");L(this,"tracingOrigins");L(this,"urlBlocklist");this.highlightEndpoints=[r.backendUrl,`${r.otlpEndpoint}/v1/traces`,`${r.otlpEndpoint}/v1/logs`,`${r.otlpEndpoint}/v1/metrics`],this.tracingOrigins=r.tracingOrigins,this.urlBlocklist=r.urlBlocklist}inject(r,n,i){var l;const s=we.getSpan(r);if(!s||!s.attributes)return;const o=Jg(s);typeof o=="string"&&(Kx(o,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||s.setAttribute(Vr,!1),!su(o,(l=this.tracingOrigins)!=null?l:[],this.urlBlocklist))||super.inject(r,n,i)}}const Wg="highlight-browser",Ux=Wg,zs=()=>{var e;return(e=De.tracerProvider)==null?void 0:e.getTracer(Wg)},or=()=>{var e;return(e=De.meterProvider)==null?void 0:e.getMeter(Ux)},Dx=()=>we.getActiveSpan(),Du=()=>z(this,null,function*(){Hs&&(Hs(),Hs=void 0),Or&&(Or(),Or=void 0),Gr&&(Gr(),Gr=void 0),yield Promise.allSettled([z(this,null,function*(){De.tracerProvider?(yield De.tracerProvider.shutdown(),De.tracerProvider=void 0):_e("warn","OTEL shutdown called without initialized tracerProvider.")}),z(this,null,function*(){De.meterProvider?(yield De.meterProvider.shutdown(),De.meterProvider=void 0):_e("warn","OTEL shutdown called without initialized meterProvider.")})])}),Pg=e=>{const t=SI(e),r={};return t!=null&&t.name&&(r["graphql.operation.name"]=t.name),t!=null&&t.type&&(r["graphql.operation.type"]=t.type),r},Fx=(e,t,r,n)=>{if(!e.attributes)return;const i=e.attributes;Object.assign(i,Pg(t)),n!=null&&n.recordHeadersAndBody&&Object.assign(i,{"http.request.body":Ot(t,n.networkBodyKeysToRedact,n.bodyKeysToRecord,mg(r))})},Mg=(e,t,r,n)=>{var h;if(!e.attributes)return;const s=Jg(e),o=ns(s),l=Zf(o),u=yg(t),a=mg(r);if(e.setAttributes(Pg(u!=null?u:t)),e.setAttributes({"highlight.type":"http.request",[_r]:o,[nr]:o,[_s]:l.pathname,[yE]:l.search}),e.setAttributes(Hx(l.searchParams,"url.query_params")),n!=null&&n.recordHeadersAndBody){u!==void 0&&e.setAttribute("http.request.body",Ot(u,n.networkBodyKeysToRedact,n.bodyKeysToRecord,a));const c=ts((h=n.networkHeadersToRedact)!=null?h:[],a,n.headerKeysToRecord),f=Fu(c,"http.request.header");e.setAttributes(f)}},Jx=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(r=>{const n=r.split(": "),i=n.shift();i&&(t[i]=n.join(": "))}),t},Fu=(e,t)=>{const r={};return Object.entries(e).forEach(([n,i])=>{const s=n.toLowerCase().replace(/_/g,"-"),o=`${t}.${s}`,l=Bx(s,i);if(r[o]){const u=r[o];Array.isArray(u)?r[o]=[...u,...l]:r[o]=[u,...l]}else r[o]=l.length===1?l[0]:l}),r},Hx=(e,t)=>{const r={};for(const[n,i]of e.entries()){const s=`${t}.${n}`,o=r[s];o===void 0?r[s]=i:Array.isArray(o)?o.push(i):r[s]=[o,i]}return r},Yx=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),Bx=(e,t)=>Yx.has(e)?t.split(",").map(r=>r.trim()).filter(r=>r.length>0):[t],zx=(e,t,r,n)=>{var o;e.setAttribute("http.response.body",r);const i=ts((o=n.networkHeadersToRedact)!=null?o:[],t,n.headerKeysToRecord),s=Fu(i,"http.response.header");e.setAttributes(s)},Ag=(e,t)=>{var c,f,d,p,m,g,v,y,w,_,S,b;const n=e.attributes,i={},s={};for(const[R,I]of Object.entries(n))R.startsWith("http.request.header.")&&(i[R.slice(20)]=String(I)),R.startsWith("http.response.header.")&&(s[R.slice(21)]=String(I));let l={request:{sessionSecureID:"",id:"",url:(f=(c=n[nr])!=null?c:n[_r])!=null?f:"",verb:(p=(d=n["http.request.method"])!=null?d:n[Mp])!=null?p:"GET",headers:i,body:(m=n["http.request.body"])!=null?m:""},response:{status:Number((v=(g=n[Ap])!=null?g:n[dE])!=null?v:0),headers:s,body:(y=n["http.response.body"])!=null?y:""},urlBlocked:!1},u=!0;try{l.request.body=JSON.parse(l.request.body)}catch(R){u=!1}let a=!0;try{l.response.body=JSON.parse(l.response.body)}catch(R){a=!1}let h;try{h=t(l)}catch(R){return}if(!h){Object.assign(e.attributes,{[Vr]:!1});return}u&&((w=h.request)!=null&&w.body)&&(h.request.body=JSON.stringify(h.request.body)),a&&((_=h.response)!=null&&_.body)&&(h.response.body=JSON.stringify(h.response.body)),Object.assign(e.attributes,{"http.request.body":(S=h.request.body)!=null?S:"","http.response.body":(b=h.response.body)!=null?b:""})},Kx=(e,t,r,n)=>n!=null&&n.some(s=>e.toLowerCase().includes(s))?!1:Gs(e,t),Ug=e=>{var s,o,l;if(!e.events)return;const r=e.events,n={unload:gt("unloadEventStart","unloadEventEnd",r),dom_interactive:gt("fetchStart","domInteractive",r),dom_content_loaded:gt("domContentLoadedEventStart","domContentLoadedEventEnd",r),dom_complete:gt("fetchStart","domComplete",r),load_event:gt("loadEventStart","loadEventEnd",r),document_load:gt("fetchStart","loadEventEnd",r),first_paint:gt("fetchStart","firstPaint",r),first_contentful_paint:gt("fetchStart","firstContentfulPaint",r),domain_lookup:gt("domainLookupStart","domainLookupEnd",r),connect:gt("connectStart","connectEnd",r),request:gt("requestStart","requestEnd",r),response:gt("responseStart","responseEnd",r)},i=(o=(s=Ht==null?void 0:Ht.getIntegrations)==null?void 0:s.call(Ht))!=null?o:[];if(n.document_load!==void 0)for(const u of i)u.recordGauge((l=Ht==null?void 0:Ht.sessionSecureId)!=null?l:"",{name:xx,value:n.document_load/1e6});Object.entries(n).forEach(([u,a])=>{a!==void 0&&(e.setAttribute(`timings.${u}.ns`,a),e.setAttribute(`timings.${u}.readable`,Dg(a)))})};function gt(e,t,r){const n=r.find(l=>l.name===e),i=r.find(l=>l.name===t);if(!n||!i)return;const s=n.time[0]*1e9+n.time[1];return i.time[0]*1e9+i.time[1]-s}const jx=(e,t)=>{const r={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e6,connect:(t.connectEnd-t.connectStart)*1e6,request:(t.responseEnd-t.requestStart)*1e6,response:(t.responseEnd-t.responseStart)*1e6};Object.entries(r).forEach(([n,i])=>{e.setAttribute(`timings.${n}.ns`,i),e.setAttribute(`timings.${n}.readable`,Dg(i))})},Dg=e=>{if(e>=36e11){const o=e/36e11;return`${Number(o.toFixed(1))}h`}else if(e>=6e10){const o=e/6e10;return`${Number(o.toFixed(1))}m`}else if(e>=1e9){const o=e/1e9;return`${Number(o.toFixed(1))}s`}else if(e>=1e6){const o=e/1e6;return`${Number(o.toFixed(1))}ms`}else if(e>=1e3){const o=e/1e3;return`${Number(o.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Fg=e=>e===!0?[/localhost/,/^\//,um(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,Jg=e=>e.attributes[nr]?e.attributes[nr]:e.attributes[_r],Qx=(e,t,r)=>{const n=window._highlightWebSocketRequestCallback;window._highlightWebSocketRequestCallback=e;const i=window._highlightWebSocketEventCallback;return window._highlightWebSocketEventCallback=s=>{const c=s,{message:o,size:l}=c,u=rt(c,["message","size"]),h=r.some(f=>s.name.toLowerCase().includes(f))?u:s;t(h)},()=>{window._highlightWebSocketRequestCallback=n,window._highlightWebSocketEventCallback=i}},$x=({xhrCallback:e,fetchCallback:t,webSocketRequestCallback:r,webSocketEventCallback:n,disableWebSocketRecording:i,bodyKeysToRedact:s,highlightEndpoints:o,tracingOrigins:l,urlBlocklist:u,bodyKeysToRecord:a})=>{const h=jI(e,o,l,u,s,a),c=tC(t,o,l,u,s,a),f=i?()=>{}:Qx(r,n,u);return()=>{h(),c(),f()}};class Yt{constructor(t){L(this,"disableConsoleRecording");L(this,"reportConsoleErrors");L(this,"enablePromisePatch");L(this,"consoleMethodsToRecord");L(this,"listeners");L(this,"errors");L(this,"messages");L(this,"options");L(this,"hasNetworkRecording",!0);L(this,"disableNetworkRecording");L(this,"enableRecordingNetworkContents");L(this,"xhrNetworkContents");L(this,"fetchNetworkContents");L(this,"disableRecordingWebSocketContents");L(this,"webSocketNetworkContents");L(this,"webSocketEventContents");L(this,"tracingOrigins");L(this,"networkHeadersToRedact");L(this,"networkBodyKeysToRedact");L(this,"networkBodyKeysToRecord");L(this,"networkHeaderKeysToRecord");L(this,"lastNetworkRequestTimestamp");L(this,"urlBlocklist");L(this,"highlightEndpoints");L(this,"requestResponseSanitizer");var r,n;this.options=t,this.disableConsoleRecording=!!t.disableConsoleRecording,this.reportConsoleErrors=(r=t.reportConsoleErrors)!=null?r:!1,this.enablePromisePatch=(n=t.enablePromisePatch)!=null?n:!1,this.consoleMethodsToRecord=t.consoleMethodsToRecord||[...il],this.listeners=[],this.errors=[],this.messages=[],this.lastNetworkRequestTimestamp=0}isListening(){return this.listeners.length>0}startListening(){if(this.isListening())return;const t=this;this.disableConsoleRecording||this.listeners.push(xf(r=>{var n,i,s;if(this.reportConsoleErrors&&(r.type==="Error"||r.type==="error")&&r.value&&r.trace){const o=Rt(r.value);if(ml.includes(o)||gl.some(l=>o.includes(l)))return;t.errors.push({event:o,type:"console.error",url:window.location.href,source:(n=r.trace[0])!=null&&n.fileName?r.trace[0].fileName:"",lineNumber:(i=r.trace[0])!=null&&i.lineNumber?r.trace[0].lineNumber:0,columnNumber:(s=r.trace[0])!=null&&s.columnNumber?r.trace[0].columnNumber:0,stackTrace:r.trace,timestamp:new Date().toISOString(),id:In()})}t.messages.push(r)},Y(x({},Lf),{level:this.consoleMethodsToRecord,recordLaunchDarklySdkLogs:this.options.recordLaunchDarklySdkLogs}))),this.listeners.push(Of(r=>{ml.includes(r.event)||gl.some(n=>r.event.includes(n))||t.errors.push(r)},{enablePromisePatch:this.enablePromisePatch})),this.listeners.push(Du),Yt.setupNetworkListener(this,this.options)}stopListening(){this.listeners.forEach(t=>t()),this.listeners=[]}static setupNetworkListener(t,r){var s,o,l,u,a,h,c,f,d,p,m,g;const n=(r==null?void 0:r.backendUrl)||void 0||"https://pub.highlight.io",i=r.otlpEndpoint||"https://otel.highlight.io";t.highlightEndpoints=[n,`${i}/v1/traces`,`${i}/v1/logs`,`${i}/v1/metrics`],t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],t.networkHeadersToRedact=[],t.urlBlocklist=[],t.tracingOrigins=r.tracingOrigins||[],(r==null?void 0:r.disableNetworkRecording)!==void 0?(t.disableNetworkRecording=r==null?void 0:r.disableNetworkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[],t.networkBodyKeysToRecord=[]):typeof(r==null?void 0:r.networkRecording)=="boolean"?(t.disableNetworkRecording=!r.networkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[]):(((s=r.networkRecording)==null?void 0:s.enabled)!==void 0?t.disableNetworkRecording=!r.networkRecording.enabled:t.disableNetworkRecording=!1,t.enableRecordingNetworkContents=((o=r.networkRecording)==null?void 0:o.recordHeadersAndBody)||!1,t.disableRecordingWebSocketContents=((l=r.networkRecording)==null?void 0:l.disableWebSocketEventRecordings)||!1,t.networkHeadersToRedact=((a=(u=r.networkRecording)==null?void 0:u.networkHeadersToRedact)==null?void 0:a.map(v=>v.toLowerCase()))||[],t.networkBodyKeysToRedact=((c=(h=r.networkRecording)==null?void 0:h.networkBodyKeysToRedact)==null?void 0:c.map(v=>v.toLowerCase()))||[],t.urlBlocklist=((d=(f=r.networkRecording)==null?void 0:f.urlBlocklist)==null?void 0:d.map(v=>v.toLowerCase()))||[],t.urlBlocklist=[...t.urlBlocklist,...Cf],t.requestResponseSanitizer=(p=r.networkRecording)==null?void 0:p.requestResponseSanitizer,t.networkHeaderKeysToRecord=(m=r.networkRecording)==null?void 0:m.headerKeysToRecord,t.networkHeaderKeysToRecord&&(t.networkHeadersToRedact=[],t.networkHeaderKeysToRecord=t.networkHeaderKeysToRecord.map(v=>v.toLocaleLowerCase())),t.networkBodyKeysToRecord=(g=r.networkRecording)==null?void 0:g.bodyKeysToRecord,t.networkBodyKeysToRecord&&(t.networkBodyKeysToRedact=[],t.networkBodyKeysToRecord=t.networkBodyKeysToRecord.map(v=>v.toLocaleLowerCase()))),!t.disableNetworkRecording&&t.enableRecordingNetworkContents&&(t.hasNetworkRecording=!0,t.listeners.push($x({xhrCallback:v=>{t.xhrNetworkContents.push(v)},fetchCallback:v=>{t.fetchNetworkContents.push(v)},webSocketRequestCallback:v=>{t.webSocketNetworkContents&&t.webSocketNetworkContents.push(v)},webSocketEventCallback:v=>{t.webSocketEventContents.push(v)},disableWebSocketRecording:t.disableRecordingWebSocketContents,bodyKeysToRedact:t.networkBodyKeysToRedact,highlightEndpoints:t.highlightEndpoints,tracingOrigins:t.tracingOrigins,urlBlocklist:t.urlBlocklist,bodyKeysToRecord:t.networkBodyKeysToRecord})))}static getRecordedNetworkResources(t,r){var s,o;let n=[],i=[];if(!t.disableNetworkRecording){const l=((s=window==null?void 0:window.performance)==null?void 0:s.timeOrigin)||0;n=performance.getEntriesByType("resource");const u=(r-l)*2;if(n=n.filter(a=>a.responseEnd<t.lastNetworkRequestTimestamp?!1:Gs(a.name,t.highlightEndpoints)).map(a=>Y(x({},a.toJSON()),{offsetStartTime:a.startTime-u,offsetResponseEnd:a.responseEnd-u,offsetFetchStart:a.fetchStart-u})),t.lastNetworkRequestTimestamp=((o=n.at(-1))==null?void 0:o.responseEnd)||t.lastNetworkRequestTimestamp,t.enableRecordingNetworkContents){const a={headersToRedact:t.networkHeadersToRedact,headersToRecord:t.networkHeaderKeysToRecord,requestResponseSanitizer:t.requestResponseSanitizer};n=lm(n,t.xhrNetworkContents,"xmlhttprequest",a),n=lm(n,t.fetchNetworkContents,"fetch",a)}}return t.disableRecordingWebSocketContents||(i=t.webSocketNetworkContents||[]),[...n,...i]}static getRecordedWebSocketEvents(t){let r=[];return!t.disableNetworkRecording&&!t.disableRecordingWebSocketContents&&(r=t.webSocketEventContents),r}static clearRecordedNetworkResources(t){t.disableNetworkRecording||(t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],performance.clearResourceTimings())}}const Hg=(e,t,r)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,Y(x({},r),{password:!0})]}},Yg=(e,t)=>e==="strict"?"strict":(t!=null?t:e==="default")?"default":"none";let yt,Ju;function Bg(e,t){return e.nodeType,Node.ELEMENT_NODE,Ku(e);return qx(e,t)}function Hu(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const r of e.classList)t.push(`.${r}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}function qx(e,t){if(e.tagName.toLowerCase()==="html")return"html";try{const r={root:document.body,idName:i=>!0,className:i=>!0,tagName:i=>!0,attr:(i,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:50,maxNumberOfTries:1e3,optimized:!0};yt=x(x({},r),t),Ju=eN(yt.root,r);let n=Yu(e,0,()=>Yu(e,1,()=>Yu(e,2)));if(n){if(yt.optimized){const i=$g(qg(n,e));i.length>0&&(n=i[0])}return Ks(n)}else return Ku(e)}catch(r){return Ku(e)}}function eN(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function Yu(e,t,r){let n=null,i=[],s=e,o=0;for(;s&&s!==yt.root.parentElement;){let l=js(tN(s))||js(...rN(s))||js(...nN(s))||js(iN(s))||[sN()];const u=oN(s);if(t===0)u&&(l=l.concat(l.filter(zu).map(a=>Bu(a,u))));else if(t===1)l=l.slice(0,1),u&&(l=l.concat(l.filter(zu).map(a=>Bu(a,u))));else if(t===2){const[a]=l=l.slice(0,1);u&&zu(a)&&(l=[Bu(a,u)])}for(let a of l)a.level=o;if(i.push(l),i.length>=yt.seedMinLength&&(n=zg(i,r),n))break;s=s.parentElement,o++}return n||(n=zg(i,r)),n}function zg(e,t){const r=$g(Qg(e));if(r.length>yt.threshold)return t?t():null;for(let n of r)if(jg(n))return n;return null}function Ks(e){let t=e[0],r=t.name;for(let n=1;n<e.length;n++){const i=e[n].level||0;t.level===i-1?r=`${e[n].name} > ${r}`:r=`${e[n].name} ${r}`,t=e[n]}return r}function Kg(e){return e.map(t=>t.penalty).reduce((t,r)=>t+r,0)}function jg(e){switch(Ju.querySelectorAll(Ks(e)).length){case 0:return!0;case 1:return!0;default:return!1}}function tN(e){const t=e.getAttribute("id");return t&&yt.idName(t)?{name:"#"+Qs(t,{isIdentifier:!0}),penalty:0}:null}function rN(e){return Array.from(e.attributes).filter(r=>yt.attr(r.name,r.value)).map(r=>({name:"["+Qs(r.name,{isIdentifier:!0})+'="'+Qs(r.value)+'"]',penalty:.5}))}function nN(e){return Array.from(e.classList).filter(yt.className).map(r=>({name:"."+Qs(r,{isIdentifier:!0}),penalty:1}))}function iN(e){const t=e.tagName.toLowerCase();return yt.tagName(t)?{name:t,penalty:2}:null}function sN(){return{name:"*",penalty:3}}function oN(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let n=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}function Bu(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function zu(e){return e.name!=="html"&&!e.name.startsWith("#")}function js(...e){const t=e.filter(aN);return t.length>0?t:null}function aN(e){return e!=null}function*Qg(e,t=[]){if(e.length>0)for(let r of e[0])yield*Tc(Qg(e.slice(1,e.length),t.concat(r)));else yield t}function $g(e){return Array.from(e).sort((t,r)=>Kg(t)-Kg(r))}function*qg(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>yt.optimizedMinLength)for(let n=1;n<e.length-1;n++){if(r.counter>yt.maxNumberOfTries)return;r.counter+=1;const i=[...e];i.splice(n,1);const s=Ks(i);if(r.visited.has(s))return;jg(i)&&lN(i,t)&&(yield i,r.visited.set(s,!0),yield*Tc(qg(i,t,r)))}}function lN(e,t){return Ju.querySelector(Ks(e))===t}const uN=/[ -,\.\/:-@\[-\^`\{-~]/,cN=/[ -,\.\/:-@\[\]\^`\{-~]/,dN=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,hN={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function Qs(e,t={}){const r=x(x({},hN),t);r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");const n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0);let o="",l=0;const u=e.length;for(;l<u;){const a=e.charAt(l++);let h=a.charCodeAt(0),c;if(h<32||h>126){if(h>=55296&&h<=56319&&l<u){const f=e.charCodeAt(l++);(f&64512)==56320?h=((h&1023)<<10)+(f&1023)+65536:l--}c="\\"+h.toString(16).toUpperCase()+" "}else r.escapeEverything?uN.test(a)?c="\\"+a:c="\\"+h.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(a)?c="\\"+h.toString(16).toUpperCase()+" ":a=="\\"||!i&&(a=='"'&&n==a||a=="'"&&n==a)||i&&cN.test(a)?c="\\"+a:c=a;o+=c}return i&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(s)&&(o="\\3"+s+" "+o.slice(1))),o=o.replace(dN,function(a,h,c){return h&&h.length%2?a:(h||"")+c}),!i&&r.wrap?n+o+n:o}const Ku=e=>{let t="";const r=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(ey(n,"#"))),r&&(t=t.concat(ey(r,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},ey=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,ty=e=>{const t=n=>{if(n.target){const i=n.target,s=Bg(i);e(s,n)}},r={capture:!0};return window.addEventListener("click",t,r),()=>window.removeEventListener("click",t,r)},ry=e=>{const t=r=>{if(r.target){const n=Bg(r.target);e(n)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},fN=30,pN=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(r=>e(r-t)))),mN=()=>z(this,null,function*(){const e=[];for(let t=0;t<fN;t++)e.push(yield pN());return e.reduce((t,r)=>t+r,0)/e.length}),ny=(e,t)=>{let r={},n=16.666666666666668;mN().then(u=>n=u);const i=u=>{var a;r!=null&&r.event||(r={event:u,location:window.location.href,timerStart:(a=window.performance)==null?void 0:a.now()},window.requestAnimationFrame(s))},s=()=>{if(!(r!=null&&r.timerStart))return;const u=window.performance.now()-r.timerStart-n;o(u),r={}},o=u=>{const a=(new Date().getTime()-t)/1e3;e({relativeTimestamp:a,jankAmount:u,querySelector:l(),newLocation:window.location.href!=r.location?window.location.href:void 0})},l=()=>{var u;return(u=r==null?void 0:r.event)!=null&&u.target?Hu(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},iy=e=>{let t,r;if(typeof document.hidden!="undefined"?(t="hidden",r="visibilitychange"):typeof document.msHidden!="undefined"?(t="msHidden",r="msvisibilitychange"):typeof document.webkitHidden!="undefined"&&(t="webkitHidden",r="webkitvisibilitychange"),r===void 0)return()=>{};if(t===void 0)return()=>{};const n=t,i=()=>{const o=document[n];e(!!o)};document.addEventListener(r,i);const s=r;return()=>document.removeEventListener(s,i)},sy=typeof window!="undefined"&&"performance"in window&&"memory"in performance?performance:{memory:{}},oy=(e,t)=>{let r=0,n=0;const i=()=>{const h=(new Date().getTime()-t)/1e3,c=sy.memory.jsHeapSizeLimit||0,f=sy.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:c,usedJSHeapSize:f,relativeTimestamp:h,fps:r})};i();let s;s=setInterval(()=>{i()},1e3);let o=0,l=Date.now();const u=function(){var a=Date.now();o++,a>1e3+l&&(r=Math.round(o*1e3/(a-l)),o=0,l=a),n=requestAnimationFrame(u)};return u(),()=>{clearInterval(s),cancelAnimationFrame(n)}},ay=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(s){setTimeout(()=>{var l;var o;try{o=JSON.parse((l=s==null?void 0:s.toString())!=null?l:"")}catch(u){return}(o.type==="track"||o.type==="identify")&&ju(o)&&e(o)},100),t.call(this,s)};const r=s=>{if(s.key==="ajs_user_id"||s.key==="ajs_anonymous_id"||s.key==="ajs_user_traits"){const{userId:o,userTraits:l}=ly();if(o){let u={};l&&(u=JSON.parse(l));const a={type:"identify",userId:o.toString(),traits:u};ju(a)&&e(a)}}},{userId:n,userTraits:i}=ly();if(n){let s={};i&&(s=JSON.parse(i));const o={type:"identify",userId:n.toString(),traits:s};ju(o)&&e(o)}return window.addEventListener("storage",r),OI(({keyName:s})=>{r({key:s})}),()=>{window.removeEventListener("storage",r),XMLHttpRequest.prototype.send=t}},ly=()=>{const e=He("ajs_user_id"),t=He("ajs_user_traits"),r=He("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:r}},ju=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch(i){return!1}const r=gN(t),n=He(Ve.SEGMENT_LAST_SENT_HASH_KEY);return n===void 0||r!==n?(mt(Ve.SEGMENT_LAST_SENT_HASH_KEY,r),!0):!1},gN=e=>{var t=0,r=e.length,n=0;if(r>0)for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t.toString()},uy=(e,t)=>{const r=yN(e);let n=[];const i=!1,s=!0,o=[];for(let u=0;u<r.length;u++){let a=r[u].split("+");n=[],a.length>1&&(n=SN(dy,a)),a=a[a.length-1],a=a==="*"?"*":vN(a),a in Zt||(Zt[a]=[]);const h={mods:n,shortcut:r[u],key:r[u],method:t,keyup:i,keydown:s,scope:"all",splitKey:"+"};Zt[a].push(h),o.push({key:a,handler:h})}const l=u=>_N(u);return wN(document,"keydown",l),()=>{document.removeEventListener("keydown",l);for(const{key:u,handler:a}of o){const h=Zt[u],c=h?h.indexOf(a):-1;c>-1&&h.splice(c,1)}}};let $e=[];function yN(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}const Zt={},Qu=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,bN={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,"-":Qu?173:189,"=":Qu?61:187,";":Qu?59:186,"'":222,"[":219,"]":221,"\\":220},cy={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},qe={16:!1,18:!1,17:!1,91:!1},dy={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},vN=e=>bN[e.toLowerCase()]||dy[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function SN(e,t){const r=t.slice(0,t.length-1);for(let n=0;n<r.length;n++)r[n]=e[r[n].toLowerCase()];return r}function wN(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{r(window.event)})}function RN(e,t,r){let n;if(t.scope===r||t.scope==="all"){n=t.mods.length>0;for(const i in qe)Object.prototype.hasOwnProperty.call(qe,i)&&(!qe[i]&&t.mods.indexOf(+i)>-1||qe[i]&&t.mods.indexOf(+i)===-1)&&(n=!1);(t.mods.length===0&&!qe[16]&&!qe[18]&&!qe[17]&&!qe[91]||n||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function _N(e){const t=Zt["*"];let r=e.keyCode||e.which||e.charCode;if((r===93||r===224)&&(r=91),$e.indexOf(r)===-1&&r!==229&&$e.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(n=>{const i=cy[n];e[n]&&$e.indexOf(i)===-1?$e.push(i):!e[n]&&$e.indexOf(i)>-1?$e.splice($e.indexOf(i),1):n==="metaKey"&&e[n]&&$e.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||($e=$e.slice($e.indexOf(i))))}),!(r in qe&&(qe[r]=!0,!t))){for(const n in qe)Object.prototype.hasOwnProperty.call(qe,n)&&(qe[n]=e[cy[n]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&($e.indexOf(17)===-1&&$e.push(17),$e.indexOf(18)===-1&&$e.push(18),qe[17]=!0,qe[18]=!0),r in Zt){for(let n=0;n<Zt[r].length;n++)if((e.type==="keydown"&&Zt[r][n].keydown||e.type==="keyup"&&Zt[r][n].keyup)&&Zt[r][n].key){const i=Zt[r][n];RN(e,i,"all")}}}}const $u=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var i,s;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(s=(i=window.screen.orientation)==null?void 0:i.angle)!=null?s:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var ar,$n,hy,$s,qu,sn=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},qn=function(e){if(document.readyState==="loading")return"loading";var t=sn();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},TN=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},qs=function(e,t){var r="";try{for(;e&&e.nodeType!==9;){var n=e,i=n.id?"#"+n.id:TN(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>99)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(s){}return r},fy=-1,py=function(){return fy},kr=function(e){addEventListener("pageshow",function(t){t.persisted&&(fy=t.timeStamp,e(t))},!0)},eo=function(){var e=sn();return e&&e.activationStart||0},bt=function(e,t){var r=sn(),n="navigate";return py()>=0?n="back-forward-cache":r&&(document.prerendering||eo()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},on=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(i){}},vt=function(e,t,r,n){var i,s;return function(o){t.value>=0&&(o||n)&&((s=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=s,t.rating=function(l,u){return l>u[1]?"poor":l>u[0]?"needs-improvement":"good"}(t.value,r),e(t))}},ec=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},to=function(e){var t=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||e(r)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},tc=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},an=-1,my=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},ro=function(e){document.visibilityState==="hidden"&&an>-1&&(an=e.type==="visibilitychange"?e.timeStamp:0,EN())},gy=function(){addEventListener("visibilitychange",ro,!0),addEventListener("prerenderingchange",ro,!0)},EN=function(){removeEventListener("visibilitychange",ro,!0),removeEventListener("prerenderingchange",ro,!0)},rc=function(){return an<0&&(an=my(),gy(),kr(function(){setTimeout(function(){an=my(),gy()},0)})),{get firstHiddenTime(){return an}}},ei=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},yy=[1800,3e3],by=function(e,t){t=t||{},ei(function(){var r,n=rc(),i=bt("FCP"),s=on("paint",function(o){o.forEach(function(l){l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-eo(),0),i.entries.push(l),r(!0)))})});s&&(r=vt(e,i,yy,t.reportAllChanges),kr(function(o){i=bt("FCP"),r=vt(e,i,yy,t.reportAllChanges),ec(function(){i.value=performance.now()-o.timeStamp,r(!0)})}))})},vy=[.1,.25],IN=function(e,t){(function(r,n){n=n||{},by(tc(function(){var i,s=bt("CLS",0),o=0,l=[],u=function(h){h.forEach(function(c){if(!c.hadRecentInput){var f=l[0],d=l[l.length-1];o&&c.startTime-d.startTime<1e3&&c.startTime-f.startTime<5e3?(o+=c.value,l.push(c)):(o=c.value,l=[c])}}),o>s.value&&(s.value=o,s.entries=l,i())},a=on("layout-shift",u);a&&(i=vt(r,s,vy,n.reportAllChanges),to(function(){u(a.takeRecords()),i(!0)}),kr(function(){o=0,s=bt("CLS",0),i=vt(r,s,vy,n.reportAllChanges),ec(function(){return i()})}),setTimeout(i,0))}))})(function(r){(function(n){if(n.entries.length){var i=n.entries.reduce(function(l,u){return l&&l.value>u.value?l:u});if(i&&i.sources&&i.sources.length){var s=(o=i.sources).find(function(l){return l.node&&l.node.nodeType===1})||o[0];if(s)return void(n.attribution={largestShiftTarget:qs(s.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:s,largestShiftEntry:i,loadState:qn(i.startTime)})}}var o;n.attribution={}})(r),e(r)},t)},CN=function(e,t){by(function(r){(function(n){if(n.entries.length){var i=sn(),s=n.entries[n.entries.length-1];if(i){var o=i.activationStart||0,l=Math.max(0,i.responseStart-o);return void(n.attribution={timeToFirstByte:l,firstByteToFCP:n.value-l,loadState:qn(n.entries[0].startTime),navigationEntry:i,fcpEntry:s})}}n.attribution={timeToFirstByte:0,firstByteToFCP:n.value,loadState:qn(py())}})(r),e(r)},t)},ti={passive:!0,capture:!0},ZN=new Date,Sy=function(e,t){ar||(ar=t,$n=e,hy=new Date,Ry(removeEventListener),wy())},wy=function(){if($n>=0&&$n<hy-ZN){var e={entryType:"first-input",name:ar.type,target:ar.target,cancelable:ar.cancelable,startTime:ar.timeStamp,processingStart:ar.timeStamp+$n};$s.forEach(function(t){t(e)}),$s=[]}},LN=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(r,n){var i=function(){Sy(r,n),o()},s=function(){o()},o=function(){removeEventListener("pointerup",i,ti),removeEventListener("pointercancel",s,ti)};addEventListener("pointerup",i,ti),addEventListener("pointercancel",s,ti)}(t,e):Sy(t,e)}},Ry=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,LN,ti)})},_y=[100,300],xN=function(e,t){t=t||{},ei(function(){var r,n=rc(),i=bt("FID"),s=function(u){u.startTime<n.firstHiddenTime&&(i.value=u.processingStart-u.startTime,i.entries.push(u),r(!0))},o=function(u){u.forEach(s)},l=on("first-input",o);r=vt(e,i,_y,t.reportAllChanges),l&&to(tc(function(){o(l.takeRecords()),l.disconnect()})),l&&kr(function(){var u;i=bt("FID"),r=vt(e,i,_y,t.reportAllChanges),$s=[],$n=-1,ar=null,Ry(addEventListener),u=s,$s.push(u),wy()})})},NN=function(e,t){xN(function(r){(function(n){var i=n.entries[0];n.attribution={eventTarget:qs(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:qn(i.startTime)}})(r),e(r)},t)},Ty=0,nc=1/0,no=0,ON=function(e){e.forEach(function(t){t.interactionId&&(nc=Math.min(nc,t.interactionId),no=Math.max(no,t.interactionId),Ty=no?(no-nc)/7+1:0)})},Ey=function(){return qu?Ty:performance.interactionCount||0},GN=function(){"interactionCount"in performance||qu||(qu=on("event",ON,{type:"event",buffered:!0,durationThreshold:0}))},Iy=[200,500],Cy=0,Zy=function(){return Ey()-Cy},Vt=[],ic={},Ly=function(e){var t=Vt[Vt.length-1],r=ic[e.interactionId];if(r||Vt.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};ic[n.id]=n,Vt.push(n)}Vt.sort(function(i,s){return s.latency-i.latency}),Vt.splice(10).forEach(function(i){delete ic[i.id]})}},VN=function(e,t){t=t||{},ei(function(){var r;GN();var n,i=bt("INP"),s=function(l){l.forEach(function(h){h.interactionId&&Ly(h),h.entryType==="first-input"&&!Vt.some(function(c){return c.entries.some(function(f){return h.duration===f.duration&&h.startTime===f.startTime})})&&Ly(h)});var u,a=(u=Math.min(Vt.length-1,Math.floor(Zy()/50)),Vt[u]);a&&a.latency!==i.value&&(i.value=a.latency,i.entries=a.entries,n())},o=on("event",s,{durationThreshold:(r=t.durationThreshold)!==null&&r!==void 0?r:40});n=vt(e,i,Iy,t.reportAllChanges),o&&("interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),to(function(){s(o.takeRecords()),i.value<0&&Zy()>0&&(i.value=0,i.entries=[]),n(!0)}),kr(function(){Vt=[],Cy=Ey(),i=bt("INP"),n=vt(e,i,Iy,t.reportAllChanges)}))})},kN=function(e,t){VN(function(r){(function(n){if(n.entries.length){var i=n.entries.sort(function(s,o){return o.duration-s.duration||o.processingEnd-o.processingStart-(s.processingEnd-s.processingStart)})[0];n.attribution={eventTarget:qs(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:qn(i.startTime)}}else n.attribution={}})(r),e(r)},t)},xy=[2500,4e3],sc={},XN=function(e,t){(function(r,n){n=n||{},ei(function(){var i,s=rc(),o=bt("LCP"),l=function(h){var c=h[h.length-1];c&&c.startTime<s.firstHiddenTime&&(o.value=Math.max(c.startTime-eo(),0),o.entries=[c],i())},u=on("largest-contentful-paint",l);if(u){i=vt(r,o,xy,n.reportAllChanges);var a=tc(function(){sc[o.id]||(l(u.takeRecords()),u.disconnect(),sc[o.id]=!0,i(!0))});["keydown","click"].forEach(function(h){addEventListener(h,function(){return setTimeout(a,0)},!0)}),to(a),kr(function(h){o=bt("LCP"),i=vt(r,o,xy,n.reportAllChanges),ec(function(){o.value=performance.now()-h.timeStamp,sc[o.id]=!0,i(!0)})})}})})(function(r){(function(n){if(n.entries.length){var i=sn();if(i){var s=i.activationStart||0,o=n.entries[n.entries.length-1],l=o.url&&performance.getEntriesByType("resource").filter(function(d){return d.name===o.url})[0],u=Math.max(0,i.responseStart-s),a=Math.max(u,l?(l.requestStart||l.startTime)-s:0),h=Math.max(a,l?l.responseEnd-s:0),c=Math.max(h,o?o.startTime-s:0),f={element:qs(o.element),timeToFirstByte:u,resourceLoadDelay:a-u,resourceLoadTime:h-a,elementRenderDelay:c-h,navigationEntry:i,lcpEntry:o};return o.url&&(f.url=o.url),l&&(f.lcpResourceEntry=l),void(n.attribution=f)}}n.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:n.value}})(r),e(r)},t)},Ny=[800,1800],WN=function e(t){document.prerendering?ei(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},PN=function(e,t){t=t||{};var r=bt("TTFB"),n=vt(e,r,Ny,t.reportAllChanges);WN(function(){var i=sn();if(i){var s=i.responseStart;if(s<=0||s>performance.now())return;r.value=Math.max(s-eo(),0),r.entries=[i],n(!0),kr(function(){r=bt("TTFB",0),(n=vt(e,r,Ny,t.reportAllChanges))(!0)})}})},MN=function(e,t){PN(function(r){(function(n){if(n.entries.length){var i=n.entries[0],s=i.activationStart||0,o=Math.max(i.domainLookupStart-s,0),l=Math.max(i.connectStart-s,0),u=Math.max(i.requestStart-s,0);n.attribution={waitingTime:o,dnsTime:l-o,connectionTime:u-l,requestTime:n.value-u,navigationEntry:i}}else n.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(r),e(r)},t)};const Oy=e=>(IN(e),CN(e),NN(e),XN(e),MN(e),kN(e),()=>{}),ln=typeof navigator!="undefined"&&"connection"in navigator?navigator.connection:{},Gy=(e,t)=>{const r=()=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,downlink:ln.downlink,downlinkMax:ln.downlinkMax,effectiveType:ln.effectiveType,rtt:ln.rtt,saveData:ln.saveData,type:ln.type})};r();let n;return n=setInterval(()=>{r()},1e3),()=>{clearInterval(n)}},io="iframe parent ready",so="iframe ok",ri="highlightLogs",AN=e=>{let t=He(ri)||"";t=t+"["+new Date().getTime()+"] "+e+`
|
|
467
|
-
`,mt(
|
|
465
|
+
`,g);if(v===-1)break;const y=new TextDecoder().decode(c.subarray(g+2,v)),w=v+4,R=f.indexOf(`\r
|
|
466
|
+
${d}`,w),S=R===-1,b=S?f.length:R,_=(o=/\bname="([^"]*)"/i.exec(y))==null?void 0:o[1];if(_!==void 0){const I=(l=/\bfilename="([^"]*)"/i.exec(y))==null?void 0:l[1];if(I!==void 0){const E=(h=(a=(u=/^content-type:[ \t]*(.*)$/im.exec(y))==null?void 0:u[1])==null?void 0:a.trim())!=null?h:"",C=b-w;Vu(p,_,`[File name="${I}" type="${E}" size${S?">=":"="}${C}]`)}else Vu(p,_,new TextDecoder().decode(c.subarray(w,b)))}m=S?-1:R+2}return e.truncated&&Object.keys(p).length===0?Fs(e):JSON.stringify(p)}catch(c){return Fs(e)}},Zx=(e,t)=>{try{if(t&&t.body!==void 0&&t.body!==null)return Promise.resolve(bg(t.body));if(!e.body||e.bodyUsed)return Promise.resolve(void 0);const r=e.clone();if(!r.body)return Promise.resolve(void 0);const n=e.headers.get("content-type");return Tx(r.body,du(e.headers)).then(i=>vx(n)?Cx(i,n):Ix(i)).catch(()=>{})}catch(r){return Promise.resolve(void 0)}},Lx=(e=[])=>{if(typeof window=="undefined"||typeof window.fetch!="function"||typeof Request=="undefined")return()=>{};const t=i=>e.some(s=>i.toLowerCase().includes(s)),r=window.fetch,n=function(i,s){return i instanceof Request&&!ku.has(i)&&!t(i.url)&&ku.set(i,Zx(i,s)),r.call(this!=null?this:window,i,s)};return window.fetch=n,()=>{window.fetch===n&&(window.fetch=r)}};class Xu{constructor(t,r){L(this,"debug");L(this,"name");this.debug=t,this.name=r}prefix(){let t=`[${Date.now()}]`;return this.name&&(t+=` - ${this.name}`),t}log(...t){this.debug&&fl(()=>console.log.apply(console,[this.prefix(),...t]))}warn(...t){(this.debug||If())&&fl(()=>console.warn.apply(console,[this.prefix(),...t]))}}class Wu{constructor(){L(this,"_sdk");L(this,"_isLoaded",!1);L(this,"_isReady",!1);L(this,"_callBuffer",[]);L(this,"_capacity",1e5);L(this,"_droppedEvents",0);L(this,"_exceededCapacity",!1);L(this,"_logger",new Xu);L(this,"_pendingStart");L(this,"_lastOp")}_bufferCall(t,r){if(this._isReady)return this._callSdk(t,r);this._enqueue({method:t,args:r})}_callSdk(t,r){try{return this._sdk[t](...r)}catch(n){Ce(`Error executing buffered call to ${t}:`,"error",n)}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,Ce("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t,{ready:r=!0,started:n}={}){this._sdk=t,this._isLoaded=!0;const i=this._pendingStart;this._pendingStart=void 0,r?(this.markReady(),n?this._queueOp("start",()=>z(this,null,function*(){yield n})).catch(o=>{Ce("Error starting the SDK","error",o)}).then(()=>i==null?void 0:i.resolve()):i==null||i.resolve()):i&&this._runPendingStart(i)}_runPendingStart(t){return z(this,null,function*(){try{yield this._start()}catch(r){Ce("Error starting the SDK","error",r)}t.resolve()})}_start(){var t;return this._isLoaded?((t=this._lastOp)==null?void 0:t.kind)==="start"?this._lastOp.promise:this._queueOp("start",()=>z(this,null,function*(){try{yield this._startSdk()}finally{this.markReady()}})):this._deferStart()}_stop(t){return this._isLoaded?this._queueOp("stop",()=>z(this,null,function*(){try{yield t()}catch(r){Ce("Error stopping the SDK","error",r)}})):(this._cancelPendingStart(),Promise.resolve())}_queueOp(t,r){var s;const n=(s=this._lastOp)==null?void 0:s.promise,i=(n?n.then(r,r):r()).finally(()=>{var o;((o=this._lastOp)==null?void 0:o.promise)===i&&(this._lastOp=void 0)});return this._lastOp={kind:t,promise:i},i}_startSdk(){return z(this,null,function*(){})}markReady(){if(!this._isReady){this._isReady=!0;for(const{method:t,args:r}of this._callBuffer)try{this._sdk[t](...r)}catch(n){Ce(`Error executing buffered call to ${t}:`,"error",n)}this._callBuffer=[]}}_deferStart(){if(!this._pendingStart){let t;const r=new Promise(n=>{t=n});this._pendingStart={promise:r,resolve:t}}return this._pendingStart.promise}_cancelPendingStart(){this._pendingStart&&(this._pendingStart.resolve(),this._pendingStart=void 0)}}const Ye="feature_flag",vg="launchdarkly",Pu="evaluation",xx=`${Ye}.${Pu}`,Sg=`${Ye}.set.id`,wg=`${Ye}.key`,_g=`${Ye}.contextKeys`,Rg=`${Ye}.context.id`,Tg=`${Ye}.result.value`,Mu=`${Ye}.provider.name`,Js={kind:`${Ye}.result.reason.kind`,errorKind:`${Ye}.result.reason.errorKind`,ruleIndex:`${Ye}.result.reason.ruleIndex`,ruleId:`${Ye}.result.reason.ruleId`,prerequisiteKey:`${Ye}.result.reason.prerequisiteKey`,inExperiment:`${Ye}.result.reason.inExperiment`,bigSegmentsStatus:`${Ye}.result.reason.bigSegmentsStatus`},Eg=`${Ye}.result.variationIndex`,Ig=`${vg}.application.id`,Cg=`${vg}.application.version`,Zg="context.contextKeys",Nx="$ld:telemetry:session:init",Lg="$ld:telemetry:track",Ox="launchdarkly.track",Gx="page_view",Vx="document_load",kx="result.status";function xg(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Ng(e){return e.kind==="multi"}function Nr(e){return Ng(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${xg(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${xg(e.key)}`:e.key}function Qn(e){return Ng(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,r)=>x(x({},t),r),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}function Xx(e,t,r){t.addHook({getMetadata:()=>({name:"highlight.run"}),afterIdentify:(n,i,s)=>{var l,u;const o=Y(x({},Qn(n.context)),{key:(u=(l=r==null?void 0:r.contextFriendlyName)==null?void 0:l.call(r,n.context))!=null?u:Nr(n.context)});return e.log("LD.identify","INFO",o),s.status==="completed"&&e.identify(o.key,o,"LaunchDarkly"),i},afterEvaluation:(n,i,s)=>{const o=x({[Mu]:"LaunchDarkly",[wg]:n.flagKey,[Tg]:JSON.stringify(s.value)},s.variationIndex!==void 0&&s.variationIndex!==null?{[Eg]:s.variationIndex}:{});if(s.reason)for(const l in Js){const u=l,a=s.reason[u];a!=null&&(o[Js[u]]=a)}return n.context&&(o[_g]=JSON.stringify(Qn(n.context)),o[Rg]=Nr(n.context)),e.startSpan(Pu,l=>{l&&l.addEvent(xx,o)}),i}})}class Wx{constructor(t,r){L(this,"client");L(this,"metadata");this.client=t,this.metadata=r}getHooks(t){return[]}init(t){this.client.track(Nx,{sessionID:t})}recordGauge(t,r){}identify(t,r,n={},i){}error(t,r){}track(t,r){const n=r.event;this.client.track(n?`${Lg}:${n}`:Lg,Y(x({},r),{sessionID:t}))}}class Hs extends Wu{constructor(r,n){super();L(this,"client");this.client=new Wx(r,n)}getHooks(r){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,i,s)=>(this.load(this.client),i)}]}init(r){return this._bufferCall("init",[r])}recordGauge(r,n){return this._bufferCall("recordGauge",[r,n])}identify(r,n,i={},s){return this._bufferCall("identify",[r,n,i,s])}error(r,n){return this._bufferCall("error",[r,n])}track(r,n){return this._bufferCall("track",[r,n])}}const $n="__ldPathListenerHistoryWrap",Px=()=>{let e=!0;const t=l=>{e&&(window.dispatchEvent(new Event(l)),window.dispatchEvent(new Event("locationchange")))},r=history.pushState,n=function(){const l=r.apply(this,arguments);return t("pushstate"),l};history.pushState=n;const i=history.replaceState,s=function(){const l=i.apply(this,arguments);return t("replacestate"),l};history.replaceState=s;const o=()=>{window.dispatchEvent(new Event("locationchange"))};return window.addEventListener("popstate",o),{subscribers:0,release:()=>{e=!1,window.removeEventListener("popstate",o),history.pushState===n&&(history.pushState=r),history.replaceState===s&&(history.replaceState=i)}}},Ys=e=>{var s;e(window.location.href);const t=window,r=(s=t[$n])!=null?s:t[$n]=Px();r.subscribers++;const n=function(){e(window.location.href)};window.addEventListener("locationchange",n);let i=!0;return()=>{i&&(i=!1,window.removeEventListener("locationchange",n),r.subscribers--,r.subscribers<=0&&t[$n]===r&&(r.release(),delete t[$n]))}},dn=class dn extends An{constructor(r={}){super(dn.moduleName,dn.version,r);L(this,"_unlisten");L(this,"_lastUrl","")}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Ys(r=>{const n=this._lastUrl;if(this._lastUrl=r,n!==r)try{this.tracer.startSpan(Gx,{attributes:{[nr]:r,"page_view.previous_url":n,"page_view.url":r}}).end()}catch(i){this._diag.error("failed to create page view span",i)}})}disable(){var r;(r=this._unlisten)==null||r.call(this),this._unlisten=void 0}};L(dn,"version","0.1.0"),L(dn,"moduleName","location-change");let Au=dn;const Uu={version:"1.6.0"}.version;let De={},Ht,Bs,Or,Gr;const Vr="highlight.record",Mx="highlight.session_id",Ax="session.previous_id",zs=new Map,Du=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,Og=(e,t,r,n)=>{var i,s,o,l,u;if(e)try{const a=(i=r.attributes)!=null?i:{},h=(o=(s=a[Ap])!=null?s:n==null?void 0:n.method)!=null?o:"",c=(u=(l=a[Rr])!=null?l:n==null?void 0:n.url)!=null?u:"";e(r,{type:t,method:String(h).toUpperCase(),url:String(c)})}catch(a){console.warn("onHttpRequestSpan threw an error",a)}},Gg="launchdarkly.js.log",Ux="launchdarkly.exception.id",Vg="launchdarkly.sampling.ratio",kg="log.severity",Xg="log.message",Wg=(e,t)=>{var g,v,y,w,R,S,b,_,I,E,C,O,V,q;if(De.tracerProvider||De.meterProvider){Re("warn","OTEL already initialized. Skipping...");return}Ht=e,If()&&H.setLogger({verbose:(...Z)=>Re("debug",...Z),debug:(...Z)=>Re("debug",...Z),info:(...Z)=>Re("info",...Z),warn:(...Z)=>Re("warn",...Z),error:(...Z)=>Re("error",...Z)},Oe.WARN);const r=e.backendUrl||void 0||"https://pub.highlight.io",n=[...(v=(g=e.networkRecordingOptions)==null?void 0:g.urlBlocklist)!=null?v:[],...Zf],i=[r,e.otlpEndpoint].filter(Z=>!!Z).map(Z=>Z.toLowerCase()),s=(y=e.environment)!=null?y:"production",o={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},l=new hx(o,t),u=new Ks(l,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:o.timeoutMillis,scheduledDelayMillis:5e3},()=>{var Z,T;return[(Z=e.getLDContextKeyAttributes)==null?void 0:Z.call(e),(T=e.getGlobalAttributes)==null?void 0:T.call(e)]}),a=new Un({[vE]:(w=e.serviceName)!=null?w:"highlight-browser",[SE]:e.serviceVersion,"deployment.environment.name":s,"highlight.project_id":e.projectId,[_E]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@launchdarkly/o11y","telemetry.distro.version":Uu});De.tracerProvider=new $T({resource:a,mergeResourceWithDefaults:!0,spanProcessors:[u]}),we.setGlobalTracerProvider(De.tracerProvider);const h=Dx(o,e.otlpEndpoint+"/v1/metrics"),c=new sZ({exporter:h,exportIntervalMillis:o.timeoutMillis,exportTimeoutMillis:o.timeoutMillis});De.meterProvider=new HZ({resource:a,readers:[c]}),Cl.setGlobalMeterProvider(De.meterProvider);let f=[];if(((R=e.instrumentations)==null?void 0:R["@opentelemetry/instrumentation-document-load"])!==!1&&f.push(new IE({applyCustomAttributesOnSpan:{documentLoad:Dg,documentFetch:Dg,resourceFetch:tN}})),((S=e.instrumentations)==null?void 0:S["@opentelemetry/instrumentation-user-interaction"])!==!1&&f.push(new Gu({productAnalyticsEvents:e.productAnalyticsEvents})),((b=e.productAnalyticsEvents)==null?void 0:b.pageViews)!==!1&&f.push(new Au),(_=e.networkRecordingOptions)!=null&&_.enabled){if(((I=e.instrumentations)==null?void 0:I["@opentelemetry/instrumentation-fetch"])!==!1){const W=new eI({propagateTraceHeaderCorsUrls:Jg(e.tracingOrigins),applyCustomAttributesOnSpan:(k,P,M)=>{var he;if(Og(e.onHttpRequestSpan,"fetch",k,{method:P.method}),!k.attributes)return;const B=k;if(B.attributes[Vr]===!1)return;const $=typeof Request!="undefined"&&P instanceof Request,te=$?Rx(P):void 0;Ag(k,$?void 0:P.body,P.headers,e.networkRecordingOptions);const N=()=>z(this,null,function*(){const ve=yield te;ve!==void 0&&zx(k,ve,P.headers,e.networkRecordingOptions)}),ye=()=>{var ve;return(ve=e.networkRecordingOptions)!=null&&ve.requestResponseSanitizer&&Ug(k,e.networkRecordingOptions.requestResponseSanitizer),B.attributes[Vr]!==!1};if(!(M instanceof Response)){if(k.setAttributes({"http.response.error":M.message,[Up]:M.status}),!ye())return;te&&zs.set(Du(k),N().then(()=>{ye()}));return}if(ye()&&(he=e.networkRecordingOptions)!=null&&he.recordHeadersAndBody){const ve=z(this,null,function*(){var re,K,se,ce,Ze;yield N();const U=yield pm(M,(re=e.networkRecordingOptions)==null?void 0:re.bodyKeysToRecord,(K=e.networkRecordingOptions)==null?void 0:K.networkBodyKeysToRedact),D=Object.fromEntries(M.headers.entries()),J=rs((ce=(se=e.networkRecordingOptions)==null?void 0:se.networkHeadersToRedact)!=null?ce:[],D,(Ze=e.networkRecordingOptions)==null?void 0:Ze.headerKeysToRecord),Q=Ju(J,"http.response.header");Object.assign(k.attributes,x({"http.response.body":U},Q)),ye()});zs.set(Du(k),ve)}}});f.push(W)}((E=e.instrumentations)==null?void 0:E["@opentelemetry/instrumentation-xml-http-request"])!==!1&&f.push(new RI({propagateTraceHeaderCorsUrls:Jg(e.tracingOrigins),applyCustomAttributesOnSpan:(W,k)=>{var B,$,te,N;const P=k;if(Og(e.onHttpRequestSpan,"xhr",W,{method:P._method,url:P._url}),!(!W.attributes||W.attributes[Vr]===!1)){if(Ag(W,P._body,P._requestHeaders,e.networkRecordingOptions),(B=e.networkRecordingOptions)!=null&&B.recordHeadersAndBody){let ye="";(k.responseType===""||k.responseType==="text")&&(ye=Ot(k.responseText,($=e.networkRecordingOptions)==null?void 0:$.networkBodyKeysToRedact,(te=e.networkRecordingOptions)==null?void 0:te.bodyKeysToRecord,void 0));const he=Kx(k.getAllResponseHeaders());qx(W,he,ye,e.networkRecordingOptions)}(N=e.networkRecordingOptions)!=null&&N.requestResponseSanitizer&&Ug(W,e.networkRecordingOptions.requestResponseSanitizer)}}}))}pT({instrumentations:f}),(C=e.networkRecordingOptions)!=null&&C.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((O=e.instrumentations)==null?void 0:O["@opentelemetry/instrumentation-xml-http-request"])!==!1&&(Or==null||Or(),Or=yx([...n,...i])),(V=e.networkRecordingOptions)!=null&&V.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((q=e.instrumentations)==null?void 0:q["@opentelemetry/instrumentation-fetch"])!==!1&&(Gr==null||Gr(),Gr=Lx([...n,...i]));const m=new kp;return m.enable(),De.tracerProvider.register({contextManager:m,propagator:new tp({propagators:[new Yf,new Hx({backendUrl:r,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:n})]})}),Bs=Fx(l,h,u,()=>De),De},Dx=(e,t)=>new fx(Y(x({},e),{url:t,temporalityPreference:jn.DELTA})),Fx=(e,t,r,n)=>{if(typeof document=="undefined"||typeof window=="undefined")return()=>{};const i=()=>{var u,a;e.setUnloading(!0),t.setUnloading(!0),r.setSkipPendingOnFlush(!0);const l=n();(u=l.tracerProvider)==null||u.forceFlush().catch(()=>{}),(a=l.meterProvider)==null||a.forceFlush().catch(()=>{})},s=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),r.setSkipPendingOnFlush(!1))},o=()=>i();return document.addEventListener("visibilitychange",s),window.addEventListener("pagehide",o),()=>{document.removeEventListener("visibilitychange",s),window.removeEventListener("pagehide",o)}},Jx=e=>{e.setAttribute(Mx,Nt());const t=MI();t&&e.setAttribute(Ax,t)};class Ks extends Lp{constructor(r,n,i){super(r,n);L(this,"_pendingSpans",new Set);L(this,"_skipPendingOnFlush",!1);this._getDefaultAttributes=i}setSkipPendingOnFlush(r){this._skipPendingOnFlush=r}onStart(r,n){var i,s;Jx(r);for(const o of(s=(i=this._getDefaultAttributes)==null?void 0:i.call(this))!=null?s:[])for(const l in o)r.attributes[l]===void 0&&r.setAttribute(l,o[l]);super.onStart(r,n)}onEnd(r){if(r.attributes[Vr]===!1)return;DI();const n=Du(r),i=zs.get(n);if(i){const s=i.catch(o=>{Re("warn","[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{zs.delete(n),this._pendingSpans.delete(s),r.attributes[Vr]!==!1&&super.onEnd(r)});this._pendingSpans.add(s);return}super.onEnd(r)}shutdown(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),Tc(Ks.prototype,this,"shutdown").call(this)})}forceFlush(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),Tc(Ks.prototype,this,"forceFlush").call(this)})}}class Hx extends sp{constructor(r){super();L(this,"highlightEndpoints");L(this,"tracingOrigins");L(this,"urlBlocklist");this.highlightEndpoints=[r.backendUrl,`${r.otlpEndpoint}/v1/traces`,`${r.otlpEndpoint}/v1/logs`,`${r.otlpEndpoint}/v1/metrics`],this.tracingOrigins=r.tracingOrigins,this.urlBlocklist=r.urlBlocklist}inject(r,n,i){var l;const s=we.getSpan(r);if(!s||!s.attributes)return;const o=Hg(s);typeof o=="string"&&(eN(o,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||s.setAttribute(Vr,!1),!au(o,(l=this.tracingOrigins)!=null?l:[],this.urlBlocklist))||super.inject(r,n,i)}}const Pg="highlight-browser",Yx=Pg,js=()=>{var e;return(e=De.tracerProvider)==null?void 0:e.getTracer(Pg)},or=()=>{var e;return(e=De.meterProvider)==null?void 0:e.getMeter(Yx)},Bx=()=>we.getActiveSpan(),Fu=()=>z(this,null,function*(){Bs&&(Bs(),Bs=void 0),Or&&(Or(),Or=void 0),Gr&&(Gr(),Gr=void 0),yield Promise.allSettled([z(this,null,function*(){De.tracerProvider?(yield De.tracerProvider.shutdown(),De.tracerProvider=void 0):Re("warn","OTEL shutdown called without initialized tracerProvider.")}),z(this,null,function*(){De.meterProvider?(yield De.meterProvider.shutdown(),De.meterProvider=void 0):Re("warn","OTEL shutdown called without initialized meterProvider.")})])}),Mg=e=>{const t=TI(e),r={};return t!=null&&t.name&&(r["graphql.operation.name"]=t.name),t!=null&&t.type&&(r["graphql.operation.type"]=t.type),r},zx=(e,t,r,n)=>{if(!e.attributes)return;const i=e.attributes;Object.assign(i,Mg(t)),n!=null&&n.recordHeadersAndBody&&Object.assign(i,{"http.request.body":Ot(t,n.networkBodyKeysToRedact,n.bodyKeysToRecord,gg(r))})},Ag=(e,t,r,n)=>{var h;if(!e.attributes)return;const s=Hg(e),o=is(s),l=Lf(o),u=bg(t),a=gg(r);if(e.setAttributes(Mg(u!=null?u:t)),e.setAttributes({"highlight.type":"http.request",[Rr]:o,[nr]:o,[Ts]:l.pathname,[wE]:l.search}),e.setAttributes(jx(l.searchParams,"url.query_params")),n!=null&&n.recordHeadersAndBody){u!==void 0&&e.setAttribute("http.request.body",Ot(u,n.networkBodyKeysToRedact,n.bodyKeysToRecord,a));const c=rs((h=n.networkHeadersToRedact)!=null?h:[],a,n.headerKeysToRecord),f=Ju(c,"http.request.header");e.setAttributes(f)}},Kx=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(r=>{const n=r.split(": "),i=n.shift();i&&(t[i]=n.join(": "))}),t},Ju=(e,t)=>{const r={};return Object.entries(e).forEach(([n,i])=>{const s=n.toLowerCase().replace(/_/g,"-"),o=`${t}.${s}`,l=$x(s,i);if(r[o]){const u=r[o];Array.isArray(u)?r[o]=[...u,...l]:r[o]=[u,...l]}else r[o]=l.length===1?l[0]:l}),r},jx=(e,t)=>{const r={};for(const[n,i]of e.entries()){const s=`${t}.${n}`,o=r[s];o===void 0?r[s]=i:Array.isArray(o)?o.push(i):r[s]=[o,i]}return r},Qx=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),$x=(e,t)=>Qx.has(e)?t.split(",").map(r=>r.trim()).filter(r=>r.length>0):[t],qx=(e,t,r,n)=>{var o;e.setAttribute("http.response.body",r);const i=rs((o=n.networkHeadersToRedact)!=null?o:[],t,n.headerKeysToRecord),s=Ju(i,"http.response.header");e.setAttributes(s)},Ug=(e,t)=>{var c,f,d,p,m,g,v,y,w,R,S,b;const n=e.attributes,i={},s={};for(const[_,I]of Object.entries(n))_.startsWith("http.request.header.")&&(i[_.slice(20)]=String(I)),_.startsWith("http.response.header.")&&(s[_.slice(21)]=String(I));let l={request:{sessionSecureID:"",id:"",url:(f=(c=n[nr])!=null?c:n[Rr])!=null?f:"",verb:(p=(d=n["http.request.method"])!=null?d:n[Ap])!=null?p:"GET",headers:i,body:(m=n["http.request.body"])!=null?m:""},response:{status:Number((v=(g=n[Up])!=null?g:n[mE])!=null?v:0),headers:s,body:(y=n["http.response.body"])!=null?y:""},urlBlocked:!1},u=!0;try{l.request.body=JSON.parse(l.request.body)}catch(_){u=!1}let a=!0;try{l.response.body=JSON.parse(l.response.body)}catch(_){a=!1}let h;try{h=t(l)}catch(_){return}if(!h){Object.assign(e.attributes,{[Vr]:!1});return}u&&((w=h.request)!=null&&w.body)&&(h.request.body=JSON.stringify(h.request.body)),a&&((R=h.response)!=null&&R.body)&&(h.response.body=JSON.stringify(h.response.body)),Object.assign(e.attributes,{"http.request.body":(S=h.request.body)!=null?S:"","http.response.body":(b=h.response.body)!=null?b:""})},eN=(e,t,r,n)=>n!=null&&n.some(s=>e.toLowerCase().includes(s))?!1:Vs(e,t),Dg=e=>{var s,o,l;if(!e.events)return;const r=e.events,n={unload:gt("unloadEventStart","unloadEventEnd",r),dom_interactive:gt("fetchStart","domInteractive",r),dom_content_loaded:gt("domContentLoadedEventStart","domContentLoadedEventEnd",r),dom_complete:gt("fetchStart","domComplete",r),load_event:gt("loadEventStart","loadEventEnd",r),document_load:gt("fetchStart","loadEventEnd",r),first_paint:gt("fetchStart","firstPaint",r),first_contentful_paint:gt("fetchStart","firstContentfulPaint",r),domain_lookup:gt("domainLookupStart","domainLookupEnd",r),connect:gt("connectStart","connectEnd",r),request:gt("requestStart","requestEnd",r),response:gt("responseStart","responseEnd",r)},i=(o=(s=Ht==null?void 0:Ht.getIntegrations)==null?void 0:s.call(Ht))!=null?o:[];if(n.document_load!==void 0)for(const u of i)u.recordGauge((l=Ht==null?void 0:Ht.sessionSecureId)!=null?l:"",{name:Vx,value:n.document_load/1e6});Object.entries(n).forEach(([u,a])=>{a!==void 0&&(e.setAttribute(`timings.${u}.ns`,a),e.setAttribute(`timings.${u}.readable`,Fg(a)))})};function gt(e,t,r){const n=r.find(l=>l.name===e),i=r.find(l=>l.name===t);if(!n||!i)return;const s=n.time[0]*1e9+n.time[1];return i.time[0]*1e9+i.time[1]-s}const tN=(e,t)=>{const r={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e6,connect:(t.connectEnd-t.connectStart)*1e6,request:(t.responseEnd-t.requestStart)*1e6,response:(t.responseEnd-t.responseStart)*1e6};Object.entries(r).forEach(([n,i])=>{e.setAttribute(`timings.${n}.ns`,i),e.setAttribute(`timings.${n}.readable`,Fg(i))})},Fg=e=>{if(e>=36e11){const o=e/36e11;return`${Number(o.toFixed(1))}h`}else if(e>=6e10){const o=e/6e10;return`${Number(o.toFixed(1))}m`}else if(e>=1e9){const o=e/1e9;return`${Number(o.toFixed(1))}s`}else if(e>=1e6){const o=e/1e6;return`${Number(o.toFixed(1))}ms`}else if(e>=1e3){const o=e/1e3;return`${Number(o.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Jg=e=>e===!0?[/localhost/,/^\//,cm(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,Hg=e=>e.attributes[nr]?e.attributes[nr]:e.attributes[Rr],rN=(e,t,r)=>{const n=window._highlightWebSocketRequestCallback;window._highlightWebSocketRequestCallback=e;const i=window._highlightWebSocketEventCallback;return window._highlightWebSocketEventCallback=s=>{const c=s,{message:o,size:l}=c,u=rt(c,["message","size"]),h=r.some(f=>s.name.toLowerCase().includes(f))?u:s;t(h)},()=>{window._highlightWebSocketRequestCallback=n,window._highlightWebSocketEventCallback=i}},nN=({xhrCallback:e,fetchCallback:t,webSocketRequestCallback:r,webSocketEventCallback:n,disableWebSocketRecording:i,bodyKeysToRedact:s,highlightEndpoints:o,tracingOrigins:l,urlBlocklist:u,bodyKeysToRecord:a})=>{const h=eC(e,o,l,u,s,a),c=sC(t,o,l,u,s,a),f=i?()=>{}:rN(r,n,u);return()=>{h(),c(),f()}};class Yt{constructor(t){L(this,"disableConsoleRecording");L(this,"reportConsoleErrors");L(this,"enablePromisePatch");L(this,"consoleMethodsToRecord");L(this,"listeners");L(this,"errors");L(this,"messages");L(this,"options");L(this,"hasNetworkRecording",!0);L(this,"disableNetworkRecording");L(this,"enableRecordingNetworkContents");L(this,"xhrNetworkContents");L(this,"fetchNetworkContents");L(this,"disableRecordingWebSocketContents");L(this,"webSocketNetworkContents");L(this,"webSocketEventContents");L(this,"tracingOrigins");L(this,"networkHeadersToRedact");L(this,"networkBodyKeysToRedact");L(this,"networkBodyKeysToRecord");L(this,"networkHeaderKeysToRecord");L(this,"lastNetworkRequestTimestamp");L(this,"urlBlocklist");L(this,"highlightEndpoints");L(this,"requestResponseSanitizer");var r,n;this.options=t,this.disableConsoleRecording=!!t.disableConsoleRecording,this.reportConsoleErrors=(r=t.reportConsoleErrors)!=null?r:!1,this.enablePromisePatch=(n=t.enablePromisePatch)!=null?n:!1,this.consoleMethodsToRecord=t.consoleMethodsToRecord||[...ol],this.listeners=[],this.errors=[],this.messages=[],this.lastNetworkRequestTimestamp=0}isListening(){return this.listeners.length>0}startListening(){if(this.isListening())return;const t=this;this.disableConsoleRecording||this.listeners.push(Nf(r=>{var n,i,s;if(this.reportConsoleErrors&&(r.type==="Error"||r.type==="error")&&r.value&&r.trace){const o=_t(r.value);if(yl.includes(o)||bl.some(l=>o.includes(l)))return;t.errors.push({event:o,type:"console.error",url:window.location.href,source:(n=r.trace[0])!=null&&n.fileName?r.trace[0].fileName:"",lineNumber:(i=r.trace[0])!=null&&i.lineNumber?r.trace[0].lineNumber:0,columnNumber:(s=r.trace[0])!=null&&s.columnNumber?r.trace[0].columnNumber:0,stackTrace:r.trace,timestamp:new Date().toISOString(),id:In()})}t.messages.push(r)},Y(x({},xf),{level:this.consoleMethodsToRecord,recordLaunchDarklySdkLogs:this.options.recordLaunchDarklySdkLogs}))),this.listeners.push(Gf(r=>{yl.includes(r.event)||bl.some(n=>r.event.includes(n))||t.errors.push(r)},{enablePromisePatch:this.enablePromisePatch})),this.listeners.push(Fu),Yt.setupNetworkListener(this,this.options)}stopListening(){this.listeners.forEach(t=>t()),this.listeners=[]}static setupNetworkListener(t,r){var s,o,l,u,a,h,c,f,d,p,m,g;const n=(r==null?void 0:r.backendUrl)||void 0||"https://pub.highlight.io",i=r.otlpEndpoint||"https://otel.highlight.io";t.highlightEndpoints=[n,`${i}/v1/traces`,`${i}/v1/logs`,`${i}/v1/metrics`],t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],t.networkHeadersToRedact=[],t.urlBlocklist=[],t.tracingOrigins=r.tracingOrigins||[],(r==null?void 0:r.disableNetworkRecording)!==void 0?(t.disableNetworkRecording=r==null?void 0:r.disableNetworkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[],t.networkBodyKeysToRecord=[]):typeof(r==null?void 0:r.networkRecording)=="boolean"?(t.disableNetworkRecording=!r.networkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[]):(((s=r.networkRecording)==null?void 0:s.enabled)!==void 0?t.disableNetworkRecording=!r.networkRecording.enabled:t.disableNetworkRecording=!1,t.enableRecordingNetworkContents=((o=r.networkRecording)==null?void 0:o.recordHeadersAndBody)||!1,t.disableRecordingWebSocketContents=((l=r.networkRecording)==null?void 0:l.disableWebSocketEventRecordings)||!1,t.networkHeadersToRedact=((a=(u=r.networkRecording)==null?void 0:u.networkHeadersToRedact)==null?void 0:a.map(v=>v.toLowerCase()))||[],t.networkBodyKeysToRedact=((c=(h=r.networkRecording)==null?void 0:h.networkBodyKeysToRedact)==null?void 0:c.map(v=>v.toLowerCase()))||[],t.urlBlocklist=((d=(f=r.networkRecording)==null?void 0:f.urlBlocklist)==null?void 0:d.map(v=>v.toLowerCase()))||[],t.urlBlocklist=[...t.urlBlocklist,...Zf],t.requestResponseSanitizer=(p=r.networkRecording)==null?void 0:p.requestResponseSanitizer,t.networkHeaderKeysToRecord=(m=r.networkRecording)==null?void 0:m.headerKeysToRecord,t.networkHeaderKeysToRecord&&(t.networkHeadersToRedact=[],t.networkHeaderKeysToRecord=t.networkHeaderKeysToRecord.map(v=>v.toLocaleLowerCase())),t.networkBodyKeysToRecord=(g=r.networkRecording)==null?void 0:g.bodyKeysToRecord,t.networkBodyKeysToRecord&&(t.networkBodyKeysToRedact=[],t.networkBodyKeysToRecord=t.networkBodyKeysToRecord.map(v=>v.toLocaleLowerCase()))),!t.disableNetworkRecording&&t.enableRecordingNetworkContents&&(t.hasNetworkRecording=!0,t.listeners.push(nN({xhrCallback:v=>{t.xhrNetworkContents.push(v)},fetchCallback:v=>{t.fetchNetworkContents.push(v)},webSocketRequestCallback:v=>{t.webSocketNetworkContents&&t.webSocketNetworkContents.push(v)},webSocketEventCallback:v=>{t.webSocketEventContents.push(v)},disableWebSocketRecording:t.disableRecordingWebSocketContents,bodyKeysToRedact:t.networkBodyKeysToRedact,highlightEndpoints:t.highlightEndpoints,tracingOrigins:t.tracingOrigins,urlBlocklist:t.urlBlocklist,bodyKeysToRecord:t.networkBodyKeysToRecord})))}static getRecordedNetworkResources(t,r){var s,o;let n=[],i=[];if(!t.disableNetworkRecording){const l=((s=window==null?void 0:window.performance)==null?void 0:s.timeOrigin)||0;n=performance.getEntriesByType("resource");const u=(r-l)*2;if(n=n.filter(a=>a.responseEnd<t.lastNetworkRequestTimestamp?!1:Vs(a.name,t.highlightEndpoints)).map(a=>Y(x({},a.toJSON()),{offsetStartTime:a.startTime-u,offsetResponseEnd:a.responseEnd-u,offsetFetchStart:a.fetchStart-u})),t.lastNetworkRequestTimestamp=((o=n.at(-1))==null?void 0:o.responseEnd)||t.lastNetworkRequestTimestamp,t.enableRecordingNetworkContents){const a={headersToRedact:t.networkHeadersToRedact,headersToRecord:t.networkHeaderKeysToRecord,requestResponseSanitizer:t.requestResponseSanitizer};n=um(n,t.xhrNetworkContents,"xmlhttprequest",a),n=um(n,t.fetchNetworkContents,"fetch",a)}}return t.disableRecordingWebSocketContents||(i=t.webSocketNetworkContents||[]),[...n,...i]}static getRecordedWebSocketEvents(t){let r=[];return!t.disableNetworkRecording&&!t.disableRecordingWebSocketContents&&(r=t.webSocketEventContents),r}static clearRecordedNetworkResources(t){t.disableNetworkRecording||(t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],performance.clearResourceTimings())}}const Yg=(e,t,r)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,Y(x({},r),{password:!0})]}},Bg=(e,t)=>e==="strict"?"strict":(t!=null?t:e==="default")?"default":"none";let yt,Hu;function zg(e,t){return e.nodeType,Node.ELEMENT_NODE,ju(e);return iN(e,t)}function Yu(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const r of e.classList)t.push(`.${r}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}function iN(e,t){if(e.tagName.toLowerCase()==="html")return"html";try{const r={root:document.body,idName:i=>!0,className:i=>!0,tagName:i=>!0,attr:(i,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:50,maxNumberOfTries:1e3,optimized:!0};yt=x(x({},r),t),Hu=sN(yt.root,r);let n=Bu(e,0,()=>Bu(e,1,()=>Bu(e,2)));if(n){if(yt.optimized){const i=qg(ey(n,e));i.length>0&&(n=i[0])}return Qs(n)}else return ju(e)}catch(r){return ju(e)}}function sN(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function Bu(e,t,r){let n=null,i=[],s=e,o=0;for(;s&&s!==yt.root.parentElement;){let l=$s(oN(s))||$s(...aN(s))||$s(...lN(s))||$s(uN(s))||[cN()];const u=dN(s);if(t===0)u&&(l=l.concat(l.filter(Ku).map(a=>zu(a,u))));else if(t===1)l=l.slice(0,1),u&&(l=l.concat(l.filter(Ku).map(a=>zu(a,u))));else if(t===2){const[a]=l=l.slice(0,1);u&&Ku(a)&&(l=[zu(a,u)])}for(let a of l)a.level=o;if(i.push(l),i.length>=yt.seedMinLength&&(n=Kg(i,r),n))break;s=s.parentElement,o++}return n||(n=Kg(i,r)),n}function Kg(e,t){const r=qg($g(e));if(r.length>yt.threshold)return t?t():null;for(let n of r)if(Qg(n))return n;return null}function Qs(e){let t=e[0],r=t.name;for(let n=1;n<e.length;n++){const i=e[n].level||0;t.level===i-1?r=`${e[n].name} > ${r}`:r=`${e[n].name} ${r}`,t=e[n]}return r}function jg(e){return e.map(t=>t.penalty).reduce((t,r)=>t+r,0)}function Qg(e){switch(Hu.querySelectorAll(Qs(e)).length){case 0:return!0;case 1:return!0;default:return!1}}function oN(e){const t=e.getAttribute("id");return t&&yt.idName(t)?{name:"#"+qs(t,{isIdentifier:!0}),penalty:0}:null}function aN(e){return Array.from(e.attributes).filter(r=>yt.attr(r.name,r.value)).map(r=>({name:"["+qs(r.name,{isIdentifier:!0})+'="'+qs(r.value)+'"]',penalty:.5}))}function lN(e){return Array.from(e.classList).filter(yt.className).map(r=>({name:"."+qs(r,{isIdentifier:!0}),penalty:1}))}function uN(e){const t=e.tagName.toLowerCase();return yt.tagName(t)?{name:t,penalty:2}:null}function cN(){return{name:"*",penalty:3}}function dN(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let n=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}function zu(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function Ku(e){return e.name!=="html"&&!e.name.startsWith("#")}function $s(...e){const t=e.filter(hN);return t.length>0?t:null}function hN(e){return e!=null}function*$g(e,t=[]){if(e.length>0)for(let r of e[0])yield*Ec($g(e.slice(1,e.length),t.concat(r)));else yield t}function qg(e){return Array.from(e).sort((t,r)=>jg(t)-jg(r))}function*ey(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>yt.optimizedMinLength)for(let n=1;n<e.length-1;n++){if(r.counter>yt.maxNumberOfTries)return;r.counter+=1;const i=[...e];i.splice(n,1);const s=Qs(i);if(r.visited.has(s))return;Qg(i)&&fN(i,t)&&(yield i,r.visited.set(s,!0),yield*Ec(ey(i,t,r)))}}function fN(e,t){return Hu.querySelector(Qs(e))===t}const pN=/[ -,\.\/:-@\[-\^`\{-~]/,mN=/[ -,\.\/:-@\[\]\^`\{-~]/,gN=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,yN={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function qs(e,t={}){const r=x(x({},yN),t);r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");const n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0);let o="",l=0;const u=e.length;for(;l<u;){const a=e.charAt(l++);let h=a.charCodeAt(0),c;if(h<32||h>126){if(h>=55296&&h<=56319&&l<u){const f=e.charCodeAt(l++);(f&64512)==56320?h=((h&1023)<<10)+(f&1023)+65536:l--}c="\\"+h.toString(16).toUpperCase()+" "}else r.escapeEverything?pN.test(a)?c="\\"+a:c="\\"+h.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(a)?c="\\"+h.toString(16).toUpperCase()+" ":a=="\\"||!i&&(a=='"'&&n==a||a=="'"&&n==a)||i&&mN.test(a)?c="\\"+a:c=a;o+=c}return i&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(s)&&(o="\\3"+s+" "+o.slice(1))),o=o.replace(gN,function(a,h,c){return h&&h.length%2?a:(h||"")+c}),!i&&r.wrap?n+o+n:o}const ju=e=>{let t="";const r=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(ty(n,"#"))),r&&(t=t.concat(ty(r,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},ty=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,ry=e=>{const t=n=>{if(n.target){const i=n.target,s=zg(i);e(s,n)}},r={capture:!0};return window.addEventListener("click",t,r),()=>window.removeEventListener("click",t,r)},ny=e=>{const t=r=>{if(r.target){const n=zg(r.target);e(n)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},bN=30,vN=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(r=>e(r-t)))),SN=()=>z(this,null,function*(){const e=[];for(let t=0;t<bN;t++)e.push(yield vN());return e.reduce((t,r)=>t+r,0)/e.length}),iy=(e,t)=>{let r={},n=16.666666666666668;SN().then(u=>n=u);const i=u=>{var a;r!=null&&r.event||(r={event:u,location:window.location.href,timerStart:(a=window.performance)==null?void 0:a.now()},window.requestAnimationFrame(s))},s=()=>{if(!(r!=null&&r.timerStart))return;const u=window.performance.now()-r.timerStart-n;o(u),r={}},o=u=>{const a=(new Date().getTime()-t)/1e3;e({relativeTimestamp:a,jankAmount:u,querySelector:l(),newLocation:window.location.href!=r.location?window.location.href:void 0})},l=()=>{var u;return(u=r==null?void 0:r.event)!=null&&u.target?Yu(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},sy=e=>{let t,r;if(typeof document.hidden!="undefined"?(t="hidden",r="visibilitychange"):typeof document.msHidden!="undefined"?(t="msHidden",r="msvisibilitychange"):typeof document.webkitHidden!="undefined"&&(t="webkitHidden",r="webkitvisibilitychange"),r===void 0)return()=>{};if(t===void 0)return()=>{};const n=t,i=()=>{const o=document[n];e(!!o)};document.addEventListener(r,i);const s=r;return()=>document.removeEventListener(s,i)},oy=typeof window!="undefined"&&"performance"in window&&"memory"in performance?performance:{memory:{}},ay=(e,t)=>{let r=0,n=0;const i=()=>{const h=(new Date().getTime()-t)/1e3,c=oy.memory.jsHeapSizeLimit||0,f=oy.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:c,usedJSHeapSize:f,relativeTimestamp:h,fps:r})};i();let s;s=setInterval(()=>{i()},1e3);let o=0,l=Date.now();const u=function(){var a=Date.now();o++,a>1e3+l&&(r=Math.round(o*1e3/(a-l)),o=0,l=a),n=requestAnimationFrame(u)};return u(),()=>{clearInterval(s),cancelAnimationFrame(n)}},ly=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(s){setTimeout(()=>{var l;var o;try{o=JSON.parse((l=s==null?void 0:s.toString())!=null?l:"")}catch(u){return}(o.type==="track"||o.type==="identify")&&Qu(o)&&e(o)},100),t.call(this,s)};const r=s=>{if(s.key==="ajs_user_id"||s.key==="ajs_anonymous_id"||s.key==="ajs_user_traits"){const{userId:o,userTraits:l}=uy();if(o){let u={};l&&(u=JSON.parse(l));const a={type:"identify",userId:o.toString(),traits:u};Qu(a)&&e(a)}}},{userId:n,userTraits:i}=uy();if(n){let s={};i&&(s=JSON.parse(i));const o={type:"identify",userId:n.toString(),traits:s};Qu(o)&&e(o)}return window.addEventListener("storage",r),XI(({keyName:s})=>{r({key:s})}),()=>{window.removeEventListener("storage",r),XMLHttpRequest.prototype.send=t}},uy=()=>{const e=He("ajs_user_id"),t=He("ajs_user_traits"),r=He("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:r}},Qu=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch(i){return!1}const r=wN(t),n=He(Ve.SEGMENT_LAST_SENT_HASH_KEY);return n===void 0||r!==n?(mt(Ve.SEGMENT_LAST_SENT_HASH_KEY,r),!0):!1},wN=e=>{var t=0,r=e.length,n=0;if(r>0)for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t.toString()},cy=(e,t)=>{const r=_N(e);let n=[];const i=!1,s=!0,o=[];for(let u=0;u<r.length;u++){let a=r[u].split("+");n=[],a.length>1&&(n=EN(hy,a)),a=a[a.length-1],a=a==="*"?"*":TN(a),a in Zt||(Zt[a]=[]);const h={mods:n,shortcut:r[u],key:r[u],method:t,keyup:i,keydown:s,scope:"all",splitKey:"+"};Zt[a].push(h),o.push({key:a,handler:h})}const l=u=>ZN(u);return IN(document,"keydown",l),()=>{document.removeEventListener("keydown",l);for(const{key:u,handler:a}of o){const h=Zt[u],c=h?h.indexOf(a):-1;c>-1&&h.splice(c,1)}}};let $e=[];function _N(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}const Zt={},$u=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,RN={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,"-":$u?173:189,"=":$u?61:187,";":$u?59:186,"'":222,"[":219,"]":221,"\\":220},dy={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},qe={16:!1,18:!1,17:!1,91:!1},hy={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},TN=e=>RN[e.toLowerCase()]||hy[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function EN(e,t){const r=t.slice(0,t.length-1);for(let n=0;n<r.length;n++)r[n]=e[r[n].toLowerCase()];return r}function IN(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{r(window.event)})}function CN(e,t,r){let n;if(t.scope===r||t.scope==="all"){n=t.mods.length>0;for(const i in qe)Object.prototype.hasOwnProperty.call(qe,i)&&(!qe[i]&&t.mods.indexOf(+i)>-1||qe[i]&&t.mods.indexOf(+i)===-1)&&(n=!1);(t.mods.length===0&&!qe[16]&&!qe[18]&&!qe[17]&&!qe[91]||n||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function ZN(e){const t=Zt["*"];let r=e.keyCode||e.which||e.charCode;if((r===93||r===224)&&(r=91),$e.indexOf(r)===-1&&r!==229&&$e.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(n=>{const i=dy[n];e[n]&&$e.indexOf(i)===-1?$e.push(i):!e[n]&&$e.indexOf(i)>-1?$e.splice($e.indexOf(i),1):n==="metaKey"&&e[n]&&$e.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||($e=$e.slice($e.indexOf(i))))}),!(r in qe&&(qe[r]=!0,!t))){for(const n in qe)Object.prototype.hasOwnProperty.call(qe,n)&&(qe[n]=e[dy[n]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&($e.indexOf(17)===-1&&$e.push(17),$e.indexOf(18)===-1&&$e.push(18),qe[17]=!0,qe[18]=!0),r in Zt){for(let n=0;n<Zt[r].length;n++)if((e.type==="keydown"&&Zt[r][n].keydown||e.type==="keyup"&&Zt[r][n].keyup)&&Zt[r][n].key){const i=Zt[r][n];CN(e,i,"all")}}}}const qu=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var i,s;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(s=(i=window.screen.orientation)==null?void 0:i.angle)!=null?s:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var ar,qn,fy,eo,ec,sn=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},ei=function(e){if(document.readyState==="loading")return"loading";var t=sn();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},LN=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},to=function(e,t){var r="";try{for(;e&&e.nodeType!==9;){var n=e,i=n.id?"#"+n.id:LN(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>99)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(s){}return r},py=-1,my=function(){return py},kr=function(e){addEventListener("pageshow",function(t){t.persisted&&(py=t.timeStamp,e(t))},!0)},ro=function(){var e=sn();return e&&e.activationStart||0},bt=function(e,t){var r=sn(),n="navigate";return my()>=0?n="back-forward-cache":r&&(document.prerendering||ro()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},on=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(i){}},vt=function(e,t,r,n){var i,s;return function(o){t.value>=0&&(o||n)&&((s=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=s,t.rating=function(l,u){return l>u[1]?"poor":l>u[0]?"needs-improvement":"good"}(t.value,r),e(t))}},tc=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},no=function(e){var t=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||e(r)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},rc=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},an=-1,gy=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},io=function(e){document.visibilityState==="hidden"&&an>-1&&(an=e.type==="visibilitychange"?e.timeStamp:0,xN())},yy=function(){addEventListener("visibilitychange",io,!0),addEventListener("prerenderingchange",io,!0)},xN=function(){removeEventListener("visibilitychange",io,!0),removeEventListener("prerenderingchange",io,!0)},nc=function(){return an<0&&(an=gy(),yy(),kr(function(){setTimeout(function(){an=gy(),yy()},0)})),{get firstHiddenTime(){return an}}},ti=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},by=[1800,3e3],vy=function(e,t){t=t||{},ti(function(){var r,n=nc(),i=bt("FCP"),s=on("paint",function(o){o.forEach(function(l){l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-ro(),0),i.entries.push(l),r(!0)))})});s&&(r=vt(e,i,by,t.reportAllChanges),kr(function(o){i=bt("FCP"),r=vt(e,i,by,t.reportAllChanges),tc(function(){i.value=performance.now()-o.timeStamp,r(!0)})}))})},Sy=[.1,.25],NN=function(e,t){(function(r,n){n=n||{},vy(rc(function(){var i,s=bt("CLS",0),o=0,l=[],u=function(h){h.forEach(function(c){if(!c.hadRecentInput){var f=l[0],d=l[l.length-1];o&&c.startTime-d.startTime<1e3&&c.startTime-f.startTime<5e3?(o+=c.value,l.push(c)):(o=c.value,l=[c])}}),o>s.value&&(s.value=o,s.entries=l,i())},a=on("layout-shift",u);a&&(i=vt(r,s,Sy,n.reportAllChanges),no(function(){u(a.takeRecords()),i(!0)}),kr(function(){o=0,s=bt("CLS",0),i=vt(r,s,Sy,n.reportAllChanges),tc(function(){return i()})}),setTimeout(i,0))}))})(function(r){(function(n){if(n.entries.length){var i=n.entries.reduce(function(l,u){return l&&l.value>u.value?l:u});if(i&&i.sources&&i.sources.length){var s=(o=i.sources).find(function(l){return l.node&&l.node.nodeType===1})||o[0];if(s)return void(n.attribution={largestShiftTarget:to(s.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:s,largestShiftEntry:i,loadState:ei(i.startTime)})}}var o;n.attribution={}})(r),e(r)},t)},ON=function(e,t){vy(function(r){(function(n){if(n.entries.length){var i=sn(),s=n.entries[n.entries.length-1];if(i){var o=i.activationStart||0,l=Math.max(0,i.responseStart-o);return void(n.attribution={timeToFirstByte:l,firstByteToFCP:n.value-l,loadState:ei(n.entries[0].startTime),navigationEntry:i,fcpEntry:s})}}n.attribution={timeToFirstByte:0,firstByteToFCP:n.value,loadState:ei(my())}})(r),e(r)},t)},ri={passive:!0,capture:!0},GN=new Date,wy=function(e,t){ar||(ar=t,qn=e,fy=new Date,Ry(removeEventListener),_y())},_y=function(){if(qn>=0&&qn<fy-GN){var e={entryType:"first-input",name:ar.type,target:ar.target,cancelable:ar.cancelable,startTime:ar.timeStamp,processingStart:ar.timeStamp+qn};eo.forEach(function(t){t(e)}),eo=[]}},VN=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(r,n){var i=function(){wy(r,n),o()},s=function(){o()},o=function(){removeEventListener("pointerup",i,ri),removeEventListener("pointercancel",s,ri)};addEventListener("pointerup",i,ri),addEventListener("pointercancel",s,ri)}(t,e):wy(t,e)}},Ry=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,VN,ri)})},Ty=[100,300],kN=function(e,t){t=t||{},ti(function(){var r,n=nc(),i=bt("FID"),s=function(u){u.startTime<n.firstHiddenTime&&(i.value=u.processingStart-u.startTime,i.entries.push(u),r(!0))},o=function(u){u.forEach(s)},l=on("first-input",o);r=vt(e,i,Ty,t.reportAllChanges),l&&no(rc(function(){o(l.takeRecords()),l.disconnect()})),l&&kr(function(){var u;i=bt("FID"),r=vt(e,i,Ty,t.reportAllChanges),eo=[],qn=-1,ar=null,Ry(addEventListener),u=s,eo.push(u),_y()})})},XN=function(e,t){kN(function(r){(function(n){var i=n.entries[0];n.attribution={eventTarget:to(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:ei(i.startTime)}})(r),e(r)},t)},Ey=0,ic=1/0,so=0,WN=function(e){e.forEach(function(t){t.interactionId&&(ic=Math.min(ic,t.interactionId),so=Math.max(so,t.interactionId),Ey=so?(so-ic)/7+1:0)})},Iy=function(){return ec?Ey:performance.interactionCount||0},PN=function(){"interactionCount"in performance||ec||(ec=on("event",WN,{type:"event",buffered:!0,durationThreshold:0}))},Cy=[200,500],Zy=0,Ly=function(){return Iy()-Zy},Vt=[],sc={},xy=function(e){var t=Vt[Vt.length-1],r=sc[e.interactionId];if(r||Vt.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};sc[n.id]=n,Vt.push(n)}Vt.sort(function(i,s){return s.latency-i.latency}),Vt.splice(10).forEach(function(i){delete sc[i.id]})}},MN=function(e,t){t=t||{},ti(function(){var r;PN();var n,i=bt("INP"),s=function(l){l.forEach(function(h){h.interactionId&&xy(h),h.entryType==="first-input"&&!Vt.some(function(c){return c.entries.some(function(f){return h.duration===f.duration&&h.startTime===f.startTime})})&&xy(h)});var u,a=(u=Math.min(Vt.length-1,Math.floor(Ly()/50)),Vt[u]);a&&a.latency!==i.value&&(i.value=a.latency,i.entries=a.entries,n())},o=on("event",s,{durationThreshold:(r=t.durationThreshold)!==null&&r!==void 0?r:40});n=vt(e,i,Cy,t.reportAllChanges),o&&("interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),no(function(){s(o.takeRecords()),i.value<0&&Ly()>0&&(i.value=0,i.entries=[]),n(!0)}),kr(function(){Vt=[],Zy=Iy(),i=bt("INP"),n=vt(e,i,Cy,t.reportAllChanges)}))})},AN=function(e,t){MN(function(r){(function(n){if(n.entries.length){var i=n.entries.sort(function(s,o){return o.duration-s.duration||o.processingEnd-o.processingStart-(s.processingEnd-s.processingStart)})[0];n.attribution={eventTarget:to(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:ei(i.startTime)}}else n.attribution={}})(r),e(r)},t)},Ny=[2500,4e3],oc={},UN=function(e,t){(function(r,n){n=n||{},ti(function(){var i,s=nc(),o=bt("LCP"),l=function(h){var c=h[h.length-1];c&&c.startTime<s.firstHiddenTime&&(o.value=Math.max(c.startTime-ro(),0),o.entries=[c],i())},u=on("largest-contentful-paint",l);if(u){i=vt(r,o,Ny,n.reportAllChanges);var a=rc(function(){oc[o.id]||(l(u.takeRecords()),u.disconnect(),oc[o.id]=!0,i(!0))});["keydown","click"].forEach(function(h){addEventListener(h,function(){return setTimeout(a,0)},!0)}),no(a),kr(function(h){o=bt("LCP"),i=vt(r,o,Ny,n.reportAllChanges),tc(function(){o.value=performance.now()-h.timeStamp,oc[o.id]=!0,i(!0)})})}})})(function(r){(function(n){if(n.entries.length){var i=sn();if(i){var s=i.activationStart||0,o=n.entries[n.entries.length-1],l=o.url&&performance.getEntriesByType("resource").filter(function(d){return d.name===o.url})[0],u=Math.max(0,i.responseStart-s),a=Math.max(u,l?(l.requestStart||l.startTime)-s:0),h=Math.max(a,l?l.responseEnd-s:0),c=Math.max(h,o?o.startTime-s:0),f={element:to(o.element),timeToFirstByte:u,resourceLoadDelay:a-u,resourceLoadTime:h-a,elementRenderDelay:c-h,navigationEntry:i,lcpEntry:o};return o.url&&(f.url=o.url),l&&(f.lcpResourceEntry=l),void(n.attribution=f)}}n.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:n.value}})(r),e(r)},t)},Oy=[800,1800],DN=function e(t){document.prerendering?ti(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},FN=function(e,t){t=t||{};var r=bt("TTFB"),n=vt(e,r,Oy,t.reportAllChanges);DN(function(){var i=sn();if(i){var s=i.responseStart;if(s<=0||s>performance.now())return;r.value=Math.max(s-ro(),0),r.entries=[i],n(!0),kr(function(){r=bt("TTFB",0),(n=vt(e,r,Oy,t.reportAllChanges))(!0)})}})},JN=function(e,t){FN(function(r){(function(n){if(n.entries.length){var i=n.entries[0],s=i.activationStart||0,o=Math.max(i.domainLookupStart-s,0),l=Math.max(i.connectStart-s,0),u=Math.max(i.requestStart-s,0);n.attribution={waitingTime:o,dnsTime:l-o,connectionTime:u-l,requestTime:n.value-u,navigationEntry:i}}else n.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(r),e(r)},t)};const Gy=e=>(NN(e),ON(e),XN(e),UN(e),JN(e),AN(e),()=>{}),ln=typeof navigator!="undefined"&&"connection"in navigator?navigator.connection:{},Vy=(e,t)=>{const r=()=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,downlink:ln.downlink,downlinkMax:ln.downlinkMax,effectiveType:ln.effectiveType,rtt:ln.rtt,saveData:ln.saveData,type:ln.type})};r();let n;return n=setInterval(()=>{r()},1e3),()=>{clearInterval(n)}},oo="iframe parent ready",ao="iframe ok",ni="highlightLogs",HN=e=>{let t=He(ni)||"";t=t+"["+new Date().getTime()+"] "+e+`
|
|
467
|
+
`,mt(ni,t)},ky=()=>He(ni)||"",Xy=e=>{if(!e)return;let t=He(ni)||"";t&&(t.startsWith(e)?(t=t.slice(e.length),mt(ni,t)):HN("Unable to clear logs "+e.replace(`
|
|
468
468
|
`," ")+" from "+t.replace(`
|
|
469
|
-
`," ")))},
|
|
469
|
+
`," ")))},Wy=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const e=window.performance;return{getDeviceDetails:()=>({deviceMemory:YN(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const n=ac(e.memory.jsHeapSizeLimit),i=ac(e.memory.totalJSHeapSize),s=ac(e.memory.usedJSHeapSize);return{jsHeapSizeLimit:n,totalJSHeapSize:i,usedJSHeapSize:s}}}},ac=e=>e/Math.pow(1e3,2),YN=e=>1024*e;var Py={exports:{}};/**
|
|
470
470
|
* @preserve
|
|
471
471
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
472
472
|
*
|
|
@@ -476,20 +476,20 @@ ${d}`,w),S=_===-1,b=S?f.length:_,R=(o=/\bname="([^"]*)"/i.exec(y))==null?void 0:
|
|
|
476
476
|
* @see http://github.com/garycourt/murmurhash-js
|
|
477
477
|
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
478
478
|
* @see http://sites.google.com/site/murmurhash/
|
|
479
|
-
*/(function(e){(function(){var t;function r(n,i){var s=this instanceof r?this:t;if(s.reset(i),typeof n=="string"&&n.length>0&&s.hash(n),s!==this)return s}r.prototype.hash=function(n){var i,s,o,l,u;switch(u=n.length,this.len+=u,s=this.k1,o=0,this.rem){case 0:s^=u>o?n.charCodeAt(o++)&65535:0;case 1:s^=u>o?(n.charCodeAt(o++)&65535)<<8:0;case 2:s^=u>o?(n.charCodeAt(o++)&65535)<<16:0;case 3:s^=u>o?(n.charCodeAt(o)&255)<<24:0,s^=u>o?(n.charCodeAt(o++)&65280)>>8:0}if(this.rem=u+this.rem&3,u-=this.rem,u>0){for(i=this.h1;s=s*11601+(s&65535)*3432906752&4294967295,s=s<<15|s>>>17,s=s*13715+(s&65535)*461832192&4294967295,i^=s,i=i<<13|i>>>19,i=i*5+3864292196&4294967295,!(o>=u);)s=n.charCodeAt(o++)&65535^(n.charCodeAt(o++)&65535)<<8^(n.charCodeAt(o++)&65535)<<16,l=n.charCodeAt(o++),s^=(l&255)<<24^(l&65280)>>8;switch(s=0,this.rem){case 3:s^=(n.charCodeAt(o+2)&65535)<<16;case 2:s^=(n.charCodeAt(o+1)&65535)<<8;case 1:s^=n.charCodeAt(o)&65535}this.h1=i}return this.k1=s,this},r.prototype.result=function(){var n,i;return n=this.k1,i=this.h1,n>0&&(n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,i^=n),i^=this.len,i^=i>>>16,i=i*51819+(i&65535)*2246770688&4294967295,i^=i>>>13,i=i*44597+(i&65535)*3266445312&4294967295,i^=i>>>16,i>>>0},r.prototype.reset=function(n){return this.h1=typeof n=="number"?n:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r})()})(Wy);var DN=Wy.exports;const FN=gi(DN),ac=28,un="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",JN=2246822507,St=e=>{var r;var t="";if(e){const n=FN(e).result();for(let i=0;i<ac;i++){const o=((n^i*JN)>>>0)%un.length;t+=un.charAt(o)}}else{const n=typeof window!="undefined"&&((r=window.crypto)==null?void 0:r.getRandomValues),i=new Uint32Array(ac);n&&window.crypto.getRandomValues(i);for(let s=0;s<ac;s++)n?t+=un.charAt(i[s]%un.length):t+=un.charAt(Math.floor(Math.random()*un.length))}return t},HN={TTFB:"ms",FCP:"ms",LCP:"ms",INP:"ms",FID:"ms",Jank:"ms",CLS:"1",usedJSHeapSize:"By",jsHeapSizeLimit:"By",totalJSHeapSize:"By",fps:"{frames}/s",[We.ViewportHeight]:"{px}",[We.ViewportWidth]:"{px}",[We.ScreenHeight]:"{px}",[We.ScreenWidth]:"{px}",[We.ViewportArea]:"{px2}",[We.DeviceMemory]:"MiBy",downlink:"Mbit/s",downlinkMax:"Mbit/s",rtt:"ms","long_task.duration":"ms"};function lr(e,t){const r=t!=null?t:HN[e];return r?{unit:r}:void 0}var st=Uint8Array,ot=Uint16Array,lc=Int32Array,uc=new st([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]),cc=new st([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]),Py=new st([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),My=function(e,t){for(var r=new ot(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new lc(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},Ay=My(uc,2),YN=Ay.b,dc=Ay.r;YN[28]=258,dc[258]=28;for(var BN=My(cc,0),Uy=BN.r,hc=new ot(32768),Ee=0;Ee<32768;++Ee){var ur=(Ee&43690)>>1|(Ee&21845)<<1;ur=(ur&52428)>>2|(ur&13107)<<2,ur=(ur&61680)>>4|(ur&3855)<<4,hc[Ee]=((ur&65280)>>8|(ur&255)<<8)>>1}for(var ni=function(e,t,r){for(var n=e.length,i=0,s=new ot(t);i<n;++i)e[i]&&++s[e[i]-1];var o=new ot(t);for(i=1;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var l;if(r){l=new ot(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var a=i<<4|e[i],h=t-e[i],c=o[e[i]-1]++<<h,f=c|(1<<h)-1;c<=f;++c)l[hc[c]>>u]=a}else for(l=new ot(n),i=0;i<n;++i)e[i]&&(l[i]=hc[o[e[i]-1]++]>>15-e[i]);return l},Xr=new st(288),Ee=0;Ee<144;++Ee)Xr[Ee]=8;for(var Ee=144;Ee<256;++Ee)Xr[Ee]=9;for(var Ee=256;Ee<280;++Ee)Xr[Ee]=7;for(var Ee=280;Ee<288;++Ee)Xr[Ee]=8;for(var oo=new st(32),Ee=0;Ee<32;++Ee)oo[Ee]=5;var zN=ni(Xr,9,0),KN=ni(oo,5,0),Dy=function(e){return(e+7)/8|0},Fy=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new st(e.subarray(t,r))},Bt=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},ii=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},fc=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return{t:By,l:0};if(i==1){var o=new st(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort(function(S,b){return S.f-b.f}),r.push({s:-1,f:25001});var l=r[0],u=r[1],a=0,h=1,c=2;for(r[0]={s:-1,f:l.f+u.f,l,r:u};h!=i-1;)l=r[r[a].f<r[c].f?a++:c++],u=r[a!=h&&r[a].f<r[c].f?a++:c++],r[h++]={s:-1,f:l.f+u.f,l,r:u};for(var f=s[0].s,n=1;n<i;++n)s[n].s>f&&(f=s[n].s);var d=new ot(f+1),p=pc(r[h-1],d,0);if(p>t){var n=0,m=0,g=p-t,v=1<<g;for(s.sort(function(b,R){return d[R.s]-d[b.s]||b.f-R.f});n<i;++n){var y=s[n].s;if(d[y]>t)m+=v-(1<<p-d[y]),d[y]=t;else break}for(m>>=g;m>0;){var w=s[n].s;d[w]<t?m-=1<<t-d[w]++-1:++n}for(;n>=0&&m;--n){var _=s[n].s;d[_]==t&&(--d[_],++m)}p=t}return{t:new st(d),l:p}},pc=function(e,t,r){return e.s==-1?Math.max(pc(e.l,t,r+1),pc(e.r,t,r+1)):t[e.s]=r},Jy=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new ot(++t),n=0,i=e[0],s=1,o=function(u){r[n++]=u},l=1;l<=t;++l)if(e[l]==i&&l!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=e[l]}return{c:r.subarray(0,n),n:t}},si=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},Hy=function(e,t,r){var n=r.length,i=Dy(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<n;++s)e[i+s+4]=r[s];return(i+4+n)*8},Yy=function(e,t,r,n,i,s,o,l,u,a,h){Bt(t,h++,r),++i[256];for(var c=fc(i,15),f=c.t,d=c.l,p=fc(s,15),m=p.t,g=p.l,v=Jy(f),y=v.c,w=v.n,_=Jy(m),S=_.c,b=_.n,R=new ot(19),I=0;I<y.length;++I)++R[y[I]&31];for(var I=0;I<S.length;++I)++R[S[I]&31];for(var E=fc(R,7),C=E.t,O=E.l,V=19;V>4&&!C[Py[V-1]];--V);var q=a+5<<3,Z=si(i,Xr)+si(s,oo)+o,T=si(i,f)+si(s,m)+o+14+3*V+si(R,C)+2*R[16]+3*R[17]+7*R[18];if(u>=0&&q<=Z&&q<=T)return Hy(t,h,e.subarray(u,u+a));var W,k,P,M;if(Bt(t,h,1+(T<Z)),h+=2,T<Z){W=ni(f,d,0),k=f,P=ni(m,g,0),M=m;var B=ni(C,O,0);Bt(t,h,w-257),Bt(t,h+5,b-1),Bt(t,h+10,V-4),h+=14;for(var I=0;I<V;++I)Bt(t,h+3*I,C[Py[I]]);h+=3*V;for(var $=[y,S],te=0;te<2;++te)for(var N=$[te],I=0;I<N.length;++I){var ye=N[I]&31;Bt(t,h,B[ye]),h+=C[ye],ye>15&&(Bt(t,h,N[I]>>5&127),h+=N[I]>>12)}}else W=zN,k=Xr,P=KN,M=oo;for(var I=0;I<l;++I){var he=n[I];if(he>255){var ye=he>>18&31;ii(t,h,W[ye+257]),h+=k[ye+257],ye>7&&(Bt(t,h,he>>23&31),h+=uc[ye]);var ve=he&31;ii(t,h,P[ve]),h+=M[ve],ve>3&&(ii(t,h,he>>5&8191),h+=cc[ve])}else ii(t,h,W[he]),h+=k[he]}return ii(t,h,W[256]),h+k[256]},jN=new lc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),By=new st(0),QN=function(e,t,r,n,i,s){var o=s.z||e.length,l=new st(n+o+5*(1+Math.ceil(o/7e3))+i),u=l.subarray(n,l.length-i),a=s.l,h=(s.r||0)&7;if(t){h&&(u[0]=s.r>>3);for(var c=jN[t-1],f=c>>13,d=c&8191,p=(1<<r)-1,m=s.p||new ot(32768),g=s.h||new ot(p+1),v=Math.ceil(r/3),y=2*v,w=function(ce){return(e[ce]^e[ce+1]<<v^e[ce+2]<<y)&p},_=new lc(25e3),S=new ot(288),b=new ot(32),R=0,I=0,E=s.i||0,C=0,O=s.w||0,V=0;E+2<o;++E){var q=w(E),Z=E&32767,T=g[q];if(m[Z]=T,g[q]=Z,O<=E){var W=o-E;if((R>7e3||C>24576)&&(W>423||!a)){h=Yy(e,u,0,_,S,b,I,C,V,E-V,h),C=R=I=0,V=E;for(var k=0;k<286;++k)S[k]=0;for(var k=0;k<30;++k)b[k]=0}var P=2,M=0,B=d,$=Z-T&32767;if(W>2&&q==w(E-$))for(var te=Math.min(f,W)-1,N=Math.min(32767,E),ye=Math.min(258,W);$<=N&&--B&&Z!=T;){if(e[E+P]==e[E+P-$]){for(var he=0;he<ye&&e[E+he]==e[E+he-$];++he);if(he>P){if(P=he,M=$,he>te)break;for(var ve=Math.min($,he-2),U=0,k=0;k<ve;++k){var D=E-$+k&32767,J=m[D],Q=D-J&32767;Q>U&&(U=Q,T=D)}}}Z=T,T=m[Z],$+=Z-T&32767}if(M){_[C++]=268435456|dc[P]<<18|Uy[M];var re=dc[P]&31,K=Uy[M]&31;I+=uc[re]+cc[K],++S[257+re],++b[K],O=E+P,++R}else _[C++]=e[E],++S[e[E]]}}for(E=Math.max(E,O);E<o;++E)_[C++]=e[E],++S[e[E]];h=Yy(e,u,a,_,S,b,I,C,V,E-V,h),a||(s.r=h&7|u[h/8|0]<<3,h-=7,s.h=g,s.p=m,s.i=E,s.w=O)}else{for(var E=s.w||0;E<o+a;E+=65535){var se=E+65535;se>=o&&(u[h/8|0]=a,se=o),h=Hy(u,h+1,e.subarray(E,se))}s.i=o}return Fy(l,0,n+Dy(h)+i)},$N=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),qN=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=$N[r&255^t[n]]^r>>>8;e=r},d:function(){return~e}}},eO=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),o=new st(s.length+e.length);o.set(s),o.set(e,s.length),e=o,i.w=s.length}return QN(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},mc=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},tO=function(e,t){var r=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&&mc(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}},rO=function(e){return 10+(e.filename?e.filename.length+1:0)};function nO(e,t){t||(t={});var r=qN(),n=e.length;r.p(e);var i=eO(e,t,rO(t),8),s=i.length;return tO(i,t),mc(i,s-8,r.d()),mc(i,s-4,n),i}var zy=typeof TextEncoder!="undefined"&&new TextEncoder,iO=typeof TextDecoder!="undefined"&&new TextDecoder;try{iO.decode(By,{stream:!0})}catch(e){}function sO(e,t){var r;if(zy)return zy.encode(e);for(var n=e.length,i=new st(e.length+(e.length>>1)),s=0,o=function(a){i[s++]=a},r=0;r<n;++r){if(s+5>i.length){var l=new st(s+8+(n-r<<1));l.set(i),i=l}var u=e.charCodeAt(r);u<128||t?o(u):u<2048?(o(192|u>>6),o(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++r)&1023,o(240|u>>18),o(128|u>>12&63),o(128|u>>6&63),o(128|u&63)):(o(224|u>>12),o(128|u>>6&63),o(128|u&63))}return Fy(i,0,s)}function Ky(e){return z(this,null,function*(){const t=sO(JSON.stringify(e)),r=nO(t),n=yield new Promise(i=>{const s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(new Blob([new Uint8Array(r)]))});return{compressedBase64:n.slice(n.indexOf(",")+1),compressedSize:r.length,bufferLength:t.length}})}const jy="dmFyIFFyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxYcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgV3I9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyICRlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIG9uPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksYW49T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgbXQ9KEYsQiwkKT0+QiBpbiBGP1FyKEYsQix7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6JH0pOkZbQl09JCxEPShGLEIpPT57Zm9yKHZhciAkIGluIEJ8fChCPXt9KSlvbi5jYWxsKEIsJCkmJm10KEYsJCxCWyRdKTtpZigkZSlmb3IodmFyICQgb2YgJGUoQikpYW4uY2FsbCh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sbz0wO3JldHVybn1pZihnLmRhdGEubWVzc2FnZS50eXBlPT09Wi5HZXRTdGF0dXMpe1NlLnBvc3RNZXNzYWdlKHtyZXNwb25zZTp7dHlwZTpaLkdldFN0YXR1cyxwZW5kaW5nQ291bnQ6ZC5sZW5ndGgsaW5pdGlhbGl6ZWQ6dSgpfX0pO3JldHVybn1pZighdSgpKXtkLnB1c2goZy5kYXRhLm1lc3NhZ2UpO3JldHVybn10cnl7eWllbGQgTChnLmRhdGEubWVzc2FnZSksaT0wLHlpZWxkIHEoKX1jYXRjaChFKXtzJiZjb25zb2xlLmVycm9yKEUpLGkrPTF9fSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWhpZ2hsaWdodC1jbGllbnQtd29ya2VyLURyRFBSQ3J2LmpzLm1hcAo=",oO=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Qy=typeof self!="undefined"&&self.Blob&&new Blob([oO(jy)],{type:"text/javascript;charset=utf-8"});function $y(e){let t;try{if(t=Qy&&(self.URL||self.webkitURL).createObjectURL(Qy),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;base64,"+jy,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Be=(e=>(e[e.Initialize=0]="Initialize",e[e.Reset=1]="Reset",e[e.AsyncEvents=2]="AsyncEvents",e[e.Identify=3]="Identify",e[e.Properties=4]="Properties",e[e.Metrics=5]="Metrics",e[e.Feedback=6]="Feedback",e[e.CustomEvent=7]="CustomEvent",e[e.Stop=8]="Stop",e[e.GetStatus=9]="GetStatus",e))(Be||{});function aO(e){return"regexValue"in e}function lO(e){return"matchValue"in e}function uO(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class qy{constructor(t=uO){L(this,"regexCache",new Map);L(this,"config");this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,r,n,i;return!!((r=(t=this.config)==null?void 0:t.logs)!=null&&r.length||(i=(n=this.config)==null?void 0:n.spans)!=null&&i.length)}shouldSample(t){var r,n;return t.name===Og?this.sampleLog((r=this.config)==null?void 0:r.logs,t):this.sampleSpan((n=this.config)==null?void 0:n.spans,t)}matchesValue(t,r){if(!t)return!1;if(lO(t))return t.matchValue===r;if(aO(t)){const n=t.regexValue;if(n===null)return!1;this.regexCache.has(n)||this.regexCache.set(n,new RegExp(n));const i=this.regexCache.get(n);if(typeof r=="string")return i.test(r)}return!1}matchesAttributes(t,r){if(t)for(const n of t){let i=!1;for(const s of Object.keys(r))if(this.matchesValue(n.key,s)){const o=r[s];if(this.matchesValue(n.attribute,o)){i=!0;break}}if(!i)return!1}return!0}matchEvent(t,r){return!(t.name&&!this.matchesValue(t.name,r.name)||t.attributes&&(!r.attributes||!this.matchesAttributes(t.attributes,r.attributes)))}matchesEvents(t,r){if(t)for(const n of t){let i=!1;for(const s of r)if(this.matchEvent(n,s)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(t,r){return!(t.name&&!this.matchesValue(t.name,r.name)||!this.matchesAttributes(t.attributes,r.attributes)||!this.matchesEvents(t.events,r.events))}matchesLogConfig(t,r){if(t.severityText){const n=r[Vg];if(!this.matchesValue(t.severityText,n))return!1}if(t.message){const n=r[kg];if(!this.matchesValue(t.message,n))return!1}return!!this.matchesAttributes(t.attributes,r)}sampleSpan(t,r){if(t){for(const n of t)if(this.matchesSpanConfig(n,r))return{sample:this.sampler(n.samplingRatio),attributes:{[Gg]:n.samplingRatio}}}return{sample:!0}}sampleLog(t,r){if(t){for(const n of t)if(this.matchesLogConfig(n,r.attributes))return{sample:this.sampler(n.samplingRatio),attributes:{[Gg]:n.samplingRatio}}}return{sample:!0}}}const oi=(e,t)=>{_e("warn",`Highlight Warning: (${e}): `,{output:t})},bc=class bc{constructor(t,r){L(this,"options");L(this,"isRunningOnHighlight");L(this,"organizationID");co(this,ui);L(this,"events");L(this,"sessionData");L(this,"ready");L(this,"manualStopped");L(this,"state");L(this,"logger");L(this,"enableSegmentIntegration");L(this,"privacySetting");L(this,"enableCanvasRecording");L(this,"enablePerformanceRecording");L(this,"samplingStrategy");L(this,"inlineImages");L(this,"inlineVideos");L(this,"inlineStylesheet");L(this,"styleSheetResyncInterval");L(this,"debugOptions");L(this,"listeners");L(this,"firstloadVersion");L(this,"environment");L(this,"sessionShortcut");L(this,"appVersion");L(this,"serviceName");L(this,"_worker");L(this,"_optionsInternal");L(this,"_backendUrl");L(this,"_recordingStartTime");L(this,"_isOnLocalHost");L(this,"_onToggleFeedbackFormVisibility");L(this,"_firstLoadListeners");L(this,"_isCrossOriginIframe");L(this,"_eventBytesSinceSnapshot");L(this,"_lastSnapshotTime");L(this,"_snapshotPayloadIds");L(this,"_lastVisibilityChangeTime");L(this,"pushPayloadTimerId");L(this,"hasSessionUnloaded");L(this,"hasPushedData");L(this,"reloaded");L(this,"_hasPreviouslyInitialized");L(this,"_recordStop");L(this,"_gauges",new Map);L(this,"_counters",new Map);L(this,"_histograms",new Map);L(this,"_up_down_counters",new Map);L(this,"_integrations",[]);var i,s,o,l,u;t.sessionSecureID||(t.sessionSecureID=St()),this.options=t,typeof((i=this.options)==null?void 0:i.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(o=(s=this.options)==null?void 0:s.debug)!=null?o:{},this.logger=new Vu(this.debugOptions.clientInteractions),t.debug&&cl(!0),t.storageMode&&(this.logger.log(`initializing in ${t.storageMode} session mode`),em(t.storageMode)),Os(!!(t!=null&&t.sessionCookie)),(t==null?void 0:t.sessionCookieDomain)!==void 0&&tm(t.sessionCookieDomain),this._worker=new $y,this._worker.onmessage=a=>{var h,c,f;((h=a.data.response)==null?void 0:h.type)===Be.AsyncEvents?(this._snapshotPayloadIds.delete(a.data.response.id)||(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}.
|
|
480
|
-
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((c=a.data.response)==null?void 0:c.type)===Be.CustomEvent?this.addCustomEvent(a.data.response.tag,a.data.response.payload):((f=a.data.response)==null?void 0:f.type)===Be.Stop&&(
|
|
479
|
+
*/(function(e){(function(){var t;function r(n,i){var s=this instanceof r?this:t;if(s.reset(i),typeof n=="string"&&n.length>0&&s.hash(n),s!==this)return s}r.prototype.hash=function(n){var i,s,o,l,u;switch(u=n.length,this.len+=u,s=this.k1,o=0,this.rem){case 0:s^=u>o?n.charCodeAt(o++)&65535:0;case 1:s^=u>o?(n.charCodeAt(o++)&65535)<<8:0;case 2:s^=u>o?(n.charCodeAt(o++)&65535)<<16:0;case 3:s^=u>o?(n.charCodeAt(o)&255)<<24:0,s^=u>o?(n.charCodeAt(o++)&65280)>>8:0}if(this.rem=u+this.rem&3,u-=this.rem,u>0){for(i=this.h1;s=s*11601+(s&65535)*3432906752&4294967295,s=s<<15|s>>>17,s=s*13715+(s&65535)*461832192&4294967295,i^=s,i=i<<13|i>>>19,i=i*5+3864292196&4294967295,!(o>=u);)s=n.charCodeAt(o++)&65535^(n.charCodeAt(o++)&65535)<<8^(n.charCodeAt(o++)&65535)<<16,l=n.charCodeAt(o++),s^=(l&255)<<24^(l&65280)>>8;switch(s=0,this.rem){case 3:s^=(n.charCodeAt(o+2)&65535)<<16;case 2:s^=(n.charCodeAt(o+1)&65535)<<8;case 1:s^=n.charCodeAt(o)&65535}this.h1=i}return this.k1=s,this},r.prototype.result=function(){var n,i;return n=this.k1,i=this.h1,n>0&&(n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,i^=n),i^=this.len,i^=i>>>16,i=i*51819+(i&65535)*2246770688&4294967295,i^=i>>>13,i=i*44597+(i&65535)*3266445312&4294967295,i^=i>>>16,i>>>0},r.prototype.reset=function(n){return this.h1=typeof n=="number"?n:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r})()})(Py);var BN=Py.exports;const zN=yi(BN),lc=28,un="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",KN=2246822507,St=e=>{var r;var t="";if(e){const n=zN(e).result();for(let i=0;i<lc;i++){const o=((n^i*KN)>>>0)%un.length;t+=un.charAt(o)}}else{const n=typeof window!="undefined"&&((r=window.crypto)==null?void 0:r.getRandomValues),i=new Uint32Array(lc);n&&window.crypto.getRandomValues(i);for(let s=0;s<lc;s++)n?t+=un.charAt(i[s]%un.length):t+=un.charAt(Math.floor(Math.random()*un.length))}return t},jN={TTFB:"ms",FCP:"ms",LCP:"ms",INP:"ms",FID:"ms",Jank:"ms",CLS:"1",usedJSHeapSize:"By",jsHeapSizeLimit:"By",totalJSHeapSize:"By",fps:"{frames}/s",[We.ViewportHeight]:"{px}",[We.ViewportWidth]:"{px}",[We.ScreenHeight]:"{px}",[We.ScreenWidth]:"{px}",[We.ViewportArea]:"{px2}",[We.DeviceMemory]:"MiBy",downlink:"Mbit/s",downlinkMax:"Mbit/s",rtt:"ms","long_task.duration":"ms"};function lr(e,t){const r=t!=null?t:jN[e];return r?{unit:r}:void 0}var st=Uint8Array,ot=Uint16Array,uc=Int32Array,cc=new st([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]),dc=new st([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]),My=new st([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ay=function(e,t){for(var r=new ot(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new uc(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},Uy=Ay(cc,2),QN=Uy.b,hc=Uy.r;QN[28]=258,hc[258]=28;for(var $N=Ay(dc,0),Dy=$N.r,fc=new ot(32768),Ee=0;Ee<32768;++Ee){var ur=(Ee&43690)>>1|(Ee&21845)<<1;ur=(ur&52428)>>2|(ur&13107)<<2,ur=(ur&61680)>>4|(ur&3855)<<4,fc[Ee]=((ur&65280)>>8|(ur&255)<<8)>>1}for(var ii=function(e,t,r){for(var n=e.length,i=0,s=new ot(t);i<n;++i)e[i]&&++s[e[i]-1];var o=new ot(t);for(i=1;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var l;if(r){l=new ot(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var a=i<<4|e[i],h=t-e[i],c=o[e[i]-1]++<<h,f=c|(1<<h)-1;c<=f;++c)l[fc[c]>>u]=a}else for(l=new ot(n),i=0;i<n;++i)e[i]&&(l[i]=fc[o[e[i]-1]++]>>15-e[i]);return l},Xr=new st(288),Ee=0;Ee<144;++Ee)Xr[Ee]=8;for(var Ee=144;Ee<256;++Ee)Xr[Ee]=9;for(var Ee=256;Ee<280;++Ee)Xr[Ee]=7;for(var Ee=280;Ee<288;++Ee)Xr[Ee]=8;for(var lo=new st(32),Ee=0;Ee<32;++Ee)lo[Ee]=5;var qN=ii(Xr,9,0),eO=ii(lo,5,0),Fy=function(e){return(e+7)/8|0},Jy=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new st(e.subarray(t,r))},Bt=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},si=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},pc=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return{t:zy,l:0};if(i==1){var o=new st(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort(function(S,b){return S.f-b.f}),r.push({s:-1,f:25001});var l=r[0],u=r[1],a=0,h=1,c=2;for(r[0]={s:-1,f:l.f+u.f,l,r:u};h!=i-1;)l=r[r[a].f<r[c].f?a++:c++],u=r[a!=h&&r[a].f<r[c].f?a++:c++],r[h++]={s:-1,f:l.f+u.f,l,r:u};for(var f=s[0].s,n=1;n<i;++n)s[n].s>f&&(f=s[n].s);var d=new ot(f+1),p=mc(r[h-1],d,0);if(p>t){var n=0,m=0,g=p-t,v=1<<g;for(s.sort(function(b,_){return d[_.s]-d[b.s]||b.f-_.f});n<i;++n){var y=s[n].s;if(d[y]>t)m+=v-(1<<p-d[y]),d[y]=t;else break}for(m>>=g;m>0;){var w=s[n].s;d[w]<t?m-=1<<t-d[w]++-1:++n}for(;n>=0&&m;--n){var R=s[n].s;d[R]==t&&(--d[R],++m)}p=t}return{t:new st(d),l:p}},mc=function(e,t,r){return e.s==-1?Math.max(mc(e.l,t,r+1),mc(e.r,t,r+1)):t[e.s]=r},Hy=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new ot(++t),n=0,i=e[0],s=1,o=function(u){r[n++]=u},l=1;l<=t;++l)if(e[l]==i&&l!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=e[l]}return{c:r.subarray(0,n),n:t}},oi=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},Yy=function(e,t,r){var n=r.length,i=Fy(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<n;++s)e[i+s+4]=r[s];return(i+4+n)*8},By=function(e,t,r,n,i,s,o,l,u,a,h){Bt(t,h++,r),++i[256];for(var c=pc(i,15),f=c.t,d=c.l,p=pc(s,15),m=p.t,g=p.l,v=Hy(f),y=v.c,w=v.n,R=Hy(m),S=R.c,b=R.n,_=new ot(19),I=0;I<y.length;++I)++_[y[I]&31];for(var I=0;I<S.length;++I)++_[S[I]&31];for(var E=pc(_,7),C=E.t,O=E.l,V=19;V>4&&!C[My[V-1]];--V);var q=a+5<<3,Z=oi(i,Xr)+oi(s,lo)+o,T=oi(i,f)+oi(s,m)+o+14+3*V+oi(_,C)+2*_[16]+3*_[17]+7*_[18];if(u>=0&&q<=Z&&q<=T)return Yy(t,h,e.subarray(u,u+a));var W,k,P,M;if(Bt(t,h,1+(T<Z)),h+=2,T<Z){W=ii(f,d,0),k=f,P=ii(m,g,0),M=m;var B=ii(C,O,0);Bt(t,h,w-257),Bt(t,h+5,b-1),Bt(t,h+10,V-4),h+=14;for(var I=0;I<V;++I)Bt(t,h+3*I,C[My[I]]);h+=3*V;for(var $=[y,S],te=0;te<2;++te)for(var N=$[te],I=0;I<N.length;++I){var ye=N[I]&31;Bt(t,h,B[ye]),h+=C[ye],ye>15&&(Bt(t,h,N[I]>>5&127),h+=N[I]>>12)}}else W=qN,k=Xr,P=eO,M=lo;for(var I=0;I<l;++I){var he=n[I];if(he>255){var ye=he>>18&31;si(t,h,W[ye+257]),h+=k[ye+257],ye>7&&(Bt(t,h,he>>23&31),h+=cc[ye]);var ve=he&31;si(t,h,P[ve]),h+=M[ve],ve>3&&(si(t,h,he>>5&8191),h+=dc[ve])}else si(t,h,W[he]),h+=k[he]}return si(t,h,W[256]),h+k[256]},tO=new uc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),zy=new st(0),rO=function(e,t,r,n,i,s){var o=s.z||e.length,l=new st(n+o+5*(1+Math.ceil(o/7e3))+i),u=l.subarray(n,l.length-i),a=s.l,h=(s.r||0)&7;if(t){h&&(u[0]=s.r>>3);for(var c=tO[t-1],f=c>>13,d=c&8191,p=(1<<r)-1,m=s.p||new ot(32768),g=s.h||new ot(p+1),v=Math.ceil(r/3),y=2*v,w=function(ce){return(e[ce]^e[ce+1]<<v^e[ce+2]<<y)&p},R=new uc(25e3),S=new ot(288),b=new ot(32),_=0,I=0,E=s.i||0,C=0,O=s.w||0,V=0;E+2<o;++E){var q=w(E),Z=E&32767,T=g[q];if(m[Z]=T,g[q]=Z,O<=E){var W=o-E;if((_>7e3||C>24576)&&(W>423||!a)){h=By(e,u,0,R,S,b,I,C,V,E-V,h),C=_=I=0,V=E;for(var k=0;k<286;++k)S[k]=0;for(var k=0;k<30;++k)b[k]=0}var P=2,M=0,B=d,$=Z-T&32767;if(W>2&&q==w(E-$))for(var te=Math.min(f,W)-1,N=Math.min(32767,E),ye=Math.min(258,W);$<=N&&--B&&Z!=T;){if(e[E+P]==e[E+P-$]){for(var he=0;he<ye&&e[E+he]==e[E+he-$];++he);if(he>P){if(P=he,M=$,he>te)break;for(var ve=Math.min($,he-2),U=0,k=0;k<ve;++k){var D=E-$+k&32767,J=m[D],Q=D-J&32767;Q>U&&(U=Q,T=D)}}}Z=T,T=m[Z],$+=Z-T&32767}if(M){R[C++]=268435456|hc[P]<<18|Dy[M];var re=hc[P]&31,K=Dy[M]&31;I+=cc[re]+dc[K],++S[257+re],++b[K],O=E+P,++_}else R[C++]=e[E],++S[e[E]]}}for(E=Math.max(E,O);E<o;++E)R[C++]=e[E],++S[e[E]];h=By(e,u,a,R,S,b,I,C,V,E-V,h),a||(s.r=h&7|u[h/8|0]<<3,h-=7,s.h=g,s.p=m,s.i=E,s.w=O)}else{for(var E=s.w||0;E<o+a;E+=65535){var se=E+65535;se>=o&&(u[h/8|0]=a,se=o),h=Yy(u,h+1,e.subarray(E,se))}s.i=o}return Jy(l,0,n+Fy(h)+i)},nO=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),iO=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=nO[r&255^t[n]]^r>>>8;e=r},d:function(){return~e}}},sO=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),o=new st(s.length+e.length);o.set(s),o.set(e,s.length),e=o,i.w=s.length}return rO(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},gc=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},oO=function(e,t){var r=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&&gc(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}},aO=function(e){return 10+(e.filename?e.filename.length+1:0)};function lO(e,t){t||(t={});var r=iO(),n=e.length;r.p(e);var i=sO(e,t,aO(t),8),s=i.length;return oO(i,t),gc(i,s-8,r.d()),gc(i,s-4,n),i}var Ky=typeof TextEncoder!="undefined"&&new TextEncoder,uO=typeof TextDecoder!="undefined"&&new TextDecoder;try{uO.decode(zy,{stream:!0})}catch(e){}function cO(e,t){var r;if(Ky)return Ky.encode(e);for(var n=e.length,i=new st(e.length+(e.length>>1)),s=0,o=function(a){i[s++]=a},r=0;r<n;++r){if(s+5>i.length){var l=new st(s+8+(n-r<<1));l.set(i),i=l}var u=e.charCodeAt(r);u<128||t?o(u):u<2048?(o(192|u>>6),o(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++r)&1023,o(240|u>>18),o(128|u>>12&63),o(128|u>>6&63),o(128|u&63)):(o(224|u>>12),o(128|u>>6&63),o(128|u&63))}return Jy(i,0,s)}function jy(e){return z(this,null,function*(){const t=cO(JSON.stringify(e)),r=lO(t),n=yield new Promise(i=>{const s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(new Blob([new Uint8Array(r)]))});return{compressedBase64:n.slice(n.indexOf(",")+1),compressedSize:r.length,bufferLength:t.length}})}const Qy="dmFyIFFyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxYcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2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dlPWZ1bmN0aW9uKGcpe3JldHVybiBKKHRoaXMsbnVsbCxmdW5jdGlvbiooKXtpZihnLmRhdGEubWVzc2FnZS50eXBlPT09Wi5Jbml0aWFsaXplKXt0PWcuZGF0YS5tZXNzYWdlLmJhY2tlbmQsbj1nLmRhdGEubWVzc2FnZS5zZXNzaW9uU2VjdXJlSUQscz1nLmRhdGEubWVzc2FnZS5kZWJ1ZyxvPWcuZGF0YS5tZXNzYWdlLnJlY29yZGluZ1N0YXJ0VGltZSxjLmRlYnVnPXMsZT12cihuZXcgWG4odCx7aGVhZGVyczp7fX0pLEhyKCkpLHlpZWxkIHEoKTtyZXR1cm59aWYoZy5kYXRhLm1lc3NhZ2UudHlwZT09PVouUmVzZXQpe2QubGVuZ3RoPTAsaC5sZW5ndGg9MCxpPTAscj0wLG49IiIsbz0wO3JldHVybn1pZihnLmRhdGEubWVzc2FnZS50eXBlPT09Wi5HZXRTdGF0dXMpe1NlLnBvc3RNZXNzYWdlKHtyZXNwb25zZTp7dHlwZTpaLkdldFN0YXR1cyxwZW5kaW5nQ291bnQ6ZC5sZW5ndGgsaW5pdGlhbGl6ZWQ6dSgpfX0pO3JldHVybn1pZighdSgpKXtkLnB1c2goZy5kYXRhLm1lc3NhZ2UpO3JldHVybn10cnl7eWllbGQgTChnLmRhdGEubWVzc2FnZSksaT0wLHlpZWxkIHEoKX1jYXRjaChFKXtzJiZjb25zb2xlLmVycm9yKEUpLGkrPTF9fSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWhpZ2hsaWdodC1jbGllbnQtd29ya2VyLURyRFBSQ3J2LmpzLm1hcAo=",dO=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),$y=typeof self!="undefined"&&self.Blob&&new Blob([dO(Qy)],{type:"text/javascript;charset=utf-8"});function qy(e){let t;try{if(t=$y&&(self.URL||self.webkitURL).createObjectURL($y),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;base64,"+Qy,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Be=(e=>(e[e.Initialize=0]="Initialize",e[e.Reset=1]="Reset",e[e.AsyncEvents=2]="AsyncEvents",e[e.Identify=3]="Identify",e[e.Properties=4]="Properties",e[e.Metrics=5]="Metrics",e[e.Feedback=6]="Feedback",e[e.CustomEvent=7]="CustomEvent",e[e.Stop=8]="Stop",e[e.GetStatus=9]="GetStatus",e))(Be||{});function hO(e){return"regexValue"in e}function fO(e){return"matchValue"in e}function pO(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class eb{constructor(t=pO){L(this,"regexCache",new Map);L(this,"config");this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,r,n,i;return!!((r=(t=this.config)==null?void 0:t.logs)!=null&&r.length||(i=(n=this.config)==null?void 0:n.spans)!=null&&i.length)}shouldSample(t){var r,n;return t.name===Gg?this.sampleLog((r=this.config)==null?void 0:r.logs,t):this.sampleSpan((n=this.config)==null?void 0:n.spans,t)}matchesValue(t,r){if(!t)return!1;if(fO(t))return t.matchValue===r;if(hO(t)){const n=t.regexValue;if(n===null)return!1;this.regexCache.has(n)||this.regexCache.set(n,new RegExp(n));const i=this.regexCache.get(n);if(typeof r=="string")return i.test(r)}return!1}matchesAttributes(t,r){if(t)for(const n of t){let i=!1;for(const s of Object.keys(r))if(this.matchesValue(n.key,s)){const o=r[s];if(this.matchesValue(n.attribute,o)){i=!0;break}}if(!i)return!1}return!0}matchEvent(t,r){return!(t.name&&!this.matchesValue(t.name,r.name)||t.attributes&&(!r.attributes||!this.matchesAttributes(t.attributes,r.attributes)))}matchesEvents(t,r){if(t)for(const n of t){let i=!1;for(const s of r)if(this.matchEvent(n,s)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(t,r){return!(t.name&&!this.matchesValue(t.name,r.name)||!this.matchesAttributes(t.attributes,r.attributes)||!this.matchesEvents(t.events,r.events))}matchesLogConfig(t,r){if(t.severityText){const n=r[kg];if(!this.matchesValue(t.severityText,n))return!1}if(t.message){const n=r[Xg];if(!this.matchesValue(t.message,n))return!1}return!!this.matchesAttributes(t.attributes,r)}sampleSpan(t,r){if(t){for(const n of t)if(this.matchesSpanConfig(n,r))return{sample:this.sampler(n.samplingRatio),attributes:{[Vg]:n.samplingRatio}}}return{sample:!0}}sampleLog(t,r){if(t){for(const n of t)if(this.matchesLogConfig(n,r.attributes))return{sample:this.sampler(n.samplingRatio),attributes:{[Vg]:n.samplingRatio}}}return{sample:!0}}}const ai=(e,t)=>{Re("warn",`Highlight Warning: (${e}): `,{output:t})},vc=class vc{constructor(t,r){L(this,"options");L(this,"isRunningOnHighlight");L(this,"organizationID");fo(this,ci);L(this,"events");L(this,"sessionData");L(this,"ready");L(this,"manualStopped");L(this,"state");L(this,"logger");L(this,"enableSegmentIntegration");L(this,"privacySetting");L(this,"enableCanvasRecording");L(this,"enablePerformanceRecording");L(this,"samplingStrategy");L(this,"inlineImages");L(this,"inlineVideos");L(this,"inlineStylesheet");L(this,"styleSheetResyncInterval");L(this,"debugOptions");L(this,"listeners");L(this,"firstloadVersion");L(this,"environment");L(this,"sessionShortcut");L(this,"appVersion");L(this,"serviceName");L(this,"_worker");L(this,"_optionsInternal");L(this,"_backendUrl");L(this,"_recordingStartTime");L(this,"_isOnLocalHost");L(this,"_onToggleFeedbackFormVisibility");L(this,"_firstLoadListeners");L(this,"_isCrossOriginIframe");L(this,"_eventBytesSinceSnapshot");L(this,"_lastSnapshotTime");L(this,"_snapshotPayloadIds");L(this,"_lastVisibilityChangeTime");L(this,"pushPayloadTimerId");L(this,"hasSessionUnloaded");L(this,"hasPushedData");L(this,"reloaded");L(this,"_hasPreviouslyInitialized");L(this,"_recordStop");L(this,"_gauges",new Map);L(this,"_counters",new Map);L(this,"_histograms",new Map);L(this,"_up_down_counters",new Map);L(this,"_integrations",[]);var i,s,o,l,u;t.sessionSecureID||(t.sessionSecureID=St()),this.options=t,typeof((i=this.options)==null?void 0:i.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(o=(s=this.options)==null?void 0:s.debug)!=null?o:{},this.logger=new Xu(this.debugOptions.clientInteractions),t.debug&&hl(!0),t.storageMode&&(this.logger.log(`initializing in ${t.storageMode} session mode`),tm(t.storageMode)),Gs(!!(t!=null&&t.sessionCookie)),(t==null?void 0:t.sessionCookieDomain)!==void 0&&rm(t.sessionCookieDomain),this._worker=new qy,this._worker.onmessage=a=>{var h,c,f;((h=a.data.response)==null?void 0:h.type)===Be.AsyncEvents?(this._snapshotPayloadIds.delete(a.data.response.id)||(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}.
|
|
480
|
+
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((c=a.data.response)==null?void 0:c.type)===Be.CustomEvent?this.addCustomEvent(a.data.response.tag,a.data.response.payload):((f=a.data.response)==null?void 0:f.type)===Be.Stop&&(ai("Stopping recording due to worker failure",a.data.response),this.stopRecording(!1))};let n=Ft();if(this.reloaded=!1,!((l=this.sessionData)!=null&&l.sessionSecureID)&&(n!=null&&n.sessionSecureID))this.sessionData=n,this.options.sessionSecureID=n.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const a of Object.values(Ve))Tr(a);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1,this._firstLoadListeners=r||new Yt(this.options);try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch(a){this._isCrossOriginIframe=(u=this.options.recordCrossOriginIframe)!=null?u:!0}this._initMembers(this.options)}static create(t){return new vc(t)}_reset(n){return z(this,arguments,function*({forceNew:t,sessionKey:r}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let i,s;if(!t)try{i=He(Ve.USER_IDENTIFIER);const o=He(Ve.USER_OBJECT);o&&(s=JSON.parse(o))}catch(o){}for(const o of Object.values(Ve))Tr(o);this.sessionData.sessionSecureID=r?St(`${this.organizationID}-${r}`):St(),this.sessionData.sessionKey=r,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stopRecording(),this._firstLoadListeners.stopListening(),this._firstLoadListeners=new Yt(this.options),yield this.initialize(),i&&s&&this.identify(i,s)})}_initMembers(t){var s,o,l,u,a,h,c,f,d,p,m;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=(o=t.enableCanvasRecording)!=null?o:!1,this.enablePerformanceRecording=(l=t.enablePerformanceRecording)!=null?l:!0,this.inlineImages=(u=t.inlineImages)!=null?u:this._isOnLocalHost,this.inlineVideos=(a=t.inlineVideos)!=null?a:this._isOnLocalHost,this.inlineStylesheet=(h=t.inlineStylesheet)!=null?h:this._isOnLocalHost,this.styleSheetResyncInterval=(c=t.styleSheetResyncInterval)!=null?c:2e3,this.samplingStrategy=x({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:wf()},(f=t.samplingStrategy)!=null?f:{canvas:2}),this._backendUrl=(d=t==null?void 0:t.backendUrl)!=null?d:"https://pub.highlight.io",this._backendUrl[0]==="/"&&(this._backendUrl=new URL(this._backendUrl,document.baseURI).href);const r=new Io(`${this._backendUrl}`,{headers:{}});po(this,ci,sl(r,Ou())),this.environment=(p=t.environment)!=null?p:"production",this.appVersion=t.appVersion,this.serviceName=(m=t.serviceName)!=null?m:"",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 g=t,{firstloadVersion:n}=g,i=rt(g,["firstloadVersion"]);this._optionsInternal=i,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._snapshotPayloadIds=new Set,this._lastVisibilityChangeTime=new Date().getTime()}identify(t,r={},n){if(!t||t===""){console.warn("Highlight's identify() call was passed an empty identifier.",{user_identifier:t,user_object:r});return}this.sessionData.userIdentifier=t.toString(),this.sessionData.userObject=r,mt(Ve.USER_IDENTIFIER,t.toString()),mt(Ve.USER_OBJECT,JSON.stringify(r)),this._worker.postMessage({message:{type:Be.Identify,userIdentifier:t,userObject:r,source:n}});for(const i of this._integrations)i.identify(this.sessionData.sessionSecureID,t,r,n)}log(t,r,n){this._firstLoadListeners.messages.push(Of(r,xf,t,n))}pushCustomError(t,r){return this.consumeCustomError(new Error(t),void 0,r)}consumeCustomError(t,r,n){let i={};if(n)try{i=x(x({},JSON.parse(n)),i)}catch(s){}return this.consumeError(t,{message:r,payload:i})}consumeError(t,{message:r,payload:n,source:i,type:s}){var a,h,c,f;t.cause&&(n=Y(x({},n),{"exception.cause":t.cause}));let o=r?r+":"+t.message:t.message;s==="React.ErrorBoundary"&&(o="ErrorBoundary: "+o);const l=En(t),u={event:o,type:s!=null?s:"custom",url:window.location.href,source:i!=null?i:"",lineNumber:(a=l[0])!=null&&a.lineNumber?(h=l[0])==null?void 0:h.lineNumber:0,columnNumber:(c=l[0])!=null&&c.columnNumber?(f=l[0])==null?void 0:f.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),payload:JSON.stringify(n),id:In()};this._firstLoadListeners.errors.push(u);for(const d of this._integrations)d.error(this.sessionData.sessionSecureID,u)}addProperties(t={},r){const n=x({},t);Object.entries(n).forEach(([i,s])=>{try{structuredClone(s)}catch(o){delete n[i]}}),this._worker.postMessage({message:{type:Be.Properties,propertiesObject:n,propertyType:r}});for(const i of this._integrations)i.track(this.sessionData.sessionSecureID,x({sessionSecureID:this.sessionData.sessionSecureID,propertyType:r},t))}initialize(t){return z(this,null,function*(){var r,n,i,s,o,l,u,a,h,c,f,d,p,m,g,v,y,w,R,S,b,_,I,E,C,O,V;if(navigator!=null&&navigator.webdriver&&!window.Cypress||(r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("Googlebot")||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("AdsBot")){(i=this._firstLoadListeners)==null||i.stopListening();return}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(Y(x({},t),{forceNew:!0}));return}const q=new eb;Wg({backendUrl:(o=(s=this.options)==null?void 0:s.backendUrl)!=null?o:"https://pub.highlight.io",otlpEndpoint:(u=(l=this.options)==null?void 0:l.otlpEndpoint)!=null?u:"https://otel.highlight.io",projectId:(a=this.options)==null?void 0:a.organizationID,sessionSecureId:(h=this.options)==null?void 0:h.sessionSecureID,environment:(f=(c=this.options)==null?void 0:c.environment)!=null?f:"production",networkRecordingOptions:typeof((d=this.options)==null?void 0:d.networkRecording)=="object"?this.options.networkRecording:void 0,tracingOrigins:(p=this.options)==null?void 0:p.tracingOrigins,serviceName:(g=(m=this.options)==null?void 0:m.serviceName)!=null?g:"highlight-browser",instrumentations:(y=(v=this.options)==null?void 0:v.otel)==null?void 0:y.instrumentations,onHttpRequestSpan:(R=(w=this.options)==null?void 0:w.otel)==null?void 0:R.onHttpRequestSpan,getIntegrations:()=>[...this._integrations],productAnalyticsEvents:this._productAnalyticsEvents()},q),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear(),this.logger.log("Initializing...",t,this.sessionData,this.options),this.sessionData=(S=Ft(this.sessionData.sessionSecureID))!=null?S:this.sessionData,(b=this.sessionData)!=null&&b.sessionStartTime?this._recordingStartTime=(_=this.sessionData)==null?void 0:_.sessionStartTime:(this._recordingStartTime=new Date().getTime(),this.sessionData.sessionStartTime=this._recordingStartTime),ir(""),it(this.sessionData);let Z=He(Jn.CLIENT_ID);Z||(Z=St(),mt(Jn.CLIENT_ID,Z));let T;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?T=!1:T=((I=this.options.networkRecording)==null?void 0:I.recordHeadersAndBody)||!1;let W=[];if(typeof this.options.networkRecording=="object"&&((E=this.options.networkRecording.destinationDomains)!=null&&E.length)&&(W=this.options.networkRecording.destinationDomains),this._isCrossOriginIframe)yield this._setupCrossOriginIframe();else{const te=yield ho(this,ci).initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:T,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this._optionsInternal),environment:this.environment,id:Z,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,session_key:this.sessionData.sessionKey,client_id:Z,network_recording_domains:W,disable_session_recording:this.options.disableSessionRecording});if(te.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${te.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=te.initializeSession.secure_id,this.sessionData.projectID=parseInt(((C=te==null?void 0:te.initializeSession)==null?void 0:C.project_id)||"0"),q.setConfig(te.initializeSession.sampling),!this.sessionData.projectID||!this.sessionData.sessionSecureID){Re("error","Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}this.logger.log(`Loaded Highlight
|
|
481
481
|
Remote: ${this._backendUrl}
|
|
482
482
|
Project ID: ${this.sessionData.projectID}
|
|
483
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Be.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const te of this._integrations)te.init(this.sessionData.sessionSecureID);if(this.sessionData.userIdentifier&&this.identify(this.sessionData.userIdentifier,this.sessionData.userObject),this._firstLoadListeners.isListening()?this._firstLoadListeners.hasNetworkRecording||Yt.setupNetworkListener(this._firstLoadListeners,this.options):this._firstLoadListeners.startListening(),this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this._isCrossOriginIframe||(this.pushPayloadTimerId=setTimeout(()=>{this._save()},Is)),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{getDeviceDetails:k}=Xy();k&&this.recordGauge({name:We.DeviceMemory,value:k().deviceMemory,category:xe.Device,group:window.location.href});const P=(te,N)=>{N&&this.logger.log("received isCheckout emit",{event:te}),this.events.push(te)};P.bind(this);const M=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[B,$]=Hg(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=dt({ignoreClass:(O=this.options.ignoreClass)!=null?O:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(V=this.options.blockClass)!=null?V:"highlight-block",blockSelector:this.options.blockSelector,emit:P,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:Yg(this.privacySetting,this.options.maskPiiText),maskAllInputs:B,maskInputOptions:$,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:te=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,styleSheetResyncInterval:this.styleSheetResyncInterval,plugins:[Ze()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:oi}:void 0}),M||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(q){this._isOnLocalHost&&(_e("error",q),oi("initializeSession",q))}})}_productAnalyticsEvents(){var n;const t=(n=this.options)==null?void 0:n.productAnalytics;if(t===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(t===void 0||t===!0)return r;for(const i of Object.keys(t))t[i]===!1&&(r[i]=!1);return r}_visibilityHandler(t){return z(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<Qp||(this._lastVisibilityChangeTime=new Date().getTime(),this.logger.log(`Detected window ${t?"hidden":"visible"}.`),t?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stopRecording()):(this.options.disableBackgroundRecording&&(yield this.initialize()),this.addCustomEvent("TabHidden",!1)))})}_setupCrossOriginIframe(){return z(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const r=n=>{if(n.data.highlight===io){const i=n.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:so},"*"),window.removeEventListener("message",r),t()}};window.addEventListener("message",r)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var r;(r=t.contentWindow)==null||r.postMessage({highlight:io,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},Is),window.addEventListener("message",t=>{t.data.highlight===so&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var n;try{const i=this;this.enableSegmentIntegration&&this.listeners.push(ay(o=>{if(o.type==="track"){const l={};l["segment-event"]=o.event,i.addProperties(l,{type:"track",source:"segment"})}else if(o.type==="identify"){const l=o.userId.replace(/^"(.*)"$/,"$1");i.identify(l,o.traits,"segment")}})),this.listeners.push(Pu(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,i.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push($u(o=>{this.addCustomEvent("Viewport",o),this.submitViewportMetrics(o)})),this.listeners.push(ty((o,l)=>{let u=null,a=null;if(l&&l.target){const h=l.target;u=Hu(h),a=h.textContent,a&&a.length>2e3&&(a=a.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:a,clickSelector:u})})),this.listeners.push(ry(o=>{o&&this.addCustomEvent("Focus",o)})),this.listeners.push(Oy(o=>{const{name:l,value:u}=o,a=[],h=(c,f)=>{f&&a.push({name:c,value:f})};switch(o.name){case"LCP":{const c=o.attribution;h("web_vital.element",c.element),h("web_vital.attribution.url",c.url?ns(c.url):void 0);break}case"CLS":{const c=o.attribution;h("web_vital.element",c.largestShiftTarget),h("web_vital.load_state",c.loadState);break}case"INP":{const c=o.attribution;h("web_vital.element",c.eventTarget),h("web_vital.event_type",c.eventType),h("web_vital.load_state",c.loadState);break}case"FID":{const c=o.attribution;h("web_vital.element",c.eventTarget),h("web_vital.event_type",c.eventType);break}case"FCP":{const c=o.attribution;h("web_vital.load_state",c.loadState);break}}this.recordGauge({name:l,value:u,group:window.location.href,category:xe.WebVital,tags:a.length?a:void 0})})),this.listeners.push(Gy(o=>{const l=[];o.saveData!==void 0&&l.push({name:"saveData",value:o.saveData.toString()}),o.effectiveType!==void 0&&l.push({name:"effectiveType",value:o.effectiveType.toString()}),o.type!==void 0&&l.push({name:"type",value:o.type.toString()}),Object.entries(o).forEach(([u,a])=>{wf(a)&&this.recordGauge({name:u,value:a,category:xe.Performance,group:window.location.href,tags:l})})},this._recordingStartTime)),this.sessionShortcut&&this.listeners.push(uy(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")})),this.enablePerformanceRecording&&(this.listeners.push(oy(o=>{this.addCustomEvent("Performance",Rt(o)),Object.entries(o).filter(([l])=>l!=="relativeTimestamp").forEach(([l,u])=>u&&this.recordGauge({name:l,value:u,category:xe.Performance,group:window.location.href}))},this._recordingStartTime)),this.listeners.push(ny(o=>{this.addCustomEvent("Jank",Rt(o)),this.recordGauge({name:"Jank",value:o.jankAmount,category:xe.WebVital,group:o.querySelector})},this._recordingStartTime))),this._hasPreviouslyInitialized||((n=window.electron)!=null&&n.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this._visibilityHandler(!o)}),this.logger.log("Set up Electron highlight.run events.")):(iy(o=>this._visibilityHandler(o)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const s=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s))}catch(i){this._isOnLocalHost&&(_e("error",i),oi("initializeSession _setupWindowListeners",i))}const t=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};if(window.addEventListener("beforeunload",t),this.listeners.push(()=>window.removeEventListener("beforeunload",t)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const i=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};window.addEventListener("pagehide",i),this.listeners.push(()=>window.removeEventListener("pagehide",i))}}submitViewportMetrics({height:t,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:We.ViewportHeight,value:t,category:xe.Device,group:window.location.href}),this.recordGauge({name:We.ViewportWidth,value:r,category:xe.Device,group:window.location.href}),this.recordGauge({name:We.ScreenHeight,value:n,category:xe.Device,group:window.location.href}),this.recordGauge({name:We.ScreenWidth,value:i,category:xe.Device,group:window.location.href}),this.recordGauge({name:We.ViewportArea,value:t*r,category:xe.Device,group:window.location.href})}recordGauge(t){var n,i;let r=this._gauges.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createGauge(t.name,lr(t.name,t.unit)),!r)return;this._gauges.set(t.name,r)}r.record(t.value,Y(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>Y(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}));for(const s of this._integrations)s.recordGauge(this.sessionData.sessionSecureID,t)}recordCount(t){var n,i;let r=this._counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createCounter(t.name,lr(t.name,t.unit)),!r)return;this._counters.set(t.name,r)}r.add(t.value,Y(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>Y(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}recordIncr(t){this.recordCount(Y(x({},t),{value:1}))}recordHistogram(t){var n,i;let r=this._histograms.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createHistogram(t.name,lr(t.name,t.unit)),!r)return;this._histograms.set(t.name,r)}r.record(t.value,Y(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>Y(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}recordUpDownCounter(t){var n,i;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createUpDownCounter(t.name,lr(t.name,t.unit)),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,Y(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>Y(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}stopRecording(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(r=>r()),this.listeners=[],Du()}getCurrentSessionTimestamp(){return this._recordingStartTime}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:r,sessionSecureID:n}=this.sessionData,i=(t-this._recordingStartTime)/1e3;return`https://${Fn}/${r}/sessions/${n}?ts=${i}`}getCurrentSessionURL(){const t=this.sessionData.projectID,r=this.sessionData.sessionSecureID;return t&&r?`https://${Fn}/${t}/sessions/${r}`:null}snapshot(t){return z(this,null,function*(){yield dt.snapshotCanvas(t)})}addSessionFeedback(t){}_save(){return z(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>ql&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let r;((t=this.options)==null?void 0:t.sendMode)==="local"&&(r=n=>z(this,null,function*(){let i=new Blob([JSON.stringify({query:bo(rl),variables:n})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:i}),0})),yield this._sendPayload({sendFn:r}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),it(this.sessionData)}catch(r){this._isOnLocalHost&&(_e("error",r),oi("_save",r))}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},jp))})}addCustomEvent(t,r){if(this.state==="NotRecording"){let n;const i=()=>{clearInterval(n),this.state==="Recording"&&this.events.length>0?Qi(t,r):n=setTimeout(i,500)};n=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&Qi(t,r)}_sendPayload(r){return z(this,arguments,function*({sendFn:t}){const n=Yt.getRecordedNetworkResources(this._firstLoadListeners,this._recordingStartTime),i=Yt.getRecordedWebSocketEvents(this._firstLoadListeners),s=[...this.events],o=[...this._firstLoadListeners.messages],l=[...this._firstLoadListeners.errors],{bytes:u,time:a}=this.enableCanvasRecording?Cs.canvas:Cs.normal;this._eventBytesSinceSnapshot>=u&&new Date().getTime()-this._lastSnapshotTime>=a&&this.takeFullSnapshot(),this.logger.log(`Sending: ${s.length} events, ${o.length} messages, ${n.length} network resources, ${l.length} errors
|
|
483
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Be.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const te of this._integrations)te.init(this.sessionData.sessionSecureID);if(this.sessionData.userIdentifier&&this.identify(this.sessionData.userIdentifier,this.sessionData.userObject),this._firstLoadListeners.isListening()?this._firstLoadListeners.hasNetworkRecording||Yt.setupNetworkListener(this._firstLoadListeners,this.options):this._firstLoadListeners.startListening(),this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this._isCrossOriginIframe||(this.pushPayloadTimerId=setTimeout(()=>{this._save()},Cs)),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{getDeviceDetails:k}=Wy();k&&this.recordGauge({name:We.DeviceMemory,value:k().deviceMemory,category:Ne.Device,group:window.location.href});const P=(te,N)=>{N&&this.logger.log("received isCheckout emit",{event:te}),this.events.push(te)};P.bind(this);const M=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[B,$]=Yg(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=dt({ignoreClass:(O=this.options.ignoreClass)!=null?O:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(V=this.options.blockClass)!=null?V:"highlight-block",blockSelector:this.options.blockSelector,emit:P,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:Bg(this.privacySetting,this.options.maskPiiText),maskAllInputs:B,maskInputOptions:$,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:te=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,styleSheetResyncInterval:this.styleSheetResyncInterval,plugins:[Le()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:ai}:void 0}),M||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(q){this._isOnLocalHost&&(Re("error",q),ai("initializeSession",q))}})}_productAnalyticsEvents(){var n;const t=(n=this.options)==null?void 0:n.productAnalytics;if(t===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(t===void 0||t===!0)return r;for(const i of Object.keys(t))t[i]===!1&&(r[i]=!1);return r}_visibilityHandler(t){return z(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<$p||(this._lastVisibilityChangeTime=new Date().getTime(),this.logger.log(`Detected window ${t?"hidden":"visible"}.`),t?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stopRecording()):(this.options.disableBackgroundRecording&&(yield this.initialize()),this.addCustomEvent("TabHidden",!1)))})}_setupCrossOriginIframe(){return z(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const r=n=>{if(n.data.highlight===oo){const i=n.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:ao},"*"),window.removeEventListener("message",r),t()}};window.addEventListener("message",r)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var r;(r=t.contentWindow)==null||r.postMessage({highlight:oo,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},Cs),window.addEventListener("message",t=>{t.data.highlight===ao&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var n;try{const i=this;this.enableSegmentIntegration&&this.listeners.push(ly(o=>{if(o.type==="track"){const l={};l["segment-event"]=o.event,i.addProperties(l,{type:"track",source:"segment"})}else if(o.type==="identify"){const l=o.userId.replace(/^"(.*)"$/,"$1");i.identify(l,o.traits,"segment")}})),this.listeners.push(Ys(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,i.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(qu(o=>{this.addCustomEvent("Viewport",o),this.submitViewportMetrics(o)})),this.listeners.push(ry((o,l)=>{let u=null,a=null;if(l&&l.target){const h=l.target;u=Yu(h),a=h.textContent,a&&a.length>2e3&&(a=a.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:a,clickSelector:u})})),this.listeners.push(ny(o=>{o&&this.addCustomEvent("Focus",o)})),this.listeners.push(Gy(o=>{const{name:l,value:u}=o,a=[],h=(c,f)=>{f&&a.push({name:c,value:f})};switch(o.name){case"LCP":{const c=o.attribution;h("web_vital.element",c.element),h("web_vital.attribution.url",c.url?is(c.url):void 0);break}case"CLS":{const c=o.attribution;h("web_vital.element",c.largestShiftTarget),h("web_vital.load_state",c.loadState);break}case"INP":{const c=o.attribution;h("web_vital.element",c.eventTarget),h("web_vital.event_type",c.eventType),h("web_vital.load_state",c.loadState);break}case"FID":{const c=o.attribution;h("web_vital.element",c.eventTarget),h("web_vital.event_type",c.eventType);break}case"FCP":{const c=o.attribution;h("web_vital.load_state",c.loadState);break}}this.recordGauge({name:l,value:u,group:window.location.href,category:Ne.WebVital,tags:a.length?a:void 0})})),this.listeners.push(Vy(o=>{const l=[];o.saveData!==void 0&&l.push({name:"saveData",value:o.saveData.toString()}),o.effectiveType!==void 0&&l.push({name:"effectiveType",value:o.effectiveType.toString()}),o.type!==void 0&&l.push({name:"type",value:o.type.toString()}),Object.entries(o).forEach(([u,a])=>{_f(a)&&this.recordGauge({name:u,value:a,category:Ne.Performance,group:window.location.href,tags:l})})},this._recordingStartTime)),this.sessionShortcut&&this.listeners.push(cy(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")})),this.enablePerformanceRecording&&(this.listeners.push(ay(o=>{this.addCustomEvent("Performance",_t(o)),Object.entries(o).filter(([l])=>l!=="relativeTimestamp").forEach(([l,u])=>u&&this.recordGauge({name:l,value:u,category:Ne.Performance,group:window.location.href}))},this._recordingStartTime)),this.listeners.push(iy(o=>{this.addCustomEvent("Jank",_t(o)),this.recordGauge({name:"Jank",value:o.jankAmount,category:Ne.WebVital,group:o.querySelector})},this._recordingStartTime))),this._hasPreviouslyInitialized||((n=window.electron)!=null&&n.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this._visibilityHandler(!o)}),this.logger.log("Set up Electron highlight.run events.")):(sy(o=>this._visibilityHandler(o)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const s=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s))}catch(i){this._isOnLocalHost&&(Re("error",i),ai("initializeSession _setupWindowListeners",i))}const t=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};if(window.addEventListener("beforeunload",t),this.listeners.push(()=>window.removeEventListener("beforeunload",t)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const i=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};window.addEventListener("pagehide",i),this.listeners.push(()=>window.removeEventListener("pagehide",i))}}submitViewportMetrics({height:t,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:We.ViewportHeight,value:t,category:Ne.Device,group:window.location.href}),this.recordGauge({name:We.ViewportWidth,value:r,category:Ne.Device,group:window.location.href}),this.recordGauge({name:We.ScreenHeight,value:n,category:Ne.Device,group:window.location.href}),this.recordGauge({name:We.ScreenWidth,value:i,category:Ne.Device,group:window.location.href}),this.recordGauge({name:We.ViewportArea,value:t*r,category:Ne.Device,group:window.location.href})}recordGauge(t){var n,i;let r=this._gauges.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createGauge(t.name,lr(t.name,t.unit)),!r)return;this._gauges.set(t.name,r)}r.record(t.value,Y(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>Y(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}));for(const s of this._integrations)s.recordGauge(this.sessionData.sessionSecureID,t)}recordCount(t){var n,i;let r=this._counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createCounter(t.name,lr(t.name,t.unit)),!r)return;this._counters.set(t.name,r)}r.add(t.value,Y(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>Y(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}recordIncr(t){this.recordCount(Y(x({},t),{value:1}))}recordHistogram(t){var n,i;let r=this._histograms.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createHistogram(t.name,lr(t.name,t.unit)),!r)return;this._histograms.set(t.name,r)}r.record(t.value,Y(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>Y(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}recordUpDownCounter(t){var n,i;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createUpDownCounter(t.name,lr(t.name,t.unit)),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,Y(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>Y(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}stopRecording(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(r=>r()),this.listeners=[],Fu()}getCurrentSessionTimestamp(){return this._recordingStartTime}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:r,sessionSecureID:n}=this.sessionData,i=(t-this._recordingStartTime)/1e3;return`https://${Fn}/${r}/sessions/${n}?ts=${i}`}getCurrentSessionURL(){const t=this.sessionData.projectID,r=this.sessionData.sessionSecureID;return t&&r?`https://${Fn}/${t}/sessions/${r}`:null}snapshot(t){return z(this,null,function*(){yield dt.snapshotCanvas(t)})}addSessionFeedback(t){}_save(){return z(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>tu&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let r;((t=this.options)==null?void 0:t.sendMode)==="local"&&(r=n=>z(this,null,function*(){let i=new Blob([JSON.stringify({query:So(il),variables:n})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:i}),0})),yield this._sendPayload({sendFn:r}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),it(this.sessionData)}catch(r){this._isOnLocalHost&&(Re("error",r),ai("_save",r))}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},Qp))})}addCustomEvent(t,r){if(this.state==="NotRecording"){let n;const i=()=>{clearInterval(n),this.state==="Recording"&&this.events.length>0?$i(t,r):n=setTimeout(i,500)};n=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&$i(t,r)}_sendPayload(r){return z(this,arguments,function*({sendFn:t}){const n=Yt.getRecordedNetworkResources(this._firstLoadListeners,this._recordingStartTime),i=Yt.getRecordedWebSocketEvents(this._firstLoadListeners),s=[...this.events],o=[...this._firstLoadListeners.messages],l=[...this._firstLoadListeners.errors],{bytes:u,time:a}=this.enableCanvasRecording?Zs.canvas:Zs.normal;this._eventBytesSinceSnapshot>=u&&new Date().getTime()-this._lastSnapshotTime>=a&&this.takeFullSnapshot(),this.logger.log(`Sending: ${s.length} events, ${o.length} messages, ${n.length} network resources, ${l.length} errors
|
|
484
484
|
To: ${this._backendUrl}
|
|
485
485
|
Org: ${this.organizationID}
|
|
486
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`);const h=new Date().getTime(),c=Vy();if(t){const f={session_secure_id:this.sessionData.sessionSecureID,payload_id:h.toString(),events:{events:s},messages:Rt({messages:o}),resources:JSON.stringify({resources:n}),web_socket_events:JSON.stringify({webSocketEvents:i}),errors:l,is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:c||void 0},{compressedBase64:d}=yield Ky(f);yield t({session_secure_id:this.sessionData.sessionSecureID,payload_id:new Date().getTime().toString(),data:d})}else s.some(f=>f.type===nt.FullSnapshot)&&this._snapshotPayloadIds.add(h),this._worker.postMessage({message:{type:Be.AsyncEvents,id:h,events:s,messages:o,errors:l,resourcesString:JSON.stringify({resources:n}),webSocketEventsString:JSON.stringify({webSocketEvents:i}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:c}});it(this.sessionData),Yt.clearRecordedNetworkResources(this._firstLoadListeners),this.events=this.events.slice(s.length),this._firstLoadListeners.messages=this._firstLoadListeners.messages.slice(o.length),this._firstLoadListeners.errors=this._firstLoadListeners.errors.slice(l.length),ky(c)})}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}),dt.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}registerLD(t){this._integrations.length||this._integrations.push(new Js(t))}};ui=new WeakMap;let gc=bc;const eb=({apiKey:e})=>{(function(t,r){var n=t.amplitude||{_q:[],_iq:{}},i=r.createElement("script");i.type="text/javascript",i.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",i.crossOrigin="anonymous",i.async=!0,i.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",i.onload=function(){t.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(e)};var s=r.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s);function o(m,g){m.prototype[g]=function(){return this._q.push([g].concat(Array.prototype.slice.call(arguments,0))),this}}for(var l=function(){return this._q=[],this},u=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],a=0;a<u.length;a++)o(l,u[a]);n.Identify=l;for(var h=function(){return this._q=[],this},c=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],f=0;f<c.length;f++)o(h,c[f]);n.Revenue=h;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function p(m){function g(y){m[y]=function(){m._q.push([y].concat(Array.prototype.slice.call(arguments,0)))}}for(var v=0;v<d.length;v++)g(d[v])}p(n),n.getInstance=function(m){return m=(!m||m.length===0?"$default_instance":m).toLowerCase(),Object.prototype.hasOwnProperty.call(n._iq,m)||(n._iq[m]={_q:[]},p(n._iq[m])),n._iq[m]},t.amplitude=n})(window,document)},tb=({projectToken:e})=>{if(window.mixpanel)return;(function(r,n){if(!n.__SV){var i,s;window.mixpanel=n,n._i=[],n.init=function(o,l,u){function a(f,d){var p=d.split(".");p.length==2&&(f=f[p[0]],d=p[1]),f[d]=function(){f.push([d].concat(Array.prototype.slice.call(arguments,0)))}}var h=n;for(typeof u!="undefined"?h=n[u]=[]:u="mixpanel",h.people=h.people||[],h.toString=function(f){var d="mixpanel";return u!=="mixpanel"&&(d+="."+u),f||(d+=" (stub)"),d},h.people.toString=function(){return h.toString(1)+".people (stub)"},i="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(" "),s=0;s<i.length;s++)a(h,i[s]);var c="set set_once union unset remove delete".split(" ");h.get_group=function(){function f(g){d[g]=function(){call2_args=arguments,call2=[g].concat(Array.prototype.slice.call(call2_args,0)),h.push([p,call2])}}for(var d={},p=["get_group"].concat(Array.prototype.slice.call(arguments,0)),m=0;m<c.length;m++)f(c[m]);return d},n._i.push([o,l,u])},n.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=cO,document.head.appendChild(t),t.addEventListener("load",()=>{var r;(r=window.mixpanel)==null||r.init(e)})},cO="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",dO=()=>{var e,t;typeof chrome!="undefined"&&((e=chrome==null?void 0:chrome.runtime)!=null&&e.onMessage)&&((t=chrome==null?void 0:chrome.runtime)==null||t.onMessage.addListener((r,n,i)=>{const s=r.action;switch(console.log(`[highlight] received '${s}' event from extension.`),s){case"init":{be.init(1,{debug:!0}),be.getSessionURL().then(o=>{i({url:o})});break}case"stop":{be.stop(),i({success:!0});break}}return!0}))};function hO(e){var t;e.on&&((t=e.webContents)!=null&&t.send)&&(e.on("focus",()=>{e.webContents.send("highlight.run",{visible:!0})}),e.on("blur",()=>{e.webContents.send("highlight.run",{visible:!1})}),e.on("close",()=>{e.webContents.send("highlight.run",{visible:!1})}))}const fO=({next:e,payload:t})=>{if(typeof window!="undefined"&&typeof document!="undefined"&&"H"in window){if(t.obj.type==="track"){const r=t.obj.event,n=t.obj.properties;window.H.track(r,n)}else if(t.obj.type==="identify"){const r=t.obj.userId;if(r!=null&&r.length){const n=t.obj.traits;window.H.identify(r,n)}}}e(t)},rb=()=>{if(typeof window!="undefined"){if(typeof window._highlightFetchPatch!="undefined")return;window._originalFetch=window.fetch,window._fetchProxy=(e,t)=>window._originalFetch(e,t),window._highlightFetchPatch=(e,t)=>window._fetchProxy.call(window||global,e,t),window.fetch=window._highlightFetchPatch}},nb=()=>null,ib=()=>{if(typeof window!="undefined"){if(typeof window._highlightWebSocketRequestCallback!="undefined")return;window._highlightWebSocketRequestCallback=nb,window._highlightWebSocketEventCallback=nb;const e=new Proxy(window.WebSocket,{construct(t,r){const[,n]=ou(),i=new t(...r),s=h=>{window._highlightWebSocketRequestCallback({socketId:n,initiatorType:"websocket",type:"open",name:i.url,startTimeAbs:performance.timeOrigin+h.timeStamp})},o=h=>{window._highlightWebSocketRequestCallback({socketId:n,initiatorType:"websocket",type:"close",name:i.url,responseEndAbs:performance.timeOrigin+h.timeStamp}),i.removeEventListener("open",s),i.removeEventListener("error",u),i.removeEventListener("message",l),i.removeEventListener("close",o)},l=h=>{const{data:c}=h,f=typeof c=="string"?h.data:void 0;let d;typeof c=="string"?d=c.length:c instanceof Blob?d=c.size:d=c.byteLength||0,window._highlightWebSocketEventCallback({socketId:n,type:"received",name:i.url,timeStamp:performance.timeOrigin+h.timeStamp,size:d,message:f})},u=h=>{window._highlightWebSocketEventCallback({socketId:n,type:"error",name:i.url,timeStamp:performance.timeOrigin+h.timeStamp,size:0})};i.addEventListener("open",s),i.addEventListener("error",u),i.addEventListener("message",l),i.addEventListener("close",o);const a=new Proxy(i.send,{apply:function(h,c,f){const d=f[0],p=typeof d=="string"?d:void 0;let m;typeof d=="string"?m=d.length:d instanceof Blob?m=d.size:m=d.byteLength||0,window._highlightWebSocketEventCallback({socketId:n,type:"sent",name:i.url,timeStamp:performance.timeOrigin+performance.now(),size:m,message:p}),h.apply(c,f)}});return i.send=a,i}});window.WebSocket=e}},cn=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,r)=>e,setAttributes:t=>e,addEvent:(t,r,n)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},pO=()=>{if(typeof window=="undefined"||typeof PerformanceObserver=="undefined")return!1;const e=PerformanceObserver.supportedEntryTypes;return Array.isArray(e)&&e.includes("longtask")},mO=e=>{if(!pO())return()=>{};let t;try{t=new PerformanceObserver(r=>{var n;for(const i of r.getEntries()){const s=(n=i.attribution)==null?void 0:n[0];e({duration:i.duration,name:i.name,startTime:i.startTime,containerType:s==null?void 0:s.containerType,containerSrc:s==null?void 0:s.containerSrc,containerId:s==null?void 0:s.containerId,containerName:s==null?void 0:s.containerName})}}),t.observe({type:"longtask",buffered:!0})}catch(r){return()=>{}}return()=>{try{t.disconnect()}catch(r){}}},gO=new Set(["string","number","boolean"]),yO=()=>typeof window!="undefined"&&typeof window.ReportingObserver!="undefined",bO=e=>{const t={};if(!e||typeof e!="object")return t;for(const[r,n]of Object.entries(e))if(n!=null)if(gO.has(typeof n))t[`report.body.${r}`]=n;else try{t[`report.body.${r}`]=JSON.stringify(n)}catch(i){}return t},vO=e=>{var n;const t=(n=e.body)!=null?n:{},r=t.message||t.reason||t.id||e.type;return typeof r=="string"?r:e.type},SO=(e,t)=>{if(!yO())return()=>{};const r=["deprecation","intervention","csp-violation"],n=window.ReportingObserver;let i;try{i=new n(s=>{var o,l;for(const u of s){const a=(o=u.type)!=null?o:"unknown",h=(l=u.body)!=null?l:{},c=x({"report.type":a,"report.url":u.url},bO(h)),f=vO({type:a,body:h});e(a==="deprecation"?{kind:"log",level:"warn",type:a,message:f,url:u.url,attributes:c}:{kind:"error",type:a,message:f,url:u.url,attributes:c})}},{buffered:!0,types:r}),i.observe()}catch(s){return()=>{}}return()=>{try{i.disconnect()}catch(s){}}},wO="exception",RO=function(e,t,r){if(!e)return;const n=x({},r);typeof t=="string"?n[Bl]=t:t&&(t.code?n[zl]=t.code.toString():t.name&&(n[zl]=t.name),t.message&&(n[Bl]=t.message),t.stack&&(n[fE]=t.stack)),n[zl]||n[Bl]?e.addEvent(wO,n):It("otel","recordException","warn",`Failed to record an exception ${t}`)},_O=["highlight.",`${Cg}.`,"launchdarkly.","session."];function TO(e){return _O.some(t=>e.startsWith(t))}function sb(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function EO(e){return Array.isArray(e)?e.every(t=>t==null||sb(t)):sb(e)}class IO{constructor(t){L(this,"organizationID");L(this,"_options");L(this,"_integrations",[]);L(this,"_gauges",new Map);L(this,"_counters",new Map);L(this,"_histograms",new Map);L(this,"_up_down_counters",new Map);L(this,"sampler",new qy);L(this,"_started",!1);L(this,"_ldContextKeys");L(this,"_globalAttributes",new Map);L(this,"_globalAttributesSnapshot",Object.freeze({}));co(this,ci);this._options=t,this.organizationID=t.projectId,t.debug&&cl(!0)}_productAnalyticsEvents(){var n;const t=(n=this._options)==null?void 0:n.productAnalytics;if(t===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(t===void 0||t===!0)return r;for(const i of Object.keys(t))t[i]===!1&&(r[i]=!1);return r}setLDContextKeyAttributes(t){t&&(this._ldContextKeys=Object.fromEntries(Object.entries(t).map(([r,n])=>[`${Cg}.${r}`,n])))}getLDContextKeyAttributes(){return this._ldContextKeys}setAttributes(t){if(t){for(const[r,n]of Object.entries(t)){if(TO(r)){Ge("setAttributes","warn",`Ignoring reserved attribute key "${r}".`);continue}n==null?this._globalAttributes.delete(r):EO(n)?this._globalAttributes.set(r,n):Ge("setAttributes","warn",`Ignoring attribute "${r}": values must be a string, number, boolean or an array of those.`)}this._updateGlobalAttributesSnapshot()}}removeAttributes(t){if(t){for(const r of t)this._globalAttributes.delete(r);this._updateGlobalAttributesSnapshot()}}getGlobalAttributes(){return this._globalAttributesSnapshot}_updateGlobalAttributesSnapshot(){this._globalAttributesSnapshot=Object.freeze(Object.fromEntries(this._globalAttributes))}_defaultAttributes(){var t;return x(x({},this._globalAttributesSnapshot),(t=this._ldContextKeys)!=null?t:{})}start(){return z(this,null,function*(){var r,n,i,s,o,l,u,a,h,c,f,d,p,m,g,v,y;if(this._started)return;this._started=!0,Xg({backendUrl:(n=(r=this._options)==null?void 0:r.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(s=(i=this._options)==null?void 0:i.otel)==null?void 0:s.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(l=this._options)==null?void 0:l.environment)!=null?u:"production",networkRecordingOptions:typeof((a=this._options)==null?void 0:a.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(h=this._options)==null?void 0:h.tracingOrigins,serviceName:(f=(c=this._options)==null?void 0:c.serviceName)!=null?f:"browser",serviceVersion:(d=this._options)==null?void 0:d.version,instrumentations:(m=(p=this._options)==null?void 0:p.otel)==null?void 0:m.instrumentations,onHttpRequestSpan:(v=(g=this._options)==null?void 0:g.otel)==null?void 0:v.onHttpRequestSpan,productAnalyticsEvents:this._productAnalyticsEvents(),getLDContextKeyAttributes:()=>this.getLDContextKeyAttributes(),getGlobalAttributes:()=>this.getGlobalAttributes(),getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const t=new To((y=this._options.backendUrl)!=null?y:"https://pub.observability.app.launchdarkly.com",{headers:{}});ho(this,ci,nl(t,xu())),yield this.configureSampling(),this.setupListeners()})}stop(){return z(this,null,function*(){this._started&&(this._started=!1,yield Du())})}configureSampling(){return z(this,null,function*(){try{const t=yield uo(this,ci).GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){Ge("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,r,n,i){this.startSpan(Og,s=>{var u,a,h,c,f;const o=rs(typeof t=="string"?t:Rt(t)),l=i?i.map(d=>d.toString()).join(`
|
|
487
|
-
`):void 0;if(s==null||s.addEvent("log",x(x(Y(x({},this._globalAttributesSnapshot),{[Vg]:r,[kg]:o,"code.stacktrace":l}),(u=this._ldContextKeys)!=null?u:{}),n)),this._options.reportConsoleErrors&&r==="error"){const d=new Error(o);s==null||s.recordException(d),s==null||s.setStatus({code:ls.ERROR,message:o}),i?this._recordErrorMessage({error:d,event:d.message,type:"custom",url:window.location.href,source:"frontend",lineNumber:(h=(a=i[0])==null?void 0:a.lineNumber)!=null?h:0,columnNumber:(f=(c=i[0])==null?void 0:c.columnNumber)!=null?f:0,stackTrace:i,timestamp:new Date().toISOString(),id:In()}):this.recordError(d)}})}_recordErrorMessage(t,r){try{t.payload&&(r=x(x({},JSON.parse(t.payload)),r||{}))}catch(o){}this.startSpan("highlight.exception",o=>{var l;RO(o,(l=t.error)!=null?l:new Error(t.event),{[Xx]:t.id}),o==null||o.setAttributes(x({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},r))});const s=t,{payload:n}=s,i=rt(s,["payload"]);for(const o of this._integrations)o.error(Nt(),Y(x({},i),{payload:JSON.stringify(r)}))}recordError(t,r,n,i,s){var a,h,c,f;t=t||new Error("Unknown error"),t instanceof Error&&t.cause&&(n=Y(x({},n),{"exception.cause":JSON.stringify(t.cause)}));let o=r?r+":"+t.message:t.message;s==="React.ErrorBoundary"&&(o="ErrorBoundary: "+o);const l=En(t),u={error:t,event:o,type:s!=null?s:"custom",url:window.location.href,source:i!=null?i:"frontend",lineNumber:(a=l[0])!=null&&a.lineNumber?(h=l[0])==null?void 0:h.lineNumber:0,columnNumber:(c=l[0])!=null&&c.columnNumber?(f=l[0])==null?void 0:f.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),id:In()};this._recordErrorMessage(u,n)}recordCount(t){var n;let r=this._counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createCounter(t.name,lr(t.name,t.unit)),!r)return;this._counters.set(t.name,r)}r.add(t.value,Y(x(x({},this._defaultAttributes()),t.attributes),{"highlight.session_id":Nt()}))}recordGauge(t){var s,o;let r=this._gauges.get(t.name);if(!r){if(r=(s=or())==null?void 0:s.createGauge(t.name,lr(t.name,t.unit)),!r)return;this._gauges.set(t.name,r)}const n=x(x({},this._defaultAttributes()),t.attributes);r.record(t.value,Y(x({},n),{"highlight.session_id":Nt()}));const i={name:t.name,value:t.value,unit:t.unit,category:n.category,group:(o=n.group)==null?void 0:o.toString(),tags:Object.entries(n).map(([l,u])=>{var a;return{name:l!=null?l:"",value:(a=u==null?void 0:u.toString())!=null?a:""}})};for(const l of this._integrations)l.recordGauge(Nt(),i)}recordIncr(t){this.recordCount(Y(x({},t),{value:1}))}recordHistogram(t){var n;let r=this._histograms.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createHistogram(t.name,lr(t.name,t.unit)),!r)return;this._histograms.set(t.name,r)}r.record(t.value,Y(x(x({},this._defaultAttributes()),t.attributes),{"highlight.session_id":Nt()}))}recordUpDownCounter(t){var n;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createUpDownCounter(t.name,lr(t.name,t.unit)),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,Y(x(x({},this._defaultAttributes()),t.attributes),{"highlight.session_id":Nt()}))}startSpan(t,r,n,i){const s=zs();if(!s){const l=cn();return i===void 0&&n===void 0?r(l):i===void 0?n(l):i(l)}const o=(l,u)=>{this._ldContextKeys&&l.setAttributes(this._ldContextKeys);const a=u(l);return a instanceof Promise?a.finally(()=>l.end()):(l.end(),a)};return i===void 0&&n===void 0?s.startActiveSpan(t,l=>o(l,r)):i===void 0?s.startActiveSpan(t,r,l=>o(l,n)):s.startActiveSpan(t,r,n,l=>o(l,i))}startManualSpan(t,r,n,i){const s=zs();if(!s){const o=cn();return i===void 0&&n===void 0?r(o):i===void 0?n(o):i(o)}return i===void 0&&n===void 0?s.startActiveSpan(t,r):i===void 0?s.startActiveSpan(t,r,n):s.startActiveSpan(t,r,n,i)}register(t,r){this._integrations.push(new Js(t,r))}getHooks(t){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,t))!=null?i:[]})}submitViewportMetrics({height:t,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:We.ViewportHeight,value:t,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:We.ViewportWidth,value:r,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:We.ScreenHeight,value:n,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:We.ScreenWidth,value:i,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:We.ViewportArea,value:t*r,attributes:{category:xe.Device,group:window.location.href}})}setupListeners(){var r;this._options.disableConsoleRecording||xf(n=>{var i;this._recordLog((i=n.value)==null?void 0:i.join(" "),n.type,n.attributes?JSON.parse(n.attributes):{},n.trace)},{level:(r=this._options.consoleMethodsToRecord)!=null?r:[...il],logger:"console",recordLaunchDarklySdkLogs:this._options.recordLaunchDarklySdkLogs,stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(oy(n=>{Object.entries(n).filter(([i])=>i!=="relativeTimestamp").forEach(([i,s])=>s&&this.recordGauge({name:i,value:s,attributes:{category:xe.Performance,group:window.location.href}}))},0),ny(n=>{this.recordGauge({name:"Jank",value:n.jankAmount,attributes:{category:xe.WebVital,group:n.querySelector}})},0)),Of(n=>{var o;if(ml.includes(n.event)||gl.some(l=>n.event.includes(l)))return;const i=new Error(n.event);i.stack=Rt(n.stackTrace.map(l=>l.toString()));let s={};try{n.payload&&(s=JSON.parse(n.payload))}catch(l){}this._recordErrorMessage(Y(x({},n),{error:(o=n.error)!=null?o:i}),s)},{enablePromisePatch:!!this._options.enablePromisePatch}),Oy(n=>{const{name:i,value:s}=n,{hostname:o,pathname:l,href:u}=window.location,a={group:window.location.pathname,category:xe.WebVital,[nr]:ns(u),[_s]:l,[pE]:o};switch(n.name){case"LCP":{const h=n.attribution;h.element&&(a["web_vital.element"]=h.element),h.url&&(a["web_vital.attribution.url"]=ns(h.url));break}case"CLS":{const h=n.attribution;h.largestShiftTarget&&(a["web_vital.element"]=h.largestShiftTarget),h.loadState&&(a["web_vital.load_state"]=h.loadState);break}case"INP":{const h=n.attribution;h.eventTarget&&(a["web_vital.element"]=h.eventTarget),h.eventType&&(a["web_vital.event_type"]=h.eventType),h.loadState&&(a["web_vital.load_state"]=h.loadState);break}case"FID":{const h=n.attribution;h.eventTarget&&(a["web_vital.element"]=h.eventTarget),h.eventType&&(a["web_vital.event_type"]=h.eventType);break}case"FCP":{const h=n.attribution;h.loadState&&(a["web_vital.load_state"]=h.loadState);break}}this.recordGauge({name:i,value:s,attributes:a})}),$u(n=>{this.submitViewportMetrics(n)}),Gy(n=>{const i={category:xe.Performance,group:window.location.href};n.saveData!==void 0&&(i.saveData=n.saveData.toString()),n.effectiveType!==void 0&&(i.effectiveType=n.effectiveType.toString()),n.type!==void 0&&(i.type=n.type.toString()),Object.entries(n).filter(([s])=>s!=="relativeTimestamp").forEach(([s,o])=>{wf(o)&&this.recordGauge({name:s,value:o,attributes:i})})},new Date().getTime());const{getDeviceDetails:t}=Xy();t&&this.recordGauge({name:We.DeviceMemory,value:t().deviceMemory,attributes:{category:xe.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&mO(n=>{const i={category:xe.Performance,name:n.name,[_s]:window.location.pathname};n.containerType&&(i.container_type=n.containerType),n.containerSrc&&(i.container_src=n.containerSrc),n.containerId&&(i.container_id=n.containerId),n.containerName&&(i.container_name=n.containerName),this.recordHistogram({name:"long_task.duration",value:n.duration,attributes:i})}),this._options.enableReportingObserver!==!1&&SO(n=>{var s;const i=Y(x({},n.attributes),{[_s]:window.location.pathname});if(n.kind==="log")this._recordLog(n.message,(s=n.level)!=null?s:"warn",i);else{const o=new Error(n.message);this.recordError(o,void 0,Object.fromEntries(Object.entries(i).map(([l,u])=>[l,u===void 0?"":String(u)])),"reporting-observer","custom")}})}recordLog(t,r,n){return this._recordLog(t,r,n)}}ci=new WeakMap;function ob(e,t,r){if(typeof r=="function")return r;if(typeof t=="function")return t;if(typeof e=="function")return e}const ab=new Set(["setAttributes","removeAttributes"]);class lb extends ku{applyBufferedAttributes(t){const r=this._callBuffer.filter(({method:n})=>ab.has(n));if(r.length){this._callBuffer=this._callBuffer.filter(({method:n})=>!ab.has(n)),this._sdk=t;for(const{method:n,args:i}of r)this._callSdk(n,i)}}load(t,r){this.applyBufferedAttributes(t),super.load(t,r)}_startSdk(){return z(this,null,function*(){yield this._sdk.start()})}start(){return z(this,null,function*(){return this._start()})}stop(){return z(this,null,function*(){yield this._stop(()=>this._sdk.stop())})}recordGauge(t){return this._bufferCall("recordGauge",[t])}recordCount(t){return this._bufferCall("recordCount",[t])}recordIncr(t){return this._bufferCall("recordIncr",[t])}recordHistogram(t){return this._bufferCall("recordHistogram",[t])}recordUpDownCounter(t){return this._bufferCall("recordUpDownCounter",[t])}startSpan(t,r,n,i){var s;return this._isReady?this._bufferCall("startSpan",[t,r,n,i]):(this._logNoopSpanWarning(),(s=ob(r,n,i))==null?void 0:s(cn()))}startManualSpan(t,r,n,i){var s;return this._isReady?this._bufferCall("startManualSpan",[t,r,n,i]):(this._logNoopSpanWarning(),(s=ob(r,n,i))==null?void 0:s(cn()))}_logNoopSpanWarning(){It("startSpan/startManualSpan called before start()","span-before-start","warn","The span callback runs on a no-op span and the span is not recorded.")}register(t,r){return this._bufferCall("register",[t,r])}recordLog(t,r,n){return this._bufferCall("recordLog",[t,r,n])}recordError(t,r,n,i,s){return this._bufferCall("recordError",[t,r,n,i,s])}setLDContextKeyAttributes(t){return this._bufferCall("setLDContextKeyAttributes",[t])}setAttributes(t){return this._isLoaded?this._callSdk("setAttributes",[t]):this._bufferCall("setAttributes",[t])}removeAttributes(t){return this._isLoaded?this._callSdk("removeAttributes",[t]):this._bufferCall("removeAttributes",[t])}getLDContextKeyAttributes(){return this._isLoaded?this._callSdk("getLDContextKeyAttributes",[]):void 0}}A.LDObserve=void 0,typeof globalThis!="undefined"?globalThis.LDObserve?A.LDObserve=globalThis.LDObserve:(A.LDObserve=new lb,globalThis.LDObserve=A.LDObserve):A.LDObserve=new lb;class ub{constructor(t){L(this,"sessionSecureID");try{t!=null&&t.storageMode&&em(t==null?void 0:t.storageMode),Os(!!(t!=null&&t.sessionCookie)),(t==null?void 0:t.sessionCookieDomain)!==void 0&&tm(t.sessionCookieDomain),t!=null&&t.sessionCookie?sm():Os(!1)}catch(r){Ge("Error initializing @launchdarkly observability plugin","error",r)}}configureSession(t,r){try{const n=Nt(),i=VI(n);let s=Ft(n);s!=null&&s.sessionSecureID?this.sessionSecureID=s.sessionSecureID:(r!=null&&r.sessionKey?this.sessionSecureID=St(`${t}-${r.sessionKey}`):this.sessionSecureID=St(),i!=null&&i.sessionSecureID&&i.sessionSecureID!==this.sessionSecureID&&XI(i.sessionSecureID),ir(this.sessionSecureID),it({sessionSecureID:this.sessionSecureID,sessionKey:r==null?void 0:r.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(n){Ge("Error configuring session in @launchdarkly observability plugin","error",n)}}}class CO extends ub{constructor(r){super(r);L(this,"observe");L(this,"options");L(this,"exposureDeduper");this.options=r,this.exposureDeduper=new EI(r==null?void 0:r.flagExposureDedupeWindowMillis,r==null?void 0:r.flagExposureDedupeMaxSize)}initialize(r,n){try{if(typeof window=="undefined"||typeof document=="undefined"){_e("warn","@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!r){_e("warn","@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(r,n),this.observe=new IO(Y(x({},n),{projectId:r,sessionSecureId:this.sessionSecureID})),A.LDObserve.applyBufferedAttributes(this.observe);const i=n!=null&&n.manualStart?void 0:this.observe.start();A.LDObserve.load(this.observe,{ready:!(n!=null&&n.manualStart),started:i})}catch(i){Ge("Error initializing @launchdarkly/observability SDK","error",i)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(r,n){var i;(i=this.observe)==null||i.register(r,n)}getHooks(r){var i,s,o,l;const n=x(x({[Up]:r.sdk.name,[Dp]:r.sdk.version,[vg]:r.clientSideId,[Wu]:"LaunchDarkly"},(i=r.application)!=null&&i.id?{[Eg]:r.application.id}:{}),(s=r.application)!=null&&s.version?{[Ig]:r.application.version}:{});return this.initialize((l=(o=r.sdkKey)!=null?o:r.mobileKey)!=null?l:r.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,a,h)=>{var f,d,p,m,g,v,y,w,_;for(const S of(p=(d=(f=this.observe)==null?void 0:f.getHooks)==null?void 0:d.call(f,r))!=null?p:[])(m=S.afterIdentify)==null||m.call(S,u,a,h);const c=Qn(u.context);if((g=this.observe)==null||g.setLDContextKeyAttributes(c),h.status==="completed"){this.exposureDeduper.reset();const S=Y(x({},c),{key:(w=(y=(v=this.options)==null?void 0:v.contextFriendlyName)==null?void 0:y.call(v,u.context))!=null?w:Nr(u.context),timeout:u.timeout,canonicalKey:Nr(u.context),[Nx]:h.status});(_=this.observe)==null||_.recordLog("LD.identify","info",x(x({},n),S))}return a},afterEvaluation:(u,a,h)=>{var m,g,v,y,w,_,S,b,R;for(const I of(v=(g=(m=this.observe)==null?void 0:m.getHooks)==null?void 0:g.call(m,r))!=null?v:[])(y=I.afterEvaluation)==null||y.call(I,u,a,h);const c=x({[Sg]:u.flagKey,[_g]:JSON.stringify(h.value)},h.variationIndex!==void 0&&h.variationIndex!==null?{[Tg]:h.variationIndex}:{});if(h.reason)for(const I in Fs){const E=I,C=h.reason[E];C!=null&&(c[Fs[E]]=C)}const f=u.context?Nr(u.context):void 0;u.context&&(c[wg]=JSON.stringify(Qn(u.context)),c[Rg]=f);const d=[u.flagKey,JSON.stringify(h.value),(w=h.variationIndex)!=null?w:"",(S=(_=h.reason)==null?void 0:_.kind)!=null?S:"",(R=(b=h.reason)==null?void 0:b.ruleId)!=null?R:"",f!=null?f:""].join("|");if(!this.observe||!this.exposureDeduper.shouldRecord(d))return a;const p=x(x({},n),c);return this.observe.startSpan(Xu,I=>{I!=null&&I.isRecording()&&(I.addEvent(Ye,p),this.exposureDeduper.markRecorded(d))}),a},afterTrack:u=>{var c,f,d,p,m,g,v,y,w;for(const _ of(d=(f=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=_.afterTrack)==null||p.call(_,u);if(!(((m=this.options)==null?void 0:m.productAnalytics)!==!1&&(typeof((g=this.options)==null?void 0:g.productAnalytics)!="object"||this.options.productAnalytics.trackEvents!==!1)))return;const h=x(Y(x(x({[nr]:window.location.href},(y=(v=this.observe)==null?void 0:v.getLDContextKeyAttributes())!=null?y:{}),n),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{});(w=this.observe)==null||w.startSpan(Zx,_=>{_&&_.setAttributes(h)})}}]}}class ZO{constructor(t){L(this,"options");L(this,"isRunningOnHighlight");L(this,"organizationID");co(this,di);L(this,"events");L(this,"sessionData");L(this,"ready");L(this,"manualStopped");L(this,"state");L(this,"logger");L(this,"enableSegmentIntegration");L(this,"privacySetting");L(this,"enableCanvasRecording");L(this,"samplingStrategy");L(this,"inlineImages");L(this,"inlineVideos");L(this,"inlineStylesheet");L(this,"styleSheetResyncInterval");L(this,"debugOptions");L(this,"listeners");L(this,"firstloadVersion");L(this,"environment");L(this,"sessionShortcut");L(this,"appVersion");L(this,"serviceName");L(this,"_worker");L(this,"_optionsInternal");L(this,"_backendUrl");L(this,"_recordingStartTime");L(this,"_isOnLocalHost");L(this,"_onToggleFeedbackFormVisibility");L(this,"_isCrossOriginIframe");L(this,"_eventBytesSinceSnapshot");L(this,"_lastSnapshotTime");L(this,"_snapshotPayloadIds");L(this,"_lastVisibilityChangeTime");L(this,"pushPayloadTimerId");L(this,"hasSessionUnloaded");L(this,"hasPushedData");L(this,"reloaded");L(this,"_hasPreviouslyInitialized");L(this,"_recordStop");L(this,"_integrations",[]);var n,i,s,o,l,u;this.options=t,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(s=(i=this.options)==null?void 0:i.debug)!=null?s:{},this.logger=new Vu(this.debugOptions.clientInteractions),(o=this.options)!=null&&o.debug&&cl(!0),this._worker=new $y,this._worker.onmessage=a=>{var h,c,f;((h=a.data.response)==null?void 0:h.type)===Be.AsyncEvents?(this._snapshotPayloadIds.delete(a.data.response.id)||(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}.
|
|
488
|
-
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((c=a.data.response)==null?void 0:c.type)===Be.CustomEvent?this.addCustomEvent(a.data.response.tag,a.data.response.payload):((f=a.data.response)==null?void 0:f.type)===Be.Stop&&(
|
|
486
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`);const h=new Date().getTime(),c=ky();if(t){const f={session_secure_id:this.sessionData.sessionSecureID,payload_id:h.toString(),events:{events:s},messages:_t({messages:o}),resources:JSON.stringify({resources:n}),web_socket_events:JSON.stringify({webSocketEvents:i}),errors:l,is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:c||void 0},{compressedBase64:d}=yield jy(f);yield t({session_secure_id:this.sessionData.sessionSecureID,payload_id:new Date().getTime().toString(),data:d})}else s.some(f=>f.type===nt.FullSnapshot)&&this._snapshotPayloadIds.add(h),this._worker.postMessage({message:{type:Be.AsyncEvents,id:h,events:s,messages:o,errors:l,resourcesString:JSON.stringify({resources:n}),webSocketEventsString:JSON.stringify({webSocketEvents:i}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:c}});it(this.sessionData),Yt.clearRecordedNetworkResources(this._firstLoadListeners),this.events=this.events.slice(s.length),this._firstLoadListeners.messages=this._firstLoadListeners.messages.slice(o.length),this._firstLoadListeners.errors=this._firstLoadListeners.errors.slice(l.length),Xy(c)})}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}),dt.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}registerLD(t){this._integrations.length||this._integrations.push(new Hs(t))}};ci=new WeakMap;let yc=vc;const tb=({apiKey:e})=>{(function(t,r){var n=t.amplitude||{_q:[],_iq:{}},i=r.createElement("script");i.type="text/javascript",i.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",i.crossOrigin="anonymous",i.async=!0,i.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",i.onload=function(){t.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(e)};var s=r.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s);function o(m,g){m.prototype[g]=function(){return this._q.push([g].concat(Array.prototype.slice.call(arguments,0))),this}}for(var l=function(){return this._q=[],this},u=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],a=0;a<u.length;a++)o(l,u[a]);n.Identify=l;for(var h=function(){return this._q=[],this},c=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],f=0;f<c.length;f++)o(h,c[f]);n.Revenue=h;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function p(m){function g(y){m[y]=function(){m._q.push([y].concat(Array.prototype.slice.call(arguments,0)))}}for(var v=0;v<d.length;v++)g(d[v])}p(n),n.getInstance=function(m){return m=(!m||m.length===0?"$default_instance":m).toLowerCase(),Object.prototype.hasOwnProperty.call(n._iq,m)||(n._iq[m]={_q:[]},p(n._iq[m])),n._iq[m]},t.amplitude=n})(window,document)},rb=({projectToken:e})=>{if(window.mixpanel)return;(function(r,n){if(!n.__SV){var i,s;window.mixpanel=n,n._i=[],n.init=function(o,l,u){function a(f,d){var p=d.split(".");p.length==2&&(f=f[p[0]],d=p[1]),f[d]=function(){f.push([d].concat(Array.prototype.slice.call(arguments,0)))}}var h=n;for(typeof u!="undefined"?h=n[u]=[]:u="mixpanel",h.people=h.people||[],h.toString=function(f){var d="mixpanel";return u!=="mixpanel"&&(d+="."+u),f||(d+=" (stub)"),d},h.people.toString=function(){return h.toString(1)+".people (stub)"},i="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(" "),s=0;s<i.length;s++)a(h,i[s]);var c="set set_once union unset remove delete".split(" ");h.get_group=function(){function f(g){d[g]=function(){call2_args=arguments,call2=[g].concat(Array.prototype.slice.call(call2_args,0)),h.push([p,call2])}}for(var d={},p=["get_group"].concat(Array.prototype.slice.call(arguments,0)),m=0;m<c.length;m++)f(c[m]);return d},n._i.push([o,l,u])},n.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=mO,document.head.appendChild(t),t.addEventListener("load",()=>{var r;(r=window.mixpanel)==null||r.init(e)})},mO="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",gO=()=>{var e,t;typeof chrome!="undefined"&&((e=chrome==null?void 0:chrome.runtime)!=null&&e.onMessage)&&((t=chrome==null?void 0:chrome.runtime)==null||t.onMessage.addListener((r,n,i)=>{const s=r.action;switch(console.log(`[highlight] received '${s}' event from extension.`),s){case"init":{be.init(1,{debug:!0}),be.getSessionURL().then(o=>{i({url:o})});break}case"stop":{be.stop(),i({success:!0});break}}return!0}))};function yO(e){var t;e.on&&((t=e.webContents)!=null&&t.send)&&(e.on("focus",()=>{e.webContents.send("highlight.run",{visible:!0})}),e.on("blur",()=>{e.webContents.send("highlight.run",{visible:!1})}),e.on("close",()=>{e.webContents.send("highlight.run",{visible:!1})}))}const bO=({next:e,payload:t})=>{if(typeof window!="undefined"&&typeof document!="undefined"&&"H"in window){if(t.obj.type==="track"){const r=t.obj.event,n=t.obj.properties;window.H.track(r,n)}else if(t.obj.type==="identify"){const r=t.obj.userId;if(r!=null&&r.length){const n=t.obj.traits;window.H.identify(r,n)}}}e(t)},nb=()=>{if(typeof window!="undefined"){if(typeof window._highlightFetchPatch!="undefined")return;window._originalFetch=window.fetch,window._fetchProxy=(e,t)=>window._originalFetch(e,t),window._highlightFetchPatch=(e,t)=>window._fetchProxy.call(window||global,e,t),window.fetch=window._highlightFetchPatch}},ib=()=>null,sb=()=>{if(typeof window!="undefined"){if(typeof window._highlightWebSocketRequestCallback!="undefined")return;window._highlightWebSocketRequestCallback=ib,window._highlightWebSocketEventCallback=ib;const e=new Proxy(window.WebSocket,{construct(t,r){const[,n]=lu(),i=new t(...r),s=h=>{window._highlightWebSocketRequestCallback({socketId:n,initiatorType:"websocket",type:"open",name:i.url,startTimeAbs:performance.timeOrigin+h.timeStamp})},o=h=>{window._highlightWebSocketRequestCallback({socketId:n,initiatorType:"websocket",type:"close",name:i.url,responseEndAbs:performance.timeOrigin+h.timeStamp}),i.removeEventListener("open",s),i.removeEventListener("error",u),i.removeEventListener("message",l),i.removeEventListener("close",o)},l=h=>{const{data:c}=h,f=typeof c=="string"?h.data:void 0;let d;typeof c=="string"?d=c.length:c instanceof Blob?d=c.size:d=c.byteLength||0,window._highlightWebSocketEventCallback({socketId:n,type:"received",name:i.url,timeStamp:performance.timeOrigin+h.timeStamp,size:d,message:f})},u=h=>{window._highlightWebSocketEventCallback({socketId:n,type:"error",name:i.url,timeStamp:performance.timeOrigin+h.timeStamp,size:0})};i.addEventListener("open",s),i.addEventListener("error",u),i.addEventListener("message",l),i.addEventListener("close",o);const a=new Proxy(i.send,{apply:function(h,c,f){const d=f[0],p=typeof d=="string"?d:void 0;let m;typeof d=="string"?m=d.length:d instanceof Blob?m=d.size:m=d.byteLength||0,window._highlightWebSocketEventCallback({socketId:n,type:"sent",name:i.url,timeStamp:performance.timeOrigin+performance.now(),size:m,message:p}),h.apply(c,f)}});return i.send=a,i}});window.WebSocket=e}},cn=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,r)=>e,setAttributes:t=>e,addEvent:(t,r,n)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},vO=()=>{if(typeof window=="undefined"||typeof PerformanceObserver=="undefined")return!1;const e=PerformanceObserver.supportedEntryTypes;return Array.isArray(e)&&e.includes("longtask")},SO=e=>{if(!vO())return()=>{};let t;try{t=new PerformanceObserver(r=>{var n;for(const i of r.getEntries()){const s=(n=i.attribution)==null?void 0:n[0];e({duration:i.duration,name:i.name,startTime:i.startTime,containerType:s==null?void 0:s.containerType,containerSrc:s==null?void 0:s.containerSrc,containerId:s==null?void 0:s.containerId,containerName:s==null?void 0:s.containerName})}}),t.observe({type:"longtask",buffered:!0})}catch(r){return()=>{}}return()=>{try{t.disconnect()}catch(r){}}},wO=new Set(["string","number","boolean"]),_O=()=>typeof window!="undefined"&&typeof window.ReportingObserver!="undefined",RO=e=>{const t={};if(!e||typeof e!="object")return t;for(const[r,n]of Object.entries(e))if(n!=null)if(wO.has(typeof n))t[`report.body.${r}`]=n;else try{t[`report.body.${r}`]=JSON.stringify(n)}catch(i){}return t},TO=e=>{var n;const t=(n=e.body)!=null?n:{},r=t.message||t.reason||t.id||e.type;return typeof r=="string"?r:e.type},EO=(e,t)=>{if(!_O())return()=>{};const r=["deprecation","intervention","csp-violation"],n=window.ReportingObserver;let i;try{i=new n(s=>{var o,l;for(const u of s){const a=(o=u.type)!=null?o:"unknown",h=(l=u.body)!=null?l:{},c=x({"report.type":a,"report.url":u.url},RO(h)),f=TO({type:a,body:h});e(a==="deprecation"?{kind:"log",level:"warn",type:a,message:f,url:u.url,attributes:c}:{kind:"error",type:a,message:f,url:u.url,attributes:c})}},{buffered:!0,types:r}),i.observe()}catch(s){return()=>{}}return()=>{try{i.disconnect()}catch(s){}}},IO="exception",CO=function(e,t,r){if(!e)return;const n=x({},r);typeof t=="string"?n[Kl]=t:t&&(t.code?n[jl]=t.code.toString():t.name&&(n[jl]=t.name),t.message&&(n[Kl]=t.message),t.stack&&(n[yE]=t.stack)),n[jl]||n[Kl]?e.addEvent(IO,n):It("otel","recordException","warn",`Failed to record an exception ${t}`)},ZO=Object.freeze(["utm_source","utm_medium","utm_campaign","utm_term","utm_content"]);function ob(e,t){const r={};if(!e||!t.length)return r;const n=new Set,i=[];for(const s of t)typeof s!="string"||!s||(s.endsWith("*")?i.push(s.slice(0,-1)):n.add(s));return new URLSearchParams(e).forEach((s,o)=>{!s||o in r||(n.has(o)||i.some(l=>o.startsWith(l)))&&(r[o]=s)}),r}function ab(e){return e===void 0?ZO:Array.isArray(e)?e:[]}const LO="landing.referrer";function xO(e,t){if(!e)return;let r;try{r=new URL(e)}catch(n){return}if(!(r.origin!=="null"&&r.origin===t))return r.search="",r.hash="",r.username="",r.password="",r.href}const NO=["highlight.",`${Zg}.`,"launchdarkly.","session."];function lb(e){return NO.some(t=>e.startsWith(t))}function ub(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function OO(e){return Array.isArray(e)?e.every(t=>t==null||ub(t)):ub(e)}class GO{constructor(t){L(this,"organizationID");L(this,"_options");L(this,"_integrations",[]);L(this,"_gauges",new Map);L(this,"_counters",new Map);L(this,"_histograms",new Map);L(this,"_up_down_counters",new Map);L(this,"sampler",new eb);L(this,"_started",!1);L(this,"_ldContextKeys");L(this,"_globalAttributes",new Map);L(this,"_globalAttributesSnapshot",Object.freeze({}));L(this,"_capturedQueryParams",new Map);L(this,"_stopLandingListener");L(this,"_lastLandingUrl");fo(this,di);this._options=t,this.organizationID=t.projectId,t.debug&&hl(!0),this._captureLanding()}_captureLanding(){if(!(typeof window=="undefined"||typeof location=="undefined"))try{if(this._options.captureReferrer!==!1){const r=xO(typeof document=="undefined"?"":document.referrer,location.origin);r&&this._setAttributes({[LO]:r})}const t=ab(this._options.captureQueryParams);if(!t.length)return;this._lastLandingUrl=location.href,this._applyCapturedQueryParams(ob(location.search,t)),this._listenForLandings()}catch(t){Ce("captureQueryParams","warn",t)}}_listenForLandings(){if(this._stopLandingListener||typeof window=="undefined")return;const t=ab(this._options.captureQueryParams);if(t.length)try{this._stopLandingListener=Ys(r=>{if(r!==this._lastLandingUrl){this._lastLandingUrl=r;try{this._applyCapturedQueryParams(ob(new URL(r).search,t))}catch(n){Ce("captureQueryParams","warn",n)}}})}catch(r){Ce("captureQueryParams","warn",r)}}_applyCapturedQueryParams(t){if(!Object.keys(t).length)return;for(const n of this._capturedQueryParams.keys())n in t||(this._capturedQueryParams.delete(n),this._globalAttributes.delete(n));const r={};for(const[n,i]of Object.entries(t))this._globalAttributes.has(n)&&!this._capturedQueryParams.has(n)||lb(n)||(this._capturedQueryParams.set(n,i),r[n]=i);this._setAttributes(r)}_productAnalyticsEvents(){var n;const t=(n=this._options)==null?void 0:n.productAnalytics;if(t===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(t===void 0||t===!0)return r;for(const i of Object.keys(t))t[i]===!1&&(r[i]=!1);return r}setLDContextKeyAttributes(t){t&&(this._ldContextKeys=Object.fromEntries(Object.entries(t).map(([r,n])=>[`${Zg}.${r}`,n])))}getLDContextKeyAttributes(){return this._ldContextKeys}setAttributes(t){if(t){for(const r of Object.keys(t))this._capturedQueryParams.delete(r);this._setAttributes(t)}}_setAttributes(t){for(const[r,n]of Object.entries(t)){if(lb(r)){Ce("setAttributes","warn",`Ignoring reserved attribute key "${r}".`);continue}n==null?this._globalAttributes.delete(r):OO(n)?this._globalAttributes.set(r,n):Ce("setAttributes","warn",`Ignoring attribute "${r}": values must be a string, number, boolean or an array of those.`)}this._updateGlobalAttributesSnapshot()}removeAttributes(t){if(t){for(const r of t)this._capturedQueryParams.delete(r),this._globalAttributes.delete(r);this._updateGlobalAttributesSnapshot()}}getGlobalAttributes(){return this._globalAttributesSnapshot}_updateGlobalAttributesSnapshot(){this._globalAttributesSnapshot=Object.freeze(Object.fromEntries(this._globalAttributes))}_defaultAttributes(){var t;return x(x({},this._globalAttributesSnapshot),(t=this._ldContextKeys)!=null?t:{})}start(){return z(this,null,function*(){var r,n,i,s,o,l,u,a,h,c,f,d,p,m,g,v,y;if(this._started)return;this._started=!0,this._listenForLandings(),Wg({backendUrl:(n=(r=this._options)==null?void 0:r.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(s=(i=this._options)==null?void 0:i.otel)==null?void 0:s.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(l=this._options)==null?void 0:l.environment)!=null?u:"production",networkRecordingOptions:typeof((a=this._options)==null?void 0:a.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(h=this._options)==null?void 0:h.tracingOrigins,serviceName:(f=(c=this._options)==null?void 0:c.serviceName)!=null?f:"browser",serviceVersion:(d=this._options)==null?void 0:d.version,instrumentations:(m=(p=this._options)==null?void 0:p.otel)==null?void 0:m.instrumentations,onHttpRequestSpan:(v=(g=this._options)==null?void 0:g.otel)==null?void 0:v.onHttpRequestSpan,productAnalyticsEvents:this._productAnalyticsEvents(),getLDContextKeyAttributes:()=>this.getLDContextKeyAttributes(),getGlobalAttributes:()=>this.getGlobalAttributes(),getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const t=new Io((y=this._options.backendUrl)!=null?y:"https://pub.observability.app.launchdarkly.com",{headers:{}});po(this,di,sl(t,Ou())),yield this.configureSampling(),this.setupListeners()})}stop(){return z(this,null,function*(){var t;this._started&&(this._started=!1,(t=this._stopLandingListener)==null||t.call(this),this._stopLandingListener=void 0,yield Fu())})}configureSampling(){return z(this,null,function*(){try{const t=yield ho(this,di).GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){Ce("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,r,n,i){this.startSpan(Gg,s=>{var u,a,h,c,f;const o=ns(typeof t=="string"?t:_t(t)),l=i?i.map(d=>d.toString()).join(`
|
|
487
|
+
`):void 0;if(s==null||s.addEvent("log",x(x(Y(x({},this._globalAttributesSnapshot),{[kg]:r,[Xg]:o,"code.stacktrace":l}),(u=this._ldContextKeys)!=null?u:{}),n)),this._options.reportConsoleErrors&&r==="error"){const d=new Error(o);s==null||s.recordException(d),s==null||s.setStatus({code:us.ERROR,message:o}),i?this._recordErrorMessage({error:d,event:d.message,type:"custom",url:window.location.href,source:"frontend",lineNumber:(h=(a=i[0])==null?void 0:a.lineNumber)!=null?h:0,columnNumber:(f=(c=i[0])==null?void 0:c.columnNumber)!=null?f:0,stackTrace:i,timestamp:new Date().toISOString(),id:In()}):this.recordError(d)}})}_recordErrorMessage(t,r){try{t.payload&&(r=x(x({},JSON.parse(t.payload)),r||{}))}catch(o){}this.startSpan("highlight.exception",o=>{var l;CO(o,(l=t.error)!=null?l:new Error(t.event),{[Ux]:t.id}),o==null||o.setAttributes(x({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},r))});const s=t,{payload:n}=s,i=rt(s,["payload"]);for(const o of this._integrations)o.error(Nt(),Y(x({},i),{payload:JSON.stringify(r)}))}recordError(t,r,n,i,s){var a,h,c,f;t=t||new Error("Unknown error"),t instanceof Error&&t.cause&&(n=Y(x({},n),{"exception.cause":JSON.stringify(t.cause)}));let o=r?r+":"+t.message:t.message;s==="React.ErrorBoundary"&&(o="ErrorBoundary: "+o);const l=En(t),u={error:t,event:o,type:s!=null?s:"custom",url:window.location.href,source:i!=null?i:"frontend",lineNumber:(a=l[0])!=null&&a.lineNumber?(h=l[0])==null?void 0:h.lineNumber:0,columnNumber:(c=l[0])!=null&&c.columnNumber?(f=l[0])==null?void 0:f.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),id:In()};this._recordErrorMessage(u,n)}recordCount(t){var n;let r=this._counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createCounter(t.name,lr(t.name,t.unit)),!r)return;this._counters.set(t.name,r)}r.add(t.value,Y(x(x({},this._defaultAttributes()),t.attributes),{"highlight.session_id":Nt()}))}recordGauge(t){var s,o;let r=this._gauges.get(t.name);if(!r){if(r=(s=or())==null?void 0:s.createGauge(t.name,lr(t.name,t.unit)),!r)return;this._gauges.set(t.name,r)}const n=x(x({},this._defaultAttributes()),t.attributes);r.record(t.value,Y(x({},n),{"highlight.session_id":Nt()}));const i={name:t.name,value:t.value,unit:t.unit,category:n.category,group:(o=n.group)==null?void 0:o.toString(),tags:Object.entries(n).map(([l,u])=>{var a;return{name:l!=null?l:"",value:(a=u==null?void 0:u.toString())!=null?a:""}})};for(const l of this._integrations)l.recordGauge(Nt(),i)}recordIncr(t){this.recordCount(Y(x({},t),{value:1}))}recordHistogram(t){var n;let r=this._histograms.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createHistogram(t.name,lr(t.name,t.unit)),!r)return;this._histograms.set(t.name,r)}r.record(t.value,Y(x(x({},this._defaultAttributes()),t.attributes),{"highlight.session_id":Nt()}))}recordUpDownCounter(t){var n;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createUpDownCounter(t.name,lr(t.name,t.unit)),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,Y(x(x({},this._defaultAttributes()),t.attributes),{"highlight.session_id":Nt()}))}startSpan(t,r,n,i){const s=js();if(!s){const l=cn();return i===void 0&&n===void 0?r(l):i===void 0?n(l):i(l)}const o=(l,u)=>{this._ldContextKeys&&l.setAttributes(this._ldContextKeys);const a=u(l);return a instanceof Promise?a.finally(()=>l.end()):(l.end(),a)};return i===void 0&&n===void 0?s.startActiveSpan(t,l=>o(l,r)):i===void 0?s.startActiveSpan(t,r,l=>o(l,n)):s.startActiveSpan(t,r,n,l=>o(l,i))}startManualSpan(t,r,n,i){const s=js();if(!s){const o=cn();return i===void 0&&n===void 0?r(o):i===void 0?n(o):i(o)}return i===void 0&&n===void 0?s.startActiveSpan(t,r):i===void 0?s.startActiveSpan(t,r,n):s.startActiveSpan(t,r,n,i)}register(t,r){this._integrations.push(new Hs(t,r))}getHooks(t){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,t))!=null?i:[]})}submitViewportMetrics({height:t,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:We.ViewportHeight,value:t,attributes:{category:Ne.Device,group:window.location.href}}),this.recordGauge({name:We.ViewportWidth,value:r,attributes:{category:Ne.Device,group:window.location.href}}),this.recordGauge({name:We.ScreenHeight,value:n,attributes:{category:Ne.Device,group:window.location.href}}),this.recordGauge({name:We.ScreenWidth,value:i,attributes:{category:Ne.Device,group:window.location.href}}),this.recordGauge({name:We.ViewportArea,value:t*r,attributes:{category:Ne.Device,group:window.location.href}})}setupListeners(){var r;this._options.disableConsoleRecording||Nf(n=>{var i;this._recordLog((i=n.value)==null?void 0:i.join(" "),n.type,n.attributes?JSON.parse(n.attributes):{},n.trace)},{level:(r=this._options.consoleMethodsToRecord)!=null?r:[...ol],logger:"console",recordLaunchDarklySdkLogs:this._options.recordLaunchDarklySdkLogs,stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(ay(n=>{Object.entries(n).filter(([i])=>i!=="relativeTimestamp").forEach(([i,s])=>s&&this.recordGauge({name:i,value:s,attributes:{category:Ne.Performance,group:window.location.href}}))},0),iy(n=>{this.recordGauge({name:"Jank",value:n.jankAmount,attributes:{category:Ne.WebVital,group:n.querySelector}})},0)),Gf(n=>{var o;if(yl.includes(n.event)||bl.some(l=>n.event.includes(l)))return;const i=new Error(n.event);i.stack=_t(n.stackTrace.map(l=>l.toString()));let s={};try{n.payload&&(s=JSON.parse(n.payload))}catch(l){}this._recordErrorMessage(Y(x({},n),{error:(o=n.error)!=null?o:i}),s)},{enablePromisePatch:!!this._options.enablePromisePatch}),Gy(n=>{const{name:i,value:s}=n,{hostname:o,pathname:l,href:u}=window.location,a={group:window.location.pathname,category:Ne.WebVital,[nr]:is(u),[Ts]:l,[bE]:o};switch(n.name){case"LCP":{const h=n.attribution;h.element&&(a["web_vital.element"]=h.element),h.url&&(a["web_vital.attribution.url"]=is(h.url));break}case"CLS":{const h=n.attribution;h.largestShiftTarget&&(a["web_vital.element"]=h.largestShiftTarget),h.loadState&&(a["web_vital.load_state"]=h.loadState);break}case"INP":{const h=n.attribution;h.eventTarget&&(a["web_vital.element"]=h.eventTarget),h.eventType&&(a["web_vital.event_type"]=h.eventType),h.loadState&&(a["web_vital.load_state"]=h.loadState);break}case"FID":{const h=n.attribution;h.eventTarget&&(a["web_vital.element"]=h.eventTarget),h.eventType&&(a["web_vital.event_type"]=h.eventType);break}case"FCP":{const h=n.attribution;h.loadState&&(a["web_vital.load_state"]=h.loadState);break}}this.recordGauge({name:i,value:s,attributes:a})}),qu(n=>{this.submitViewportMetrics(n)}),Vy(n=>{const i={category:Ne.Performance,group:window.location.href};n.saveData!==void 0&&(i.saveData=n.saveData.toString()),n.effectiveType!==void 0&&(i.effectiveType=n.effectiveType.toString()),n.type!==void 0&&(i.type=n.type.toString()),Object.entries(n).filter(([s])=>s!=="relativeTimestamp").forEach(([s,o])=>{_f(o)&&this.recordGauge({name:s,value:o,attributes:i})})},new Date().getTime());const{getDeviceDetails:t}=Wy();t&&this.recordGauge({name:We.DeviceMemory,value:t().deviceMemory,attributes:{category:Ne.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&SO(n=>{const i={category:Ne.Performance,name:n.name,[Ts]:window.location.pathname};n.containerType&&(i.container_type=n.containerType),n.containerSrc&&(i.container_src=n.containerSrc),n.containerId&&(i.container_id=n.containerId),n.containerName&&(i.container_name=n.containerName),this.recordHistogram({name:"long_task.duration",value:n.duration,attributes:i})}),this._options.enableReportingObserver!==!1&&EO(n=>{var s;const i=Y(x({},n.attributes),{[Ts]:window.location.pathname});if(n.kind==="log")this._recordLog(n.message,(s=n.level)!=null?s:"warn",i);else{const o=new Error(n.message);this.recordError(o,void 0,Object.fromEntries(Object.entries(i).map(([l,u])=>[l,u===void 0?"":String(u)])),"reporting-observer","custom")}})}recordLog(t,r,n){return this._recordLog(t,r,n)}}di=new WeakMap;function cb(e,t,r){if(typeof r=="function")return r;if(typeof t=="function")return t;if(typeof e=="function")return e}const db=new Set(["setAttributes","removeAttributes"]);class hb extends Wu{applyBufferedAttributes(t){const r=this._callBuffer.filter(({method:n})=>db.has(n));if(r.length){this._callBuffer=this._callBuffer.filter(({method:n})=>!db.has(n)),this._sdk=t;for(const{method:n,args:i}of r)this._callSdk(n,i)}}load(t,r){this.applyBufferedAttributes(t),super.load(t,r)}_startSdk(){return z(this,null,function*(){yield this._sdk.start()})}start(){return z(this,null,function*(){return this._start()})}stop(){return z(this,null,function*(){yield this._stop(()=>this._sdk.stop())})}recordGauge(t){return this._bufferCall("recordGauge",[t])}recordCount(t){return this._bufferCall("recordCount",[t])}recordIncr(t){return this._bufferCall("recordIncr",[t])}recordHistogram(t){return this._bufferCall("recordHistogram",[t])}recordUpDownCounter(t){return this._bufferCall("recordUpDownCounter",[t])}startSpan(t,r,n,i){var s;return this._isReady?this._bufferCall("startSpan",[t,r,n,i]):(this._logNoopSpanWarning(),(s=cb(r,n,i))==null?void 0:s(cn()))}startManualSpan(t,r,n,i){var s;return this._isReady?this._bufferCall("startManualSpan",[t,r,n,i]):(this._logNoopSpanWarning(),(s=cb(r,n,i))==null?void 0:s(cn()))}_logNoopSpanWarning(){It("startSpan/startManualSpan called before start()","span-before-start","warn","The span callback runs on a no-op span and the span is not recorded.")}register(t,r){return this._bufferCall("register",[t,r])}recordLog(t,r,n){return this._bufferCall("recordLog",[t,r,n])}recordError(t,r,n,i,s){return this._bufferCall("recordError",[t,r,n,i,s])}setLDContextKeyAttributes(t){return this._bufferCall("setLDContextKeyAttributes",[t])}setAttributes(t){return this._isLoaded?this._callSdk("setAttributes",[t]):this._bufferCall("setAttributes",[t])}removeAttributes(t){return this._isLoaded?this._callSdk("removeAttributes",[t]):this._bufferCall("removeAttributes",[t])}getLDContextKeyAttributes(){return this._isLoaded?this._callSdk("getLDContextKeyAttributes",[]):void 0}}A.LDObserve=void 0,typeof globalThis!="undefined"?globalThis.LDObserve?A.LDObserve=globalThis.LDObserve:(A.LDObserve=new hb,globalThis.LDObserve=A.LDObserve):A.LDObserve=new hb;class fb{constructor(t){L(this,"sessionSecureID");try{t!=null&&t.storageMode&&tm(t==null?void 0:t.storageMode),Gs(!!(t!=null&&t.sessionCookie)),(t==null?void 0:t.sessionCookieDomain)!==void 0&&rm(t.sessionCookieDomain),t!=null&&t.sessionCookie?om():Gs(!1)}catch(r){Ce("Error initializing @launchdarkly observability plugin","error",r)}}configureSession(t,r){try{const n=Nt(),i=PI(n);let s=Ft(n);s!=null&&s.sessionSecureID?this.sessionSecureID=s.sessionSecureID:(r!=null&&r.sessionKey?this.sessionSecureID=St(`${t}-${r.sessionKey}`):this.sessionSecureID=St(),i!=null&&i.sessionSecureID&&i.sessionSecureID!==this.sessionSecureID&&AI(i.sessionSecureID),ir(this.sessionSecureID),it({sessionSecureID:this.sessionSecureID,sessionKey:r==null?void 0:r.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(n){Ce("Error configuring session in @launchdarkly observability plugin","error",n)}}}class VO extends fb{constructor(r){super(r);L(this,"observe");L(this,"options");L(this,"exposureDeduper");this.options=r,this.exposureDeduper=new LI(r==null?void 0:r.flagExposureDedupeWindowMillis,r==null?void 0:r.flagExposureDedupeMaxSize)}initialize(r,n){try{if(typeof window=="undefined"||typeof document=="undefined"){Re("warn","@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!r){Re("warn","@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(r,n),this.observe=new GO(Y(x({},n),{projectId:r,sessionSecureId:this.sessionSecureID})),A.LDObserve.applyBufferedAttributes(this.observe);const i=n!=null&&n.manualStart?void 0:this.observe.start();A.LDObserve.load(this.observe,{ready:!(n!=null&&n.manualStart),started:i})}catch(i){Ce("Error initializing @launchdarkly/observability SDK","error",i)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(r,n){var i;(i=this.observe)==null||i.register(r,n)}getHooks(r){var i,s,o,l;const n=x(x({[Dp]:r.sdk.name,[Fp]:r.sdk.version,[Sg]:r.clientSideId,[Mu]:"LaunchDarkly"},(i=r.application)!=null&&i.id?{[Ig]:r.application.id}:{}),(s=r.application)!=null&&s.version?{[Cg]:r.application.version}:{});return this.initialize((l=(o=r.sdkKey)!=null?o:r.mobileKey)!=null?l:r.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,a,h)=>{var f,d,p,m,g,v,y,w,R;for(const S of(p=(d=(f=this.observe)==null?void 0:f.getHooks)==null?void 0:d.call(f,r))!=null?p:[])(m=S.afterIdentify)==null||m.call(S,u,a,h);const c=Qn(u.context);if((g=this.observe)==null||g.setLDContextKeyAttributes(c),h.status==="completed"){this.exposureDeduper.reset();const S=Y(x({},c),{key:(w=(y=(v=this.options)==null?void 0:v.contextFriendlyName)==null?void 0:y.call(v,u.context))!=null?w:Nr(u.context),timeout:u.timeout,canonicalKey:Nr(u.context),[kx]:h.status});(R=this.observe)==null||R.recordLog("LD.identify","info",x(x({},n),S))}return a},afterEvaluation:(u,a,h)=>{var m,g,v,y,w,R,S,b,_;for(const I of(v=(g=(m=this.observe)==null?void 0:m.getHooks)==null?void 0:g.call(m,r))!=null?v:[])(y=I.afterEvaluation)==null||y.call(I,u,a,h);const c=x({[wg]:u.flagKey,[Tg]:JSON.stringify(h.value)},h.variationIndex!==void 0&&h.variationIndex!==null?{[Eg]:h.variationIndex}:{});if(h.reason)for(const I in Js){const E=I,C=h.reason[E];C!=null&&(c[Js[E]]=C)}const f=u.context?Nr(u.context):void 0;u.context&&(c[_g]=JSON.stringify(Qn(u.context)),c[Rg]=f);const d=[u.flagKey,JSON.stringify(h.value),(w=h.variationIndex)!=null?w:"",(S=(R=h.reason)==null?void 0:R.kind)!=null?S:"",(_=(b=h.reason)==null?void 0:b.ruleId)!=null?_:"",f!=null?f:""].join("|");if(!this.observe||!this.exposureDeduper.shouldRecord(d))return a;const p=x(x({},n),c);return this.observe.startSpan(Pu,I=>{I!=null&&I.isRecording()&&(I.addEvent(Ye,p),this.exposureDeduper.markRecorded(d))}),a},afterTrack:u=>{var c,f,d,p,m,g,v,y,w;for(const R of(d=(f=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=R.afterTrack)==null||p.call(R,u);if(!(((m=this.options)==null?void 0:m.productAnalytics)!==!1&&(typeof((g=this.options)==null?void 0:g.productAnalytics)!="object"||this.options.productAnalytics.trackEvents!==!1)))return;const h=x(Y(x(x({[nr]:window.location.href},(y=(v=this.observe)==null?void 0:v.getLDContextKeyAttributes())!=null?y:{}),n),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{});(w=this.observe)==null||w.startSpan(Ox,R=>{R&&R.setAttributes(h)})}}]}}class kO{constructor(t){L(this,"options");L(this,"isRunningOnHighlight");L(this,"organizationID");fo(this,hi);L(this,"events");L(this,"sessionData");L(this,"ready");L(this,"manualStopped");L(this,"state");L(this,"logger");L(this,"enableSegmentIntegration");L(this,"privacySetting");L(this,"enableCanvasRecording");L(this,"samplingStrategy");L(this,"inlineImages");L(this,"inlineVideos");L(this,"inlineStylesheet");L(this,"styleSheetResyncInterval");L(this,"debugOptions");L(this,"listeners");L(this,"firstloadVersion");L(this,"environment");L(this,"sessionShortcut");L(this,"appVersion");L(this,"serviceName");L(this,"_worker");L(this,"_optionsInternal");L(this,"_backendUrl");L(this,"_recordingStartTime");L(this,"_isOnLocalHost");L(this,"_onToggleFeedbackFormVisibility");L(this,"_isCrossOriginIframe");L(this,"_eventBytesSinceSnapshot");L(this,"_lastSnapshotTime");L(this,"_snapshotPayloadIds");L(this,"_lastVisibilityChangeTime");L(this,"pushPayloadTimerId");L(this,"hasSessionUnloaded");L(this,"hasPushedData");L(this,"reloaded");L(this,"_hasPreviouslyInitialized");L(this,"_recordStop");L(this,"_integrations",[]);var n,i,s,o,l,u;this.options=t,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(s=(i=this.options)==null?void 0:i.debug)!=null?s:{},this.logger=new Xu(this.debugOptions.clientInteractions),(o=this.options)!=null&&o.debug&&hl(!0),this._worker=new qy,this._worker.onmessage=a=>{var h,c,f;((h=a.data.response)==null?void 0:h.type)===Be.AsyncEvents?(this._snapshotPayloadIds.delete(a.data.response.id)||(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}.
|
|
488
|
+
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((c=a.data.response)==null?void 0:c.type)===Be.CustomEvent?this.addCustomEvent(a.data.response.tag,a.data.response.payload):((f=a.data.response)==null?void 0:f.type)===Be.Stop&&(Ce("worker.onmessage","warn","Stopping recording due to worker failure",a.data.response),this.stop(!1))};let r=Ft();if(this.reloaded=!1,!((l=this.sessionData)!=null&&l.sessionSecureID)&&(r!=null&&r.sessionSecureID))this.sessionData=r,this.options.sessionSecureID=r.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const a of Object.values(Ve))Tr(a);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1;try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch(a){this._isCrossOriginIframe=(u=this.options.recordCrossOriginIframe)!=null?u:!0}this._initMembers(this.options)}_reset(n){return z(this,arguments,function*({forceNew:t,sessionKey:r}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let i,s;if(!t)try{i=He(Ve.USER_IDENTIFIER);const o=He(Ve.USER_OBJECT);o&&(s=JSON.parse(o))}catch(o){}for(const o of Object.values(Ve))Tr(o);this.sessionData.sessionSecureID=r?St(`${this.organizationID}-${r}`):St(),this.sessionData.sessionKey=r,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),this._worker.postMessage({message:{type:Be.Reset}}),yield this.start(),i&&s&&this.identify(i,s)})}_initMembers(t){var s,o,l,u,a,h,c,f,d,p;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=(o=t.enableCanvasRecording)!=null?o:!1,this.inlineImages=(l=t.inlineImages)!=null?l:this._isOnLocalHost,this.inlineVideos=(u=t.inlineVideos)!=null?u:this._isOnLocalHost,this.inlineStylesheet=(a=t.inlineStylesheet)!=null?a:this._isOnLocalHost,this.styleSheetResyncInterval=(h=t.styleSheetResyncInterval)!=null?h:2e3,this.samplingStrategy=x({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:wf()},(c=t.samplingStrategy)!=null?c:{canvas:2}),this._backendUrl=(f=t==null?void 0:t.backendUrl)!=null?f:"https://pub.observability.app.launchdarkly.com",this._backendUrl[0]==="/"&&(this._backendUrl=new URL(this._backendUrl,document.baseURI).href);const r=new Io(`${this._backendUrl}`,{headers:{}});po(this,hi,sl(r,Ou())),this.environment=(d=t.environment)!=null?d:"production",this.appVersion=t.appVersion,this.serviceName=(p=t.serviceName)!=null?p:"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 m=t,{firstloadVersion:n}=m,i=rt(m,["firstloadVersion"]);this._optionsInternal=i,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._snapshotPayloadIds=new Set,this._lastVisibilityChangeTime=new Date().getTime()}identify(t,r={},n){if(!t||t===""){Ce("identify","warn","Highlight's identify() call was passed an empty identifier.",{user_identifier:t,user_object:r});return}this.sessionData.userIdentifier=t.toString(),this.sessionData.userObject=r,mt(Ve.USER_IDENTIFIER,t.toString()),mt(Ve.USER_OBJECT,JSON.stringify(r)),this._worker.postMessage({message:{type:Be.Identify,userIdentifier:t,userObject:r,source:n}})}track(t,r){this.addProperties(Y(x({},r),{event:t}))}addProperties(t={},r){const n=x({},t);Object.entries(n).forEach(([i,s])=>{try{structuredClone(s)}catch(o){delete n[i]}}),this._worker.postMessage({message:{type:Be.Properties,propertiesObject:n,propertyType:r}})}addSessionProperties(t){this.addProperties(t,{type:"session"})}start(t){return z(this,null,function*(){var r,n,i,s,o,l,u,a,h,c;if(!((r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("Googlebot")||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.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(Y(x({},t),{forceNew:!0}));return}this.logger.log("Initializing...",t,this.sessionData,this.options),this.sessionData=(i=Ft(this.sessionData.sessionSecureID))!=null?i:this.sessionData,(s=this.sessionData)!=null&&s.sessionStartTime?this._recordingStartTime=(o=this.sessionData)==null?void 0:o.sessionStartTime:(this._recordingStartTime=new Date().getTime(),this.sessionData.sessionStartTime=this._recordingStartTime);let f=He(Jn.CLIENT_ID);f||(f=St(),mt(Jn.CLIENT_ID,f));let d;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?d=!1:d=((l=this.options.networkRecording)==null?void 0:l.recordHeadersAndBody)||!1;let p=[];if(typeof this.options.networkRecording=="object"&&((u=this.options.networkRecording.destinationDomains)!=null&&u.length)&&(p=this.options.networkRecording.destinationDomains),this._isCrossOriginIframe)yield this._setupCrossOriginIframe();else{const w=yield ho(this,hi).initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:d,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this._optionsInternal),environment:this.environment,id:f,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,session_key:this.sessionData.sessionKey,client_id:f,network_recording_domains:p,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(((a=w==null?void 0:w.initializeSession)==null?void 0:a.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){Re("error","Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}ir(""),it(this.sessionData),this.logger.log(`Loaded Highlight
|
|
489
489
|
Remote: ${this._backendUrl}
|
|
490
490
|
Project ID: ${this.sessionData.projectID}
|
|
491
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Be.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()},
|
|
491
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Be.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()},Cs)),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 m=(w,R)=>{R&&this.logger.log("received isCheckout emit",{event:w}),this.events.push(w)};m.bind(this);const g=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[v,y]=Yg(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=dt({ignoreClass:(h=this.options.ignoreClass)!=null?h:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(c=this.options.blockClass)!=null?c:"highlight-block",blockSelector:this.options.blockSelector,emit:m,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:Bg(this.privacySetting,this.options.maskPiiText),maskAllInputs:v,maskInputOptions:y,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,styleSheetResyncInterval:this.styleSheetResyncInterval,plugins:[Le()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:Ce.bind(null,"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(f){Ce("initializeSession _setupWindowListeners","warn",f)}})}_visibilityHandler(t){return z(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<$p||(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 z(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const r=n=>{if(n.data.highlight===oo){const i=n.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:ao},"*"),window.removeEventListener("message",r),t()}};window.addEventListener("message",r)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var r;(r=t.contentWindow)==null||r.postMessage({highlight:oo,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},Cs),window.addEventListener("message",t=>{t.data.highlight===ao&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var n;try{const i=this;this.enableSegmentIntegration&&this.listeners.push(ly(o=>{if(o.type==="track"){const l={};l["segment-event"]=o.event,i.addProperties(l,{type:"track",source:"segment"})}else if(o.type==="identify"){const l=o.userId.replace(/^"(.*)"$/,"$1");i.identify(l,o.traits,"segment")}})),this.listeners.push(Ys(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,i.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(qu(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(ry((o,l)=>{let u=null,a=null;if(l&&l.target){const h=l.target;u=Yu(h),a=h.textContent,a&&a.length>2e3&&(a=a.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:a,clickSelector:u})})),this.listeners.push(ny(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&this.listeners.push(cy(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")})),this._hasPreviouslyInitialized||((n=window.electron)!=null&&n.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this._visibilityHandler(!o)}),this.logger.log("Set up Electron highlight.run events.")):(sy(o=>this._visibilityHandler(o)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const s=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s))}catch(i){Ce("initializeSession _setupWindowListeners","warn",i)}const t=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};if(window.addEventListener("beforeunload",t),this.listeners.push(()=>window.removeEventListener("beforeunload",t)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const i=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(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(r=>r()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:r,sessionSecureID:n}=this.sessionData,i=(t-this._recordingStartTime)/1e3;return`https://${Fn}/${r}/sessions/${n}?ts=${i}`}getCurrentSessionURL(){const t=this.sessionData.projectID,r=this.sessionData.sessionSecureID;return t&&r?`https://${Fn}/${t}/sessions/${r}`:null}snapshot(t){return z(this,null,function*(){yield dt.snapshotCanvas(t)})}addSessionFeedback(t){}_save(){return z(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>tu&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let r;((t=this.options)==null?void 0:t.sendMode)==="local"&&(r=n=>z(this,null,function*(){let i=new Blob([JSON.stringify({query:So(il),variables:n})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:i}),0})),yield this._sendPayload({sendFn:r}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),it(this.sessionData)}catch(r){Ce("_save","warn",r)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},Qp))})}addCustomEvent(t,r){if(this.state==="NotRecording"){let n;const i=()=>{clearInterval(n),this.state==="Recording"&&this.events.length>0?$i(t,r):n=setTimeout(i,500)};n=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&$i(t,r)}_sendPayload(r){return z(this,arguments,function*({sendFn:t}){const n=[...this.events],{bytes:i,time:s}=this.enableCanvasRecording?Zs.canvas:Zs.normal;this._eventBytesSinceSnapshot>=i&&new Date().getTime()-this._lastSnapshotTime>=s&&this.takeFullSnapshot(),this.logger.log(`Sending: ${n.length} events,
|
|
492
492
|
To: ${this._backendUrl}
|
|
493
493
|
Org: ${this.organizationID}
|
|
494
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`);const o=new Date().getTime(),l=Vy();if(t){const u={session_secure_id:this.sessionData.sessionSecureID,payload_id:o.toString(),events:{events:n},messages:Rt({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:l||void 0},{compressedBase64:a}=yield Ky(u);yield t({session_secure_id:this.sessionData.sessionSecureID,payload_id:o.toString(),data:a})}else n.some(u=>u.type===nt.FullSnapshot)&&this._snapshotPayloadIds.add(o),this._worker.postMessage({message:{type:Be.AsyncEvents,id:o,events:n,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:l}});it(this.sessionData),this.events=this.events.slice(n.length),ky(l)})}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}),dt.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}register(t,r){this._integrations.push(new Js(t,r))}getHooks(t){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,t))!=null?i:[]})}getRecordingState(){var t;return(t=this==null?void 0:this.state)!=null?t:"NotRecording"}getSession(){const t=this.sessionData.sessionSecureID,r=Ft(t);if(!r)return null;const n=`${this.getFrontendUrl()}/sessions/${t}`;if(!n||!(r==null?void 0:r.sessionStartTime))return null;const s=new Date().getTime();let o;try{o=new URL(n)}catch(a){return Ge("identify","warn",`failed to construct session url from ${n}`,a),null}const l=new URL(o),u=(s-this._recordingStartTime)/1e3;return l.searchParams.set("ts",u.toString()),{url:o.toString(),urlWithTimestamp:l.toString(),sessionSecureID:t}}getFrontendUrl(){var r,n;const t=this._backendUrl.match(ZI);if(t&&((r=t==null?void 0:t.groups)!=null&&r.domain)){const i=(n=t.groups.domain)!=null?n:"",s=II[i];return s?`https://${s}${CI}`:$p}return $p}}di=new WeakMap;class cb extends ku{constructor(){super(...arguments);L(this,"_deferredStartOptions")}getSession(){return this._isLoaded?this._callSdk("getSession",[]):null}_startSdk(){return z(this,null,function*(){const r=this._deferredStartOptions;this._deferredStartOptions=void 0,yield this._sdk.start(r)})}start(r){return z(this,null,function*(){return this._deferredStartOptions=r,this._start()})}stop(){this._stop(()=>this._sdk.stop())}addSessionProperties(r){return this._bufferCall("addSessionProperties",[r])}getRecordingState(){return this._isLoaded?this._callSdk("getRecordingState",[]):"NotRecording"}snapshot(r){return this._isLoaded?this._callSdk("snapshot",[r]):Promise.resolve(void 0)}register(r,n){return this._bufferCall("register",[r,n])}}A.LDRecord=void 0,typeof globalThis!="undefined"?globalThis.LDRecord?A.LDRecord=globalThis.LDRecord:(A.LDRecord=new cb,globalThis.LDRecord=A.LDRecord):A.LDRecord=new cb;class LO extends ub{constructor(r){super(r);L(this,"record");L(this,"options");this.options=r}initialize(r,n){var i,s,o,l,u,a,h,c,f;try{if(typeof window=="undefined"||typeof document=="undefined"){_e("warn","@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker=="undefined"){_e("warn","@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!r){_e("warn","@launchdarkly/session-replay is not initializing because the SDK credential is undefined.");return}this.configureSession(r,n);const d=Y(x({},n),{organizationID:r,firstloadVersion:Au,environment:(n==null?void 0:n.environment)||"production",appVersion:n==null?void 0:n.version,sessionSecureID:this.sessionSecureID,privacySetting:(i=n==null?void 0:n.privacySetting)!=null?i:"strict"});this.record=new ZO(d);const p=n!=null&&n.manualStart?void 0:this.record.start();A.LDRecord.load(this.record,{ready:!(n!=null&&n.manualStart),started:p}),!((o=(s=n==null?void 0:n.integrations)==null?void 0:s.mixpanel)!=null&&o.disabled)&&((u=(l=n==null?void 0:n.integrations)==null?void 0:l.mixpanel)!=null&&u.projectToken)&&tb(n.integrations.mixpanel),!((h=(a=n==null?void 0:n.integrations)==null?void 0:a.amplitude)!=null&&h.disabled)&&((f=(c=n==null?void 0:n.integrations)==null?void 0:c.amplitude)!=null&&f.apiKey)&&eb(n.integrations.amplitude)}catch(d){Ge("Error initializing @launchdarkly/session-replay SDK","error",d)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(r,n){var i;(i=this.record)==null||i.register(r,n)}getHooks(r){var i,s,o,l;const n=x(x({[Up]:r.sdk.name,[Dp]:r.sdk.version,[vg]:r.clientSideId,[Wu]:"LaunchDarkly"},(i=r.application)!=null&&i.id?{[Eg]:r.application.id}:{}),(s=r.application)!=null&&s.version?{[Ig]:r.application.version}:{});return this.initialize((l=(o=r.sdkKey)!=null?o:r.mobileKey)!=null?l:r.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(u,a,h)=>{var c,f,d,p,m,g,v,y;for(const w of(d=(f=(c=this.record)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=w.afterIdentify)==null||p.call(w,u,a,h);if(h.status==="completed"){const w=Y(x({},Qn(u.context)),{key:(v=(g=(m=this.options)==null?void 0:m.contextFriendlyName)==null?void 0:g.call(m,u.context))!=null?v:Nr(u.context),canonicalKey:Nr(u.context)});(y=this.record)==null||y.identify(w.key,x(x({},n),w),"LaunchDarkly")}return a},afterEvaluation:(u,a,h)=>{var c,f,d,p;for(const m of(d=(f=(c=this.record)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=m.afterEvaluation)==null||p.call(m,u,a,h);return a},afterTrack:u=>{var a,h,c,f,d;for(const p of(c=(h=(a=this.record)==null?void 0:a.getHooks)==null?void 0:h.call(a,r))!=null?c:[])(f=p.afterTrack)==null||f.call(p,u);(d=this.record)==null||d.track(u.key,{data:u.data,value:u.metricValue})}}]}}var db=(e=>(e.Device="Device",e.WebVital="WebVital",e.Frontend="Frontend",e.Backend="Backend",e))(db||{});const tt=(e,t)=>{_e("warn",`highlight.run warning: (${e}): `,t)},xO=200;let ai=[],ao,ne,li,hb=[],yc=!1;const be={options:void 0,init:(e,t)=>{var r,n,i,s,o,l,u,a;try{if(be.options=t,typeof window=="undefined"||typeof document=="undefined")return;if(!e){console.info("Highlight is not initializing because projectID was passed undefined.");return}t!=null&&t.sessionCookie?sm():Os(!1);const h=Ft();let c=St();if(t!=null&&t.sessionKey?c=St(`${e}-${t.sessionKey}`):h!=null&&h.sessionSecureID&&(c=h.sessionSecureID),yc)return{sessionSecureID:c};yc=!0,rb(),ib();const f=Y(x({},t),{organizationID:e,firstloadVersion:Au,environment:(t==null?void 0:t.environment)||"production",appVersion:t==null?void 0:t.version,sessionSecureID:c});return li=new Yt(f),t!=null&&t.manualStart||li.startListening(),ne=ne!=null?ne:new gc(f,li),t!=null&&t.manualStart||ne.initialize(),!((n=(r=t==null?void 0:t.integrations)==null?void 0:r.mixpanel)!=null&&n.disabled)&&((s=(i=t==null?void 0:t.integrations)==null?void 0:i.mixpanel)!=null&&s.projectToken)&&tb(t.integrations.mixpanel),!((l=(o=t==null?void 0:t.integrations)==null?void 0:o.amplitude)!=null&&l.disabled)&&((a=(u=t==null?void 0:t.integrations)==null?void 0:u.amplitude)!=null&&a.apiKey)&&eb(t.integrations.amplitude),{sessionSecureID:c}}catch(h){tt("init",h)}},snapshot:e=>z(this,null,function*(){try{if(ne&&ne.ready)return yield ne.snapshot(e)}catch(t){tt("snapshot",t)}}),addSessionFeedback:()=>{},consumeError:(e,t,r)=>{try{be.onHighlightReady(()=>ne.consumeCustomError(e,t,JSON.stringify(r)))}catch(n){tt("error",n)}},consume:(e,t)=>{try{be.onHighlightReady(()=>ne.consumeError(e,t))}catch(r){tt("error",r)}},error:(e,t)=>{try{be.onHighlightReady(()=>ne.pushCustomError(e,JSON.stringify(t)))}catch(r){tt("error",r)}},track:(e,t={})=>{var r,n,i,s,o,l,u,a,h,c,f;try{be.onHighlightReady(()=>{ne.addProperties(Y(x({},t),{event:e})),ne.log("H.track","INFO",Y(x({},t!=null?t:{}),{event:e}))});const d=ne==null?void 0:ne.getCurrentSessionURL();(i=(n=(r=be.options)==null?void 0:r.integrations)==null?void 0:n.mixpanel)!=null&&i.disabled||(s=window.mixpanel)!=null&&s.track&&window.mixpanel.track(e,Y(x({},t),{highlightSessionURL:d})),(u=(l=(o=be.options)==null?void 0:o.integrations)==null?void 0:l.amplitude)!=null&&u.disabled||(a=window.amplitude)!=null&&a.getInstance&&window.amplitude.getInstance().logEvent(e,Y(x({},t),{highlightSessionURL:d})),(f=(c=(h=be.options)==null?void 0:h.integrations)==null?void 0:c.intercom)!=null&&f.disabled||window.Intercom&&window.Intercom("trackEvent",e,t)}catch(d){tt("track",d)}},log:(e,t,r)=>{try{be.onHighlightReady(()=>ne.log(e,t,r!=null?r:{}))}catch(n){tt("log",n)}},start:e=>{var t;(ne==null?void 0:ne.state)==="Recording"&&!(e!=null&&e.forceNew)?e!=null&&e.silent||console.warn("Highlight is already recording. Please `H.stop()` the current session before starting a new one."):(((t=ne==null?void 0:ne._firstLoadListeners)!=null?t:li).startListening(),be.onHighlightReady(()=>z(this,null,function*(){yield ne.initialize(e)}),{waitForReady:!1}))},stop:e=>{(ne==null?void 0:ne.state)!=="Recording"?e!=null&&e.silent||console.warn("Highlight is already stopped. Please call `H.start()`."):be.onHighlightReady(()=>ne.stopRecording(!0))},identify:(e,t={},r)=>{var n,i,s,o,l,u,a,h;try{be.onHighlightReady(()=>ne.identify(e,t,r))}catch(c){tt("identify",c)}if((s=(i=(n=be.options)==null?void 0:n.integrations)==null?void 0:i.mixpanel)!=null&&s.disabled||(o=window.mixpanel)!=null&&o.identify&&(window.mixpanel.identify(typeof(t==null?void 0:t.email)=="string"?t==null?void 0:t.email:e),t&&(window.mixpanel.track("identify",t),window.mixpanel.people.set(t))),!((a=(u=(l=be.options)==null?void 0:l.integrations)==null?void 0:u.amplitude)!=null&&a.disabled)&&(h=window.amplitude)!=null&&h.getInstance&&(window.amplitude.getInstance().setUserId(e),Object.keys(t).length>0)){const c=Object.keys(t).reduce((f,d)=>(f.set(d,t[d]),f),new window.amplitude.Identify);window.amplitude.getInstance().identify(c)}},metrics:e=>{try{for(const t of e)be.recordMetric(t)}catch(t){tt("metrics",t)}},recordMetric:e=>{try{be.onHighlightReady(()=>{var t;ne.recordGauge(Y(x({},e),{tags:(t=e.tags)!=null?t:[],group:window.location.href,category:"Frontend"}))})}catch(t){tt("recordMetric",t)}},recordCount:e=>{try{be.onHighlightReady(()=>{ne.recordCount(e)})}catch(t){tt("recordCount",t)}},recordIncr:e=>{try{be.onHighlightReady(()=>{ne.recordIncr(e)})}catch(t){tt("recordIncr",t)}},recordHistogram:e=>{try{be.onHighlightReady(()=>{ne.recordHistogram(e)})}catch(t){tt("recordHistogram",t)}},recordUpDownCounter:e=>{try{be.onHighlightReady(()=>{ne.recordUpDownCounter(e)})}catch(t){tt("recordUpDownCounter",t)}},startSpan:(e,t,r,n)=>{const i=zs();if(!i){const o=cn();return n===void 0&&r===void 0?t(o):n===void 0?r(o):n(o)}const s=(o,l)=>{const u=l(o);return u instanceof Promise?u.finally(()=>o.end()):(o.end(),u)};return n===void 0&&r===void 0?i.startActiveSpan(e,o=>s(o,t)):n===void 0?i.startActiveSpan(e,t,o=>s(o,r)):i.startActiveSpan(e,t,r,o=>s(o,n))},startManualSpan:(e,t,r,n)=>{const i=zs();if(!i){const s=cn();return n===void 0&&r===void 0?t(s):n===void 0?r(s):n(s)}return n===void 0&&r===void 0?i.startActiveSpan(e,t):n===void 0?i.startActiveSpan(e,t,r):i.startActiveSpan(e,t,r,n)},getSessionURL:()=>new Promise((e,t)=>{be.onHighlightReady(()=>{const r=ne.sessionData.sessionSecureID,n=Ft(r);n?e(`https://${Fn}/${n.projectID}/sessions/${r}`):t(new Error(`Unable to get session URL: ${r}`))})}),getSessionDetails:()=>new Promise((e,t)=>{be.onHighlightReady(()=>z(this,null,function*(){try{const r=yield be.getSessionURL();if(!r)throw new Error("Could not get session URL");const n=ne.sessionData.sessionSecureID,i=Ft(n),s=i==null?void 0:i.sessionStartTime;if(!s)throw new Error("Could not get session start timestamp");const o=new Date().getTime(),l=new URL(r),u=new URL(r);u.searchParams.set("ts",((o-s)/1e3).toString()),e({url:l.toString(),urlWithTimestamp:u.toString(),sessionSecureID:n})}catch(r){t(r)}}))}),getRecordingState:()=>{var e;return(e=ne==null?void 0:ne.state)!=null?e:"NotRecording"},onHighlightReady:(e,t)=>{if(ne&&ne.ready){e();return}if(ai.push({options:t,func:e}),ao!==void 0)return;const r=()=>{ai=ai.filter(i=>{var s;return!ne||((s=i.options)==null?void 0:s.waitForReady)!==!1&&!ne.ready?!0:(i.func(),!1)}),ao=void 0,ai.length>0&&(ao=setTimeout(r,xO))};r()},registerLD(e){hb.length||(be.onHighlightReady(()=>{ne.registerLD(e)}),Ox(this,e,be.options),hb.push(new Js(e)))}};typeof window!="undefined"&&(window.H=be),dO(),rb(),ib();const NO={reset:()=>{yc=!1,ne=void 0,ai=[],ao=void 0,li=void 0},setHighlightObj:e=>{ne=e}};A.GenerateSecureID=St,A.H=be,A.HighlightSegmentMiddleware=fO,A.MetricCategory=db,A.Observe=CO,A.Record=LO,A.__testing=NO,A.configureElectronHighlight=hO,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
494
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`);const o=new Date().getTime(),l=ky();if(t){const u={session_secure_id:this.sessionData.sessionSecureID,payload_id:o.toString(),events:{events:n},messages:_t({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:l||void 0},{compressedBase64:a}=yield jy(u);yield t({session_secure_id:this.sessionData.sessionSecureID,payload_id:o.toString(),data:a})}else n.some(u=>u.type===nt.FullSnapshot)&&this._snapshotPayloadIds.add(o),this._worker.postMessage({message:{type:Be.AsyncEvents,id:o,events:n,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:l}});it(this.sessionData),this.events=this.events.slice(n.length),Xy(l)})}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}),dt.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}register(t,r){this._integrations.push(new Hs(t,r))}getHooks(t){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,t))!=null?i:[]})}getRecordingState(){var t;return(t=this==null?void 0:this.state)!=null?t:"NotRecording"}getSession(){const t=this.sessionData.sessionSecureID,r=Ft(t);if(!r)return null;const n=`${this.getFrontendUrl()}/sessions/${t}`;if(!n||!(r==null?void 0:r.sessionStartTime))return null;const s=new Date().getTime();let o;try{o=new URL(n)}catch(a){return Ce("identify","warn",`failed to construct session url from ${n}`,a),null}const l=new URL(o),u=(s-this._recordingStartTime)/1e3;return l.searchParams.set("ts",u.toString()),{url:o.toString(),urlWithTimestamp:l.toString(),sessionSecureID:t}}getFrontendUrl(){var r,n;const t=this._backendUrl.match(OI);if(t&&((r=t==null?void 0:t.groups)!=null&&r.domain)){const i=(n=t.groups.domain)!=null?n:"",s=xI[i];return s?`https://${s}${NI}`:qp}return qp}}hi=new WeakMap;class pb extends Wu{constructor(){super(...arguments);L(this,"_deferredStartOptions")}getSession(){return this._isLoaded?this._callSdk("getSession",[]):null}_startSdk(){return z(this,null,function*(){const r=this._deferredStartOptions;this._deferredStartOptions=void 0,yield this._sdk.start(r)})}start(r){return z(this,null,function*(){return this._deferredStartOptions=r,this._start()})}stop(){this._stop(()=>this._sdk.stop())}addSessionProperties(r){return this._bufferCall("addSessionProperties",[r])}getRecordingState(){return this._isLoaded?this._callSdk("getRecordingState",[]):"NotRecording"}snapshot(r){return this._isLoaded?this._callSdk("snapshot",[r]):Promise.resolve(void 0)}register(r,n){return this._bufferCall("register",[r,n])}}A.LDRecord=void 0,typeof globalThis!="undefined"?globalThis.LDRecord?A.LDRecord=globalThis.LDRecord:(A.LDRecord=new pb,globalThis.LDRecord=A.LDRecord):A.LDRecord=new pb;class XO extends fb{constructor(r){super(r);L(this,"record");L(this,"options");this.options=r}initialize(r,n){var i,s,o,l,u,a,h,c,f;try{if(typeof window=="undefined"||typeof document=="undefined"){Re("warn","@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker=="undefined"){Re("warn","@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!r){Re("warn","@launchdarkly/session-replay is not initializing because the SDK credential is undefined.");return}this.configureSession(r,n);const d=Y(x({},n),{organizationID:r,firstloadVersion:Uu,environment:(n==null?void 0:n.environment)||"production",appVersion:n==null?void 0:n.version,sessionSecureID:this.sessionSecureID,privacySetting:(i=n==null?void 0:n.privacySetting)!=null?i:"strict"});this.record=new kO(d);const p=n!=null&&n.manualStart?void 0:this.record.start();A.LDRecord.load(this.record,{ready:!(n!=null&&n.manualStart),started:p}),!((o=(s=n==null?void 0:n.integrations)==null?void 0:s.mixpanel)!=null&&o.disabled)&&((u=(l=n==null?void 0:n.integrations)==null?void 0:l.mixpanel)!=null&&u.projectToken)&&rb(n.integrations.mixpanel),!((h=(a=n==null?void 0:n.integrations)==null?void 0:a.amplitude)!=null&&h.disabled)&&((f=(c=n==null?void 0:n.integrations)==null?void 0:c.amplitude)!=null&&f.apiKey)&&tb(n.integrations.amplitude)}catch(d){Ce("Error initializing @launchdarkly/session-replay SDK","error",d)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(r,n){var i;(i=this.record)==null||i.register(r,n)}getHooks(r){var i,s,o,l;const n=x(x({[Dp]:r.sdk.name,[Fp]:r.sdk.version,[Sg]:r.clientSideId,[Mu]:"LaunchDarkly"},(i=r.application)!=null&&i.id?{[Ig]:r.application.id}:{}),(s=r.application)!=null&&s.version?{[Cg]:r.application.version}:{});return this.initialize((l=(o=r.sdkKey)!=null?o:r.mobileKey)!=null?l:r.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(u,a,h)=>{var c,f,d,p,m,g,v,y;for(const w of(d=(f=(c=this.record)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=w.afterIdentify)==null||p.call(w,u,a,h);if(h.status==="completed"){const w=Y(x({},Qn(u.context)),{key:(v=(g=(m=this.options)==null?void 0:m.contextFriendlyName)==null?void 0:g.call(m,u.context))!=null?v:Nr(u.context),canonicalKey:Nr(u.context)});(y=this.record)==null||y.identify(w.key,x(x({},n),w),"LaunchDarkly")}return a},afterEvaluation:(u,a,h)=>{var c,f,d,p;for(const m of(d=(f=(c=this.record)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=m.afterEvaluation)==null||p.call(m,u,a,h);return a},afterTrack:u=>{var a,h,c,f,d;for(const p of(c=(h=(a=this.record)==null?void 0:a.getHooks)==null?void 0:h.call(a,r))!=null?c:[])(f=p.afterTrack)==null||f.call(p,u);(d=this.record)==null||d.track(u.key,{data:u.data,value:u.metricValue})}}]}}var mb=(e=>(e.Device="Device",e.WebVital="WebVital",e.Frontend="Frontend",e.Backend="Backend",e))(mb||{});const tt=(e,t)=>{Re("warn",`highlight.run warning: (${e}): `,t)},WO=200;let li=[],uo,ne,ui,gb=[],bc=!1;const be={options:void 0,init:(e,t)=>{var r,n,i,s,o,l,u,a;try{if(be.options=t,typeof window=="undefined"||typeof document=="undefined")return;if(!e){console.info("Highlight is not initializing because projectID was passed undefined.");return}t!=null&&t.sessionCookie?om():Gs(!1);const h=Ft();let c=St();if(t!=null&&t.sessionKey?c=St(`${e}-${t.sessionKey}`):h!=null&&h.sessionSecureID&&(c=h.sessionSecureID),bc)return{sessionSecureID:c};bc=!0,nb(),sb();const f=Y(x({},t),{organizationID:e,firstloadVersion:Uu,environment:(t==null?void 0:t.environment)||"production",appVersion:t==null?void 0:t.version,sessionSecureID:c});return ui=new Yt(f),t!=null&&t.manualStart||ui.startListening(),ne=ne!=null?ne:new yc(f,ui),t!=null&&t.manualStart||ne.initialize(),!((n=(r=t==null?void 0:t.integrations)==null?void 0:r.mixpanel)!=null&&n.disabled)&&((s=(i=t==null?void 0:t.integrations)==null?void 0:i.mixpanel)!=null&&s.projectToken)&&rb(t.integrations.mixpanel),!((l=(o=t==null?void 0:t.integrations)==null?void 0:o.amplitude)!=null&&l.disabled)&&((a=(u=t==null?void 0:t.integrations)==null?void 0:u.amplitude)!=null&&a.apiKey)&&tb(t.integrations.amplitude),{sessionSecureID:c}}catch(h){tt("init",h)}},snapshot:e=>z(this,null,function*(){try{if(ne&&ne.ready)return yield ne.snapshot(e)}catch(t){tt("snapshot",t)}}),addSessionFeedback:()=>{},consumeError:(e,t,r)=>{try{be.onHighlightReady(()=>ne.consumeCustomError(e,t,JSON.stringify(r)))}catch(n){tt("error",n)}},consume:(e,t)=>{try{be.onHighlightReady(()=>ne.consumeError(e,t))}catch(r){tt("error",r)}},error:(e,t)=>{try{be.onHighlightReady(()=>ne.pushCustomError(e,JSON.stringify(t)))}catch(r){tt("error",r)}},track:(e,t={})=>{var r,n,i,s,o,l,u,a,h,c,f;try{be.onHighlightReady(()=>{ne.addProperties(Y(x({},t),{event:e})),ne.log("H.track","INFO",Y(x({},t!=null?t:{}),{event:e}))});const d=ne==null?void 0:ne.getCurrentSessionURL();(i=(n=(r=be.options)==null?void 0:r.integrations)==null?void 0:n.mixpanel)!=null&&i.disabled||(s=window.mixpanel)!=null&&s.track&&window.mixpanel.track(e,Y(x({},t),{highlightSessionURL:d})),(u=(l=(o=be.options)==null?void 0:o.integrations)==null?void 0:l.amplitude)!=null&&u.disabled||(a=window.amplitude)!=null&&a.getInstance&&window.amplitude.getInstance().logEvent(e,Y(x({},t),{highlightSessionURL:d})),(f=(c=(h=be.options)==null?void 0:h.integrations)==null?void 0:c.intercom)!=null&&f.disabled||window.Intercom&&window.Intercom("trackEvent",e,t)}catch(d){tt("track",d)}},log:(e,t,r)=>{try{be.onHighlightReady(()=>ne.log(e,t,r!=null?r:{}))}catch(n){tt("log",n)}},start:e=>{var t;(ne==null?void 0:ne.state)==="Recording"&&!(e!=null&&e.forceNew)?e!=null&&e.silent||console.warn("Highlight is already recording. Please `H.stop()` the current session before starting a new one."):(((t=ne==null?void 0:ne._firstLoadListeners)!=null?t:ui).startListening(),be.onHighlightReady(()=>z(this,null,function*(){yield ne.initialize(e)}),{waitForReady:!1}))},stop:e=>{(ne==null?void 0:ne.state)!=="Recording"?e!=null&&e.silent||console.warn("Highlight is already stopped. Please call `H.start()`."):be.onHighlightReady(()=>ne.stopRecording(!0))},identify:(e,t={},r)=>{var n,i,s,o,l,u,a,h;try{be.onHighlightReady(()=>ne.identify(e,t,r))}catch(c){tt("identify",c)}if((s=(i=(n=be.options)==null?void 0:n.integrations)==null?void 0:i.mixpanel)!=null&&s.disabled||(o=window.mixpanel)!=null&&o.identify&&(window.mixpanel.identify(typeof(t==null?void 0:t.email)=="string"?t==null?void 0:t.email:e),t&&(window.mixpanel.track("identify",t),window.mixpanel.people.set(t))),!((a=(u=(l=be.options)==null?void 0:l.integrations)==null?void 0:u.amplitude)!=null&&a.disabled)&&(h=window.amplitude)!=null&&h.getInstance&&(window.amplitude.getInstance().setUserId(e),Object.keys(t).length>0)){const c=Object.keys(t).reduce((f,d)=>(f.set(d,t[d]),f),new window.amplitude.Identify);window.amplitude.getInstance().identify(c)}},metrics:e=>{try{for(const t of e)be.recordMetric(t)}catch(t){tt("metrics",t)}},recordMetric:e=>{try{be.onHighlightReady(()=>{var t;ne.recordGauge(Y(x({},e),{tags:(t=e.tags)!=null?t:[],group:window.location.href,category:"Frontend"}))})}catch(t){tt("recordMetric",t)}},recordCount:e=>{try{be.onHighlightReady(()=>{ne.recordCount(e)})}catch(t){tt("recordCount",t)}},recordIncr:e=>{try{be.onHighlightReady(()=>{ne.recordIncr(e)})}catch(t){tt("recordIncr",t)}},recordHistogram:e=>{try{be.onHighlightReady(()=>{ne.recordHistogram(e)})}catch(t){tt("recordHistogram",t)}},recordUpDownCounter:e=>{try{be.onHighlightReady(()=>{ne.recordUpDownCounter(e)})}catch(t){tt("recordUpDownCounter",t)}},startSpan:(e,t,r,n)=>{const i=js();if(!i){const o=cn();return n===void 0&&r===void 0?t(o):n===void 0?r(o):n(o)}const s=(o,l)=>{const u=l(o);return u instanceof Promise?u.finally(()=>o.end()):(o.end(),u)};return n===void 0&&r===void 0?i.startActiveSpan(e,o=>s(o,t)):n===void 0?i.startActiveSpan(e,t,o=>s(o,r)):i.startActiveSpan(e,t,r,o=>s(o,n))},startManualSpan:(e,t,r,n)=>{const i=js();if(!i){const s=cn();return n===void 0&&r===void 0?t(s):n===void 0?r(s):n(s)}return n===void 0&&r===void 0?i.startActiveSpan(e,t):n===void 0?i.startActiveSpan(e,t,r):i.startActiveSpan(e,t,r,n)},getSessionURL:()=>new Promise((e,t)=>{be.onHighlightReady(()=>{const r=ne.sessionData.sessionSecureID,n=Ft(r);n?e(`https://${Fn}/${n.projectID}/sessions/${r}`):t(new Error(`Unable to get session URL: ${r}`))})}),getSessionDetails:()=>new Promise((e,t)=>{be.onHighlightReady(()=>z(this,null,function*(){try{const r=yield be.getSessionURL();if(!r)throw new Error("Could not get session URL");const n=ne.sessionData.sessionSecureID,i=Ft(n),s=i==null?void 0:i.sessionStartTime;if(!s)throw new Error("Could not get session start timestamp");const o=new Date().getTime(),l=new URL(r),u=new URL(r);u.searchParams.set("ts",((o-s)/1e3).toString()),e({url:l.toString(),urlWithTimestamp:u.toString(),sessionSecureID:n})}catch(r){t(r)}}))}),getRecordingState:()=>{var e;return(e=ne==null?void 0:ne.state)!=null?e:"NotRecording"},onHighlightReady:(e,t)=>{if(ne&&ne.ready){e();return}if(li.push({options:t,func:e}),uo!==void 0)return;const r=()=>{li=li.filter(i=>{var s;return!ne||((s=i.options)==null?void 0:s.waitForReady)!==!1&&!ne.ready?!0:(i.func(),!1)}),uo=void 0,li.length>0&&(uo=setTimeout(r,WO))};r()},registerLD(e){gb.length||(be.onHighlightReady(()=>{ne.registerLD(e)}),Xx(this,e,be.options),gb.push(new Hs(e)))}};typeof window!="undefined"&&(window.H=be),gO(),nb(),sb();const PO={reset:()=>{bc=!1,ne=void 0,li=[],uo=void 0,ui=void 0},setHighlightObj:e=>{ne=e}};A.GenerateSecureID=St,A.H=be,A.HighlightSegmentMiddleware=bO,A.MetricCategory=mb,A.Observe=VO,A.Record=XO,A.__testing=PO,A.configureElectronHighlight=yO,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
495
495
|
//# sourceMappingURL=index.umd.js.map
|