@launchdarkly/browser 0.1.12 → 0.1.14

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/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
- var Ah=Object.defineProperty,ew=Object.defineProperties;var nw=Object.getOwnPropertyDescriptors;var Mh=Object.getOwnPropertySymbols;var rw=Object.prototype.hasOwnProperty,iw=Object.prototype.propertyIsEnumerable;var Fh=(t,e,n)=>e in t?Ah(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jh=(t,e)=>{for(var n in e||(e={}))rw.call(e,n)&&Fh(t,n,e[n]);if(Mh)for(var n of Mh(e))iw.call(e,n)&&Fh(t,n,e[n]);return t},Dh=(t,e)=>ew(t,nw(e));var Yh=(t,e)=>()=>(t&&(e=t(t=0)),e);var ow=(t,e)=>{for(var n in e)Ah(t,n,{get:e[n],enumerable:!0})};var ng={};ow(ng,{LDObserve:()=>Br});var qo,Br,rg=Yh(()=>{"use strict";Gc();qo=class extends Bn{recordGauge(e){return this.p("recordGauge",[e])}recordCount(e){return this.p("recordCount",[e])}recordIncr(e){return this.p("recordIncr",[e])}recordHistogram(e){return this.p("recordHistogram",[e])}recordUpDownCounter(e){return this.p("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.p("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.p("startManualSpan",[e,n,r,i])}register(e,n){return this.p("register",[e,n])}recordLog(e,n,r){return this.p("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.p("recordError",[e,n,r,i,o])}};typeof globalThis<"u"?globalThis.LDObserve?Br=globalThis.LDObserve:(Br=new qo,globalThis.LDObserve=Br):Br=new qo});function lL(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Ts(t,e){throw new Error(e)}function cL(t){return typeof t=="object"&&t!==null}function uL(t,e){throw new Error("Unexpected invariant triggered.")}function eu(t,e){let n=0,r=1;for(let i of t.body.matchAll(hL)){if(typeof i.index=="number"||uL(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function pL(t){return Zb(t.source,eu(t.source,t.start))}function Zb(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
2
- `,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+ig([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+ig([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function ig(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
3
- `)}function dL(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}function og(t){return t===void 0||t.length===0?void 0:t}function Zt(t,e,n){return new nu(`Syntax Error: ${n}`,{source:t,positions:[e]})}function sg(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&mL.has(e)}function iu(t){return t===9||t===32}function fi(t){return t>=48&&t<=57}function xb(t){return t>=97&&t<=122||t>=65&&t<=90}function Nb(t){return xb(t)||t===95}function yL(t){return xb(t)||fi(t)||t===95}function gL(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=bL(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function bL(t){let e=0;for(;e<t.length&&iu(t.charCodeAt(e));)++e;return e}function vL(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||iu(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&iu(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
1
+ var gp=Object.defineProperty,Yw=Object.defineProperties;var Kw=Object.getOwnPropertyDescriptors;var mp=Object.getOwnPropertySymbols;var _w=Object.prototype.hasOwnProperty,Hw=Object.prototype.propertyIsEnumerable;var yp=(t,e,n)=>e in t?gp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bp=(t,e)=>{for(var n in e||(e={}))_w.call(e,n)&&yp(t,n,e[n]);if(mp)for(var n of mp(e))Hw.call(e,n)&&yp(t,n,e[n]);return t},vp=(t,e)=>Yw(t,Kw(e));var wp=(t,e)=>()=>(t&&(e=t(t=0)),e);var zw=(t,e)=>{for(var n in e)gp(t,n,{get:e[n],enumerable:!0})};var zg={};zw(zg,{LDObserve:()=>wi});var Ts,wi,Bg=wp(()=>{"use strict";du();Ts=class extends gr{recordGauge(e){return this.p("recordGauge",[e])}recordCount(e){return this.p("recordCount",[e])}recordIncr(e){return this.p("recordIncr",[e])}recordHistogram(e){return this.p("recordHistogram",[e])}recordUpDownCounter(e){return this.p("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.p("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.p("startManualSpan",[e,n,r,i])}register(e,n){return this.p("register",[e,n])}recordLog(e,n,r){return this.p("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.p("recordError",[e,n,r,i,o])}};typeof globalThis<"u"?globalThis.LDObserve?wi=globalThis.LDObserve:(wi=new Ts,globalThis.LDObserve=wi):wi=new Ts});function ZX(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Hs(t,e){throw new Error(e)}function xX(t){return typeof t=="object"&&t!==null}function VX(t,e){throw new Error("Unexpected invariant triggered.")}function Xu(t,e){let n=0,r=1;for(let i of t.body.matchAll(OX)){if(typeof i.index=="number"||VX(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function NX(t){return vv(t.source,Xu(t.source,t.start))}function vv(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
2
+ `,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+jg([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+jg([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function jg(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
3
+ `)}function GX(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}function Qg(t){return t===void 0||t.length===0?void 0:t}function Nt(t,e,n){return new Wu(`Syntax Error: ${n}`,{source:t,positions:[e]})}function $g(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&XX.has(e)}function Pu(t){return t===9||t===32}function Ui(t){return t>=48&&t<=57}function Iv(t){return t>=97&&t<=122||t>=65&&t<=90}function Tv(t){return Iv(t)||t===95}function WX(t){return Iv(t)||Ui(t)||t===95}function MX(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=PX(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function PX(t){let e=0;for(;e<t.length&&Pu(t.charCodeAt(e));)++e;return e}function UX(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||Pu(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&Pu(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
4
4
  `),h+=n,(u||l)&&(h+=`
5
- `),'"""'+h+'"""'}function SL(t){return t===I.BANG||t===I.DOLLAR||t===I.AMP||t===I.PAREN_L||t===I.PAREN_R||t===I.SPREAD||t===I.COLON||t===I.EQUALS||t===I.AT||t===I.BRACKET_L||t===I.BRACKET_R||t===I.BRACE_L||t===I.PIPE||t===I.BRACE_R}function fr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function sa(t,e){return Ob(t.charCodeAt(e))&&Gb(t.charCodeAt(e+1))}function Ob(t){return t>=55296&&t<=56319}function Gb(t){return t>=56320&&t<=57343}function En(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return I.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Tt(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new kb(e,n,r,o,s,i)}function IL(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return TL(t,i);case 33:return Tt(t,I.BANG,i,i+1);case 36:return Tt(t,I.DOLLAR,i,i+1);case 38:return Tt(t,I.AMP,i,i+1);case 40:return Tt(t,I.PAREN_L,i,i+1);case 41:return Tt(t,I.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Tt(t,I.SPREAD,i,i+3);break;case 58:return Tt(t,I.COLON,i,i+1);case 61:return Tt(t,I.EQUALS,i,i+1);case 64:return Tt(t,I.AT,i,i+1);case 91:return Tt(t,I.BRACKET_L,i,i+1);case 93:return Tt(t,I.BRACKET_R,i,i+1);case 123:return Tt(t,I.BRACE_L,i,i+1);case 124:return Tt(t,I.PIPE,i,i+1);case 125:return Tt(t,I.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?VL(t,i):RL(t,i)}if(fi(o)||o===45)return EL(t,i,o);if(Nb(o))return xL(t,i);throw Zt(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:fr(o)||sa(n,i)?`Unexpected character: ${En(t,i)}.`:`Invalid character: ${En(t,i)}.`)}return Tt(t,I.EOF,r,r)}function TL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(fr(o))++i;else if(sa(n,i))i+=2;else break}return Tt(t,I.COMMENT,e,i,n.slice(e+1,i))}function EL(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),fi(o))throw Zt(t.source,i,`Invalid number, unexpected digit after 0: ${En(t,i)}.`)}else i=Lc(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Lc(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=Lc(t,i,o),o=r.charCodeAt(i)),o===46||Nb(o))throw Zt(t.source,i,`Invalid number, expected digit but got: ${En(t,i)}.`);return Tt(t,s?I.FLOAT:I.INT,e,i,r.slice(e,i))}function Lc(t,e,n){if(!fi(n))throw Zt(t.source,e,`Invalid number, expected digit but got: ${En(t,e)}.`);let r=t.source.body,i=e+1;for(;fi(r.charCodeAt(i));)++i;return i}function RL(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),Tt(t,I.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?CL(t,i):ZL(t,i):kL(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(fr(a))++i;else if(sa(n,i))i+=2;else throw Zt(t.source,i,`Invalid character within String: ${En(t,i)}.`)}throw Zt(t.source,i,"Unterminated string.")}function CL(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!fr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|si(o),r<0)break}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function ZL(t,e){let n=t.source.body,r=ag(n,e+2);if(fr(r))return{value:String.fromCodePoint(r),size:6};if(Ob(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=ag(n,e+8);if(Gb(i))return{value:String.fromCodePoint(r,i),size:12}}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function ag(t,e){return si(t.charCodeAt(e))<<12|si(t.charCodeAt(e+1))<<8|si(t.charCodeAt(e+2))<<4|si(t.charCodeAt(e+3))}function si(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function kL(t,e){let n=t.source.body;switch(n.charCodeAt(e+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:`
6
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Zt(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function VL(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=Tt(t,I.BLOCK_STRING,e,o+3,gL(c).join(`
7
- `));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(fr(l))++o;else if(sa(n,o))o+=2;else throw Zt(t.source,o,`Invalid character within String: ${En(t,o)}.`)}throw Zt(t.source,o,"Unterminated string.")}function xL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(yL(o))++i;else break}return Tt(t,I.NAME,e,i,n.slice(e,i))}function ah(t){return aa(t,[])}function aa(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return OL(t,e);default:return String(t)}}function OL(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(GL(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:aa(r,n)}else if(Array.isArray(t))return XL(t,n);return LL(t,n)}function GL(t){return typeof t.toJSON=="function"}function LL(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>Lb?"["+WL(t)+"]":"{ "+n.map(([r,i])=>r+": "+aa(i,e)).join(", ")+" }"}function XL(t,e){if(t.length===0)return"[]";if(e.length>Lb)return"[Array]";let n=Math.min(NL,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(aa(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function WL(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}function PL(t){return UL(t,Xb)}function Wb(t,e){return new ML(t,e).parseDocument()}function ts(t){let e=t.value;return Ub(t.kind)+(e!=null?` "${e}"`:"")}function Ub(t){return SL(t)?`"${t}"`:t}function FL(t){return`"${t.replace(AL,JL)}"`}function JL(t){return DL[t.charCodeAt(0)]}function KL(t,e,n=Vb){let r=new Map;for(let g of Object.values(A))r.set(g,_L(e,g));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let g=a===s.length,w=g&&c.length!==0;if(g){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let E=0;for(let[T,V]of c){let O=T-E;V===null?(l.splice(O,1),E++):l[O]=V}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;sg(l)||Ts(!1,`Invalid AST Node: ${ah(l)}.`);let E=g?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===YL)break;if(R===!1){if(!g){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!g))if(sg(R))l=R;else{p.pop();continue}}if(R===void 0&&w&&c.push([u,l]),g)p.pop();else{var v;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(v=n[l.kind])!==null&&v!==void 0?v:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function _L(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function Pb(t){return KL(t,zL)}function W(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function le(t){return Q(`{
8
- `,Es(W(t,`
5
+ `),'"""'+h+'"""'}function AX(t){return t===C.BANG||t===C.DOLLAR||t===C.AMP||t===C.PAREN_L||t===C.PAREN_R||t===C.SPREAD||t===C.COLON||t===C.EQUALS||t===C.AT||t===C.BRACKET_L||t===C.BRACKET_R||t===C.BRACE_L||t===C.PIPE||t===C.BRACE_R}function Wr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function Va(t,e){return Ev(t.charCodeAt(e))&&Rv(t.charCodeAt(e+1))}function Ev(t){return t>=55296&&t<=56319}function Rv(t){return t>=56320&&t<=57343}function Jn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return C.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Ct(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new wv(e,n,r,o,s,i)}function DX(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return JX(t,i);case 33:return Ct(t,C.BANG,i,i+1);case 36:return Ct(t,C.DOLLAR,i,i+1);case 38:return Ct(t,C.AMP,i,i+1);case 40:return Ct(t,C.PAREN_L,i,i+1);case 41:return Ct(t,C.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Ct(t,C.SPREAD,i,i+3);break;case 58:return Ct(t,C.COLON,i,i+1);case 61:return Ct(t,C.EQUALS,i,i+1);case 64:return Ct(t,C.AT,i,i+1);case 91:return Ct(t,C.BRACKET_L,i,i+1);case 93:return Ct(t,C.BRACKET_R,i,i+1);case 123:return Ct(t,C.BRACE_L,i,i+1);case 124:return Ct(t,C.PIPE,i,i+1);case 125:return Ct(t,C.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?BX(t,i):KX(t,i)}if(Ui(o)||o===45)return YX(t,i,o);if(Tv(o))return jX(t,i);throw Nt(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Wr(o)||Va(n,i)?`Unexpected character: ${Jn(t,i)}.`:`Invalid character: ${Jn(t,i)}.`)}return Ct(t,C.EOF,r,r)}function JX(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(Wr(o))++i;else if(Va(n,i))i+=2;else break}return Ct(t,C.COMMENT,e,i,n.slice(e+1,i))}function YX(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Ui(o))throw Nt(t.source,i,`Invalid number, unexpected digit after 0: ${Jn(t,i)}.`)}else i=fu(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=fu(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=fu(t,i,o),o=r.charCodeAt(i)),o===46||Tv(o))throw Nt(t.source,i,`Invalid number, expected digit but got: ${Jn(t,i)}.`);return Ct(t,s?C.FLOAT:C.INT,e,i,r.slice(e,i))}function fu(t,e,n){if(!Ui(n))throw Nt(t.source,e,`Invalid number, expected digit but got: ${Jn(t,e)}.`);let r=t.source.body,i=e+1;for(;Ui(r.charCodeAt(i));)++i;return i}function KX(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),Ct(t,C.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?_X(t,i):HX(t,i):zX(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(Wr(a))++i;else if(Va(n,i))i+=2;else throw Nt(t.source,i,`Invalid character within String: ${Jn(t,i)}.`)}throw Nt(t.source,i,"Unterminated string.")}function _X(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!Wr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Oi(o),r<0)break}throw Nt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function HX(t,e){let n=t.source.body,r=qg(n,e+2);if(Wr(r))return{value:String.fromCodePoint(r),size:6};if(Ev(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=qg(n,e+8);if(Rv(i))return{value:String.fromCodePoint(r,i),size:12}}throw Nt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function qg(t,e){return Oi(t.charCodeAt(e))<<12|Oi(t.charCodeAt(e+1))<<8|Oi(t.charCodeAt(e+2))<<4|Oi(t.charCodeAt(e+3))}function Oi(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function zX(t,e){let n=t.source.body;switch(n.charCodeAt(e+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:`
6
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Nt(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function BX(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=Ct(t,C.BLOCK_STRING,e,o+3,MX(c).join(`
7
+ `));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(Wr(l))++o;else if(Va(n,o))o+=2;else throw Nt(t.source,o,`Invalid character within String: ${Jn(t,o)}.`)}throw Nt(t.source,o,"Unterminated string.")}function jX(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(WX(o))++i;else break}return Ct(t,C.NAME,e,i,n.slice(e,i))}function Ah(t){return Oa(t,[])}function Oa(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return $X(t,e);default:return String(t)}}function $X(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(qX(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:Oa(r,n)}else if(Array.isArray(t))return eW(t,n);return tW(t,n)}function qX(t){return typeof t.toJSON=="function"}function tW(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>Cv?"["+nW(t)+"]":"{ "+n.map(([r,i])=>r+": "+Oa(i,e)).join(", ")+" }"}function eW(t,e){if(t.length===0)return"[]";if(e.length>Cv)return"[Array]";let n=Math.min(QX,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(Oa(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function nW(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}function iW(t){return rW(t,kv)}function Zv(t,e){return new oW(t,e).parseDocument()}function Es(t){let e=t.value;return xv(t.kind)+(e!=null?` "${e}"`:"")}function xv(t){return AX(t)?`"${t}"`:t}function sW(t){return`"${t.replace(aW,lW)}"`}function lW(t){return cW[t.charCodeAt(0)]}function hW(t,e,n=Sv){let r=new Map;for(let b of Object.values(A))r.set(b,pW(e,b));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let b=a===s.length,w=b&&c.length!==0;if(b){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let I=0;for(let[S,T]of c){let x=S-I;T===null?(l.splice(x,1),I++):l[x]=T}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[I,S]of c)l[I]=S}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let E;if(!Array.isArray(l)){var m,d;$g(l)||Hs(!1,`Invalid AST Node: ${Ah(l)}.`);let I=b?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(E=I==null?void 0:I.call(e,l,u,h,p,f),E===uW)break;if(E===!1){if(!b){p.pop();continue}}else if(E!==void 0&&(c.push([u,E]),!b))if($g(E))l=E;else{p.pop();continue}}if(E===void 0&&w&&c.push([u,l]),b)p.pop();else{var g;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(g=n[l.kind])!==null&&g!==void 0?g:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function pW(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function Vv(t){return hW(t,fW)}function P(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function Ie(t){return rt(`{
8
+ `,zs(P(t,`
9
9
  `)),`
10
- }`)}function Q(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function Es(t){return Q(" ",t.replace(/\n/g,`
11
- `))}function lg(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
12
- `)))!==null&&e!==void 0?e:!1}function Fb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Jb(t){return t.replace(/[\s,]+/g," ").trim()}function cX(t){return Jb(t.source.body.substring(t.start,t.end))}function uX(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=cX(r.loc),s=au.get(i);s&&!s.has(o)?Ab&&console.warn("Warning: fragment with name "+i+` already exists.
10
+ }`)}function rt(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function zs(t){return rt(" ",t.replace(/\n/g,`
11
+ `))}function tb(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
12
+ `)))!==null&&e!==void 0?e:!1}function Nv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Lv(t){return t.replace(/[\s,]+/g," ").trim()}function xW(t){return Lv(t.source.body.substring(t.start,t.end))}function VW(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=xW(r.loc),s=Au.get(i);s&&!s.has(o)?Gv&&console.warn("Warning: fragment with name "+i+` already exists.
13
13
  graphql-tag enforces all fragment names across your application to be unique; read more about
14
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||au.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Us(Us({},t),{definitions:n})}function hX(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function pX(t){var e=Jb(t);if(!Zs.has(e)){var n=Wb(t,{experimentalFragmentVariables:Ps,allowLegacyFragmentVariables:Ps});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Zs.set(e,hX(uX(n)))}return Zs.get(e)}function Ft(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),pX(r)}function dX(){Zs.clear(),au.clear()}function fX(){Ab=!1}function mX(){Ps=!0}function yX(){Ps=!1}function CX(t,e=RX){return{PushPayload(n,r){return e(i=>t.request(Yb,n,$($({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(gX,n,$($({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(bX,n,$($({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(vX,n,$($({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(wX,n,$($({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(SX,n,$($({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(IX,n,$($({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(TX,n,$($({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(EX,n,$($({},r),i)),"GetSamplingConfig","query",n)}}}function ZX(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function kX(){return ZX()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function es(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function lu(t,e){function n(i,o,s){if(typeof document<"u"){s=es({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",es({},o,{expires:-1}))},withAttributes:function(i){return lu(this.converter,es({},this.attributes,i))},withConverter:function(i){return lu(es({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function Bb(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function jb(t){return t.kind==="multi"}function tW(t){return jb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Bb(t[e].key)}`).join(":"):t.key}function eW(t){return jb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Bb(t[e].key)})).reduce((e,n)=>$($({},e),n),{}):t.key}function Qb(t,e){return iW(t)}function rW(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}function hh(t){if(ns[t])return ns[t];let e=globalThis[t],n=e.prototype,r=t in vg?vg[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in wg?wg[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!bW())return ns[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?ns[t]=l:n}catch(a){return n}}function Be(t,e,n){var r;let i=`${t}.${String(n)}`;if(Mc[i])return Mc[i].call(e);let o=hh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Mc[i]=s,s.call(e)):e[n]}function tv(t,e,n){let r=`${t}.${String(n)}`;if(Fc[r])return Fc[r].bind(e);let i=hh(t)[n];return typeof i!="function"?e[n]:(Fc[r]=i,i.bind(e))}function vW(t){return Be("Node",t,"childNodes")}function wW(t){return Be("Node",t,"parentNode")}function SW(t){return Be("Node",t,"parentElement")}function IW(t){return Be("Node",t,"textContent")}function TW(t,e){return tv("Node",t,"contains")(e)}function EW(t){return tv("Node",t,"getRootNode")()}function RW(t){return!t||!("host"in t)?null:Be("ShadowRoot",t,"host")}function CW(t){return t.styleSheets}function ZW(t){return!t||!("shadowRoot"in t)?null:Be("Element",t,"shadowRoot")}function kW(t,e){return Be("Element",t,"querySelector")(e)}function VW(t,e){return Be("Element",t,"querySelectorAll")(e)}function xW(){return hh("MutationObserver").constructor}function NW(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function ev(t){return t.nodeType===t.ELEMENT_NODE}function ci(t){let e=t&&"host"in t&&"mode"in t&&xt.host(t)||null;return!!(e&&"shadowRoot"in e&&xt.shadowRoot(e)===t)}function ui(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function OW(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function GW(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function yu(t){try{let e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&t.ownerNode.ownerDocument&&(n=t.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>nv(i,n)).join("");return OW(r)}catch(e){return null}}function nv(t,e){if(XW(t)){let n;try{n=yu(t.styleSheet)||GW(t)}catch(r){n=t.cssText}return t.styleSheet.href?Ks(n,t.styleSheet.href):n}else{let n=t.cssText;return WW(t)&&t.selectorText.includes(":")&&(n=LW(n)),e?Ks(n,e):n}}function LW(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function XW(t){return"styleSheet"in t}function WW(t){return"selectorText"in t}function UW(){return new Js}function Ds({element:t,maskInputOptions:e,tagName:n,type:r,value:i,overwriteRecord:o,maskInputFn:s}){let a=i||"";return ov({maskInputOptions:e,tagName:n,type:r,overwriteRecord:o})&&(s?a=s(a,t):a="*".repeat(a.length)),a}function sr(t){return t.toLowerCase()}function PW(t){let e=t.getContext("2d");if(!e)return!0;let n=50;for(let r=0;r<t.width;r+=n)for(let i=0;i<t.height;i+=n){let o=e.getImageData,s=Sg in o?o[Sg]:o;if(new Uint32Array(s.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Ys(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?sr(e):null}function rv(t,e){var n;let r;try{r=new URL(t,window.location.href)}catch(s){return null}let i=/\.([0-9a-z]+)(?:$)/i,o=r.pathname.match(i);return(n=o==null?void 0:o[1])!=null?n:null}function MW(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function Ks(t,e){return(t||"").replace(FW,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(AW.test(c)||JW.test(c))return`url(${l}${c}${l})`;if(DW.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${MW(e)+c}${l})`;let u=e.split("/"),h=c.split("/");u.pop();for(let p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${l}${u.join("/")}${l})`})}function rs(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function YW(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=rs(t,n),a=s.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){let l=rs(r[c].textContent,n),u=100,h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){let p=l.substring(0,h),f=s.split(p),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&r[c-1].textContent!=="")m=s.indexOf(p,1);else if(f.length===1){if(p=p.substring(0,p.length-1),f=s.split(p),f.length<=1)return i.push(t),i;h=u+1}else h===l.length-1&&(m=s.indexOf(p));if(f.length>=2&&h>u){let d=r[c-1].textContent;if(d&&typeof d=="string"){let v=rs(d).length;m=s.indexOf(p,v)}m===-1&&(m=f[0].length)}if(m!==-1){let d=Math.floor(m/a);for(;d>0&&d<t.length;){if(o+=1,o>50*r.length)return i.push(t),i;let v=rs(t.substring(0,d),n);if(v.length===m){i.push(t.substring(0,d)),t=t.substring(d),s=s.substring(m);break}else v.length<m?d+=Math.max(1,Math.floor((m-v.length)/a)):d-=Math.max(1,Math.floor((v.length-m)*a))}break}}}}return i.push(t),i}function KW(t,e){return YW(t,e).join("/* rr_split */")}function ph(t){return t=t.replace(/[^ -~]+/g,""),t=(t==null?void 0:t.split(" ").map(e=>Math.random().toString(20).substring(2,e.length)).join(" "))||"",t}function gu(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function iv(t){return t?qW.some(e=>e.test(t)):!1}function sv(){return t2++}function n2(t){if(t instanceof HTMLFormElement)return"form";let e=sr(t.tagName);return e2.test(e)?"div":e}function o2(t,e){if(e.trim()==="")return e;let n=0;function r(o){let s,a=o.exec(e.substring(n));return a?(s=a[0],n+=s.length,s):""}let i=[];for(;r(i2),!(n>=e.length);){let o=r(r2);if(o.slice(-1)===",")o=_s(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=_s(t,o);let a=!1;for(;;){let c=e.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}function _s(t,e){return!e||e.trim()===""?e:dh(t,e)}function s2(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function dh(t,e){let n=Tg.get(t);if(n||(n=t.createElement("a"),Tg.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function av(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?_s(t,r):n==="srcset"?o2(t,r):n==="style"?Ks(r,dh(t)):e==="object"&&n==="data"?_s(t,r):r)}function lv(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function Eg(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}if(n)return t.matches(n)}catch(r){}return!1}function Hs(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Hs(xt.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}return n?Hs(xt.parentNode(t),e,n):!1}function cv(t,e,n,r){let i;if(ev(t)){if(i=t,!xt.childNodes(i).length)return!1}else{if(xt.parentElement(t)===null)return!1;i=xt.parentElement(t)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Hs(i,e,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch(o){}return!1}function a2(t,e,n){let r=t.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let s="about:blank";if(r.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function l2(t,e,n){let r=!1,i;try{i=t.sheet}catch(s){return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function c2(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:c={},maskTextClass:l,maskTextFn:u,maskInputFn:h,dataURLOptions:p={},inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:v,newlyAddedElement:g=!1,cssCaptured:w=!1,privacySetting:R}=e,E=u2(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Et.Document,childNodes:[],compatMode:t.compatMode}:{type:Et.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Et.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:return p2(t,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,maskTextClass:l,dataURLOptions:p,inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:v,newlyAddedElement:g,privacySetting:R,rootId:E});case t.TEXT_NODE:return h2(t,{doc:n,needsMask:s,maskTextFn:u,privacySetting:R,rootId:E,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:Et.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:Et.Comment,textContent:xt.textContent(t)||"",rootId:E};default:return!1}}function u2(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function h2(t,e){var n;let{needsMask:r,maskTextFn:i,privacySetting:o,rootId:s,cssCaptured:a}=e,c=xt.parentNode(t),l=c&&c.tagName,u="",h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0;p?u="SCRIPT_PLACEHOLDER":a||(u=xt.textContent(t),h&&u&&(u=Ks(u,dh(e.doc)))),!h&&!p&&u&&r&&(u=i?i(u,xt.parentElement(t)):u.replace(/[\S]/g,"*"));let f=o==="strict",m=(n=t.parentElement)==null?void 0:n.getAttribute("data-hl-record"),d=o==="default"&&iv(u);return(f||d)&&!m&&l&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(l)&&u&&(u=ph(u)),{type:Et.Text,textContent:u||"",rootId:s}}function p2(t,e){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:a,maskTextClass:c,dataURLOptions:l={},inlineImages:u,inlineVideos:h,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,privacySetting:d,rootId:v}=e,g=Eg(t,r,i),w=Eg(t,c,null),R=d==="strict",E=n2(t),T={},V=t.attributes.length;for(let C=0;C<V;C++){let N=t.attributes[C];lv(E,N.name)||(T[N.name]=av(n,E,sr(N.name),N.value))}if(E==="link"&&o){let C=Array.from(n.styleSheets).find(P=>P.href===t.href),N=null;C&&(N=yu(C)),N&&(delete T.rel,delete T.href,T.uo=N)}if(E==="style"&&t.sheet){let C=yu(t.sheet);C&&(t.childNodes.length>1&&(C=KW(C,t)),T.uo=C)}if(E==="input"||E==="textarea"||E==="select"){let C=t.value,N=t.checked;T.type!=="radio"&&T.type!=="checkbox"&&T.type!=="submit"&&T.type!=="button"&&C?T.value=Ds({element:t,type:Ys(t),tagName:E,value:C,overwriteRecord:t.getAttribute("data-hl-record"),maskInputOptions:s,maskInputFn:a}):N&&(T.checked=N)}if(E==="option"&&(t.selected&&!s.select?T.selected=!0:delete T.selected),E==="dialog"&&t.open&&(T.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(t.__context==="2d")PW(t);else if(!("__context"in t)){let C=t.toDataURL(l.type,l.quality),N=n.createElement("canvas");N.width=t.width,N.height=t.height;let P=N.toDataURL(l.type,l.quality);C!==P&&(T.rr_dataURL=C)}}if(E==="img"&&u&&!g&&!w&&!R){Qn||(Qn=n.createElement("canvas"),Ig=Qn.getContext("2d"));let C=t,N=C.currentSrc||C.getAttribute("src")||"<unknown-src>",P=C.crossOrigin,st=()=>{C.removeEventListener("load",st);try{Qn.width=C.naturalWidth,Qn.height=C.naturalHeight,Ig.drawImage(C,0,0),T.rr_dataURL=Qn.toDataURL(l.type,l.quality)}catch(lt){if(C.crossOrigin!=="anonymous"){C.crossOrigin="anonymous",C.complete&&C.naturalWidth!==0?st():C.addEventListener("load",st);return}else console.warn(`Cannot inline img src=${N}! Error: ${lt}`)}C.crossOrigin==="anonymous"&&(P?T.crossOrigin=P:C.removeAttribute("crossorigin"))};C.complete&&C.naturalWidth!==0?st():C.addEventListener("load",st)}if(E==="audio"||E==="video"){let C=T;C.rr_mediaState=t.paused?"paused":"played",C.rr_mediaCurrentTime=t.currentTime,C.rr_mediaPlaybackRate=t.playbackRate,C.rr_mediaMuted=t.muted,C.rr_mediaLoop=t.loop,C.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop)),g||w||R&&gu(E)){let{width:C,height:N}=t.getBoundingClientRect();T={class:T.class,rr_width:`${C}px`,rr_height:`${N}px`}}R&&gu(E)&&(g=!0),E==="iframe"&&!f(T.src)&&(t.contentDocument||(T.rr_src=T.src),delete T.src);let O;try{customElements.get(E)&&(O=!0)}catch(C){}let U=C=>{let{width:N,height:P}=C.getBoundingClientRect();T={width:N,height:P,rr_width:`${N}px`,rr_height:`${P}px`,rr_inlined_video:!0,class:T.class,style:T.style},E="canvas";let st=n.createElement("canvas");st.width=t.width,st.height=t.height,T.rr_dataURL=st.toDataURL(l.type,l.quality)};if(E==="video"){let C=t;u&&(C.src===""||C.src.indexOf("blob:")!==-1)&&U(C),h&&C.src!==""&&C.src.indexOf("blob:")===-1&&U(C)}return{type:Et.Element,tagName:E,attributes:T,childNodes:[],isSVG:s2(t)||void 0,needBlock:g,needMask:w,rootId:v,isCustom:O}}function ft(t){return t==null?"":t.toLowerCase()}function d2(t,e){return!!(e.comment&&t.type===Et.Comment||t.type===Et.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&rv(t.attributes.href)==="js")||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ft(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ft(t.attributes.name)==="application-name"||ft(t.attributes.rel)==="icon"||ft(t.attributes.rel)==="apple-touch-icon"||ft(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&ft(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(ft(t.attributes.property).match(/^(og|twitter|fb):/)||ft(t.attributes.name).match(/^(og|twitter):/)||ft(t.attributes.name)==="pinterest")||e.headMetaRobots&&(ft(t.attributes.name)==="robots"||ft(t.attributes.name)==="googlebot"||ft(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(ft(t.attributes.name)==="author"||ft(t.attributes.name)==="generator"||ft(t.attributes.name)==="framework"||ft(t.attributes.name)==="publisher"||ft(t.attributes.name)==="progid"||ft(t.attributes.property).match(/^article:/)||ft(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(ft(t.attributes.name)==="google-site-verification"||ft(t.attributes.name)==="yandex-verification"||ft(t.attributes.name)==="csrf-token"||ft(t.attributes.name)==="p:domain_verify"||ft(t.attributes.name)==="verify-v1"||ft(t.attributes.name)==="verification"||ft(t.attributes.name)==="shopify-checkout-api-token"))))}function er(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:d=!1,inlineVideos:v=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:U=!1,cssCaptured:C=!1,privacySetting:N}=e,{needsMask:P}=e,{preserveWhiteSpace:st=!0}=e;P||(P=cv(t,s,a,P===void 0));let lt=c2(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,inlineStylesheet:l,maskInputOptions:u,maskTextClass:s,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,keepIframeSrcFn:O,newlyAddedElement:U,cssCaptured:C,privacySetting:N});if(!lt)return console.warn(t,"not serialized"),null;let y;r.hasNode(t)?y=r.getId(t):d2(lt,f)||!st&&lt.type===Et.Text&&!lt.textContent.replace(/^\s+|\s+$/gm,"").length?y=mi:y=sv();let b=Object.assign(lt,{id:y});if(r.add(t,b),y===mi)return null;w&&w(t);let Z=!c,D=N,M=N==="strict";if(b.type===Et.Element){if(Z=Z&&!b.needBlock,M||(M=!!b.needBlock||!!b.needMask),D=M?"strict":D,M&&gu(b.tagName)){let ct=t.cloneNode();ct.src="",r.add(ct,b)}delete b.needBlock,delete b.needMask;let it=xt.shadowRoot(t);it&&ui(it)&&(b.isShadowHost=!0)}if((b.type===Et.Document||b.type===Et.Element)&&Z){f.headWhitespace&&b.type===Et.Element&&b.tagName==="head"&&(st=!1);let it={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:O,cssCaptured:!1,privacySetting:D};if(!(b.type===Et.Element&&b.tagName==="textarea"&&b.attributes.value!==void 0)){b.type===Et.Element&&b.attributes.uo!==void 0&&typeof b.attributes.uo=="string"&&(it.cssCaptured=!0);for(let Ot of Array.from(xt.childNodes(t))){let Ue=er(Ot,it);Ue&&b.childNodes.push(Ue)}}let ct=null;if(ev(t)&&(ct=xt.shadowRoot(t)))for(let Ot of Array.from(xt.childNodes(ct))){let Ue=er(Ot,it);Ue&&(ui(ct)&&(Ue.isShadow=!0),b.childNodes.push(Ue))}}let G=xt.parentNode(t);return G&&ci(G)&&ui(G)&&(b.isShadow=!0),b.type===Et.Element&&b.tagName==="iframe"&&a2(t,()=>{let it=t.contentDocument;if(it&&R){let ct=er(it,{doc:it,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:O,privacySetting:N});ct&&R(t,ct)}},E),b.type===Et.Element&&b.tagName==="link"&&typeof b.attributes.rel=="string"&&(b.attributes.rel==="stylesheet"||b.attributes.rel==="preload"&&typeof b.attributes.href=="string"&&rv(b.attributes.href)==="css")&&l2(t,()=>{if(T){let it=er(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:O,privacySetting:N});it&&T(t,it)}},V),b}function f2(t,e){let{mirror:n=new Js,blockClass:r="highlight-block",blockSelector:i=null,maskTextClass:o="highlight-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:c=!1,inlineVideos:l=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:p,maskInputFn:f,slimDOM:m=!1,dataURLOptions:d,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:V=()=>!1,privacySetting:O="default"}=e||{};return er(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:h===!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}:h===!1?{password:!0}:h,maskTextFn:p,maskInputFn:f,slimDOMOptions:m||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m||{},dataURLOptions:d,inlineImages:c,inlineVideos:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:V,newlyAddedElement:!1,privacySetting:O})}function m2(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function v2(t){return t[0].toUpperCase()+t.slice(1)}function wu(t,e){new w2(e).stringify(t)}function Su(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Su(s,n)):(o==="object"&&i!==null&&(i=Su(i)),n[r]=i)}return n}function $r(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
15
- `?(n=1,r+=1):n+=1}return i}function vv(t){return t.map(e=>(e.nodes&&(e.nodes=vv(e.nodes)),delete e.source,e))}function wv(t){if(t[mv]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)wv(e)}function X2(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function bi(t,e){if(Array.isArray(t))return t.map(o=>bi(o));let n=t,{inputs:r}=n,i=or(n,["inputs"]);if(r){e=[];for(let o of r){let s=Kt(z({},o),{__proto__:K2.prototype});s.map&&(s.map=Kt(z({},s.map),{__proto__:_2.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>bi(o,e))),i.source){let o=i.source,{inputId:s}=o,a=or(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new H2(i);if(i.type==="decl")return new Y2(i);if(i.type==="rule")return new z2(i);if(i.type==="comment")return new D2(i);if(i.type==="atrule")return new J2(i);throw new Error("Unknown node type: "+t.type)}function gU(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function Qs(t,e){let n=new SU(t,e),r=new IU(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
14
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Au.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),aa(aa({},t),{definitions:n})}function OW(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function NW(t){var e=Lv(t);if(!Qs.has(e)){var n=Zv(t,{experimentalFragmentVariables:la,allowLegacyFragmentVariables:la});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Qs.set(e,OW(VW(n)))}return Qs.get(e)}function Ht(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),NW(r)}function GW(){Qs.clear(),Au.clear()}function LW(){Gv=!1}function XW(){la=!0}function WW(){la=!1}function _W(t,e=KW){return{PushPayload(n,r){return e(i=>t.request(Wv,n,it(it({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(MW,n,it(it({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(PW,n,it(it({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(UW,n,it(it({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(FW,n,it(it({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(AW,n,it(it({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(DW,n,it(it({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(JW,n,it(it({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(YW,n,it(it({},r),i)),"GetSamplingConfig","query",n)}}}function HW(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function zW(){return HW()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function Rs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function Du(t,e){function n(i,o,s){if(typeof document<"u"){s=Rs({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Rs({},o,{expires:-1}))},withAttributes:function(i){return Du(this.converter,Rs({},this.attributes,i))},withConverter:function(i){return Du(Rs({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function Av(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Dv(t){return t.kind==="multi"}function w2(t){return Dv(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Av(t[e].key)}`).join(":"):t.key}function S2(t){return Dv(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Av(t[e].key)})).reduce((e,n)=>it(it({},e),n),{}):t.key}function Jv(t,e){return E2(t)}function T2(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}function Kh(t){if(Cs[t])return Cs[t];let e=globalThis[t],n=e.prototype,r=t in hb?hb[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in pb?pb[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!P2())return Cs[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?Cs[t]=l:n}catch(a){return n}}function dn(t,e,n){var r;let i=`${t}.${String(n)}`;if(vu[i])return vu[i].call(e);let o=Kh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(vu[i]=s,s.call(e)):e[n]}function _v(t,e,n){let r=`${t}.${String(n)}`;if(wu[r])return wu[r].bind(e);let i=Kh(t)[n];return typeof i!="function"?e[n]:(wu[r]=i,i.bind(e))}function U2(t){return dn("Node",t,"childNodes")}function F2(t){return dn("Node",t,"parentNode")}function A2(t){return dn("Node",t,"parentElement")}function D2(t){return dn("Node",t,"textContent")}function J2(t,e){return _v("Node",t,"contains")(e)}function Y2(t){return _v("Node",t,"getRootNode")()}function K2(t){return!t||!("host"in t)?null:dn("ShadowRoot",t,"host")}function _2(t){return t.styleSheets}function H2(t){return!t||!("shadowRoot"in t)?null:dn("Element",t,"shadowRoot")}function z2(t,e){return dn("Element",t,"querySelector")(e)}function B2(t,e){return dn("Element",t,"querySelectorAll")(e)}function j2(){return Kh("MutationObserver").constructor}function Q2(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function Hv(t){return t.nodeType===t.ELEMENT_NODE}function Li(t){let e=t&&"host"in t&&"mode"in t&&Pt.host(t)||null;return!!(e&&"shadowRoot"in e&&Pt.shadowRoot(e)===t)}function Xi(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function $2(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function q2(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function ju(t){try{let e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&t.ownerNode.ownerDocument&&(n=t.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>zv(i,n)).join("");return $2(r)}catch(e){return null}}function zv(t,e){if(eM(t)){let n;try{n=ju(t.styleSheet)||q2(t)}catch(r){n=t.cssText}return t.styleSheet.href?ma(n,t.styleSheet.href):n}else{let n=t.cssText;return nM(t)&&t.selectorText.includes(":")&&(n=tM(n)),e?ma(n,e):n}}function tM(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function eM(t){return"styleSheet"in t}function nM(t){return"selectorText"in t}function rM(){return new pa}function da({element:t,maskInputOptions:e,tagName:n,type:r,value:i,overwriteRecord:o,maskInputFn:s}){let a=i||"";return Qv({maskInputOptions:e,tagName:n,type:r,overwriteRecord:o})&&(s?a=s(a,t):a="*".repeat(a.length)),a}function Zr(t){return t.toLowerCase()}function iM(t){let e=t.getContext("2d");if(!e)return!0;let n=50;for(let r=0;r<t.width;r+=n)for(let i=0;i<t.height;i+=n){let o=e.getImageData,s=db in o?o[db]:o;if(new Uint32Array(s.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function fa(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Zr(e):null}function Bv(t,e){var n;let r;try{r=new URL(t,window.location.href)}catch(s){return null}let i=/\.([0-9a-z]+)(?:$)/i,o=r.pathname.match(i);return(n=o==null?void 0:o[1])!=null?n:null}function oM(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function ma(t,e){return(t||"").replace(sM,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(aM.test(c)||lM.test(c))return`url(${l}${c}${l})`;if(cM.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${oM(e)+c}${l})`;let u=e.split("/"),h=c.split("/");u.pop();for(let p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${l}${u.join("/")}${l})`})}function ks(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function uM(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=ks(t,n),a=s.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){let l=ks(r[c].textContent,n),u=100,h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){let p=l.substring(0,h),f=s.split(p),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&r[c-1].textContent!=="")m=s.indexOf(p,1);else if(f.length===1){if(p=p.substring(0,p.length-1),f=s.split(p),f.length<=1)return i.push(t),i;h=u+1}else h===l.length-1&&(m=s.indexOf(p));if(f.length>=2&&h>u){let d=r[c-1].textContent;if(d&&typeof d=="string"){let g=ks(d).length;m=s.indexOf(p,g)}m===-1&&(m=f[0].length)}if(m!==-1){let d=Math.floor(m/a);for(;d>0&&d<t.length;){if(o+=1,o>50*r.length)return i.push(t),i;let g=ks(t.substring(0,d),n);if(g.length===m){i.push(t.substring(0,d)),t=t.substring(d),s=s.substring(m);break}else g.length<m?d+=Math.max(1,Math.floor((m-g.length)/a)):d-=Math.max(1,Math.floor((g.length-m)*a))}break}}}}return i.push(t),i}function hM(t,e){return uM(t,e).join("/* rr_split */")}function _h(t){return t=t.replace(/[^ -~]+/g,""),t=(t==null?void 0:t.split(" ").map(e=>Math.random().toString(20).substring(2,e.length)).join(" "))||"",t}function Qu(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function jv(t){return t?vM.some(e=>e.test(t)):!1}function $v(){return wM++}function IM(t){if(t instanceof HTMLFormElement)return"form";let e=Zr(t.tagName);return SM.test(e)?"div":e}function RM(t,e){if(e.trim()==="")return e;let n=0;function r(o){let s,a=o.exec(e.substring(n));return a?(s=a[0],n+=s.length,s):""}let i=[];for(;r(EM),!(n>=e.length);){let o=r(TM);if(o.slice(-1)===",")o=ya(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=ya(t,o);let a=!1;for(;;){let c=e.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}function ya(t,e){return!e||e.trim()===""?e:Hh(t,e)}function CM(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Hh(t,e){let n=mb.get(t);if(n||(n=t.createElement("a"),mb.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function qv(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?ya(t,r):n==="srcset"?RM(t,r):n==="style"?ma(r,Hh(t)):e==="object"&&n==="data"?ya(t,r):r)}function t0(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function yb(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}if(n)return t.matches(n)}catch(r){}return!1}function ga(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?ga(Pt.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}return n?ga(Pt.parentNode(t),e,n):!1}function e0(t,e,n,r){let i;if(Hv(t)){if(i=t,!Pt.childNodes(i).length)return!1}else{if(Pt.parentElement(t)===null)return!1;i=Pt.parentElement(t)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(ga(i,e,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch(o){}return!1}function kM(t,e,n){let r=t.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let s="about:blank";if(r.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function ZM(t,e,n){let r=!1,i;try{i=t.sheet}catch(s){return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function xM(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:c={},maskTextClass:l,maskTextFn:u,maskInputFn:h,dataURLOptions:p={},inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:b=!1,cssCaptured:w=!1,privacySetting:E}=e,I=VM(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:kt.Document,childNodes:[],compatMode:t.compatMode}:{type:kt.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:kt.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:I};case t.ELEMENT_NODE:return NM(t,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,maskTextClass:l,dataURLOptions:p,inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:b,privacySetting:E,rootId:I});case t.TEXT_NODE:return OM(t,{doc:n,needsMask:s,maskTextFn:u,privacySetting:E,rootId:I,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:kt.CDATA,textContent:"",rootId:I};case t.COMMENT_NODE:return{type:kt.Comment,textContent:Pt.textContent(t)||"",rootId:I};default:return!1}}function VM(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function OM(t,e){var n;let{needsMask:r,maskTextFn:i,privacySetting:o,rootId:s,cssCaptured:a}=e,c=Pt.parentNode(t),l=c&&c.tagName,u="",h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0;p?u="SCRIPT_PLACEHOLDER":a||(u=Pt.textContent(t),h&&u&&(u=ma(u,Hh(e.doc)))),!h&&!p&&u&&r&&(u=i?i(u,Pt.parentElement(t)):u.replace(/[\S]/g,"*"));let f=o==="strict",m=(n=t.parentElement)==null?void 0:n.getAttribute("data-hl-record"),d=o==="default"&&jv(u);return(f||d)&&!m&&l&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(l)&&u&&(u=_h(u)),{type:kt.Text,textContent:u||"",rootId:s}}function NM(t,e){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:a,maskTextClass:c,dataURLOptions:l={},inlineImages:u,inlineVideos:h,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,privacySetting:d,rootId:g}=e,b=yb(t,r,i),w=yb(t,c,null),E=d==="strict",I=IM(t),S={},T=t.attributes.length;for(let k=0;k<T;k++){let O=t.attributes[k];t0(I,O.name)||(S[O.name]=qv(n,I,Zr(O.name),O.value))}if(I==="link"&&o){let k=Array.from(n.styleSheets).find(X=>X.href===t.href),O=null;k&&(O=ju(k)),O&&(delete S.rel,delete S.href,S.uo=O)}if(I==="style"&&t.sheet){let k=ju(t.sheet);k&&(t.childNodes.length>1&&(k=hM(k,t)),S.uo=k)}if(I==="input"||I==="textarea"||I==="select"){let k=t.value,O=t.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&k?S.value=da({element:t,type:fa(t),tagName:I,value:k,overwriteRecord:t.getAttribute("data-hl-record"),maskInputOptions:s,maskInputFn:a}):O&&(S.checked=O)}if(I==="option"&&(t.selected&&!s.select?S.selected=!0:delete S.selected),I==="dialog"&&t.open&&(S.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),I==="canvas"&&p){if(t.__context==="2d")iM(t);else if(!("__context"in t)){let k=t.toDataURL(l.type,l.quality),O=n.createElement("canvas");O.width=t.width,O.height=t.height;let X=O.toDataURL(l.type,l.quality);k!==X&&(S.rr_dataURL=k)}}if(I==="img"&&u&&!b&&!w&&!E){vr||(vr=n.createElement("canvas"),fb=vr.getContext("2d"));let k=t,O=k.currentSrc||k.getAttribute("src")||"<unknown-src>",X=k.crossOrigin,_=()=>{k.removeEventListener("load",_);try{vr.width=k.naturalWidth,vr.height=k.naturalHeight,fb.drawImage(k,0,0),S.rr_dataURL=vr.toDataURL(l.type,l.quality)}catch(tt){if(k.crossOrigin!=="anonymous"){k.crossOrigin="anonymous",k.complete&&k.naturalWidth!==0?_():k.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${O}! Error: ${tt}`)}k.crossOrigin==="anonymous"&&(X?S.crossOrigin=X:k.removeAttribute("crossorigin"))};k.complete&&k.naturalWidth!==0?_():k.addEventListener("load",_)}if(I==="audio"||I==="video"){let k=S;k.rr_mediaState=t.paused?"paused":"played",k.rr_mediaCurrentTime=t.currentTime,k.rr_mediaPlaybackRate=t.playbackRate,k.rr_mediaMuted=t.muted,k.rr_mediaLoop=t.loop,k.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),b||w||E&&Qu(I)){let{width:k,height:O}=t.getBoundingClientRect();S={class:S.class,rr_width:`${k}px`,rr_height:`${O}px`}}E&&Qu(I)&&(b=!0),I==="iframe"&&!f(S.src)&&(t.contentDocument||(S.rr_src=S.src),delete S.src);let x;try{customElements.get(I)&&(x=!0)}catch(k){}let Z=k=>{let{width:O,height:X}=k.getBoundingClientRect();S={width:O,height:X,rr_width:`${O}px`,rr_height:`${X}px`,rr_inlined_video:!0,class:S.class,style:S.style},I="canvas";let _=n.createElement("canvas");_.width=t.width,_.height=t.height,S.rr_dataURL=_.toDataURL(l.type,l.quality)};if(I==="video"){let k=t;u&&(k.src===""||k.src.indexOf("blob:")!==-1)&&Z(k),h&&k.src!==""&&k.src.indexOf("blob:")===-1&&Z(k)}return{type:kt.Element,tagName:I,attributes:S,childNodes:[],isSVG:CM(t)||void 0,needBlock:b,needMask:w,rootId:g,isCustom:x}}function gt(t){return t==null?"":t.toLowerCase()}function GM(t,e){return!!(e.comment&&t.type===kt.Comment||t.type===kt.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Bv(t.attributes.href)==="js")||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(gt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||gt(t.attributes.name)==="application-name"||gt(t.attributes.rel)==="icon"||gt(t.attributes.rel)==="apple-touch-icon"||gt(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&gt(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(gt(t.attributes.property).match(/^(og|twitter|fb):/)||gt(t.attributes.name).match(/^(og|twitter):/)||gt(t.attributes.name)==="pinterest")||e.headMetaRobots&&(gt(t.attributes.name)==="robots"||gt(t.attributes.name)==="googlebot"||gt(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(gt(t.attributes.name)==="author"||gt(t.attributes.name)==="generator"||gt(t.attributes.name)==="framework"||gt(t.attributes.name)==="publisher"||gt(t.attributes.name)==="progid"||gt(t.attributes.property).match(/^article:/)||gt(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(gt(t.attributes.name)==="google-site-verification"||gt(t.attributes.name)==="yandex-verification"||gt(t.attributes.name)==="csrf-token"||gt(t.attributes.name)==="p:domain_verify"||gt(t.attributes.name)==="verify-v1"||gt(t.attributes.name)==="verification"||gt(t.attributes.name)==="shopify-checkout-api-token"))))}function Tr(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:d=!1,inlineVideos:g=!1,recordCanvas:b=!1,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:I=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:Z=!1,cssCaptured:k=!1,privacySetting:O}=e,{needsMask:X}=e,{preserveWhiteSpace:_=!0}=e;X||(X=e0(t,s,a,X===void 0));let tt=xM(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:X,inlineStylesheet:l,maskInputOptions:u,maskTextClass:s,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,inlineVideos:g,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:Z,cssCaptured:k,privacySetting:O});if(!tt)return console.warn(t,"not serialized"),null;let y;r.hasNode(t)?y=r.getId(t):GM(tt,f)||!_&&tt.type===kt.Text&&!tt.textContent.replace(/^\s+|\s+$/gm,"").length?y=Fi:y=$v();let v=Object.assign(tt,{id:y});if(r.add(t,v),y===Fi)return null;w&&w(t);let V=!c,D=O,U=O==="strict";if(v.type===kt.Element){if(V=V&&!v.needBlock,U||(U=!!v.needBlock||!!v.needMask),D=U?"strict":D,U&&Qu(v.tagName)){let lt=t.cloneNode();lt.src="",r.add(lt,v)}delete v.needBlock,delete v.needMask;let q=Pt.shadowRoot(t);q&&Xi(q)&&(v.isShadowHost=!0)}if((v.type===kt.Document||v.type===kt.Element)&&V){f.headWhitespace&&v.type===kt.Element&&v.tagName==="head"&&(_=!1);let q={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:X,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:x,cssCaptured:!1,privacySetting:D};if(!(v.type===kt.Element&&v.tagName==="textarea"&&v.attributes.value!==void 0)){v.type===kt.Element&&v.attributes.uo!==void 0&&typeof v.attributes.uo=="string"&&(q.cssCaptured=!0);for(let Zt of Array.from(Pt.childNodes(t))){let Ce=Tr(Zt,q);Ce&&v.childNodes.push(Ce)}}let lt=null;if(Hv(t)&&(lt=Pt.shadowRoot(t)))for(let Zt of Array.from(Pt.childNodes(lt))){let Ce=Tr(Zt,q);Ce&&(Xi(lt)&&(Ce.isShadow=!0),v.childNodes.push(Ce))}}let L=Pt.parentNode(t);return L&&Li(L)&&Xi(L)&&(v.isShadow=!0),v.type===kt.Element&&v.tagName==="iframe"&&kM(t,()=>{let q=t.contentDocument;if(q&&E){let lt=Tr(q,{doc:q,mirror:r,blockClass:i,blockSelector:o,needsMask:X,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:x,privacySetting:O});lt&&E(t,lt)}},I),v.type===kt.Element&&v.tagName==="link"&&typeof v.attributes.rel=="string"&&(v.attributes.rel==="stylesheet"||v.attributes.rel==="preload"&&typeof v.attributes.href=="string"&&Bv(v.attributes.href)==="css")&&ZM(t,()=>{if(S){let q=Tr(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:X,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:x,privacySetting:O});q&&S(t,q)}},T),v}function LM(t,e){let{mirror:n=new pa,blockClass:r="highlight-block",blockSelector:i=null,maskTextClass:o="highlight-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:c=!1,inlineVideos:l=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:p,maskInputFn:f,slimDOM:m=!1,dataURLOptions:d,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:S,keepIframeSrcFn:T=()=>!1,privacySetting:x="default"}=e||{};return Tr(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:h===!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}:h===!1?{password:!0}:h,maskTextFn:p,maskInputFn:f,slimDOMOptions:m||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m||{},dataURLOptions:d,inlineImages:c,inlineVideos:l,recordCanvas:u,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:S,keepIframeSrcFn:T,newlyAddedElement:!1,privacySetting:x})}function XM(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function UM(t){return t[0].toUpperCase()+t.slice(1)}function th(t,e){new FM(e).stringify(t)}function eh(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>eh(s,n)):(o==="object"&&i!==null&&(i=eh(i)),n[r]=i)}return n}function Ti(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
15
+ `?(n=1,r+=1):n+=1}return i}function h0(t){return t.map(e=>(e.nodes&&(e.nodes=h0(e.nodes)),delete e.source,e))}function p0(t){if(t[a0]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)p0(e)}function eP(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Ji(t,e){if(Array.isArray(t))return t.map(o=>Ji(o));let n=t,{inputs:r}=n,i=kr(n,["inputs"]);if(r){e=[];for(let o of r){let s=Qt(j({},o),{__proto__:hP.prototype});s.map&&(s.map=Qt(j({},s.map),{__proto__:pP.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>Ji(o,e))),i.source){let o=i.source,{inputId:s}=o,a=kr(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new dP(i);if(i.type==="decl")return new uP(i);if(i.type==="rule")return new fP(i);if(i.type==="comment")return new cP(i);if(i.type==="atrule")return new lP(i);throw new Error("Unknown node type: "+t.type)}function MP(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function Sa(t,e){let n=new AP(t,e),r=new DP(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
16
16
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
17
17
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
18
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ti(t){return typeof t=="object"&&typeof t.then=="function"}function Pv(t){let e=!1,n=OU[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,lr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,lr,n+"Exit"]:[n,n+"Exit"]}function Ag(t){let e;return t.type==="document"?e=["Document",lr,"DocumentExit"]:t.type==="root"?e=["Root",lr,"RootExit"]:e=Pv(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function xu(t){return t[Se]=!1,t.nodes&&t.nodes.forEach(e=>xu(e)),t}function ht(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Th(t)}function oP(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function cP(t){return t[0].toUpperCase()+t.slice(1)}function Xu(t,e){new uP(e).stringify(t)}function Wu(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Wu(s,n)):(o==="object"&&i!==null&&(i=Wu(i)),n[r]=i)}return n}function ni(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
19
- `?(n=1,r+=1):n+=1}return i}function n0(t){return t.map(e=>(e.nodes&&(e.nodes=n0(e.nodes)),delete e.source,e))}function r0(t){if(t[$v]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)r0(e)}function RP(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Ii(t,e){if(Array.isArray(t))return t.map(o=>Ii(o));let n=t,{inputs:r}=n,i=or(n,["inputs"]);if(r){e=[];for(let o of r){let s=Kt(z({},o),{__proto__:XP.prototype});s.map&&(s.map=Kt(z({},s.map),{__proto__:WP.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>Ii(o,e))),i.source){let o=i.source,{inputId:s}=o,a=or(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new UP(i);if(i.type==="decl")return new LP(i);if(i.type==="rule")return new PP(i);if(i.type==="comment")return new GP(i);if(i.type==="atrule")return new OP(i);throw new Error("Unknown node type: "+t.type)}function aM(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function ea(t,e){let n=new hM(t,e),r=new pM(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
18
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function Ri(t){return typeof t=="object"&&typeof t.then=="function"}function V0(t){let e=!1,n=$P[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Vr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Vr,n+"Exit"]:[n,n+"Exit"]}function Gb(t){let e;return t.type==="document"?e=["Document",Vr,"DocumentExit"]:t.type==="root"?e=["Root",Vr,"RootExit"]:e=V0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function uh(t){return t[We]=!1,t.nodes&&t.nodes.forEach(e=>uh(e)),t}function dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new rp(t)}function RU(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function xU(t){return t[0].toUpperCase()+t.slice(1)}function mh(t,e){new VU(e).stringify(t)}function yh(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>yh(s,n)):(o==="object"&&i!==null&&(i=yh(i)),n[r]=i)}return n}function ki(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
19
+ `?(n=1,r+=1):n+=1}return i}function z0(t){return t.map(e=>(e.nodes&&(e.nodes=z0(e.nodes)),delete e.source,e))}function B0(t){if(t[Y0]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)B0(e)}function KU(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Hi(t,e){if(Array.isArray(t))return t.map(o=>Hi(o));let n=t,{inputs:r}=n,i=kr(n,["inputs"]);if(r){e=[];for(let o of r){let s=Qt(j({},o),{__proto__:eF.prototype});s.map&&(s.map=Qt(j({},s.map),{__proto__:nF.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>Hi(o,e))),i.source){let o=i.source,{inputId:s}=o,a=kr(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new rF(i);if(i.type==="decl")return new tF(i);if(i.type==="rule")return new iF(i);if(i.type==="comment")return new qU(i);if(i.type==="atrule")return new $U(i);throw new Error("Unknown node type: "+t.type)}function kF(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function Ra(t,e){let n=new OF(t,e),r=new NF(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
20
20
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
21
21
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
22
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ii(t){return typeof t=="object"&&typeof t.then=="function"}function S0(t){let e=!1,n=IM[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,hr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,hr,n+"Exit"]:[n,n+"Exit"]}function ib(t){let e;return t.type==="document"?e=["Document",hr,"DocumentExit"]:t.type==="root"?e=["Root",hr,"RootExit"]:e=S0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Ku(t){return t[Ie]=!1,t.nodes&&t.nodes.forEach(e=>Ku(e)),t}function pt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Gh(t)}function Lh(t){if(ws[t])return ws[t];let e=globalThis[t],n=e.prototype,r=t in ob?ob[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in sb?sb[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!HM())return ws[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?ws[t]=l:n}catch(a){return n}}function je(t,e,n){var r;let i=`${t}.${String(n)}`;if(Bc[i])return Bc[i].call(e);let o=Lh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Bc[i]=s,s.call(e)):e[n]}function x0(t,e,n){let r=`${t}.${String(n)}`;if(jc[r])return jc[r].bind(e);let i=Lh(t)[n];return typeof i!="function"?e[n]:(jc[r]=i,i.bind(e))}function zM(t){return je("Node",t,"childNodes")}function BM(t){return je("Node",t,"parentNode")}function jM(t){return je("Node",t,"parentElement")}function QM(t){return je("Node",t,"textContent")}function $M(t,e){return x0("Node",t,"contains")(e)}function qM(t){return x0("Node",t,"getRootNode")()}function tF(t){return!t||!("host"in t)?null:je("ShadowRoot",t,"host")}function eF(t){return t.styleSheets}function nF(t){return!t||!("shadowRoot"in t)?null:je("Element",t,"shadowRoot")}function rF(t,e){return je("Element",t,"querySelector")(e)}function iF(t,e){return je("Element",t,"querySelectorAll")(e)}function N0(){return Lh("MutationObserver").constructor}function Zn(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function Mt(t,e,n=document){let r={capture:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function Ei(t,e,n={}){let r=null,i=0;return function(...o){let s=Date.now();!i&&n.leading===!1&&(i=s);let a=e-(s-i),c=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=s,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},a))}}function wa(t,e,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(s){setTimeout(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>wa(t,e,o||{},!0)}function O0(t){var e,n,r,i;let o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=q.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o==null?void 0:o.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=q.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function G0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function L0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function X0(t){return t?t.nodeType===t.ELEMENT_NODE?t:q.parentElement(t):null}function Nt(t,e,n,r){if(!t)return!1;let i=X0(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Hs(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function sF(t,e){return e.getId(t)!==-1}function Qc(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===mi}function W0(t,e){if(ci(t))return!1;let n=e.getId(t);if(!e.has(n))return!0;let r=q.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?W0(r,e):!0}function Bu(t){return!!t.changedTouches}function aF(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function U0(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function P0(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function ju(t){return t?t instanceof zu&&"shadowRoot"in t?!!t.shadowRoot:!!q.shadowRoot(t):!1}function M0(t){var e;let n=null;return"getRootNode"in t&&((e=q.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&q.host(q.getRootNode(t))&&(n=q.host(q.getRootNode(t))),n}function lF(t){let e=t,n;for(;n=M0(e);)e=n;return e}function cF(t){let e=t.ownerDocument;if(!e)return!1;let n=lF(t);return q.contains(e,n)}function F0(t){let e=t.ownerDocument;return e?q.contains(e,t)||cF(t):!1}function lb(t){return"__ln"in t}function th(t,e){t.delete(e),q.childNodes(e).forEach(n=>th(t,n))}function uF(t,e){let n=[t];for(;n.length;){let r=n.pop();e.has(r)||(e.add(r),q.childNodes(r).forEach(i=>n.push(i)))}}function ub(t,e,n){return t.size===0?!1:hF(t,e)}function hF(t,e,n){let r=q.parentNode(e);return r?t.has(r):!1}function hb(t,e){return t.size===0?!1:J0(t,e)}function J0(t,e){let n=q.parentNode(e);return n?t.has(n)?!0:J0(t,n):!1}function pF(t){hi=t}function dF(){hi=void 0}function Ni(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function D0(t,e){let n=new qu;Tn.push(n),n.init(t);let r=new(N0())(nt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function fF({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,s=[],a,c=Ei(nt(h=>{let p=Date.now()-a;t(s.map(f=>(f.timeOffset-=p,f)),h),s=[],a=null}),o),l=nt(Ei(nt(h=>{let p=Ni(h),{clientX:f,clientY:m}=Bu(h)?h.changedTouches[0]:h;a||(a=na()),s.push({x:f,y:m,id:r.getId(p),timeOffset:na()-a}),c(typeof DragEvent<"u"&&h instanceof DragEvent?et.Drag:h instanceof MouseEvent?et.MouseMove:et.TouchMove)}),i,{trailing:!1})),u=[Mt("mousemove",l,n),Mt("touchmove",l,n),Mt("drag",l,n)];return nt(()=>{u.forEach(h=>h())})}function mF({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],c=null,l=u=>h=>{let p=Ni(h);if(Nt(p,r,i,!0)||oF(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=_e.Mouse;break;case"touch":f=_e.Touch;break;case"pen":f=_e.Pen;break}f===_e.Touch&&(Dt[u]===Dt.MouseDown?m="TouchStart":Dt[u]===Dt.MouseUp&&(m="TouchEnd"))}else Bu(h)&&(f=_e.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===_e.Touch||m.startsWith("Mouse")&&f===_e.Mouse)&&(f=null)):Dt[u]===Dt.Click&&(f=c,c=null);let d=Bu(h)?h.changedTouches[0]:h;if(!d)return;let v=n.getId(p),{clientX:g,clientY:w}=d;nt(t)(z({type:Dt[m],id:v,x:g,y:w},f!==null&&{pointerType:f}))};return Object.keys(Dt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&s[u]!==!1).forEach(u=>{let h=sr(u),p=l(u);if(window.PointerEvent)switch(Dt[u]){case Dt.MouseDown:case Dt.MouseUp:h=h.replace("mouse","pointer");break;case Dt.TouchStart:case Dt.TouchEnd:return}a.push(Mt(h,p,e))}),nt(()=>{a.forEach(u=>u())})}function Y0({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){let s=nt(Ei(nt(a=>{let c=Ni(a);if(!c||Nt(c,r,i,!0))return;let l=n.getId(c);if(c===e&&e.defaultView){let u=O0(e.defaultView);t({id:l,x:u.left,y:u.top})}else t({id:l,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Mt("scroll",s,e)}function yF({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=nt(Ei(nt(()=>{let o=G0(),s=L0();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Mt("resize",i,e)}function bF({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(g){let w=Ni(g),R=g.isTrusted,E=w&&w.tagName;if(w&&E==="OPTION"&&(w=q.parentElement(w)),!w||!E||gF.indexOf(E)<0||Nt(w,r,i,!0)||w.classList.contains(o)||s&&w.matches(s))return;let T=w.value,V=!1,O=Ys(w)||"",U=w.getAttribute("data-hl-record");O==="radio"||O==="checkbox"?V=w.checked:ov({maskInputOptions:a,type:O,tagName:E,overwriteRecord:U})&&(T=Ds({element:w,maskInputOptions:a,tagName:E,type:O,value:T,overwriteRecord:U,maskInputFn:c})),p(w,u?{text:T,isChecked:V,userTriggered:R}:{text:T,isChecked:V});let C=w.name;O==="radio"&&C&&V&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(N=>{if(N!==w){let P=N.value;p(N,u?{text:P,isChecked:!V,userTriggered:!1}:{text:P,isChecked:!V})}})}function p(g,w){let R=pb.get(g);if(!R||R.text!==w.text||R.isChecked!==w.isChecked){pb.set(g,w);let E=n.getId(g);nt(t)(Kt(z({},w),{id:E}))}}let f=(l.input==="last"?["change"]:["input","change"]).map(g=>Mt(g,nt(h),e)),m=e.defaultView;if(!m)return()=>{f.forEach(g=>g())};let d=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 d&&d.set&&f.push(...v.map(g=>wa(g[0],g[1],{set(){nt(h)({target:this,isTrusted:!1})}},!1,m))),nt(()=>{f.forEach(g=>g())})}function ra(t){let e=[];function n(r,i){if(Ss("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ss("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ss("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ss("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(t,e)}function He(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function vF({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:nt((u,h,p)=>{let[f,m]=p,{id:d,styleId:v}=He(h,e,n.styleMirror);return(d&&d!==-1||v&&v!==-1)&&t({id:d,styleId:v,adds:[{rule:f,index:m}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){let f=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[f,p])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=He(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,removes:[{index:f}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=He(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replace:f}),u.apply(h,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=He(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};Is("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Is("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Is("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Is("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([u,h])=>{l[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(l[u].insertRule,{apply:nt((p,f,m)=>{let[d,v]=m,{id:g,styleId:w}=He(f.parentStyleSheet,e,n.styleMirror);return(g&&g!==-1||w&&w!==-1)&&t({id:g,styleId:w,adds:[{rule:d,index:[...ra(f),v||0]}]}),p.apply(f,m)})}),h.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:nt((p,f,m)=>{let[d]=m,{id:v,styleId:g}=He(f.parentStyleSheet,e,n.styleMirror);return(v&&v!==-1||g&&g!==-1)&&t({id:v,styleId:g,removes:[{index:[...ra(f),d]}]}),p.apply(f,m)})})}),nt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([u,h])=>{h.prototype.insertRule=l[u].insertRule,h.prototype.deleteRule=l[u].deleteRule})})}function K0({mirror:t,stylesheetManager:e},n){var r,i,o;let s=null;n.nodeName==="#document"?s=t.getId(n):s=t.getId(q.host(n));let a=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(i=n.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,c=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!a||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return(l=c.get)==null?void 0:l.call(this)},set(l){var u;let h=(u=c.set)==null?void 0:u.call(this,l);if(s!==null&&s!==-1)try{e.adoptStyleSheets(l,s)}catch(p){}return h}}),nt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function wF({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:nt((a,c,l)=>{var u;let[h,p,f]=l;if(n.has(h))return o.apply(c,[h,p,f]);let{id:m,styleId:d}=He((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,set:{property:h,value:p,priority:f},index:ra(c.parentRule)}),a.apply(c,l)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:nt((a,c,l)=>{var u;let[h]=l;if(n.has(h))return s.apply(c,[h]);let{id:p,styleId:f}=He((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||f&&f!==-1)&&t({id:p,styleId:f,remove:{property:h},index:ra(c.parentRule)}),a.apply(c,l)})}),nt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function SF({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:i,doc:o}){let s=nt(c=>Ei(nt(l=>{let u=Ni(l);if(!u||Nt(u,e,n,!0))return;let{currentTime:h,volume:p,muted:f,playbackRate:m,loop:d}=u;t({type:c,id:r.getId(u),currentTime:h,volume:p,muted:f,playbackRate:m,loop:d})}),i.media||500)),a=[Mt("play",s(qn.Play),o),Mt("pause",s(qn.Pause),o),Mt("seeked",s(qn.Seeked),o),Mt("volumechange",s(qn.VolumeChange),o),Mt("ratechange",s(qn.RateChange),o)];return nt(()=>{a.forEach(c=>c())})}function IF({fontCb:t,doc:e}){let n=e.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(a,c,l){let u=new o(a,c,l);return i.set(u,{family:a,buffer:typeof c!="string",descriptors:l,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};let s=Zn(e.fonts,"add",function(a){return function(c){return setTimeout(nt(()=>{let l=i.get(c);l&&(t(l),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),nt(()=>{r.forEach(a=>a())})}function TF(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=t,s=!0,a=nt(()=>{let c=e.getSelection();if(!c||s&&c!=null&&c.isCollapsed)return;s=c.isCollapsed||!1;let l=[],u=c.rangeCount||0;for(let h=0;h<u;h++){let p=c.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:d,endOffset:v}=p;Nt(f,r,i,!0)||Nt(d,r,i,!0)||l.push({start:n.getId(f),startOffset:m,end:n.getId(d),endOffset:v})}o({ranges:l})});return a(),Mt("selectionchange",a)}function EF({doc:t,customElementCb:e}){let n=t.defaultView;return!n||!n.customElements?()=>{}:Zn(n.customElements,"define",function(r){return function(i,o,s){try{e({define:{name:i}})}catch(a){console.warn(`Custom element callback failed for ${i}`)}return r.apply(this,[i,o,s])}})}function RF(t,e){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:f,customElementCb:m}=t;t.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),n(...d)},t.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},t.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},t.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},t.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),s(...d)},t.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},t.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),c(...d)},t.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),l(...d)},t.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},t.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},t.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},t.selectionCb=(...d)=>{e.selection&&e.selection(...d),f(...d)},t.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),m(...d)}}function CF(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};RF(t,e);let r;t.recordDOM&&(r=D0(t,t.doc));let i=fF(t),o=mF(t),s=Y0(t),a=yF(t,{win:n}),c=bF(t),l=SF(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=vF(t,{win:n}),h=K0(t,t.doc),p=wF(t,{win:n}),t.collectFonts&&(f=IF(t)));let m=TF(t),d=EF(t),v=[];for(let g of t.plugins)v.push(g.observer(g.callback,n,g.options));return nt(()=>{Tn.forEach(g=>g.reset()),r==null||r.disconnect(),i(),o(),s(),a(),c(),l(),u(),h(),p(),f(),m(),d(),v.forEach(g=>g())})}function Ss(t){return typeof window[t]<"u"}function Is(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function VF(t,e){let n=db.get(t);return n||(n=new Map,db.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function Gs(t,e,n){if(t instanceof Array)return t.map(r=>Gs(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let r=t.constructor.name,i=kF(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Gs(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let r=t.constructor.name,{src:i}=t;return{rr_type:r,src:i}}else if(t instanceof HTMLCanvasElement){let r="HTMLImageElement",i=t.toDataURL();return{rr_type:r,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Gs(t.data,e,n),t.width,t.height]};if(z0(t,e)||typeof t=="object"){let r=t.constructor.name,i=_0(t,e,n);return{rr_type:r,index:i}}}}return t}function xF(t,e,n,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof e.CanvasRenderingContext2D.prototype[s]!="function")continue;let a=Zn(e.CanvasRenderingContext2D.prototype,s,function(c){return function(...l){return Nt(this.canvas,n,r,!0)||setTimeout(()=>{let u=H0(l,e,this);t(this.canvas,{type:dr["2D"],property:s,args:u})},0),c.apply(this,l)}});i.push(a)}catch(a){let c=wa(e.CanvasRenderingContext2D.prototype,s,{set(l){t(this.canvas,{type:dr["2D"],property:s,args:[l],setter:!0})}});i.push(c)}return()=>{i.forEach(s=>s())}}function NF(t){return t==="experimental-webgl"?"webgl":t}function fb(t,e,n,r){let i=[];try{let o=Zn(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(a,...c){if(!Nt(this,e,n,!0)){let l=NF(a);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(c[0]&&typeof c[0]=="object"){let u=c[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[a,...c])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function mb(t,e,n,r,i,o){let s=[],a=Object.getOwnPropertyNames(t);for(let c of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;let l=Zn(t,c,function(u){return function(...h){let p=u.apply(this,h);if(_0(p,o,this),"tagName"in this.canvas&&!Nt(this.canvas,r,i,!0)){let f=H0(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=wa(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function OF(t,e,n,r){let i=[];return i.push(...mb(e.WebGLRenderingContext.prototype,dr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...mb(e.WebGL2RenderingContext.prototype,dr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function LF(t){let e;try{if(e=yb&&(self.URL||self.webkitURL).createObjectURL(yb),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+B0,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function Le(t={}){var e,n,r,i,o,s,a,c;let{emit:l,checkoutEveryNms:u,checkoutEveryNth:h,blockClass:p="highlight-block",blockSelector:f=null,ignoreClass:m="highlight-ignore",ignoreSelector:d=null,maskTextClass:v="highlight-mask",maskTextSelector:g=null,inlineStylesheet:w=!0,maskAllInputs:R,maskInputOptions:E,slimDOMOptions:T,maskInputFn:V,maskTextFn:O=ph,hooks:U,packFn:C,sampling:N={},mousemoveWait:P,recordDOM:st=!0,recordCanvas:lt=!1,recordCrossOriginIframes:y=!1,recordAfter:b=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:Z=!1,collectFonts:D=!1,inlineImages:M=!1,inlineVideos:G=!1,plugins:it,keepIframeSrcFn:ct=()=>!1,privacySetting:Ot="default",ignoreCSSAttributes:Ue=new Set([]),errorHandler:$0,logger:q0}=t,Oi=z(z({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);pF($0);let Gi=y?window.parent===window:!0,mr=!1;if(!Gi)try{window.parent.document&&(mr=!1)}catch(at){mr=!0}if(Gi&&!l)throw new Error("emit function is required");if(!Gi&&!mr)return()=>{};P!==void 0&&N.mousemove===void 0&&(N.mousemove=P),ce.reset();let Sa=R===!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}:E!==void 0?E:{password:!0},Ia=T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:T==="all",headMetaDescKeywords:T==="all",headTitleMutations:T==="all"}:T||{};aF();let Xh,Ta=0,Wh=at=>{for(let ie of it||[])ie.eventProcessor&&(at=ie.eventProcessor(at));return C&&!mr&&(at=C(at)),at};vt=(at,ie)=>{var gt;let bt=at;if(bt.timestamp=na(),(gt=Tn[0])!=null&&gt.isFrozen()&&bt.type!==rt.FullSnapshot&&!(bt.type===rt.IncrementalSnapshot&&bt.data.source===et.Mutation)&&Tn.forEach(pe=>pe.unfreeze()),Gi)l==null||l(Wh(bt),ie);else if(mr){let pe={type:"rrweb",event:Wh(bt),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(pe,"*")}if(bt.type===rt.FullSnapshot)Xh=bt,Ta=0;else if(bt.type===rt.IncrementalSnapshot){if(bt.data.source===et.Mutation&&bt.data.isAttachIframe)return;Ta++;let pe=h&&Ta>=h,dt=u&&bt.timestamp-Xh.timestamp>u;(pe||dt)&&Ls(!0)}};let Li=at=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Mutation},at)})},Uh=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Scroll},at)}),Ph=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.CanvasMutation},at)}),tw=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.AdoptedStyleSheet},at)}),Qe=new ih({mutationCb:Li,adoptedStyleSheetCb:tw}),$e=new eh({mirror:ce,mutationCb:Li,stylesheetManager:Qe,recordCrossOriginIframes:y,wrappedEmit:vt});for(let at of it||[])at.getMirror&&at.getMirror({nodeMirror:ce,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});let Ea=new oh;pi=new rh({recordCanvas:lt,recordLocalVideos:M,recordRemoteVideos:G,mutationCb:Ph,win:window,blockClass:p,blockSelector:f,mirror:ce,sampling:(r=N==null?void 0:N.canvas)==null?void 0:r.fps,samplingManual:(i=N==null?void 0:N.canvas)==null?void 0:i.fpsManual,clearWebGLBuffer:(o=N==null?void 0:N.canvas)==null?void 0:o.clearWebGLBuffer,initialSnapshotDelay:(s=N==null?void 0:N.canvas)==null?void 0:s.initialSnapshotDelay,dataURLOptions:Oi,resizeFactor:(a=N==null?void 0:N.canvas)==null?void 0:a.resizeFactor,maxSnapshotDimension:(c=N==null?void 0:N.canvas)==null?void 0:c.maxSnapshotDimension,logger:q0});let Xi=new nh({mutationCb:Li,scrollCb:Uh,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:v,maskTextSelector:g,inlineStylesheet:w,maskInputOptions:Sa,dataURLOptions:Oi,maskTextFn:O,maskInputFn:V,recordCanvas:lt,inlineImages:M,inlineVideos:G,privacySetting:Ot,sampling:N,slimDOMOptions:Ia,iframeManager:$e,stylesheetManager:Qe,canvasManager:pi,keepIframeSrcFn:ct,processedNodeManager:Ea},mirror:ce});Ls=(at=!1)=>{if(!st)return;vt({type:rt.Meta,data:{href:window.location.href,width:L0(),height:G0()}},at),Qe.reset(),Xi.init(),Tn.forEach(gt=>gt.lock());let ie=f2(document,{mirror:ce,blockClass:p,blockSelector:f,maskTextClass:v,maskTextSelector:g,inlineStylesheet:w,maskAllInputs:Sa,maskTextFn:O,maskInputFn:V,slimDOM:Ia,dataURLOptions:Oi,recordCanvas:lt,inlineImages:M,inlineVideos:G,privacySetting:Ot,onSerialize:gt=>{U0(gt,ce)&&$e.addIframe(gt),P0(gt,ce)&&Qe.trackLinkElement(gt),ju(gt)&&Xi.addShadowRoot(q.shadowRoot(gt),document)},onIframeLoad:(gt,bt)=>{$e.attachIframe(gt,bt),Xi.observeAttachShadow(gt)},onStylesheetLoad:(gt,bt)=>{Qe.attachLinkElement(gt,bt)},keepIframeSrcFn:ct});if(!ie)return console.warn("Failed to snapshot the document");vt({type:rt.FullSnapshot,data:{node:ie,initialOffset:O0(window)}},at),Tn.forEach(gt=>gt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Qe.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{let at=[],ie=bt=>{var pe;return nt(CF)({mutationCb:Li,mousemoveCb:(dt,Ra)=>vt({type:rt.IncrementalSnapshot,data:{source:Ra,positions:dt}}),mouseInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MouseInteraction},dt)}),scrollCb:Uh,viewportResizeCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.ViewportResize},dt)}),inputCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Input},dt)}),mediaInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MediaInteraction},dt)}),styleSheetRuleCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleSheetRule},dt)}),styleDeclarationCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleDeclaration},dt)}),canvasMutationCb:Ph,fontCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Font},dt)}),selectionCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Selection},dt)})},customElementCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.CustomElement},dt)})},blockClass:p,ignoreClass:m,ignoreSelector:d,maskTextClass:v,maskTextSelector:g,maskInputOptions:Sa,inlineStylesheet:w,sampling:N,recordDOM:st,recordCanvas:lt,inlineImages:M,inlineVideos:G,userTriggeredOnInput:Z,collectFonts:D,doc:bt,maskInputFn:V,maskTextFn:O,keepIframeSrcFn:ct,blockSelector:f,slimDOMOptions:Ia,dataURLOptions:Oi,mirror:ce,iframeManager:$e,stylesheetManager:Qe,shadowDomManager:Xi,processedNodeManager:Ea,canvasManager:pi,ignoreCSSAttributes:Ue,privacySetting:Ot,plugins:((pe=it==null?void 0:it.filter(dt=>dt.observer))==null?void 0:pe.map(dt=>({observer:dt.observer,options:dt.options,callback:Ra=>vt({type:rt.Plugin,data:{plugin:dt.name,payload:Ra}})})))||[]},U)};$e.addLoadListener(bt=>{try{at.push(ie(bt.contentDocument))}catch(pe){console.warn(pe)}});let gt=()=>{Ls(),at.push(ie(document)),oa=!0};return document.readyState==="interactive"||document.readyState==="complete"?gt():(at.push(Mt("DOMContentLoaded",()=>{vt({type:rt.DomContentLoaded,data:{}}),b==="DOMContentLoaded"&&gt()})),at.push(Mt("load",()=>{vt({type:rt.Load,data:{}}),b==="load"&&gt()},window))),()=>{at.forEach(bt=>bt()),Ea.destroy(),oa=!1,dF()}}catch(at){console.warn(at)}}function DF(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");let e=t.split(","),n=e.lastIndexOf("");for(;n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function _F(t,e){let n=e.slice(0,e.length-1);for(let r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function HF(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function zF(t,e,n){let r;if(e.scope===n||e.scope==="all"){r=e.mods.length>0;for(let i in Pt)Object.prototype.hasOwnProperty.call(Pt,i)&&(!Pt[i]&&e.mods.indexOf(+i)>-1||Pt[i]&&e.mods.indexOf(+i)===-1)&&(r=!1);(e.mods.length===0&&!Pt[16]&&!Pt[18]&&!Pt[17]&&!Pt[91]||r||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function BF(t){let e=Te["*"],n=t.keyCode||t.which||t.charCode;if((n===93||n===224)&&(n=91),Ut.indexOf(n)===-1&&n!==229&&Ut.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(r=>{let i=wb[r];t[r]&&Ut.indexOf(i)===-1?Ut.push(i):!t[r]&&Ut.indexOf(i)>-1?Ut.splice(Ut.indexOf(i),1):r==="metaKey"&&t[r]&&Ut.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(Ut=Ut.slice(Ut.indexOf(i))))}),!(n in Pt&&(Pt[n]=!0,!e))){for(let r in Pt)Object.prototype.hasOwnProperty.call(Pt,r)&&(Pt[r]=t[wb[r]]);if(t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(Ut.indexOf(17)===-1&&Ut.push(17),Ut.indexOf(18)===-1&&Ut.push(18),Pt[17]=!0,Pt[18]=!0),n in Te){for(let r=0;r<Te[n].length;r++)if((t.type==="keydown"&&Te[n][r].keydown||t.type==="keyup"&&Te[n][r].keyup)&&Te[n][r].key){let i=Te[n][r];zF(t,i,"all")}}}}function t9(t){let e;try{if(e=Tb&&(self.URL||self.webkitURL).createObjectURL(Tb),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+Q0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db,_0,H0,z0,B0,GF,yb,rh,ih,oh,vt,Ls,pi,oa,ce,gb,bb,XF,WF,UF,PF,MF,FF,vb,$c,AF,JF,Ut,Te,qc,YF,wb,Pt,j0,KF,Sb,Ib,Ri,jF,QF,$F,Q0,qF,Tb,Oe,e9,n9,r9,i9,sh,Ci,Gc=Yh(()=>{"use strict";eL=Object.defineProperty,nL=(t,e,n)=>e in t?eL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ge=(t,e,n)=>nL(t,typeof e!="symbol"?e+"":e,n),rL=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Ht=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),iL(r,...n)},iL=(t,...e)=>rL(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>(rg(),ng));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),Eb=class{constructor(t,e){Ge(this,"debug"),Ge(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},Bn=class{constructor(){Ge(this,"_sdk"),Ge(this,"_isLoaded",!1),Ge(this,"_callBuffer",[]),Ge(this,"_capacity",1e5),Ge(this,"_droppedEvents",0),Ge(this,"_exceededCapacity",!1),Ge(this,"_logger",new Eb)}p(e,n){if(this.xn)try{return this.Bn[e](...n)}catch(r){Ht(`Error executing buffered call to ${e}:`,"error",r)}else{this.Ur({method:e,args:n});return}}Ur(e){this.wn.length<this.Es?(this.wn.push(e),this.jn=!1):(this.jn||(this.jn=!0,Ht("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Rs+=1)}load(e){this.Bn=e,this.xn=!0;for(let{method:n,args:r}of this.wn)try{this.Bn[n](...r)}catch(i){Ht(`Error executing buffered call to ${n}:`,"error",i)}this.wn=[]}},oL=Object.defineProperty,sL=Object.defineProperties,aL=Object.getOwnPropertyDescriptors,Xs=Object.getOwnPropertySymbols,Rb=Object.prototype.hasOwnProperty,Cb=Object.prototype.propertyIsEnumerable,tu=(t,e,n)=>e in t?oL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))Rb.call(e,n)&&tu(t,n,e[n]);if(Xs)for(var n of Xs(e))Cb.call(e,n)&&tu(t,n,e[n]);return t},rr=(t,e)=>sL(t,aL(e)),ai=(t,e)=>{var n={};for(var r in t)Rb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xs)for(var r of Xs(t))e.indexOf(r)<0&&Cb.call(t,r)&&(n[r]=t[r]);return n},di=(t,e,n)=>tu(t,typeof e!="symbol"?e+"":e,n),ir=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});hL=/\r\n|[\n\r]/g;nu=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=dL(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=og(Array.isArray(s)?s:s?[s]:void 0);let p=og((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>eu(a,m)):p==null?void 0:p.map(m=>eu(m.source,m.start));let f=cL(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
22
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function xi(t){return typeof t=="object"&&typeof t.then=="function"}function dw(t){let e=!1,n=DF[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Gr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Gr,n+"Exit"]:[n,n+"Exit"]}function jb(t){let e;return t.type==="document"?e=["Document",Gr,"DocumentExit"]:t.type==="root"?e=["Root",Gr,"RootExit"]:e=dw(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Rh(t){return t[Me]=!1,t.nodes&&t.nodes.forEach(e=>Rh(e)),t}function ft(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new dp(t)}function fp(t){if(Ys[t])return Ys[t];let e=globalThis[t],n=e.prototype,r=t in Qb?Qb[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in $b?$b[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!dA())return Ys[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?Ys[t]=l:n}catch(a){return n}}function fn(t,e,n){var r;let i=`${t}.${String(n)}`;if(xu[i])return xu[i].call(e);let o=fp(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(xu[i]=s,s.call(e)):e[n]}function Iw(t,e,n){let r=`${t}.${String(n)}`;if(Vu[r])return Vu[r].bind(e);let i=fp(t)[n];return typeof i!="function"?e[n]:(Vu[r]=i,i.bind(e))}function fA(t){return fn("Node",t,"childNodes")}function mA(t){return fn("Node",t,"parentNode")}function yA(t){return fn("Node",t,"parentElement")}function gA(t){return fn("Node",t,"textContent")}function bA(t,e){return Iw("Node",t,"contains")(e)}function vA(t){return Iw("Node",t,"getRootNode")()}function wA(t){return!t||!("host"in t)?null:fn("ShadowRoot",t,"host")}function SA(t){return t.styleSheets}function IA(t){return!t||!("shadowRoot"in t)?null:fn("Element",t,"shadowRoot")}function TA(t,e){return fn("Element",t,"querySelector")(e)}function EA(t,e){return fn("Element",t,"querySelectorAll")(e)}function Tw(){return fp("MutationObserver").constructor}function _n(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function _t(t,e,n=document){let r={capture:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function Bi(t,e,n={}){let r=null,i=0;return function(...o){let s=Date.now();!i&&n.leading===!1&&(i=s);let a=e-(s-i),c=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=s,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},a))}}function Ya(t,e,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(s){setTimeout(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Ya(t,e,o||{},!0)}function Ew(t){var e,n,r,i;let o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=ot.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o==null?void 0:o.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=ot.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Rw(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Cw(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function kw(t){return t?t.nodeType===t.ELEMENT_NODE?t:ot.parentElement(t):null}function Ut(t,e,n,r){if(!t)return!1;let i=kw(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(ga(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function CA(t,e){return e.getId(t)!==-1}function Ou(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Fi}function Zw(t,e){if(Li(t))return!1;let n=e.getId(t);if(!e.has(n))return!0;let r=ot.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?Zw(r,e):!0}function xh(t){return!!t.changedTouches}function kA(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function xw(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Vw(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Vh(t){return t?t instanceof Zh&&"shadowRoot"in t?!!t.shadowRoot:!!ot.shadowRoot(t):!1}function Ow(t){var e;let n=null;return"getRootNode"in t&&((e=ot.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ot.host(ot.getRootNode(t))&&(n=ot.host(ot.getRootNode(t))),n}function ZA(t){let e=t,n;for(;n=Ow(e);)e=n;return e}function xA(t){let e=t.ownerDocument;if(!e)return!1;let n=ZA(t);return ot.contains(e,n)}function Nw(t){let e=t.ownerDocument;return e?ot.contains(e,t)||xA(t):!1}function tv(t){return"__ln"in t}function Lh(t,e){t.delete(e),ot.childNodes(e).forEach(n=>Lh(t,n))}function VA(t,e){let n=[t];for(;n.length;){let r=n.pop();e.has(r)||(e.add(r),ot.childNodes(r).forEach(i=>n.push(i)))}}function nv(t,e,n){return t.size===0?!1:OA(t,e)}function OA(t,e,n){let r=ot.parentNode(e);return r?t.has(r):!1}function rv(t,e){return t.size===0?!1:Lw(t,e)}function Lw(t,e){let n=ot.parentNode(e);return n?t.has(n)?!0:Lw(t,n):!1}function NA(t){Wi=t}function GA(){Wi=void 0}function no(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function Xw(t,e){let n=new Gh;Dn.push(n),n.init(t);let r=new(Tw())(ct(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function LA({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,s=[],a,c=Bi(ct(h=>{let p=Date.now()-a;t(s.map(f=>(f.timeOffset-=p,f)),h),s=[],a=null}),o),l=ct(Bi(ct(h=>{let p=no(h),{clientX:f,clientY:m}=xh(h)?h.changedTouches[0]:h;a||(a=Ca()),s.push({x:f,y:m,id:r.getId(p),timeOffset:Ca()-a}),c(typeof DragEvent<"u"&&h instanceof DragEvent?at.Drag:h instanceof MouseEvent?at.MouseMove:at.TouchMove)}),i,{trailing:!1})),u=[_t("mousemove",l,n),_t("touchmove",l,n),_t("drag",l,n)];return ct(()=>{u.forEach(h=>h())})}function XA({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],c=null,l=u=>h=>{let p=no(h);if(Ut(p,r,i,!0)||RA(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=un.Mouse;break;case"touch":f=un.Touch;break;case"pen":f=un.Pen;break}f===un.Touch&&(Bt[u]===Bt.MouseDown?m="TouchStart":Bt[u]===Bt.MouseUp&&(m="TouchEnd"))}else xh(h)&&(f=un.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===un.Touch||m.startsWith("Mouse")&&f===un.Mouse)&&(f=null)):Bt[u]===Bt.Click&&(f=c,c=null);let d=xh(h)?h.changedTouches[0]:h;if(!d)return;let g=n.getId(p),{clientX:b,clientY:w}=d;ct(t)(j({type:Bt[m],id:g,x:b,y:w},f!==null&&{pointerType:f}))};return Object.keys(Bt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&s[u]!==!1).forEach(u=>{let h=Zr(u),p=l(u);if(window.PointerEvent)switch(Bt[u]){case Bt.MouseDown:case Bt.MouseUp:h=h.replace("mouse","pointer");break;case Bt.TouchStart:case Bt.TouchEnd:return}a.push(_t(h,p,e))}),ct(()=>{a.forEach(u=>u())})}function Ww({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){let s=ct(Bi(ct(a=>{let c=no(a);if(!c||Ut(c,r,i,!0))return;let l=n.getId(c);if(c===e&&e.defaultView){let u=Ew(e.defaultView);t({id:l,x:u.left,y:u.top})}else t({id:l,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return _t("scroll",s,e)}function WA({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=ct(Bi(ct(()=>{let o=Rw(),s=Cw();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return _t("resize",i,e)}function PA({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(b){let w=no(b),E=b.isTrusted,I=w&&w.tagName;if(w&&I==="OPTION"&&(w=ot.parentElement(w)),!w||!I||MA.indexOf(I)<0||Ut(w,r,i,!0)||w.classList.contains(o)||s&&w.matches(s))return;let S=w.value,T=!1,x=fa(w)||"",Z=w.getAttribute("data-hl-record");x==="radio"||x==="checkbox"?T=w.checked:Qv({maskInputOptions:a,type:x,tagName:I,overwriteRecord:Z})&&(S=da({element:w,maskInputOptions:a,tagName:I,type:x,value:S,overwriteRecord:Z,maskInputFn:c})),p(w,u?{text:S,isChecked:T,userTriggered:E}:{text:S,isChecked:T});let k=w.name;x==="radio"&&k&&T&&e.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(O=>{if(O!==w){let X=O.value;p(O,u?{text:X,isChecked:!T,userTriggered:!1}:{text:X,isChecked:!T})}})}function p(b,w){let E=iv.get(b);if(!E||E.text!==w.text||E.isChecked!==w.isChecked){iv.set(b,w);let I=n.getId(b);ct(t)(Qt(j({},w),{id:I}))}}let f=(l.input==="last"?["change"]:["input","change"]).map(b=>_t(b,ct(h),e)),m=e.defaultView;if(!m)return()=>{f.forEach(b=>b())};let d=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),g=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&f.push(...g.map(b=>Ya(b[0],b[1],{set(){ct(h)({target:this,isTrusted:!1})}},!1,m))),ct(()=>{f.forEach(b=>b())})}function ka(t){let e=[];function n(r,i){if(Ks("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ks("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ks("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ks("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(t,e)}function hn(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function UA({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ct((u,h,p)=>{let[f,m]=p,{id:d,styleId:g}=hn(h,e,n.styleMirror);return(d&&d!==-1||g&&g!==-1)&&t({id:d,styleId:g,adds:[{rule:f,index:m}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){let f=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[f,p])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:ct((u,h,p)=>{let[f]=p,{id:m,styleId:d}=hn(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,removes:[{index:f}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ct((u,h,p)=>{let[f]=p,{id:m,styleId:d}=hn(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replace:f}),u.apply(h,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ct((u,h,p)=>{let[f]=p,{id:m,styleId:d}=hn(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};_s("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(_s("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),_s("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),_s("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([u,h])=>{l[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(l[u].insertRule,{apply:ct((p,f,m)=>{let[d,g]=m,{id:b,styleId:w}=hn(f.parentStyleSheet,e,n.styleMirror);return(b&&b!==-1||w&&w!==-1)&&t({id:b,styleId:w,adds:[{rule:d,index:[...ka(f),g||0]}]}),p.apply(f,m)})}),h.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:ct((p,f,m)=>{let[d]=m,{id:g,styleId:b}=hn(f.parentStyleSheet,e,n.styleMirror);return(g&&g!==-1||b&&b!==-1)&&t({id:g,styleId:b,removes:[{index:[...ka(f),d]}]}),p.apply(f,m)})})}),ct(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([u,h])=>{h.prototype.insertRule=l[u].insertRule,h.prototype.deleteRule=l[u].deleteRule})})}function Mw({mirror:t,stylesheetManager:e},n){var r,i,o;let s=null;n.nodeName==="#document"?s=t.getId(n):s=t.getId(ot.host(n));let a=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(i=n.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,c=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!a||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return(l=c.get)==null?void 0:l.call(this)},set(l){var u;let h=(u=c.set)==null?void 0:u.call(this,l);if(s!==null&&s!==-1)try{e.adoptStyleSheets(l,s)}catch(p){}return h}}),ct(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function FA({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ct((a,c,l)=>{var u;let[h,p,f]=l;if(n.has(h))return o.apply(c,[h,p,f]);let{id:m,styleId:d}=hn((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,set:{property:h,value:p,priority:f},index:ka(c.parentRule)}),a.apply(c,l)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ct((a,c,l)=>{var u;let[h]=l;if(n.has(h))return s.apply(c,[h]);let{id:p,styleId:f}=hn((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||f&&f!==-1)&&t({id:p,styleId:f,remove:{property:h},index:ka(c.parentRule)}),a.apply(c,l)})}),ct(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function AA({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:i,doc:o}){let s=ct(c=>Bi(ct(l=>{let u=no(l);if(!u||Ut(u,e,n,!0))return;let{currentTime:h,volume:p,muted:f,playbackRate:m,loop:d}=u;t({type:c,id:r.getId(u),currentTime:h,volume:p,muted:f,playbackRate:m,loop:d})}),i.media||500)),a=[_t("play",s(Sr.Play),o),_t("pause",s(Sr.Pause),o),_t("seeked",s(Sr.Seeked),o),_t("volumechange",s(Sr.VolumeChange),o),_t("ratechange",s(Sr.RateChange),o)];return ct(()=>{a.forEach(c=>c())})}function DA({fontCb:t,doc:e}){let n=e.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(a,c,l){let u=new o(a,c,l);return i.set(u,{family:a,buffer:typeof c!="string",descriptors:l,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};let s=_n(e.fonts,"add",function(a){return function(c){return setTimeout(ct(()=>{let l=i.get(c);l&&(t(l),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),ct(()=>{r.forEach(a=>a())})}function JA(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=t,s=!0,a=ct(()=>{let c=e.getSelection();if(!c||s&&c!=null&&c.isCollapsed)return;s=c.isCollapsed||!1;let l=[],u=c.rangeCount||0;for(let h=0;h<u;h++){let p=c.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:d,endOffset:g}=p;Ut(f,r,i,!0)||Ut(d,r,i,!0)||l.push({start:n.getId(f),startOffset:m,end:n.getId(d),endOffset:g})}o({ranges:l})});return a(),_t("selectionchange",a)}function YA({doc:t,customElementCb:e}){let n=t.defaultView;return!n||!n.customElements?()=>{}:_n(n.customElements,"define",function(r){return function(i,o,s){try{e({define:{name:i}})}catch(a){console.warn(`Custom element callback failed for ${i}`)}return r.apply(this,[i,o,s])}})}function KA(t,e){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:f,customElementCb:m}=t;t.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),n(...d)},t.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},t.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},t.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},t.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),s(...d)},t.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},t.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),c(...d)},t.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),l(...d)},t.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},t.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},t.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},t.selectionCb=(...d)=>{e.selection&&e.selection(...d),f(...d)},t.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),m(...d)}}function _A(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};KA(t,e);let r;t.recordDOM&&(r=Xw(t,t.doc));let i=LA(t),o=XA(t),s=Ww(t),a=WA(t,{win:n}),c=PA(t),l=AA(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=UA(t,{win:n}),h=Mw(t,t.doc),p=FA(t,{win:n}),t.collectFonts&&(f=DA(t)));let m=JA(t),d=YA(t),g=[];for(let b of t.plugins)g.push(b.observer(b.callback,n,b.options));return ct(()=>{Dn.forEach(b=>b.reset()),r==null||r.disconnect(),i(),o(),s(),a(),c(),l(),u(),h(),p(),f(),m(),d(),g.forEach(b=>b())})}function Ks(t){return typeof window[t]<"u"}function _s(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function BA(t,e){let n=ov.get(t);return n||(n=new Map,ov.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function ra(t,e,n){if(t instanceof Array)return t.map(r=>ra(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let r=t.constructor.name,i=zA(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[ra(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let r=t.constructor.name,{src:i}=t;return{rr_type:r,src:i}}else if(t instanceof HTMLCanvasElement){let r="HTMLImageElement",i=t.toDataURL();return{rr_type:r,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[ra(t.data,e,n),t.width,t.height]};if(Fw(t,e)||typeof t=="object"){let r=t.constructor.name,i=Pw(t,e,n);return{rr_type:r,index:i}}}}return t}function jA(t,e,n,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof e.CanvasRenderingContext2D.prototype[s]!="function")continue;let a=_n(e.CanvasRenderingContext2D.prototype,s,function(c){return function(...l){return Ut(this.canvas,n,r,!0)||setTimeout(()=>{let u=Uw(l,e,this);t(this.canvas,{type:Xr["2D"],property:s,args:u})},0),c.apply(this,l)}});i.push(a)}catch(a){let c=Ya(e.CanvasRenderingContext2D.prototype,s,{set(l){t(this.canvas,{type:Xr["2D"],property:s,args:[l],setter:!0})}});i.push(c)}return()=>{i.forEach(s=>s())}}function QA(t){return t==="experimental-webgl"?"webgl":t}function sv(t,e,n,r){let i=[];try{let o=_n(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(a,...c){if(!Ut(this,e,n,!0)){let l=QA(a);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(c[0]&&typeof c[0]=="object"){let u=c[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[a,...c])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function av(t,e,n,r,i,o){let s=[],a=Object.getOwnPropertyNames(t);for(let c of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;let l=_n(t,c,function(u){return function(...h){let p=u.apply(this,h);if(Pw(p,o,this),"tagName"in this.canvas&&!Ut(this.canvas,r,i,!0)){let f=Uw(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=Ya(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function $A(t,e,n,r){let i=[];return i.push(...av(e.WebGLRenderingContext.prototype,Xr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...av(e.WebGL2RenderingContext.prototype,Xr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function t9(t){let e;try{if(e=lv&&(self.URL||self.webkitURL).createObjectURL(lv),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+Aw,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function je(t={}){var e,n,r,i,o,s,a,c;let{emit:l,checkoutEveryNms:u,checkoutEveryNth:h,blockClass:p="highlight-block",blockSelector:f=null,ignoreClass:m="highlight-ignore",ignoreSelector:d=null,maskTextClass:g="highlight-mask",maskTextSelector:b=null,inlineStylesheet:w=!0,maskAllInputs:E,maskInputOptions:I,slimDOMOptions:S,maskInputFn:T,maskTextFn:x=_h,hooks:Z,packFn:k,sampling:O={},mousemoveWait:X,recordDOM:_=!0,recordCanvas:tt=!1,recordCrossOriginIframes:y=!1,recordAfter:v=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:D=!1,inlineImages:U=!1,inlineVideos:L=!1,plugins:q,keepIframeSrcFn:lt=()=>!1,privacySetting:Zt="default",ignoreCSSAttributes:Ce=new Set([]),errorHandler:ro,logger:io}=t,qe=j(j({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);NA(ro);let Hn=y?window.parent===window:!0,mn=!1;if(!Hn)try{window.parent.document&&(mn=!1)}catch(Q){mn=!0}if(Hn&&!l)throw new Error("emit function is required");if(!Hn&&!mn)return()=>{};X!==void 0&&O.mousemove===void 0&&(O.mousemove=X),Te.reset();let yn=E===!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}:I!==void 0?I:{password:!0},Mr=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all",headTitleMutations:S==="all"}:S||{};kA();let Y,ht=0,$t=Q=>{for(let ne of q||[])ne.eventProcessor&&(Q=ne.eventProcessor(Q));return k&&!mn&&(Q=k(Q)),Q};It=(Q,ne)=>{var vt;let wt=Q;if(wt.timestamp=Ca(),(vt=Dn[0])!=null&&vt.isFrozen()&&wt.type!==ut.FullSnapshot&&!(wt.type===ut.IncrementalSnapshot&&wt.data.source===at.Mutation)&&Dn.forEach(Ze=>Ze.unfreeze()),Hn)l==null||l($t(wt),ne);else if(mn){let Ze={type:"rrweb",event:$t(wt),origin:window.location.origin,isCheckout:ne};window.parent.postMessage(Ze,"*")}if(wt.type===ut.FullSnapshot)Y=wt,ht=0;else if(wt.type===ut.IncrementalSnapshot){if(wt.data.source===at.Mutation&&wt.data.isAttachIframe)return;ht++;let Ze=h&&ht>=h,mt=u&&wt.timestamp-Y.timestamp>u;(Ze||mt)&&ia(!0)}};let Lt=Q=>{It({type:ut.IncrementalSnapshot,data:j({source:at.Mutation},Q)})},qt=Q=>It({type:ut.IncrementalSnapshot,data:j({source:at.Scroll},Q)}),te=Q=>It({type:ut.IncrementalSnapshot,data:j({source:at.CanvasMutation},Q)}),zn=Q=>It({type:ut.IncrementalSnapshot,data:j({source:at.AdoptedStyleSheet},Q)}),ee=new Ph({mutationCb:Lt,adoptedStyleSheetCb:zn}),se=new Xh({mirror:Te,mutationCb:Lt,stylesheetManager:ee,recordCrossOriginIframes:y,wrappedEmit:It});for(let Q of q||[])Q.getMirror&&Q.getMirror({nodeMirror:Te,crossOriginIframeMirror:se.crossOriginIframeMirror,crossOriginIframeStyleMirror:se.crossOriginIframeStyleMirror});let ke=new Uh;Mi=new Mh({recordCanvas:tt,recordLocalVideos:U,recordRemoteVideos:L,mutationCb:te,win:window,blockClass:p,blockSelector:f,mirror:Te,sampling:(r=O==null?void 0:O.canvas)==null?void 0:r.fps,samplingManual:(i=O==null?void 0:O.canvas)==null?void 0:i.fpsManual,clearWebGLBuffer:(o=O==null?void 0:O.canvas)==null?void 0:o.clearWebGLBuffer,initialSnapshotDelay:(s=O==null?void 0:O.canvas)==null?void 0:s.initialSnapshotDelay,dataURLOptions:qe,resizeFactor:(a=O==null?void 0:O.canvas)==null?void 0:a.resizeFactor,maxSnapshotDimension:(c=O==null?void 0:O.canvas)==null?void 0:c.maxSnapshotDimension,logger:io});let yt=new Wh({mutationCb:Lt,scrollCb:qt,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:g,maskTextSelector:b,inlineStylesheet:w,maskInputOptions:yn,dataURLOptions:qe,maskTextFn:x,maskInputFn:T,recordCanvas:tt,inlineImages:U,inlineVideos:L,privacySetting:Zt,sampling:O,slimDOMOptions:Mr,iframeManager:se,stylesheetManager:ee,canvasManager:Mi,keepIframeSrcFn:lt,processedNodeManager:ke},mirror:Te});ia=(Q=!1)=>{if(!_)return;It({type:ut.Meta,data:{href:window.location.href,width:Cw(),height:Rw()}},Q),ee.reset(),yt.init(),Dn.forEach(vt=>vt.lock());let ne=LM(document,{mirror:Te,blockClass:p,blockSelector:f,maskTextClass:g,maskTextSelector:b,inlineStylesheet:w,maskAllInputs:yn,maskTextFn:x,maskInputFn:T,slimDOM:Mr,dataURLOptions:qe,recordCanvas:tt,inlineImages:U,inlineVideos:L,privacySetting:Zt,onSerialize:vt=>{xw(vt,Te)&&se.addIframe(vt),Vw(vt,Te)&&ee.trackLinkElement(vt),Vh(vt)&&yt.addShadowRoot(ot.shadowRoot(vt),document)},onIframeLoad:(vt,wt)=>{se.attachIframe(vt,wt),yt.observeAttachShadow(vt)},onStylesheetLoad:(vt,wt)=>{ee.attachLinkElement(vt,wt)},keepIframeSrcFn:lt});if(!ne)return console.warn("Failed to snapshot the document");It({type:ut.FullSnapshot,data:{node:ne,initialOffset:Ew(window)}},Q),Dn.forEach(vt=>vt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ee.adoptStyleSheets(document.adoptedStyleSheets,Te.getId(document))};try{let Q=[],ne=wt=>{var Ze;return ct(_A)({mutationCb:Lt,mousemoveCb:(mt,Ka)=>It({type:ut.IncrementalSnapshot,data:{source:Ka,positions:mt}}),mouseInteractionCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.MouseInteraction},mt)}),scrollCb:qt,viewportResizeCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.ViewportResize},mt)}),inputCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.Input},mt)}),mediaInteractionCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.MediaInteraction},mt)}),styleSheetRuleCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.StyleSheetRule},mt)}),styleDeclarationCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.StyleDeclaration},mt)}),canvasMutationCb:te,fontCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.Font},mt)}),selectionCb:mt=>{It({type:ut.IncrementalSnapshot,data:j({source:at.Selection},mt)})},customElementCb:mt=>{It({type:ut.IncrementalSnapshot,data:j({source:at.CustomElement},mt)})},blockClass:p,ignoreClass:m,ignoreSelector:d,maskTextClass:g,maskTextSelector:b,maskInputOptions:yn,inlineStylesheet:w,sampling:O,recordDOM:_,recordCanvas:tt,inlineImages:U,inlineVideos:L,userTriggeredOnInput:V,collectFonts:D,doc:wt,maskInputFn:T,maskTextFn:x,keepIframeSrcFn:lt,blockSelector:f,slimDOMOptions:Mr,dataURLOptions:qe,mirror:Te,iframeManager:se,stylesheetManager:ee,shadowDomManager:yt,processedNodeManager:ke,canvasManager:Mi,ignoreCSSAttributes:Ce,privacySetting:Zt,plugins:((Ze=q==null?void 0:q.filter(mt=>mt.observer))==null?void 0:Ze.map(mt=>({observer:mt.observer,options:mt.options,callback:Ka=>It({type:ut.Plugin,data:{plugin:mt.name,payload:Ka}})})))||[]},Z)};se.addLoadListener(wt=>{try{Q.push(ne(wt.contentDocument))}catch(Ze){console.warn(Ze)}});let vt=()=>{ia(),Q.push(ne(document)),xa=!0};return document.readyState==="interactive"||document.readyState==="complete"?vt():(Q.push(_t("DOMContentLoaded",()=>{It({type:ut.DomContentLoaded,data:{}}),v==="DOMContentLoaded"&&vt()})),Q.push(_t("load",()=>{It({type:ut.Load,data:{}}),v==="load"&&vt()},window))),()=>{Q.forEach(wt=>wt()),ke.destroy(),xa=!1,GA()}}catch(Q){console.warn(Q)}}function c9(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");let e=t.split(","),n=e.lastIndexOf("");for(;n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function p9(t,e){let n=e.slice(0,e.length-1);for(let r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function d9(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function f9(t,e,n){let r;if(e.scope===n||e.scope==="all"){r=e.mods.length>0;for(let i in Kt)Object.prototype.hasOwnProperty.call(Kt,i)&&(!Kt[i]&&e.mods.indexOf(+i)>-1||Kt[i]&&e.mods.indexOf(+i)===-1)&&(r=!1);(e.mods.length===0&&!Kt[16]&&!Kt[18]&&!Kt[17]&&!Kt[91]||r||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function m9(t){let e=Pe["*"],n=t.keyCode||t.which||t.charCode;if((n===93||n===224)&&(n=91),Yt.indexOf(n)===-1&&n!==229&&Yt.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(r=>{let i=pv[r];t[r]&&Yt.indexOf(i)===-1?Yt.push(i):!t[r]&&Yt.indexOf(i)>-1?Yt.splice(Yt.indexOf(i),1):r==="metaKey"&&t[r]&&Yt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(Yt=Yt.slice(Yt.indexOf(i))))}),!(n in Kt&&(Kt[n]=!0,!e))){for(let r in Kt)Object.prototype.hasOwnProperty.call(Kt,r)&&(Kt[r]=t[pv[r]]);if(t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(Yt.indexOf(17)===-1&&Yt.push(17),Yt.indexOf(18)===-1&&Yt.push(18),Kt[17]=!0,Kt[18]=!0),n in Pe){for(let r=0;r<Pe[n].length;r++)if((t.type==="keydown"&&Pe[n][r].keydown||t.type==="keyup"&&Pe[n][r].keyup)&&Pe[n][r].key){let i=Pe[n][r];f9(t,i,"all")}}}}function w9(t){let e;try{if(e=mv&&(self.URL||self.webkitURL).createObjectURL(mv),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+Jw,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}var SX,IX,Be,TX,oe,EX,yv,gr,RX,CX,kX,oa,gv,bv,Lu,it,Rr,Ni,Pi,Cr,OX,Wu,LX,wv,Sv,XX,Ir,Mu,A,C,FX,QX,Cv,rW,kv,oW,aW,cW,uW,dW,fW,Dh,mW,yW,gW,bW,vW,eb,mu,Ov,wW,Uu,sa,js,SW,br,nb,IW,TW,EW,yu,RW,CW,gu,Fu,kW,ZW,aa,Qs,Au,Gv,la,Si,Xv,Wv,MW,PW,UW,FW,AW,DW,JW,YW,KW,Mv,rb,BW,jW,Pv,ib,QW,ob,$W,qW,t2,e2,n2,bu,Ju,Jh,Yu,r2,Ku,Na,ca,Yh,i2,sb,ve,pn,_u,o2,ie,Ga,s2,a2,Uv,Gi,l2,$s,Fn,c2,Fv,u2,h2,p2,d2,f2,m2,y2,g2,ab,b2,v2,I2,Hu,E2,lb,R2,zu,C2,k2,ua,An,Z2,x2,V2,ha,Yv,Kv,Bu,j,Qt,kr,K,jt,O2,N2,G2,L2,X2,G,cb,W2,M2,ub,kt,hb,pb,Cs,P2,vu,wu,Pt,pa,db,sM,aM,lM,cM,pM,dM,fM,mM,yM,gM,bM,vM,Qv,wM,SM,Fi,vr,fb,TM,EM,mb,zh,z,n0,WM,MM,PM,Ee,gb,bb,$u,Bh,vb,qu,i0,FM,La,$i,AM,DM,JM,Ii,YM,nh,Xa,KM,rh,Wa,_M,ih,Ma,o0,s0,HM,a0,l0,jh,c0,u0,Qh,Qe,Yn,f0,ba,$h,zM,m0,y0,Ai,qh,BM,jM,QM,$M,qM,Su,tP,wb,Sb,oh,g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,gw,nA,rA,bw,vw,iA,oA,sA,aA,lA,cA,dp,uA,ww,Sw,hA,pA,Zh,Qb,$b,Ys,dA,xu,Vu,ot,wr,qb,Ca,RA,Oh,ut,at,Bt,un,Xr,Sr,Gw,Nh,ev,Gh,Wi,ct,Dn,MA,iv,Za,Xh,Wh,Er,HA,Vi,zA,ov,Pw,Uw,Fw,Aw,qA,lv,Mh,Ph,Uh,It,ia,Mi,xa,Te,cv,uv,e9,n9,r9,i9,o9,s9,hv,Nu,a9,l9,Yt,Pe,Gu,u9,pv,Kt,Dw,h9,dv,fv,ji,y9,g9,b9,Jw,v9,mv,ze,S9,I9,T9,E9,Fh,Qi,du=wp(()=>{"use strict";SX=Object.defineProperty,IX=(t,e,n)=>e in t?SX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Be=(t,e,n)=>IX(t,typeof e!="symbol"?e+"":e,n),TX=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),oe=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),EX(r,...n)},EX=(t,...e)=>TX(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>(Bg(),zg));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),yv=class{constructor(t,e){Be(this,"debug"),Be(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},gr=class{constructor(){Be(this,"_sdk"),Be(this,"_isLoaded",!1),Be(this,"_callBuffer",[]),Be(this,"_capacity",1e5),Be(this,"_droppedEvents",0),Be(this,"_exceededCapacity",!1),Be(this,"_logger",new yv)}p(e,n){if(this.gr)try{return this.Wr[e](...n)}catch(r){oe(`Error executing buffered call to ${e}:`,"error",r)}else{this.Ei({method:e,args:n});return}}Ei(e){this.ar.length<this.Rs?(this.ar.push(e),this.Mr=!1):(this.Mr||(this.Mr=!0,oe("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Cs+=1)}load(e){this.Wr=e,this.gr=!0;for(let{method:n,args:r}of this.ar)try{this.Wr[n](...r)}catch(i){oe(`Error executing buffered call to ${n}:`,"error",i)}this.ar=[]}},RX=Object.defineProperty,CX=Object.defineProperties,kX=Object.getOwnPropertyDescriptors,oa=Object.getOwnPropertySymbols,gv=Object.prototype.hasOwnProperty,bv=Object.prototype.propertyIsEnumerable,Lu=(t,e,n)=>e in t?RX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,it=(t,e)=>{for(var n in e||(e={}))gv.call(e,n)&&Lu(t,n,e[n]);if(oa)for(var n of oa(e))bv.call(e,n)&&Lu(t,n,e[n]);return t},Rr=(t,e)=>CX(t,kX(e)),Ni=(t,e)=>{var n={};for(var r in t)gv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&oa)for(var r of oa(t))e.indexOf(r)<0&&bv.call(t,r)&&(n[r]=t[r]);return n},Pi=(t,e,n)=>Lu(t,typeof e!="symbol"?e+"":e,n),Cr=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});OX=/\r\n|[\n\r]/g;Wu=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=GX(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=Qg(Array.isArray(s)?s:s?[s]:void 0);let p=Qg((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>Xu(a,m)):p==null?void 0:p.map(m=>Xu(m.source,m.start));let f=xX(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
23
23
 
24
- `+pL(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
24
+ `+NX(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
25
25
 
26
- `+Zb(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};fL=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},kb=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,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}}},Vb={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"]},mL=new Set(Object.keys(Vb));(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(tr||(tr={}));(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(ru||(ru={}));(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(A||(A={}));(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(I||(I={}));wL=class{constructor(t){let e=new kb(I.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==I.EOF)do if(t.next)t=t.next;else{let e=IL(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===I.COMMENT);return t}};NL=10,Lb=2;UL=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=ah(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
26
+ `+vv(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};LX=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},wv=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,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}}},Sv={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"]},XX=new Set(Object.keys(Sv));(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Ir||(Ir={}));(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Mu||(Mu={}));(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(A||(A={}));(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(C||(C={}));FX=class{constructor(t){let e=new wv(C.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==C.EOF)do if(t.next)t=t.next;else{let e=DX(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===C.COMMENT);return t}};QX=10,Cv=2;rW=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=Ah(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
27
27
 
28
28
  Ensure that there is only one instance of "graphql" in the node_modules
29
29
  directory. If different versions of "graphql" are the dependencies of other
@@ -34,34 +34,34 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
34
34
  Duplicate "graphql" modules cannot be used at the same time since different
35
35
  versions may have different capabilities and behavior. The data from one
36
36
  version used in the function from another could produce confusing and
37
- spurious results.`)}}return!1},Xb=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Ts(!1,`Body must be a string. Received: ${ah(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Ts(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ts(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};ML=class{constructor(t,e={}){let n=PL(t)?t:new Xb(t);this.l=new wL(n),this.Sn=e,this.Qn=0}parseName(){let t=this.expectToken(I.NAME);return this.node(t,{kind:A.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:A.DOCUMENT,definitions:this.many(I.SOF,this.parseDefinition,I.EOF)})}parseDefinition(){if(this.peek(I.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===I.NAME){switch(e.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 Zt(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(I.BRACE_L))return this.node(t,{kind:A.OPERATION_DEFINITION,operation:tr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(I.NAME)&&(n=this.parseName()),this.node(t,{kind:A.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(I.NAME);switch(t.value){case"query":return tr.QUERY;case"mutation":return tr.MUTATION;case"subscription":return tr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(I.PAREN_L,this.parseVariableDefinition,I.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:A.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(I.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(I.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(I.DOLLAR),this.node(t,{kind:A.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:A.SELECTION_SET,selections:this.many(I.BRACE_L,this.parseSelection,I.BRACE_R)})}parseSelection(){return this.peek(I.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(I.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:A.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(I.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(I.PAREN_L,e,I.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(I.COLON),this.node(e,{kind:A.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(I.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(I.NAME)?this.node(t,{kind:A.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:A.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.Sn.allowLegacyFragmentVariables===!0?this.node(t,{kind:A.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:A.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case I.BRACKET_L:return this.parseList(t);case I.BRACE_L:return this.parseObject(t);case I.INT:return this.advanceLexer(),this.node(e,{kind:A.INT,value:e.value});case I.FLOAT:return this.advanceLexer(),this.node(e,{kind:A.FLOAT,value:e.value});case I.STRING:case I.BLOCK_STRING:return this.parseStringLiteral();case I.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:A.BOOLEAN,value:!0});case"false":return this.node(e,{kind:A.BOOLEAN,value:!1});case"null":return this.node(e,{kind:A.NULL});default:return this.node(e,{kind:A.ENUM,value:e.value})}case I.DOLLAR:if(t)if(this.expectToken(I.DOLLAR),this.l.token.kind===I.NAME){let n=this.l.token.value;throw Zt(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:A.STRING,value:t.value,block:t.kind===I.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:A.LIST,values:this.any(I.BRACKET_L,e,I.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:A.OBJECT,fields:this.any(I.BRACE_L,e,I.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(I.COLON),this.node(e,{kind:A.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(I.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(I.AT),this.node(e,{kind:A.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(I.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(I.BRACKET_R),e=this.node(t,{kind:A.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(I.BANG)?this.node(t,{kind:A.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:A.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(I.STRING)||this.peek(I.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);return this.node(t,{kind:A.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(I.COLON);let n=this.parseNamedType();return this.node(t,{kind:A.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:A.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(I.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseFieldDefinition,I.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(I.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:A.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(I.PAREN_L,this.parseInputValueDef,I.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(I.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(I.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:A.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:A.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(I.EQUALS)?this.delimitedMany(I.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:A.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(I.BRACE_L,this.parseEnumValueDefinition,I.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:A.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Zt(this.l.source,this.l.token.start,`${ts(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseInputValueDef,I.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===I.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(I.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:A.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(I.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(ru,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Sn.noLocation!==!0&&(e.loc=new fL(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Zt(this.l.source,e.start,`Expected ${Ub(t)}, found ${ts(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===I.NAME&&e.value===t)this.advanceLexer();else throw Zt(this.l.source,e.start,`Expected "${t}", found ${ts(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===I.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Zt(this.l.source,e.start,`Unexpected ${ts(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.Sn,e=this.l.advance();if(t!==void 0&&e.kind!==I.EOF&&(++this.Qn,this.Qn>t))throw Zt(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};AL=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;DL=["\\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"],YL=Object.freeze({});HL=80,zL={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>W(t.definitions,`
37
+ spurious results.`)}}return!1},kv=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Hs(!1,`Body must be a string. Received: ${Ah(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Hs(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Hs(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};oW=class{constructor(t,e={}){let n=iW(t)?t:new kv(t);this.l=new FX(n),this.lr=e,this.Pr=0}parseName(){let t=this.expectToken(C.NAME);return this.node(t,{kind:A.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:A.DOCUMENT,definitions:this.many(C.SOF,this.parseDefinition,C.EOF)})}parseDefinition(){if(this.peek(C.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===C.NAME){switch(e.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 Nt(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(C.BRACE_L))return this.node(t,{kind:A.OPERATION_DEFINITION,operation:Ir.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(C.NAME)&&(n=this.parseName()),this.node(t,{kind:A.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(C.NAME);switch(t.value){case"query":return Ir.QUERY;case"mutation":return Ir.MUTATION;case"subscription":return Ir.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(C.PAREN_L,this.parseVariableDefinition,C.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:A.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(C.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(C.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(C.DOLLAR),this.node(t,{kind:A.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:A.SELECTION_SET,selections:this.many(C.BRACE_L,this.parseSelection,C.BRACE_R)})}parseSelection(){return this.peek(C.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(C.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:A.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(C.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(C.PAREN_L,e,C.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(C.COLON),this.node(e,{kind:A.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(C.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(C.NAME)?this.node(t,{kind:A.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:A.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.lr.allowLegacyFragmentVariables===!0?this.node(t,{kind:A.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:A.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case C.BRACKET_L:return this.parseList(t);case C.BRACE_L:return this.parseObject(t);case C.INT:return this.advanceLexer(),this.node(e,{kind:A.INT,value:e.value});case C.FLOAT:return this.advanceLexer(),this.node(e,{kind:A.FLOAT,value:e.value});case C.STRING:case C.BLOCK_STRING:return this.parseStringLiteral();case C.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:A.BOOLEAN,value:!0});case"false":return this.node(e,{kind:A.BOOLEAN,value:!1});case"null":return this.node(e,{kind:A.NULL});default:return this.node(e,{kind:A.ENUM,value:e.value})}case C.DOLLAR:if(t)if(this.expectToken(C.DOLLAR),this.l.token.kind===C.NAME){let n=this.l.token.value;throw Nt(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:A.STRING,value:t.value,block:t.kind===C.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:A.LIST,values:this.any(C.BRACKET_L,e,C.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:A.OBJECT,fields:this.any(C.BRACE_L,e,C.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(C.COLON),this.node(e,{kind:A.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(C.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(C.AT),this.node(e,{kind:A.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(C.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(C.BRACKET_R),e=this.node(t,{kind:A.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(C.BANG)?this.node(t,{kind:A.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:A.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(C.STRING)||this.peek(C.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(C.BRACE_L,this.parseOperationTypeDefinition,C.BRACE_R);return this.node(t,{kind:A.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(C.COLON);let n=this.parseNamedType();return this.node(t,{kind:A.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:A.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(C.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(C.BRACE_L,this.parseFieldDefinition,C.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(C.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:A.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(C.PAREN_L,this.parseInputValueDef,C.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(C.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(C.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:A.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:A.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(C.EQUALS)?this.delimitedMany(C.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:A.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(C.BRACE_L,this.parseEnumValueDefinition,C.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:A.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Nt(this.l.source,this.l.token.start,`${Es(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(C.BRACE_L,this.parseInputValueDef,C.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===C.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(C.BRACE_L,this.parseOperationTypeDefinition,C.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(C.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:A.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(C.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(Mu,e.value))return e;throw this.unexpected(t)}node(t,e){return this.lr.noLocation!==!0&&(e.loc=new LX(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Nt(this.l.source,e.start,`Expected ${xv(t)}, found ${Es(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===C.NAME&&e.value===t)this.advanceLexer();else throw Nt(this.l.source,e.start,`Expected "${t}", found ${Es(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===C.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Nt(this.l.source,e.start,`Unexpected ${Es(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.lr,e=this.l.advance();if(t!==void 0&&e.kind!==C.EOF&&(++this.Pr,this.Pr>t))throw Nt(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};aW=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;cW=["\\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"],uW=Object.freeze({});dW=80,fW={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>P(t.definitions,`
38
38
 
39
- `)},OperationDefinition:{leave(t){let e=Q("(",W(t.variableDefinitions,", "),")"),n=W([t.operation,W([t.name,e]),W(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+Q(" = ",n)+Q(" ",W(r," "))},SelectionSet:{leave:({selections:t})=>le(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=Q("",t,": ")+e,s=o+Q("(",W(n,", "),")");return s.length>HL&&(s=o+Q(`(
40
- `,Es(W(n,`
39
+ `)},OperationDefinition:{leave(t){let e=rt("(",P(t.variableDefinitions,", "),")"),n=P([t.operation,P([t.name,e]),P(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+rt(" = ",n)+rt(" ",P(r," "))},SelectionSet:{leave:({selections:t})=>Ie(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=rt("",t,": ")+e,s=o+rt("(",P(n,", "),")");return s.length>dW&&(s=o+rt(`(
40
+ `,zs(P(n,`
41
41
  `)),`
42
- )`)),W([s,W(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+Q(" ",W(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>W(["...",Q("on ",t),W(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${Q("(",W(n,", "),")")} on ${e} ${Q("",W(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?vL(t):FL(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+W(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+W(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+Q("(",W(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>Q("",t,`
43
- `)+W(["schema",W(e," "),le(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
44
- `)+W(["scalar",e,W(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>Q("",t,`
45
- `)+W(["type",e,Q("implements ",W(n," & ")),W(r," "),le(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>Q("",t,`
46
- `)+e+(lg(n)?Q(`(
47
- `,Es(W(n,`
42
+ )`)),P([s,P(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+rt(" ",P(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>P(["...",rt("on ",t),P(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${rt("(",P(n,", "),")")} on ${e} ${rt("",P(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?UX(t):sW(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+P(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+P(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+rt("(",P(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>rt("",t,`
43
+ `)+P(["schema",P(e," "),Ie(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>rt("",t,`
44
+ `)+P(["scalar",e,P(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>rt("",t,`
45
+ `)+P(["type",e,rt("implements ",P(n," & ")),P(r," "),Ie(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>rt("",t,`
46
+ `)+e+(tb(n)?rt(`(
47
+ `,zs(P(n,`
48
48
  `)),`
49
- )`):Q("(",W(n,", "),")"))+": "+r+Q(" ",W(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>Q("",t,`
50
- `)+W([e+": "+n,Q("= ",r),W(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>Q("",t,`
51
- `)+W(["interface",e,Q("implements ",W(n," & ")),W(r," "),le(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>Q("",t,`
52
- `)+W(["union",e,W(n," "),Q("= ",W(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>Q("",t,`
53
- `)+W(["enum",e,W(n," "),le(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
54
- `)+W([e,W(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>Q("",t,`
55
- `)+W(["input",e,W(n," "),le(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>Q("",t,`
56
- `)+"directive @"+e+(lg(n)?Q(`(
57
- `,Es(W(n,`
49
+ )`):rt("(",P(n,", "),")"))+": "+r+rt(" ",P(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>rt("",t,`
50
+ `)+P([e+": "+n,rt("= ",r),P(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>rt("",t,`
51
+ `)+P(["interface",e,rt("implements ",P(n," & ")),P(r," "),Ie(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>rt("",t,`
52
+ `)+P(["union",e,P(n," "),rt("= ",P(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>rt("",t,`
53
+ `)+P(["enum",e,P(n," "),Ie(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>rt("",t,`
54
+ `)+P([e,P(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>rt("",t,`
55
+ `)+P(["input",e,P(n," "),Ie(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>rt("",t,`
56
+ `)+"directive @"+e+(tb(n)?rt(`(
57
+ `,zs(P(n,`
58
58
  `)),`
59
- )`):Q("(",W(n,", "),")"))+(r?" repeatable":"")+" on "+W(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>W(["extend schema",W(t," "),le(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>W(["extend scalar",t,W(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend type",t,Q("implements ",W(e," & ")),W(n," "),le(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend interface",t,Q("implements ",W(e," & ")),W(n," "),le(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>W(["extend union",t,W(e," "),Q("= ",W(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>W(["extend enum",t,W(e," "),le(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>W(["extend input",t,W(e," "),le(n)]," ")}};lh=JSON,BL=t=>t.toUpperCase(),jL=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},QL=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},$L=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},qL=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},cg=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},Xc=t=>{if(typeof t=="string"){let n;try{let r=Wb(t);n=cg(r)}catch(r){}return{query:t,operationName:n}}let e=cg(t);return{query:Pb(t),operationName:e}},Mb=class Rs extends Error{constructor(e,n){let r=`${Rs.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Rs.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Rs)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},tX=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};ou={exports:{}};(function(t,e){var n=typeof self<"u"?self:tX,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var b={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(b[Symbol.iterator]=function(){return b}),b}function m(y){this.map={},y instanceof m?y.forEach(function(b,Z){this.append(Z,b)},this):Array.isArray(y)?y.forEach(function(b){this.append(b[0],b[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(b){this.append(b,y[b])},this)}m.prototype.append=function(y,b){y=h(y),b=p(b);var Z=this.map[y];this.map[y]=Z?Z+", "+b:b},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,b){this.map[h(y)]=p(b)},m.prototype.forEach=function(y,b){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(b,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(b,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(b){y.push(b)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(b,Z){y.push([Z,b])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function v(y){return new Promise(function(b,Z){y.onload=function(){b(y.result)},y.onerror=function(){Z(y.error)}})}function g(y){var b=new FileReader,Z=v(b);return b.readAsArrayBuffer(y),Z}function w(y){var b=new FileReader,Z=v(b);return b.readAsText(y),Z}function R(y){for(var b=new Uint8Array(y),Z=new Array(b.length),D=0;D<b.length;D++)Z[D]=String.fromCharCode(b[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var b=new Uint8Array(y.byteLength);return b.set(new Uint8Array(y)),b.buffer}function T(){return this.bodyUsed=!1,this.$n=function(y){this._t=y,y?typeof y=="string"?this.Ye=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.te=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.qn=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.Ye=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.D=E(y.buffer),this._t=new Blob([this.D])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.D=E(y):this.Ye=y=Object.prototype.toString.call(y):this.Ye="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.te&&this.te.type?this.headers.set("content-type",this.te.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.te)return Promise.resolve(this.te);if(this.D)return Promise.resolve(new Blob([this.D]));if(this.qn)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.Ye]))},this.arrayBuffer=function(){return this.D?d(this)||Promise.resolve(this.D):this.blob().then(g)}),this.text=function(){var y=d(this);if(y)return y;if(this.te)return w(this.te);if(this.D)return Promise.resolve(R(this.D));if(this.qn)throw new Error("could not read FormData body as text");return Promise.resolve(this.Ye)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var V=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(y){var b=y.toUpperCase();return V.indexOf(b)>-1?b:y}function U(y,b){b=b||{};var Z=b.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,b.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=b.credentials||this.credentials||"same-origin",(b.headers||!this.headers)&&(this.headers=new m(b.headers)),this.method=O(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.signal=b.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.$n(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var b=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),M=D.shift().replace(/\+/g," "),G=D.join("=").replace(/\+/g," ");b.append(decodeURIComponent(M),decodeURIComponent(G))}}),b}function N(y){var b=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var M=D.split(":"),G=M.shift().trim();if(G){var it=M.join(":").trim();b.append(G,it)}}),b}T.call(U.prototype);function P(y,b){b||(b={}),this.type="default",this.status=b.status===void 0?200:b.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new m(b.headers),this.url=b.url||"",this.$n(y)}T.call(P.prototype),P.prototype.clone=function(){return new P(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},P.error=function(){var y=new P(null,{status:0,statusText:""});return y.type="error",y};var st=[301,302,303,307,308];P.redirect=function(y,b){if(st.indexOf(b)===-1)throw new RangeError("Invalid status code");return new P(null,{status:b,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(b,Z){this.message=b,this.name=Z;var D=Error(b);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,b){return new Promise(function(Z,D){var M=new U(y,b);if(M.signal&&M.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var G=new XMLHttpRequest;function it(){G.abort()}G.onload=function(){var ct={status:G.status,statusText:G.statusText,headers:N(G.getAllResponseHeaders()||"")};ct.url="responseURL"in G?G.responseURL:ct.headers.get("X-Request-URL");var Ot="response"in G?G.response:G.responseText;Z(new P(Ot,ct))},G.onerror=function(){D(new TypeError("Network request failed"))},G.ontimeout=function(){D(new TypeError("Network request failed"))},G.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},G.open(M.method,M.url,!0),M.credentials==="include"?G.withCredentials=!0:M.credentials==="omit"&&(G.withCredentials=!1),"responseType"in G&&a.blob&&(G.responseType="blob"),M.headers.forEach(function(ct,Ot){G.setRequestHeader(Ot,ct)}),M.signal&&(M.signal.addEventListener("abort",it),G.onreadystatechange=function(){G.readyState===4&&M.signal.removeEventListener("abort",it)}),G.send(typeof M._t>"u"?null:M._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=P),s.Headers=m,s.Request=U,s.Response=P,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(ou,ou.exports);Ws=ou.exports,Cs=Fb(Ws),eX=lL({__proto__:null,default:Cs},[Ws]),jn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||eX&&Ws.Headers&&t instanceof Ws.Headers?e=jL(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},ug=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),nX=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(ug(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:ug(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},rX=t=>e=>ir(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=$({},e.headers),h="",p;t==="POST"?(p=oX(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=nX({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:lh});let f=$({method:t,headers:u,body:p},c),m=r,d=f;if(l){let v=yield Promise.resolve(l(rr($({},f),{url:r,operationName:s,variables:o}))),{url:g}=v,w=ai(v,["url"]);m=g,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),iX=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>ir(this,null,function*(){let[r,i,o]=n,s=$L(r,i,o),a=this.requestConfig,{headers:c,fetch:l=Cs,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=ai(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Xc(s.query);return Wc({url:m,query:s.query,variables:s.variables,headers:$($({},jn(Uc(c))),jn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(v=>(p&&p(v),v)).catch(v=>{throw p&&p(v),v})})}request(t,...e){return ir(this,null,function*(){let[n,r]=e,i=QL(t,n,r),o=this.requestConfig,{headers:s,fetch:a=Cs,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=ai(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Xc(i.document);return Wc({url:p,query:f,variables:i.variables,headers:$($({},jn(Uc(s))),jn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=qL(t,e),i=this.requestConfig,{headers:o}=i,s=ai(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Xc(l).query),c=r.documents.map(({variables:l})=>l);return Wc({url:this.url,query:a,variables:c,headers:$($({},jn(Uc(o))),jn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:Cs,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},Wc=t=>ir(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=rX(BL((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield sX(c,(n=o.jsonSerializer)!=null?n:lh),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=ai(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return rr($({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new Mb(rr($({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),oX=(t,e,n,r)=>{let i=r!=null?r:lh;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},sX=(t,e)=>ir(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),Uc=t=>typeof t=="function"?t():t,su={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(su,su.exports);aX=su.exports,lX=Fb(aX),Us=function(){return Us=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Us.apply(this,arguments)},Zs=new Map,au=new Map,Ab=!0,Ps=!1;jr={gql:Ft,resetCaches:dX,disableFragmentWarnings:fX,enableExperimentalFragmentVariables:mX,disableExperimentalFragmentVariables:yX};(function(t){t.gql=jr.gql,t.resetCaches=jr.resetCaches,t.disableFragmentWarnings=jr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=jr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=jr.disableExperimentalFragmentVariables})(Ft||(Ft={}));Ft.default=Ft;Db=Ft`
59
+ )`):rt("(",P(n,", "),")"))+(r?" repeatable":"")+" on "+P(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>P(["extend schema",P(t," "),Ie(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>P(["extend scalar",t,P(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>P(["extend type",t,rt("implements ",P(e," & ")),P(n," "),Ie(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>P(["extend interface",t,rt("implements ",P(e," & ")),P(n," "),Ie(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>P(["extend union",t,P(e," "),rt("= ",P(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>P(["extend enum",t,P(e," "),Ie(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>P(["extend input",t,P(e," "),Ie(n)]," ")}};Dh=JSON,mW=t=>t.toUpperCase(),yW=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},gW=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},bW=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},vW=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},eb=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},mu=t=>{if(typeof t=="string"){let n;try{let r=Zv(t);n=eb(r)}catch(r){}return{query:t,operationName:n}}let e=eb(t);return{query:Vv(t),operationName:e}},Ov=class Bs extends Error{constructor(e,n){let r=`${Bs.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Bs.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Bs)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},wW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Uu={exports:{}};(function(t,e){var n=typeof self<"u"?self:wW,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var v={next:function(){var V=y.shift();return{done:V===void 0,value:V}}};return a.iterable&&(v[Symbol.iterator]=function(){return v}),v}function m(y){this.map={},y instanceof m?y.forEach(function(v,V){this.append(V,v)},this):Array.isArray(y)?y.forEach(function(v){this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}m.prototype.append=function(y,v){y=h(y),v=p(v);var V=this.map[y];this.map[y]=V?V+", "+v:v},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,v){this.map[h(y)]=p(v)},m.prototype.forEach=function(y,v){for(var V in this.map)this.map.hasOwnProperty(V)&&y.call(v,this.map[V],V,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(v,V){y.push(V)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(v,V){y.push([V,v])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function g(y){return new Promise(function(v,V){y.onload=function(){v(y.result)},y.onerror=function(){V(y.error)}})}function b(y){var v=new FileReader,V=g(v);return v.readAsArrayBuffer(y),V}function w(y){var v=new FileReader,V=g(v);return v.readAsText(y),V}function E(y){for(var v=new Uint8Array(y),V=new Array(v.length),D=0;D<v.length;D++)V[D]=String.fromCharCode(v[D]);return V.join("")}function I(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function S(){return this.bodyUsed=!1,this.Ur=function(y){this._t=y,y?typeof y=="string"?this.Ye=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.ne=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.Fr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.Ye=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.U=I(y.buffer),this._t=new Blob([this.U])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.U=I(y):this.Ye=y=Object.prototype.toString.call(y):this.Ye="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.ne&&this.ne.type?this.headers.set("content-type",this.ne.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.ne)return Promise.resolve(this.ne);if(this.U)return Promise.resolve(new Blob([this.U]));if(this.Fr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.Ye]))},this.arrayBuffer=function(){return this.U?d(this)||Promise.resolve(this.U):this.blob().then(b)}),this.text=function(){var y=d(this);if(y)return y;if(this.ne)return w(this.ne);if(this.U)return Promise.resolve(E(this.U));if(this.Fr)throw new Error("could not read FormData body as text");return Promise.resolve(this.Ye)},a.formData&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(y){var v=y.toUpperCase();return T.indexOf(v)>-1?v:y}function Z(y,v){v=v||{};var V=v.body;if(y instanceof Z){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,v.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!V&&y._t!=null&&(V=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new m(v.headers)),this.method=x(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");this.Ur(V)}Z.prototype.clone=function(){return new Z(this,{body:this._t})};function k(y){var v=new FormData;return y.trim().split("&").forEach(function(V){if(V){var D=V.split("="),U=D.shift().replace(/\+/g," "),L=D.join("=").replace(/\+/g," ");v.append(decodeURIComponent(U),decodeURIComponent(L))}}),v}function O(y){var v=new m,V=y.replace(/\r?\n[\t ]+/g," ");return V.split(/\r?\n/).forEach(function(D){var U=D.split(":"),L=U.shift().trim();if(L){var q=U.join(":").trim();v.append(L,q)}}),v}S.call(Z.prototype);function X(y,v){v||(v={}),this.type="default",this.status=v.status===void 0?200:v.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in v?v.statusText:"OK",this.headers=new m(v.headers),this.url=v.url||"",this.Ur(y)}S.call(X.prototype),X.prototype.clone=function(){return new X(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},X.error=function(){var y=new X(null,{status:0,statusText:""});return y.type="error",y};var _=[301,302,303,307,308];X.redirect=function(y,v){if(_.indexOf(v)===-1)throw new RangeError("Invalid status code");return new X(null,{status:v,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(v,V){this.message=v,this.name=V;var D=Error(v);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function tt(y,v){return new Promise(function(V,D){var U=new Z(y,v);if(U.signal&&U.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function q(){L.abort()}L.onload=function(){var lt={status:L.status,statusText:L.statusText,headers:O(L.getAllResponseHeaders()||"")};lt.url="responseURL"in L?L.responseURL:lt.headers.get("X-Request-URL");var Zt="response"in L?L.response:L.responseText;V(new X(Zt,lt))},L.onerror=function(){D(new TypeError("Network request failed"))},L.ontimeout=function(){D(new TypeError("Network request failed"))},L.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},L.open(U.method,U.url,!0),U.credentials==="include"?L.withCredentials=!0:U.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&a.blob&&(L.responseType="blob"),U.headers.forEach(function(lt,Zt){L.setRequestHeader(Zt,lt)}),U.signal&&(U.signal.addEventListener("abort",q),L.onreadystatechange=function(){L.readyState===4&&U.signal.removeEventListener("abort",q)}),L.send(typeof U._t>"u"?null:U._t)})}return tt.polyfill=!0,o.fetch||(o.fetch=tt,o.Headers=m,o.Request=Z,o.Response=X),s.Headers=m,s.Request=Z,s.Response=X,s.fetch=tt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(Uu,Uu.exports);sa=Uu.exports,js=Nv(sa),SW=ZX({__proto__:null,default:js},[sa]),br=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||SW&&sa.Headers&&t instanceof sa.Headers?e=yW(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},nb=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),IW=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(nb(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:nb(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},TW=t=>e=>Cr(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=it({},e.headers),h="",p;t==="POST"?(p=RW(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=IW({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:Dh});let f=it({method:t,headers:u,body:p},c),m=r,d=f;if(l){let g=yield Promise.resolve(l(Rr(it({},f),{url:r,operationName:s,variables:o}))),{url:b}=g,w=Ni(g,["url"]);m=b,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),EW=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Cr(this,null,function*(){let[r,i,o]=n,s=bW(r,i,o),a=this.requestConfig,{headers:c,fetch:l=js,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=Ni(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=mu(s.query);return yu({url:m,query:s.query,variables:s.variables,headers:it(it({},br(gu(c))),br(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(g=>(p&&p(g),g)).catch(g=>{throw p&&p(g),g})})}request(t,...e){return Cr(this,null,function*(){let[n,r]=e,i=gW(t,n,r),o=this.requestConfig,{headers:s,fetch:a=js,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=Ni(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=mu(i.document);return yu({url:p,query:f,variables:i.variables,headers:it(it({},br(gu(s))),br(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=vW(t,e),i=this.requestConfig,{headers:o}=i,s=Ni(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>mu(l).query),c=r.documents.map(({variables:l})=>l);return yu({url:this.url,query:a,variables:c,headers:it(it({},br(gu(o))),br(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:js,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},yu=t=>Cr(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=TW(mW((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield CW(c,(n=o.jsonSerializer)!=null?n:Dh),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=Ni(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return Rr(it({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new Ov(Rr(it({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),RW=(t,e,n,r)=>{let i=r!=null?r:Dh;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},CW=(t,e)=>Cr(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),gu=t=>typeof t=="function"?t():t,Fu={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(Fu,Fu.exports);kW=Fu.exports,ZW=Nv(kW),aa=function(){return aa=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},aa.apply(this,arguments)},Qs=new Map,Au=new Map,Gv=!0,la=!1;Si={gql:Ht,resetCaches:GW,disableFragmentWarnings:LW,enableExperimentalFragmentVariables:XW,disableExperimentalFragmentVariables:WW};(function(t){t.gql=Si.gql,t.resetCaches=Si.resetCaches,t.disableFragmentWarnings=Si.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Si.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Si.disableExperimentalFragmentVariables})(Ht||(Ht={}));Ht.default=Ht;Xv=Ht`
60
60
  fragment MatchParts on MatchConfig {
61
61
  regexValue
62
62
  matchValue
63
63
  }
64
- `,Yb=Ft`
64
+ `,Wv=Ht`
65
65
  mutation PushPayload(
66
66
  $session_secure_id: String!
67
67
  $payload_id: ID!
@@ -87,7 +87,7 @@ spurious results.`)}}return!1},Xb=class{constructor(t,e="GraphQL request",n={lin
87
87
  highlight_logs: $highlight_logs
88
88
  )
89
89
  }
90
- `,gX=Ft`
90
+ `,MW=Ht`
91
91
  mutation PushPayloadCompressed(
92
92
  $session_secure_id: String!
93
93
  $payload_id: ID!
@@ -99,7 +99,7 @@ spurious results.`)}}return!1},Xb=class{constructor(t,e="GraphQL request",n={lin
99
99
  data: $data
100
100
  )
101
101
  }
102
- `,bX=Ft`
102
+ `,PW=Ht`
103
103
  mutation identifySession(
104
104
  $session_secure_id: String!
105
105
  $user_identifier: String!
@@ -111,7 +111,7 @@ spurious results.`)}}return!1},Xb=class{constructor(t,e="GraphQL request",n={lin
111
111
  user_object: $user_object
112
112
  )
113
113
  }
114
- `,vX=Ft`
114
+ `,UW=Ht`
115
115
  mutation addSessionProperties(
116
116
  $session_secure_id: String!
117
117
  $properties_object: Any
@@ -121,11 +121,11 @@ spurious results.`)}}return!1},Xb=class{constructor(t,e="GraphQL request",n={lin
121
121
  properties_object: $properties_object
122
122
  )
123
123
  }
124
- `,wX=Ft`
124
+ `,FW=Ht`
125
125
  mutation pushMetrics($metrics: [MetricInput]!) {
126
126
  pushMetrics(metrics: $metrics)
127
127
  }
128
- `,SX=Ft`
128
+ `,AW=Ht`
129
129
  mutation addSessionFeedback(
130
130
  $session_secure_id: String!
131
131
  $user_name: String
@@ -141,7 +141,7 @@ spurious results.`)}}return!1},Xb=class{constructor(t,e="GraphQL request",n={lin
141
141
  timestamp: $timestamp
142
142
  )
143
143
  }
144
- `,IX=Ft`
144
+ `,DW=Ht`
145
145
  mutation initializeSession(
146
146
  $session_secure_id: String!
147
147
  $organization_verbose_id: String!
@@ -226,12 +226,12 @@ spurious results.`)}}return!1},Xb=class{constructor(t,e="GraphQL request",n={lin
226
226
  }
227
227
  }
228
228
  }
229
- ${Db}
230
- `,TX=Ft`
229
+ ${Xv}
230
+ `,JW=Ht`
231
231
  query Ignore($id: ID!) {
232
232
  ignore(id: $id)
233
233
  }
234
- `,EX=Ft`
234
+ `,YW=Ht`
235
235
  query GetSamplingConfig($organization_verbose_id: String!) {
236
236
  sampling(organization_verbose_id: $organization_verbose_id) {
237
237
  spans {
@@ -280,82 +280,82 @@ spurious results.`)}}return!1},Xb=class{constructor(t,e="GraphQL request",n={lin
280
280
  }
281
281
  }
282
282
  }
283
- ${Db}
284
- `,RX=(t,e,n,r)=>t();Kb=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Kb||{});hg=1e3,VX=1e3*2,xX=14400*1e3,_b=900*1e3,pg={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},NX=100,dg="app.highlight.io",OX="app.launchdarkly.com",GX={"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"},LX="/projects/default",XX=new RegExp("pub\\.(?<domain>.+)");WX={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};Pc=lu(WX,{path:"/"}),cu=(t=>(t.CLIENT_ID="highlightClientID",t))(cu||{}),ch="localStorage",uu=!0,UX=class{constructor(){di(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},hu=class{getItem(e){var n;return(n=Pc.get(e))!=null?n:""}setItem(e,n){if(!uu)return;let r=new Date;r.setTime(r.getTime()+_b),Pc.set(e,n,{expires:r})}removeItem(e){uu&&Pc.remove(e)}},la=new UX,Ms=new hu,uh=()=>{try{switch(ch){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return la}},PX=t=>{ch=t},fg=t=>{uu=t},re=t=>{try{return uh().getItem(t)}catch(e){return Ht("storage","debug",`failed to get item ${t}; using global storage`,e),la.getItem(t)}},ze=(t,e)=>{Ms.setItem(t,e);try{return uh().setItem(t,e)}catch(n){return Ht("storage","debug",`failed to set item ${t}; using global storage`,n),la.setItem(t,e)}},pu=t=>{Ms.removeItem(t);try{return uh().removeItem(t)}catch(e){return Ht("storage","debug",`failed to remove item ${t}; using global storage`,e),la.removeItem(t)}},MX=t=>{if(ch==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}let e=window.localStorage.setItem;window.localStorage.setItem=function(){let[n,r]=arguments;t({keyName:n,keyValue:r}),e.apply(this,[n,r])}},_t=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(_t||{}),ca=t=>`${_t.SESSION_DATA}_${t}`,FX=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Hb()},AX=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Hb=()=>{var t;return(t=re(_t.SESSION_ID))!=null?t:""},li=t=>{ze(_t.SESSION_ID,t)},JX=t=>{let e=ca(t);return JSON.parse(re(e)||"{}")},ks=t=>{t||(t=Hb());let e=JX(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<_b)return e;pu(ca(t))},Sn=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;AX(e),ze(ca(e),JSON.stringify(t))},DX=function(){let t=Ms.getItem(_t.SESSION_ID);li(t);let e=ca(t),n=Ms.getItem(e);try{Sn(JSON.parse(n))}catch(r){}},zb=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(zb||{}),YX=10,KX=1e3,_X=500,HX=[zb.BillingQuotaExceeded.toString()],zX=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>HX.includes(n.message)))===void 0},BX=()=>{let t=(e,n,r,i,o=0)=>ir(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Mb&&!zX(s))throw s;if(o<YX)return yield new Promise(a=>setTimeout(a,KX+_X*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},jX="$ld:telemetry:session:init",QX="$ld:telemetry:error",mg="$ld:telemetry:track",$X="$ld:telemetry:metric",qX="document_load";nW=class{constructor(t,e){di(this,"client"),di(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(jX,{sessionID:t})}recordGauge(t,e){var n;e.category!==Kb.WebVital&&e.name!==qX||e.name!=="Jank"&&this.client.track(`${$X}:${e.name.toLowerCase()}`,rr($({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>$($({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(QX,rr($({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${mg}:${n}`:mg,rr($({},e),{sessionID:t}))}},du=class extends Bn{constructor(e,n){super(),di(this,"client"),this.client=new nW(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this.p("init",[e])}recordGauge(e,n){return this.p("recordGauge",[e,n])}identify(e,n,r={},i){return this.p("identify",[e,n,r,i])}error(e,n){return this.p("error",[e,n])}track(e,n){return this.p("track",[e,n])}};iW=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(yg(r,"#"))),n&&(e=e.concat(yg(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},yg=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,oW=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},fu=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},sW=class{constructor(t){di(this,"sessionSecureID");try{t!=null&&t.storageMode&&PX(t==null?void 0:t.storageMode),fg(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?DX():fg(!1);let e=FX(),n=ks(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=fu(),li(this.sessionSecureID),Sn({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){Ht("Error initializing @launchdarkly observability plugin","error",e)}}},aW=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Fs=class extends Bn{getSession(){return this.xn?this.p("getSession",[]):null}start(e){return aW(this,null,function*(){return this.p("start",[e])})}stop(e){return this.p("stop",[e])}getRecordingState(){return this.xn?this.p("getRecordingState",[]):"NotRecording"}snapshot(e){return this.xn?this.p("snapshot",[e]):Promise.resolve(void 0)}register(e,n){return this.p("register",[e,n])}};typeof globalThis<"u"?globalThis.LDRecord?In=globalThis.LDRecord:(In=new Fs,globalThis.LDRecord=In):In=new Fs;lW=Object.defineProperty,cW=Object.defineProperties,uW=Object.getOwnPropertyDescriptors,As=Object.getOwnPropertySymbols,$b=Object.prototype.hasOwnProperty,qb=Object.prototype.propertyIsEnumerable,mu=(t,e,n)=>e in t?lW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z=(t,e)=>{for(var n in e||(e={}))$b.call(e,n)&&mu(t,n,e[n]);if(As)for(var n of As(e))qb.call(e,n)&&mu(t,n,e[n]);return t},Kt=(t,e)=>cW(t,uW(e)),or=(t,e)=>{var n={};for(var r in t)$b.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&As)for(var r of As(t))e.indexOf(r)<0&&qb.call(t,r)&&(n[r]=t[r]);return n},Y=(t,e,n)=>mu(t,typeof e!="symbol"?e+"":e,n),Yt=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),hW={key:"_sid"},pW="rrweb/sequential-id@1",dW=t=>{let e=hW,n=0;return{name:pW,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},fW=Object.defineProperty,mW=(t,e,n)=>e in t?fW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k=(t,e,n)=>mW(t,typeof e!="symbol"?e+"":e,n),yW=Object.defineProperty,gW=(t,e,n)=>e in t?yW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bg=(t,e,n)=>gW(t,typeof e!="symbol"?e+"":e,n),Et=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Et||{}),vg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},wg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ns={},bW=()=>!!globalThis.Zone;Mc={};Fc={};xt={childNodes:vW,parentNode:wW,parentElement:SW,textContent:IW,contains:TW,getRootNode:EW,host:RW,styleSheets:CW,shadowRoot:ZW,querySelector:kW,querySelectorAll:VW,mutationObserver:xW,patch:NW};Js=class{constructor(){bg(this,"idNodeMap",new Map),bg(this,"nodeMetaMap",new WeakMap)}getId(e){var n;if(!e)return-1;let r=(n=this.getMeta(e))==null?void 0:n.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){let r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Sg="__rrweb_original__";FW=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,AW=/^(?:[a-z+]+:)?\/\//i,JW=/^www\..*/i,DW=/^(data:)([^,]*),(.*)/i;_W=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),HW=new RegExp(/[0-9]{9,16}/),zW=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),BW=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),jW=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),QW=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),$W=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),qW=[_W,HW,zW,BW,jW,QW,$W];ov=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},t2=1,e2=new RegExp("[^a-z0-9-_:]"),mi=-2;r2=/^[^ \t\n\r\u000c]+/,i2=/^[, \t\n\r\u000c]+/;Tg=new WeakMap;fh={exports:{}},_=String,uv=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};fh.exports=uv();fh.exports.createColors=uv;y2=fh.exports,g2={},b2=Object.freeze(Object.defineProperty({__proto__:null,default:g2},Symbol.toStringTag,{value:"Module"})),ue=m2(b2),Rg=y2,Cg=ue,bu=class hv extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,hv)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=Rg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Rg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Cg&&(o=f=>Cg(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,v=Math.max(0,this.column-d),g=Math.max(this.column+d,this.endColumn+d),w=u.slice(v,g),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(w)+`
285
- `+R+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
283
+ ${Xv}
284
+ `,KW=(t,e,n,r)=>t();Mv=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Mv||{});rb=1e3,BW=1e3*2,jW=14400*1e3,Pv=900*1e3,ib={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},QW=100,ob="app.highlight.io",$W="app.launchdarkly.com",qW={"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"},t2="/projects/default",e2=new RegExp("pub\\.(?<domain>.+)");n2={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};bu=Du(n2,{path:"/"}),Ju=(t=>(t.CLIENT_ID="highlightClientID",t))(Ju||{}),Jh="localStorage",Yu=!0,r2=class{constructor(){Pi(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},Ku=class{getItem(e){var n;return(n=bu.get(e))!=null?n:""}setItem(e,n){if(!Yu)return;let r=new Date;r.setTime(r.getTime()+Pv),bu.set(e,n,{expires:r})}removeItem(e){Yu&&bu.remove(e)}},Na=new r2,ca=new Ku,Yh=()=>{try{switch(Jh){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Na}},i2=t=>{Jh=t},sb=t=>{Yu=t},ve=t=>{try{return Yh().getItem(t)}catch(e){return oe("storage","debug",`failed to get item ${t}; using global storage`,e),Na.getItem(t)}},pn=(t,e)=>{ca.setItem(t,e);try{return Yh().setItem(t,e)}catch(n){return oe("storage","debug",`failed to set item ${t}; using global storage`,n),Na.setItem(t,e)}},_u=t=>{ca.removeItem(t);try{return Yh().removeItem(t)}catch(e){return oe("storage","debug",`failed to remove item ${t}; using global storage`,e),Na.removeItem(t)}},o2=t=>{if(Jh==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}let e=window.localStorage.setItem;window.localStorage.setItem=function(){let[n,r]=arguments;t({keyName:n,keyValue:r}),e.apply(this,[n,r])}},ie=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ie||{}),Ga=t=>`${ie.SESSION_DATA}_${t}`,s2=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Uv()},a2=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Uv=()=>{var t;return(t=ve(ie.SESSION_ID))!=null?t:""},Gi=t=>{pn(ie.SESSION_ID,t)},l2=t=>{let e=Ga(t);return JSON.parse(ve(e)||"{}")},$s=t=>{t||(t=Uv());let e=l2(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<Pv)return e;_u(Ga(t))},Fn=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;a2(e),pn(Ga(e),JSON.stringify(t))},c2=function(){let t=ca.getItem(ie.SESSION_ID);Gi(t);let e=Ga(t),n=ca.getItem(e);try{Fn(JSON.parse(n))}catch(r){}},Fv=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Fv||{}),u2=10,h2=1e3,p2=500,d2=[Fv.BillingQuotaExceeded.toString()],f2=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>d2.includes(n.message)))===void 0},m2=()=>{let t=(e,n,r,i,o=0)=>Cr(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Ov&&!f2(s))throw s;if(o<u2)return yield new Promise(a=>setTimeout(a,h2+p2*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},y2="$ld:telemetry:session:init",g2="$ld:telemetry:error",ab="$ld:telemetry:track",b2="$ld:telemetry:metric",v2="document_load";I2=class{constructor(t,e){Pi(this,"client"),Pi(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(y2,{sessionID:t})}recordGauge(t,e){var n;e.category!==Mv.WebVital&&e.name!==v2||e.name!=="Jank"&&this.client.track(`${b2}:${e.name.toLowerCase()}`,Rr(it({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>it(it({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(g2,Rr(it({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${ab}:${n}`:ab,Rr(it({},e),{sessionID:t}))}},Hu=class extends gr{constructor(e,n){super(),Pi(this,"client"),this.client=new I2(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this.p("init",[e])}recordGauge(e,n){return this.p("recordGauge",[e,n])}identify(e,n,r={},i){return this.p("identify",[e,n,r,i])}error(e,n){return this.p("error",[e,n])}track(e,n){return this.p("track",[e,n])}};E2=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(lb(r,"#"))),n&&(e=e.concat(lb(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},lb=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,R2=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},zu=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},C2=class{constructor(t){Pi(this,"sessionSecureID");try{t!=null&&t.storageMode&&i2(t==null?void 0:t.storageMode),sb(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?c2():sb(!1);let e=s2(),n=$s(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=zu(),Gi(this.sessionSecureID),Fn({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){oe("Error initializing @launchdarkly observability plugin","error",e)}}},k2=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),ua=class extends gr{getSession(){return this.gr?this.p("getSession",[]):null}start(e){return k2(this,null,function*(){return this.p("start",[e])})}stop(e){return this.p("stop",[e])}getRecordingState(){return this.gr?this.p("getRecordingState",[]):"NotRecording"}snapshot(e){return this.gr?this.p("snapshot",[e]):Promise.resolve(void 0)}register(e,n){return this.p("register",[e,n])}};typeof globalThis<"u"?globalThis.LDRecord?An=globalThis.LDRecord:(An=new ua,globalThis.LDRecord=An):An=new ua;Z2=Object.defineProperty,x2=Object.defineProperties,V2=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,Yv=Object.prototype.hasOwnProperty,Kv=Object.prototype.propertyIsEnumerable,Bu=(t,e,n)=>e in t?Z2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Yv.call(e,n)&&Bu(t,n,e[n]);if(ha)for(var n of ha(e))Kv.call(e,n)&&Bu(t,n,e[n]);return t},Qt=(t,e)=>x2(t,V2(e)),kr=(t,e)=>{var n={};for(var r in t)Yv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ha)for(var r of ha(t))e.indexOf(r)<0&&Kv.call(t,r)&&(n[r]=t[r]);return n},K=(t,e,n)=>Bu(t,typeof e!="symbol"?e+"":e,n),jt=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),O2={key:"_sid"},N2="rrweb/sequential-id@1",G2=t=>{let e=O2,n=0;return{name:N2,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},L2=Object.defineProperty,X2=(t,e,n)=>e in t?L2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G=(t,e,n)=>X2(t,typeof e!="symbol"?e+"":e,n),W2=Object.defineProperty,M2=(t,e,n)=>e in t?W2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ub=(t,e,n)=>M2(t,typeof e!="symbol"?e+"":e,n),kt=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(kt||{}),hb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Cs={},P2=()=>!!globalThis.Zone;vu={};wu={};Pt={childNodes:U2,parentNode:F2,parentElement:A2,textContent:D2,contains:J2,getRootNode:Y2,host:K2,styleSheets:_2,shadowRoot:H2,querySelector:z2,querySelectorAll:B2,mutationObserver:j2,patch:Q2};pa=class{constructor(){ub(this,"idNodeMap",new Map),ub(this,"nodeMetaMap",new WeakMap)}getId(e){var n;if(!e)return-1;let r=(n=this.getMeta(e))==null?void 0:n.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){let r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};db="__rrweb_original__";sM=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,aM=/^(?:[a-z+]+:)?\/\//i,lM=/^www\..*/i,cM=/^(data:)([^,]*),(.*)/i;pM=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),dM=new RegExp(/[0-9]{9,16}/),fM=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),mM=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),yM=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),gM=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),bM=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),vM=[pM,dM,fM,mM,yM,gM,bM];Qv=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},wM=1,SM=new RegExp("[^a-z0-9-_:]"),Fi=-2;TM=/^[^ \t\n\r\u000c]+/,EM=/^[, \t\n\r\u000c]+/;mb=new WeakMap;zh={exports:{}},z=String,n0=function(){return{isColorSupported:!1,reset:z,bold:z,dim:z,italic:z,underline:z,inverse:z,hidden:z,strikethrough:z,black:z,red:z,green:z,yellow:z,blue:z,magenta:z,cyan:z,white:z,gray:z,bgBlack:z,bgRed:z,bgGreen:z,bgYellow:z,bgBlue:z,bgMagenta:z,bgCyan:z,bgWhite:z,blackBright:z,redBright:z,greenBright:z,yellowBright:z,blueBright:z,magentaBright:z,cyanBright:z,whiteBright:z,bgBlackBright:z,bgRedBright:z,bgGreenBright:z,bgYellowBright:z,bgBlueBright:z,bgMagentaBright:z,bgCyanBright:z,bgWhiteBright:z}};zh.exports=n0();zh.exports.createColors=n0;WM=zh.exports,MM={},PM=Object.freeze(Object.defineProperty({__proto__:null,default:MM},Symbol.toStringTag,{value:"Module"})),Ee=XM(PM),gb=WM,bb=Ee,$u=class r0 extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r0)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=gb.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=gb.createColors(!0);i=f=>u(p(f)),r=f=>h(f),bb&&(o=f=>bb(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,g=Math.max(0,this.column-d),b=Math.max(this.column+d,this.endColumn+d),w=u.slice(g,b),E=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(w)+`
285
+ `+E+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
286
286
  `+m+i("^")}return" "+r(f)+o(u)}).join(`
287
287
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
288
288
 
289
289
  `+e+`
290
- `),this.name+": "+this.message+e}},mh=bu;bu.default=bu;Zg={after:`
290
+ `),this.name+": "+this.message+e}},Bh=$u;$u.default=$u;vb={after:`
291
291
  `,beforeClose:`
292
292
  `,beforeComment:`
293
293
  `,beforeDecl:`
294
294
  `,beforeOpen:" ",beforeRule:`
295
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};vu=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
296
- `)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return Zg[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+v2(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=Zg[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
295
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};qu=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
296
+ `)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return vb[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+UM(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=vb[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
297
297
  `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let n;return t.walkComments(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
298
298
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
299
299
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let e;return t.walk(n=>{if(n.type!=="decl"&&(e=n.raws.between,typeof e<"u"))return!1}),e}rawBeforeRule(t){let e;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&typeof n.raws.before<"u")return e=n.raws.before,e.includes(`
300
300
  `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(n=>{if(typeof n.raws.between<"u")return e=n.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length===0&&(e=n.raws.after,typeof e<"u"))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(n=>{let r=n.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof n.raws.before<"u"){let i=n.raws.before.split(`
301
- `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},pv=vu;vu.default=vu;w2=pv;ua=wu;wu.default=wu;Zi={};Zi.isClean=Symbol("isClean");Zi.my=Symbol("my");S2=mh,I2=pv,T2=ua,{isClean:Qr,my:E2}=Zi;Iu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Qr]=!1,this[E2]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Su(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new S2(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[Qr]=!0}markDirty(){if(this[Qr]){this[Qr]=!1;let t=this;for(;t=t.parent;)t[Qr]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice($r(n,this.source.start),$r(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=$r(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
302
- `?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice($r(r,this.source.start),$r(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new I2().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=T2){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ha=Iu;Iu.default=Iu;R2=ha,Tu=class extends R2{constructor(t){super(t),this.type="comment"}},pa=Tu;Tu.default=Tu;C2=ha,Eu=class extends C2{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Kt(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},da=Eu;Eu.default=Eu;dv=pa,fv=da,Z2=ha,{isClean:mv,my:yv}=Zi;Xe=class Sv extends Z2{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=vv(gv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new fv(e)]}else if(e.selector||e.selectors)e=[new gh(e)];else if(e.name)e=[new yh(e)];else if(e.text)e=[new dv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[yv]||Sv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[mv]&&wv(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Xe.registerParse=t=>{gv=t};Xe.registerRule=t=>{gh=t};Xe.registerAtRule=t=>{yh=t};Xe.registerRoot=t=>{bv=t};Rn=Xe;Xe.default=Xe;Xe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,yh.prototype):t.type==="rule"?Object.setPrototypeOf(t,gh.prototype):t.type==="decl"?Object.setPrototypeOf(t,fv.prototype):t.type==="comment"?Object.setPrototypeOf(t,dv.prototype):t.type==="root"&&Object.setPrototypeOf(t,bv.prototype),t[yv]=!0,t.nodes&&t.nodes.forEach(e=>{Xe.rebuild(e)})};Iv=Rn,zs=class extends Iv{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},bh=zs;zs.default=zs;Iv.registerAtRule(zs);k2=Rn,yi=class extends k2{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new Tv(new Ev,this,t).stringify()}};yi.registerLazyResult=t=>{Tv=t};yi.registerProcessor=t=>{Ev=t};vh=yi;yi.default=yi;V2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",x2=(t=21)=>{let e="",n=t|0;for(;n--;)e+=V2[Math.random()*64|0];return e},N2={nanoid:x2},{existsSync:O2,readFileSync:G2}=ue,{dirname:Ac,join:L2}=ue,{SourceMapConsumer:kg,SourceMapGenerator:Vg}=ue;Ru=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ac(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new kg(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return X2(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.$a=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Ac(t),O2(t))return this.mapFile=t,G2(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof kg)return Vg.fromSourceMap(e).toString();if(e instanceof Vg)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=L2(Ac(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Rv=Ru;Ru.default=Ru;({nanoid:W2}=N2),{isAbsolute:Cu,resolve:Zu}=ue,{SourceMapConsumer:U2,SourceMapGenerator:P2}=ue,{fileURLToPath:xg,pathToFileURL:is}=ue,Ng=mh,M2=Rv,Jc=ue,Dc=Symbol("fromOffsetCache"),F2=!!(U2&&P2),Og=!!(Zu&&Cu),Bs=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Og||/^\w+:\/\//.test(e.from)||Cu(e.from)?this.file=e.from:this.file=Zu(e.from)),Og&&F2){let n=new M2(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+W2(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Ng(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Ng(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(is&&(s.input.url=is(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Dc])n=this[Dc];else{let i=this.css.split(`
303
- `);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Dc]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Zu(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Cu(o.source)?a=is(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||is(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(xg)c.file=xg(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=z({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},fa=Bs;Bs.default=Bs;Jc&&Jc.registerInput&&Jc.registerInput(Bs);Cv=Rn,ar=class extends Cv{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new Zv(new kv,this,t).stringify()}};ar.registerLazyResult=t=>{Zv=t};ar.registerProcessor=t=>{kv=t};ki=ar;ar.default=ar;Cv.registerRoot(ar);gi={comma(t){return gi.split(t,[","],!0)},space(t){let e=[" ",`
304
- `," "];return gi.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},Vv=gi;gi.default=gi;xv=Rn,A2=Vv,js=class extends xv{get selectors(){return A2.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},wh=js;js.default=js;xv.registerRule(js);J2=bh,D2=pa,Y2=da,K2=fa,_2=Rv,H2=ki,z2=wh;B2=bi;bi.default=bi;({dirname:Vs,relative:Nv,resolve:Ov,sep:Gv}=ue),{SourceMapConsumer:Lv,SourceMapGenerator:xs}=ue,{pathToFileURL:Gg}=ue,j2=fa,Q2=!!(Lv&&xs),$2=!!(Vs&&Ov&&Nv&&Gv),q2=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
301
+ `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},i0=qu;qu.default=qu;FM=i0;La=th;th.default=th;$i={};$i.isClean=Symbol("isClean");$i.my=Symbol("my");AM=Bh,DM=i0,JM=La,{isClean:Ii,my:YM}=$i;nh=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Ii]=!1,this[YM]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=eh(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new AM(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[Ii]=!0}markDirty(){if(this[Ii]){this[Ii]=!1;let t=this;for(;t=t.parent;)t[Ii]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(Ti(n,this.source.start),Ti(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=Ti(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
302
+ `?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(Ti(r,this.source.start),Ti(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new DM().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=JM){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},Xa=nh;nh.default=nh;KM=Xa,rh=class extends KM{constructor(t){super(t),this.type="comment"}},Wa=rh;rh.default=rh;_M=Xa,ih=class extends _M{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Qt(j({},t),{value:String(t.value)})),super(t),this.type="decl"}},Ma=ih;ih.default=ih;o0=Wa,s0=Ma,HM=Xa,{isClean:a0,my:l0}=$i;Qe=class d0 extends HM{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=h0(c0(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new s0(e)]}else if(e.selector||e.selectors)e=[new Qh(e)];else if(e.name)e=[new jh(e)];else if(e.text)e=[new o0(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[l0]||d0.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[a0]&&p0(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Qe.registerParse=t=>{c0=t};Qe.registerRule=t=>{Qh=t};Qe.registerAtRule=t=>{jh=t};Qe.registerRoot=t=>{u0=t};Yn=Qe;Qe.default=Qe;Qe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,jh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Qh.prototype):t.type==="decl"?Object.setPrototypeOf(t,s0.prototype):t.type==="comment"?Object.setPrototypeOf(t,o0.prototype):t.type==="root"&&Object.setPrototypeOf(t,u0.prototype),t[l0]=!0,t.nodes&&t.nodes.forEach(e=>{Qe.rebuild(e)})};f0=Yn,ba=class extends f0{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},$h=ba;ba.default=ba;f0.registerAtRule(ba);zM=Yn,Ai=class extends zM{constructor(t){super(j({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new m0(new y0,this,t).stringify()}};Ai.registerLazyResult=t=>{m0=t};Ai.registerProcessor=t=>{y0=t};qh=Ai;Ai.default=Ai;BM="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",jM=(t=21)=>{let e="",n=t|0;for(;n--;)e+=BM[Math.random()*64|0];return e},QM={nanoid:jM},{existsSync:$M,readFileSync:qM}=Ee,{dirname:Su,join:tP}=Ee,{SourceMapConsumer:wb,SourceMapGenerator:Sb}=Ee;oh=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Su(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new wb(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return eP(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.qa=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Su(t),$M(t))return this.mapFile=t,qM(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof wb)return Sb.fromSourceMap(e).toString();if(e instanceof Sb)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=tP(Su(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},g0=oh;oh.default=oh;({nanoid:nP}=QM),{isAbsolute:sh,resolve:ah}=Ee,{SourceMapConsumer:rP,SourceMapGenerator:iP}=Ee,{fileURLToPath:Ib,pathToFileURL:Zs}=Ee,Tb=Bh,oP=g0,Iu=Ee,Tu=Symbol("fromOffsetCache"),sP=!!(rP&&iP),Eb=!!(ah&&sh),va=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Eb||/^\w+:\/\//.test(e.from)||sh(e.from)?this.file=e.from:this.file=ah(e.from)),Eb&&sP){let n=new oP(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+nP(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Tb(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Tb(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(Zs&&(s.input.url=Zs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Tu])n=this[Tu];else{let i=this.css.split(`
303
+ `);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Tu]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:ah(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;sh(o.source)?a=Zs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Zs(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ib)c.file=Ib(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=j({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},Pa=va;va.default=va;Iu&&Iu.registerInput&&Iu.registerInput(va);b0=Yn,xr=class extends b0{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new v0(new w0,this,t).stringify()}};xr.registerLazyResult=t=>{v0=t};xr.registerProcessor=t=>{w0=t};qi=xr;xr.default=xr;b0.registerRoot(xr);Di={comma(t){return Di.split(t,[","],!0)},space(t){let e=[" ",`
304
+ `," "];return Di.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},S0=Di;Di.default=Di;I0=Yn,aP=S0,wa=class extends I0{get selectors(){return aP.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},tp=wa;wa.default=wa;I0.registerRule(wa);lP=$h,cP=Wa,uP=Ma,hP=Pa,pP=g0,dP=qi,fP=tp;mP=Ji;Ji.default=Ji;({dirname:qs,relative:T0,resolve:E0,sep:R0}=Ee),{SourceMapConsumer:C0,SourceMapGenerator:ta}=Ee,{pathToFileURL:Rb}=Ee,yP=Pa,gP=!!(C0&&ta),bP=!!(qs&&E0&&T0&&R0),vP=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
305
305
  `;this.css.includes(`\r
306
306
  `)&&(e=`\r
307
- `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||Vs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new Lv(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),$2&&Q2&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=xs.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new xs({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 xs({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
308
- `),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?Vs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Vs(Ov(n,this.mapOpts.annotation)));let r=Nv(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new j2(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Gg){let n=Gg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;Gv==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},Xv=q2,Yc=39,Lg=34,os=92,Xg=47,ss=10,qr=32,as=12,ls=9,cs=13,tU=91,eU=93,nU=40,rU=41,iU=123,oU=125,sU=59,aU=42,lU=58,cU=64,us=/[\t\n\f\r "#'()/;[\\\]{}]/g,hs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,uU=/.[\r\n"'(/\\]/,Wg=/[\da-f]/i,hU=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,v=[],g=[];function w(){return d}function R(O){throw t.error("Unclosed "+O,d)}function E(){return g.length===0&&d>=m}function T(O){if(g.length)return g.pop();if(d>=m)return;let U=O?O.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case ss:case qr:case ls:case cs:case as:{a=d;do a+=1,i=n.charCodeAt(a);while(i===qr||i===ss||i===ls||i===cs||i===as);l=["space",n.slice(d,a)],d=a-1;break}case tU:case eU:case iU:case oU:case lU:case sU:case rU:{let C=String.fromCharCode(i);l=[C,C,d];break}case nU:{if(f=v.length?v.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Yc&&p!==Lg&&p!==qr&&p!==ss&&p!==ls&&p!==as&&p!==cs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===os;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||uU.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Yc:case Lg:{c=i===Yc?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===os;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case cU:{us.lastIndex=d+1,us.test(n),us.lastIndex===0?a=n.length-1:a=us.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case os:{for(a=d,s=!0;n.charCodeAt(a+1)===os;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Xg&&i!==qr&&i!==ss&&i!==ls&&i!==cs&&i!==as&&(a+=1,Wg.test(n.charAt(a)))){for(;Wg.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===qr&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===Xg&&n.charCodeAt(d+1)===aU?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(hs.lastIndex=d+1,hs.test(n),hs.lastIndex===0?a=n.length-1:a=hs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],v.push(l),d=a);break}}return d++,l}function V(O){g.push(O)}return{back:V,endOfFile:E,nextToken:T,position:w}},pU=bh,dU=pa,fU=da,mU=ki,Ug=wh,yU=hU,Pg={empty:!0,space:!0};bU=class{constructor(t){this.input=t,this.root=new mU,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new pU;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new dU;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=yU(this.input)}decl(t,e){let n=new fU;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||gU(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new Ug;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Pg[u]&&!Pg[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new Ug;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},vU=bU,wU=Rn,SU=fa,IU=vU;Sh=Qs;Qs.default=Qs;wU.registerParse(Qs);ku=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[n]}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}},Wv=ku;ku.default=ku;TU=Wv,Vu=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new TU(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},Ih=Vu;Vu.default=Vu;Mg={},Uv=function(t){Mg[t]||(Mg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},EU=Rn,RU=vh,CU=Xv,ZU=Sh,Fg=Ih,kU=ki,VU=ua,{isClean:Se,my:xU}=Zi,NU=Uv,OU={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},GU={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},LU={Once:!0,postcssPlugin:!0,prepare:!0},lr=0;Nu={},cr=class Mv{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=xu(n);else if(n instanceof Mv||n instanceof Fg)i=xu(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=ZU;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[xU]&&EU.rebuild(i)}this.result=new Fg(e,i,r),this.helpers=Kt(z({},Nu),{postcss:Nu,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!GU[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!LU[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Yt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ti(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let n=[Ag(e)];for(;n.length>0;){let r=this.visitTick(n);if(ti(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ti(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=VU;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new CU(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(ti(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];)e[Se]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||NU("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ti(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Se]){a[Se]=!0,e.push(Ag(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===lr){r.nodes&&r.nodes.length&&(r[Se]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Se]=!0;let n=Pv(e);for(let r of n)if(r===lr)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};cr.registerPostcss=t=>{Nu=t};Fv=cr;cr.default=cr;kU.registerLazyResult(cr);RU.registerLazyResult(cr);XU=Xv,WU=Sh,UU=Ih,PU=ua,MU=Uv,Ou=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.tn)return this.tn;let t,e=WU;try{t=e(this.mr,this.un)}catch(n){this.error=n}if(this.error)throw this.error;return this.tn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.ho=t,this.mr=e,this.un=n,this.qa=void 0;let r,i=PU;this.result=new UU(this.ho,r,this.un),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new XU(i,r,this.un,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.un||MU("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(t,e)}toString(){return this.mr}warnings(){return[]}},FU=Ou;Ou.default=Ou;AU=vh,JU=Fv,DU=FU,YU=ki,vi=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new DU(this,t,e):new JU(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},KU=vi;vi.default=vi;YU.registerProcessor(vi);AU.registerProcessor(vi);Av=bh,Jv=pa,_U=Rn,HU=mh,Dv=da,Yv=vh,zU=B2,BU=fa,jU=Fv,QU=Vv,$U=ha,qU=Sh,Th=KU,tP=Ih,Kv=ki,_v=wh,eP=ua,nP=Wv;ht.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
307
+ `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||qs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new C0(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),bP&&gP&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=ta.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new ta({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 ta({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
308
+ `),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?qs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=qs(E0(n,this.mapOpts.annotation)));let r=T0(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new yP(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Rb){let n=Rb(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;R0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},k0=vP,Eu=39,Cb=34,xs=92,kb=47,Vs=10,Ei=32,Os=12,Ns=9,Gs=13,wP=91,SP=93,IP=40,TP=41,EP=123,RP=125,CP=59,kP=42,ZP=58,xP=64,Ls=/[\t\n\f\r "#'()/;[\\\]{}]/g,Xs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,VP=/.[\r\n"'(/\\]/,Zb=/[\da-f]/i,OP=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,g=[],b=[];function w(){return d}function E(x){throw t.error("Unclosed "+x,d)}function I(){return b.length===0&&d>=m}function S(x){if(b.length)return b.pop();if(d>=m)return;let Z=x?x.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case Vs:case Ei:case Ns:case Gs:case Os:{a=d;do a+=1,i=n.charCodeAt(a);while(i===Ei||i===Vs||i===Ns||i===Gs||i===Os);l=["space",n.slice(d,a)],d=a-1;break}case wP:case SP:case EP:case RP:case ZP:case CP:case TP:{let k=String.fromCharCode(i);l=[k,k,d];break}case IP:{if(f=g.length?g.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Eu&&p!==Cb&&p!==Ei&&p!==Vs&&p!==Ns&&p!==Os&&p!==Gs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||Z){a=d;break}else E("bracket");for(h=a;n.charCodeAt(h-1)===xs;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||VP.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Eu:case Cb:{c=i===Eu?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||Z){a=d+1;break}else E("string");for(h=a;n.charCodeAt(h-1)===xs;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case xP:{Ls.lastIndex=d+1,Ls.test(n),Ls.lastIndex===0?a=n.length-1:a=Ls.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case xs:{for(a=d,s=!0;n.charCodeAt(a+1)===xs;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==kb&&i!==Ei&&i!==Vs&&i!==Ns&&i!==Gs&&i!==Os&&(a+=1,Zb.test(n.charAt(a)))){for(;Zb.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===Ei&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===kb&&n.charCodeAt(d+1)===kP?(a=n.indexOf("*/",d+2)+1,a===0&&(r||Z?a=n.length:E("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(Xs.lastIndex=d+1,Xs.test(n),Xs.lastIndex===0?a=n.length-1:a=Xs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],g.push(l),d=a);break}}return d++,l}function T(x){b.push(x)}return{back:T,endOfFile:I,nextToken:S,position:w}},NP=$h,GP=Wa,LP=Ma,XP=qi,xb=tp,WP=OP,Vb={empty:!0,space:!0};PP=class{constructor(t){this.input=t,this.root=new XP,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new NP;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new GP;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=WP(this.input)}decl(t,e){let n=new LP;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||MP(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new xb;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Vb[u]&&!Vb[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new xb;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},UP=PP,FP=Yn,AP=Pa,DP=UP;ep=Sa;Sa.default=Sa;FP.registerParse(Sa);lh=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[n]}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}},Z0=lh;lh.default=lh;JP=Z0,ch=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new JP(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},np=ch;ch.default=ch;Ob={},x0=function(t){Ob[t]||(Ob[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},YP=Yn,KP=qh,_P=k0,HP=ep,Nb=np,zP=qi,BP=La,{isClean:We,my:jP}=$i,QP=x0,$P={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},qP={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},tU={Once:!0,postcssPlugin:!0,prepare:!0},Vr=0;hh={},Or=class O0{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=uh(n);else if(n instanceof O0||n instanceof Nb)i=uh(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=HP;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[jP]&&YP.rebuild(i)}this.result=new Nb(e,i,r),this.helpers=Qt(j({},hh),{postcss:hh,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?j(j({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!qP[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!tU[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return jt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(Ri(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[We];){e[We]=!0;let n=[Gb(e)];for(;n.length>0;){let r=this.visitTick(n);if(Ri(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ri(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=BP;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new _P(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(Ri(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[We];)e[We]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||QP("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Ri(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[We]){a[We]=!0,e.push(Gb(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===Vr){r.nodes&&r.nodes.length&&(r[We]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[We]=!0;let n=V0(e);for(let r of n)if(r===Vr)e.nodes&&e.each(i=>{i[We]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Or.registerPostcss=t=>{hh=t};N0=Or;Or.default=Or;zP.registerLazyResult(Or);KP.registerLazyResult(Or);eU=k0,nU=ep,rU=np,iU=La,oU=x0,ph=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.Zn)return this.Zn;let t,e=nU;try{t=e(this.ni,this.Hn)}catch(n){this.error=n}if(this.error)throw this.error;return this.Zn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.ho=t,this.ni=e,this.Hn=n,this.tl=void 0;let r,i=iU;this.result=new rU(this.ho,r,this.Hn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new eU(i,r,this.Hn,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.Hn||oU("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(t,e)}toString(){return this.ni}warnings(){return[]}},sU=ph;ph.default=ph;aU=qh,lU=N0,cU=sU,uU=qi,Yi=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new cU(this,t,e):new lU(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},hU=Yi;Yi.default=Yi;uU.registerProcessor(Yi);aU.registerProcessor(Yi);G0=$h,L0=Wa,pU=Yn,dU=Bh,X0=Ma,W0=qh,fU=mP,mU=Pa,yU=N0,gU=S0,bU=Xa,vU=ep,rp=hU,wU=np,M0=qi,P0=tp,SU=La,IU=Z0;dt.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
309
309
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
310
- https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Th().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return ht([r(a)]).process(o,s)},r};ht.stringify=eP;ht.parse=qU;ht.fromJSON=zU;ht.list=QU;ht.comment=t=>new Jv(t);ht.atRule=t=>new Av(t);ht.decl=t=>new Dv(t);ht.rule=t=>new _v(t);ht.root=t=>new Kv(t);ht.document=t=>new Yv(t);ht.CssSyntaxError=HU;ht.Declaration=Dv;ht.Container=_U;ht.Processor=Th;ht.Document=Yv;ht.Comment=Jv;ht.Warning=nP;ht.AtRule=Av;ht.Result=tP;ht.Input=BU;ht.Rule=_v;ht.Root=Kv;ht.Node=$U;jU.registerPostcss(ht);ht.default=ht;rP=Object.defineProperty,iP=(t,e,n)=>e in t?rP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ne=(t,e,n)=>iP(t,typeof e!="symbol"?e+"":e,n);Eh={exports:{}},H=String,Hv=function(){return{isColorSupported:!1,reset:H,bold:H,dim:H,italic:H,underline:H,inverse:H,hidden:H,strikethrough:H,black:H,red:H,green:H,yellow:H,blue:H,magenta:H,cyan:H,white:H,gray:H,bgBlack:H,bgRed:H,bgGreen:H,bgYellow:H,bgBlue:H,bgMagenta:H,bgCyan:H,bgWhite:H,blackBright:H,redBright:H,greenBright:H,yellowBright:H,blueBright:H,magentaBright:H,cyanBright:H,whiteBright:H,bgBlackBright:H,bgRedBright:H,bgGreenBright:H,bgYellowBright:H,bgBlueBright:H,bgMagentaBright:H,bgCyanBright:H,bgWhiteBright:H}};Eh.exports=Hv();Eh.exports.createColors=Hv;sP=Eh.exports,aP={},lP=Object.freeze(Object.defineProperty({__proto__:null,default:aP},Symbol.toStringTag,{value:"Module"})),he=oP(lP),Jg=sP,Dg=he,Gu=class zv extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,zv)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=Jg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Jg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Dg&&(o=f=>Dg(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,v=Math.max(0,this.column-d),g=Math.max(this.column+d,this.endColumn+d),w=u.slice(v,g),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(w)+`
311
- `+R+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
310
+ https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new rp().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return dt([r(a)]).process(o,s)},r};dt.stringify=SU;dt.parse=vU;dt.fromJSON=fU;dt.list=gU;dt.comment=t=>new L0(t);dt.atRule=t=>new G0(t);dt.decl=t=>new X0(t);dt.rule=t=>new P0(t);dt.root=t=>new M0(t);dt.document=t=>new W0(t);dt.CssSyntaxError=dU;dt.Declaration=X0;dt.Container=pU;dt.Processor=rp;dt.Document=W0;dt.Comment=L0;dt.Warning=IU;dt.AtRule=G0;dt.Result=wU;dt.Input=mU;dt.Rule=P0;dt.Root=M0;dt.Node=bU;yU.registerPostcss(dt);dt.default=dt;TU=Object.defineProperty,EU=(t,e,n)=>e in t?TU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,be=(t,e,n)=>EU(t,typeof e!="symbol"?e+"":e,n);ip={exports:{}},B=String,U0=function(){return{isColorSupported:!1,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B,blackBright:B,redBright:B,greenBright:B,yellowBright:B,blueBright:B,magentaBright:B,cyanBright:B,whiteBright:B,bgBlackBright:B,bgRedBright:B,bgGreenBright:B,bgYellowBright:B,bgBlueBright:B,bgMagentaBright:B,bgCyanBright:B,bgWhiteBright:B}};ip.exports=U0();ip.exports.createColors=U0;CU=ip.exports,kU={},ZU=Object.freeze(Object.defineProperty({__proto__:null,default:kU},Symbol.toStringTag,{value:"Module"})),Re=RU(ZU),Lb=CU,Xb=Re,dh=class F0 extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,F0)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=Lb.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Lb.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Xb&&(o=f=>Xb(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,g=Math.max(0,this.column-d),b=Math.max(this.column+d,this.endColumn+d),w=u.slice(g,b),E=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(w)+`
311
+ `+E+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
312
312
  `+m+i("^")}return" "+r(f)+o(u)}).join(`
313
313
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
314
314
 
315
315
  `+e+`
316
- `),this.name+": "+this.message+e}},Rh=Gu;Gu.default=Gu;Yg={after:`
316
+ `),this.name+": "+this.message+e}},op=dh;dh.default=dh;Wb={after:`
317
317
  `,beforeClose:`
318
318
  `,beforeComment:`
319
319
  `,beforeDecl:`
320
320
  `,beforeOpen:" ",beforeRule:`
321
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};Lu=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
322
- `)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return Yg[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+cP(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=Yg[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
321
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};fh=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
322
+ `)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return Wb[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+xU(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=Wb[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
323
323
  `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let n;return t.walkComments(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
324
324
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
325
325
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let e;return t.walk(n=>{if(n.type!=="decl"&&(e=n.raws.between,typeof e<"u"))return!1}),e}rawBeforeRule(t){let e;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&typeof n.raws.before<"u")return e=n.raws.before,e.includes(`
326
326
  `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(n=>{if(typeof n.raws.between<"u")return e=n.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length===0&&(e=n.raws.after,typeof e<"u"))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(n=>{let r=n.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof n.raws.before<"u"){let i=n.raws.before.split(`
327
- `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},Bv=Lu;Lu.default=Lu;uP=Bv;ma=Xu;Xu.default=Xu;Vi={};Vi.isClean=Symbol("isClean");Vi.my=Symbol("my");hP=Rh,pP=Bv,dP=ma,{isClean:ei,my:fP}=Vi;Uu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[ei]=!1,this[fP]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Wu(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new hP(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[ei]=!0}markDirty(){if(this[ei]){this[ei]=!1;let t=this;for(;t=t.parent;)t[ei]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(ni(n,this.source.start),ni(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=ni(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
328
- `?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ni(r,this.source.start),ni(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new pP().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=dP){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ya=Uu;Uu.default=Uu;mP=ya,Pu=class extends mP{constructor(t){super(t),this.type="comment"}},ga=Pu;Pu.default=Pu;yP=ya,Mu=class extends yP{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Kt(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},ba=Mu;Mu.default=Mu;jv=ga,Qv=ba,gP=ya,{isClean:$v,my:qv}=Vi;We=class i0 extends gP{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=n0(t0(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Qv(e)]}else if(e.selector||e.selectors)e=[new Zh(e)];else if(e.name)e=[new Ch(e)];else if(e.text)e=[new jv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[qv]||i0.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[$v]&&r0(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};We.registerParse=t=>{t0=t};We.registerRule=t=>{Zh=t};We.registerAtRule=t=>{Ch=t};We.registerRoot=t=>{e0=t};Cn=We;We.default=We;We.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Ch.prototype):t.type==="rule"?Object.setPrototypeOf(t,Zh.prototype):t.type==="decl"?Object.setPrototypeOf(t,Qv.prototype):t.type==="comment"?Object.setPrototypeOf(t,jv.prototype):t.type==="root"&&Object.setPrototypeOf(t,e0.prototype),t[qv]=!0,t.nodes&&t.nodes.forEach(e=>{We.rebuild(e)})};o0=Cn,$s=class extends o0{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},kh=$s;$s.default=$s;o0.registerAtRule($s);bP=Cn,wi=class extends bP{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new s0(new a0,this,t).stringify()}};wi.registerLazyResult=t=>{s0=t};wi.registerProcessor=t=>{a0=t};Vh=wi;wi.default=wi;vP="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",wP=(t=21)=>{let e="",n=t|0;for(;n--;)e+=vP[Math.random()*64|0];return e},SP={nanoid:wP},{existsSync:IP,readFileSync:TP}=he,{dirname:Kc,join:EP}=he,{SourceMapConsumer:Kg,SourceMapGenerator:_g}=he;Fu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Kc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Kg(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return RP(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.$a=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Kc(t),IP(t))return this.mapFile=t,TP(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Kg)return _g.fromSourceMap(e).toString();if(e instanceof _g)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=EP(Kc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},l0=Fu;Fu.default=Fu;({nanoid:CP}=SP),{isAbsolute:Au,resolve:Ju}=he,{SourceMapConsumer:ZP,SourceMapGenerator:kP}=he,{fileURLToPath:Hg,pathToFileURL:ps}=he,zg=Rh,VP=l0,_c=he,Hc=Symbol("fromOffsetCache"),xP=!!(ZP&&kP),Bg=!!(Ju&&Au),qs=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Bg||/^\w+:\/\//.test(e.from)||Au(e.from)?this.file=e.from:this.file=Ju(e.from)),Bg&&xP){let n=new VP(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+CP(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new zg(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new zg(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(ps&&(s.input.url=ps(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Hc])n=this[Hc];else{let i=this.css.split(`
329
- `);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Hc]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ju(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Au(o.source)?a=ps(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ps(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Hg)c.file=Hg(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=z({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},va=qs;qs.default=qs;_c&&_c.registerInput&&_c.registerInput(qs);c0=Cn,ur=class extends c0{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new u0(new h0,this,t).stringify()}};ur.registerLazyResult=t=>{u0=t};ur.registerProcessor=t=>{h0=t};xi=ur;ur.default=ur;c0.registerRoot(ur);Si={comma(t){return Si.split(t,[","],!0)},space(t){let e=[" ",`
330
- `," "];return Si.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},p0=Si;Si.default=Si;d0=Cn,NP=p0,ta=class extends d0{get selectors(){return NP.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},xh=ta;ta.default=ta;d0.registerRule(ta);OP=kh,GP=ga,LP=ba,XP=va,WP=l0,UP=xi,PP=xh;MP=Ii;Ii.default=Ii;({dirname:Ns,relative:f0,resolve:m0,sep:y0}=he),{SourceMapConsumer:g0,SourceMapGenerator:Os}=he,{pathToFileURL:jg}=he,FP=va,AP=!!(g0&&Os),JP=!!(Ns&&m0&&f0&&y0),DP=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
327
+ `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},A0=fh;fh.default=fh;VU=A0;Ua=mh;mh.default=mh;to={};to.isClean=Symbol("isClean");to.my=Symbol("my");OU=op,NU=A0,GU=Ua,{isClean:Ci,my:LU}=to;gh=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Ci]=!1,this[LU]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=yh(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new OU(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[Ci]=!0}markDirty(){if(this[Ci]){this[Ci]=!1;let t=this;for(;t=t.parent;)t[Ci]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(ki(n,this.source.start),ki(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=ki(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
328
+ `?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ki(r,this.source.start),ki(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new NU().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=GU){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},Fa=gh;gh.default=gh;XU=Fa,bh=class extends XU{constructor(t){super(t),this.type="comment"}},Aa=bh;bh.default=bh;WU=Fa,vh=class extends WU{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Qt(j({},t),{value:String(t.value)})),super(t),this.type="decl"}},Da=vh;vh.default=vh;D0=Aa,J0=Da,MU=Fa,{isClean:Y0,my:K0}=to;$e=class j0 extends MU{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=z0(_0(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new J0(e)]}else if(e.selector||e.selectors)e=[new ap(e)];else if(e.name)e=[new sp(e)];else if(e.text)e=[new D0(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[K0]||j0.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Y0]&&B0(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};$e.registerParse=t=>{_0=t};$e.registerRule=t=>{ap=t};$e.registerAtRule=t=>{sp=t};$e.registerRoot=t=>{H0=t};Kn=$e;$e.default=$e;$e.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,sp.prototype):t.type==="rule"?Object.setPrototypeOf(t,ap.prototype):t.type==="decl"?Object.setPrototypeOf(t,J0.prototype):t.type==="comment"?Object.setPrototypeOf(t,D0.prototype):t.type==="root"&&Object.setPrototypeOf(t,H0.prototype),t[K0]=!0,t.nodes&&t.nodes.forEach(e=>{$e.rebuild(e)})};Q0=Kn,Ia=class extends Q0{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},lp=Ia;Ia.default=Ia;Q0.registerAtRule(Ia);PU=Kn,Ki=class extends PU{constructor(t){super(j({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new $0(new q0,this,t).stringify()}};Ki.registerLazyResult=t=>{$0=t};Ki.registerProcessor=t=>{q0=t};cp=Ki;Ki.default=Ki;UU="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",FU=(t=21)=>{let e="",n=t|0;for(;n--;)e+=UU[Math.random()*64|0];return e},AU={nanoid:FU},{existsSync:DU,readFileSync:JU}=Re,{dirname:Ru,join:YU}=Re,{SourceMapConsumer:Mb,SourceMapGenerator:Pb}=Re;wh=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ru(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Mb(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return KU(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.qa=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Ru(t),DU(t))return this.mapFile=t,JU(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Mb)return Pb.fromSourceMap(e).toString();if(e instanceof Pb)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=YU(Ru(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},tw=wh;wh.default=wh;({nanoid:_U}=AU),{isAbsolute:Sh,resolve:Ih}=Re,{SourceMapConsumer:HU,SourceMapGenerator:zU}=Re,{fileURLToPath:Ub,pathToFileURL:Ws}=Re,Fb=op,BU=tw,Cu=Re,ku=Symbol("fromOffsetCache"),jU=!!(HU&&zU),Ab=!!(Ih&&Sh),Ta=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Ab||/^\w+:\/\//.test(e.from)||Sh(e.from)?this.file=e.from:this.file=Ih(e.from)),Ab&&jU){let n=new BU(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+_U(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Fb(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Fb(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(Ws&&(s.input.url=Ws(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[ku])n=this[ku];else{let i=this.css.split(`
329
+ `);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[ku]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ih(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Sh(o.source)?a=Ws(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ws(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ub)c.file=Ub(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=j({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},Ja=Ta;Ta.default=Ta;Cu&&Cu.registerInput&&Cu.registerInput(Ta);ew=Kn,Nr=class extends ew{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new nw(new rw,this,t).stringify()}};Nr.registerLazyResult=t=>{nw=t};Nr.registerProcessor=t=>{rw=t};eo=Nr;Nr.default=Nr;ew.registerRoot(Nr);_i={comma(t){return _i.split(t,[","],!0)},space(t){let e=[" ",`
330
+ `," "];return _i.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},iw=_i;_i.default=_i;ow=Kn,QU=iw,Ea=class extends ow{get selectors(){return QU.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},up=Ea;Ea.default=Ea;ow.registerRule(Ea);$U=lp,qU=Aa,tF=Da,eF=Ja,nF=tw,rF=eo,iF=up;oF=Hi;Hi.default=Hi;({dirname:ea,relative:sw,resolve:aw,sep:lw}=Re),{SourceMapConsumer:cw,SourceMapGenerator:na}=Re,{pathToFileURL:Db}=Re,sF=Ja,aF=!!(cw&&na),lF=!!(ea&&aw&&sw&&lw),cF=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
331
331
  `;this.css.includes(`\r
332
332
  `)&&(e=`\r
333
- `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||Ns(t.file),r;this.mapOpts.sourcesContent===!1?(r=new g0(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),JP&&AP&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Os.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Os({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 Os({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
334
- `),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?Ns(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Ns(m0(n,this.mapOpts.annotation)));let r=f0(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new FP(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(jg){let n=jg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;y0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},b0=DP,zc=39,Qg=34,ds=92,$g=47,fs=10,ri=32,ms=12,ys=9,gs=13,YP=91,KP=93,_P=40,HP=41,zP=123,BP=125,jP=59,QP=42,$P=58,qP=64,bs=/[\t\n\f\r "#'()/;[\\\]{}]/g,vs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,tM=/.[\r\n"'(/\\]/,qg=/[\da-f]/i,eM=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,v=[],g=[];function w(){return d}function R(O){throw t.error("Unclosed "+O,d)}function E(){return g.length===0&&d>=m}function T(O){if(g.length)return g.pop();if(d>=m)return;let U=O?O.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case fs:case ri:case ys:case gs:case ms:{a=d;do a+=1,i=n.charCodeAt(a);while(i===ri||i===fs||i===ys||i===gs||i===ms);l=["space",n.slice(d,a)],d=a-1;break}case YP:case KP:case zP:case BP:case $P:case jP:case HP:{let C=String.fromCharCode(i);l=[C,C,d];break}case _P:{if(f=v.length?v.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==zc&&p!==Qg&&p!==ri&&p!==fs&&p!==ys&&p!==ms&&p!==gs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===ds;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||tM.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case zc:case Qg:{c=i===zc?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===ds;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case qP:{bs.lastIndex=d+1,bs.test(n),bs.lastIndex===0?a=n.length-1:a=bs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case ds:{for(a=d,s=!0;n.charCodeAt(a+1)===ds;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==$g&&i!==ri&&i!==fs&&i!==ys&&i!==gs&&i!==ms&&(a+=1,qg.test(n.charAt(a)))){for(;qg.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===ri&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===$g&&n.charCodeAt(d+1)===QP?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(vs.lastIndex=d+1,vs.test(n),vs.lastIndex===0?a=n.length-1:a=vs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],v.push(l),d=a);break}}return d++,l}function V(O){g.push(O)}return{back:V,endOfFile:E,nextToken:T,position:w}},nM=kh,rM=ga,iM=ba,oM=xi,tb=xh,sM=eM,eb={empty:!0,space:!0};lM=class{constructor(t){this.input=t,this.root=new oM,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new nM;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new rM;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=sM(this.input)}decl(t,e){let n=new iM;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||aM(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new tb;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!eb[u]&&!eb[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new tb;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},cM=lM,uM=Cn,hM=va,pM=cM;Nh=ea;ea.default=ea;uM.registerParse(ea);Du=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[n]}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}},v0=Du;Du.default=Du;dM=v0,Yu=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new dM(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},Oh=Yu;Yu.default=Yu;nb={},w0=function(t){nb[t]||(nb[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},fM=Cn,mM=Vh,yM=b0,gM=Nh,rb=Oh,bM=xi,vM=ma,{isClean:Ie,my:wM}=Vi,SM=w0,IM={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},TM={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},EM={Once:!0,postcssPlugin:!0,prepare:!0},hr=0;_u={},pr=class I0{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Ku(n);else if(n instanceof I0||n instanceof rb)i=Ku(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=gM;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[wM]&&fM.rebuild(i)}this.result=new rb(e,i,r),this.helpers=Kt(z({},_u),{postcss:_u,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!TM[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!EM[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Yt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ii(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ie];){e[Ie]=!0;let n=[ib(e)];for(;n.length>0;){let r=this.visitTick(n);if(ii(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ii(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=vM;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new yM(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(ii(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ie];)e[Ie]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||SM("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ii(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Ie]){a[Ie]=!0,e.push(ib(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===hr){r.nodes&&r.nodes.length&&(r[Ie]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Ie]=!0;let n=S0(e);for(let r of n)if(r===hr)e.nodes&&e.each(i=>{i[Ie]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};pr.registerPostcss=t=>{_u=t};T0=pr;pr.default=pr;bM.registerLazyResult(pr);mM.registerLazyResult(pr);RM=b0,CM=Nh,ZM=Oh,kM=ma,VM=w0,Hu=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.tn)return this.tn;let t,e=CM;try{t=e(this.mr,this.un)}catch(n){this.error=n}if(this.error)throw this.error;return this.tn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.ho=t,this.mr=e,this.un=n,this.qa=void 0;let r,i=kM;this.result=new ZM(this.ho,r,this.un),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new RM(i,r,this.un,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.un||VM("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(t,e)}toString(){return this.mr}warnings(){return[]}},xM=Hu;Hu.default=Hu;NM=Vh,OM=T0,GM=xM,LM=xi,Ti=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new GM(this,t,e):new OM(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},XM=Ti;Ti.default=Ti;LM.registerProcessor(Ti);NM.registerProcessor(Ti);E0=kh,R0=ga,WM=Cn,UM=Rh,C0=ba,Z0=Vh,PM=MP,MM=va,FM=T0,AM=p0,JM=ya,DM=Nh,Gh=XM,YM=Oh,k0=xi,V0=xh,KM=ma,_M=v0;pt.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
333
+ `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||ea(t.file),r;this.mapOpts.sourcesContent===!1?(r=new cw(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),lF&&aF&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=na.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new na({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 na({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
334
+ `),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?ea(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ea(aw(n,this.mapOpts.annotation)));let r=sw(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new sF(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Db){let n=Db(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;lw==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},uw=cF,Zu=39,Jb=34,Ms=92,Yb=47,Ps=10,Zi=32,Us=12,Fs=9,As=13,uF=91,hF=93,pF=40,dF=41,fF=123,mF=125,yF=59,gF=42,bF=58,vF=64,Ds=/[\t\n\f\r "#'()/;[\\\]{}]/g,Js=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wF=/.[\r\n"'(/\\]/,Kb=/[\da-f]/i,SF=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,g=[],b=[];function w(){return d}function E(x){throw t.error("Unclosed "+x,d)}function I(){return b.length===0&&d>=m}function S(x){if(b.length)return b.pop();if(d>=m)return;let Z=x?x.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case Ps:case Zi:case Fs:case As:case Us:{a=d;do a+=1,i=n.charCodeAt(a);while(i===Zi||i===Ps||i===Fs||i===As||i===Us);l=["space",n.slice(d,a)],d=a-1;break}case uF:case hF:case fF:case mF:case bF:case yF:case dF:{let k=String.fromCharCode(i);l=[k,k,d];break}case pF:{if(f=g.length?g.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Zu&&p!==Jb&&p!==Zi&&p!==Ps&&p!==Fs&&p!==Us&&p!==As){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||Z){a=d;break}else E("bracket");for(h=a;n.charCodeAt(h-1)===Ms;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||wF.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Zu:case Jb:{c=i===Zu?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||Z){a=d+1;break}else E("string");for(h=a;n.charCodeAt(h-1)===Ms;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case vF:{Ds.lastIndex=d+1,Ds.test(n),Ds.lastIndex===0?a=n.length-1:a=Ds.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case Ms:{for(a=d,s=!0;n.charCodeAt(a+1)===Ms;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Yb&&i!==Zi&&i!==Ps&&i!==Fs&&i!==As&&i!==Us&&(a+=1,Kb.test(n.charAt(a)))){for(;Kb.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===Zi&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===Yb&&n.charCodeAt(d+1)===gF?(a=n.indexOf("*/",d+2)+1,a===0&&(r||Z?a=n.length:E("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(Js.lastIndex=d+1,Js.test(n),Js.lastIndex===0?a=n.length-1:a=Js.lastIndex-2,l=["word",n.slice(d,a+1),d,a],g.push(l),d=a);break}}return d++,l}function T(x){b.push(x)}return{back:T,endOfFile:I,nextToken:S,position:w}},IF=lp,TF=Aa,EF=Da,RF=eo,_b=up,CF=SF,Hb={empty:!0,space:!0};ZF=class{constructor(t){this.input=t,this.root=new RF,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new IF;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new TF;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=CF(this.input)}decl(t,e){let n=new EF;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||kF(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new _b;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Hb[u]&&!Hb[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new _b;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},xF=ZF,VF=Kn,OF=Ja,NF=xF;hp=Ra;Ra.default=Ra;VF.registerParse(Ra);Th=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[n]}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}},hw=Th;Th.default=Th;GF=hw,Eh=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new GF(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},pp=Eh;Eh.default=Eh;zb={},pw=function(t){zb[t]||(zb[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},LF=Kn,XF=cp,WF=uw,MF=hp,Bb=pp,PF=eo,UF=Ua,{isClean:Me,my:FF}=to,AF=pw,DF={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},JF={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},YF={Once:!0,postcssPlugin:!0,prepare:!0},Gr=0;Ch={},Lr=class fw{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Rh(n);else if(n instanceof fw||n instanceof Bb)i=Rh(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=MF;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[FF]&&LF.rebuild(i)}this.result=new Bb(e,i,r),this.helpers=Qt(j({},Ch),{postcss:Ch,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?j(j({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!JF[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!YF[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return jt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(xi(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Me];){e[Me]=!0;let n=[jb(e)];for(;n.length>0;){let r=this.visitTick(n);if(xi(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return xi(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=UF;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new WF(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(xi(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Me];)e[Me]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||AF("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(xi(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Me]){a[Me]=!0,e.push(jb(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===Gr){r.nodes&&r.nodes.length&&(r[Me]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Me]=!0;let n=dw(e);for(let r of n)if(r===Gr)e.nodes&&e.each(i=>{i[Me]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Lr.registerPostcss=t=>{Ch=t};mw=Lr;Lr.default=Lr;PF.registerLazyResult(Lr);XF.registerLazyResult(Lr);KF=uw,_F=hp,HF=pp,zF=Ua,BF=pw,kh=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.Zn)return this.Zn;let t,e=_F;try{t=e(this.ni,this.Hn)}catch(n){this.error=n}if(this.error)throw this.error;return this.Zn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.ho=t,this.ni=e,this.Hn=n,this.tl=void 0;let r,i=zF;this.result=new HF(this.ho,r,this.Hn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new KF(i,r,this.Hn,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.Hn||BF("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(t,e)}toString(){return this.ni}warnings(){return[]}},jF=kh;kh.default=kh;QF=cp,$F=mw,qF=jF,tA=eo,zi=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new qF(this,t,e):new $F(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},eA=zi;zi.default=zi;tA.registerProcessor(zi);QF.registerProcessor(zi);yw=lp,gw=Aa,nA=Kn,rA=op,bw=Da,vw=cp,iA=oF,oA=Ja,sA=mw,aA=iw,lA=Fa,cA=hp,dp=eA,uA=pp,ww=eo,Sw=up,hA=Ua,pA=hw;ft.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
335
335
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
336
- https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Gh().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return pt([r(a)]).process(o,s)},r};pt.stringify=KM;pt.parse=DM;pt.fromJSON=PM;pt.list=AM;pt.comment=t=>new R0(t);pt.atRule=t=>new E0(t);pt.decl=t=>new C0(t);pt.rule=t=>new V0(t);pt.root=t=>new k0(t);pt.document=t=>new Z0(t);pt.CssSyntaxError=UM;pt.Declaration=C0;pt.Container=WM;pt.Processor=Gh;pt.Document=Z0;pt.Comment=R0;pt.Warning=_M;pt.AtRule=E0;pt.Result=YM;pt.Input=MM;pt.Rule=V0;pt.Root=k0;pt.Node=JM;FM.registerPostcss(pt);pt.default=pt;zu=class t{constructor(...e){ne(this,"parentElement",null),ne(this,"parentNode",null),ne(this,"ownerDocument"),ne(this,"firstChild",null),ne(this,"lastChild",null),ne(this,"previousSibling",null),ne(this,"nextSibling",null),ne(this,"ELEMENT_NODE",1),ne(this,"TEXT_NODE",3),ne(this,"nodeType"),ne(this,"nodeName"),ne(this,"RRNodeType")}get childNodes(){let e=[],n=this.firstChild;for(;n;)e.push(n),n=n.nextSibling;return e}contains(e){if(e instanceof t){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},ob={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},sb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ws={},HM=()=>!!globalThis.Zone;Bc={};jc={};q={childNodes:zM,parentNode:BM,parentElement:jM,textContent:QM,contains:$M,getRootNode:qM,host:tF,styleSheets:eF,shadowRoot:nF,querySelector:rF,querySelectorAll:iF,mutationObserver:N0,patch:Zn};$n=`Please stop import mirror directly. Instead of that,\r
336
+ https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new dp().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return ft([r(a)]).process(o,s)},r};ft.stringify=hA;ft.parse=cA;ft.fromJSON=iA;ft.list=aA;ft.comment=t=>new gw(t);ft.atRule=t=>new yw(t);ft.decl=t=>new bw(t);ft.rule=t=>new Sw(t);ft.root=t=>new ww(t);ft.document=t=>new vw(t);ft.CssSyntaxError=rA;ft.Declaration=bw;ft.Container=nA;ft.Processor=dp;ft.Document=vw;ft.Comment=gw;ft.Warning=pA;ft.AtRule=yw;ft.Result=uA;ft.Input=oA;ft.Rule=Sw;ft.Root=ww;ft.Node=lA;sA.registerPostcss(ft);ft.default=ft;Zh=class t{constructor(...e){be(this,"parentElement",null),be(this,"parentNode",null),be(this,"ownerDocument"),be(this,"firstChild",null),be(this,"lastChild",null),be(this,"previousSibling",null),be(this,"nextSibling",null),be(this,"ELEMENT_NODE",1),be(this,"TEXT_NODE",3),be(this,"nodeType"),be(this,"nodeName"),be(this,"RRNodeType")}get childNodes(){let e=[],n=this.firstChild;for(;n;)e.push(n),n=n.nextSibling;return e}contains(e){if(e instanceof t){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},Qb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},$b={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ys={},dA=()=>!!globalThis.Zone;xu={};Vu={};ot={childNodes:fA,parentNode:mA,parentElement:yA,textContent:gA,contains:bA,getRootNode:vA,host:wA,styleSheets:SA,shadowRoot:IA,querySelector:TA,querySelectorAll:EA,mutationObserver:Tw,patch:_n};wr=`Please stop import mirror directly. Instead of that,\r
337
337
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
338
- or you can use record.mirror to access the mirror instance during recording.`,ab={map:{},getId(){return console.error($n),-1},getNode(){return console.error($n),null},removeNodeFromMap(){console.error($n)},has(){return console.error($n),!1},reset(){console.error($n)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ab=new Proxy(ab,{get(t,e,n){return e==="map"&&console.error($n),Reflect.get(t,e,n)}}));na=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(na=()=>new Date().getTime());oF=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};Qu=class{constructor(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}getId(e){var n;return(n=this.styleIDMap.get(e))!=null?n:-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};rt=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(rt||{}),et=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(et||{}),Dt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Dt||{}),_e=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(_e||{}),dr=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(dr||{}),qn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(qn||{}),A0=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(A0||{});$u=class{constructor(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=(n==null?void 0:n.next)||null;return n}addNode(e){let n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&lb(e.previousSibling)){let r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&lb(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){let n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},cb=(t,e)=>`${t}@${e}`,qu=class{constructor(){k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"inlineVideos"),k(this,"privacySetting"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),k(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],n=new Set,r=new $u,i=c=>{let l=c,u=mi;for(;u===mi;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=c=>{let l=q.parentNode(c);if(!l||!F0(c))return;let u=!1;if(c.nodeType===Node.TEXT_NODE){let m=l.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(l)&&(u=!0)}let h=ci(l)?this.mirror.getId(M0(c)):this.mirror.getId(l),p=i(c);if(h===-1||p===-1)return r.addNode(c);let f=er(c,{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:m=>{U0(m,this.mirror)&&this.iframeManager.addIframe(m),P0(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),ju(c)&&this.shadowDomManager.addShadowRoot(q.shadowRoot(c),this.doc)},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d)},cssCaptured:u});f&&(e.push({parentId:h,nextId:p,node:f}),n.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)ub(this.removesSubTreeCache,c)&&!this.movedSet.has(q.parentNode(c))||o(c);for(let c of this.addedSet)!hb(this.droppedSet,c)&&!ub(this.removesSubTreeCache,c)||hb(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let l=this.mirror.getId(q.parentNode(s.value)),u=i(s.value);l!==-1&&u!==-1&&(c=s)}if(!c){let l=r.tail;for(;l;){let u=l;if(l=l.previous,u){let h=this.mirror.getId(q.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){c=u;break}else{let p=u.value,f=q.parentNode(p);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=q.host(f);if(this.mirror.getId(m)!==-1){c=u;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}let a={texts:this.texts.map(c=>{var l,u;let h=c.node,p=q.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);let f=c.value,m=this.privacySetting==="strict",d=this.privacySetting==="default"&&iv(f),v=(u=(l=c.node)==null?void 0:l.parentElement)==null?void 0:u.getAttribute("data-hl-record");return(m||d)&&!v&&f&&(f=ph(f)),{id:this.mirror.getId(h),value:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:l}=c;if(typeof l.style=="string"){let u=JSON.stringify(c.styleDiff),h=JSON.stringify(c.po);u.length<l.style.length&&(u+h).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),k(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},po:{}},this.attributes.push(n),this.attributeMap.set(e,n));let r=Array.from(q.childNodes(e),i=>q.textContent(i)||"").join("");n.attributes.value=Ds({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ys(e),value:r,maskInputFn:this.maskInputFn})}),k(this,"processMutation",e=>{if(!Qc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let n=q.textContent(e.target);!Nt(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:cv(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,X0(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{let n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let s=Ys(n);i=Ds({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:s,value:i,overwriteRecord:n.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Nt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},po:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!lv(n.tagName,r)){if(e.target.tagName==="INPUT"){let s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}if(o.attributes[r]=av(this.doc,sr(n.tagName),sr(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a)?l===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,l]:o.po[a]=[c,l]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Nt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{let r=this.mirror.getId(n),i=ci(e.target)?this.mirror.getId(q.host(e.target)):this.mirror.getId(e.target);Nt(e.target,this.blockClass,this.blockSelector,!1)||Qc(n,this.mirror,this.slimDOMOptions)||!sF(n,this.mirror)||(this.addedSet.has(n)?(th(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||W0(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[cb(r,i)]?th(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:ci(e.target)&&ui(e.target)?!0:void 0}),uF(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),k(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Qc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[cb(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Nt(e,this.blockClass,this.blockSelector,!1)||(q.childNodes(e).forEach(r=>this.genAdds(r)),ju(e)&&q.childNodes(q.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}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()}};nt=t=>hi?(...e)=>{try{return t(...e)}catch(n){if(hi&&hi(n)===!0)return;throw n}}:t,Tn=[];gF=["INPUT","TEXTAREA","SELECT"],pb=new WeakMap;ia=class{constructor(e){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,i){let o=r||this.getIdToRemoteIdMap(e),s=i||this.getRemoteIdToIdMap(e),a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(e,n){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,i))}getRemoteId(e,n,r){let i=r||this.getRemoteIdToIdMap(e);return typeof n!="number"?n:i.get(n)||-1}getRemoteIds(e,n){let r=this.getRemoteIdToIdMap(e);return n.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}},eh=class{constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new ia(sv)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ia(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin)return;let r=e.source;if(!r)return;let i=this.crossOriginIframeMap.get(r);if(!i)return;let o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case rt.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);let i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:rt.IncrementalSnapshot,data:{source:et.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rt.Meta:case rt.Load:case rt.DomContentLoaded:return!1;case rt.Plugin:return n;case rt.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case rt.IncrementalSnapshot:switch(n.data.source){case et.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),n.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.Drag:case et.TouchMove:case et.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.ViewportResize:return!1;case et.MediaInteraction:case et.MouseInteraction:case et.Scroll:case et.CanvasMutation:case et.Input:return this.replaceIds(n.data,e,["id"]),n;case et.StyleSheetRule:case et.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case et.Font:return n;case et.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),n;case et.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),n}}return!1}replace(e,n,r,i){for(let o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==A0.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},nh=class{constructor(e){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!ui(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=D0(Kt(z({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Y0(Kt(z({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(q.host(e))),this.restoreHandlers.push(K0({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){let r=this;this.restoreHandlers.push(Zn(e.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o),a=q.shadowRoot(this);return a&&F0(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ZF=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(oi=0;oi<nr.length;oi++)ZF[nr.charCodeAt(oi)]=oi;kF=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3)i+=nr[e[n]>>2],i+=nr[(e[n]&3)<<4|e[n+1]>>4],i+=nr[(e[n+1]&15)<<2|e[n+2]>>6],i+=nr[e[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},db=new Map;_0=(t,e,n)=>{if(!t||!(z0(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=VF(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};H0=(t,e,n)=>t.map(r=>Gs(r,e,n)),z0=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);B0="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0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CBtc2cgPSB7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGR4LAogICAgICAgIGR5LAogICAgICAgIGR3LAogICAgICAgIGRoCiAgICAgIH07CiAgICAgIGRlYnVnKCJbaGlnaGxpZ2h0LXdvcmtlcl0gY2FudmFzIGJpdG1hcCBwcm9jZXNzZWQiLCBtc2cpOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UobXNnKTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgZGVidWcoIltoaWdobGlnaHQtd29ya2VyXSBubyBvZmZzY3JlZW5jYW52YXMgc3VwcG9ydCIsIHsKICAgICAgICBpZDogZS5kYXRhLmlkCiAgICAgIH0pOwogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCwgc3RhdHVzOiAidW5zdXBwb3J0ZWQiIH0pOwogICAgfQogIH07Cn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWJpdG1hcC1kYXRhLXVybC13b3JrZXItRHd0SzhBMHouanMubWFwCg==",GF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),yb=typeof self<"u"&&self.Blob&&new Blob([GF(B0)],{type:"text/javascript;charset=utf-8"});rh=class{constructor(e){k(this,"pendingCanvasMutations",new Map),k(this,"rafStamps",{latestId:0,invokeId:null}),k(this,"mirror"),k(this,"logger"),k(this,"worker"),k(this,"snapshotInProgressMap",new Map),k(this,"lastSnapshotTime",new Map),k(this,"options"),k(this,"mutationCb"),k(this,"resetObservers"),k(this,"frozen",!1),k(this,"locked",!1),k(this,"processMutation",(h,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(h)||this.pendingCanvasMutations.set(h,[]),this.pendingCanvasMutations.get(h).push(p)});let{sampling:n,win:r,blockClass:i,blockSelector:o,recordCanvas:s,recordLocalVideos:a,recordRemoteVideos:c,initialSnapshotDelay:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.logger=e.logger,this.worker=new LF,this.worker.onmessage=h=>{let{id:p}=h.data;if(this.snapshotInProgressMap.set(p,!1),!("base64"in h.data)){this.debug(null,"canvas worker received empty message",{id:p,data:h.data,status:h.data.status});return}let{base64:f,type:m,dx:d,dy:v,dw:g,dh:w}=h.data,R={id:p,type:dr["2D"],commands:[{property:"clearRect",args:[d,v,g,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:m}]},d,v,g,w]}]};this.debug(null,"canvas worker recording mutation",R),this.mutationCb(R)},this.options=e,s&&n==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:n}),this.initCanvasMutationObserver(r,i,o)):s&&typeof n=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:n}),this.initCanvasFPSObserver(a,c,n,r,i,o,{initialSnapshotDelay:l,dataURLOptions:u},e.resizeFactor,e.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(e,...n){if(!this.logger)return;let r=this.mirror.getId(e),i="[highlight-canvas-manager]";e&&(i=`[highlight-canvas] [id:${r}]`,e.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${e.__context}]`)),this.logger.debug(i,e,...n)}snapshot(e){return Yt(this,null,function*(){var n;let r=this.mirror.getId(e);if(this.snapshotInProgressMap.get(r)){this.debug(e,"snapshotting already in progress for",r);return}let i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),o=this.lastSnapshotTime.get(r);if(!(o&&new Date().getTime()-o<i)){if(this.debug(e,"starting snapshotting"),e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}this.lastSnapshotTime.set(r,new Date().getTime()),this.snapshotInProgressMap.set(r,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(e.__context)){let u=e.getContext(e.__context);((n=u==null?void 0:u.getContextAttributes())==null?void 0:n.preserveDrawingBuffer)===!1&&(u.clear(u.COLOR_BUFFER_BIT),this.debug(e,"cleared webgl canvas to load it into memory",{attributes:u==null?void 0:u.getContextAttributes()}))}if(e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}let s=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){let u=Math.max(e.width,e.height);s=Math.min(s,this.options.maxSnapshotDimension/u)}let a=e.width*s,c=e.height*s,l=yield createImageBitmap(e,{resizeWidth:a,resizeHeight:c});this.debug(e,"created image bitmap",{width:l.width,height:l.height}),this.worker.postMessage({id:r,bitmap:l,width:a,height:c,dx:0,dy:0,dw:e.width,dh:e.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[l]),this.debug(e,"sent message")}catch(s){this.debug(e,"failed to snapshot",s)}finally{this.snapshotInProgressMap.set(r,!1)}}})}initCanvasFPSObserver(e,n,r,i,o,s,a,c,l){let u=fb(i,o,s,!0),h=1e3/r,p=0,f,m=new Map,d=(R,E)=>{let T=[];R.querySelectorAll(E).forEach(U=>T.push(U));let V=document.createNodeIterator(R,Node.ELEMENT_NODE),O;for(;O=V.nextNode();)O!=null&&O.shadowRoot&&T.push(...d(O.shadowRoot,E));return T},v=R=>{let E=[];return d(i.document,"canvas").forEach(T=>{if(!Nt(T,o,s,!0)){this.debug(T,"discovered canvas"),E.push(T);let V=this.mirror.getId(T);m.has(V)||m.set(V,R)}}),E},g=R=>{let E=[];return(e||n)&&d(i.document,"video").forEach(T=>{if(!(!n&&T.src!==""&&T.src.indexOf("blob:")===-1)&&!(!e&&(T.src===""||T.src.indexOf("blob:")!==-1))&&!Nt(T,o,s,!0)){E.push(T);let V=this.mirror.getId(T);m.has(V)||m.set(V,R)}}),E},w=R=>Yt(this,null,function*(){if(p&&R-p<h){f=requestAnimationFrame(w);return}p=R;let E=V=>{let O=this.mirror.getId(V),U=m.get(O),C=!a.initialSnapshotDelay||R-U>a.initialSnapshotDelay;return this.debug(V,{delay:a.initialSnapshotDelay,delta:R-U,hadLoadingTime:C}),C},T=[];T.push(...v(R).filter(E).map(V=>this.snapshot(V))),T.push(...g(R).filter(E).map(V=>Yt(this,null,function*(){this.debug(V,"starting video snapshotting");let O=this.mirror.getId(V);if(this.snapshotInProgressMap.get(O)){this.debug(V,"video snapshotting already in progress for",O);return}this.snapshotInProgressMap.set(O,!0);try{let{width:U,height:C}=V.getBoundingClientRect(),{actualWidth:N,actualHeight:P}={actualWidth:V.videoWidth,actualHeight:V.videoHeight},st=Math.max(N,P);if(st===0){this.debug(V,"not yet ready",{width:V.width,height:V.height,actualWidth:N,actualHeight:P,boxWidth:U,boxHeight:C});return}let lt=c||1;l&&(lt=Math.min(lt,l/st));let y=N*lt,b=P*lt,Z=yield createImageBitmap(V,{resizeWidth:y,resizeHeight:b}),D=Math.max(U,C)/st,M=N*D,G=P*D,it=(U-M)/2,ct=(C-G)/2;this.debug(V,"created image bitmap",{actualWidth:N,actualHeight:P,boxWidth:U,boxHeight:C,outputWidth:M,outputHeight:G,resizeWidth:y,resizeHeight:b,scale:lt,outputScale:D,offsetX:it,offsetY:ct}),this.worker.postMessage({id:O,bitmap:Z,width:y,height:b,dx:it,dy:ct,dw:M,dh:G,dataURLOptions:a.dataURLOptions,logDebug:!!this.logger},[Z]),this.debug(V,"send message")}catch(U){this.debug(V,"failed to snapshot",U)}finally{this.snapshotInProgressMap.set(O,!1)}}))),yield Promise.all(T).catch(console.error),f=requestAnimationFrame(w)});f=requestAnimationFrame(w),this.resetObservers=()=>{u(),f&&cancelAnimationFrame(f)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=fb(e,n,r,!1),o=xF(this.processMutation.bind(this),e,n,r),s=OF(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{i(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;let i=r.map(s=>or(s,["type"])),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},ih=class{constructor(e){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new Qu),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;let r={id:n,styleIds:[]},i=[];for(let o of e){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:nv(a,o.href),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},oh=class{constructor(){k(this,"nodeMap",new WeakMap),k(this,"active",!1)}inOtherBuffer(e,n){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}},oa=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((gg=t.contentWindow)==null?void 0:gg.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}ce=UW();Le.addCustomEvent=(t,e)=>{oa&&vt({type:rt.Custom,data:{tag:t,payload:e}})};Le.freezePage=()=>{Tn.forEach(t=>t.freeze())};Le.takeFullSnapshot=t=>{if(!oa)throw new Error("please take full snapshot after start recording");Ls(t)};Le.snapshotCanvas=t=>Yt(void 0,null,function*(){if(!pi)throw new Error("canvas manager is not initialized");yield pi.snapshot(t)});Le.mirror=ce;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(gb||(gb={}));({addCustomEvent:bb}=Le),XF=t=>{t(window.location.href);let e=history.pushState;history.pushState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s})(history.pushState);let n=history.replaceState;history.replaceState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s})(history.replaceState);let r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);let i=function(){t(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=e,history.replaceState=n}},WF=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},UF=t=>{let e=n=>{if(n.target){let r=n.target,i=Qb(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},PF=t=>{let e=n=>{if(n.target){let r=Qb(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},MF=t=>{let e,n;if(typeof document.hidden<"u"?(e="hidden",n="visibilitychange"):typeof document.msHidden<"u"?(e="msHidden",n="msvisibilitychange"):typeof document.webkitHidden<"u"&&(e="webkitHidden",n="webkitvisibilitychange"),n===void 0)return()=>{};if(e===void 0)return()=>{};let r=e,i=()=>{let s=document[r];t(!!s)};document.addEventListener(n,i);let o=n;return()=>document.removeEventListener(o,i)},FF=t=>{t(window.location.href);var e=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(o){setTimeout(()=>{var s,a;try{a=JSON.parse((s=o==null?void 0:o.toString())!=null?s:"")}catch(c){return}(a.type==="track"||a.type==="identify")&&$c(a)&&t(a)},100),e.call(this,o)};let n=o=>{if(o.key==="ajs_user_id"||o.key==="ajs_anonymous_id"||o.key==="ajs_user_traits"){let{userId:s,userTraits:a}=vb();if(s){let c={};a&&(c=JSON.parse(a));let l={type:"identify",userId:s.toString(),traits:c};$c(l)&&t(l)}}},{userId:r,userTraits:i}=vb();if(r){let o={};i&&(o=JSON.parse(i));let s={type:"identify",userId:r.toString(),traits:o};$c(s)&&t(s)}return window.addEventListener("storage",n),MX(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},vb=()=>{let t=re("ajs_user_id"),e=re("ajs_user_traits"),n=re("ajs_anonymous_id");return{userId:t,userTraits:e,anonymousId:n}},$c=t=>{if(!t)return!1;let e="";try{e=JSON.stringify(t)}catch(i){return!1}let n=AF(e),r=re(_t.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(ze(_t.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},AF=t=>{var e=0,n=t.length,r=0;if(n>0)for(;r<n;)e=(e<<5)-e+t.charCodeAt(r++)|0;return e.toString()},JF=(t,e)=>{let n=DF(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=_F(j0,a)),a=a[a.length-1],a=a==="*"?"*":KF(a),a in Te||(Te[a]=[]),Te[a].push({mods:r,shortcut:n[s],key:n[s],method:e,keyup:i,keydown:o,scope:"all",splitKey:"+"})}HF(document,"keydown",s=>{BF(s)})},Ut=[];Te={},qc=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,YF={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,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":qc?173:189,"=":qc?61:187,";":qc?59:186,"'":222,"[":219,"]":221,"\\":220},wb={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Pt={16:!1,18:!1,17:!1,91:!1},j0={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},KF=t=>YF[t.toLowerCase()]||j0[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);Sb="iframe parent ready",Ib="iframe ok",Ri="highlightLogs",jF=t=>{let e=re(Ri)||"";e=e+"["+new Date().getTime()+"] "+t+`
339
- `,ze(Ri,e)},QF=()=>re(Ri)||"",$F=t=>{if(!t)return;let e=re(Ri)||"";e&&(e.startsWith(t)?(e=e.slice(t.length),ze(Ri,e)):jF("Unable to clear logs "+t.replace(`
338
+ or you can use record.mirror to access the mirror instance during recording.`,qb={map:{},getId(){return console.error(wr),-1},getNode(){return console.error(wr),null},removeNodeFromMap(){console.error(wr)},has(){return console.error(wr),!1},reset(){console.error(wr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(qb=new Proxy(qb,{get(t,e,n){return e==="map"&&console.error(wr),Reflect.get(t,e,n)}}));Ca=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ca=()=>new Date().getTime());RA=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};Oh=class{constructor(){G(this,"id",1),G(this,"styleIDMap",new WeakMap),G(this,"idStyleMap",new Map)}getId(e){var n;return(n=this.styleIDMap.get(e))!=null?n:-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};ut=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(ut||{}),at=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(at||{}),Bt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Bt||{}),un=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(un||{}),Xr=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Xr||{}),Sr=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Sr||{}),Gw=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Gw||{});Nh=class{constructor(){G(this,"length",0),G(this,"head",null),G(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=(n==null?void 0:n.next)||null;return n}addNode(e){let n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&tv(e.previousSibling)){let r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&tv(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){let n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},ev=(t,e)=>`${t}@${e}`,Gh=class{constructor(){G(this,"frozen",!1),G(this,"locked",!1),G(this,"texts",[]),G(this,"attributes",[]),G(this,"attributeMap",new WeakMap),G(this,"removes",[]),G(this,"mapRemoves",[]),G(this,"movedMap",{}),G(this,"addedSet",new Set),G(this,"movedSet",new Set),G(this,"droppedSet",new Set),G(this,"removesSubTreeCache",new Set),G(this,"mutationCb"),G(this,"blockClass"),G(this,"blockSelector"),G(this,"maskTextClass"),G(this,"maskTextSelector"),G(this,"inlineStylesheet"),G(this,"maskInputOptions"),G(this,"maskTextFn"),G(this,"maskInputFn"),G(this,"keepIframeSrcFn"),G(this,"recordCanvas"),G(this,"inlineImages"),G(this,"inlineVideos"),G(this,"privacySetting"),G(this,"slimDOMOptions"),G(this,"dataURLOptions"),G(this,"doc"),G(this,"mirror"),G(this,"iframeManager"),G(this,"stylesheetManager"),G(this,"shadowDomManager"),G(this,"canvasManager"),G(this,"processedNodeManager"),G(this,"unattachedDoc"),G(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),G(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],n=new Set,r=new Nh,i=c=>{let l=c,u=Fi;for(;u===Fi;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=c=>{let l=ot.parentNode(c);if(!l||!Nw(c))return;let u=!1;if(c.nodeType===Node.TEXT_NODE){let m=l.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(l)&&(u=!0)}let h=Li(l)?this.mirror.getId(Ow(c)):this.mirror.getId(l),p=i(c);if(h===-1||p===-1)return r.addNode(c);let f=Tr(c,{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:m=>{xw(m,this.mirror)&&this.iframeManager.addIframe(m),Vw(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Vh(c)&&this.shadowDomManager.addShadowRoot(ot.shadowRoot(c),this.doc)},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d)},cssCaptured:u});f&&(e.push({parentId:h,nextId:p,node:f}),n.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)nv(this.removesSubTreeCache,c)&&!this.movedSet.has(ot.parentNode(c))||o(c);for(let c of this.addedSet)!rv(this.droppedSet,c)&&!nv(this.removesSubTreeCache,c)||rv(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let l=this.mirror.getId(ot.parentNode(s.value)),u=i(s.value);l!==-1&&u!==-1&&(c=s)}if(!c){let l=r.tail;for(;l;){let u=l;if(l=l.previous,u){let h=this.mirror.getId(ot.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){c=u;break}else{let p=u.value,f=ot.parentNode(p);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=ot.host(f);if(this.mirror.getId(m)!==-1){c=u;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}let a={texts:this.texts.map(c=>{var l,u;let h=c.node,p=ot.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);let f=c.value,m=this.privacySetting==="strict",d=this.privacySetting==="default"&&jv(f),g=(u=(l=c.node)==null?void 0:l.parentElement)==null?void 0:u.getAttribute("data-hl-record");return(m||d)&&!g&&f&&(f=_h(f)),{id:this.mirror.getId(h),value:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:l}=c;if(typeof l.style=="string"){let u=JSON.stringify(c.styleDiff),h=JSON.stringify(c.po);u.length<l.style.length&&(u+h).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),G(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},po:{}},this.attributes.push(n),this.attributeMap.set(e,n));let r=Array.from(ot.childNodes(e),i=>ot.textContent(i)||"").join("");n.attributes.value=da({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:fa(e),value:r,maskInputFn:this.maskInputFn})}),G(this,"processMutation",e=>{if(!Ou(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let n=ot.textContent(e.target);!Ut(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:e0(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,kw(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{let n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let s=fa(n);i=da({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:s,value:i,overwriteRecord:n.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Ut(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},po:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!t0(n.tagName,r)){if(e.target.tagName==="INPUT"){let s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}if(o.attributes[r]=qv(this.doc,Zr(n.tagName),Zr(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a)?l===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,l]:o.po[a]=[c,l]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Ut(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{let r=this.mirror.getId(n),i=Li(e.target)?this.mirror.getId(ot.host(e.target)):this.mirror.getId(e.target);Ut(e.target,this.blockClass,this.blockSelector,!1)||Ou(n,this.mirror,this.slimDOMOptions)||!CA(n,this.mirror)||(this.addedSet.has(n)?(Lh(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Zw(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[ev(r,i)]?Lh(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:Li(e.target)&&Xi(e.target)?!0:void 0}),VA(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),G(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ou(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[ev(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ut(e,this.blockClass,this.blockSelector,!1)||(ot.childNodes(e).forEach(r=>this.genAdds(r)),Vh(e)&&ot.childNodes(ot.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}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()}};ct=t=>Wi?(...e)=>{try{return t(...e)}catch(n){if(Wi&&Wi(n)===!0)return;throw n}}:t,Dn=[];MA=["INPUT","TEXTAREA","SELECT"],iv=new WeakMap;Za=class{constructor(e){G(this,"iframeIdToRemoteIdMap",new WeakMap),G(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,i){let o=r||this.getIdToRemoteIdMap(e),s=i||this.getRemoteIdToIdMap(e),a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(e,n){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,i))}getRemoteId(e,n,r){let i=r||this.getRemoteIdToIdMap(e);return typeof n!="number"?n:i.get(n)||-1}getRemoteIds(e,n){let r=this.getRemoteIdToIdMap(e);return n.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}},Xh=class{constructor(e){G(this,"iframes",new WeakMap),G(this,"crossOriginIframeMap",new WeakMap),G(this,"crossOriginIframeMirror",new Za($v)),G(this,"crossOriginIframeStyleMirror"),G(this,"crossOriginIframeRootIdMap",new WeakMap),G(this,"mirror"),G(this,"mutationCb"),G(this,"wrappedEmit"),G(this,"loadListener"),G(this,"stylesheetManager"),G(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Za(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin)return;let r=e.source;if(!r)return;let i=this.crossOriginIframeMap.get(r);if(!i)return;let o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case ut.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);let i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:ut.IncrementalSnapshot,data:{source:at.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ut.Meta:case ut.Load:case ut.DomContentLoaded:return!1;case ut.Plugin:return n;case ut.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case ut.IncrementalSnapshot:switch(n.data.source){case at.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),n.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case at.Drag:case at.TouchMove:case at.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case at.ViewportResize:return!1;case at.MediaInteraction:case at.MouseInteraction:case at.Scroll:case at.CanvasMutation:case at.Input:return this.replaceIds(n.data,e,["id"]),n;case at.StyleSheetRule:case at.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case at.Font:return n;case at.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),n;case at.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),n}}return!1}replace(e,n,r,i){for(let o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==Gw.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},Wh=class{constructor(e){G(this,"shadowDoms",new WeakSet),G(this,"mutationCb"),G(this,"scrollCb"),G(this,"bypassOptions"),G(this,"mirror"),G(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!Xi(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=Xw(Qt(j({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ww(Qt(j({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(ot.host(e))),this.restoreHandlers.push(Mw({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){let r=this;this.restoreHandlers.push(_n(e.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o),a=ot.shadowRoot(this);return a&&Nw(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",HA=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Vi=0;Vi<Er.length;Vi++)HA[Er.charCodeAt(Vi)]=Vi;zA=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3)i+=Er[e[n]>>2],i+=Er[(e[n]&3)<<4|e[n+1]>>4],i+=Er[(e[n+1]&15)<<2|e[n+2]>>6],i+=Er[e[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},ov=new Map;Pw=(t,e,n)=>{if(!t||!(Fw(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=BA(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};Uw=(t,e,n)=>t.map(r=>ra(r,e,n)),Fw=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);Aw="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY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array.from(atob(t),e=>e.charCodeAt(0)),lv=typeof self<"u"&&self.Blob&&new Blob([qA(Aw)],{type:"text/javascript;charset=utf-8"});Mh=class{constructor(e){G(this,"pendingCanvasMutations",new Map),G(this,"rafStamps",{latestId:0,invokeId:null}),G(this,"mirror"),G(this,"logger"),G(this,"worker"),G(this,"snapshotInProgressMap",new Map),G(this,"lastSnapshotTime",new Map),G(this,"options"),G(this,"mutationCb"),G(this,"resetObservers"),G(this,"frozen",!1),G(this,"locked",!1),G(this,"processMutation",(h,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(h)||this.pendingCanvasMutations.set(h,[]),this.pendingCanvasMutations.get(h).push(p)});let{sampling:n,win:r,blockClass:i,blockSelector:o,recordCanvas:s,recordLocalVideos:a,recordRemoteVideos:c,initialSnapshotDelay:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.logger=e.logger,this.worker=new t9,this.worker.onmessage=h=>{let{id:p}=h.data;if(this.snapshotInProgressMap.set(p,!1),!("base64"in h.data)){this.debug(null,"canvas worker received empty message",{id:p,data:h.data,status:h.data.status});return}let{base64:f,type:m,dx:d,dy:g,dw:b,dh:w}=h.data,E={id:p,type:Xr["2D"],commands:[{property:"clearRect",args:[d,g,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:m}]},d,g,b,w]}]};this.debug(null,"canvas worker recording mutation",E),this.mutationCb(E)},this.options=e,s&&n==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:n}),this.initCanvasMutationObserver(r,i,o)):s&&typeof n=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:n}),this.initCanvasFPSObserver(a,c,n,r,i,o,{initialSnapshotDelay:l,dataURLOptions:u},e.resizeFactor,e.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(e,...n){if(!this.logger)return;let r=this.mirror.getId(e),i="[highlight-canvas-manager]";e&&(i=`[highlight-canvas] [id:${r}]`,e.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${e.__context}]`)),this.logger.debug(i,e,...n)}snapshot(e){return jt(this,null,function*(){var n;let r=this.mirror.getId(e);if(this.snapshotInProgressMap.get(r)){this.debug(e,"snapshotting already in progress for",r);return}let i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),o=this.lastSnapshotTime.get(r);if(!(o&&new Date().getTime()-o<i)){if(this.debug(e,"starting snapshotting"),e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}this.lastSnapshotTime.set(r,new Date().getTime()),this.snapshotInProgressMap.set(r,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(e.__context)){let u=e.getContext(e.__context);((n=u==null?void 0:u.getContextAttributes())==null?void 0:n.preserveDrawingBuffer)===!1&&(u.clear(u.COLOR_BUFFER_BIT),this.debug(e,"cleared webgl canvas to load it into memory",{attributes:u==null?void 0:u.getContextAttributes()}))}if(e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}let s=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){let u=Math.max(e.width,e.height);s=Math.min(s,this.options.maxSnapshotDimension/u)}let a=e.width*s,c=e.height*s,l=yield createImageBitmap(e,{resizeWidth:a,resizeHeight:c});this.debug(e,"created image bitmap",{width:l.width,height:l.height}),this.worker.postMessage({id:r,bitmap:l,width:a,height:c,dx:0,dy:0,dw:e.width,dh:e.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[l]),this.debug(e,"sent message")}catch(s){this.debug(e,"failed to snapshot",s)}finally{this.snapshotInProgressMap.set(r,!1)}}})}initCanvasFPSObserver(e,n,r,i,o,s,a,c,l){let u=sv(i,o,s,!0),h=1e3/r,p=0,f,m=new Map,d=(E,I)=>{let S=[];E.querySelectorAll(I).forEach(Z=>S.push(Z));let T=document.createNodeIterator(E,Node.ELEMENT_NODE),x;for(;x=T.nextNode();)x!=null&&x.shadowRoot&&S.push(...d(x.shadowRoot,I));return S},g=E=>{let I=[];return d(i.document,"canvas").forEach(S=>{if(!Ut(S,o,s,!0)){this.debug(S,"discovered canvas"),I.push(S);let T=this.mirror.getId(S);m.has(T)||m.set(T,E)}}),I},b=E=>{let I=[];return(e||n)&&d(i.document,"video").forEach(S=>{if(!(!n&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!e&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!Ut(S,o,s,!0)){I.push(S);let T=this.mirror.getId(S);m.has(T)||m.set(T,E)}}),I},w=E=>jt(this,null,function*(){if(p&&E-p<h){f=requestAnimationFrame(w);return}p=E;let I=T=>{let x=this.mirror.getId(T),Z=m.get(x),k=!a.initialSnapshotDelay||E-Z>a.initialSnapshotDelay;return this.debug(T,{delay:a.initialSnapshotDelay,delta:E-Z,hadLoadingTime:k}),k},S=[];S.push(...g(E).filter(I).map(T=>this.snapshot(T))),S.push(...b(E).filter(I).map(T=>jt(this,null,function*(){this.debug(T,"starting video snapshotting");let x=this.mirror.getId(T);if(this.snapshotInProgressMap.get(x)){this.debug(T,"video snapshotting already in progress for",x);return}this.snapshotInProgressMap.set(x,!0);try{let{width:Z,height:k}=T.getBoundingClientRect(),{actualWidth:O,actualHeight:X}={actualWidth:T.videoWidth,actualHeight:T.videoHeight},_=Math.max(O,X);if(_===0){this.debug(T,"not yet ready",{width:T.width,height:T.height,actualWidth:O,actualHeight:X,boxWidth:Z,boxHeight:k});return}let tt=c||1;l&&(tt=Math.min(tt,l/_));let y=O*tt,v=X*tt,V=yield createImageBitmap(T,{resizeWidth:y,resizeHeight:v}),D=Math.max(Z,k)/_,U=O*D,L=X*D,q=(Z-U)/2,lt=(k-L)/2;this.debug(T,"created image bitmap",{actualWidth:O,actualHeight:X,boxWidth:Z,boxHeight:k,outputWidth:U,outputHeight:L,resizeWidth:y,resizeHeight:v,scale:tt,outputScale:D,offsetX:q,offsetY:lt}),this.worker.postMessage({id:x,bitmap:V,width:y,height:v,dx:q,dy:lt,dw:U,dh:L,dataURLOptions:a.dataURLOptions,logDebug:!!this.logger},[V]),this.debug(T,"send message")}catch(Z){this.debug(T,"failed to snapshot",Z)}finally{this.snapshotInProgressMap.set(x,!1)}}))),yield Promise.all(S).catch(console.error),f=requestAnimationFrame(w)});f=requestAnimationFrame(w),this.resetObservers=()=>{u(),f&&cancelAnimationFrame(f)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=sv(e,n,r,!1),o=jA(this.processMutation.bind(this),e,n,r),s=$A(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{i(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;let i=r.map(s=>kr(s,["type"])),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},Ph=class{constructor(e){G(this,"trackedLinkElements",new WeakSet),G(this,"mutationCb"),G(this,"adoptedStyleSheetCb"),G(this,"styleMirror",new Oh),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;let r={id:n,styleIds:[]},i=[];for(let o of e){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:zv(a,o.href),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Uh=class{constructor(){G(this,"nodeMap",new WeakMap),G(this,"active",!1)}inOtherBuffer(e,n){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}},xa=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((cb=t.contentWindow)==null?void 0:cb.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}Te=rM();je.addCustomEvent=(t,e)=>{xa&&It({type:ut.Custom,data:{tag:t,payload:e}})};je.freezePage=()=>{Dn.forEach(t=>t.freeze())};je.takeFullSnapshot=t=>{if(!xa)throw new Error("please take full snapshot after start recording");ia(t)};je.snapshotCanvas=t=>jt(void 0,null,function*(){if(!Mi)throw new Error("canvas manager is not initialized");yield Mi.snapshot(t)});je.mirror=Te;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(cv||(cv={}));({addCustomEvent:uv}=je),e9=t=>{t(window.location.href);let e=history.pushState;history.pushState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s})(history.pushState);let n=history.replaceState;history.replaceState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s})(history.replaceState);let r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);let i=function(){t(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=e,history.replaceState=n}},n9=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},r9=t=>{let e=n=>{if(n.target){let r=n.target,i=Jv(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},i9=t=>{let e=n=>{if(n.target){let r=Jv(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},o9=t=>{let e,n;if(typeof document.hidden<"u"?(e="hidden",n="visibilitychange"):typeof document.msHidden<"u"?(e="msHidden",n="msvisibilitychange"):typeof document.webkitHidden<"u"&&(e="webkitHidden",n="webkitvisibilitychange"),n===void 0)return()=>{};if(e===void 0)return()=>{};let r=e,i=()=>{let s=document[r];t(!!s)};document.addEventListener(n,i);let o=n;return()=>document.removeEventListener(o,i)},s9=t=>{t(window.location.href);var e=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(o){setTimeout(()=>{var s,a;try{a=JSON.parse((s=o==null?void 0:o.toString())!=null?s:"")}catch(c){return}(a.type==="track"||a.type==="identify")&&Nu(a)&&t(a)},100),e.call(this,o)};let n=o=>{if(o.key==="ajs_user_id"||o.key==="ajs_anonymous_id"||o.key==="ajs_user_traits"){let{userId:s,userTraits:a}=hv();if(s){let c={};a&&(c=JSON.parse(a));let l={type:"identify",userId:s.toString(),traits:c};Nu(l)&&t(l)}}},{userId:r,userTraits:i}=hv();if(r){let o={};i&&(o=JSON.parse(i));let s={type:"identify",userId:r.toString(),traits:o};Nu(s)&&t(s)}return window.addEventListener("storage",n),o2(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},hv=()=>{let t=ve("ajs_user_id"),e=ve("ajs_user_traits"),n=ve("ajs_anonymous_id");return{userId:t,userTraits:e,anonymousId:n}},Nu=t=>{if(!t)return!1;let e="";try{e=JSON.stringify(t)}catch(i){return!1}let n=a9(e),r=ve(ie.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(pn(ie.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},a9=t=>{var e=0,n=t.length,r=0;if(n>0)for(;r<n;)e=(e<<5)-e+t.charCodeAt(r++)|0;return e.toString()},l9=(t,e)=>{let n=c9(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=p9(Dw,a)),a=a[a.length-1],a=a==="*"?"*":h9(a),a in Pe||(Pe[a]=[]),Pe[a].push({mods:r,shortcut:n[s],key:n[s],method:e,keyup:i,keydown:o,scope:"all",splitKey:"+"})}d9(document,"keydown",s=>{m9(s)})},Yt=[];Pe={},Gu=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,u9={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,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":Gu?173:189,"=":Gu?61:187,";":Gu?59:186,"'":222,"[":219,"]":221,"\\":220},pv={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Kt={16:!1,18:!1,17:!1,91:!1},Dw={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},h9=t=>u9[t.toLowerCase()]||Dw[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);dv="iframe parent ready",fv="iframe ok",ji="highlightLogs",y9=t=>{let e=ve(ji)||"";e=e+"["+new Date().getTime()+"] "+t+`
339
+ `,pn(ji,e)},g9=()=>ve(ji)||"",b9=t=>{if(!t)return;let e=ve(ji)||"";e&&(e.startsWith(t)?(e=e.slice(t.length),pn(ji,e)):y9("Unable to clear logs "+t.replace(`
340
340
  `," ")+" from "+e.replace(`
341
- `," ")))},Q0="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgY3Q9KE0sRCxDKT0+RCBpbiBNP1ZyKE0sRCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Q30pOk1bRF09QyxQPShNLEQpPT57Zm9yKHZhciBDIGluIER8fChEPXt9KSlRdC5jYWxsKEQsQykmJmN0KE0sQyxEW0NdKTtpZihCZSlmb3IodmFyIEMgb2YgQmUoRCkpWHQuY2FsbChELEMpJiZjdChNLEMsRFtDXSk7cmV0dXJuIE19LFVlPShNLEQpPT5qcihNLHFyKEQpKTt2YXIgZ2U9KE0sRCk9Pnt2YXIgQz17fTtmb3IodmFyIEogaW4gTSlRdC5jYWxsKE0sSikmJkQuaW5kZXhPZihKKTwwJiYoQ1tKXT1NW0pdKTtpZihNIT1udWxsJiZCZSlmb3IodmFyIEogb2YgQmUoTSkpRC5pbmRleE9mKEopPDAmJlh0LmNhbGwoTSxKKSYmKENbSl09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WVzc2FnZT1mdW5jdGlvbihnKXtyZXR1cm4gVyh0aGlzLG51bGwsZnVuY3Rpb24qKCl7aWYoZy5kYXRhLm1lc3NhZ2UudHlwZT09PUsuSW5pdGlhbGl6ZSl7dD1nLmRhdGEubWVzc2FnZS5iYWNrZW5kLG49Zy5kYXRhLm1lc3NhZ2Uuc2Vzc2lvblNlY3VyZUlELHM9Zy5kYXRhLm1lc3NhZ2UuZGVidWcsYT1nLmRhdGEubWVzc2FnZS5yZWNvcmRpbmdTdGFydFRpbWUsYy5kZWJ1Zz1zLGU9RHIobmV3IGNyKHQse2hlYWRlcnM6e319KSxNcigpKTtyZXR1cm59aWYoZCgpKXRyeXtnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5Bc3luY0V2ZW50cz95aWVsZCB5KGcuZGF0YS5tZXNzYWdlKTpnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5JZGVudGlmeT95aWVsZCB2KGcuZGF0YS5tZXNzYWdlKTpnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5Qcm9wZXJ0aWVzP3lpZWxkIGIoZy5kYXRhLm1lc3NhZ2UpOmcuZGF0YS5tZXNzYWdlLnR5cGU9PT1LLk1ldHJpY3M/eWllbGQgbShnLmRhdGEubWVzc2FnZSk6Zy5kYXRhLm1lc3NhZ2UudHlwZT09PUsuRmVlZGJhY2smJih5aWVsZCBOKGcuZGF0YS5tZXNzYWdlKSksaT0wfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItQ3BtbDJKMXQuanMubWFwCg==",qF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),Tb=typeof self<"u"&&self.Blob&&new Blob([qF(Q0)],{type:"text/javascript;charset=utf-8"});Oe=(t=>(t[t.Initialize=0]="Initialize",t[t.AsyncEvents=1]="AsyncEvents",t[t.Identify=2]="Identify",t[t.Properties=3]="Properties",t[t.Metrics=4]="Metrics",t[t.Feedback=5]="Feedback",t[t.CustomEvent=6]="CustomEvent",t[t.Stop=7]="Stop",t))(Oe||{}),e9=({apiKey:t})=>{(function(e,n){var r=e.amplitude||{yr:[],Wr:{}},i=n.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(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(t)};var o=n.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o);function s(d,v){d.prototype[v]=function(){return this.yr.push([v].concat(Array.prototype.slice.call(arguments,0))),this}}for(var a=function(){return this.yr=[],this},c=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],l=0;l<c.length;l++)s(a,c[l]);r.Identify=a;for(var u=function(){return this.yr=[],this},h=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],p=0;p<h.length;p++)s(u,h[p]);r.Revenue=u;var f=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function m(d){function v(w){d[w]=function(){d.yr.push([w].concat(Array.prototype.slice.call(arguments,0)))}}for(var g=0;g<f.length;g++)v(f[g])}m(r),r.getInstance=function(d){return d=(!d||d.length===0?"$default_instance":d).toLowerCase(),Object.prototype.hasOwnProperty.call(r.Wr,d)||(r.Wr[d]={yr:[]},m(r.Wr[d])),r.Wr[d]},e.amplitude=r})(window,document)},n9=({projectToken:t})=>{if(window.mixpanel)return;(function(n,r){if(!r.__SV){var i,o;window.mixpanel=r,r.tl=[],r.init=function(s,a,c){function l(p,f){var m=f.split(".");m.length==2&&(p=p[m[0]],f=m[1]),p[f]=function(){p.push([f].concat(Array.prototype.slice.call(arguments,0)))}}var u=r;for(typeof c<"u"?u=r[c]=[]:c="mixpanel",u.people=u.people||[],u.toString=function(p){var f="mixpanel";return c!=="mixpanel"&&(f+="."+c),p||(f+=" (stub)"),f},u.people.toString=function(){return u.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(" "),o=0;o<i.length;o++)l(u,i[o]);var h="set set_once union unset remove delete".split(" ");u.get_group=function(){function p(v){f[v]=function(){call2_args=arguments,call2=[v].concat(Array.prototype.slice.call(call2_args,0)),u.push([m,call2])}}for(var f={},m=["get_group"].concat(Array.prototype.slice.call(arguments,0)),d=0;d<h.length;d++)p(h[d]);return f},r.tl.push([s,a,c])},r.__SV=1.2}})(document,window.mixpanel||[]);let e=document.createElement("script");e.src=r9,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},r9="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",i9="9.15.0",sh=class{constructor(e){Y(this,"options"),Y(this,"isRunningOnHighlight"),Y(this,"organizationID"),Y(this,"graphqlSDK"),Y(this,"events"),Y(this,"sessionData"),Y(this,"ready"),Y(this,"manualStopped"),Y(this,"state"),Y(this,"logger"),Y(this,"enableSegmentIntegration"),Y(this,"privacySetting"),Y(this,"enableCanvasRecording"),Y(this,"samplingStrategy"),Y(this,"inlineImages"),Y(this,"inlineVideos"),Y(this,"inlineStylesheet"),Y(this,"debugOptions"),Y(this,"listeners"),Y(this,"firstloadVersion"),Y(this,"environment"),Y(this,"sessionShortcut"),Y(this,"appVersion"),Y(this,"serviceName"),Y(this,"_worker"),Y(this,"_optionsInternal"),Y(this,"_backendUrl"),Y(this,"_recordingStartTime"),Y(this,"_isOnLocalHost"),Y(this,"_onToggleFeedbackFormVisibility"),Y(this,"_isCrossOriginIframe"),Y(this,"_eventBytesSinceSnapshot"),Y(this,"_lastSnapshotTime"),Y(this,"_lastVisibilityChangeTime"),Y(this,"pushPayloadTimerId"),Y(this,"hasSessionUnloaded"),Y(this,"hasPushedData"),Y(this,"reloaded"),Y(this,"_hasPreviouslyInitialized"),Y(this,"_recordStop"),Y(this,"_integrations",[]);var n,r,i,o,s;this.options=e,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(i=(r=this.options)==null?void 0:r.debug)!=null?i:{},this.logger=new Eb(this.debugOptions.clientInteractions),this.Hn=new t9,this.Hn.onmessage=c=>{var l,u,h;((l=c.data.response)==null?void 0:l.type)===Oe.AsyncEvents?(this.gr+=c.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${c.data.response.id} size ${c.data.response.eventsSize} bytes, compression ratio ${c.data.response.eventsSize/c.data.response.compressedSize}.
342
- Total since snapshot: ${(this.gr/1e6).toFixed(1)}MB`)):((u=c.data.response)==null?void 0:u.type)===Oe.CustomEvent?this.addCustomEvent(c.data.response.tag,c.data.response.payload):((h=c.data.response)==null?void 0:h.type)===Oe.Stop&&(Ht("worker.onmessage","warn","Stopping recording due to worker failure",c.data.response),this.stop(!1))};let a=ks();if(this.reloaded=!1,!((o=this.sessionData)!=null&&o.sessionSecureID)&&a!=null&&a.sessionSecureID)this.sessionData=a,this.options.sessionSecureID=a.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(let c of Object.values(_t))pu(c);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now()}}this.bs=!1;try{window.parent.document&&(this.fo=!1)}catch(c){this.fo=(s=this.options.recordCrossOriginIframe)!=null?s:!0}this.el(this.options)}vs(e){return Yt(this,arguments,function*({forceNew:n}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let r,i;if(!n)try{r=re(_t.USER_IDENTIFIER);let o=re(_t.USER_OBJECT);o&&(i=JSON.parse(o))}catch(o){}for(let o of Object.values(_t))pu(o);this.sessionData.sessionSecureID=fu(),this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),yield this.start(),r&&i&&this.identify(r,i)})}el(e){var n,r,i,o,s,a,c,l,u;this.sessionShortcut=!1,this.zn=0,this.mo=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=!!e.enableSegmentIntegration,this.privacySetting=(n=e.privacySetting)!=null?n:"default",this.enableCanvasRecording=(r=e.enableCanvasRecording)!=null?r:!1,this.inlineImages=(i=e.inlineImages)!=null?i:this.mo,this.inlineVideos=(o=e.inlineVideos)!=null?o:this.mo,this.inlineStylesheet=(s=e.inlineStylesheet)!=null?s:this.mo,this.samplingStrategy=z({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:kX()},(a=e.samplingStrategy)!=null?a:{canvas:2}),this.hn=(c=e==null?void 0:e.backendUrl)!=null?c:"https://pub.observability.app.launchdarkly.com",this.hn[0]==="/"&&(this.hn=new URL(this.hn,document.baseURI).href);let h=new iX(`${this.hn}`,{headers:{}});this.graphqlSDK=CX(h,BX()),this.environment=(l=e.environment)!=null?l:"production",this.appVersion=e.appVersion,this.serviceName=(u=e.serviceName)!=null?u:"browser",typeof e.organizationID=="string"?this.organizationID=e.organizationID:this.organizationID=e.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=e.firstloadVersion||"unknown",this.sessionShortcut=e.sessionShortcut||!1,this.cl=()=>{};let p=e,f=or(p,["firstloadVersion"]);this.nl=f,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.gr=0,this.yo=new Date().getTime(),this.ws=new Date().getTime()}identify(e,n={},r){if(!e||e===""){console.warn("Highlight's identify() call was passed an empty identifier.",{user_identifier:e,user_object:n});return}this.sessionData.userIdentifier=e.toString(),this.sessionData.userObject=n,ze(_t.USER_IDENTIFIER,e.toString()),ze(_t.USER_OBJECT,JSON.stringify(n)),this.Hn.postMessage({message:{type:Oe.Identify,userIdentifier:e,userObject:n,source:r}})}track(e,n){this.addProperties(Kt(z({},n),{event:e}))}addProperties(e={},n){let r=z({},e);Object.entries(r).forEach(([i,o])=>{try{structuredClone(o)}catch(s){delete r[i]}}),this.Hn.postMessage({message:{type:Oe.Properties,propertiesObject:r,propertyType:n}})}start(e){return Yt(this,null,function*(){var n,r,i,o,s,a,c,l;if(!(navigator!=null&&navigator.webdriver&&!window.Cypress||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Googlebot")||(r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("AdsBot")))try{if(e!=null&&e.forceNew){yield this.vs(e);return}this.logger.log("Initializing...",e,this.sessionData,this.options),this.sessionData=(i=ks(this.sessionData.sessionSecureID))!=null?i:this.sessionData,(o=this.sessionData)!=null&&o.sessionStartTime?this.zn=(s=this.sessionData)==null?void 0:s.sessionStartTime:(this.zn=new Date().getTime(),this.sessionData.sessionStartTime=this.zn);let u=re(cu.CLIENT_ID);u||(u=fu(),ze(cu.CLIENT_ID,u));let h;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?h=!1:h=((a=this.options.networkRecording)==null?void 0:a.recordHeadersAndBody)||!1;let p=[];if(typeof this.options.networkRecording=="object"&&(c=this.options.networkRecording.destinationDomains)!=null&&c.length&&(p=this.options.networkRecording.destinationDomains),this.fo)yield this.rl();else{let g=yield this.graphqlSDK.initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:h,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this.nl),environment:this.environment,id:u,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,client_id:u,network_recording_domains:p,disable_session_recording:this.options.disableSessionRecording});if(g.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${g.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=g.initializeSession.secure_id,this.sessionData.projectID=parseInt(((l=g==null?void 0:g.initializeSession)==null?void 0:l.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){console.error("Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}li(""),Sn(this.sessionData),this.logger.log(`Loaded Highlight
343
- Remote: ${this.hn}
341
+ `," ")))},Jw="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgY3Q9KE0sRCxDKT0+RCBpbiBNP1ZyKE0sRCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Q30pOk1bRF09QyxQPShNLEQpPT57Zm9yKHZhciBDIGluIER8fChEPXt9KSlRdC5jYWx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CBOKGcuZGF0YS5tZXNzYWdlKSksaT0wfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItQ3BtbDJKMXQuanMubWFwCg==",v9=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),mv=typeof self<"u"&&self.Blob&&new Blob([v9(Jw)],{type:"text/javascript;charset=utf-8"});ze=(t=>(t[t.Initialize=0]="Initialize",t[t.AsyncEvents=1]="AsyncEvents",t[t.Identify=2]="Identify",t[t.Properties=3]="Properties",t[t.Metrics=4]="Metrics",t[t.Feedback=5]="Feedback",t[t.CustomEvent=6]="CustomEvent",t[t.Stop=7]="Stop",t))(ze||{}),S9=({apiKey:t})=>{(function(e,n){var r=e.amplitude||{ri:[],Ti:{}},i=n.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(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(t)};var o=n.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o);function s(d,g){d.prototype[g]=function(){return this.ri.push([g].concat(Array.prototype.slice.call(arguments,0))),this}}for(var a=function(){return this.ri=[],this},c=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],l=0;l<c.length;l++)s(a,c[l]);r.Identify=a;for(var u=function(){return this.ri=[],this},h=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],p=0;p<h.length;p++)s(u,h[p]);r.Revenue=u;var f=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function m(d){function g(w){d[w]=function(){d.ri.push([w].concat(Array.prototype.slice.call(arguments,0)))}}for(var b=0;b<f.length;b++)g(f[b])}m(r),r.getInstance=function(d){return d=(!d||d.length===0?"$default_instance":d).toLowerCase(),Object.prototype.hasOwnProperty.call(r.Ti,d)||(r.Ti[d]={ri:[]},m(r.Ti[d])),r.Ti[d]},e.amplitude=r})(window,document)},I9=({projectToken:t})=>{if(window.mixpanel)return;(function(n,r){if(!r.__SV){var i,o;window.mixpanel=r,r.el=[],r.init=function(s,a,c){function l(p,f){var m=f.split(".");m.length==2&&(p=p[m[0]],f=m[1]),p[f]=function(){p.push([f].concat(Array.prototype.slice.call(arguments,0)))}}var u=r;for(typeof c<"u"?u=r[c]=[]:c="mixpanel",u.people=u.people||[],u.toString=function(p){var f="mixpanel";return c!=="mixpanel"&&(f+="."+c),p||(f+=" (stub)"),f},u.people.toString=function(){return u.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(" "),o=0;o<i.length;o++)l(u,i[o]);var h="set set_once union unset remove delete".split(" ");u.get_group=function(){function p(g){f[g]=function(){call2_args=arguments,call2=[g].concat(Array.prototype.slice.call(call2_args,0)),u.push([m,call2])}}for(var f={},m=["get_group"].concat(Array.prototype.slice.call(arguments,0)),d=0;d<h.length;d++)p(h[d]);return f},r.el.push([s,a,c])},r.__SV=1.2}})(document,window.mixpanel||[]);let e=document.createElement("script");e.src=T9,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},T9="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",E9="9.15.0",Fh=class{constructor(e){K(this,"options"),K(this,"isRunningOnHighlight"),K(this,"organizationID"),K(this,"graphqlSDK"),K(this,"events"),K(this,"sessionData"),K(this,"ready"),K(this,"manualStopped"),K(this,"state"),K(this,"logger"),K(this,"enableSegmentIntegration"),K(this,"privacySetting"),K(this,"enableCanvasRecording"),K(this,"samplingStrategy"),K(this,"inlineImages"),K(this,"inlineVideos"),K(this,"inlineStylesheet"),K(this,"debugOptions"),K(this,"listeners"),K(this,"firstloadVersion"),K(this,"environment"),K(this,"sessionShortcut"),K(this,"appVersion"),K(this,"serviceName"),K(this,"_worker"),K(this,"_optionsInternal"),K(this,"_backendUrl"),K(this,"_recordingStartTime"),K(this,"_isOnLocalHost"),K(this,"_onToggleFeedbackFormVisibility"),K(this,"_isCrossOriginIframe"),K(this,"_eventBytesSinceSnapshot"),K(this,"_lastSnapshotTime"),K(this,"_lastVisibilityChangeTime"),K(this,"pushPayloadTimerId"),K(this,"hasSessionUnloaded"),K(this,"hasPushedData"),K(this,"reloaded"),K(this,"_hasPreviouslyInitialized"),K(this,"_recordStop"),K(this,"_integrations",[]);var n,r,i,o,s;this.options=e,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(i=(r=this.options)==null?void 0:r.debug)!=null?i:{},this.logger=new yv(this.debugOptions.clientInteractions),this.Lr=new w9,this.Lr.onmessage=c=>{var l,u,h;((l=c.data.response)==null?void 0:l.type)===ze.AsyncEvents?(this.ii+=c.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${c.data.response.id} size ${c.data.response.eventsSize} bytes, compression ratio ${c.data.response.eventsSize/c.data.response.compressedSize}.
342
+ Total since snapshot: ${(this.ii/1e6).toFixed(1)}MB`)):((u=c.data.response)==null?void 0:u.type)===ze.CustomEvent?this.addCustomEvent(c.data.response.tag,c.data.response.payload):((h=c.data.response)==null?void 0:h.type)===ze.Stop&&(oe("worker.onmessage","warn","Stopping recording due to worker failure",c.data.response),this.stop(!1))};let a=$s();if(this.reloaded=!1,!((o=this.sessionData)!=null&&o.sessionSecureID)&&a!=null&&a.sessionSecureID)this.sessionData=a,this.options.sessionSecureID=a.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(let c of Object.values(ie))_u(c);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now()}}this.bs=!1;try{window.parent.document&&(this.fo=!1)}catch(c){this.fo=(s=this.options.recordCrossOriginIframe)!=null?s:!0}this.nl(this.options)}vs(e){return jt(this,arguments,function*({forceNew:n}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let r,i;if(!n)try{r=ve(ie.USER_IDENTIFIER);let o=ve(ie.USER_OBJECT);o&&(i=JSON.parse(o))}catch(o){}for(let o of Object.values(ie))_u(o);this.sessionData.sessionSecureID=zu(),this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),yield this.start(),r&&i&&this.identify(r,i)})}nl(e){var n,r,i,o,s,a,c,l,u;this.sessionShortcut=!1,this.Xr=0,this.mo=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=!!e.enableSegmentIntegration,this.privacySetting=(n=e.privacySetting)!=null?n:"default",this.enableCanvasRecording=(r=e.enableCanvasRecording)!=null?r:!1,this.inlineImages=(i=e.inlineImages)!=null?i:this.mo,this.inlineVideos=(o=e.inlineVideos)!=null?o:this.mo,this.inlineStylesheet=(s=e.inlineStylesheet)!=null?s:this.mo,this.samplingStrategy=j({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:zW()},(a=e.samplingStrategy)!=null?a:{canvas:2}),this.Qn=(c=e==null?void 0:e.backendUrl)!=null?c:"https://pub.observability.app.launchdarkly.com",this.Qn[0]==="/"&&(this.Qn=new URL(this.Qn,document.baseURI).href);let h=new EW(`${this.Qn}`,{headers:{}});this.graphqlSDK=_W(h,m2()),this.environment=(l=e.environment)!=null?l:"production",this.appVersion=e.appVersion,this.serviceName=(u=e.serviceName)!=null?u:"browser",typeof e.organizationID=="string"?this.organizationID=e.organizationID:this.organizationID=e.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=e.firstloadVersion||"unknown",this.sessionShortcut=e.sessionShortcut||!1,this.ul=()=>{};let p=e,f=kr(p,["firstloadVersion"]);this.rl=f,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.ii=0,this.yo=new Date().getTime(),this.ws=new Date().getTime()}identify(e,n={},r){if(!e||e===""){console.warn("Highlight's identify() call was passed an empty identifier.",{user_identifier:e,user_object:n});return}this.sessionData.userIdentifier=e.toString(),this.sessionData.userObject=n,pn(ie.USER_IDENTIFIER,e.toString()),pn(ie.USER_OBJECT,JSON.stringify(n)),this.Lr.postMessage({message:{type:ze.Identify,userIdentifier:e,userObject:n,source:r}})}track(e,n){this.addProperties(Qt(j({},n),{event:e}))}addProperties(e={},n){let r=j({},e);Object.entries(r).forEach(([i,o])=>{try{structuredClone(o)}catch(s){delete r[i]}}),this.Lr.postMessage({message:{type:ze.Properties,propertiesObject:r,propertyType:n}})}start(e){return jt(this,null,function*(){var n,r,i,o,s,a,c,l;if(!(navigator!=null&&navigator.webdriver&&!window.Cypress||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Googlebot")||(r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("AdsBot")))try{if(e!=null&&e.forceNew){yield this.vs(e);return}this.logger.log("Initializing...",e,this.sessionData,this.options),this.sessionData=(i=$s(this.sessionData.sessionSecureID))!=null?i:this.sessionData,(o=this.sessionData)!=null&&o.sessionStartTime?this.Xr=(s=this.sessionData)==null?void 0:s.sessionStartTime:(this.Xr=new Date().getTime(),this.sessionData.sessionStartTime=this.Xr);let u=ve(Ju.CLIENT_ID);u||(u=zu(),pn(Ju.CLIENT_ID,u));let h;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?h=!1:h=((a=this.options.networkRecording)==null?void 0:a.recordHeadersAndBody)||!1;let p=[];if(typeof this.options.networkRecording=="object"&&(c=this.options.networkRecording.destinationDomains)!=null&&c.length&&(p=this.options.networkRecording.destinationDomains),this.fo)yield this.il();else{let b=yield this.graphqlSDK.initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:h,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this.rl),environment:this.environment,id:u,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,client_id:u,network_recording_domains:p,disable_session_recording:this.options.disableSessionRecording});if(b.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${b.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=b.initializeSession.secure_id,this.sessionData.projectID=parseInt(((l=b==null?void 0:b.initializeSession)==null?void 0:l.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){console.error("Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}Gi(""),Fn(this.sessionData),this.logger.log(`Loaded Highlight
343
+ Remote: ${this.Qn}
344
344
  Project ID: ${this.sessionData.projectID}
345
- SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.Hn.postMessage({message:{type:Oe.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this.hn,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this.zn}});for(let g of this.Vn)g.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.fo||(this.pushPayloadTimerId=setTimeout(()=>{this.Ss()},hg)),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}let f=(g,w)=>{w&&this.logger.log("received isCheckout emit",{event:g}),this.events.push(g)};f.bind(this);let m=!!this.vn;this.vn&&(this.vn(),this.vn=void 0);let[d,v]=WF(this.privacySetting);this.vn=Le({ignoreClass:"highlight-ignore",blockClass:"highlight-block",emit:f,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:d,maskInputOptions:v,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:g=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,plugins:[dW()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:Ht.bind("RecordSDK","warn")}:void 0}),m||this.options.recordCrossOriginIframe&&this.il(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.ol(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(u){Ht("initializeSession _setupWindowListeners","warn",u)}})}Is(e){return Yt(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this.ws<NX||(this.ws=new Date().getTime(),this.logger.log(`Detected window ${e?"hidden":"visible"}.`),e?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}rl(){return Yt(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(e=>{let n=r=>{if(r.data.highlight===Sb){let i=r.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:Ib},"*"),window.removeEventListener("message",n),e()}};window.addEventListener("message",n)})})}il(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(e=>{var n;(n=e.contentWindow)==null||n.postMessage({highlight:Sb,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},hg),window.addEventListener("message",e=>{e.data.highlight===Ib&&this.logger.log("highlight got response from initialized iframe")})}ol(){var e;try{let r=this;this.enableSegmentIntegration&&this.listeners.push(FF(o=>{if(o.type==="track"){let s={};s["segment-event"]=o.event,r.addProperties(s,{type:"track",source:"segment"})}else if(o.type==="identify"){let s=o.userId.replace(/^"(.*)"$/,"$1");r.identify(s,o.traits,"segment")}})),this.listeners.push(XF(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,r.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(oW(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(UF((o,s)=>{let a=null,c=null;if(s&&s.target){let l=s.target;a=rW(l),c=l.textContent,c&&c.length>2e3&&(c=c.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:c,clickSelector:a})})),this.listeners.push(PF(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&JF(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this.bs||((e=window.electron)!=null&&e.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this.Is(!o)}),this.logger.log("Set up Electron highlight.run events.")):(MF(o=>this.Is(o)),this.logger.log("Set up document visibility listener.")),this.bs=!0);let i=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",i),this.listeners.push(()=>window.removeEventListener("beforeunload",i))}catch(r){Ht("initializeSession _setupWindowListeners","warn",r)}let n=()=>{this.addCustomEvent("Page Unload",""),li(this.sessionData.sessionSecureID),Sn(this.sessionData)};if(window.addEventListener("beforeunload",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){let r=()=>{this.addCustomEvent("Page Unload",""),li(this.sessionData.sessionSecureID),Sn(this.sessionData)};window.addEventListener("pagehide",r),this.listeners.push(()=>window.removeEventListener("beforeunload",r))}}stop(e){this.manualStopped=!!e,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",e&&this.vn&&(this.vn(),this.vn=void 0),this.listeners.forEach(n=>n()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){let e=new Date().getTime(),{projectID:n,sessionSecureID:r}=this.sessionData,i=(e-this.zn)/1e3;return`https://${dg}/${n}/sessions/${r}?ts=${i}`}getCurrentSessionURL(){let e=this.sessionData.projectID,n=this.sessionData.sessionSecureID;return e&&n?`https://${dg}/${e}/sessions/${n}`:null}snapshot(e){return Yt(this,null,function*(){yield Le.snapshotCanvas(e)})}addSessionFeedback({timestamp:e,verbatim:n,user_email:r,user_name:i}){var o;this.Hn.postMessage({message:{type:Oe.Feedback,verbatim:n,timestamp:e,userName:i||this.sessionData.userIdentifier,userEmail:r||((o=this.sessionData.userObject)==null?void 0:o.name)}})}Ss(){return Yt(this,null,function*(){var e;try{this.state==="Recording"&&this.listeners&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>xX&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this.vs({}));let n;((e=this.options)==null?void 0:e.sendMode)==="local"&&(n=r=>Yt(this,null,function*(){let i=new Blob([JSON.stringify({query:Pb(Yb),variables:r})],{type:"application/json"});return yield window.fetch(`${this.hn}`,{method:"POST",body:i}),0})),yield this.sl({sendFn:n}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),Sn(this.sessionData)}catch(n){Ht("_save","warn",n)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this.Ss()},VX))})}addCustomEvent(e,n){if(this.state==="NotRecording"){let r,i=()=>{clearInterval(r),this.state==="Recording"&&this.events.length>0?bb(e,n):r=setTimeout(i,500)};r=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&bb(e,n)}sl(e){return Yt(this,arguments,function*({sendFn:n}){let r=[...this.events],{bytes:i,time:o}=this.enableCanvasRecording?pg.canvas:pg.normal;this.gr>=i&&new Date().getTime()-this.yo>=o&&this.takeFullSnapshot(),this.logger.log(`Sending: ${r.length} events,
346
- To: ${this.hn}
345
+ SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.Lr.postMessage({message:{type:ze.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this.Qn,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this.Xr}});for(let b of this.yr)b.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.fo||(this.pushPayloadTimerId=setTimeout(()=>{this.Ss()},rb)),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}let f=(b,w)=>{w&&this.logger.log("received isCheckout emit",{event:b}),this.events.push(b)};f.bind(this);let m=!!this.sr;this.sr&&(this.sr(),this.sr=void 0);let[d,g]=n9(this.privacySetting);this.sr=je({ignoreClass:"highlight-ignore",blockClass:"highlight-block",emit:f,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:d,maskInputOptions:g,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:b=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,plugins:[G2()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:oe.bind("RecordSDK","warn")}:void 0}),m||this.options.recordCrossOriginIframe&&this.ol(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.sl(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(u){oe("initializeSession _setupWindowListeners","warn",u)}})}Is(e){return jt(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this.ws<QW||(this.ws=new Date().getTime(),this.logger.log(`Detected window ${e?"hidden":"visible"}.`),e?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}il(){return jt(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(e=>{let n=r=>{if(r.data.highlight===dv){let i=r.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:fv},"*"),window.removeEventListener("message",n),e()}};window.addEventListener("message",n)})})}ol(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(e=>{var n;(n=e.contentWindow)==null||n.postMessage({highlight:dv,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},rb),window.addEventListener("message",e=>{e.data.highlight===fv&&this.logger.log("highlight got response from initialized iframe")})}sl(){var e;try{let r=this;this.enableSegmentIntegration&&this.listeners.push(s9(o=>{if(o.type==="track"){let s={};s["segment-event"]=o.event,r.addProperties(s,{type:"track",source:"segment"})}else if(o.type==="identify"){let s=o.userId.replace(/^"(.*)"$/,"$1");r.identify(s,o.traits,"segment")}})),this.listeners.push(e9(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,r.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(R2(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(r9((o,s)=>{let a=null,c=null;if(s&&s.target){let l=s.target;a=T2(l),c=l.textContent,c&&c.length>2e3&&(c=c.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:c,clickSelector:a})})),this.listeners.push(i9(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&l9(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this.bs||((e=window.electron)!=null&&e.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this.Is(!o)}),this.logger.log("Set up Electron highlight.run events.")):(o9(o=>this.Is(o)),this.logger.log("Set up document visibility listener.")),this.bs=!0);let i=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",i),this.listeners.push(()=>window.removeEventListener("beforeunload",i))}catch(r){oe("initializeSession _setupWindowListeners","warn",r)}let n=()=>{this.addCustomEvent("Page Unload",""),Gi(this.sessionData.sessionSecureID),Fn(this.sessionData)};if(window.addEventListener("beforeunload",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){let r=()=>{this.addCustomEvent("Page Unload",""),Gi(this.sessionData.sessionSecureID),Fn(this.sessionData)};window.addEventListener("pagehide",r),this.listeners.push(()=>window.removeEventListener("beforeunload",r))}}stop(e){this.manualStopped=!!e,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",e&&this.sr&&(this.sr(),this.sr=void 0),this.listeners.forEach(n=>n()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){let e=new Date().getTime(),{projectID:n,sessionSecureID:r}=this.sessionData,i=(e-this.Xr)/1e3;return`https://${ob}/${n}/sessions/${r}?ts=${i}`}getCurrentSessionURL(){let e=this.sessionData.projectID,n=this.sessionData.sessionSecureID;return e&&n?`https://${ob}/${e}/sessions/${n}`:null}snapshot(e){return jt(this,null,function*(){yield je.snapshotCanvas(e)})}addSessionFeedback({timestamp:e,verbatim:n,user_email:r,user_name:i}){var o;this.Lr.postMessage({message:{type:ze.Feedback,verbatim:n,timestamp:e,userName:i||this.sessionData.userIdentifier,userEmail:r||((o=this.sessionData.userObject)==null?void 0:o.name)}})}Ss(){return jt(this,null,function*(){var e;try{this.state==="Recording"&&this.listeners&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>jW&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this.vs({}));let n;((e=this.options)==null?void 0:e.sendMode)==="local"&&(n=r=>jt(this,null,function*(){let i=new Blob([JSON.stringify({query:Vv(Wv),variables:r})],{type:"application/json"});return yield window.fetch(`${this.Qn}`,{method:"POST",body:i}),0})),yield this.al({sendFn:n}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),Fn(this.sessionData)}catch(n){oe("_save","warn",n)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this.Ss()},BW))})}addCustomEvent(e,n){if(this.state==="NotRecording"){let r,i=()=>{clearInterval(r),this.state==="Recording"&&this.events.length>0?uv(e,n):r=setTimeout(i,500)};r=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&uv(e,n)}al(e){return jt(this,arguments,function*({sendFn:n}){let r=[...this.events],{bytes:i,time:o}=this.enableCanvasRecording?ib.canvas:ib.normal;this.ii>=i&&new Date().getTime()-this.yo>=o&&this.takeFullSnapshot(),this.logger.log(`Sending: ${r.length} events,
346
+ To: ${this.Qn}
347
347
  Org: ${this.organizationID}
348
- SessionSecureID: ${this.sessionData.sessionSecureID}`);let s=QF();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:lX({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:s||void 0}):this.Hn.postMessage({message:{type:Oe.AsyncEvents,id:this.sessionData.payloadID++,events:r,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:s}}),Sn(this.sessionData),this.events=this.events.slice(r.length),$F(s)})}takeFullSnapshot(){if(!this.vn){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this.gr,lastSnapshotTime:this.yo}),Le.takeFullSnapshot(),this.gr=0,this.yo=new Date().getTime()}register(e,n){this.Vn.push(new du(e,n))}getHooks(e){return this.Vn.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}getRecordingState(){var e;return(e=this==null?void 0:this.state)!=null?e:"NotRecording"}getSession(){let e=this.sessionData.sessionSecureID,n=ks(e);if(!n)return null;let r=`${this.getFrontendUrl()}/sessions/${e}`;if(!r||!(n!=null&&n.sessionStartTime))return null;let i=new Date().getTime(),o=new URL(r),s=new URL(r),a=(i-this.zn)/1e3;return s.searchParams.set("ts",a.toString()),{url:o.toString(),urlWithTimestamp:s.toString(),sessionSecureID:e}}getFrontendUrl(){var e,n;let r=this.hn.match(XX);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${GX[i]}${LX}`}return OX}},Ci=class extends sW{constructor(e,n){var r=(...f)=>(super(...f),Y(this,"record"),this),i,o,s,a,c,l,u,h,p;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker>"u"){console.warn("@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!e){console.warn("@launchdarkly/session-replay is not initializing because projectID was passed undefined.");return}let f=Kt(z({},n),{organizationID:e,firstloadVersion:i9,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 sh(f),n!=null&&n.manualStart||this.record.start(),In.load(this.record),!((s=(o=n==null?void 0:n.integrations)==null?void 0:o.mixpanel)!=null&&s.disabled)&&(c=(a=n==null?void 0:n.integrations)==null?void 0:a.mixpanel)!=null&&c.projectToken&&n9(n.integrations.mixpanel),!((u=(l=n==null?void 0:n.integrations)==null?void 0:l.amplitude)!=null&&u.disabled)&&(p=(h=n==null?void 0:n.integrations)==null?void 0:h.amplitude)!=null&&p.apiKey&&e9(n.integrations.amplitude)}catch(f){Ht("Error initializing @launchdarkly/session-replay SDK","error",f)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(e,n){var r;(r=this.record)==null||r.register(e,n)}getHooks(e){return[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(n,r,i)=>{var o,s,a,c,l,u,h;for(let p of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=p.afterIdentify)==null||c.call(p,n,r,i);if(i.status==="completed"){let p=tW(n.context),f=eW(n.context);(h=this.record)==null||h.identify(typeof f=="string"?f:(u=(l=f.user)==null?void 0:l.toString())!=null?u:p,Kt(z({key:p},typeof f=="object"?f:{}),{timeout:n.timeout}),"LaunchDarkly")}return r},afterEvaluation:(n,r,i)=>{var o,s,a,c;for(let l of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=l.afterEvaluation)==null||c.call(l,n,r,i);return r},afterTrack:n=>{var r,i,o,s,a;for(let c of(o=(i=(r=this.record)==null?void 0:r.getHooks)==null?void 0:i.call(r,e))!=null?o:[])(s=c.afterTrack)==null||s.call(c,n);(a=this.record)==null||a.track(n.key,{data:n.data,value:n.metricValue})}}]}}});var sw=Object.defineProperty,aw=Object.defineProperties,lw=Object.getOwnPropertyDescriptors,Pi=Object.getOwnPropertySymbols,yp=Object.prototype.hasOwnProperty,gp=Object.prototype.propertyIsEnumerable,Kh=(t,e,n)=>e in t?sw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e)=>{for(var n in e||(e={}))yp.call(e,n)&&Kh(t,n,e[n]);if(Pi)for(var n of Pi(e))gp.call(e,n)&&Kh(t,n,e[n]);return t},ye=(t,e)=>aw(t,lw(e)),bp=(t,e)=>{var n={};for(var r in t)yp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Pi)for(var r of Pi(t))e.indexOf(r)<0&&gp.call(t,r)&&(n[r]=t[r]);return n};function cw(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function vp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function uw(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>vp(e))}function hw(t){return!t.startsWith("/")}function pw(t){return!t.match(/\/\/|(^\/.*~[^0|^1])|~$/)}var Nn=class{constructor(t,e=!1){if(e){let n=t;this.g=[n],this.isValid=n!=="",this.redactionName=n.startsWith("/")?cw(n):n}else{if(this.redactionName=t,t===""||t==="/"||!pw(t)){this.isValid=!1,this.g=[];return}hw(t)?this.g=[t]:t.indexOf("/",1)<0?this.g=[vp(t.slice(1))]:this.g=uw(t),this.g[0]==="_meta"?this.isValid=!1:this.isValid=!0}}get(t){let{g:e,isValid:n}=this;if(!n)return;let r=t;for(let i=0;i<e.length;i+=1){let o=e[i];if(r!=null&&Object.prototype.hasOwnProperty.call(r,o)&&typeof r=="object"&&!Array.isArray(r))r=r[o];else return}return r}getComponent(t){return this.g[t]}get depth(){return this.g.length}get isKind(){return this.g.length===1&&this.g[0]==="kind"}compare(t){return this.depth===t.depth&&this.g.every((e,n)=>e===t.getComponent(n))}get components(){return[...this.g]}};Nn.InvalidReference=new Nn("");var dw=class{is(t){if(Array.isArray(t))return!1;let e=typeof t;return e==="function"||e==="object"}getType(){return"factory method or object"}},Ln=class{constructor(t,e){this.pt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?!1:typeof t===this.typeOf}getType(){return this.pt}},wp=class{constructor(t,e){this.pt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?t.length>0?t.every(e=>typeof e===this.typeOf):!0:!1}getType(){return this.pt}},Sp=class extends Ln{constructor(t){super(`number with minimum value of ${t}`,0),this.min=t}is(t){return typeof t===this.typeOf&&t>=this.min}},Ip=class extends Ln{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},fw=class{is(t){return typeof t=="function"}getType(){return"function"}},mw=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},yw=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,gw=class{is(t){return typeof t=="number"||typeof t=="string"&&yw.test(t)}getType(){return"date"}},bw=class extends Ip{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},vw=class{constructor(t){this.qt=t}is(t){return typeof t=="string"&&this.qt.includes(t)}getType(){return this.qt.join(" | ")}};function _h(t){return t==null}var x=class{static createTypeArray(t,e){return new wp(t,e)}static numberWithMin(t){return new Sp(t)}static stringMatchingRegex(t){return new Ip(t)}static oneOf(...t){return new vw(t)}};x.String=new Ln("string","");x.Number=new Ln("number",0);x.ObjectOrFactory=new dw;x.Object=new Ln("object",{});x.StringArray=new wp("string[]","");x.Boolean=new Ln("boolean",!0);x.Function=new fw;x.Date=new gw;x.Kind=new bw;x.NullableBoolean=new mw;function Tp(t){return"kind"in t?x.String.is(t.kind)&&t.kind!=="multi":!1}function Ep(t){return"kind"in t?x.String.is(t.kind)&&t.kind==="multi":!1}function Rp(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function Mi(t,e=[]){if(t===null||typeof t!="object")return JSON.stringify(t);if(e.includes(t))throw new Error("Cycle detected");return Array.isArray(t)?`[${t.map(n=>Mi(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=Mi(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var Xa="user";function Hh(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function ww(t){return t&&x.Object.is(t)}function zh(t){return x.Kind.is(t)}function Bh(t){return x.String.is(t)&&t!==""}function Ca(t,e=!1){return t?t.map(n=>new Nn(n,e)):[]}function Sw(t){return t!=null}function Iw(t){let e=ye(ot({},t.custom||[]),{kind:"user",key:String(t.key)});if(Sw(t.anonymous)){let n=!!t.anonymous;delete e.anonymous,e.anonymous=n}return t.name!==null&&t.name!==void 0&&(e.name=t.name),t.ip!==null&&t.ip!==void 0&&(e.ip=t.ip),t.firstName!==null&&t.firstName!==void 0&&(e.firstName=t.firstName),t.lastName!==null&&t.lastName!==void 0&&(e.lastName=t.lastName),t.email!==null&&t.email!==void 0&&(e.email=t.email),t.avatar!==null&&t.avatar!==void 0&&(e.avatar=t.avatar),t.country!==null&&t.country!==void 0&&(e.country=t.country),t.privateAttributeNames!==null&&t.privateAttributeNames!==void 0&&(e._meta={privateAttributes:t.privateAttributeNames}),e}var xn=class St{constructor(e,n,r){this.C=!1,this.Q=!1,this.Yt=!1,this.N={},this.kind=n,this.valid=e,this.message=r}static b(e,n){return new St(!1,e,n)}static $e(e,n){if(!(!n||!e.isValid))return e.depth===1&&e.getComponent(0)==="anonymous"?!!(n!=null&&n.anonymous):e.get(n)}Zt(e){if(this.C)return this.N[e];if(this.kind===e)return this.y}static Re(e){let n=Object.keys(e).filter(c=>c!=="kind"),r=n.every(zh);if(!n.length)return St.b("multi","A multi-kind context must contain at least one kind");if(!r)return St.b("multi","Context contains invalid kinds");let i={},o=!0,s=n.reduce((c,l)=>{var u;let h=e[l];return ww(h)?(c[l]=h,i[l]=Ca((u=h._meta)==null?void 0:u.privateAttributes)):o=!1,c},{});if(!o)return St.b("multi","Context contained contexts that were not objects");if(!Object.values(s).every(c=>Bh(c.key)))return St.b("multi","Context contained invalid keys");if(n.length===1){let c=n[0],l=new St(!0,c);return l.y=ye(ot({},s[c]),{kind:c}),l.tt=i,l.Q=c==="user",l}let a=new St(!0,e.kind);return a.N=s,a.tt=i,a.C=!0,a}static Me(e){var n;let{key:r,kind:i}=e,o=zh(i),s=Bh(r);if(!o)return St.b(i!=null?i:"unknown","The kind was not valid for the context");if(!s)return St.b(i,"The key for the context was not valid");let a=Ca((n=e._meta)==null?void 0:n.privateAttributes),c=new St(!0,i);return c.Q=i==="user",c.y=e,c.tt={[i]:a},c}static Fe(e){if(!(e.key!==void 0&&e.key!==null))return St.b("user","The key for the context was not valid");let n=new St(!0,"user");return n.Q=!0,n.Yt=!0,n.y=Iw(e),n.tt={user:Ca(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?Tp(e)?St.Me(e):Ep(e)?St.Re(e):Rp(e)?St.Fe(e):St.b("unknown","Context was not of a valid kind"):St.b("unknown","No context specified. Returning default value")}static toLDContext(e){if(!e.valid)return;let n=e.getContexts();if(!e.C)return n[0][1];let r={kind:"multi"};return n.forEach(i=>{let o=i[0],s=i[1];r[o]=s}),r}valueForKind(e,n=Xa){return e.isKind?this.kinds:St.$e(e,this.Zt(n))}key(e=Xa){var n;return(n=this.Zt(e))==null?void 0:n.key}get isMultiKind(){return this.C}get canonicalKey(){return this.Q?this.y.key:this.C?Object.keys(this.N).sort().map(e=>`${e}:${Hh(this.N[e].key)}`).join(":"):`${this.kind}:${Hh(this.y.key)}`}get kinds(){return this.C?Object.keys(this.N):[this.kind]}get kindsAndKeys(){return this.C?Object.entries(this.N).reduce((e,[n,r])=>(e[n]=r.key,e),{}):{[this.kind]:this.y.key}}privateAttributes(e){var n;return((n=this.tt)==null?void 0:n[e])||[]}getContexts(){return this.C?Object.entries(this.N):[[this.kind,this.y]]}get legacy(){return this.Yt}canonicalUnfilteredJson(){if(this.valid){if(this.mt)return this.mt;try{this.mt=Mi(St.toLDContext(this))}catch(e){}return this.mt}}};xn.UserKind=Xa;var Tw=["key","kind","_meta","anonymous"].map(t=>new Nn(t,!0)),Ew=["name","ip","firstName","lastName","email","avatar","country"];function Rw(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function Cw(t,e){let n=[],r={},i=[];for(n.push(...Object.keys(t).map(o=>({key:o,ptr:[o],source:t,parent:r,visited:[t]})));n.length;){let o=n.pop(),s=e.find(a=>Rw(a,o.ptr));if(s)i.push(s.redactionName);else{let a=o.source[o.key];a===null?o.parent[o.key]=a:Array.isArray(a)?o.parent[o.key]=[...a]:typeof a=="object"?o.visited.includes(a)||(o.parent[o.key]={},n.push(...Object.keys(a).map(c=>({key:c,ptr:[...o.ptr,c],source:a,parent:o.parent[o.key],visited:[...o.visited,a]})))):o.parent[o.key]=a}}return{cloned:r,excluded:i.sort()}}var Zw=class{constructor(t,e){this.Ue=t,this.je=e}filter(t,e=!1){let n=t.getContexts();if(n.length===1)return this.Xt(t,n[0][1],n[0][0],e);let r={kind:"multi"};return n.forEach(([i,o])=>{r[i]=this.Xt(t,o,i,e)}),r}Ve(t,e,n,r){return(r?Object.keys(e).map(i=>new Nn(i,!0)):[...this.je,...t.privateAttributes(n)]).filter(i=>!Tw.some(o=>o.compare(i)))}Xt(t,e,n,r){let i=this.Ue||r&&e.anonymous===!0,{cloned:o,excluded:s}=Cw(e,this.Ve(t,e,n,i));return t.legacy&&Ew.forEach(a=>{a in o&&(o[a]=String(o[a]))}),s.length&&(o._meta||(o._meta={}),o._meta.redactedAttributes=s),o._meta&&(delete o._meta.privateAttributes,Object.keys(o._meta).length===0&&delete o._meta),o}},jh=30*1e3,kw=.5,Vw=class{constructor(t,e,n=Math.random){this.Ts=e,this.Be=n,this.gt=0,this.Qt=Math.max(1,t),this.He=Math.ceil(Math.log2(jh/this.Qt))}A(){let t=Math.min(this.gt,this.He),e=this.Qt*2**t;return Math.min(e,jh)}ze(t){return t-Math.trunc(this.Be()*kw*t)}success(t=Date.now()){this.yt=t}fail(t=Date.now()){this.yt!==void 0&&t-this.yt>this.Ts&&(this.gt=0),this.yt=void 0;let e=this.ze(this.A());return this.gt+=1,e}},Qh;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(Qh||(Qh={}));var Fi=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},Wa=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},s9=120*1e3,a9=300*1e3,At;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(At||(At={}));var Ai;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(Ai||(Ai={}));var On;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(On||(On={}));var qe;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(qe||(qe={}));function Vn(t){if(typeof t=="string")return t;if(t===void 0)return"undefined";if(t===null)return"null";if(Object.prototype.hasOwnProperty.call(t,"toString"))try{return t.toString()}catch(e){}if(typeof t=="bigint")return`${t}n`;try{return JSON.stringify(t)}catch(e){return e instanceof TypeError&&e.message.indexOf("circular")>=0?"[Circular]":"[Not Stringifiable]"}}function xw(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function Nw(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function Ow(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Za={s:t=>Vn(t),d:t=>xw(t),i:t=>Nw(t),f:t=>Ow(t),j:t=>Vn(t),o:t=>Vn(t),O:t=>Vn(t),c:()=>""};function Ua(...t){var e;let n=t.shift();if(x.String.is(n)){let r="",i=0;for(;i<n.length;){let o=n.charAt(i);if(o==="%"){if(i+1<n.length){let s=n.charAt(i+1);if(s in Za&&t.length){let a=t.shift();r+=(e=Za[s])==null?void 0:e.call(Za,a)}else s==="%"?r+="%":r+=`%${s}`;i+=2}}else r+=o,i+=1}return t.length&&(r.length&&(r+=" "),r+=t.map(Vn).join(" ")),r}return t.map(Vn).join(" ")}var Vt;(function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.none=4]="none"})(Vt||(Vt={}));var Gw=["debug","info","warn","error","none"],Fa=class Cp{static get(){return new Cp({})}constructor(e){var n,r,i;if(this.Xe=(r=Vt[(n=e.level)!=null?n:"info"])!=null?r:Vt.info,this.Qe=(i=e.name)!=null?i:"LaunchDarkly",this.re=e.formatter,typeof e.destination=="object")this.se={[Vt.debug]:e.destination.debug,[Vt.info]:e.destination.info,[Vt.warn]:e.destination.warn,[Vt.error]:e.destination.error};else if(typeof e.destination=="function"){let{destination:o}=e;this.se={[Vt.debug]:o,[Vt.info]:o,[Vt.warn]:o,[Vt.error]:o}}}ti(...e){var n;try{return this.re?(n=this.re)==null?void 0:n.call(this,...e):Ua(...e)}catch(r){return Ua(...e)}}ei(e,n){try{e(n)}catch(r){console.error(n)}}k(e,n){var r;if(e>=this.Xe){let i=`${Gw[e]}: [${this.Qe}]`;try{let o=(r=this.se)==null?void 0:r[e];o?this.ei(o,`${i} ${this.ti(...n)}`):console.error(...n)}catch(o){console.error(...n)}}}error(...e){this.k(Vt.error,e)}warn(...e){this.k(Vt.warn,e)}info(...e){this.k(Vt.info,e)}debug(...e){this.k(Vt.debug,e)}},Lw={error:x.Function,warn:x.Function,info:x.Function,debug:x.Function},Zp=class{constructor(t,e){Object.entries(Lw).forEach(([n,r])=>{if(!r.is(t[n]))throw new Error(`Provided logger instance must support logger.${n}(...) method`)}),this.t=t,this.ii=e}k(t,e){try{this.t[t](...e)}catch(n){this.ii[t](...e)}}error(...t){this.k("error",t)}warn(...t){this.k("warn",t)}info(...t){this.k("info",t)}debug(...t){this.k("debug",t)}},kp=t=>{let e=new Fa({level:"info",destination:console.error,formatter:Ua});return t?new Zp(t,e):e},oe=class{static deprecated(t,e){return`"${t}" is deprecated, please use "${e}"`}static optionBelowMinimum(t,e,n){return`Config option "${t}" had invalid value of ${e}, using minimum of ${n} instead`}static unknownOption(t){return`Ignoring unknown config option "${t}"`}static wrongOptionType(t,e,n){return`Config option "${t}" should be of type ${e}, got ${n}, using default value`}static wrongOptionTypeBoolean(t,e){return`Config option "${t}" should be a boolean, got ${e}, converting to boolean`}static invalidTagValue(t){return`Config option "${t}" must only contain letters, numbers, ., _ or -.`}static tagValueTooLong(t){return`Value of "${t}" was longer than 64 characters and was discarded.`}static partialEndpoint(t){return`You have set custom uris without specifying the ${t} URI; connections may not work properly`}},Xw=/^(\w|\.|-)+$/,Ww=x.stringMatchingRegex(Xw),Uw={is:(t,e)=>Ww.is(t)?t.length>64?{valid:!1,message:oe.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:oe.invalidTagValue(e)}},Pw=class{constructor(t){let e={},n=t==null?void 0:t.application,r=t==null?void 0:t.logger;n&&Object.entries(n).forEach(([o,s])=>{if(s!=null){let{valid:a,message:c}=Uw.is(s,`application.${o}`);a?o==="versionName"?e["application-version-name"]=[s]:e[`application-${o}`]=[s]:r==null||r.warn(c)}});let i=Object.keys(e);i.length&&(this.value=i.sort().flatMap(o=>e[o].sort().map(s=>`${o}/${s}`)).join(" "))}},Mw=class{constructor(t,e,n){this.platform=n,this.basicConfiguration={tags:e.tags,logger:e.logger,offline:e.offline,serviceEndpoints:e.serviceEndpoints,sdkKey:t}}};function ka(t){return t.replace(/\/+$/,"")}function Aa(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var Ji=class Vp{constructor(e,n,r=Vp.DEFAULT_EVENTS,i="/bulk",o="/diagnostic",s=!0,a){this.streaming=ka(e),this.polling=ka(n),this.events=ka(r),this.analyticsEventPath=i,this.diagnosticEventPath=o,this.includeAuthorizationHeader=s,this.payloadFilterKey=a}};Ji.DEFAULT_EVENTS="https://events.launchdarkly.com";function Ja(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function Fw(t,e,n){let r=Aa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Ja(`${t.streaming}/${r}`,i)}function Aw(t,e,n=[]){let r=Aa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Ja(`${t.polling}/${r}`,i)}function $h(t,e,n=[]){let r=Aa(e);return Ja(`${t.events}/${r}`,n)}var xp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},Jw=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},Np=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function Ki(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function Dw(t){return t===413?!0:Ki(t)}function Yw(t,e){let n,r;return{promise:new Promise((i,o)=>{r=i,n=setTimeout(()=>{let s=`${e} timed out after ${t} seconds.`;o(new Np(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function Op(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Va(t){return Math.trunc(t*1e3)}var Kw=t=>JSON.stringify(t)==="{}",Da=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!Kw(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?Da(i,e):i),n),{});function Wi(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Wi(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Wi(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){var o=i[r];if(!Wi(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function _w(t,e,n,r=!0,i="user-agent"){let{userAgentBase:o,version:s,wrapperName:a,wrapperVersion:c}=e.sdkData(),l={[i]:`${o!=null?o:"NodeJSClient"}/${s}`};return r&&(l.authorization=t),a&&(l["x-launchdarkly-wrapper"]=c?`${a}/${c}`:a),n!=null&&n.value&&(l["x-launchdarkly-tags"]=n.value),l}function Gn(t,e,n){let r;t.status?r=`error ${t.status}${t.status===401?" (invalid SDK key)":""}`:r=`I/O error (${t.message||"unknown error"})`;let i=n!=null?n:"giving up permanently";return`Received ${r} for ${e} - ${i}`}function Gp({status:t}){return t?Ki(t):!0}var qh=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Lp=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),Hw=class{constructor(t,e,n){this.a=e,this.ni=n,this.Et=[],this.ae=Date.now(),this.oe=this.ae,this.ce={diagnosticId:e.crypto.randomUUID(),sdkKeySuffix:t.length>6?t.substring(t.length-6):t}}createInitEvent(){var t,e,n;let r=this.a.info.sdkData(),i=this.a.info.platformData();return{kind:"diagnostic-init",id:this.ce,creationDate:this.ae,sdk:r,configuration:this.ni,platform:ot({name:i.name,osArch:(t=i.os)==null?void 0:t.arch,osName:(e=i.os)==null?void 0:e.name,osVersion:(n=i.os)==null?void 0:n.version},i.additional||{})}}recordStreamInit(t,e,n){let r={timestamp:t,failed:e,durationMillis:n};this.Et.push(r)}createStatsEventAndReset(t,e,n){let r=Date.now(),i={kind:"diagnostic",id:this.ce,creationDate:r,dataSinceDate:this.oe,droppedEvents:t,deduplicatedUsers:e,eventsInLastBatch:n,streamInits:this.Et};return this.Et=[],this.oe=r,i}},Pa;(function(t){t.MalformedFlag="MALFORMED_FLAG",t.UserNotSpecified="USER_NOT_SPECIFIED",t.FlagNotFound="FLAG_NOT_FOUND",t.ClientNotReady="CLIENT_NOT_READY",t.WrongType="WRONG_TYPE"})(Pa||(Pa={}));var zw=Pa,Xp=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};Xp.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var Bw=class{constructor(t,e){let{basicConfiguration:n,platform:r}=t,{serviceEndpoints:{analyticsEventPath:i,diagnosticEventPath:o}}=n,{crypto:s,requests:a}=r;this.ri=ot({},e),this.ue=$h(n.serviceEndpoints,i,[]),this.si=$h(n.serviceEndpoints,o,[]),this.V=a,this.ai=s}async et(t,e,n,r){let i={status:qe.Succeeded},o=ye(ot({},this.ri),{"content-type":"application/json"});n&&(o["x-launchdarkly-payload-id"]=n,o["x-launchDarkly-event-schema"]="4");let s;try{let{status:a,headers:c}=await this.V.fetch(e,{headers:o,body:JSON.stringify(t),compressBodyIfPossible:!0,method:"POST",keepalive:!0}),l=Date.parse(c.get("date")||"");if(l&&(i.serverTime=l),a<=204)return i;if(s=new xp(Gn({status:a,message:"some events were dropped"},"event posting")),!Ki(a))return Dw(a)?i.status=qe.Failed:i.status=qe.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=qe.Failed,i.error=s,i):(await Lp(),this.et(t,this.ue,n,!1))}async sendEventData(t,e){let n=t===On.AnalyticsEvents?this.ai.randomUUID():void 0,r=t===On.AnalyticsEvents?this.ue:this.si;return this.et(e,r,n,!0)}};function Di(t){return t.kind==="feature"}function jw(t){return t.kind==="identify"}function Qw(t){return t.kind==="migration_op"}var $w=class{constructor(t,e,n,r,i,o){this.count=t,this.key=e,this.value=n,this.version=i,this.variation=o,this.default=r}increment(){this.count+=1}};function qw(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var Wp=class{constructor(t=!1,e){this.oi=t,this.S=e,this.W=0,this.it=0,this.nt={},this.rt={}}summarizeEvent(t){if(Di(t)&&!t.excludeFromSummaries){this.y||(this.y=t.context);let e=qw(t),n=this.nt[e],r=this.rt[t.key];r||(r=new Set,this.rt[t.key]=r),t.context.kinds.forEach(i=>r.add(i)),n?n.increment():this.nt[e]=new $w(1,t.key,t.value,t.default,t.version,t.variation),(this.W===0||t.creationDate<this.W)&&(this.W=t.creationDate),t.creationDate>this.it&&(this.it=t.creationDate)}}getSummary(){var t;let e=Object.values(this.nt).reduce((r,i)=>{let o=r[i.key];o||(o={default:i.default,counters:[],contextKinds:[...this.rt[i.key]]},r[i.key]=o);let s={value:i.value,count:i.count};return i.variation!==void 0&&i.variation!==null&&(s.variation=i.variation),i.version!==void 0&&i.version!==null?s.version=i.version:s.unknown=!0,o.counters.push(s),r},{}),n={startDate:this.W,endDate:this.it,features:e,kind:"summary",context:this.y!==void 0&&this.oi?(t=this.S)==null?void 0:t.filter(this.y):void 0};return this.ci(),n}ci(){this.W=0,this.it=0,this.nt={},this.rt={}}},tS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},eS=class{constructor(t,e){this.S=t,this.t=e,this.J={}}summarizeEvent(t){var e;if(Di(t)){let n=t.context.canonicalUnfilteredJson();if(!n){t.context.valid&&((e=this.t)==null||e.error("Unable to serialize context, likely the context contains a cycle."));return}let r=this.J[n];r||(this.J[n]=new Wp(!0,this.S),r=this.J[n]),r.summarizeEvent(t)}}getSummaries(){let t=this.J;return this.J={},Object.values(t).map(e=>e.getSummary())}};function Ui(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function nS(t){return t.getSummaries!==void 0}var rS=class{constructor(t,e,n,r,i,o=!0,s=!1){this.e=t,this.st=r,this.x=i,this.at=[],this.le=0,this.Dt=0,this.bt=0,this.kt=!1,this.he=0,this.St=!1,this.xt=null,this.ui=t.eventsCapacity,this.t=e.basicConfiguration.logger,this.de=new Bw(e,n),this.S=new Zw(t.allAttributesPrivate,t.privateAttributes.map(a=>new Nn(a))),s?this.q=new eS(this.S,this.t):this.q=new Wp,o&&this.start()}start(){var t,e;if(((t=this.st)==null?void 0:t.flushInterval)!==void 0&&(this.xt=setInterval(()=>{var n;(n=this.st)==null||n.flush()},this.st.flushInterval*1e3)),this.li=setInterval(async()=>{var n;try{await this.flush()}catch(r){(n=this.t)==null||n.debug(`Flush failed: ${r}`)}},this.e.flushInterval*1e3),this.x){let n=this.x.createInitEvent();this.fe(n),this.pe=setInterval(()=>{let r=this.x.createStatsEventAndReset(this.Dt,this.bt,this.he);this.Dt=0,this.bt=0,this.fe(r)},this.e.diagnosticRecordingInterval*1e3)}(e=this.t)==null||e.debug("Started EventProcessor.")}fe(t){this.de.sendEventData(On.DiagnosticEvent,t)}close(){clearInterval(this.li),this.xt&&clearInterval(this.xt),this.pe&&clearInterval(this.pe)}async flush(){var t;if(this.St)throw new tS("Events cannot be posted because a permanent error has been encountered. This is most likely an invalid SDK key. The specific error information is logged independently.");let e=this.at;if(this.at=[],nS(this.q))this.q.getSummaries().forEach(n=>{Object.keys(n.features).length&&e.push(n)});else{let n=this.q.getSummary();Object.keys(n.features).length&&e.push(n)}e.length&&(this.he=e.length,(t=this.t)==null||t.debug("Flushing %d events",e.length),await this.et(e))}sendEvent(t){var e;if(this.St)return;if(Qw(t)){if(Ui(t.samplingRatio)){let a=ye(ot({},t),{context:t.context?this.S.filter(t.context):void 0});a.samplingRatio===1&&delete a.samplingRatio,this.ot(a)}return}this.q.summarizeEvent(t);let n=Di(t),r=n&&t.trackEvents||!n,i=this.hi(t),o=jw(t),s=(e=this.st)==null?void 0:e.processContext(t.context);s||o||(this.bt+=1),s&&!o&&this.ot(this.Lt({kind:"index",creationDate:t.creationDate,context:t.context,samplingRatio:1},!1)),r&&Ui(t.samplingRatio)&&this.ot(this.Lt(t,!1)),i&&Ui(t.samplingRatio)&&this.ot(this.Lt(t,!0))}Lt(t,e){switch(t.kind){case"feature":{let n={kind:e?"debug":"feature",creationDate:t.creationDate,context:this.S.filter(t.context,!e),key:t.key,value:t.value,default:t.default};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.prereqOf&&(n.prereqOf=t.prereqOf),t.variation!==void 0&&(n.variation=t.variation),t.version!==void 0&&(n.version=t.version),t.reason&&(n.reason=t.reason),n}case"index":case"identify":{let n={kind:t.kind,creationDate:t.creationDate,context:this.S.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),n}case"custom":{let n={kind:"custom",creationDate:t.creationDate,key:t.key,context:this.S.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.data!==void 0&&(n.data=t.data),t.metricValue!==void 0&&(n.metricValue=t.metricValue),t.url!==void 0&&(n.url=t.url),n}case"click":return{kind:"click",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url,selector:t.selector};case"pageview":return{kind:"pageview",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url};default:return t}}ot(t){var e;this.at.length<this.ui?(this.at.push(t),this.kt=!1):(this.kt||(this.kt=!0,(e=this.t)==null||e.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),this.Dt+=1)}hi(t){return Di(t)&&t.debugEventsUntilDate&&t.debugEventsUntilDate>this.le&&t.debugEventsUntilDate>Date.now()}async et(t){let e=await this.de.sendEventData(On.AnalyticsEvents,t);if(e.status===qe.FailedAndMustShutDown&&(this.St=!0),e.serverTime&&(this.le=e.serverTime),e.error)throw e.error}},Up=class{constructor(t,e,n,r,i=1,o){this.context=t,this.key=e,this.data=n,this.metricValue=r,this.samplingRatio=i,this.url=o,this.kind="custom",this.creationDate=Date.now(),this.context=t}},Ma=class{constructor(t,e,n,r,i,o,s,a,c,l,u,h,p=1){this.withReasons=t,this.context=e,this.key=n,this.samplingRatio=p,this.kind="feature",this.creationDate=Date.now(),this.value=r,this.default=i,o!==void 0&&(this.version=o),s!==void 0&&(this.variation=s),a!==void 0&&(this.trackEvents=a),c!==void 0&&(this.prereqOf=c),l!==void 0&&(this.reason=l),u!==void 0&&(this.debugEventsUntilDate=u),h!==void 0&&(this.excludeFromSummaries=h)}},Pp=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},iS=class{close(){}async flush(){}sendEvent(){}},oS=class{constructor(t){this.Ct=t}evalEvent(t){var e;return new Ma(this.Ct,t.context,t.flagKey,t.value,t.defaultVal,t.version,(e=t.variation)!=null?e:void 0,t.trackEvents||t.addExperimentData,t.prereqOfFlagKey,this.Ct||t.addExperimentData?t.reason:void 0,t.debugEventsUntilDate,t.excludeFromSummaries,t.samplingRatio)}unknownFlagEvent(t,e,n){return new Ma(this.Ct,n,t,e,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}identifyEvent(t){return new Pp(t,1)}customEvent(t,e,n,r,i=1){return new Up(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},tp="FDv1Fallback";function sS(t){return{di:t,me:"",useSelector(e){return this.me=e,this},processFullTransfer(e){let n=[{event:"server-intent",data:{payloads:[{id:tp,target:1,intentCode:"xfer-full",reason:"payload-missing"}]}}];Object.entries((e==null?void 0:e.flags)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"flag",key:r,version:i.version||1,object:i}})}),Object.entries((e==null?void 0:e.segments)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"segment",key:r,version:i.version||1,object:i}})}),n.push({event:"payload-transferred",data:{state:this.me,version:1,id:tp}}),this.di.processEvents(n)}}}var de={type:"none"};function Mp(t,e){let n="inactive",r,i="partial",o=[];function s(g,w){var R;return(R=t[g])==null?void 0:R.call(t,w)}function a(){n="inactive",r=void 0,i="partial",o=[]}function c(){n="changes",i="partial",o=[]}function l(){o=[]}function u(g){return!g.id||!g.target?de:{type:"payload",payload:{id:g.id,version:g.target,type:"none",updates:[]}}}function h(g){var w;if(!((w=g.payloads)!=null&&w.length))return{type:"error",kind:"MISSING_PAYLOAD",message:"No payload present in server-intent"};let R=g.payloads[0];switch(R==null?void 0:R.intentCode){case"xfer-full":return n="full",o=[],i="full",r=R.id,de;case"xfer-changes":return n="changes",o=[],i="partial",r=R.id,de;case"none":return n="changes",o=[],i="partial",r=R.id,u(R);default:return e==null||e.warn(`Unable to process intent code '${R==null?void 0:R.intentCode}'.`),de}}function p(g){if(n==="inactive"||!r||!g.kind||!g.key||!g.version||!g.object)return de;let w=s(g.kind,g.object);return w?(o.push({kind:g.kind,key:g.key,version:g.version,object:w}),de):(e==null||e.warn(`Unable to process object for kind: '${g.kind}'`),de)}function f(g){return n==="inactive"||!r||!g.kind||!g.key||!g.version||o.push({kind:g.kind,key:g.key,version:g.version,deleted:!0}),de}function m(g){if(n==="inactive")return{type:"error",kind:"PROTOCOL_ERROR",message:"A payload transferred has been received without an intent having been established."};if(!r||g.state===null||g.state===void 0||!g.version)return a(),de;let w={type:"payload",payload:{id:r,version:g.version,state:g.state,type:i,updates:o}};return c(),w}function d(g){return e==null||e.info(`Goodbye was received from the LaunchDarkly connection with reason: ${g.reason}.`),a(),{type:"goodbye",reason:g.reason}}function v(g){return e==null||e.info(`An issue was encountered receiving updates for payload ${r} with reason: ${g.reason}.`),l(),{type:"serverError",id:g.payload_id,reason:g.reason}}return{get state(){return n},processEvent(g){switch(g.event){case"server-intent":return h(g.data);case"put-object":return p(g.data);case"delete-object":return f(g.data);case"payload-transferred":return m(g.data);case"goodbye":return d(g.data);case"error":return v(g.data);case"heart-beat":return de;default:return{type:"error",kind:"UNKNOWN_EVENT",message:`Received an unknown event of type '${g.event}'`}}},reset(){a()}}}function aS(t){return t==="MISSING_PAYLOAD"||t==="PROTOCOL_ERROR"}var Fp=class{constructor(t,e,n){this.m=e,this.t=n,this.n=[],this.fi=Mp(t,n)}addPayloadListener(t){this.n.push(t)}removePayloadListener(t){let e=this.n.indexOf(t,0);e>-1&&this.n.splice(e,1)}processEvents(t){t.forEach(e=>{var n,r;let i=this.fi.processEvent(e);switch(i.type){case"payload":this.n.forEach(o=>o(i.payload));break;case"error":aS(i.kind)?(n=this.m)==null||n.call(this,At.InvalidData,i.message):(r=this.t)==null||r.warn(i.message);break}})}},lS=class{constructor(t,e,n,r){this.m=n,this.t=r,this._(t,"server-intent"),this._(t,"put-object"),this._(t,"delete-object"),this._(t,"payload-transferred"),this._(t,"goodbye"),this._(t,"error"),this.Ot=new Fp(e,n,r)}addPayloadListener(t){this.Ot.addPayloadListener(t)}removePayloadListener(t){this.Ot.removePayloadListener(t)}_(t,e){t.addEventListener(e,async n=>{var r,i,o,s,a;if(n!=null&&n.data){(r=this.t)==null||r.debug(`Received ${e} event. Data is ${n.data}`);try{this.Ot.processEvents([{event:e,data:JSON.parse(n.data)}])}catch(c){(i=this.t)==null||i.error(`Stream received data that was unable to be processed in "${e}" message`),(o=this.t)==null||o.debug(`Data follows: ${n.data}`),(s=this.m)==null||s.call(this,At.InvalidData,"Malformed data in EventStream.")}}else(a=this.m)==null||a.call(this,At.Unknown,"Event from EventStream missing data.")})}};function cS(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var ep="unknown plugin";function Yi(t,e){try{return e.getMetadata().name||ep}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),ep}}function uS(t,e,n){let r=[];return n.forEach(i=>{var o;try{let s=(o=i.getHooks)==null?void 0:o.call(i,e);s===void 0?t.error(`Plugin ${Yi(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${Yi(t,i)}. Unable to get hooks.`)}}),r}function hS(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${Yi(t,i)}.`)}})}var fe=Object.freeze({__proto__:null,ClientMessages:Xp,DiagnosticsManager:Hw,ErrorKinds:zw,EventFactoryBase:oS,EventProcessor:rS,FDv1PayloadAdaptor:sS,InputCustomEvent:Up,InputEvalEvent:Ma,InputIdentifyEvent:Pp,NullEventProcessor:iS,PayloadProcessor:Fp,PayloadStreamReader:lS,canonicalize:Mi,createProtocolHandler:Mp,initMetadataFromHeaders:cS,isLegacyUser:Rp,isMultiKind:Ep,isSingleKind:Tp,safeGetHooks:uS,safeGetName:Yi,safeRegisterPlugins:hS,shouldSample:Ui}),pS={Initializing:"INITIALIZING",Valid:"VALID",Interrupted:"INTERRUPTED",SetOffline:"SET_OFFLINE",Closed:"CLOSED"};function dS(t){return t>=200&&t<=299}var np=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}};function rp(t,e,n,r,i,o,s,a,c,l){let u,h="GET",p=ot({},o);c&&(h="REPORT",p["content-type"]="application/json",u=t);let f=c?n.pathReport(i,t):n.pathGet(i,t),m=[...s!=null?s:[]];a&&m.push({key:"withReasons",value:"true"}),l&&m.push({key:"h",value:l});let d=Aw(e,f,m);return{async requestPayload(){let v;try{let g=await r.fetch(d,{method:h,headers:p,body:u});if(dS(g.status))return await g.text();v=g.status}catch(g){throw new np(g==null?void 0:g.message)}throw new np(`Unexpected status code: ${v}`,v)}}}var ip=new Error("Task has already been executed or shed. This is likely an implementation error. The task will not be executed again.");function fS(t,e,n=!1){let r,i=new Promise(a=>{r=(c,l)=>{var u;try{(u=t.after)==null||u.call(t,c,l)}catch(h){e==null||e.error(`Error in after callback: ${h}`)}a(c)}}),o=t.before?t.before():Promise.resolve(void 0),s=!1;return{execute:()=>{s&&(e==null||e.error(ip)),s=!0,o.then(a=>{t.execute(a).then(c=>r({status:"complete",result:c},a)).catch(c=>r({status:"error",error:c},a))}).catch(a=>{e==null||e.error(a),r({status:"error",error:a},void 0)})},shed:()=>{s&&(e==null||e.error(ip)),s=!0,o.then(a=>{r({status:"shed"},a)})},promise:i,sheddable:n}}function mS(t){let e,n=[];function r(){if(!e&&n.length>0){let i=n.shift();e=i.promise.finally(()=>{e=void 0,r()}),i.execute()}}return{execute(i,o=!1){var s,a;let c=fS(i,t,o);return e?((s=n[n.length-1])!=null&&s.sheddable&&((a=n.pop())==null||a.shed()),n.push(c)):(e=c.promise.finally(()=>{e=void 0,r()}),c.execute()),c.promise},pendingCount(){return n.length}}}function Ap(t){return"validate"in t}function Jp(t,e,n,r,i){let o=ot({},n);return _h(t)?o:x.Object.is(t)?(Object.entries(t).forEach(([s,a])=>{let c=e[s],l=i?`${i}.${s}`:s;if(!c){r==null||r.warn(oe.unknownOption(l));return}if(_h(a))return;if(Ap(c)){let h=c.validate(a,l,r,n[s]);h!==void 0&&(o[s]=h.value);return}if(c.is(a)){o[s]=a;return}let u=c.getType();u==="boolean"?(r==null||r.warn(oe.wrongOptionTypeBoolean(l,typeof a)),o[s]=!!a):u==="boolean | undefined | null"?(r==null||r.warn(oe.wrongOptionTypeBoolean(l,typeof a)),typeof a!="boolean"&&typeof a!="undefined"&&a!==null&&(o[s]=!!a)):c instanceof Sp&&x.Number.is(a)?(r==null||r.warn(oe.optionBelowMinimum(l,a,c.min)),o[s]=c.min):r==null||r.warn(oe.wrongOptionType(l,u,typeof a))}),o):(r==null||r.warn(oe.wrongOptionType(i!=null?i:"config","object",typeof t)),o)}function _i(t,e){return{is:n=>x.Object.is(n),getType:()=>"object",validate(n,r,i,o){if(!x.Object.is(n)){i==null||i.warn(oe.wrongOptionType(r,"object",typeof n));return}let s=e!=null?e:x.Object.is(o)?o:{},a=Jp(n,t,s,i,r);return Object.keys(a).length>0?{value:a}:void 0}}}function yS(...t){return{is:e=>t.some(n=>n.is(e)),getType:()=>t.map(e=>e.getType()).join(" | "),validate(e,n,r,i){let o=t.find(s=>s.is(e));if(o)return Ap(o)?o.validate(e,n,r,i):{value:e};r==null||r.warn(oe.wrongOptionType(n,this.getType(),typeof e))}}}var l9=x.oneOf("cache","polling","streaming"),op=x.oneOf("streaming","polling","offline","one-shot","background"),Dp={pollingBaseUri:x.String,streamingBaseUri:x.String};x.numberWithMin(30),_i(Dp);x.numberWithMin(1),_i(Dp);var gS={lifecycle:x.Boolean,network:x.Boolean},bS={initialConnectionMode:op,backgroundConnectionMode:op,automaticModeSwitching:yS(x.Boolean,_i(gS))},vS={initialConnectionMode:"one-shot",backgroundConnectionMode:void 0,automaticModeSwitching:!1};function wS(t){return{logger:x.Object,maxCachedContexts:x.numberWithMin(0),baseUri:x.String,streamUri:x.String,eventsUri:x.String,capacity:x.numberWithMin(1),diagnosticRecordingInterval:x.numberWithMin(2),flushInterval:x.numberWithMin(2),streamInitialReconnectDelay:x.numberWithMin(0),allAttributesPrivate:x.Boolean,debug:x.Boolean,diagnosticOptOut:x.Boolean,withReasons:x.Boolean,sendEvents:x.Boolean,pollInterval:x.numberWithMin(30),useReport:x.Boolean,privateAttributes:x.StringArray,disableCache:x.Boolean,applicationInfo:x.Object,wrapperName:x.String,wrapperVersion:x.String,payloadFilterKey:x.stringMatchingRegex(/^[a-zA-Z0-9](\w|\.|-)*$/),hooks:x.createTypeArray("Hook[]",{}),inspectors:x.createTypeArray("LDInspection",{}),cleanOldPersistentData:x.Boolean,dataSystem:t!=null&&t.dataSystemDefaults?_i(bS,t.dataSystemDefaults):x.Object}}var SS=300,Yp="https://clientsdk.launchdarkly.com",Kp="https://clientstream.launchdarkly.com";function IS(t){return t instanceof Zp?t:kp(t)}var TS=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=kp(),this.baseUri=Yp,this.eventsUri=Ji.DEFAULT_EVENTS,this.streamUri=Kp,this.maxCachedContexts=5,this.disableCache=!1,this.capacity=100,this.diagnosticRecordingInterval=900,this.flushInterval=30,this.streamInitialReconnectDelay=1,this.allAttributesPrivate=!1,this.debug=!1,this.diagnosticOptOut=!1,this.sendEvents=!0,this.sendLDHeaders=!0,this.useReport=!1,this.withReasons=!1,this.privateAttributes=[],this.pollInterval=SS,this.hooks=[],this.inspectors=[],this.logger=IS(t.logger);let o=wS({dataSystemDefaults:e.dataSystemDefaults}),s=Jp(t,o,{},this.logger);Object.entries(s).forEach(([a,c])=>{a!=="logger"&&(this[a]=c)}),this.serviceEndpoints=new Ji(this.streamUri,this.baseUri,this.eventsUri,e.analyticsEventPath,e.diagnosticEventPath,e.includeAuthorizationHeader,t.payloadFilterKey),this.useReport=(n=t.useReport)!=null?n:!1,this.tags=new Pw({application:this.applicationInfo,logger:this.logger}),this.userAgentHeaderName=(r=e.userAgentHeaderName)!=null?r:"user-agent",this.trackEventModifier=(i=e.trackEventModifier)!=null?i:(a=>a),this.credentialType=e.credentialType,this.getImplementationHooks=e.getImplementationHooks}};async function Ya(t,e){if(t.digest)return t.digest(e);if(t.asyncDigest)return t.asyncDigest(e);throw new Error("Platform must implement digest or asyncDigest")}var _p=async(t,{crypto:e,storage:n})=>{let r=await(n==null?void 0:n.get(t));return r||(r=e.randomUUID(),await(n==null?void 0:n.set(t,r))),r};function Hp(t){return async e=>Ya(t.createHash("sha256").update(e),"base64")}var me=async t=>t;async function gr(t){return(await Promise.all(t.map(e=>e.transform(e.value)))).join("_")}async function ES(t,e){return gr([{value:"LaunchDarkly",transform:me},{value:e,transform:Hp(t)}])}async function RS(t){return gr([{value:"LaunchDarkly",transform:me},{value:"AnonymousKeys",transform:me},{value:t,transform:me}])}async function CS(t){return gr([{value:"LaunchDarkly",transform:me},{value:"ContextKeys",transform:me},{value:t,transform:me}])}async function ZS(t){return gr([{value:t,transform:me},{value:"ContextIndex",transform:me}])}async function zp(t,e,n){return gr([{value:e,transform:me},{value:n.canonicalKey,transform:Hp(t)}])}var{isLegacyUser:kS,isSingleKind:xa,isMultiKind:sp}=fe,Bp="1.0",VS=t=>{let e=t,{kind:n}=e,r=bp(e,["kind"]);return{kind:"multi",[n]:r}},xS=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=Da(i))!=null?r:{},s=(n==null?void 0:n.id)||(o==null?void 0:o.id);if(s){let a=(n==null?void 0:n.version)||(o==null?void 0:o.version),c=(n==null?void 0:n.name)||(o==null?void 0:o.name),l=(n==null?void 0:n.versionName)||(o==null?void 0:o.versionName);return o=ot(ot(ot(ye(ot({},o),{id:s}),a?{version:a}:{}),c?{name:c}:{}),l?{versionName:l}:{}),o.key=await Ya(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||Bp,o}},NS=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=Da(o))!=null?e:{},c=(s==null?void 0:s.name)||((n=a.os)==null?void 0:n.name),l=(s==null?void 0:s.version)||((r=a.os)==null?void 0:r.version),u=(i=a.os)==null?void 0:i.family;if((c||l||u)&&(a.os=ot(ot(ot({},c?{name:c}:{}),l?{version:l}:{}),u?{family:u}:{})),Object.keys(a).filter(h=>h!=="key"&&h!=="envAttributesVersion").length){let h=await CS("ld_device");return a.key=await _p(h,t),a.envAttributesVersion=a.envAttributesVersion||Bp,a}},OS=async(t,e,n)=>{if(kS(t))return t;let r,i;if(xa(t)&&t.kind!=="ld_application"||sp(t)&&!t.ld_application?r=await xS(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),xa(t)&&t.kind!=="ld_device"||sp(t)&&!t.ld_device?i=await NS(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=xa(t)?VS(t):t;return ot(ot(ot({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function GS(){let t,e;return{set(n,r){t=n,e=r},getContext(){return e},getUnwrappedContext(){return t},newIdentificationPromise(){let n,r;return{identifyPromise:new Promise((i,o)=>{n=i,r=o}),identifyResolve:n,identifyReject:r}},hasContext(){return e!==void 0},hasValidContext(){return this.hasContext()&&e.valid}}}var{isLegacyUser:LS,isMultiKind:XS,isSingleKind:WS}=fe,Ka=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await RS(t);e.key=await _p(o,n)}},US=async(t,e)=>{await Ka(t.kind,t,e)},PS=async(t,e)=>{let n=t,{kind:r}=n,i=bp(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Ka(o,s,e)))},MS=async(t,e)=>{await Ka("user",t,e)},FS=async(t,e)=>{let n=Op(t);return WS(n)&&await US(n,e),XS(n)&&await PS(n,e),LS(n)&&await MS(n,e),n},AS=t=>({customBaseURI:t.serviceEndpoints.polling!==Yp,customStreamURI:t.serviceEndpoints.streaming!==Kp,customEventsURI:t.serviceEndpoints.events!==Ji.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:Va(t.flushInterval),reconnectTimeMillis:Va(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:Va(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),JS=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new fe.DiagnosticsManager(t,n,AS(e))};function ap(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function lp(t,e,n){return ot({value:t,variationIndex:e!=null?e:null},n!==void 0&&{reason:n})}var DS=(t,e,n,r,i)=>{if(e.sendEvents)return new fe.EventProcessor(ye(ot({},e),{eventsCapacity:e.capacity}),new Mw(t,e,n),r,void 0,i,!1,!0)},cp=class extends fe.EventFactoryBase{evalEventClient(t,e,n,r,i,o){let{trackEvents:s,debugEventsUntilDate:a,trackReason:c,flagVersion:l,version:u,variation:h}=r;return super.evalEvent({addExperimentData:c,context:i,debugEventsUntilDate:a,defaultVal:n,flagKey:t,reason:o,trackEvents:!!s,value:e,variation:h,version:l!=null?l:u})}},up="_freshness";async function YS(t,e){let n=e.canonicalUnfilteredJson();if(n)return Ya(t.createHash("sha256").update(n),"base64")}function KS(t){return t!==null&&typeof t=="object"&&typeof t.version=="number"}async function _S(t,e,n,r,i){let o=await zp(e,n,r),s=await t.get(o),a=!1;if(s==null){if(s=await t.get(r.canonicalKey),s==null)return;a=!0}try{let c=JSON.parse(s);if(c===null||typeof c!="object"){i==null||i.warn("Cached flag data is not a valid object");return}let l=Object.entries(c),u=l.find(([,h])=>!KS(h));if(u){i==null||i.warn(`Discarding cached flags due to invalid entry: ${u[0]}`);return}return{flags:l.reduce((h,[p,f])=>(h[p]=f,h),{}),storageKey:o,fromLegacyKey:a}}catch(c){i==null||i.warn(`Could not parse cached flag evaluations from persistent storage: ${c.message}`);return}}var Na=class jp{constructor(){this.container={index:new Array}}static fromJson(e){let n=new jp;try{n.container=JSON.parse(e)}catch(r){}return n}toJson(){return JSON.stringify(this.container)}notice(e,n){let r=this.container.index.find(i=>i.id===e);r===void 0?this.container.index.push({id:e,timestamp:n}):r.timestamp=n}prune(e){let n=Math.max(e,0);return this.container.index.length>n?(this.container.index.sort((r,i)=>r.timestamp-i.timestamp),this.container.index.splice(0,this.container.index.length-n)):[]}},HS=class{constructor(t,e,n,r,i,o,s,a=()=>Date.now()){this.a=t,this.At=e,this.ct=n,this.ge=r,this.I=i,this.w=o,this.t=s,this.pi=a,this.ye=ZS(this.At)}async init(t,e){this.w.init(t,e),await this.ve(t)}async upsert(t,e,n){return this.w.upsert(t,e,n)?(await this.ve(t),!0):!1}async loadCached(t){if(this.ge||this.ct<=0||!this.a.storage)return!1;let e=await _S(this.a.storage,this.a.crypto,this.At,t,this.t);if(!e)return!1;e.fromLegacyKey&&(await this.a.storage.set(e.storageKey,JSON.stringify(e.flags)),await this.a.storage.clear(t.canonicalKey));let n=Object.entries(e.flags).reduce((r,[i,o])=>(r[i]={version:o.version,flag:o},r),{});return this.w.initCached(t,n),this.t.debug("Loaded cached flag evaluations from persistent storage"),!0}async mi(t,e,n){var r;let i=await YS(this.a.crypto,e);if(i===void 0){this.t.error("Could not serialize context for freshness tracking");return}let o={timestamp:n,contextHash:i};await((r=this.a.storage)==null?void 0:r.set(`${t}${up}`,JSON.stringify(o)))}async gi(){var t;if(this.B!==void 0)return this.B;let e=await((t=this.a.storage)==null?void 0:t.get(await this.ye));if(!e)return this.B=new Na,this.B;try{this.B=Na.fromJson(e),this.t.debug("Loaded context index from persistent storage")}catch(n){this.t.warn(`Could not load index from persistent storage: ${n.message}`),this.B=new Na}return this.B}async ve(t){var e,n;if(this.ge)return;let r=this.pi(),i=await this.gi(),o=await zp(this.a.crypto,this.At,t);this.ct>0&&i.notice(o,r);let s=i.prune(this.ct),a=this.ct<=0||s.some(h=>h.id===o);if(await Promise.all(s.flatMap(h=>{var p,f;return[(p=this.a.storage)==null?void 0:p.clear(h.id),(f=this.a.storage)==null?void 0:f.clear(`${h.id}${up}`)]})),await((e=this.a.storage)==null?void 0:e.set(await this.ye,i.toJson())),a)return;let c=this.I.getAll(),l=Object.entries(c).reduce((h,[p,f])=>(f.flag!==null&&f.flag!==void 0&&(h[p]=f.flag),h),{}),u=JSON.stringify(l);await((n=this.a.storage)==null?void 0:n.set(o,u));try{await this.mi(o,t,r)}catch(h){this.t.warn(`Failed to store freshness data: ${h.message}`)}}};function zS(){let t={};return{init(e){t=Object.entries(e).reduce((n,[r,i])=>(n[r]=i,n),{})},insertOrUpdate(e,n){t[e]=n},get(e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},getAll(){return t}}}function BS(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!Wi(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function jS(t,e){let n=t,r=e,i,o=new Array;return{handleFlagChanges(s,a){i?o.forEach(c=>{try{c(i,s,a)}catch(l){}}):r.warn("Received a change event without an active context. Changes will not be propagated.")},init(s,a){i=s;let c=n.getAll();n.init(a);let l=BS(c,a);l.length>0&&this.handleFlagChanges(l,"init")},initCached(s,a){(i==null?void 0:i.canonicalKey)!==s.canonicalKey&&this.init(s,a)},upsert(s,a,c){if((i==null?void 0:i.canonicalKey)!==s.canonicalKey)return r.warn("Received an update for an inactive context."),!1;let l=n.get(a);return l!==void 0&&l.version>=c.version?!1:(n.insertOrUpdate(a,c),this.handleFlagChanges([a],"patch"),!0)},on(s){o.push(s)},off(s){let a=o.indexOf(s);a>-1&&o.splice(a,1)}}}var QS=class{constructor(t,e,n,r,i,o=()=>Date.now()){this.I=zS(),this.w=jS(this.I,i),this.Tt=this.yi(t,e,n,r,i,o)}async yi(t,e,n,r,i,o=()=>Date.now()){let s=await ES(t.crypto,e);return new HS(t,s,n,r,this.I,this.w,i,o)}get(t){return this.r&&Object.prototype.hasOwnProperty.call(this.r,t)?this.It(this.r[t]):this.I.get(t)}getAll(){return this.r?ot(ot({},this.I.getAll()),Object.entries(this.r).reduce((t,[e,n])=>(t[e]=this.It(n),t),{})):this.I.getAll()}presetFlags(t){this.I.init(t)}setBootstrap(t,e){this.w.init(t,e)}async init(t,e){return(await this.Tt).init(t,e)}async upsert(t,e,n){return(await this.Tt).upsert(t,e,n)}async loadCached(t){return(await this.Tt).loadCached(t)}on(t){this.w.on(t)}off(t){this.w.off(t)}It(t){return{flag:{value:t,version:0},version:0}}setOverride(t,e){this.r||(this.r={}),this.r[t]=e,this.w.handleFlagChanges([t],"override")}removeOverride(t){!this.r||!Object.prototype.hasOwnProperty.call(this.r,t)||(delete this.r[t],Object.keys(this.r).length===0&&(this.r=void 0),this.w.handleFlagChanges([t],"override"))}clearAllOverrides(){if(this.r){let t=ot({},this.r);this.r=void 0,this.w.handleFlagChanges(Object.keys(t),"override")}}getAllOverrides(){if(!this.r)return{};let t={};return Object.entries(this.r).forEach(([e,n])=>{t[e]=this.It(n)}),t}getDebugOverride(){return{setOverride:this.setOverride.bind(this),removeOverride:this.removeOverride.bind(this),clearAllOverrides:this.clearAllOverrides.bind(this),getAllOverrides:this.getAllOverrides.bind(this)}}},hp="unknown hook",Qp="beforeEvaluation",$p="afterEvaluation",$S="afterTrack";function br(t,e,n,r,i){try{return r()}catch(o){return t==null||t.error(`An error was encountered in "${e}" of the "${n}" hook: ${o}`),i}}function vr(t,e){try{return e.getMetadata().name||hp}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),hp}}function qS(t,e,n){return e.map(r=>br(t,Qp,vr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeEvaluation)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function tI(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,$p,vr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterEvaluation)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function eI(t,e,n){return e.map(r=>br(t,Qp,vr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeIdentify)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function nI(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,$p,vr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterIdentify)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function rI(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];br(t,$S,vr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var iI=class{constructor(t,e){this.t=t,this.$=[],this.$.push(...e)}withEvaluation(t,e,n,r){if(this.$.length===0)return r();let i=[...this.$],o={flagKey:t,context:e,defaultValue:n},s=qS(this.t,i,o),a=r();return tI(this.t,i,o,s,a),a}identify(t,e){let n=[...this.$],r={context:t,timeout:e},i=eI(this.t,n,r);return o=>{nI(this.t,n,r,i,o)}}addHook(t){this.$.push(t)}afterTrack(t){if(this.$.length===0)return;let e=[...this.$];rI(this.t,e,t)}};function oI(t){return{getMetadata(){return{name:"LaunchDarkly-Inspector-Adapter"}},afterEvaluation:(e,n,r)=>(t.onFlagUsed(e.flagKey,r,e.context),n),afterIdentify(e,n,r){return t.onIdentityChanged(e.context),n}}}function sI(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function aI(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function lI(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn(aI(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var qp="flag-used",td="flag-details-changed",ed="flag-detail-changed",nd="client-identity-changed",cI=[qp,td,ed,nd];function uI(t,e){let n=cI.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(sI(t.type,t.name)),n}var hI=class{constructor(t,e){this.H=[];let n=t.filter(r=>uI(r,e));this.H=n.map(r=>lI(r,e))}hasInspectors(){return this.H.length!==0}onFlagUsed(t,e,n){this.H.forEach(r=>{r.type===qp&&r.method(t,e,n)})}onFlagsChanged(t){this.H.forEach(e=>{e.type===td&&e.method(t)})}onFlagChanged(t,e){this.H.forEach(n=>{n.type===ed&&n.method(t,e)})}onIdentityChanged(t){this.H.forEach(e=>{e.type===nd&&e.method(t)})}},pI=class{constructor(t){this.t=t,this.n=new Map}on(t,e){var n,r;if(typeof t!="string"){(n=this.t)==null||n.warn("Only string event names are supported.");return}this.n.has(t)?(r=this.n.get(t))==null||r.push(e):this.n.set(t,[e])}off(t,e){let n=this.n.get(t);if(n){if(e){let r=n.filter(i=>i!==e);r.length===0?this.n.delete(t):this.n.set(t,r);return}this.n.delete(t)}}vi(t,e,...n){var r;try{t(...n)}catch(i){(r=this.t)==null||r.error(`Encountered error invoking handler for "${e}", detail: "${i}"`)}}emit(t,...e){let n=this.n.get(t);n==null||n.forEach(r=>this.vi(r,t,...e))}eventNames(){return[...this.n.keys()]}listenerCount(t){var e,n;return(n=(e=this.n.get(t))==null?void 0:e.length)!=null?n:0}};function dI(t,e,n){let r=e.info.sdkData(),i;n.applicationInfo&&(n.applicationInfo.id&&(i=i!=null?i:{},i.id=n.applicationInfo.id),n.applicationInfo.version&&(i=i!=null?i:{},i.version=n.applicationInfo.version),n.applicationInfo.name&&(i=i!=null?i:{},i.name=n.applicationInfo.name),n.applicationInfo.versionName&&(i=i!=null?i:{},i.versionName=n.applicationInfo.versionName));let o={name:r.userAgentBase,version:r.version};r.wrapperName&&(o.wrapperName=r.wrapperName),r.wrapperVersion&&(o.wrapperVersion=r.wrapperVersion);let s={sdk:o,[n.credentialType]:t};return i&&(s.application=i),s}var{ClientMessages:pp,ErrorKinds:dp}=fe,fI=5,mI=class{constructor(t,e,n,r,i,o){var s;if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.u=GS(),this.Pt=15,this.P=new cp(!1),this.ut=new cp(!0),this.Nt=!1,this.wi=mS(),!t)throw new Error("You must configure the client with a client-side SDK key");if(!n.encoding)throw new Error("Platform must implement Encoding because btoa is required.");this.e=new TS(r,o),this.logger=this.e.logger,this.we=_w(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.R=new QS(this.platform,t,this.e.maxCachedContexts,(s=this.e.disableCache)!=null?s:!1,this.e.logger),this.x=JS(t,this.e,n),this.E=DS(t,this.e,n,this.we,this.x),this.emitter=new pI,this.emitter.on("error",(c,l)=>{this.logger.error(`error: ${l}, context: ${JSON.stringify(c)}`)}),this.R.on((c,l,u)=>{this.Ei(l,u);let h=xn.toLDContext(c);this.emitter.emit("change",h,l),l.forEach(p=>{this.emitter.emit(`change:${p}`,h)})}),this.dataManager=i(this.R,this.e,this.we,this.emitter,this.x);let a=[...this.e.hooks];if(this.environmentMetadata=dI(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(c=>{a.push(c)}),this.M=new iI(this.logger,a),this.Y=new hI(this.e.inspectors,this.logger),this.Y.hasInspectors()&&this.M.addHook(oI(this.Y)),r.cleanOldPersistentData&&o!=null&&o.getLegacyStorageKeys&&this.platform.storage)try{this.logger.debug("Cleaning old persistent data."),Promise.all(o.getLegacyStorageKeys().map(c=>{var l;return(l=this.platform.storage)==null?void 0:l.clear(c)})).catch(c=>{this.logger.error(`Error cleaning old persistent data: ${c}`)}).finally(()=>{this.logger.debug("Cleaned old persistent data.")})}catch(c){this.logger.error(`Error cleaning old persistent data: ${c}`)}}allFlags(){return Object.entries(this.R.getAll()).reduce((t,[e,n])=>(n.flag!==null&&n.flag!==void 0&&!n.flag.deleted&&(t[e]=n.flag.value),t),{})}async close(){var t;await this.flush(),(t=this.E)==null||t.close(),this.dataManager.close(),this.logger.debug("Closed event processor and data source.")}async flush(){var t;try{await((t=this.E)==null?void 0:t.flush()),this.logger.debug("Successfully flushed event processor.")}catch(e){return this.logger.error(`Error flushing event processor: ${e}.`),{error:e,result:!1}}return{result:!0}}getContext(){return this.u.hasContext()?Op(this.u.getUnwrappedContext()):void 0}getInternalContext(){return this.u.getContext()}presetFlags(t){this.R.presetFlags(t)}async identify(t,e){let n=await this.identifyResult(t,e);if(n.status==="error")throw n.error;if(n.status==="timeout"){let r=new Np(`identify timed out after ${n.timeout} seconds.`);throw this.logger.error(r.message),r}}async identifyResult(t,e){var n,r;let i=(n=e==null?void 0:e.timeout)!=null?n:fI,o=(e==null?void 0:e.timeout)===void 0&&(e==null?void 0:e.noTimeout)===!0;i>this.Pt&&this.logger.warn(`The identify function was called with a timeout greater than ${this.Pt} seconds. We recommend a timeout of less than ${this.Pt} seconds.`);let s=this.wi.execute({before:async()=>{let c=await FS(t,this.platform);this.autoEnvAttributes===Ai.Enabled&&(c=await OS(c,this.platform,this.e));let l=xn.fromLDContext(c);if(l.valid){let u=this.M.identify(c,e==null?void 0:e.timeout);return{context:c,checkedContext:l,afterIdentify:u}}return{context:c,checkedContext:l}},execute:async c=>{var l;let{context:u,checkedContext:h}=c;if(!h.valid){let d=new Error("Context was unspecified or had no key");return this.emitter.emit("error",u,d),Promise.reject(d)}this.u.set(u,h),(l=this.E)==null||l.sendEvent(this.P.identifyEvent(h));let{identifyPromise:p,identifyResolve:f,identifyReject:m}=this.u.newIdentificationPromise();return this.logger.debug(`Identifying ${JSON.stringify(h)}`),await this.dataManager.identify(f,m,h,e),p},after:async(c,l)=>{var u,h,p;c.status==="complete"?(u=l==null?void 0:l.afterIdentify)==null||u.call(l,{status:"completed"}):c.status==="shed"?(h=l==null?void 0:l.afterIdentify)==null||h.call(l,{status:"shed"}):c.status==="error"&&((p=l==null?void 0:l.afterIdentify)==null||p.call(l,{status:"error"}))}},(r=e==null?void 0:e.sheddable)!=null?r:!1).then(c=>{if(c.status==="error"){let u={status:"error",error:c.error};return this.maybeSetInitializationResult({status:"failed",error:c.error}),u}if(c.status==="shed")return{status:"shed"};let l={status:"completed"};return this.maybeSetInitializationResult({status:"complete"}),l});if(o)return s;let a=new Promise(c=>{setTimeout(()=>{c({status:"timeout",timeout:i})},i*1e3)});return Promise.race([s,a])}maybeSetInitializationResult(t){this.initializeResult===void 0&&(this.initializeResult=t,this.emitter.emit("ready"),t.status==="complete"&&this.emitter.emit("initialized"),this.initResolve&&(this.initResolve(t),this.initResolve=void 0))}waitForInitialization(t){var e;let n=(e=t==null?void 0:t.timeout)!=null?e:5;return this.initializeResult?Promise.resolve(this.initializeResult):this.initializedPromise?this.promiseWithTimeout(this.initializedPromise,n):(this.initializedPromise||(this.initializedPromise=new Promise(r=>{this.initResolve=r})),this.promiseWithTimeout(this.initializedPromise,n))}promiseWithTimeout(t,e){let n=Yw(e,"waitForInitialization");return Promise.race([t.then(r=>(n.cancel(),r)),n.promise.then(()=>({status:"complete"})).catch(()=>({status:"timeout"}))]).catch(r=>{var i;return(i=this.logger)==null||i.error(r.message),{status:"failed",error:r}})}on(t,e){this.emitter.on(t,e)}off(t,e){this.emitter.off(t,e)}track(t,e,n){var r,i;if(!this.u.hasValidContext()){this.logger.warn(pp.MissingContextKeyNoEvent);return}n!==void 0&&!x.Number.is(n)&&((r=this.logger)==null||r.warn(pp.invalidMetricValue(typeof n))),(i=this.E)==null||i.sendEvent(this.e.trackEventModifier(this.P.customEvent(t,this.u.getContext(),e,n))),this.M.afterTrack({key:t,context:this.u.getUnwrappedContext(),data:e,metricValue:n})}lt(t,e,n,r){var i,o,s,a,c;let l=this.u.hasContext();l||(i=this.logger)==null||i.warn("Flag evaluation called before client is fully initialized, data from this evaulation could be stale.");let u=this.u.getContext(),h=this.R.get(t);if(h===void 0||h.flag.deleted){let g=e!=null?e:null;return(o=this.logger)==null||o.warn(`Unknown feature flag "${t}"; returning default value ${g}.`),l&&((s=this.E)==null||s.sendEvent(this.P.unknownFlagEvent(t,g,u))),ap(dp.FlagNotFound,e)}let{reason:p,value:f,variation:m,prerequisites:d}=h.flag;if(r){let[g,w]=r(f);if(!g){l&&((a=this.E)==null||a.sendEvent(n.evalEventClient(t,e,e,h.flag,u,p)));let R=new Jw(`Wrong type "${w}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.u.getUnwrappedContext(),R),ap(dp.WrongType,e)}}let v=lp(f,m,p);return f==null&&(this.logger.debug("Result value is null. Providing default value."),v.value=e),d==null||d.forEach(g=>{this.lt(g,void 0,this.P)}),l&&((c=this.E)==null||c.sendEvent(n.evalEventClient(t,f,e,h.flag,u,p))),v}variation(t,e){let{value:n}=this.M.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.lt(t,e,this.P));return n}variationDetail(t,e){return this.M.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.lt(t,e,this.ut))}z(t,e,n,r){return this.M.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.lt(t,e,n,r))}boolVariation(t,e){return this.z(t,e,this.P,n=>[x.Boolean.is(n),x.Boolean.getType()]).value}jsonVariation(t,e){return this.variation(t,e)}numberVariation(t,e){return this.z(t,e,this.P,n=>[x.Number.is(n),x.Number.getType()]).value}stringVariation(t,e){return this.z(t,e,this.P,n=>[x.String.is(n),x.String.getType()]).value}boolVariationDetail(t,e){return this.z(t,e,this.ut,n=>[x.Boolean.is(n),x.Boolean.getType()])}numberVariationDetail(t,e){return this.z(t,e,this.ut,n=>[x.Number.is(n),x.Number.getType()])}stringVariationDetail(t,e){return this.z(t,e,this.ut,n=>[x.String.is(n),x.String.getType()])}jsonVariationDetail(t,e){return this.variationDetail(t,e)}addHook(t){this.M.addHook(t)}setEventSendingEnabled(t,e){var n,r,i,o;this.Nt!==t&&(this.Nt=t,t?(this.logger.debug("Starting event processor"),(n=this.E)==null||n.start()):e?((r=this.logger)==null||r.debug("Flushing event processor before disabling."),this.flush().then(()=>{var s,a;this.Nt||((s=this.logger)==null||s.debug("Stopping event processor."),(a=this.E)==null||a.close())})):((i=this.logger)==null||i.debug("Stopping event processor."),(o=this.E)==null||o.close()))}sendEvent(t){var e;(e=this.E)==null||e.sendEvent(t)}getDebugOverrides(){var t,e;return(e=(t=this.R).getDebugOverride)==null?void 0:e.call(t)}Ei(t,e){if(!this.Y.hasInspectors())return;let n={};t.forEach(r=>{let i=this.R.get(r);if(i!=null&&i.flag&&!i.flag.deleted){let{reason:o,value:s,variation:a}=i.flag;n[r]=lp(s,a,o)}else n[r]={value:void 0,variationIndex:null}}),e==="init"?this.Y.onFlagsChanged(n):e==="patch"&&Object.entries(n).forEach(([r,i])=>{this.Y.onFlagChanged(r,i)})}};function yI(t,e,n){n.forEach(r=>{var i;try{(i=r.registerDebug)==null||i.call(r,e)}catch(o){t.error(`Exception thrown registering plugin ${fe.safeGetName(t,r)}.`)}})}function rd(t,e){let n=Object.keys(e),r="$flagsState",i="$valid",o=e[r];!o&&n.length&&t.warn("LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."),e[i]===!1&&t.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");let s={};return n.forEach(a=>{if(a!==r&&a!==i){let c;o&&o[a]?c=ot({value:e[a]},o[a]):c={value:e[a],version:0},s[a]={version:c.version,flag:c}}}),s}function gI(t){return{polling:()=>({pathGet(e,n){return`/sdk/evalx/${t}/contexts/${qh(n,e)}`},pathReport(e,n){return`/sdk/evalx/${t}/context`},pathPost(e,n){throw new Error("Post for FDv1 unsupported.")},pathPing(e,n){throw new Error("Ping for polling unsupported.")}}),streaming:()=>({pathGet(e,n){return`/eval/${t}/${qh(n,e)}`},pathReport(e,n){return`/eval/${t}`},pathPost(e,n){throw new Error("Post for FDv1 unsupported.")},pathPing(e,n){return`/ping/${t}`}})}}function bI(t,e,n){return{async handlePut(r,i){n.debug(`Got PUT: ${Object.keys(i)}`);let o=Object.entries(i).reduce((s,[a,c])=>(s[a]={version:c.version,flag:c},s),{});await t.init(r,o),e.requestStateUpdate("VALID")},async handlePatch(r,i){n.debug(`Got PATCH ${JSON.stringify(i,null,2)}`),t.upsert(r,i.key,{version:i.version,flag:i})},async handleDelete(r,i){n.debug(`Got DELETE ${JSON.stringify(i,null,2)}`),t.upsert(r,i.key,{version:i.version,flag:ye(ot({},i),{deleted:!0,flagVersion:0,value:void 0,variation:0,trackEvents:!1})})},handleStreamingError(r){e.reportError(r.kind,r.message,r.code,r.recoverable)},handlePollingError(r){e.reportError(r.kind,r.message,r.status,r.recoverable)}}}function vI(t,e=()=>Date.now()){let n="CLOSED",r=e(),i;function o(){return{state:n,stateSince:r,lastError:i}}function s(a,c=!1){let l=a==="INTERRUPTED"&&n==="INITIALIZING"?"INITIALIZING":a,u=n!==l;u&&(n=l,r=e()),(u||c)&&t.emit("dataSourceStatus",o())}return{get status(){return o()},requestStateUpdate(a){s(a)},reportError(a,c,l,u=!1){i={kind:a,message:c,statusCode:l,time:e()},s(u?"INTERRUPTED":"CLOSED",!0)}}}function fp(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var wI=class{constructor(t,e,n,r,i){this.Di=t,this.bi=e,this.ki=n,this.m=r,this.t=i,this.h=!1}async Ee(){var t,e,n,r,i,o,s;if(this.h)return;let a=h=>{var p,f,m;(p=this.t)==null||p.error("Polling received invalid data"),(f=this.t)==null||f.debug(`Invalid JSON follows: ${h}`),(m=this.m)==null||m.call(this,new Fi(At.InvalidData,"Malformed JSON data in polling response"))};(t=this.t)==null||t.debug("Polling LaunchDarkly for feature flag updates");let c=Date.now();try{let h=await this.Di.requestPayload();try{if(this.h){fp(this.t);return}let p=JSON.parse(h);try{(e=this.ki)==null||e.call(this,p)}catch(f){(n=this.t)==null||n.error(`Exception from data handler: ${f}`)}}catch(p){a(h)}}catch(h){if(this.h){fp(this.t);return}let p=h;if(p.status!==void 0&&!Ki(p.status)){(r=this.t)==null||r.error(Gn(h,"polling request")),(i=this.m)==null||i.call(this,new Fi(At.ErrorResponse,p.message,p.status));return}(o=this.t)==null||o.error(Gn(h,"polling request","will retry"))}let l=Date.now()-c,u=Math.max(this.bi*1e3-l,0);(s=this.t)==null||s.debug("Elapsed: %d ms, sleeping for %d ms",l,u),this.$t=setTimeout(()=>{this.Ee()},u)}start(){this.Ee()}stop(){this.$t&&(clearTimeout(this.$t),this.$t=void 0),this.h=!0}close(){this.stop()}},SI=(t,e,n,r)=>{n==null||n.error(`Stream received invalid data in "${t}" message`),n==null||n.debug(`Invalid JSON follows: ${e}`),r==null||r(new Wa(At.InvalidData,"Malformed JSON data in event stream"))};function II(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function mp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var TI=class{constructor(t,e,n,r,i,o,s,a,c){var l;this.Si=t,this.Rt=e,this.n=n,this.V=r,this.xi=o,this.x=s,this.m=a,this.t=c,this.h=!1;let u;e.useReport&&!r.getEventSourceCapabilities().customMethod?u=e.paths.pathPing(i,t):u=e.useReport?e.paths.pathReport(i,t):e.paths.pathGet(i,t);let h=[...(l=e.queryParameters)!=null?l:[]];this.Rt.withReasons&&h.push({key:"withReasons",value:"true"}),this.V=r,this.De=ot({},e.baseHeaders),this.t=c,this.Li=Fw(e.serviceEndpoints,u,h)}be(){this.ht=Date.now()}Mt(t){this.ht&&this.x&&this.x.recordStreamInit(this.ht,!t,Date.now()-this.ht),this.ht=void 0}Ci(t){var e,n,r;return Gp(t)?((r=this.t)==null||r.warn(Gn(t,"streaming request","will retry")),this.Mt(!1),this.be(),!0):(this.Mt(!1),(e=this.m)==null||e.call(this,new Wa(At.ErrorResponse,t.message,t.status,!1)),(n=this.t)==null||n.error(Gn(t,"streaming request")),!1)}start(){this.be();let t;this.Rt.useReport?(this.De["content-type"]="application/json",t={method:"REPORT",body:this.Si}):t={};let e=this.V.createEventSource(this.Li,ye(ot({headers:this.De},t),{errorFilter:n=>this.Ci(n),initialRetryDelayMillis:this.Rt.initialRetryDelayMillis,readTimeoutMillis:300*1e3,retryResetIntervalMillis:60*1e3}));this.ke=e,e.onclose=()=>{var n;(n=this.t)==null||n.info("Closed LaunchDarkly stream connection")},e.onerror=()=>{},e.onopen=()=>{var n;(n=this.t)==null||n.info("Opened LaunchDarkly stream connection")},e.onretrying=n=>{var r;(r=this.t)==null||r.info(`Will retry stream connection in ${n.delayMillis} milliseconds`)},this.n.forEach(({deserializeData:n,processJson:r},i)=>{e.addEventListener(i,o=>{var s,a;if(this.h){II(i,this.t);return}if((s=this.t)==null||s.debug(`Received ${i} event`),o!=null&&o.data){this.Mt(!0);let{data:c}=o,l=n(c);if(!l){SI(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new Wa(At.InvalidData,"Unexpected payload from event stream"))})}),e.addEventListener("ping",async()=>{var n,r,i,o,s,a,c;(n=this.t)==null||n.debug("Got PING, going to poll LaunchDarkly for feature flag updates");try{let l=await this.xi.requestPayload();try{if(this.h){mp(this.t);return}let u=JSON.parse(l);try{(r=this.n.get("put"))==null||r.processJson(u)}catch(h){(i=this.t)==null||i.error(`Exception from data handler: ${h}`)}}catch(u){(o=this.t)==null||o.error("Polling after ping received invalid data"),(s=this.t)==null||s.debug(`Invalid JSON follows: ${l}`),(a=this.m)==null||a.call(this,new Fi(At.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.h){mp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new Fi(At.ErrorResponse,u.message,u.status))}})}stop(){var t;(t=this.ke)==null||t.close(),this.ke=void 0,this.h=!0}close(){this.stop()}},EI=class{constructor(t,e,n,r,i,o,s,a,c){this.platform=t,this.flagManager=e,this.credential=n,this.config=r,this.getPollingPaths=i,this.getStreamingPaths=o,this.baseHeaders=s,this.emitter=a,this.diagnosticsManager=c,this.closed=!1,this.logger=r.logger,this.dataSourceStatusManager=vI(a),this.G=bI(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.Oi=t}createPollingProcessor(t,e,n,r,i){let o=new wI(n,this.config.pollInterval,async s=>{await this.G.handlePut(e,s),r==null||r()},s=>{this.emitter.emit("error",t,s),this.G.handlePollingError(s),i==null||i(s)},this.logger);this.updateProcessor=this.Se(o,this.dataSourceStatusManager)}createStreamingProcessor(t,e,n,r,i){var o;let s=new TI(JSON.stringify(t),{credential:this.credential,serviceEndpoints:this.config.serviceEndpoints,paths:this.getStreamingPaths(),baseHeaders:this.baseHeaders,initialRetryDelayMillis:this.config.streamInitialReconnectDelay*1e3,withReasons:this.config.withReasons,useReport:this.config.useReport,queryParameters:(o=this.Oi)==null?void 0:o.queryParameters},this.createStreamListeners(e,r),this.platform.requests,this.platform.encoding,n,this.diagnosticsManager,a=>{this.emitter.emit("error",t,a),this.G.handleStreamingError(a),i==null||i(a)},this.logger);this.updateProcessor=this.Se(s,this.dataSourceStatusManager)}createStreamListeners(t,e){let n=new Map;return n.set("put",{deserializeData:JSON.parse,processJson:async r=>{await this.G.handlePut(t,r),e==null||e()}}),n.set("patch",{deserializeData:JSON.parse,processJson:async r=>{this.G.handlePatch(t,r)}}),n.set("delete",{deserializeData:JSON.parse,processJson:async r=>{this.G.handleDelete(t,r)}}),n}Se(t,e){return{start:()=>{e.requestStateUpdate("INITIALIZING"),t.start()},stop:()=>{t.stop(),e.requestStateUpdate("CLOSED")},close:()=>{t.close(),e.requestStateUpdate("CLOSED")}}}close(){var t;(t=this.updateProcessor)==null||t.close(),this.closed=!0}};function Hi(){return typeof document!==void 0}function _a(){return typeof window!==void 0}function id(t,e,n){return Hi()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function od(t,e,n){return Hi()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function yr(){return _a()?window.location.href:""}function RI(){return _a()?window.location.search:""}function CI(){return _a()?window.location.hash:""}function ZI(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function kI(){return Hi()?document.visibilityState:"visibile"}function VI(t){if(Hi())return document.querySelectorAll(t)}var xI="[BrowserDataManager]",NI=class extends EI{constructor(t,e,n,r,i,o,s,a,c,l){super(t,e,n,r,o,s,a,c,l),this.Vi=i,this.Z=void 0,this.Ft=!1,this.Z=i.streaming}L(t,...e){this.logger.debug(`${xI} ${t}`,...e)}async identify(t,e,n,r){if(this.closed){this.L("Identify called after data manager was closed.");return}this.context=n;let i=r;i!=null&&i.hash?this.setConnectionParams({queryParameters:[{key:"h",value:i.hash}]}):this.setConnectionParams(),this.Ut=i==null?void 0:i.hash,i!=null&&i.bootstrap?this.Ai(n,i,t):(await this.flagManager.loadCached(n)&&this.L("Identify - Flags loaded from cache. Continuing to initialize via a poll."),await this.Ti(n,t,e)),this.xe(),this.jt()}async Ii(t){let e=JSON.stringify(xn.toLDContext(t)),n=rp(e,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.Ut),r=3,i;for(let o=0;o<=r;o+=1)try{return await n.requestPayload()}catch(s){if(!Gp(s))throw s;i=s,o<r&&(this.L(Gn(s,"initial poll request","will retry")),await Lp(1e3))}throw i}async Ti(t,e,n){var r,i;try{this.dataSourceStatusManager.requestStateUpdate(pS.Initializing);let o=await this.Ii(t);try{let s=this.createStreamListeners(t,e).get("put");s.processJson(s.deserializeData(o))}catch(s){this.dataSourceStatusManager.reportError(At.InvalidData,(r=s.message)!=null?r:"Could not parse poll response")}}catch(o){this.dataSourceStatusManager.reportError(At.NetworkError,(i=o.message)!=null?i:"unexpected network error",o.status),n(o)}}Ai(t,e,n){let{bootstrapParsed:r}=e;r||(r=rd(this.logger,e.bootstrap)),this.flagManager.setBootstrap(t,r),this.L("Identify - Initialization completed from bootstrap"),n()}setForcedStreaming(t){this.Z=t,this.jt()}setAutomaticStreamingState(t){this.Ft=t,this.jt()}jt(){let t=this.Z||this.Ft&&this.Z===void 0;this.L(`Updating streaming state. forced(${this.Z}) automatic(${this.Ft})`),t?this.Pi():this.xe()}xe(){var t;this.updateProcessor&&this.L("Stopping update processor."),(t=this.updateProcessor)==null||t.close(),this.updateProcessor=void 0}Pi(){if(this.updateProcessor){this.L("Update processor already active. Not changing state.");return}if(!this.context){this.L("Context not set, not starting update processor.");return}this.L("Starting update processor."),this.Ni(this.context)}Ni(t,e,n){var r;let i=xn.toLDContext(t);(r=this.updateProcessor)==null||r.close();let o=JSON.stringify(xn.toLDContext(t)),s=rp(o,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.Ut);this.createStreamingProcessor(i,t,s,e,n),this.updateProcessor.start()}};function OI(t){let e=id("visibilitychange",()=>{kI()==="hidden"&&t()}),n=od("pagehide",t);return()=>{e(),n()}}function Oa(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function GI(t,e,n,r){let i=((t.kind==="substring"||t.kind==="regex")&&r.includes("/")?e:e.replace(r,"")).replace(n,"");switch(t.kind){case"exact":return new RegExp(`^${Oa(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${Oa(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${Oa(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function LI(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=VI(o);for(;i&&s!=null&&s.length;){for(let a=0;a<s.length;a+=1)if(i===s[a]){n.push(r);break}i=i.parentNode}}),n}var XI=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>GI(a,yr(),RI(),CI()))}),r=n.filter(o=>o.kind==="pageview"),i=n.filter(o=>o.kind==="click");if(r.forEach(o=>e(o)),i.length){let o=s=>{LI(s,i).forEach(a=>{e(a)})};this.Le=id("click",o)}}close(){var t;(t=this.Le)==null||t.call(this)}},WI=300,UI=class{constructor(t){this.Vt=yr();let e=()=>{let r=yr();r!==this.Vt&&(this.Vt=r,t())};this.bo=setInterval(e,WI);let n=od("popstate",e);this.Ce=()=>{n()}}close(){var t;this.bo&&clearInterval(this.bo),(t=this.Ce)==null||t.call(this)}},PI=class{constructor(t,e,n,r,i,o=s=>new UI(s)){this.V=e,this.Mi=r,this.Ri=i,this.dt=[],this.Ae=!1,this.ft=`${n}/sdk/goals/${t}`,this.Oe=o(()=>{this.Ht()})}async initialize(){await this.$i(),this.Ht()}startTracking(){this.Ae=!0,this.Ht()}Ht(){var t;this.Ae&&((t=this.Bt)==null||t.close(),this.dt&&this.dt.length&&(this.Bt=new XI(this.dt,e=>{this.Ri(yr(),e)})))}async $i(){try{let t=await this.V.fetch(this.ft);this.dt=await t.json()}catch(t){this.Mi(new xp(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Oe)==null||t.close(),(e=this.Bt)==null||e.close()}};function MI(t){return t.kind==="click"}var FI=2,sd={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},AI={fetchGoals:x.Boolean,eventUrlTransformer:x.Function,streaming:x.Boolean,plugins:x.createTypeArray("LDPlugin",{})};function JI(t){var e;let n=ot({},t);return(e=n.flushInterval)!=null||(n.flushInterval=FI),n}function DI(t){let e=JI(t);return Object.keys(sd).forEach(n=>{delete e[n]}),e}function YI(t,e){let n=ot({},sd);return Object.entries(AI).forEach(r=>{let[i,o]=r,s=t[i];s!==void 0&&(o.is(s)?n[i]=s:e.warn(oe.wrongOptionType(i,o.getType(),typeof s)))}),n}var KI=class{constructor(t,e){switch(this.Fi=t,this.Te=[],e){case"sha1":this.zt="SHA-1";break;case"sha256":this.zt="SHA-256";break;default:throw new Error(`Algorithm is not supported ${e}`)}}async asyncDigest(t){let e=this.Te.join(""),n=new TextEncoder().encode(e),r=await this.Fi.subtle.digest(this.zt,n);switch(t){case"base64":return btoa(String.fromCharCode(...new Uint8Array(r)));case"hex":return[...new Uint8Array(r)].map(i=>i.toString(16).padStart(2,"0")).join("");default:throw new Error(`Encoding is not supported ${t}`)}}update(t){return this.Te.push(t),this}},_I={start:0,end:3},HI={start:4,end:5},Ga={start:6,end:7},La={start:8,end:8},zI={start:9,end:9},BI={start:10,end:15};function jI(){if(crypto&&crypto.getRandomValues){let e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}let t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function kn(t,e){let n="";for(let r=e.start;r<=e.end;r+=1)n+=t[r].toString(16).padStart(2,"0");return n}function QI(t){return t[La.start]=(t[La.start]|128)&191,t[Ga.start]=t[Ga.start]&15|64,`${kn(t,_I)}-${kn(t,HI)}-${kn(t,Ga)}-${kn(t,La)}${kn(t,zI)}-${kn(t,BI)}`}function $I(){let t=jI();return QI(t)}function qI(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():$I()}var tT=class{createHash(t){return new KI(ZI(),t)}randomUUID(){return qI()}};function eT(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var nT=class{btoa(t){return eT(new TextEncoder().encode(t))}},rT=class{constructor(t){this.e=t}platformData(){return{name:"JS"}}sdkData(){let t={name:"@launchdarkly/js-client-sdk",version:"4.4.0",userAgentBase:"JSClient"};return this.e.wrapperName&&(t.wrapperName=this.e.wrapperName),this.e.wrapperVersion&&(t.wrapperVersion=this.e.wrapperVersion),t}},iT=class{constructor(t,e){this.ft=t,this.n={},this.A=new Vw(e.initialRetryDelayMillis,e.retryResetIntervalMillis),this.Ie=e.errorFilter,this.Pe()}Pe(){this.K=new EventSource(this.ft),this.K.onopen=()=>{var t;this.A.success(),(t=this.onopen)==null||t.call(this)},this.K.onerror=t=>{var e;this.Ui(t),(e=this.onerror)==null||e.call(this,t)},Object.entries(this.n).forEach(([t,e])=>{e.forEach(n=>{var r;(r=this.K)==null||r.addEventListener(t,n)})})}addEventListener(t,e){var n,r,i;(r=(n=this.n)[t])!=null||(n[t]=[]),this.n[t].push(e),(i=this.K)==null||i.addEventListener(t,e)}close(){var t,e;clearTimeout(this.Gt),this.Gt=void 0,(t=this.K)==null||t.close(),(e=this.onclose)==null||e.call(this)}ji(t){var e;(e=this.onretrying)==null||e.call(this,{delayMillis:t}),this.Gt=setTimeout(()=>{this.Pe()},t)}Ui(t){this.close(),!(typeof t.status=="number"&&!this.Ie(t))&&this.ji(this.A.fail())}},oT=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new iT(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function ad(){return typeof localStorage!="undefined"}function sT(){if(!ad())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var aT=class{constructor(t){this.t=t}async clear(t){var e;try{localStorage.removeItem(t)}catch(n){(e=this.t)==null||e.error(`Error clearing key from localStorage: ${t}, reason: ${n}`)}}async get(t){var e;try{let n=localStorage.getItem(t);return n!=null?n:null}catch(n){return(e=this.t)==null||e.error(`Error getting key from localStorage: ${t}, reason: ${n}`),null}}async set(t,e){var n;try{localStorage.setItem(t,e)}catch(r){(n=this.t)==null||n.error(`Error setting key in localStorage: ${t}, reason: ${r}`)}}},lT=class{constructor(t,e){this.encoding=new nT,this.crypto=new tT,this.requests=new oT,ad()&&(this.storage=new aT(t)),this.info=new rT(e)}},cT=class extends mI{constructor(t,e,n={},r){var i;let{logger:o,debug:s}=n,a=o!=null?o:new Fa({destination:{debug:console.debug,info:console.info,warn:console.warn,error:console.error},level:s?"debug":"info"}),c=(i=n.baseUri)!=null?i:"https://clientsdk.launchdarkly.com",l=r!=null?r:new lT(a,n),u=YI(n,a),h=DI(ye(ot({},n),{logger:a})),{eventUrlTransformer:p}=u,f=gI(t);super(t,e,l,h,(m,d,v,g,w)=>new NI(l,m,t,d,u,f.polling,f.streaming,v,g,w),{getLegacyStorageKeys:()=>sT().filter(m=>m.startsWith(`ld:${t}:`)),analyticsEventPath:`/events/bulk/${t}`,diagnosticEventPath:`/events/diagnostic/${t}`,includeAuthorizationHeader:!1,highTimeoutThreshold:5,userAgentHeaderName:"x-launchdarkly-user-agent",dataSystemDefaults:vS,trackEventModifier:m=>new fe.InputCustomEvent(m.context,m.key,m.data,m.metricValue,m.samplingRatio,p(yr())),getImplementationHooks:m=>fe.safeGetHooks(a,m,u.plugins),credentialType:"clientSideId"}),this.setEventSendingEnabled(!0,!1),this.Wt=u.plugins,u.fetchGoals&&(this.Kt=new PI(t,l.requests,c,m=>{a.error(m.message)},(m,d)=>{let v=this.getInternalContext();if(!v)return;let g=p(m);MI(d)?this.sendEvent({kind:"click",url:g,samplingRatio:1,key:d.key,creationDate:Date.now(),context:v,selector:d.selector}):this.sendEvent({kind:"pageview",url:g,samplingRatio:1,key:d.key,creationDate:Date.now(),context:v})}),this.Kt.initialize(),u.automaticBackgroundHandling&&OI(()=>this.flush()))}registerPlugins(t){fe.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.Wt||[]);let e=this.getDebugOverrides();e&&yI(this.logger,e,this.Wt||[])}setInitialContext(t){this.Jt=t}async identify(t,e){return super.identify(t,e)}async identifyResult(t,e){var n;if(!this.X)return this.logger.error("Client must be started before it can identify a context, did you forget to call start()?"),{status:"error",error:new Error("Identify called before start")};let r=ot({},e);(e==null?void 0:e.sheddable)===void 0&&(r.sheddable=!0);let i=await super.identifyResult(t,r);return(n=this.Kt)==null||n.startTracking(),i}start(t){var e,n;if(this.initializeResult)return Promise.resolve(this.initializeResult);if(this.X)return this.X;if(!this.Jt)return this.logger.error("Initial context not set"),Promise.resolve({status:"failed",error:new Error("Initial context not set")});let r=ye(ot({},(e=t==null?void 0:t.identifyOptions)!=null?e:{}),{sheddable:!1});if(t!=null&&t.bootstrap&&!r.bootstrap&&(r.bootstrap=t.bootstrap),r!=null&&r.bootstrap)try{r.bootstrapParsed||(r.bootstrapParsed=rd(this.logger,r.bootstrap)),this.presetFlags(r.bootstrapParsed)}catch(i){this.logger.error("Failed to bootstrap data",i)}return this.initializedPromise||(this.initializedPromise=new Promise(i=>{this.initResolve=i})),this.X=this.promiseWithTimeout(this.initializedPromise,(n=t==null?void 0:t.timeout)!=null?n:5),this.identifyResult(this.Jt,r),this.X}setStreaming(t){this.dataManager.setForcedStreaming(t)}Ne(){let t=this.dataManager,e=this.emitter.eventNames().some(n=>n.startsWith("change:")||n==="change");t.setAutomaticStreamingState(e)}on(t,e){super.on(t,e),this.Ne()}off(t,e){super.off(t,e),this.Ne()}};function uT(t,e,n,r={},i){let o=new cT(t,n,r,i);o.setInitialContext(e);let s={variation:(a,c)=>o.variation(a,c),variationDetail:(a,c)=>o.variationDetail(a,c),boolVariation:(a,c)=>o.boolVariation(a,c),boolVariationDetail:(a,c)=>o.boolVariationDetail(a,c),numberVariation:(a,c)=>o.numberVariation(a,c),numberVariationDetail:(a,c)=>o.numberVariationDetail(a,c),stringVariation:(a,c)=>o.stringVariation(a,c),stringVariationDetail:(a,c)=>o.stringVariationDetail(a,c),jsonVariation:(a,c)=>o.jsonVariation(a,c),jsonVariationDetail:(a,c)=>o.jsonVariationDetail(a,c),track:(a,c,l)=>o.track(a,c,l),on:(a,c)=>o.on(a,c),off:(a,c)=>o.off(a,c),flush:()=>o.flush(),setStreaming:a=>o.setStreaming(a),identify:(a,c)=>o.identifyResult(a,c),getContext:()=>o.getContext(),close:()=>o.close(),allFlags:()=>o.allFlags(),addHook:a=>o.addHook(a),waitForInitialization:a=>o.waitForInitialization(a),logger:o.logger,start:a=>o.start(a)};return o.registerPlugins(s),s}function c9(t){return new Fa(t)}function ld(t,e,n){return uT(t,e,Ai.Disabled,n)}var hT=Object.defineProperty,pT=(t,e,n)=>e in t?hT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ee=(t,e,n)=>pT(t,typeof e!="symbol"?e+"":e,n),dT=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Ve=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),fT(r,...n)},fT=(t,...e)=>dT(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>vR);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),mT=class{constructor(t,e){Ee(this,"debug"),Ee(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},wo=class{constructor(){Ee(this,"_sdk"),Ee(this,"_isLoaded",!1),Ee(this,"_callBuffer",[]),Ee(this,"_capacity",1e5),Ee(this,"_droppedEvents",0),Ee(this,"_exceededCapacity",!1),Ee(this,"_logger",new mT)}p(e,n){if(this.xn)try{return this.Bn[e](...n)}catch(r){Ve(`Error executing buffered call to ${e}:`,"error",r)}else{this.Ur({method:e,args:n});return}}Ur(e){this.wn.length<this.Es?(this.wn.push(e),this.jn=!1):(this.jn||(this.jn=!0,Ve("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Rs+=1)}load(e){this.Bn=e,this.xn=!0;for(let{method:n,args:r}of this.wn)try{this.Bn[n](...r)}catch(i){Ve(`Error executing buffered call to ${n}:`,"error",i)}this.wn=[]}},yT=Object.defineProperty,gT=Object.defineProperties,bT=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,_f=Object.prototype.hasOwnProperty,Hf=Object.prototype.propertyIsEnumerable,Vl=(t,e,n)=>e in t?yT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))_f.call(e,n)&&Vl(t,n,e[n]);if(So)for(var n of So(e))Hf.call(e,n)&&Vl(t,n,e[n]);return t},An=(t,e)=>gT(t,bT(e)),xr=(t,e)=>{var n={};for(var r in t)_f.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&So)for(var r of So(t))e.indexOf(r)<0&&Hf.call(t,r)&&(n[r]=t[r]);return n},Wr=(t,e,n)=>Vl(t,typeof e!="symbol"?e+"":e,n),Dn=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});function vT(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function co(t,e){throw new Error(e)}function wT(t){return typeof t=="object"&&t!==null}function ST(t,e){throw new Error("Unexpected invariant triggered.")}var IT=/\r\n|[\n\r]/g;function xl(t,e){let n=0,r=1;for(let i of t.body.matchAll(IT)){if(typeof i.index=="number"||ST(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function TT(t){return zf(t.source,xl(t.source,t.start))}function zf(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
349
- `,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+cd([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+cd([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function cd(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
350
- `)}function ET(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}var RT=class Bf extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=ET(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=ud(Array.isArray(s)?s:s?[s]:void 0);let p=ud((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>xl(a,m)):p==null?void 0:p.map(m=>xl(m.source,m.start));let f=wT(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Bf):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
348
+ SessionSecureID: ${this.sessionData.sessionSecureID}`);let s=g9();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:ZW({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:s||void 0}):this.Lr.postMessage({message:{type:ze.AsyncEvents,id:this.sessionData.payloadID++,events:r,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:s}}),Fn(this.sessionData),this.events=this.events.slice(r.length),b9(s)})}takeFullSnapshot(){if(!this.sr){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this.ii,lastSnapshotTime:this.yo}),je.takeFullSnapshot(),this.ii=0,this.yo=new Date().getTime()}register(e,n){this.yr.push(new Hu(e,n))}getHooks(e){return this.yr.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}getRecordingState(){var e;return(e=this==null?void 0:this.state)!=null?e:"NotRecording"}getSession(){let e=this.sessionData.sessionSecureID,n=$s(e);if(!n)return null;let r=`${this.getFrontendUrl()}/sessions/${e}`;if(!r||!(n!=null&&n.sessionStartTime))return null;let i=new Date().getTime(),o=new URL(r),s=new URL(r),a=(i-this.Xr)/1e3;return s.searchParams.set("ts",a.toString()),{url:o.toString(),urlWithTimestamp:s.toString(),sessionSecureID:e}}getFrontendUrl(){var e,n;let r=this.Qn.match(e2);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${qW[i]}${t2}`}return $W}},Qi=class extends C2{constructor(e,n){var r=(...f)=>(super(...f),K(this,"record"),this),i,o,s,a,c,l,u,h,p;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker>"u"){console.warn("@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!e){console.warn("@launchdarkly/session-replay is not initializing because projectID was passed undefined.");return}let f=Qt(j({},n),{organizationID:e,firstloadVersion:E9,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 Fh(f),n!=null&&n.manualStart||this.record.start(),An.load(this.record),!((s=(o=n==null?void 0:n.integrations)==null?void 0:o.mixpanel)!=null&&s.disabled)&&(c=(a=n==null?void 0:n.integrations)==null?void 0:a.mixpanel)!=null&&c.projectToken&&I9(n.integrations.mixpanel),!((u=(l=n==null?void 0:n.integrations)==null?void 0:l.amplitude)!=null&&u.disabled)&&(p=(h=n==null?void 0:n.integrations)==null?void 0:h.amplitude)!=null&&p.apiKey&&S9(n.integrations.amplitude)}catch(f){oe("Error initializing @launchdarkly/session-replay SDK","error",f)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(e,n){var r;(r=this.record)==null||r.register(e,n)}getHooks(e){return[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(n,r,i)=>{var o,s,a,c,l,u,h;for(let p of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=p.afterIdentify)==null||c.call(p,n,r,i);if(i.status==="completed"){let p=w2(n.context),f=S2(n.context);(h=this.record)==null||h.identify(typeof f=="string"?f:(u=(l=f.user)==null?void 0:l.toString())!=null?u:p,Qt(j({key:p},typeof f=="object"?f:{}),{timeout:n.timeout}),"LaunchDarkly")}return r},afterEvaluation:(n,r,i)=>{var o,s,a,c;for(let l of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=l.afterEvaluation)==null||c.call(l,n,r,i);return r},afterTrack:n=>{var r,i,o,s,a;for(let c of(o=(i=(r=this.record)==null?void 0:r.getHooks)==null?void 0:i.call(r,e))!=null?o:[])(s=c.afterTrack)==null||s.call(c,n);(a=this.record)==null||a.track(n.key,{data:n.data,value:n.metricValue})}}]}}});var Bw=Object.defineProperty,jw=Object.defineProperties,Qw=Object.getOwnPropertyDescriptors,lo=Object.getOwnPropertySymbols,Qp=Object.prototype.hasOwnProperty,$p=Object.prototype.propertyIsEnumerable,Sp=(t,e,n)=>e in t?Bw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))Qp.call(e,n)&&Sp(t,n,e[n]);if(lo)for(var n of lo(e))$p.call(e,n)&&Sp(t,n,e[n]);return t},ce=(t,e)=>jw(t,Qw(e)),hl=(t,e)=>{var n={};for(var r in t)Qp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&lo)for(var r of lo(t))e.indexOf(r)<0&&$p.call(t,r)&&(n[r]=t[r]);return n};function $w(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function qp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function qw(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>qp(e))}function tS(t){return!t.startsWith("/")}function eS(t){return!t.match(/\/\/|(^\/.*~[^0|^1])|~$/)}var $n=class{constructor(t,e=!1){if(e){let n=t;this.y=[n],this.isValid=n!=="",this.redactionName=n.startsWith("/")?$w(n):n}else{if(this.redactionName=t,t===""||t==="/"||!eS(t)){this.isValid=!1,this.y=[];return}tS(t)?this.y=[t]:t.indexOf("/",1)<0?this.y=[qp(t.slice(1))]:this.y=qw(t),this.y[0]==="_meta"?this.isValid=!1:this.isValid=!0}}get(t){let{y:e,isValid:n}=this;if(!n)return;let r=t;for(let i=0;i<e.length;i+=1){let o=e[i];if(r!=null&&Object.prototype.hasOwnProperty.call(r,o)&&typeof r=="object"&&!Array.isArray(r))r=r[o];else return}return r}getComponent(t){return this.y[t]}get depth(){return this.y.length}get isKind(){return this.y.length===1&&this.y[0]==="kind"}compare(t){return this.depth===t.depth&&this.y.every((e,n)=>e===t.getComponent(n))}get components(){return[...this.y]}};$n.InvalidReference=new $n("");var nS=class{is(t){if(Array.isArray(t))return!1;let e=typeof t;return e==="function"||e==="object"}getType(){return"factory method or object"}},er=class{constructor(t,e){this.mt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?!1:typeof t===this.typeOf}getType(){return this.mt}},td=class{constructor(t,e){this.mt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?t.length>0?t.every(e=>typeof e===this.typeOf):!0:!1}getType(){return this.mt}},ed=class extends er{constructor(t){super(`number with minimum value of ${t}`,0),this.min=t}is(t){return typeof t===this.typeOf&&t>=this.min}},nd=class extends er{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},rS=class{is(t){return typeof t=="function"}getType(){return"function"}},iS=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},oS=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,sS=class{is(t){return typeof t=="number"||typeof t=="string"&&oS.test(t)}getType(){return"date"}},aS=class extends nd{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},lS=class{constructor(t){this.Zt=t}is(t){return typeof t=="string"&&this.Zt.includes(t)}getType(){return this.Zt.join(" | ")}};function Ue(t){return t==null}var N=class{static createTypeArray(t,e){return new td(t,e)}static numberWithMin(t){return new ed(t)}static stringMatchingRegex(t){return new nd(t)}static oneOf(...t){return new lS(t)}};N.String=new er("string","");N.Number=new er("number",0);N.ObjectOrFactory=new nS;N.Object=new er("object",{});N.StringArray=new td("string[]","");N.Boolean=new er("boolean",!0);N.Function=new rS;N.Date=new sS;N.Kind=new aS;N.NullableBoolean=new iS;function rd(t){return"kind"in t?N.String.is(t.kind)&&t.kind!=="multi":!1}function id(t){return"kind"in t?N.String.is(t.kind)&&t.kind==="multi":!1}function od(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function co(t,e=[]){if(t===null||typeof t!="object")return JSON.stringify(t);if(e.includes(t))throw new Error("Cycle detected");return Array.isArray(t)?`[${t.map(n=>co(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=co(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var nl="user";function Ip(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function cS(t){return t&&N.Object.is(t)}function Tp(t){return N.Kind.is(t)}function Ep(t){return N.String.is(t)&&t!==""}function _a(t,e=!1){return t?t.map(n=>new $n(n,e)):[]}function uS(t){return t!=null}function hS(t){let e=ce($({},t.custom||[]),{kind:"user",key:String(t.key)});if(uS(t.anonymous)){let n=!!t.anonymous;delete e.anonymous,e.anonymous=n}return t.name!==null&&t.name!==void 0&&(e.name=t.name),t.ip!==null&&t.ip!==void 0&&(e.ip=t.ip),t.firstName!==null&&t.firstName!==void 0&&(e.firstName=t.firstName),t.lastName!==null&&t.lastName!==void 0&&(e.lastName=t.lastName),t.email!==null&&t.email!==void 0&&(e.email=t.email),t.avatar!==null&&t.avatar!==void 0&&(e.avatar=t.avatar),t.country!==null&&t.country!==void 0&&(e.country=t.country),t.privateAttributeNames!==null&&t.privateAttributeNames!==void 0&&(e._meta={privateAttributes:t.privateAttributeNames}),e}var bn=class Et{constructor(e,n,r){this.P=!1,this.tt=!1,this.Xt=!1,this.M={},this.kind=n,this.valid=e,this.message=r}static D(e,n){return new Et(!1,e,n)}static $e(e,n){if(!(!n||!e.isValid))return e.depth===1&&e.getComponent(0)==="anonymous"?!!(n!=null&&n.anonymous):e.get(n)}Qt(e){if(this.P)return this.M[e];if(this.kind===e)return this.v}static Re(e){let n=Object.keys(e).filter(c=>c!=="kind"),r=n.every(Tp);if(!n.length)return Et.D("multi","A multi-kind context must contain at least one kind");if(!r)return Et.D("multi","Context contains invalid kinds");let i={},o=!0,s=n.reduce((c,l)=>{var u;let h=e[l];return cS(h)?(c[l]=h,i[l]=_a((u=h._meta)==null?void 0:u.privateAttributes)):o=!1,c},{});if(!o)return Et.D("multi","Context contained contexts that were not objects");if(!Object.values(s).every(c=>Ep(c.key)))return Et.D("multi","Context contained invalid keys");if(n.length===1){let c=n[0],l=new Et(!0,c);return l.v=ce($({},s[c]),{kind:c}),l.et=i,l.tt=c==="user",l}let a=new Et(!0,e.kind);return a.M=s,a.et=i,a.P=!0,a}static Ne(e){var n;let{key:r,kind:i}=e,o=Tp(i),s=Ep(r);if(!o)return Et.D(i!=null?i:"unknown","The kind was not valid for the context");if(!s)return Et.D(i,"The key for the context was not valid");let a=_a((n=e._meta)==null?void 0:n.privateAttributes),c=new Et(!0,i);return c.tt=i==="user",c.v=e,c.et={[i]:a},c}static Ue(e){if(!(e.key!==void 0&&e.key!==null))return Et.D("user","The key for the context was not valid");let n=new Et(!0,"user");return n.tt=!0,n.Xt=!0,n.v=hS(e),n.et={user:_a(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?rd(e)?Et.Ne(e):id(e)?Et.Re(e):od(e)?Et.Ue(e):Et.D("unknown","Context was not of a valid kind"):Et.D("unknown","No context specified. Returning default value")}static toLDContext(e){if(!e.valid)return;let n=e.getContexts();if(!e.P)return n[0][1];let r={kind:"multi"};return n.forEach(i=>{let o=i[0],s=i[1];r[o]=s}),r}valueForKind(e,n=nl){return e.isKind?this.kinds:Et.$e(e,this.Qt(n))}key(e=nl){var n;return(n=this.Qt(e))==null?void 0:n.key}get isMultiKind(){return this.P}get canonicalKey(){return this.tt?this.v.key:this.P?Object.keys(this.M).sort().map(e=>`${e}:${Ip(this.M[e].key)}`).join(":"):`${this.kind}:${Ip(this.v.key)}`}get kinds(){return this.P?Object.keys(this.M):[this.kind]}get kindsAndKeys(){return this.P?Object.entries(this.M).reduce((e,[n,r])=>(e[n]=r.key,e),{}):{[this.kind]:this.v.key}}privateAttributes(e){var n;return((n=this.et)==null?void 0:n[e])||[]}getContexts(){return this.P?Object.entries(this.M):[[this.kind,this.v]]}get legacy(){return this.Xt}canonicalUnfilteredJson(){if(this.valid){if(this.yt)return this.yt;try{this.yt=co(Et.toLDContext(this))}catch(e){}return this.yt}}};bn.UserKind=nl;var pS=["key","kind","_meta","anonymous"].map(t=>new $n(t,!0)),dS=["name","ip","firstName","lastName","email","avatar","country"];function fS(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function mS(t,e){let n=[],r={},i=[];for(n.push(...Object.keys(t).map(o=>({key:o,ptr:[o],source:t,parent:r,visited:[t]})));n.length;){let o=n.pop(),s=e.find(a=>fS(a,o.ptr));if(s)i.push(s.redactionName);else{let a=o.source[o.key];a===null?o.parent[o.key]=a:Array.isArray(a)?o.parent[o.key]=[...a]:typeof a=="object"?o.visited.includes(a)||(o.parent[o.key]={},n.push(...Object.keys(a).map(c=>({key:c,ptr:[...o.ptr,c],source:a,parent:o.parent[o.key],visited:[...o.visited,a]})))):o.parent[o.key]=a}}return{cloned:r,excluded:i.sort()}}var yS=class{constructor(t,e){this.ze=t,this.je=e}filter(t,e=!1){let n=t.getContexts();if(n.length===1)return this.te(t,n[0][1],n[0][0],e);let r={kind:"multi"};return n.forEach(([i,o])=>{r[i]=this.te(t,o,i,e)}),r}Ts(t,e,n,r){return(r?Object.keys(e).map(i=>new $n(i,!0)):[...this.je,...t.privateAttributes(n)]).filter(i=>!pS.some(o=>o.compare(i)))}te(t,e,n,r){let i=this.ze||r&&e.anonymous===!0,{cloned:o,excluded:s}=mS(e,this.Ts(t,e,n,i));return t.legacy&&dS.forEach(a=>{a in o&&(o[a]=String(o[a]))}),s.length&&(o._meta||(o._meta={}),o._meta.redactedAttributes=s),o._meta&&(delete o._meta.privateAttributes,Object.keys(o._meta).length===0&&delete o._meta),o}},Rp=30*1e3,gS=.5,bS=class{constructor(t,e,n=Math.random){this.Ve=e,this.Be=n,this.gt=0,this.ee=Math.max(1,t),this.He=Math.ceil(Math.log2(Rp/this.ee))}x(){let t=Math.min(this.gt,this.He),e=this.ee*2**t;return Math.min(e,Rp)}Ge(t){return t-Math.trunc(this.Be()*gS*t)}success(t=Date.now()){this.vt=t}fail(t=Date.now()){this.vt!==void 0&&t-this.vt>this.Ve&&(this.gt=0),this.vt=void 0;let e=this.Ge(this.x());return this.gt+=1,e}},Cp;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(Cp||(Cp={}));var uo=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},rl=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},C9=120*1e3,k9=300*1e3,xt;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(xt||(xt={}));var ho;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(ho||(ho={}));var qn;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(qn||(qn={}));var gn;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(gn||(gn={}));function jn(t){if(typeof t=="string")return t;if(t===void 0)return"undefined";if(t===null)return"null";if(Object.prototype.hasOwnProperty.call(t,"toString"))try{return t.toString()}catch(e){}if(typeof t=="bigint")return`${t}n`;try{return JSON.stringify(t)}catch(e){return e instanceof TypeError&&e.message.indexOf("circular")>=0?"[Circular]":"[Not Stringifiable]"}}function vS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function wS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function SS(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Ha={s:t=>jn(t),d:t=>vS(t),i:t=>wS(t),f:t=>SS(t),j:t=>jn(t),o:t=>jn(t),O:t=>jn(t),c:()=>""};function il(...t){var e;let n=t.shift();if(N.String.is(n)){let r="",i=0;for(;i<n.length;){let o=n.charAt(i);if(o==="%"){if(i+1<n.length){let s=n.charAt(i+1);if(s in Ha&&t.length){let a=t.shift();r+=(e=Ha[s])==null?void 0:e.call(Ha,a)}else s==="%"?r+="%":r+=`%${s}`;i+=2}}else r+=o,i+=1}return t.length&&(r.length&&(r+=" "),r+=t.map(jn).join(" ")),r}return t.map(jn).join(" ")}var Xt;(function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.none=4]="none"})(Xt||(Xt={}));var IS=["debug","info","warn","error","none"],pl=class sd{static get(){return new sd({})}constructor(e){var n,r,i;if(this.Qe=(r=Xt[(n=e.level)!=null?n:"info"])!=null?r:Xt.info,this.tn=(i=e.name)!=null?i:"LaunchDarkly",this.ae=e.formatter,typeof e.destination=="object")this.oe={[Xt.debug]:e.destination.debug,[Xt.info]:e.destination.info,[Xt.warn]:e.destination.warn,[Xt.error]:e.destination.error};else if(typeof e.destination=="function"){let{destination:o}=e;this.oe={[Xt.debug]:o,[Xt.info]:o,[Xt.warn]:o,[Xt.error]:o}}}en(...e){var n;try{return this.ae?(n=this.ae)==null?void 0:n.call(this,...e):il(...e)}catch(r){return il(...e)}}nn(e,n){try{e(n)}catch(r){console.error(n)}}S(e,n){var r;if(e>=this.Qe){let i=`${IS[e]}: [${this.tn}]`;try{let o=(r=this.oe)==null?void 0:r[e];o?this.nn(o,`${i} ${this.en(...n)}`):console.error(...n)}catch(o){console.error(...n)}}}error(...e){this.S(Xt.error,e)}warn(...e){this.S(Xt.warn,e)}info(...e){this.S(Xt.info,e)}debug(...e){this.S(Xt.debug,e)}},TS={error:N.Function,warn:N.Function,info:N.Function,debug:N.Function},ad=class{constructor(t,e){Object.entries(TS).forEach(([n,r])=>{if(!r.is(t[n]))throw new Error(`Provided logger instance must support logger.${n}(...) method`)}),this.t=t,this.rn=e}S(t,e){try{this.t[t](...e)}catch(n){this.rn[t](...e)}}error(...t){this.S("error",t)}warn(...t){this.S("warn",t)}info(...t){this.S("info",t)}debug(...t){this.S("debug",t)}},ld=t=>{let e=new pl({level:"info",destination:console.error,formatter:il});return t?new ad(t,e):e},Wt=class{static deprecated(t,e){return`"${t}" is deprecated, please use "${e}"`}static optionBelowMinimum(t,e,n){return`Config option "${t}" had invalid value of ${e}, using minimum of ${n} instead`}static unknownOption(t){return`Ignoring unknown config option "${t}"`}static wrongOptionType(t,e,n){return`Config option "${t}" should be of type ${e}, got ${n}, using default value`}static wrongOptionTypeBoolean(t,e){return`Config option "${t}" should be a boolean, got ${e}, converting to boolean`}static invalidTagValue(t){return`Config option "${t}" must only contain letters, numbers, ., _ or -.`}static tagValueTooLong(t){return`Value of "${t}" was longer than 64 characters and was discarded.`}static partialEndpoint(t){return`You have set custom uris without specifying the ${t} URI; connections may not work properly`}},ES=/^(\w|\.|-)+$/,RS=N.stringMatchingRegex(ES),CS={is:(t,e)=>RS.is(t)?t.length>64?{valid:!1,message:Wt.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:Wt.invalidTagValue(e)}},kS=class{constructor(t){let e={},n=t==null?void 0:t.application,r=t==null?void 0:t.logger;n&&Object.entries(n).forEach(([o,s])=>{if(s!=null){let{valid:a,message:c}=CS.is(s,`application.${o}`);a?o==="versionName"?e["application-version-name"]=[s]:e[`application-${o}`]=[s]:r==null||r.warn(c)}});let i=Object.keys(e);i.length&&(this.value=i.sort().flatMap(o=>e[o].sort().map(s=>`${o}/${s}`)).join(" "))}},ZS=class{constructor(t,e,n){this.platform=n,this.basicConfiguration={tags:e.tags,logger:e.logger,offline:e.offline,serviceEndpoints:e.serviceEndpoints,sdkKey:t}}};function za(t){return t.replace(/\/+$/,"")}function dl(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var tr=class cd{constructor(e,n,r=cd.DEFAULT_EVENTS,i="/bulk",o="/diagnostic",s=!0,a){this.streaming=za(e),this.polling=za(n),this.events=za(r),this.analyticsEventPath=i,this.diagnosticEventPath=o,this.includeAuthorizationHeader=s,this.payloadFilterKey=a}};tr.DEFAULT_EVENTS="https://events.launchdarkly.com";function fl(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function ud(t,e,n){let r=dl(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),fl(`${t.streaming}/${r}`,i)}function hd(t,e,n=[]){let r=dl(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),fl(`${t.polling}/${r}`,i)}function kp(t,e,n=[]){let r=dl(e);return fl(`${t.events}/${r}`,n)}var pd=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},xS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},dd=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function nr(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function VS(t){return t===413?!0:nr(t)}function fd(t,e){let n,r;return{promise:new Promise((i,o)=>{r=i,n=setTimeout(()=>{let s=`${e} timed out after ${t} seconds.`;o(new dd(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function md(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Ba(t){return Math.trunc(t*1e3)}var OS=t=>JSON.stringify(t)==="{}",ml=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!OS(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?ml(i,e):i),n),{});function oo(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!oo(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!oo(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){var o=i[r];if(!oo(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function NS(t,e,n,r=!0,i="user-agent"){let{userAgentBase:o,version:s,wrapperName:a,wrapperVersion:c}=e.sdkData(),l={[i]:`${o!=null?o:"NodeJSClient"}/${s}`};return r&&(l.authorization=t),a&&(l["x-launchdarkly-wrapper"]=c?`${a}/${c}`:a),n!=null&&n.value&&(l["x-launchdarkly-tags"]=n.value),l}function Ve(t,e,n){let r;t.status?r=`error ${t.status}${t.status===401?" (invalid SDK key)":""}`:r=`I/O error (${t.message||"unknown error"})`;let i=n!=null?n:"giving up permanently";return`Received ${r} for ${e} - ${i}`}function yl({status:t}){return t?nr(t):!0}var po=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),gl=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),GS=class{constructor(t,e,n){this.a=e,this.sn=n,this.bt=[],this.ce=Date.now(),this.ue=this.ce,this.le={diagnosticId:e.crypto.randomUUID(),sdkKeySuffix:t.length>6?t.substring(t.length-6):t}}createInitEvent(){var t,e,n;let r=this.a.info.sdkData(),i=this.a.info.platformData();return{kind:"diagnostic-init",id:this.le,creationDate:this.ce,sdk:r,configuration:this.sn,platform:$({name:i.name,osArch:(t=i.os)==null?void 0:t.arch,osName:(e=i.os)==null?void 0:e.name,osVersion:(n=i.os)==null?void 0:n.version},i.additional||{})}}recordStreamInit(t,e,n){let r={timestamp:t,failed:e,durationMillis:n};this.bt.push(r)}createStatsEventAndReset(t,e,n){let r=Date.now(),i={kind:"diagnostic",id:this.le,creationDate:r,dataSinceDate:this.ue,droppedEvents:t,deduplicatedUsers:e,eventsInLastBatch:n,streamInits:this.bt};return this.bt=[],this.ue=r,i}},ol;(function(t){t.MalformedFlag="MALFORMED_FLAG",t.UserNotSpecified="USER_NOT_SPECIFIED",t.FlagNotFound="FLAG_NOT_FOUND",t.ClientNotReady="CLIENT_NOT_READY",t.WrongType="WRONG_TYPE"})(ol||(ol={}));var LS=ol,yd=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};yd.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var XS=class{constructor(t,e){let{basicConfiguration:n,platform:r}=t,{serviceEndpoints:{analyticsEventPath:i,diagnosticEventPath:o}}=n,{crypto:s,requests:a}=r;this.an=$({},e),this.de=kp(n.serviceEndpoints,i,[]),this.cn=kp(n.serviceEndpoints,o,[]),this.z=a,this.un=s}async nt(t,e,n,r){let i={status:gn.Succeeded},o=ce($({},this.an),{"content-type":"application/json"});n&&(o["x-launchdarkly-payload-id"]=n,o["x-launchDarkly-event-schema"]="4");let s;try{let{status:a,headers:c}=await this.z.fetch(e,{headers:o,body:JSON.stringify(t),compressBodyIfPossible:!0,method:"POST",keepalive:!0}),l=Date.parse(c.get("date")||"");if(l&&(i.serverTime=l),a<=204)return i;if(s=new pd(Ve({status:a,message:"some events were dropped"},"event posting")),!nr(a))return VS(a)?i.status=gn.Failed:i.status=gn.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=gn.Failed,i.error=s,i):(await gl(),this.nt(t,this.de,n,!1))}async sendEventData(t,e){let n=t===qn.AnalyticsEvents?this.un.randomUUID():void 0,r=t===qn.AnalyticsEvents?this.de:this.cn;return this.nt(e,r,n,!0)}};function fo(t){return t.kind==="feature"}function WS(t){return t.kind==="identify"}function MS(t){return t.kind==="migration_op"}var PS=class{constructor(t,e,n,r,i,o){this.count=t,this.key=e,this.value=n,this.version=i,this.variation=o,this.default=r}increment(){this.count+=1}};function US(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var gd=class{constructor(t=!1,e){this.ln=t,this.k=e,this.K=0,this.it=0,this.rt={},this.st={}}summarizeEvent(t){if(fo(t)&&!t.excludeFromSummaries){this.v||(this.v=t.context);let e=US(t),n=this.rt[e],r=this.st[t.key];r||(r=new Set,this.st[t.key]=r),t.context.kinds.forEach(i=>r.add(i)),n?n.increment():this.rt[e]=new PS(1,t.key,t.value,t.default,t.version,t.variation),(this.K===0||t.creationDate<this.K)&&(this.K=t.creationDate),t.creationDate>this.it&&(this.it=t.creationDate)}}getSummary(){var t;let e=Object.values(this.rt).reduce((r,i)=>{let o=r[i.key];o||(o={default:i.default,counters:[],contextKinds:[...this.st[i.key]]},r[i.key]=o);let s={value:i.value,count:i.count};return i.variation!==void 0&&i.variation!==null&&(s.variation=i.variation),i.version!==void 0&&i.version!==null?s.version=i.version:s.unknown=!0,o.counters.push(s),r},{}),n={startDate:this.K,endDate:this.it,features:e,kind:"summary",context:this.v!==void 0&&this.ln?(t=this.k)==null?void 0:t.filter(this.v):void 0};return this.dn(),n}dn(){this.K=0,this.it=0,this.rt={},this.st={}}},FS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},AS=class{constructor(t,e){this.k=t,this.t=e,this.W={}}summarizeEvent(t){var e;if(fo(t)){let n=t.context.canonicalUnfilteredJson();if(!n){t.context.valid&&((e=this.t)==null||e.error("Unable to serialize context, likely the context contains a cycle."));return}let r=this.W[n];r||(this.W[n]=new gd(!0,this.k),r=this.W[n]),r.summarizeEvent(t)}}getSummaries(){let t=this.W;return this.W={},Object.values(t).map(e=>e.getSummary())}};function so(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function DS(t){return t.getSummaries!==void 0}var JS=class{constructor(t,e,n,r,i,o=!0,s=!1){this.e=t,this.at=r,this.I=i,this.ot=[],this.he=0,this.Dt=0,this.St=0,this.kt=!1,this.fe=0,this.It=!1,this.Ct=null,this.hn=t.eventsCapacity,this.t=e.basicConfiguration.logger,this.pe=new XS(e,n),this.k=new yS(t.allAttributesPrivate,t.privateAttributes.map(a=>new $n(a))),s?this.J=new AS(this.k,this.t):this.J=new gd,o&&this.start()}start(){var t,e;if(((t=this.at)==null?void 0:t.flushInterval)!==void 0&&(this.Ct=setInterval(()=>{var n;(n=this.at)==null||n.flush()},this.at.flushInterval*1e3)),this.fn=setInterval(async()=>{var n;try{await this.flush()}catch(r){(n=this.t)==null||n.debug(`Flush failed: ${r}`)}},this.e.flushInterval*1e3),this.I){let n=this.I.createInitEvent();this.me(n),this.ye=setInterval(()=>{let r=this.I.createStatsEventAndReset(this.Dt,this.St,this.fe);this.Dt=0,this.St=0,this.me(r)},this.e.diagnosticRecordingInterval*1e3)}(e=this.t)==null||e.debug("Started EventProcessor.")}me(t){this.pe.sendEventData(qn.DiagnosticEvent,t)}close(){clearInterval(this.fn),this.Ct&&clearInterval(this.Ct),this.ye&&clearInterval(this.ye)}async flush(){var t;if(this.It)throw new FS("Events cannot be posted because a permanent error has been encountered. This is most likely an invalid SDK key. The specific error information is logged independently.");let e=this.ot;if(this.ot=[],DS(this.J))this.J.getSummaries().forEach(n=>{Object.keys(n.features).length&&e.push(n)});else{let n=this.J.getSummary();Object.keys(n.features).length&&e.push(n)}e.length&&(this.fe=e.length,(t=this.t)==null||t.debug("Flushing %d events",e.length),await this.nt(e))}sendEvent(t){var e;if(this.It)return;if(MS(t)){if(so(t.samplingRatio)){let a=ce($({},t),{context:t.context?this.k.filter(t.context):void 0});a.samplingRatio===1&&delete a.samplingRatio,this.ct(a)}return}this.J.summarizeEvent(t);let n=fo(t),r=n&&t.trackEvents||!n,i=this.pn(t),o=WS(t),s=(e=this.at)==null?void 0:e.processContext(t.context);s||o||(this.St+=1),s&&!o&&this.ct(this.Pt({kind:"index",creationDate:t.creationDate,context:t.context,samplingRatio:1},!1)),r&&so(t.samplingRatio)&&this.ct(this.Pt(t,!1)),i&&so(t.samplingRatio)&&this.ct(this.Pt(t,!0))}Pt(t,e){switch(t.kind){case"feature":{let n={kind:e?"debug":"feature",creationDate:t.creationDate,context:this.k.filter(t.context,!e),key:t.key,value:t.value,default:t.default};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.prereqOf&&(n.prereqOf=t.prereqOf),t.variation!==void 0&&(n.variation=t.variation),t.version!==void 0&&(n.version=t.version),t.reason&&(n.reason=t.reason),n}case"index":case"identify":{let n={kind:t.kind,creationDate:t.creationDate,context:this.k.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),n}case"custom":{let n={kind:"custom",creationDate:t.creationDate,key:t.key,context:this.k.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.data!==void 0&&(n.data=t.data),t.metricValue!==void 0&&(n.metricValue=t.metricValue),t.url!==void 0&&(n.url=t.url),n}case"click":return{kind:"click",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url,selector:t.selector};case"pageview":return{kind:"pageview",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url};default:return t}}ct(t){var e;this.ot.length<this.hn?(this.ot.push(t),this.kt=!1):(this.kt||(this.kt=!0,(e=this.t)==null||e.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),this.Dt+=1)}pn(t){return fo(t)&&t.debugEventsUntilDate&&t.debugEventsUntilDate>this.he&&t.debugEventsUntilDate>Date.now()}async nt(t){let e=await this.pe.sendEventData(qn.AnalyticsEvents,t);if(e.status===gn.FailedAndMustShutDown&&(this.It=!0),e.serverTime&&(this.he=e.serverTime),e.error)throw e.error}},bd=class{constructor(t,e,n,r,i=1,o){this.context=t,this.key=e,this.data=n,this.metricValue=r,this.samplingRatio=i,this.url=o,this.kind="custom",this.creationDate=Date.now(),this.context=t}},sl=class{constructor(t,e,n,r,i,o,s,a,c,l,u,h,p=1){this.withReasons=t,this.context=e,this.key=n,this.samplingRatio=p,this.kind="feature",this.creationDate=Date.now(),this.value=r,this.default=i,o!==void 0&&(this.version=o),s!==void 0&&(this.variation=s),a!==void 0&&(this.trackEvents=a),c!==void 0&&(this.prereqOf=c),l!==void 0&&(this.reason=l),u!==void 0&&(this.debugEventsUntilDate=u),h!==void 0&&(this.excludeFromSummaries=h)}},vd=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},YS=class{close(){}async flush(){}sendEvent(){}},KS=class{constructor(t){this.xt=t}evalEvent(t){var e;return new sl(this.xt,t.context,t.flagKey,t.value,t.defaultVal,t.version,(e=t.variation)!=null?e:void 0,t.trackEvents||t.addExperimentData,t.prereqOfFlagKey,this.xt||t.addExperimentData?t.reason:void 0,t.debugEventsUntilDate,t.excludeFromSummaries,t.samplingRatio)}unknownFlagEvent(t,e,n){return new sl(this.xt,n,t,e,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}identifyEvent(t){return new vd(t,1)}customEvent(t,e,n,r,i=1){return new bd(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},Zp="FDv1Fallback";function _S(t){return{mn:t,ge:"",useSelector(e){return this.ge=e,this},processFullTransfer(e){let n=[{event:"server-intent",data:{payloads:[{id:Zp,target:1,intentCode:"xfer-full",reason:"payload-missing"}]}}];Object.entries((e==null?void 0:e.flags)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"flag",key:r,version:i.version||1,object:i}})}),Object.entries((e==null?void 0:e.segments)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"segment",key:r,version:i.version||1,object:i}})}),n.push({event:"payload-transferred",data:{state:this.ge,version:1,id:Zp}}),this.mn.processEvents(n)}}}var re={type:"none"};function wd(t,e){let n="inactive",r="partial",i=[];function o(g,b){var w;return(w=t[g])==null?void 0:w.call(t,b)}function s(){n="inactive",r="partial",i=[]}function a(){n="changes",r="partial",i=[]}function c(){i=[]}function l(g){return Ue(g.target)?(e==null||e.warn(`Ignoring 'none' intent with missing fields: target=${g.target}`),re):{type:"payload",payload:{version:g.target,type:"none",updates:[]}}}function u(g){var b;if(!((b=g.payloads)!=null&&b.length))return{type:"error",kind:"MISSING_PAYLOAD",message:"No payload present in server-intent"};let w=g.payloads[0];switch(w==null?void 0:w.intentCode){case"xfer-full":return n="full",i=[],r="full",re;case"xfer-changes":return n="changes",i=[],r="partial",re;case"none":return n="changes",i=[],r="partial",l(w);default:return e==null||e.warn(`Unable to process intent code '${w==null?void 0:w.intentCode}'.`),re}}function h(g){if(n==="inactive")return e==null||e.warn("Received put-object before server-intent was established. Ignoring."),re;if(!g.kind||!g.key||Ue(g.version)||!g.object)return e==null||e.warn(`Ignoring put-object with missing fields: kind=${g.kind}, key=${g.key}, version=${g.version}`),re;let b=o(g.kind,g.object);return b?(i.push({kind:g.kind,key:g.key,version:g.version,object:b}),re):(e==null||e.warn(`Unable to process object for kind: '${g.kind}'`),re)}function p(g){return n==="inactive"?(e==null||e.warn("Received delete-object before server-intent was established. Ignoring."),re):!g.kind||!g.key||Ue(g.version)?(e==null||e.warn(`Ignoring delete-object with missing fields: kind=${g.kind}, key=${g.key}, version=${g.version}`),re):(i.push({kind:g.kind,key:g.key,version:g.version,deleted:!0}),re)}function f(g){if(n==="inactive")return{type:"error",kind:"PROTOCOL_ERROR",message:"A payload transferred has been received without an intent having been established."};if(Ue(g.state)||Ue(g.version))return e==null||e.warn(`Ignoring payload-transferred with missing fields: state=${g.state}, version=${g.version}`),s(),re;let b={type:"payload",payload:{version:g.version,state:g.state,type:r,updates:i}};return a(),b}function m(g){return e==null||e.info(`Goodbye was received from the LaunchDarkly connection with reason: ${g.reason}.`),s(),{type:"goodbye",reason:g.reason}}function d(g){return e==null||e.info(`An issue was encountered receiving updates with reason: ${g.reason}.`),c(),{type:"serverError",id:g.payload_id,reason:g.reason}}return{get state(){return n},processEvent(g){switch(g.event){case"server-intent":return u(g.data);case"put-object":return h(g.data);case"delete-object":return p(g.data);case"payload-transferred":return f(g.data);case"goodbye":return m(g.data);case"error":return d(g.data);case"heart-beat":return re;default:return{type:"error",kind:"UNKNOWN_EVENT",message:`Received an unknown event of type '${g.event}'`}}},reset(){s()}}}function HS(t){return t==="MISSING_PAYLOAD"||t==="PROTOCOL_ERROR"}var Sd=class{constructor(t,e,n){this.m=e,this.t=n,this.n=[],this.yn=wd(t,n)}addPayloadListener(t){this.n.push(t)}removePayloadListener(t){let e=this.n.indexOf(t,0);e>-1&&this.n.splice(e,1)}processEvents(t){t.forEach(e=>{var n,r;let i=this.yn.processEvent(e);switch(i.type){case"payload":this.n.forEach(o=>o(i.payload));break;case"error":HS(i.kind)?(n=this.m)==null||n.call(this,xt.InvalidData,i.message):(r=this.t)==null||r.warn(i.message);break}})}},zS=class{constructor(t,e,n,r){this.m=n,this.t=r,this._(t,"server-intent"),this._(t,"put-object"),this._(t,"delete-object"),this._(t,"payload-transferred"),this._(t,"goodbye"),this._(t,"error"),this.Lt=new Sd(e,n,r)}addPayloadListener(t){this.Lt.addPayloadListener(t)}removePayloadListener(t){this.Lt.removePayloadListener(t)}_(t,e){t.addEventListener(e,async n=>{var r,i,o,s,a;if(n!=null&&n.data){(r=this.t)==null||r.debug(`Received ${e} event. Data is ${n.data}`);try{this.Lt.processEvents([{event:e,data:JSON.parse(n.data)}])}catch(c){(i=this.t)==null||i.error(`Stream received data that was unable to be processed in "${e}" message`),(o=this.t)==null||o.debug(`Data follows: ${n.data}`),(s=this.m)==null||s.call(this,xt.InvalidData,"Malformed data in EventStream.")}}else(a=this.m)==null||a.call(this,xt.Unknown,"Event from EventStream missing data.")})}};function BS(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var xp="unknown plugin";function mo(t,e){try{return e.getMetadata().name||xp}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),xp}}function jS(t,e,n){let r=[];return n.forEach(i=>{var o;try{let s=(o=i.getHooks)==null?void 0:o.call(i,e);s===void 0?t.error(`Plugin ${mo(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${mo(t,i)}. Unable to get hooks.`)}}),r}function QS(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${mo(t,i)}.`)}})}var le=Object.freeze({__proto__:null,ClientMessages:yd,DiagnosticsManager:GS,ErrorKinds:LS,EventFactoryBase:KS,EventProcessor:JS,FDv1PayloadAdaptor:_S,InputCustomEvent:bd,InputEvalEvent:sl,InputIdentifyEvent:vd,NullEventProcessor:YS,PayloadProcessor:Sd,PayloadStreamReader:zS,canonicalize:co,createProtocolHandler:wd,initMetadataFromHeaders:BS,isLegacyUser:od,isMultiKind:id,isSingleKind:rd,safeGetHooks:jS,safeGetName:mo,safeRegisterPlugins:QS,shouldSample:so}),Vp={Initializing:"INITIALIZING",Valid:"VALID",Interrupted:"INTERRUPTED",SetOffline:"SET_OFFLINE",Closed:"CLOSED"};function $S(t){return t>=200&&t<=299}var Op=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}};function al(t,e,n,r,i,o,s,a,c,l){let u,h="GET",p=$({},o);c&&(h="REPORT",p["content-type"]="application/json",u=t);let f=c?n.pathReport(i,t):n.pathGet(i,t),m=[...s!=null?s:[]];a&&m.push({key:"withReasons",value:"true"}),l&&m.push({key:"h",value:l});let d=hd(e,f,m);return{async requestPayload(){let g;try{let b=await r.fetch(d,{method:h,headers:p,body:u});if($S(b.status))return await b.text();g=b.status}catch(b){throw new Op(b==null?void 0:b.message)}throw new Op(`Unexpected status code: ${g}`,g)}}}var Np=new Error("Task has already been executed or shed. This is likely an implementation error. The task will not be executed again.");function qS(t,e,n=!1){let r,i=new Promise(a=>{r=(c,l)=>{var u;try{(u=t.after)==null||u.call(t,c,l)}catch(h){e==null||e.error(`Error in after callback: ${h}`)}a(c)}}),o=t.before?t.before():Promise.resolve(void 0),s=!1;return{execute:()=>{s&&(e==null||e.error(Np)),s=!0,o.then(a=>{t.execute(a).then(c=>r({status:"complete",result:c},a)).catch(c=>r({status:"error",error:c},a))}).catch(a=>{e==null||e.error(a),r({status:"error",error:a},void 0)})},shed:()=>{s&&(e==null||e.error(Np)),s=!0,o.then(a=>{r({status:"shed"},a)})},promise:i,sheddable:n}}function tI(t){let e,n=[];function r(){if(!e&&n.length>0){let i=n.shift();e=i.promise.finally(()=>{e=void 0,r()}),i.execute()}}return{execute(i,o=!1){var s,a;let c=qS(i,t,o);return e?((s=n[n.length-1])!=null&&s.sheddable&&((a=n.pop())==null||a.shed()),n.push(c)):(e=c.promise.finally(()=>{e=void 0,r()}),c.execute()),c.promise},pendingCount(){return n.length}}}function Id(t){return"validate"in t}function go(t,e,n,r,i){let o=$({},n);return Ue(t)?o:N.Object.is(t)?(Object.entries(t).forEach(([s,a])=>{let c=e[s],l=i?`${i}.${s}`:s;if(!c){r==null||r.warn(Wt.unknownOption(l));return}if(Ue(a))return;if(Id(c)){let h=c.validate(a,l,r,n[s]);h!==void 0&&(o[s]=h.value);return}if(c.is(a)){o[s]=a;return}let u=c.getType();u==="boolean"?(r==null||r.warn(Wt.wrongOptionTypeBoolean(l,typeof a)),o[s]=!!a):u==="boolean | undefined | null"?(r==null||r.warn(Wt.wrongOptionTypeBoolean(l,typeof a)),typeof a!="boolean"&&typeof a!="undefined"&&a!==null&&(o[s]=!!a)):c instanceof ed&&N.Number.is(a)?(r==null||r.warn(Wt.optionBelowMinimum(l,a,c.min)),o[s]=c.min):r==null||r.warn(Wt.wrongOptionType(l,u,typeof a))}),o):(r==null||r.warn(Wt.wrongOptionType(i!=null?i:"config","object",typeof t)),o)}function tn(t,e){var n;let r=e==null?void 0:e.defaults;return{is:(n=e==null?void 0:e.is)!=null?n:(i=>N.Object.is(i)),getType:()=>"object",validate(i,o,s,a){if(!N.Object.is(i)){s==null||s.warn(Wt.wrongOptionType(o,"object",typeof i));return}let c=r!=null?r:N.Object.is(a)?a:{},l=go(i,t,c,s,o);return Object.keys(l).length>0?{value:l}:void 0}}}function Td(t,e){return{is:n=>Array.isArray(n),getType:()=>"array",validate(n,r,i){if(!Array.isArray(n)){i==null||i.warn(Wt.wrongOptionType(r,"array",typeof n));return}let o=[];return n.forEach((s,a)=>{let c=`${r}[${a}]`;if(Ue(s)||!N.Object.is(s)){i==null||i.warn(Wt.wrongOptionType(c,"object",typeof s));return}let l=s,u=l[t],h=typeof u=="string"?e[u]:void 0;if(!h){let p=Object.keys(e).join(" | "),f=typeof u=="string"?u:typeof u;i==null||i.warn(Wt.wrongOptionType(`${c}.${t}`,p,f));return}o.push(go(l,h,{},i,c))}),{value:o}}}}function eI(...t){return{is:e=>t.some(n=>n.is(e)),getType:()=>t.map(e=>e.getType()).join(" | "),validate(e,n,r,i){let o=t.find(s=>s.is(e));if(o)return Id(o)?o.validate(e,n,r,i):{value:e};r==null||r.warn(Wt.wrongOptionType(n,this.getType(),typeof e))}}}function nI(t,e,n){let r=n==null?void 0:n.defaults;return{is:i=>N.Object.is(i),getType:()=>"object",validate(i,o,s,a){if(Ue(i))return;if(!N.Object.is(i)){s==null||s.warn(Wt.wrongOptionType(o,"object",typeof i));return}let c=i,l={},u={};Object.keys(c).forEach(p=>{t.is(p)?(l[p]=c[p],u[p]=e):s==null||s.warn(Wt.wrongOptionType(o,t.getType(),p))});let h=r!=null?r:N.Object.is(a)?a:{};return{value:go(l,u,h,s,o)}}}}var Gp=300,Lp=3600,bl=N.oneOf("cache","polling","streaming"),vl=N.oneOf("streaming","polling","offline","one-shot","background"),wl={pollingBaseUri:N.String,streamingBaseUri:N.String},rI={type:bl},Ed={type:bl,pollInterval:N.numberWithMin(30),endpoints:tn(wl)},Rd={type:bl,initialReconnectDelay:N.numberWithMin(1),endpoints:tn(wl)},iI=Td("type",{cache:rI,polling:Ed,streaming:Rd}),oI=Td("type",{polling:Ed,streaming:Rd}),sI={pollInterval:N.numberWithMin(30),endpoints:tn(wl)},aI={initializers:iI,synchronizers:oI,fdv1Fallback:tn(sI)},ao={streaming:{initializers:[{type:"cache"},{type:"polling"}],synchronizers:[{type:"streaming"},{type:"polling"}],fdv1Fallback:{pollInterval:Gp}},polling:{initializers:[{type:"cache"}],synchronizers:[{type:"polling"}],fdv1Fallback:{pollInterval:Gp}},offline:{initializers:[{type:"cache"}],synchronizers:[]},"one-shot":{initializers:[{type:"cache"},{type:"polling"},{type:"streaming"}],synchronizers:[]},background:{initializers:[{type:"cache"}],synchronizers:[{type:"polling",pollInterval:Lp}],fdv1Fallback:{pollInterval:Lp}}},lI=nI(vl,tn(aI));function Xp(t,e){return N.Object.is(t)&&t.type===e}var cI={type:N.oneOf("automatic"),lifecycle:N.Boolean,network:N.Boolean},uI={type:N.oneOf("manual"),initialConnectionMode:vl},hI={backgroundConnectionMode:vl,automaticModeSwitching:eI(N.Boolean,tn(cI,{is:t=>Xp(t,"automatic")}),tn(uI,{is:t=>Xp(t,"manual")})),connectionModes:lI},Wp={foregroundConnectionMode:"one-shot",backgroundConnectionMode:void 0,automaticModeSwitching:!1};function pI(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="manual"}function dI(t,e){var n;return pI(t.automaticModeSwitching)?t.automaticModeSwitching.initialConnectionMode:(n=t.foregroundConnectionMode)!=null?n:e.foregroundConnectionMode}function fI(t){return{logger:N.Object,maxCachedContexts:N.numberWithMin(0),baseUri:N.String,streamUri:N.String,eventsUri:N.String,capacity:N.numberWithMin(1),diagnosticRecordingInterval:N.numberWithMin(2),flushInterval:N.numberWithMin(2),streamInitialReconnectDelay:N.numberWithMin(0),allAttributesPrivate:N.Boolean,debug:N.Boolean,diagnosticOptOut:N.Boolean,withReasons:N.Boolean,sendEvents:N.Boolean,pollInterval:N.numberWithMin(30),useReport:N.Boolean,privateAttributes:N.StringArray,disableCache:N.Boolean,applicationInfo:N.Object,wrapperName:N.String,wrapperVersion:N.String,payloadFilterKey:N.stringMatchingRegex(/^[a-zA-Z0-9](\w|\.|-)*$/),hooks:N.createTypeArray("Hook[]",{}),inspectors:N.createTypeArray("LDInspection",{}),cleanOldPersistentData:N.Boolean,dataSystem:t!=null&&t.dataSystemDefaults?tn(hI,{defaults:ce($({},t.dataSystemDefaults),{connectionModes:ao})}):N.Object}}var mI=300,Cd="https://clientsdk.launchdarkly.com",kd="https://clientstream.launchdarkly.com";function yI(t){return t instanceof ad?t:ld(t)}var gI=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=ld(),this.baseUri=Cd,this.eventsUri=tr.DEFAULT_EVENTS,this.streamUri=kd,this.maxCachedContexts=5,this.disableCache=!1,this.capacity=100,this.diagnosticRecordingInterval=900,this.flushInterval=30,this.streamInitialReconnectDelay=1,this.allAttributesPrivate=!1,this.debug=!1,this.diagnosticOptOut=!1,this.sendEvents=!0,this.sendLDHeaders=!0,this.useReport=!1,this.withReasons=!1,this.privateAttributes=[],this.pollInterval=mI,this.hooks=[],this.inspectors=[],this.logger=yI(t.logger);let o=fI({dataSystemDefaults:e.dataSystemDefaults}),s=go(t,o,{},this.logger);Object.entries(s).forEach(([a,c])=>{a!=="logger"&&(this[a]=c)}),this.serviceEndpoints=new tr(this.streamUri,this.baseUri,this.eventsUri,e.analyticsEventPath,e.diagnosticEventPath,e.includeAuthorizationHeader,t.payloadFilterKey),this.useReport=(n=t.useReport)!=null?n:!1,this.tags=new kS({application:this.applicationInfo,logger:this.logger}),this.userAgentHeaderName=(r=e.userAgentHeaderName)!=null?r:"user-agent",this.trackEventModifier=(i=e.trackEventModifier)!=null?i:(a=>a),this.credentialType=e.credentialType,this.getImplementationHooks=e.getImplementationHooks}};async function Sl(t,e){if(t.digest)return t.digest(e);if(t.asyncDigest)return t.asyncDigest(e);throw new Error("Platform must implement digest or asyncDigest")}var Zd=async(t,{crypto:e,storage:n})=>{let r=await(n==null?void 0:n.get(t));return r||(r=e.randomUUID(),await(n==null?void 0:n.set(t,r))),r};function xd(t){return async e=>Sl(t.createHash("sha256").update(e),"base64")}var xe=async t=>t;async function Ar(t){return(await Promise.all(t.map(e=>e.transform(e.value)))).join("_")}async function Vd(t,e){return Ar([{value:"LaunchDarkly",transform:xe},{value:e,transform:xd(t)}])}async function bI(t){return Ar([{value:"LaunchDarkly",transform:xe},{value:"AnonymousKeys",transform:xe},{value:t,transform:xe}])}async function vI(t){return Ar([{value:"LaunchDarkly",transform:xe},{value:"ContextKeys",transform:xe},{value:t,transform:xe}])}async function wI(t){return Ar([{value:t,transform:xe},{value:"ContextIndex",transform:xe}])}async function Il(t,e,n){return Ar([{value:e,transform:xe},{value:n.canonicalKey,transform:xd(t)}])}var{isLegacyUser:SI,isSingleKind:ja,isMultiKind:Mp}=le,Od="1.0",II=t=>{let e=t,{kind:n}=e,r=hl(e,["kind"]);return{kind:"multi",[n]:r}},TI=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=ml(i))!=null?r:{},s=(n==null?void 0:n.id)||(o==null?void 0:o.id);if(s){let a=(n==null?void 0:n.version)||(o==null?void 0:o.version),c=(n==null?void 0:n.name)||(o==null?void 0:o.name),l=(n==null?void 0:n.versionName)||(o==null?void 0:o.versionName);return o=$($($(ce($({},o),{id:s}),a?{version:a}:{}),c?{name:c}:{}),l?{versionName:l}:{}),o.key=await Sl(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||Od,o}},EI=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=ml(o))!=null?e:{},c=(s==null?void 0:s.name)||((n=a.os)==null?void 0:n.name),l=(s==null?void 0:s.version)||((r=a.os)==null?void 0:r.version),u=(i=a.os)==null?void 0:i.family;if((c||l||u)&&(a.os=$($($({},c?{name:c}:{}),l?{version:l}:{}),u?{family:u}:{})),Object.keys(a).filter(h=>h!=="key"&&h!=="envAttributesVersion").length){let h=await vI("ld_device");return a.key=await Zd(h,t),a.envAttributesVersion=a.envAttributesVersion||Od,a}},RI=async(t,e,n)=>{if(SI(t))return t;let r,i;if(ja(t)&&t.kind!=="ld_application"||Mp(t)&&!t.ld_application?r=await TI(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),ja(t)&&t.kind!=="ld_device"||Mp(t)&&!t.ld_device?i=await EI(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=ja(t)?II(t):t;return $($($({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function CI(){let t,e;return{set(n,r){t=n,e=r},getContext(){return e},getUnwrappedContext(){return t},newIdentificationPromise(){let n,r;return{identifyPromise:new Promise((i,o)=>{n=i,r=o}),identifyResolve:n,identifyReject:r}},hasContext(){return e!==void 0},hasValidContext(){return this.hasContext()&&e.valid}}}var{isLegacyUser:kI,isMultiKind:ZI,isSingleKind:xI}=le,Tl=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await bI(t);e.key=await Zd(o,n)}},VI=async(t,e)=>{await Tl(t.kind,t,e)},OI=async(t,e)=>{let n=t,{kind:r}=n,i=hl(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Tl(o,s,e)))},NI=async(t,e)=>{await Tl("user",t,e)},GI=async(t,e)=>{let n=md(t);return xI(n)&&await VI(n,e),ZI(n)&&await OI(n,e),kI(n)&&await NI(n,e),n},LI=t=>({customBaseURI:t.serviceEndpoints.polling!==Cd,customStreamURI:t.serviceEndpoints.streaming!==kd,customEventsURI:t.serviceEndpoints.events!==tr.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:Ba(t.flushInterval),reconnectTimeMillis:Ba(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:Ba(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),XI=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new le.DiagnosticsManager(t,n,LI(e))};function Pp(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function Up(t,e,n){return $({value:t,variationIndex:e!=null?e:null},n!==void 0&&{reason:n})}var WI=(t,e,n,r,i)=>{if(e.sendEvents)return new le.EventProcessor(ce($({},e),{eventsCapacity:e.capacity}),new ZS(t,e,n),r,void 0,i,!1,!0)},Fp=class extends le.EventFactoryBase{evalEventClient(t,e,n,r,i,o){let{trackEvents:s,debugEventsUntilDate:a,trackReason:c,flagVersion:l,version:u,variation:h}=r;return super.evalEvent({addExperimentData:c,context:i,debugEventsUntilDate:a,defaultVal:n,flagKey:t,reason:o,trackEvents:!!s,value:e,variation:h,version:l!=null?l:u})}},ll="_freshness";async function Nd(t,e){let n=e.canonicalUnfilteredJson();if(n)return Sl(t.createHash("sha256").update(n),"base64")}async function MI(t,e,n,r,i){let o=await Il(e,n,r),s=await t.get(`${o}${ll}`);if(s!=null)try{let a=JSON.parse(s),c=await Nd(e,r);return c===void 0||a.contextHash!==c?void 0:typeof a.timestamp=="number"&&!Number.isNaN(a.timestamp)?a.timestamp:void 0}catch(a){i==null||i.warn(`Could not read freshness data from persistent storage: ${a.message}`);return}}function PI(t){return t!==null&&typeof t=="object"&&typeof t.version=="number"}async function Gd(t,e,n,r,i){let o=await Il(e,n,r),s=await t.get(o),a=!1;if(s==null){if(s=await t.get(r.canonicalKey),s==null)return;a=!0}try{let c=JSON.parse(s);if(c===null||typeof c!="object"){i==null||i.warn("Cached flag data is not a valid object");return}let l=Object.entries(c),u=l.find(([,h])=>!PI(h));if(u){i==null||i.warn(`Discarding cached flags due to invalid entry: ${u[0]}`);return}return{flags:l.reduce((h,[p,f])=>(h[p]=f,h),{}),storageKey:o,fromLegacyKey:a}}catch(c){i==null||i.warn(`Could not parse cached flag evaluations from persistent storage: ${c.message}`);return}}var Qa=class Ld{constructor(){this.container={index:new Array}}static fromJson(e){let n=new Ld;try{n.container=JSON.parse(e)}catch(r){}return n}toJson(){return JSON.stringify(this.container)}notice(e,n){let r=this.container.index.find(i=>i.id===e);r===void 0?this.container.index.push({id:e,timestamp:n}):r.timestamp=n}prune(e){let n=Math.max(e,0);return this.container.index.length>n?(this.container.index.sort((r,i)=>r.timestamp-i.timestamp),this.container.index.splice(0,this.container.index.length-n)):[]}},UI=class{constructor(t,e,n,r,i,o,s,a=()=>Date.now()){this.a=t,this.Ot=e,this.ut=n,this.ve=r,this.T=i,this.g=o,this.t=s,this.gn=a,this.we=wI(this.Ot)}async init(t,e){this.g.init(t,e),await this.Tt(t)}async upsert(t,e,n){return this.g.upsert(t,e,n)?(await this.Tt(t),!0):!1}async applyChanges(t,e,n){this.g.applyChanges(t,e,n),await this.Tt(t)}async loadCached(t){if(this.ve||this.ut<=0||!this.a.storage)return!1;let e=await Gd(this.a.storage,this.a.crypto,this.Ot,t,this.t);if(!e)return!1;e.fromLegacyKey&&(await this.a.storage.set(e.storageKey,JSON.stringify(e.flags)),await this.a.storage.clear(t.canonicalKey));let n=Object.entries(e.flags).reduce((r,[i,o])=>(r[i]={version:o.version,flag:o},r),{});return this.g.initCached(t,n),this.t.debug("Loaded cached flag evaluations from persistent storage"),!0}async vn(t,e,n){var r;let i=await Nd(this.a.crypto,e);if(i===void 0){this.t.error("Could not serialize context for freshness tracking");return}let o={timestamp:n,contextHash:i};await((r=this.a.storage)==null?void 0:r.set(`${t}${ll}`,JSON.stringify(o)))}async wn(){var t;if(this.V!==void 0)return this.V;let e=await((t=this.a.storage)==null?void 0:t.get(await this.we));if(!e)return this.V=new Qa,this.V;try{this.V=Qa.fromJson(e),this.t.debug("Loaded context index from persistent storage")}catch(n){this.t.warn(`Could not load index from persistent storage: ${n.message}`),this.V=new Qa}return this.V}async Tt(t){var e,n;if(this.ve)return;let r=this.gn(),i=await this.wn(),o=await Il(this.a.crypto,this.Ot,t);this.ut>0&&i.notice(o,r);let s=i.prune(this.ut),a=this.ut<=0||s.some(h=>h.id===o);if(await Promise.all(s.flatMap(h=>{var p,f;return[(p=this.a.storage)==null?void 0:p.clear(h.id),(f=this.a.storage)==null?void 0:f.clear(`${h.id}${ll}`)]})),await((e=this.a.storage)==null?void 0:e.set(await this.we,i.toJson())),a)return;let c=this.T.getAll(),l=Object.entries(c).reduce((h,[p,f])=>(f.flag!==null&&f.flag!==void 0&&(h[p]=f.flag),h),{}),u=JSON.stringify(l);await((n=this.a.storage)==null?void 0:n.set(o,u));try{await this.vn(o,t,r)}catch(h){this.t.warn(`Failed to store freshness data: ${h.message}`)}}};function FI(){let t={};return{init(e){t=Object.entries(e).reduce((n,[r,i])=>(n[r]=i,n),{})},insertOrUpdate(e,n){t[e]=n},get(e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},getAll(){return t},applyChanges(e,n){n==="full"?this.init(e):n==="partial"&&Object.entries(e).forEach(([r,i])=>{t[r]=i})}}}function Ap(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!oo(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function AI(t,e){let n=t,r=e,i,o=new Array;return{handleFlagChanges(s,a){i?o.forEach(c=>{try{c(i,s,a)}catch(l){}}):r.warn("Received a change event without an active context. Changes will not be propagated.")},init(s,a){i=s;let c=n.getAll();n.init(a);let l=Ap(c,a);l.length>0&&this.handleFlagChanges(l,"init")},initCached(s,a){(i==null?void 0:i.canonicalKey)!==s.canonicalKey&&this.init(s,a)},applyChanges(s,a,c){i=s;let l=n.getAll();if(n.applyChanges(a,c),c==="full"){let u=Ap(l,a);u.length>0&&this.handleFlagChanges(u,"init")}else if(c==="partial"){let u=Object.keys(a);u.length>0&&this.handleFlagChanges(u,"patch")}},upsert(s,a,c){if((i==null?void 0:i.canonicalKey)!==s.canonicalKey)return r.warn("Received an update for an inactive context."),!1;let l=n.get(a);return l!==void 0&&l.version>=c.version?!1:(n.insertOrUpdate(a,c),this.handleFlagChanges([a],"patch"),!0)},on(s){o.push(s)},off(s){let a=o.indexOf(s);a>-1&&o.splice(a,1)}}}var DI=class{constructor(t,e,n,r,i,o=()=>Date.now()){this.T=FI(),this.g=AI(this.T,i),this.lt=this.En(t,e,n,r,i,o)}async En(t,e,n,r,i,o=()=>Date.now()){let s=await Vd(t.crypto,e);return new UI(t,s,n,r,this.T,this.g,i,o)}get(t){return this.r&&Object.prototype.hasOwnProperty.call(this.r,t)?this.At(this.r[t]):this.T.get(t)}getAll(){return this.r?$($({},this.T.getAll()),Object.entries(this.r).reduce((t,[e,n])=>(t[e]=this.At(n),t),{})):this.T.getAll()}presetFlags(t){this.T.init(t)}setBootstrap(t,e){this.g.init(t,e)}async init(t,e){return(await this.lt).init(t,e)}async upsert(t,e,n){return(await this.lt).upsert(t,e,n)}async loadCached(t){return(await this.lt).loadCached(t)}async applyChanges(t,e,n){return(await this.lt).applyChanges(t,e,n)}on(t){this.g.on(t)}off(t){this.g.off(t)}At(t){return{flag:{value:t,version:0},version:0}}setOverride(t,e){this.r||(this.r={}),this.r[t]=e,this.g.handleFlagChanges([t],"override")}removeOverride(t){!this.r||!Object.prototype.hasOwnProperty.call(this.r,t)||(delete this.r[t],Object.keys(this.r).length===0&&(this.r=void 0),this.g.handleFlagChanges([t],"override"))}clearAllOverrides(){if(this.r){let t=$({},this.r);this.r=void 0,this.g.handleFlagChanges(Object.keys(t),"override")}}getAllOverrides(){if(!this.r)return{};let t={};return Object.entries(this.r).forEach(([e,n])=>{t[e]=this.At(n)}),t}getDebugOverride(){return{setOverride:this.setOverride.bind(this),removeOverride:this.removeOverride.bind(this),clearAllOverrides:this.clearAllOverrides.bind(this),getAllOverrides:this.getAllOverrides.bind(this)}}},Dp="unknown hook",Xd="beforeEvaluation",Wd="afterEvaluation",JI="afterTrack";function Dr(t,e,n,r,i){try{return r()}catch(o){return t==null||t.error(`An error was encountered in "${e}" of the "${n}" hook: ${o}`),i}}function Jr(t,e){try{return e.getMetadata().name||Dp}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),Dp}}function YI(t,e,n){return e.map(r=>Dr(t,Xd,Jr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeEvaluation)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function KI(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];Dr(t,Wd,Jr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterEvaluation)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function _I(t,e,n){return e.map(r=>Dr(t,Xd,Jr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeIdentify)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function HI(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];Dr(t,Wd,Jr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterIdentify)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function zI(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];Dr(t,JI,Jr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var BI=class{constructor(t,e){this.t=t,this.F=[],this.F.push(...e)}withEvaluation(t,e,n,r){if(this.F.length===0)return r();let i=[...this.F],o={flagKey:t,context:e,defaultValue:n},s=YI(this.t,i,o),a=r();return KI(this.t,i,o,s,a),a}identify(t,e){let n=[...this.F],r={context:t,timeout:e},i=_I(this.t,n,r);return o=>{HI(this.t,n,r,i,o)}}addHook(t){this.F.push(t)}afterTrack(t){if(this.F.length===0)return;let e=[...this.F];zI(this.t,e,t)}};function jI(t){return{getMetadata(){return{name:"LaunchDarkly-Inspector-Adapter"}},afterEvaluation:(e,n,r)=>(t.onFlagUsed(e.flagKey,r,e.context),n),afterIdentify(e,n,r){return t.onIdentityChanged(e.context),n}}}function QI(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function $I(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function qI(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn($I(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var Md="flag-used",Pd="flag-details-changed",Ud="flag-detail-changed",Fd="client-identity-changed",tT=[Md,Pd,Ud,Fd];function eT(t,e){let n=tT.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(QI(t.type,t.name)),n}var nT=class{constructor(t,e){this.B=[];let n=t.filter(r=>eT(r,e));this.B=n.map(r=>qI(r,e))}hasInspectors(){return this.B.length!==0}onFlagUsed(t,e,n){this.B.forEach(r=>{r.type===Md&&r.method(t,e,n)})}onFlagsChanged(t){this.B.forEach(e=>{e.type===Pd&&e.method(t)})}onFlagChanged(t,e){this.B.forEach(n=>{n.type===Ud&&n.method(t,e)})}onIdentityChanged(t){this.B.forEach(e=>{e.type===Fd&&e.method(t)})}},rT=class{constructor(t){this.t=t,this.n=new Map}on(t,e){var n,r;if(typeof t!="string"){(n=this.t)==null||n.warn("Only string event names are supported.");return}this.n.has(t)?(r=this.n.get(t))==null||r.push(e):this.n.set(t,[e])}off(t,e){let n=this.n.get(t);if(n){if(e){let r=n.filter(i=>i!==e);r.length===0?this.n.delete(t):this.n.set(t,r);return}this.n.delete(t)}}bn(t,e,...n){var r;try{t(...n)}catch(i){(r=this.t)==null||r.error(`Encountered error invoking handler for "${e}", detail: "${i}"`)}}emit(t,...e){let n=this.n.get(t);n==null||n.forEach(r=>this.bn(r,t,...e))}eventNames(){return[...this.n.keys()]}listenerCount(t){var e,n;return(n=(e=this.n.get(t))==null?void 0:e.length)!=null?n:0}};function iT(t,e,n){let r=e.info.sdkData(),i;n.applicationInfo&&(n.applicationInfo.id&&(i=i!=null?i:{},i.id=n.applicationInfo.id),n.applicationInfo.version&&(i=i!=null?i:{},i.version=n.applicationInfo.version),n.applicationInfo.name&&(i=i!=null?i:{},i.name=n.applicationInfo.name),n.applicationInfo.versionName&&(i=i!=null?i:{},i.versionName=n.applicationInfo.versionName));let o={name:r.userAgentBase,version:r.version};r.wrapperName&&(o.wrapperName=r.wrapperName),r.wrapperVersion&&(o.wrapperVersion=r.wrapperVersion);let s={sdk:o,[n.credentialType]:t};return i&&(s.application=i),s}var{ClientMessages:Jp,ErrorKinds:Yp}=le,oT=5,sT=class{constructor(t,e,n,r,i,o){var s;if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.u=CI(),this.Mt=15,this.A=new Fp(!1),this.dt=new Fp(!0),this.Ft=!1,this.Dn=tI(),!t)throw new Error("You must configure the client with a client-side SDK key");if(!n.encoding)throw new Error("Platform must implement Encoding because btoa is required.");this.e=new gI(r,o),this.logger=this.e.logger,this.Ee=NS(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.$=new DI(this.platform,t,this.e.maxCachedContexts,(s=this.e.disableCache)!=null?s:!1,this.e.logger),this.I=XI(t,this.e,n),this.E=WI(t,this.e,n,this.Ee,this.I),this.emitter=new rT,this.emitter.on("error",(c,l)=>{this.logger.error(`error: ${l}, context: ${JSON.stringify(c)}`)}),this.$.on((c,l,u)=>{this.Sn(l,u);let h=bn.toLDContext(c);this.emitter.emit("change",h,l),l.forEach(p=>{this.emitter.emit(`change:${p}`,h)})}),this.dataManager=i(this.$,this.e,this.Ee,this.emitter,this.I);let a=[...this.e.hooks];if(this.environmentMetadata=iT(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(c=>{a.push(c)}),this.R=new BI(this.logger,a),this.Y=new nT(this.e.inspectors,this.logger),this.Y.hasInspectors()&&this.R.addHook(jI(this.Y)),r.cleanOldPersistentData&&o!=null&&o.getLegacyStorageKeys&&this.platform.storage)try{this.logger.debug("Cleaning old persistent data."),Promise.all(o.getLegacyStorageKeys().map(c=>{var l;return(l=this.platform.storage)==null?void 0:l.clear(c)})).catch(c=>{this.logger.error(`Error cleaning old persistent data: ${c}`)}).finally(()=>{this.logger.debug("Cleaned old persistent data.")})}catch(c){this.logger.error(`Error cleaning old persistent data: ${c}`)}}allFlags(){return Object.entries(this.$.getAll()).reduce((t,[e,n])=>(n.flag!==null&&n.flag!==void 0&&!n.flag.deleted&&(t[e]=n.flag.value),t),{})}async close(){var t;await this.flush(),(t=this.E)==null||t.close(),this.dataManager.close(),this.logger.debug("Closed event processor and data source.")}async flush(){var t;try{await((t=this.E)==null?void 0:t.flush()),this.logger.debug("Successfully flushed event processor.")}catch(e){return this.logger.error(`Error flushing event processor: ${e}.`),{error:e,result:!1}}return{result:!0}}getContext(){return this.u.hasContext()?md(this.u.getUnwrappedContext()):void 0}getInternalContext(){return this.u.getContext()}presetFlags(t){this.$.presetFlags(t)}async identify(t,e){let n=await this.identifyResult(t,e);if(n.status==="error")throw n.error;if(n.status==="timeout"){let r=new dd(`identify timed out after ${n.timeout} seconds.`);throw this.logger.error(r.message),r}}async identifyResult(t,e){var n,r;let i=(n=e==null?void 0:e.timeout)!=null?n:oT,o=(e==null?void 0:e.timeout)===void 0&&(e==null?void 0:e.noTimeout)===!0;i>this.Mt&&this.logger.warn(`The identify function was called with a timeout greater than ${this.Mt} seconds. We recommend a timeout of less than ${this.Mt} seconds.`);let s=this.Dn.execute({before:async()=>{let c=await GI(t,this.platform);this.autoEnvAttributes===ho.Enabled&&(c=await RI(c,this.platform,this.e));let l=bn.fromLDContext(c);if(l.valid){let u=this.R.identify(c,e==null?void 0:e.timeout);return{context:c,checkedContext:l,afterIdentify:u}}return{context:c,checkedContext:l}},execute:async c=>{var l;let{context:u,checkedContext:h}=c;if(!h.valid){let d=new Error("Context was unspecified or had no key");return this.emitter.emit("error",u,d),Promise.reject(d)}this.u.set(u,h),(l=this.E)==null||l.sendEvent(this.A.identifyEvent(h));let{identifyPromise:p,identifyResolve:f,identifyReject:m}=this.u.newIdentificationPromise();return this.logger.debug(`Identifying ${JSON.stringify(h)}`),await this.dataManager.identify(f,m,h,e),p},after:async(c,l)=>{var u,h,p;c.status==="complete"?(u=l==null?void 0:l.afterIdentify)==null||u.call(l,{status:"completed"}):c.status==="shed"?(h=l==null?void 0:l.afterIdentify)==null||h.call(l,{status:"shed"}):c.status==="error"&&((p=l==null?void 0:l.afterIdentify)==null||p.call(l,{status:"error"}))}},(r=e==null?void 0:e.sheddable)!=null?r:!1).then(c=>{if(c.status==="error"){let u={status:"error",error:c.error};return this.maybeSetInitializationResult({status:"failed",error:c.error}),u}if(c.status==="shed")return{status:"shed"};let l={status:"completed"};return this.maybeSetInitializationResult({status:"complete"}),l});if(o)return s;let a=new Promise(c=>{setTimeout(()=>{c({status:"timeout",timeout:i})},i*1e3)});return Promise.race([s,a])}maybeSetInitializationResult(t){this.initializeResult===void 0&&(this.initializeResult=t,this.emitter.emit("ready"),t.status==="complete"&&this.emitter.emit("initialized"),this.initResolve&&(this.initResolve(t),this.initResolve=void 0))}waitForInitialization(t){var e;let n=(e=t==null?void 0:t.timeout)!=null?e:5;return this.initializeResult?Promise.resolve(this.initializeResult):this.initializedPromise?this.promiseWithTimeout(this.initializedPromise,n):(this.initializedPromise||(this.initializedPromise=new Promise(r=>{this.initResolve=r})),this.promiseWithTimeout(this.initializedPromise,n))}promiseWithTimeout(t,e){let n=fd(e,"waitForInitialization");return Promise.race([t.then(r=>(n.cancel(),r)),n.promise.then(()=>({status:"complete"})).catch(()=>({status:"timeout"}))]).catch(r=>{var i;return(i=this.logger)==null||i.error(r.message),{status:"failed",error:r}})}on(t,e){this.emitter.on(t,e)}off(t,e){this.emitter.off(t,e)}track(t,e,n){var r,i;if(!this.u.hasValidContext()){this.logger.warn(Jp.MissingContextKeyNoEvent);return}n!==void 0&&!N.Number.is(n)&&((r=this.logger)==null||r.warn(Jp.invalidMetricValue(typeof n))),(i=this.E)==null||i.sendEvent(this.e.trackEventModifier(this.A.customEvent(t,this.u.getContext(),e,n))),this.R.afterTrack({key:t,context:this.u.getUnwrappedContext(),data:e,metricValue:n})}ht(t,e,n,r){var i,o,s,a,c;let l=this.u.hasContext();l||(i=this.logger)==null||i.warn("Flag evaluation called before client is fully initialized, data from this evaulation could be stale.");let u=this.u.getContext(),h=this.$.get(t);if(h===void 0||h.flag.deleted){let b=e!=null?e:null;return(o=this.logger)==null||o.warn(`Unknown feature flag "${t}"; returning default value ${b}.`),l&&((s=this.E)==null||s.sendEvent(this.A.unknownFlagEvent(t,b,u))),Pp(Yp.FlagNotFound,e)}let{reason:p,value:f,variation:m,prerequisites:d}=h.flag;if(r){let[b,w]=r(f);if(!b){l&&((a=this.E)==null||a.sendEvent(n.evalEventClient(t,e,e,h.flag,u,p)));let E=new xS(`Wrong type "${w}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.u.getUnwrappedContext(),E),Pp(Yp.WrongType,e)}}let g=Up(f,m,p);return f==null&&(this.logger.debug("Result value is null. Providing default value."),g.value=e),d==null||d.forEach(b=>{this.ht(b,void 0,this.A)}),l&&((c=this.E)==null||c.sendEvent(n.evalEventClient(t,f,e,h.flag,u,p))),g}variation(t,e){let{value:n}=this.R.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.ht(t,e,this.A));return n}variationDetail(t,e){return this.R.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.ht(t,e,this.dt))}H(t,e,n,r){return this.R.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.ht(t,e,n,r))}boolVariation(t,e){return this.H(t,e,this.A,n=>[N.Boolean.is(n),N.Boolean.getType()]).value}jsonVariation(t,e){return this.variation(t,e)}numberVariation(t,e){return this.H(t,e,this.A,n=>[N.Number.is(n),N.Number.getType()]).value}stringVariation(t,e){return this.H(t,e,this.A,n=>[N.String.is(n),N.String.getType()]).value}boolVariationDetail(t,e){return this.H(t,e,this.dt,n=>[N.Boolean.is(n),N.Boolean.getType()])}numberVariationDetail(t,e){return this.H(t,e,this.dt,n=>[N.Number.is(n),N.Number.getType()])}stringVariationDetail(t,e){return this.H(t,e,this.dt,n=>[N.String.is(n),N.String.getType()])}jsonVariationDetail(t,e){return this.variationDetail(t,e)}addHook(t){this.R.addHook(t)}setEventSendingEnabled(t,e){var n,r,i,o;this.Ft!==t&&(this.Ft=t,t?(this.logger.debug("Starting event processor"),(n=this.E)==null||n.start()):e?((r=this.logger)==null||r.debug("Flushing event processor before disabling."),this.flush().then(()=>{var s,a;this.Ft||((s=this.logger)==null||s.debug("Stopping event processor."),(a=this.E)==null||a.close())})):((i=this.logger)==null||i.debug("Stopping event processor."),(o=this.E)==null||o.close()))}sendEvent(t){var e;(e=this.E)==null||e.sendEvent(t)}getDebugOverrides(){var t,e;return(e=(t=this.$).getDebugOverride)==null?void 0:e.call(t)}Sn(t,e){if(!this.Y.hasInspectors())return;let n={};t.forEach(r=>{let i=this.$.get(r);if(i!=null&&i.flag&&!i.flag.deleted){let{reason:o,value:s,variation:a}=i.flag;n[r]=Up(s,a,o)}else n[r]={value:void 0,variationIndex:null}}),e==="init"?this.Y.onFlagsChanged(n):e==="patch"&&Object.entries(n).forEach(([r,i])=>{this.Y.onFlagChanged(r,i)})}};function aT(t,e,n){n.forEach(r=>{var i;try{(i=r.registerDebug)==null||i.call(r,e)}catch(o){t.error(`Exception thrown registering plugin ${le.safeGetName(t,r)}.`)}})}function Ad(t,e){let n=Object.keys(e),r="$flagsState",i="$valid",o=e[r];!o&&n.length&&t.warn("LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."),e[i]===!1&&t.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");let s={};return n.forEach(a=>{if(a!==r&&a!==i){let c;o&&o[a]?c=$({value:e[a]},o[a]):c={value:e[a],version:0},s[a]={version:c.version,flag:c}}}),s}function Kp(t){return{polling:()=>({pathGet(e,n){return`/sdk/evalx/${t}/contexts/${po(n,e)}`},pathReport(e,n){return`/sdk/evalx/${t}/context`},pathPost(e,n){throw new Error("Post for FDv1 unsupported.")},pathPing(e,n){throw new Error("Ping for polling unsupported.")}}),streaming:()=>({pathGet(e,n){return`/eval/${t}/${po(n,e)}`},pathReport(e,n){return`/eval/${t}`},pathPost(e,n){throw new Error("Post for FDv1 unsupported.")},pathPing(e,n){return`/ping/${t}`}})}}function lT(){return{polling:()=>({pathGet(t,e){return`/sdk/poll/eval/${po(e,t)}`},pathReport(t,e){throw new Error("Report for FDv2 unsupported.")},pathPost(t,e){return"/sdk/poll/eval"},pathPing(t,e){throw new Error("Ping for polling unsupported.")}}),streaming:()=>({pathGet(t,e){return`/sdk/stream/eval/${po(e,t)}`},pathReport(t,e){throw new Error("Report for FDv2 unsupported.")},pathPost(t,e){return"/sdk/stream/eval"},pathPing(t,e){throw new Error("Ping for streaming unsupported.")}})}}function cT(t,e,n){return{async handlePut(r,i){n.debug(`Got PUT: ${Object.keys(i)}`);let o=Object.entries(i).reduce((s,[a,c])=>(s[a]={version:c.version,flag:c},s),{});await t.init(r,o),e.requestStateUpdate("VALID")},async handlePatch(r,i){n.debug(`Got PATCH ${JSON.stringify(i,null,2)}`),t.upsert(r,i.key,{version:i.version,flag:i})},async handleDelete(r,i){n.debug(`Got DELETE ${JSON.stringify(i,null,2)}`),t.upsert(r,i.key,{version:i.version,flag:ce($({},i),{deleted:!0,flagVersion:0,value:void 0,variation:0,trackEvents:!1})})},handleStreamingError(r){e.reportError(r.kind,r.message,r.code,r.recoverable)},handlePollingError(r){e.reportError(r.kind,r.message,r.status,r.recoverable)}}}function Dd(t,e=()=>Date.now()){let n="CLOSED",r=e(),i;function o(){return{state:n,stateSince:r,lastError:i}}function s(a,c=!1){let l=a==="INTERRUPTED"&&n==="INITIALIZING"?"INITIALIZING":a,u=n!==l;u&&(n=l,r=e()),(u||c)&&t.emit("dataSourceStatus",o())}return{get status(){return o()},requestStateUpdate(a){s(a)},reportError(a,c,l,u=!1){i={kind:a,message:c,statusCode:l,time:e()},s(u?"INTERRUPTED":"CLOSED",!0)}}}function _p(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var uT=class{constructor(t,e,n,r,i){this.kn=t,this.In=e,this.Cn=n,this.m=r,this.t=i,this.h=!1}async be(){var t,e,n,r,i,o,s;if(this.h)return;let a=h=>{var p,f,m;(p=this.t)==null||p.error("Polling received invalid data"),(f=this.t)==null||f.debug(`Invalid JSON follows: ${h}`),(m=this.m)==null||m.call(this,new uo(xt.InvalidData,"Malformed JSON data in polling response"))};(t=this.t)==null||t.debug("Polling LaunchDarkly for feature flag updates");let c=Date.now();try{let h=await this.kn.requestPayload();try{if(this.h){_p(this.t);return}let p=JSON.parse(h);try{(e=this.Cn)==null||e.call(this,p)}catch(f){(n=this.t)==null||n.error(`Exception from data handler: ${f}`)}}catch(p){a(h)}}catch(h){if(this.h){_p(this.t);return}let p=h;if(p.status!==void 0&&!nr(p.status)){(r=this.t)==null||r.error(Ve(h,"polling request")),(i=this.m)==null||i.call(this,new uo(xt.ErrorResponse,p.message,p.status));return}(o=this.t)==null||o.error(Ve(h,"polling request","will retry"))}let l=Date.now()-c,u=Math.max(this.In*1e3-l,0);(s=this.t)==null||s.debug("Elapsed: %d ms, sleeping for %d ms",l,u),this.$t=setTimeout(()=>{this.be()},u)}start(){this.be()}stop(){this.$t&&(clearTimeout(this.$t),this.$t=void 0),this.h=!0}close(){this.stop()}},hT=(t,e,n,r)=>{n==null||n.error(`Stream received invalid data in "${t}" message`),n==null||n.debug(`Invalid JSON follows: ${e}`),r==null||r(new rl(xt.InvalidData,"Malformed JSON data in event stream"))};function pT(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function Hp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var dT=class{constructor(t,e,n,r,i,o,s,a,c){var l;this.Pn=t,this.Rt=e,this.n=n,this.z=r,this.xn=o,this.I=s,this.m=a,this.t=c,this.h=!1;let u;e.useReport&&!r.getEventSourceCapabilities().customMethod?u=e.paths.pathPing(i,t):u=e.useReport?e.paths.pathReport(i,t):e.paths.pathGet(i,t);let h=[...(l=e.queryParameters)!=null?l:[]];this.Rt.withReasons&&h.push({key:"withReasons",value:"true"}),this.z=r,this.De=$({},e.baseHeaders),this.t=c,this.Ln=ud(e.serviceEndpoints,u,h)}Se(){this.ft=Date.now()}Nt(t){this.ft&&this.I&&this.I.recordStreamInit(this.ft,!t,Date.now()-this.ft),this.ft=void 0}On(t){var e,n,r;return yl(t)?((r=this.t)==null||r.warn(Ve(t,"streaming request","will retry")),this.Nt(!1),this.Se(),!0):(this.Nt(!1),(e=this.m)==null||e.call(this,new rl(xt.ErrorResponse,t.message,t.status,!1)),(n=this.t)==null||n.error(Ve(t,"streaming request")),!1)}start(){this.Se();let t;this.Rt.useReport?(this.De["content-type"]="application/json",t={method:"REPORT",body:this.Pn}):t={};let e=this.z.createEventSource(this.Ln,ce($({headers:this.De},t),{errorFilter:n=>this.On(n),initialRetryDelayMillis:this.Rt.initialRetryDelayMillis,readTimeoutMillis:300*1e3,retryResetIntervalMillis:60*1e3}));this.ke=e,e.onclose=()=>{var n;(n=this.t)==null||n.info("Closed LaunchDarkly stream connection")},e.onerror=()=>{},e.onopen=()=>{var n;(n=this.t)==null||n.info("Opened LaunchDarkly stream connection")},e.onretrying=n=>{var r;(r=this.t)==null||r.info(`Will retry stream connection in ${n.delayMillis} milliseconds`)},this.n.forEach(({deserializeData:n,processJson:r},i)=>{e.addEventListener(i,o=>{var s,a;if(this.h){pT(i,this.t);return}if((s=this.t)==null||s.debug(`Received ${i} event`),o!=null&&o.data){this.Nt(!0);let{data:c}=o,l=n(c);if(!l){hT(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new rl(xt.InvalidData,"Unexpected payload from event stream"))})}),e.addEventListener("ping",async()=>{var n,r,i,o,s,a,c;(n=this.t)==null||n.debug("Got PING, going to poll LaunchDarkly for feature flag updates");try{let l=await this.xn.requestPayload();try{if(this.h){Hp(this.t);return}let u=JSON.parse(l);try{(r=this.n.get("put"))==null||r.processJson(u)}catch(h){(i=this.t)==null||i.error(`Exception from data handler: ${h}`)}}catch(u){(o=this.t)==null||o.error("Polling after ping received invalid data"),(s=this.t)==null||s.debug(`Invalid JSON follows: ${l}`),(a=this.m)==null||a.call(this,new uo(xt.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.h){Hp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new uo(xt.ErrorResponse,u.message,u.status))}})}stop(){var t;(t=this.ke)==null||t.close(),this.ke=void 0,this.h=!0}close(){this.stop()}},fT=class{constructor(t,e,n,r,i,o,s,a,c){this.platform=t,this.flagManager=e,this.credential=n,this.config=r,this.getPollingPaths=i,this.getStreamingPaths=o,this.baseHeaders=s,this.emitter=a,this.diagnosticsManager=c,this.closed=!1,this.logger=r.logger,this.dataSourceStatusManager=Dd(a),this.G=cT(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.Tn=t}createPollingProcessor(t,e,n,r,i){let o=new uT(n,this.config.pollInterval,async s=>{await this.G.handlePut(e,s),r==null||r()},s=>{this.emitter.emit("error",t,s),this.G.handlePollingError(s),i==null||i(s)},this.logger);this.updateProcessor=this.Ie(o,this.dataSourceStatusManager)}createStreamingProcessor(t,e,n,r,i){var o;let s=new dT(JSON.stringify(t),{credential:this.credential,serviceEndpoints:this.config.serviceEndpoints,paths:this.getStreamingPaths(),baseHeaders:this.baseHeaders,initialRetryDelayMillis:this.config.streamInitialReconnectDelay*1e3,withReasons:this.config.withReasons,useReport:this.config.useReport,queryParameters:(o=this.Tn)==null?void 0:o.queryParameters},this.createStreamListeners(e,r),this.platform.requests,this.platform.encoding,n,this.diagnosticsManager,a=>{this.emitter.emit("error",t,a),this.G.handleStreamingError(a),i==null||i(a)},this.logger);this.updateProcessor=this.Ie(s,this.dataSourceStatusManager)}createStreamListeners(t,e){let n=new Map;return n.set("put",{deserializeData:JSON.parse,processJson:async r=>{await this.G.handlePut(t,r),e==null||e()}}),n.set("patch",{deserializeData:JSON.parse,processJson:async r=>{this.G.handlePatch(t,r)}}),n.set("delete",{deserializeData:JSON.parse,processJson:async r=>{this.G.handleDelete(t,r)}}),n}Ie(t,e){return{start:()=>{e.requestStateUpdate("INITIALIZING"),t.start()},stop:()=>{t.stop(),e.requestStateUpdate("CLOSED")},close:()=>{t.close(),e.requestStateUpdate("CLOSED")}}}close(){var t;(t=this.updateProcessor)==null||t.close(),this.closed=!0}};function mT(t,e){return Object.entries(t).every(([n,r])=>r===void 0||e[n]===r)}var yT={foreground:"foregroundMode",background:"backgroundMode"};function gT(t,e){let n=t.find(r=>mT(r.conditions,e));if(n){let{mode:r}=n;return typeof r=="object"?e[yT[r.configured]]:r}return e.foregroundMode}var bT=[{conditions:{networkAvailable:!1},mode:"offline"},{conditions:{},mode:{configured:"foreground"}}];function Yr(t,e,n,r){return{type:"changeSet",payload:t,fdv1Fallback:e,environmentId:n,freshness:r}}function Mt(t,e){return{type:"status",state:"interrupted",errorInfo:t,fdv1Fallback:e}}function Oe(){return{type:"status",state:"shutdown",fdv1Fallback:!1}}function Pr(t,e){return{type:"status",state:"terminal_error",errorInfo:t,fdv1Fallback:e}}function Jd(t,e){return{type:"status",state:"goodbye",reason:t,fdv1Fallback:e}}function Qn(t){return{kind:xt.ErrorResponse,message:`Unexpected status code: ${t}`,statusCode:t,time:Date.now()}}function yo(t){return{kind:xt.NetworkError,message:t,time:Date.now()}}function vn(t){return{kind:xt.InvalidData,message:t,time:Date.now()}}function Ur(t){return{kind:xt.Unknown,message:t,time:Date.now()}}function vT(t){let e=t,{version:n}=e;return hl(e,["version"])}async function wT(t){let{storage:e,crypto:n,environmentNamespace:r,context:i,logger:o}=t;if(!e)return o==null||o.debug("No storage available for cache initializer"),Mt(Ur("No storage available"),!1);let s=await Gd(e,n,r,i,o);if(!s)return o==null||o.debug("Cache miss for context"),Mt(Ur("Cache miss"),!1);let a={version:0,type:"full",updates:Object.entries(s.flags).map(([l,u])=>({kind:"flag-eval",key:l,version:u.version,object:vT(u)}))},c=await MI(e,n,r,i,o);return o==null||o.debug("Loaded cached flag evaluations via cache initializer"),Yr(a,!1,void 0,c)}function ST(t){return e=>{let n,r=new Promise(i=>{n=i});return{async run(){return Promise.race([r,wT(t)])},close(){n==null||n(Oe()),n=void 0}}}}function Yd(t,e,n,r,i,o,s,a){let c=$({},o),l,u="GET",h;return a?(u="POST",c["content-type"]="application/json",l=t,h=n.pathPost(i,t)):h=n.pathGet(i,t),{async poll(p){let f=[...s!=null?s:[]];p&&f.push({key:"basis",value:p});let m=hd(e,h,f),d=await r.fetch(m,{method:u,headers:c,body:l}),g=d.status===304?null:await d.text();return{status:d.status,headers:d.headers,body:g}}}}function Kd(t){return t}function IT(t){if(t.deleted)return{version:t.version,flag:{version:t.version,deleted:!0,value:void 0,trackEvents:!1}};let e=t.object;return{version:t.version,flag:ce($({},e),{version:t.version})}}function TT(t){let e={};return t.forEach(n=>{n.kind==="flag-eval"&&(e[n.key]=IT(n))}),e}function ET(t){let e=t.get("x-ld-fd-fallback");return e!==null&&e.toLowerCase()==="true"}function RT(t){var e;return(e=t.get("x-ld-envid"))!=null?e:void 0}function CT(t,e,n,r){let i=le.createProtocolHandler({"flag-eval":Kd},r),o;if(t.forEach(a=>{if(o)return;let c=i.processEvent(a);switch(c.type){case"payload":o=Yr(c.payload,e,n);break;case"goodbye":o=Jd(c.reason,e);break;case"serverError":{let l=Ur(c.reason);r==null||r.error(`Server error during polling: ${c.reason}`),o=Mt(l,e);break}case"error":{if(c.kind==="MISSING_PAYLOAD"||c.kind==="PROTOCOL_ERROR"){let l=vn(c.message);r==null||r.warn(`Protocol error during polling: ${c.message}`),o=Mt(l,e)}else r==null||r.warn(c.message);break}}}),o)return o;let s=Ur("Unexpected end of polling response");return r==null||r.error("Unexpected end of polling response"),Mt(s,e)}async function El(t,e,n){var r;let i=!1,o;try{let s=await t.poll(e);if(i=ET(s.headers),o=RT(s.headers),s.status===304)return Yr({version:0,type:"none",updates:[]},i,o);if(s.status<200||s.status>=300){let c=Qn(s.status);return n==null||n.error(`Polling request failed with HTTP error: ${s.status}`),s.status<=0||nr(s.status)?Mt(c,i):Pr(c,i)}if(!s.body){let c=vn("Empty response body");return n==null||n.error("Polling request received empty response body"),Mt(c,i)}let a;try{a=JSON.parse(s.body)}catch(c){let l=vn("Malformed JSON data in polling response");return n==null||n.error("Polling request received malformed data"),Mt(l,i)}if(!Array.isArray(a.events)){let c=vn("Invalid polling response: missing or invalid events array");return n==null||n.error("Polling response does not contain a valid events array"),Mt(c,i)}return CT(a.events,i,o,n)}catch(s){let a=(r=s==null?void 0:s.message)!=null?r:String(s);n==null||n.error(`Polling request failed with network error: ${a}`);let c=yo(a);return Mt(c,i)}}var $a=Symbol("shutdown");function kT(t,e,n){let r,i=new Promise(o=>{r=o});return{async run(){let o=n(),s;for(let c=0;c<=3;c+=1){let l=await Promise.race([i,El(t,o,e)]);if(l===$a)return Oe();if(l.type==="changeSet"||l.state!=="interrupted")return l;if(s=l,c<3&&(e==null||e.warn(`Recoverable polling error (attempt ${c+1}/4), retrying in 1000ms...`),await Promise.race([i,gl(1e3)])===$a))return Oe()}let a=s;return Pr(a.errorInfo,a.fdv1Fallback)},close(){r==null||r($a),r=void 0}}}function Rl(){let t=[],e=[];return{put(n){let r=e.shift();r?r(n):t.push(n)},take(){return t.length>0?Promise.resolve(t.shift()):new Promise(n=>{e.push(n)})}}}function ZT(t,e,n,r){let i=Rl(),o,s=new Promise(u=>{o=u}),a,c=!1;async function l(){if(c)return;let u=Date.now();try{let h=await El(t,n(),e);if(c)return;let p=!1;if(h.type==="status")switch(h.state){case"terminal_error":c=!0,p=!0;break;case"interrupted":case"goodbye":break;case"shutdown":break;default:break}p?(o==null||o(h),o=void 0):i.put(h)}catch(h){e==null||e.debug(`Polling error: ${h}`)}if(!c){let h=Date.now()-u,p=Math.min(Math.max(r-h,0),r);a=setTimeout(()=>{l()},p)}}return l(),{async next(){return Promise.race([s,i.take()])},close(){c=!0,a!==void 0&&(clearTimeout(a),a=void 0),o==null||o(Oe()),o=void 0}}}function cl(t,e){var n,r;let i=(n=e==null?void 0:e.isFDv1Fallback)!=null?n:!1,o=(r=e==null?void 0:e.initialState)!=null?r:i?"blocked":"available";return{factory:t,isFDv1Fallback:i,state:o}}function xT(t,e,n){let r,i=-1,o=-1,s=!1;function a(){r&&(r.close(),r=void 0)}function c(){return e.findIndex(l=>l.state==="available")}return{get isShutdown(){return s},getNextInitializerAndSetActive(){if(s||(i+=1,i>=t.length))return;a();let l=t[i](n);return r=l,l},getNextAvailableSynchronizerAndSetActive(){if(s||e.length===0)return;let l=0;for(;l<e.length;){o+=1,o>=e.length&&(o=0);let u=e[o];if(u.state==="available"){a();let h=u.factory(n);return r=h,h}l+=1}},blockCurrentSynchronizer(){o>=0&&o<e.length&&(e[o].state="blocked")},resetSourceIndex(){o=-1},fdv1Fallback(){e.forEach(l=>{l.state=l.isFDv1Fallback?"available":"blocked"}),o=-1},isPrimeSynchronizer(){return o===c()},getAvailableSynchronizerCount(){return e.filter(l=>l.state==="available").length},hasFDv1Fallback(){return e.some(l=>l.isFDv1Fallback)},close(){s=!0,a()}}}var VT=["server-intent","put-object","delete-object","payload-transferred","goodbye","error","heart-beat"];function OT(t){let e=Rl(),n=le.createProtocolHandler({"flag-eval":Kd},t.logger),r=$({},t.headers);function i(){var g;let b=[...t.parameters],w=(g=t.selectorGetter)==null?void 0:g.call(t);return w&&b.push({key:"basis",value:encodeURIComponent(w)}),ud(t.serviceEndpoints,t.streamUriPath,b)}let o,s,a=!1,c=!1,l=!1;function u(){s=Date.now()}function h(g){s&&t.diagnosticsManager&&t.diagnosticsManager.recordStreamInit(s,!g,Date.now()-s),s=void 0}function p(g){switch(g.type){case"payload":h(!0),e.put(Yr(g.payload,a));break;case"goodbye":e.put(Jd(g.reason,a));break;case"serverError":e.put(Mt(Ur(g.reason),a));break;case"error":(g.kind==="MISSING_PAYLOAD"||g.kind==="PROTOCOL_ERROR")&&e.put(Mt(vn(g.message),a));break}}function f(g){var b,w,E,I,S,T;return((b=g.headers)==null?void 0:b["x-ld-fd-fallback"])==="true"?(a=!0,h(!1),e.put(Pr(Qn((w=g.status)!=null?w:0),!0)),!1):yl(g)?((S=t.logger)==null||S.warn(Ve(g,"streaming request","will retry")),h(!1),u(),e.put(Mt(Qn((T=g.status)!=null?T:0),a)),!0):((E=t.logger)==null||E.error(Ve(g,"streaming request")),h(!1),e.put(Pr(Qn((I=g.status)!=null?I:0),a)),!1)}function m(g){VT.forEach(b=>{g.addEventListener(b,w=>{var E,I,S,T,x;if(l){(E=t.logger)==null||E.debug(`Received ${b} event after processor was closed. Skipping.`);return}if(!(w!=null&&w.data)){b!=="error"&&((I=t.logger)==null||I.warn(`Event from EventStream missing data for "${b}".`));return}(S=t.logger)==null||S.debug(`Received ${b} event`);let Z;try{Z=JSON.parse(w.data)}catch(O){(T=t.logger)==null||T.error(`Stream received data that was unable to be parsed in "${b}" message`),(x=t.logger)==null||x.debug(`Data follows: ${w.data}`),e.put(Mt(vn("Malformed JSON in EventStream"),a));return}let k=n.processEvent({event:b,data:Z});p(k)})})}function d(g){g.addEventListener("ping",async()=>{var b,w,E,I,S,T,x;if(l){(b=t.logger)==null||b.debug("Ping received after processor was closed. Skipping.");return}if((w=t.logger)==null||w.debug("Got PING, going to poll LaunchDarkly for feature flag updates"),!t.pingHandler){(E=t.logger)==null||E.warn("Ping event received but no ping handler configured.");return}try{let Z=await t.pingHandler.handlePing();if(l){(I=t.logger)==null||I.debug("Ping completed after processor was closed. Skipping processing.");return}e.put(Z)}catch(Z){if(l)return;(T=t.logger)==null||T.error(`Error handling ping: ${(S=Z==null?void 0:Z.message)!=null?S:Z}`),e.put(Mt(yo((x=Z==null?void 0:Z.message)!=null?x:"Error during ping poll"),a))}})}return{start(){if(c||l)return;c=!0,u();let g=t.requests.createEventSource(i(),{headers:r,errorFilter:b=>f(b),initialRetryDelayMillis:t.initialRetryDelayMillis,readTimeoutMillis:300*1e3,retryResetIntervalMillis:60*1e3,urlBuilder:i});o=g,m(g),d(g),g.onclose=()=>{var b;(b=t.logger)==null||b.info("Closed LaunchDarkly stream connection")},g.onerror=b=>{var w;l||b&&typeof b.status=="number"||e.put(Mt(yo((w=b==null?void 0:b.message)!=null?w:"IO Error"),a))},g.onopen=()=>{var b;(b=t.logger)==null||b.info("Opened LaunchDarkly stream connection"),n.reset()},g.onretrying=b=>{var w;(w=t.logger)==null||w.info(`Will retry stream connection in ${b.delayMillis} milliseconds`)}},close(){l||(l=!0,o==null||o.close(),o=void 0,e.put(Oe()))},takeResult(){return e.take()}}}function NT(t){let e=!1,n,r=new Promise(i=>{n=i});return{run(){return e?Promise.resolve(Oe()):(t.start(),Promise.race([t.takeResult().then(i=>(t.close(),i)),r]))},close(){e||(e=!0,t.close(),n==null||n(Oe()),n=void 0)}}}function GT(t){let e=!1,n=!1,r,i=new Promise(o=>{r=o});return{next(){return n?Promise.resolve(Oe()):(e||(e=!0,t.start()),Promise.race([t.takeResult(),i]))},close(){n||(n=!0,t.close(),r==null||r(Oe()),r=void 0)}}}function LT(t,e,n){return{handlePing:()=>El(t,e(),n)}}function _d(t,e){var n,r;return!(e!=null&&e.pollingBaseUri)&&!(e!=null&&e.streamingBaseUri)?t.serviceEndpoints:new tr((n=e.streamingBaseUri)!=null?n:t.serviceEndpoints.streaming,(r=e.pollingBaseUri)!=null?r:t.serviceEndpoints.polling,t.serviceEndpoints.events,t.serviceEndpoints.analyticsEventPath,t.serviceEndpoints.diagnosticEventPath,t.serviceEndpoints.includeAuthorizationHeader,t.serviceEndpoints.payloadFilterKey)}function ul(t,e){if(!(e!=null&&e.pollingBaseUri))return t.requestor;let n=_d(t,e);return Yd(t.plainContextString,n,t.polling.paths,t.requests,t.encoding,t.baseHeaders,t.queryParams)}function zp(t,e,n){var r;let i=_d(e,t.endpoints),o=ul(e,t.endpoints),s=e.streaming.paths.pathGet(e.encoding,e.plainContextString);return OT({requests:e.requests,serviceEndpoints:i,streamUriPath:s,parameters:e.queryParams,selectorGetter:n,headers:e.baseHeaders,initialRetryDelayMillis:((r=t.initialReconnectDelay)!=null?r:e.streaming.initialReconnectDelaySeconds)*1e3,logger:e.logger,pingHandler:LT(o,n,e.logger)})}function XT(){return{createInitializerFactory(t,e){switch(t.type){case"polling":{let n=ul(e,t.endpoints);return r=>kT(n,e.logger,r)}case"streaming":return n=>NT(zp(t,e,n));case"cache":return ST({storage:e.storage,crypto:e.crypto,environmentNamespace:e.environmentNamespace,context:e.context,logger:e.logger});default:return}},createSynchronizerSlot(t,e){var n;switch(t.type){case"polling":{let r=((n=t.pollInterval)!=null?n:e.polling.intervalSeconds)*1e3,i=ul(e,t.endpoints);return cl(o=>ZT(i,e.logger,o,r))}case"streaming":return cl(r=>GT(zp(t,e,r)));default:return}}}}function WT(t){return{version:1,type:"full",updates:Object.entries(t).map(([e,n])=>{var r;return{kind:"flag",key:e,version:(r=n.version)!=null?r:1,object:n}})}}function MT(t,e,n){let r=Rl(),i,o=new Promise(h=>{i=h}),s,a=!1,c=!1;function l(h){if(!a){let p=Date.now()-h,f=Math.min(Math.max(e-p,0),e);s=setTimeout(u,f)}}async function u(){if(a)return;n==null||n.debug("Polling FDv1 endpoint for feature flag updates");let h=Date.now();try{let p=await t.requestPayload();if(a)return;let f;try{let m=JSON.parse(p);f=WT(m)}catch(m){n==null||n.error("FDv1 polling received malformed data"),r.put({type:"status",state:"interrupted",errorInfo:vn("Malformed data in FDv1 polling response"),fdv1Fallback:!1}),l(h);return}r.put(Yr(f,!1))}catch(p){if(a)return;let f=p;if(f.status!==void 0&&!nr(f.status)){n==null||n.error(Ve(p,"FDv1 polling request")),a=!0,i==null||i(Pr(Qn(f.status),!1)),i=void 0;return}n==null||n.warn(Ve(p,"FDv1 polling request","will retry")),r.put({type:"status",state:"interrupted",errorInfo:f.status?Qn(f.status):yo(f.message),fdv1Fallback:!1})}l(h)}return{next(){return c||(c=!0,u()),Promise.race([o,r.take()])},close(){a=!0,s!==void 0&&(clearTimeout(s),s=void 0),i==null||i(Oe()),i=void 0}}}var Hd=120*1e3,zd=300*1e3;function PT(t,e,n){let r=fd(t/1e3,n);return{promise:r.promise.then(()=>new Promise(()=>{}),()=>e),cancel:r.cancel}}function Bd(t,e,n){let r,i,o=!1,s=new Promise(l=>{r=l});function a(){!i&&!o&&(i=PT(t,e,`${e} condition`),i.promise.then(l=>{i=void 0,r==null||r(l)}))}function c(){i==null||i.cancel(),i=void 0}return n||a(),{promise:s,inform(l){o||n==null||n(l,{start:a,cancel:c})},close(){o=!0,c()}}}function Bp(t){return Bd(t,"fallback",(e,{start:n,cancel:r})=>{e.type==="changeSet"?r():e.type==="status"&&e.state==="interrupted"&&n()})}function UT(t){return Bd(t,"recovery")}function jp(t){return{promise:t.length===0?void 0:Promise.race(t.map(e=>e.promise)),inform(e){t.forEach(n=>n.inform(e))},close(){t.forEach(e=>e.close())}}}function FT(t,e,n=Hd,r=zd){return t<=1?jp([]):jp(e?[Bp(n)]:[Bp(n),UT(r)])}function AT(t){let{initializerFactories:e,synchronizerSlots:n,dataCallback:r,statusManager:i,selectorGetter:o,logger:s,fallbackTimeoutMs:a=Hd,recoveryTimeoutMs:c=zd}=t,l=!1,u=!1,h=!1,p,f,m=xT(e,n,o);function d(){l||(l=!0,p==null||p(),p=void 0,f=void 0)}function g(T){r(T.payload),i.requestStateUpdate("VALID")}function b(T){T.errorInfo&&i.reportError(T.errorInfo.kind,T.errorInfo.message,T.errorInfo.statusCode,T.state==="interrupted")}function w(T){return T.fdv1Fallback&&m.hasFDv1Fallback()?(m.fdv1Fallback(),!0):!1}async function E(){for(var T,x;!u;){let Z=m.getNextInitializerAndSetActive();if(Z===void 0)break;let k=await Z.run();if(u)return;if(k.type==="changeSet"){if(g(k),w(k)){h=!0;break}if(k.payload.state){d();return}h=!0}else if(k.type==="status"){switch(k.state){case"interrupted":case"terminal_error":s==null||s.warn(`Initializer failed: ${(x=(T=k.errorInfo)==null?void 0:T.message)!=null?x:"unknown error"}`),b(k);break;case"shutdown":return}w(k)}}h&&d()}async function I(){for(var T,x,Z,k;!u;){let O=m.getNextAvailableSynchronizerAndSetActive();if(O===void 0){l||(f==null||f(new Error("All data sources exhausted without receiving data.")),p=void 0,f=void 0);return}let X=FT(m.getAvailableSynchronizerCount(),m.isPrimeSynchronizer(),a,c);X.promise&&(s==null||s.debug("Fallback condition active for current synchronizer."));let _=!0;try{for(;!u&&_;){let tt=[O.next().then(v=>({source:"sync",value:v}))];X.promise!==void 0&&tt.push(X.promise.then(v=>({source:"condition",value:v})));let y=await Promise.race(tt);if(u)return;if(y.source==="condition"){let v=y.value;v==="fallback"?s==null||s.warn("Fallback condition fired, moving to next synchronizer."):v==="recovery"&&(s==null||s.info("Recovery condition fired, resetting to primary synchronizer."),m.resetSourceIndex()),_=!1}else{let v=y.value;if(X.inform(v),v.type==="changeSet")g(v),l||d();else if(v.type==="status")switch(v.state){case"interrupted":s==null||s.warn(`Synchronizer interrupted: ${(x=(T=v.errorInfo)==null?void 0:T.message)!=null?x:"unknown error"}`),b(v);break;case"terminal_error":s==null||s.error(`Synchronizer terminal error: ${(k=(Z=v.errorInfo)==null?void 0:Z.message)!=null?k:"unknown error"}`),b(v),m.blockCurrentSynchronizer(),_=!1;break;case"shutdown":return;case"goodbye":break;default:break}w(v)&&(_=!1)}}}finally{X.close()}}}async function S(){if(e.length===0&&n.length===0){i.requestStateUpdate("VALID"),d();return}await E(),u||await I()}return{start(){return new Promise((T,x)=>{p=T,f=x,i.requestStateUpdate("INITIALIZING"),S().then(()=>{l||(f==null||f(new Error("Data source closed before initialization completed.")),p=void 0,f=void 0)}).catch(Z=>{l?s==null||s.error(`Orchestration error: ${Z}`):(f==null||f(Z instanceof Error?Z:new Error(String(Z))),p=void 0,f=void 0)})})},close(){u=!0,m.close()}}}var DT=1e3;function JT(t){let{initialState:e,onReconcile:n,debounceMs:r=DT}=t,{networkState:i,lifecycleState:o,requestedMode:s}=e,a,c=!1;function l(){return{networkState:i,lifecycleState:o,requestedMode:s}}function u(){c||(a!==void 0&&clearTimeout(a),a=setTimeout(()=>{a=void 0,c||n(l())},r))}return{setNetworkState(h){i!==h&&(i=h,u())},setLifecycleState(h){o!==h&&(o=h,u())},setRequestedMode(h){s!==h&&(s=h,u())},close(){c=!0,a!==void 0&&(clearTimeout(a),a=void 0)}}}var ae="[FDv2DataManagerBase]";function YT(t){var e;let{platform:n,flagManager:r,config:i,baseHeaders:o,emitter:s,transitionTable:a,foregroundMode:c,backgroundMode:l,modeTable:u,sourceFactoryProvider:h,buildQueryParams:p,fdv1Endpoints:f,fallbackTimeoutMs:m,recoveryTimeoutMs:d}=t,{logger:g}=i,b=Dd(s),w=lT(),E=(e=i.dataSystem)!=null&&e.connectionModes?$($({},u),i.dataSystem.connectionModes):u,I,S=c,T=c,x,Z,k,O,X=!1,_=!1,tt=!1,y,v,V,D=!1,U,L,q="available",lt="foreground";function Zt(Y){return E[Y]}function Ce(){return{lifecycle:lt,networkAvailable:q==="available",foregroundMode:T,backgroundMode:l!=null?l:"offline"}}function ro(){return v!==void 0?v:gT(a,Ce())}function io(){return V===!0?"streaming":V===!1?c==="streaming"?"one-shot":c:D?"streaming":c}function qe(){T=io(),Z==null||Z.setRequestedMode(T)}function Hn(Y,ht,$t){var Lt,qt,te,zn,ee;let se=[];$t&&Y.initializers.filter(yt=>!(_&&yt.type==="cache")).forEach(yt=>{let Q=h.createInitializerFactory(yt,ht);Q?se.push(Q):g.warn(`${ae} Unsupported initializer type '${yt.type}'. It will be skipped.`)});let ke=[];if(Y.synchronizers.forEach(yt=>{let Q=h.createSynchronizerSlot(yt,ht);Q?ke.push(Q):g.warn(`${ae} Unsupported synchronizer type '${yt.type}'. It will be skipped.`)}),f&&ke.length>0){let yt=Y.fdv1Fallback,Q=((Lt=yt==null?void 0:yt.pollInterval)!=null?Lt:i.pollInterval)*1e3,ne=(qt=yt==null?void 0:yt.endpoints)!=null&&qt.pollingBaseUri||(te=yt==null?void 0:yt.endpoints)!=null&&te.streamingBaseUri?new tr((zn=yt.endpoints.streamingBaseUri)!=null?zn:ht.serviceEndpoints.streaming,(ee=yt.endpoints.pollingBaseUri)!=null?ee:ht.serviceEndpoints.polling,ht.serviceEndpoints.events,ht.serviceEndpoints.analyticsEventPath,ht.serviceEndpoints.diagnosticEventPath,ht.serviceEndpoints.includeAuthorizationHeader,ht.serviceEndpoints.payloadFilterKey):ht.serviceEndpoints,vt=()=>al(ht.plainContextString,ne,f.polling(),ht.requests,ht.encoding,ht.baseHeaders,ht.queryParams,i.withReasons,i.useReport),wt=()=>MT(vt(),Q,g);ke.push(cl(wt,{isFDv1Fallback:!0}))}return{initializerFactories:se,synchronizerSlots:ke}}function mn(Y){var ht;g.debug(`${ae} dataCallback: type=${Y.type}, updates=${Y.updates.length}, state=${Y.state}`),I=Y.state;let $t=k;if(!$t){g.warn(`${ae} dataCallback called without an identified context.`);return}let Lt=TT((ht=Y.updates)!=null?ht:[]);r.applyChanges($t,Lt,Y.type).catch(qt=>{g.warn(`${ae} Failed to persist flag cache: ${qt}`)})}function yn(Y,ht){if(!O){g.warn(`${ae} Cannot create data source without factory context.`);return}let $t=Zt(Y),{initializerFactories:Lt,synchronizerSlots:qt}=Hn($t,O,ht);if(S=Y,Lt.length===0&&qt.length===0){g.debug(`${ae} Mode '${Y}' has no sources. No data source created.`),!X&&U&&(X=!0,U(),U=void 0,L=void 0);return}x=AT({initializerFactories:Lt,synchronizerSlots:qt,dataCallback:mn,statusManager:b,selectorGetter:()=>I,logger:g,fallbackTimeoutMs:m,recoveryTimeoutMs:d}),x.start().then(()=>{X=!0,U&&(U(),U=void 0,L=void 0)}).catch(te=>{L&&(L(te instanceof Error?te:new Error(String(te))),U=void 0,L=void 0)})}function Mr(Y){if(tt||!O)return;q=Y.networkState,lt=Y.lifecycleState,T=Y.requestedMode;let ht=ro();if(ht===S){g.debug(`${ae} Reconcile: mode unchanged (${ht}). No action.`);return}g.debug(`${ae} Reconcile: mode switching from '${S}' to '${ht}'.`),x==null||x.close(),x=void 0,yn(ht,!I)}return{get configuredForegroundMode(){return c},async identify(Y,ht,$t,Lt){if(tt){g.debug(`${ae} Identify called after close.`);return}x==null||x.close(),x=void 0,Z==null||Z.close(),Z=void 0,I=void 0,X=!1,_=!1,k=$t,U=Y,L=ht;let qt=JSON.stringify(bn.toLDContext($t)),te=p(Lt);i.withReasons&&te.push({key:"withReasons",value:"true"});let zn=w.streaming(),ee=w.polling(),se=Yd(qt,i.serviceEndpoints,ee,n.requests,n.encoding,o,te),ke=await Vd(n.crypto,t.credential);if(tt){g.debug(`${ae} Identify aborted: closed during async setup.`);return}O={requestor:se,requests:n.requests,encoding:n.encoding,serviceEndpoints:i.serviceEndpoints,baseHeaders:o,queryParams:te,plainContextString:qt,logger:g,polling:{paths:ee,intervalSeconds:i.pollInterval},streaming:{paths:zn,initialReconnectDelaySeconds:i.streamInitialReconnectDelay},storage:n.storage,crypto:n.crypto,environmentNamespace:ke,context:$t},T=io();let yt=ro();g.debug(`${ae} Identify: initial mode resolved to '${yt}'.`),_=(Lt==null?void 0:Lt.bootstrap)!==void 0,_?(X=!0,b.requestStateUpdate("VALID"),U==null||U(),U=void 0,L=void 0,Zt(yt).synchronizers.length>0&&yn(yt,!1)):yn(yt,!0),Z=JT({initialState:{networkState:q,lifecycleState:lt,requestedMode:T},onReconcile:Mr})},close(){tt=!0,x==null||x.close(),x=void 0,Z==null||Z.close(),Z=void 0,U=void 0,L=void 0},setNetworkState(Y){q=Y,Z==null||Z.setNetworkState(Y)},setLifecycleState(Y){Y==="background"&&lt!=="background"&&(y==null||y()),lt=Y,Z==null||Z.setLifecycleState(Y)},setConnectionMode(Y){v=Y,Y!==void 0?Z==null||Z.setRequestedMode(Y):qe()},getCurrentMode(){return S},setFlushCallback(Y){y=Y},setForcedStreaming(Y){V=Y,qe()},setAutomaticStreamingState(Y){D=Y,qe()}}}function bo(){return typeof document!==void 0}function Cl(){return typeof window!==void 0}function jd(t,e,n){return bo()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function Qd(t,e,n){return bo()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function Fr(){return Cl()?window.location.href:""}function KT(){return Cl()?window.location.search:""}function _T(){return Cl()?window.location.hash:""}function HT(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function zT(){return bo()?document.visibilityState:"visibile"}function BT(t){if(bo())return document.querySelectorAll(t)}var jT="[BrowserDataManager]",QT=class extends fT{constructor(t,e,n,r,i,o,s,a,c,l){super(t,e,n,r,o,s,a,c,l),this.Bn=i,this.Z=void 0,this.Ut=!1,this.Z=i.streaming}C(t,...e){this.logger.debug(`${jT} ${t}`,...e)}async identify(t,e,n,r){if(this.closed){this.C("Identify called after data manager was closed.");return}this.context=n;let i=r;i!=null&&i.hash?this.setConnectionParams({queryParameters:[{key:"h",value:i.hash}]}):this.setConnectionParams(),this.zt=i==null?void 0:i.hash,i!=null&&i.bootstrap?this.An(n,i,t):(await this.flagManager.loadCached(n)&&this.C("Identify - Flags loaded from cache. Continuing to initialize via a poll."),await this.Mn(n,t,e)),this.Ce(),this.jt()}async Fn(t){let e=JSON.stringify(bn.toLDContext(t)),n=al(e,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.zt),r=3,i;for(let o=0;o<=r;o+=1)try{return await n.requestPayload()}catch(s){if(!yl(s))throw s;i=s,o<r&&(this.C(Ve(s,"initial poll request","will retry")),await gl(1e3))}throw i}async Mn(t,e,n){var r,i;try{this.dataSourceStatusManager.requestStateUpdate(Vp.Initializing);let o=await this.Fn(t);try{let s=this.createStreamListeners(t,e).get("put");s.processJson(s.deserializeData(o))}catch(s){this.dataSourceStatusManager.reportError(xt.InvalidData,(r=s.message)!=null?r:"Could not parse poll response")}}catch(o){this.dataSourceStatusManager.reportError(xt.NetworkError,(i=o.message)!=null?i:"unexpected network error",o.status),n(o)}}An(t,e,n){let{bootstrapParsed:r}=e;r||(r=Ad(this.logger,e.bootstrap)),this.flagManager.setBootstrap(t,r),this.dataSourceStatusManager.requestStateUpdate(Vp.Valid),this.C("Identify - Initialization completed from bootstrap"),n()}setForcedStreaming(t){this.Z=t,this.jt()}setAutomaticStreamingState(t){this.Ut=t,this.jt()}jt(){let t=this.Z||this.Ut&&this.Z===void 0;this.C(`Updating streaming state. forced(${this.Z}) automatic(${this.Ut})`),t?this.$n():this.Ce()}Ce(){var t;this.updateProcessor&&this.C("Stopping update processor."),(t=this.updateProcessor)==null||t.close(),this.updateProcessor=void 0}$n(){if(this.updateProcessor){this.C("Update processor already active. Not changing state.");return}if(!this.context){this.C("Context not set, not starting update processor.");return}this.C("Starting update processor."),this.Rn(this.context)}Rn(t,e,n){var r;let i=bn.toLDContext(t);(r=this.updateProcessor)==null||r.close();let o=JSON.stringify(bn.toLDContext(t)),s=al(o,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.zt);this.createStreamingProcessor(i,t,s,e,n),this.updateProcessor.start()}};function $T(t){let e=jd("visibilitychange",()=>{zT()==="hidden"&&t()}),n=Qd("pagehide",t);return()=>{e(),n()}}function qa(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function qT(t,e,n,r){let i=((t.kind==="substring"||t.kind==="regex")&&r.includes("/")?e:e.replace(r,"")).replace(n,"");switch(t.kind){case"exact":return new RegExp(`^${qa(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${qa(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${qa(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function tE(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=BT(o);for(;i&&s!=null&&s.length;){for(let a=0;a<s.length;a+=1)if(i===s[a]){n.push(r);break}i=i.parentNode}}),n}var eE=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>qT(a,Fr(),KT(),_T()))}),r=n.filter(o=>o.kind==="pageview"),i=n.filter(o=>o.kind==="click");if(r.forEach(o=>e(o)),i.length){let o=s=>{tE(s,i).forEach(a=>{e(a)})};this.Pe=jd("click",o)}}close(){var t;(t=this.Pe)==null||t.call(this)}},nE=300,rE=class{constructor(t){this.bo=Fr();let e=()=>{let r=Fr();r!==this.bo&&(this.bo=r,t())};this.Vt=setInterval(e,nE);let n=Qd("popstate",e);this.xe=()=>{n()}}close(){var t;this.Vt&&clearInterval(this.Vt),(t=this.xe)==null||t.call(this)}},iE=class{constructor(t,e,n,r,i,o=s=>new rE(s)){this.z=e,this.zn=r,this.Un=i,this.pt=[],this.Oe=!1,this.X=`${n}/sdk/goals/${t}`,this.Le=o(()=>{this.Ht()})}async initialize(){await this.Nn(),this.Ht()}startTracking(){this.Oe=!0,this.Ht()}Ht(){var t;this.Oe&&((t=this.Bt)==null||t.close(),this.pt&&this.pt.length&&(this.Bt=new eE(this.pt,e=>{this.Un(Fr(),e)})))}async Nn(){try{let t=await this.z.fetch(this.X);this.pt=await t.json()}catch(t){this.zn(new pd(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Le)==null||t.close(),(e=this.Bt)==null||e.close()}};function oE(t){return t.kind==="click"}var sE=2,$d={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},aE={fetchGoals:N.Boolean,eventUrlTransformer:N.Function,streaming:N.Boolean,plugins:N.createTypeArray("LDPlugin",{})};function lE(t){var e;let n=$({},t);return(e=n.flushInterval)!=null||(n.flushInterval=sE),n}function cE(t){let e=lE(t);return Object.keys($d).forEach(n=>{delete e[n]}),e}function uE(t,e){let n=$({},$d);return Object.entries(aE).forEach(r=>{let[i,o]=r,s=t[i];s!==void 0&&(o.is(s)?n[i]=s:e.warn(Wt.wrongOptionType(i,o.getType(),typeof s)))}),n}var hE=class{constructor(t,e){switch(this.jn=t,this.Te=[],e){case"sha1":this.Gt="SHA-1";break;case"sha256":this.Gt="SHA-256";break;default:throw new Error(`Algorithm is not supported ${e}`)}}async asyncDigest(t){let e=this.Te.join(""),n=new TextEncoder().encode(e),r=await this.jn.subtle.digest(this.Gt,n);switch(t){case"base64":return btoa(String.fromCharCode(...new Uint8Array(r)));case"hex":return[...new Uint8Array(r)].map(i=>i.toString(16).padStart(2,"0")).join("");default:throw new Error(`Encoding is not supported ${t}`)}}update(t){return this.Te.push(t),this}},pE={start:0,end:3},dE={start:4,end:5},tl={start:6,end:7},el={start:8,end:8},fE={start:9,end:9},mE={start:10,end:15};function yE(){if(crypto&&crypto.getRandomValues){let e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}let t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function Bn(t,e){let n="";for(let r=e.start;r<=e.end;r+=1)n+=t[r].toString(16).padStart(2,"0");return n}function gE(t){return t[el.start]=(t[el.start]|128)&191,t[tl.start]=t[tl.start]&15|64,`${Bn(t,pE)}-${Bn(t,dE)}-${Bn(t,tl)}-${Bn(t,el)}${Bn(t,fE)}-${Bn(t,mE)}`}function bE(){let t=yE();return gE(t)}function vE(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():bE()}var wE=class{createHash(t){return new hE(HT(),t)}randomUUID(){return vE()}};function SE(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var IE=class{btoa(t){return SE(new TextEncoder().encode(t))}},TE=class{constructor(t){this.e=t}platformData(){return{name:"JS"}}sdkData(){let t={name:"@launchdarkly/js-client-sdk",version:"4.5.0",userAgentBase:"JSClient"};return this.e.wrapperName&&(t.wrapperName=this.e.wrapperName),this.e.wrapperVersion&&(t.wrapperVersion=this.e.wrapperVersion),t}},EE=class{constructor(t,e){this.X=t,this.n={},this.x=new bS(e.initialRetryDelayMillis,e.retryResetIntervalMillis),this.Ae=e.errorFilter,this.qt=e.urlBuilder,this.Me()}Me(){this.qt&&(this.X=this.qt()),this.q=new EventSource(this.X),this.q.onopen=()=>{var t;this.x.success(),(t=this.onopen)==null||t.call(this)},this.q.onerror=t=>{var e;t instanceof MessageEvent||(this.Es(t),(e=this.onerror)==null||e.call(this,t))},Object.entries(this.n).forEach(([t,e])=>{e.forEach(n=>{var r;(r=this.q)==null||r.addEventListener(t,n)})})}addEventListener(t,e){var n,r,i;(r=(n=this.n)[t])!=null||(n[t]=[]),this.n[t].push(e),(i=this.q)==null||i.addEventListener(t,e)}close(){var t,e;clearTimeout(this.Kt),this.Kt=void 0,(t=this.q)==null||t.close(),(e=this.onclose)==null||e.call(this)}Vn(t){var e;(e=this.onretrying)==null||e.call(this,{delayMillis:t}),this.Kt=setTimeout(()=>{this.Me()},t)}Es(t){this.close(),!(typeof t.status=="number"&&!this.Ae(t))&&this.Vn(this.x.fail())}},RE=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new EE(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function qd(){return typeof localStorage!="undefined"}function CE(){if(!qd())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var kE=class{constructor(t){this.t=t}async clear(t){var e;try{localStorage.removeItem(t)}catch(n){(e=this.t)==null||e.error(`Error clearing key from localStorage: ${t}, reason: ${n}`)}}async get(t){var e;try{let n=localStorage.getItem(t);return n!=null?n:null}catch(n){return(e=this.t)==null||e.error(`Error getting key from localStorage: ${t}, reason: ${n}`),null}}async set(t,e){var n;try{localStorage.setItem(t,e)}catch(r){(n=this.t)==null||n.error(`Error setting key in localStorage: ${t}, reason: ${r}`)}}},ZE=class{constructor(t,e){this.encoding=new IE,this.crypto=new wE,this.requests=new RE,qd()&&(this.storage=new kE(t)),this.info=new TE(e)}},xE=class extends sT{constructor(t,e,n={},r){var i,o,s,a,c;let{logger:l,debug:u}=n,h=l!=null?l:new pl({destination:{debug:console.debug,info:console.info,warn:console.warn,error:console.error},level:u?"debug":"info"}),p=(i=n.baseUri)!=null?i:"https://clientsdk.launchdarkly.com",f=r!=null?r:new ZE(h,n),m=uE(n,h),d=cE(ce($({},n),{logger:h})),{eventUrlTransformer:g}=m,b=Kp(t),w=(E,I,S,T,x)=>I.dataSystem?YT({platform:f,flagManager:E,credential:t,config:I,baseHeaders:S,emitter:T,transitionTable:bT,foregroundMode:dI(I.dataSystem,Wp),backgroundMode:void 0,modeTable:ao,sourceFactoryProvider:XT(),fdv1Endpoints:Kp(t),buildQueryParams:Z=>{let k=[{key:"auth",value:t}],O=Z;return O!=null&&O.hash&&k.push({key:"h",value:O.hash}),k}}):new QT(f,E,t,I,m,b.polling,b.streaming,S,T,x);super(t,e,f,d,w,{getLegacyStorageKeys:()=>CE().filter(E=>E.startsWith(`ld:${t}:`)),analyticsEventPath:`/events/bulk/${t}`,diagnosticEventPath:`/events/diagnostic/${t}`,includeAuthorizationHeader:!1,highTimeoutThreshold:5,userAgentHeaderName:"x-launchdarkly-user-agent",dataSystemDefaults:Wp,trackEventModifier:E=>new le.InputCustomEvent(E.context,E.key,E.data,E.metricValue,E.samplingRatio,g(Fr())),getImplementationHooks:E=>le.safeGetHooks(h,E,m.plugins),credentialType:"clientSideId"}),this.setEventSendingEnabled(!0,!1),m.streaming!==void 0&&((s=(o=this.dataManager).setForcedStreaming)==null||s.call(o,m.streaming)),(c=(a=this.dataManager).setFlushCallback)==null||c.call(a,()=>this.flush()),this.Jt=m.plugins,m.fetchGoals&&(this.Wt=new iE(t,f.requests,p,E=>{h.error(E.message)},(E,I)=>{let S=this.getInternalContext();if(!S)return;let T=g(E);oE(I)?this.sendEvent({kind:"click",url:T,samplingRatio:1,key:I.key,creationDate:Date.now(),context:S,selector:I.selector}):this.sendEvent({kind:"pageview",url:T,samplingRatio:1,key:I.key,creationDate:Date.now(),context:S})}),this.Wt.initialize(),m.automaticBackgroundHandling&&$T(()=>this.flush()))}registerPlugins(t){le.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.Jt||[]);let e=this.getDebugOverrides();e&&aT(this.logger,e,this.Jt||[])}setInitialContext(t){this.Yt=t}async identify(t,e){return super.identify(t,e)}async identifyResult(t,e){var n;if(!this.Q)return this.logger.error("Client must be started before it can identify a context, did you forget to call start()?"),{status:"error",error:new Error("Identify called before start")};let r=$({},e);(e==null?void 0:e.sheddable)===void 0&&(r.sheddable=!0);let i=await super.identifyResult(t,r);return(n=this.Wt)==null||n.startTracking(),i}start(t){var e,n;if(this.initializeResult)return Promise.resolve(this.initializeResult);if(this.Q)return this.Q;if(!this.Yt)return this.logger.error("Initial context not set"),Promise.resolve({status:"failed",error:new Error("Initial context not set")});let r=ce($({},(e=t==null?void 0:t.identifyOptions)!=null?e:{}),{sheddable:!1});if(t!=null&&t.bootstrap&&!r.bootstrap&&(r.bootstrap=t.bootstrap),r!=null&&r.bootstrap)try{r.bootstrapParsed||(r.bootstrapParsed=Ad(this.logger,r.bootstrap)),this.presetFlags(r.bootstrapParsed)}catch(i){this.logger.error("Failed to bootstrap data",i)}return this.initializedPromise||(this.initializedPromise=new Promise(i=>{this.initResolve=i})),this.Q=this.promiseWithTimeout(this.initializedPromise,(n=t==null?void 0:t.timeout)!=null?n:5),this.identifyResult(this.Yt,r),this.Q}setConnectionMode(t){if(!this.dataManager.setConnectionMode){this.logger.warn("setConnectionMode requires the FDv2 data system (dataSystem option). The call has no effect without it.");return}if(t!==void 0&&!(t in ao)){this.logger.warn(`setConnectionMode called with invalid mode '${t}'. Valid modes: ${Object.keys(ao).join(", ")}.`);return}this.dataManager.setConnectionMode(t)}setStreaming(t){var e,n;(n=(e=this.dataManager).setForcedStreaming)==null||n.call(e,t)}Fe(){var t,e;let n=this.emitter.eventNames().some(r=>r.startsWith("change:")||r==="change");(e=(t=this.dataManager).setAutomaticStreamingState)==null||e.call(t,n)}on(t,e){super.on(t,e),this.Fe()}off(t,e){super.off(t,e),this.Fe()}};function VE(t,e,n,r={},i){let o=new xE(t,n,r,i);o.setInitialContext(e);let s={variation:(a,c)=>o.variation(a,c),variationDetail:(a,c)=>o.variationDetail(a,c),boolVariation:(a,c)=>o.boolVariation(a,c),boolVariationDetail:(a,c)=>o.boolVariationDetail(a,c),numberVariation:(a,c)=>o.numberVariation(a,c),numberVariationDetail:(a,c)=>o.numberVariationDetail(a,c),stringVariation:(a,c)=>o.stringVariation(a,c),stringVariationDetail:(a,c)=>o.stringVariationDetail(a,c),jsonVariation:(a,c)=>o.jsonVariation(a,c),jsonVariationDetail:(a,c)=>o.jsonVariationDetail(a,c),track:(a,c,l)=>o.track(a,c,l),on:(a,c)=>o.on(a,c),off:(a,c)=>o.off(a,c),flush:()=>o.flush(),setConnectionMode:a=>o.setConnectionMode(a),setStreaming:a=>o.setStreaming(a),identify:(a,c)=>o.identifyResult(a,c),getContext:()=>o.getContext(),close:()=>o.close(),allFlags:()=>o.allFlags(),addHook:a=>o.addHook(a),waitForInitialization:a=>o.waitForInitialization(a),logger:o.logger,start:a=>o.start(a)};return o.registerPlugins(s),s}function Z9(t){return new pl(t)}function tf(t,e,n){return VE(t,e,ho.Disabled,n)}var OE=Object.defineProperty,NE=(t,e,n)=>e in t?OE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fe=(t,e,n)=>NE(t,typeof e!="symbol"?e+"":e,n),GE=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Ke=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),LE(r,...n)},LE=(t,...e)=>GE(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>UC);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),XE=class{constructor(t,e){Fe(this,"debug"),Fe(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},Yo=class{constructor(){Fe(this,"_sdk"),Fe(this,"_isLoaded",!1),Fe(this,"_callBuffer",[]),Fe(this,"_capacity",1e5),Fe(this,"_droppedEvents",0),Fe(this,"_exceededCapacity",!1),Fe(this,"_logger",new XE)}p(e,n){if(this.gr)try{return this.Wr[e](...n)}catch(r){Ke(`Error executing buffered call to ${e}:`,"error",r)}else{this.Ei({method:e,args:n});return}}Ei(e){this.ar.length<this.Rs?(this.ar.push(e),this.Mr=!1):(this.Mr||(this.Mr=!0,Ke("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Cs+=1)}load(e){this.Wr=e,this.gr=!0;for(let{method:n,args:r}of this.ar)try{this.Wr[n](...r)}catch(i){Ke(`Error executing buffered call to ${n}:`,"error",i)}this.ar=[]}},WE=Object.defineProperty,ME=Object.defineProperties,PE=Object.getOwnPropertyDescriptors,Ko=Object.getOwnPropertySymbols,Pm=Object.prototype.hasOwnProperty,Um=Object.prototype.propertyIsEnumerable,cc=(t,e,n)=>e in t?WE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nt=(t,e)=>{for(var n in e||(e={}))Pm.call(e,n)&&cc(t,n,e[n]);if(Ko)for(var n of Ko(e))Um.call(e,n)&&cc(t,n,e[n]);return t},cr=(t,e)=>ME(t,PE(e)),ei=(t,e)=>{var n={};for(var r in t)Pm.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ko)for(var r of Ko(t))e.indexOf(r)<0&&Um.call(t,r)&&(n[r]=t[r]);return n},ai=(t,e,n)=>cc(t,typeof e!="symbol"?e+"":e,n),hr=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});function UE(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Lo(t,e){throw new Error(e)}function FE(t){return typeof t=="object"&&t!==null}function AE(t,e){throw new Error("Unexpected invariant triggered.")}var DE=/\r\n|[\n\r]/g;function uc(t,e){let n=0,r=1;for(let i of t.body.matchAll(DE)){if(typeof i.index=="number"||AE(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function JE(t){return Fm(t.source,uc(t.source,t.start))}function Fm(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
349
+ `,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+ef([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+ef([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function ef(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
350
+ `)}function YE(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}var KE=class Am extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=YE(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=nf(Array.isArray(s)?s:s?[s]:void 0);let p=nf((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>uc(a,m)):p==null?void 0:p.map(m=>uc(m.source,m.start));let f=FE(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Am):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
351
351
 
352
- `+TT(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
352
+ `+JE(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
353
353
 
354
- `+zf(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function ud(t){return t===void 0||t.length===0?void 0:t}function Ct(t,e,n){return new RT(`Syntax Error: ${n}`,{source:t,positions:[e]})}var CT=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},jf=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,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}}},Qf={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"]},ZT=new Set(Object.keys(Qf));function hd(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&ZT.has(e)}var Mn;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Mn||(Mn={}));var Nl;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Nl||(Nl={}));var F;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(F||(F={}));function Ol(t){return t===9||t===32}function Ur(t){return t>=48&&t<=57}function $f(t){return t>=97&&t<=122||t>=65&&t<=90}function qf(t){return $f(t)||t===95}function kT(t){return $f(t)||Ur(t)||t===95}function VT(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=xT(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function xT(t){let e=0;for(;e<t.length&&Ol(t.charCodeAt(e));)++e;return e}function NT(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||Ol(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&Ol(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
354
+ `+Fm(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function nf(t){return t===void 0||t.length===0?void 0:t}function Ot(t,e,n){return new KE(`Syntax Error: ${n}`,{source:t,positions:[e]})}var _E=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Dm=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,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}}},Jm={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"]},HE=new Set(Object.keys(Jm));function rf(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&HE.has(e)}var ar;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(ar||(ar={}));var hc;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(hc||(hc={}));var F;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(F||(F={}));function pc(t){return t===9||t===32}function li(t){return t>=48&&t<=57}function Ym(t){return t>=97&&t<=122||t>=65&&t<=90}function Km(t){return Ym(t)||t===95}function zE(t){return Ym(t)||li(t)||t===95}function BE(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=jE(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function jE(t){let e=0;for(;e<t.length&&pc(t.charCodeAt(e));)++e;return e}function QE(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||pc(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&pc(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
355
355
  `),h+=n,(u||l)&&(h+=`
356
- `),'"""'+h+'"""'}var S;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(S||(S={}));var OT=class{constructor(t){let e=new jf(S.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==S.EOF)do if(t.next)t=t.next;else{let e=LT(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===S.COMMENT);return t}};function GT(t){return t===S.BANG||t===S.DOLLAR||t===S.AMP||t===S.PAREN_L||t===S.PAREN_R||t===S.SPREAD||t===S.COLON||t===S.EQUALS||t===S.AT||t===S.BRACKET_L||t===S.BRACKET_R||t===S.BRACE_L||t===S.PIPE||t===S.BRACE_R}function Hn(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function Fo(t,e){return tm(t.charCodeAt(e))&&em(t.charCodeAt(e+1))}function tm(t){return t>=55296&&t<=56319}function em(t){return t>=56320&&t<=57343}function hn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return S.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function It(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new jf(e,n,r,o,s,i)}function LT(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return XT(t,i);case 33:return It(t,S.BANG,i,i+1);case 36:return It(t,S.DOLLAR,i,i+1);case 38:return It(t,S.AMP,i,i+1);case 40:return It(t,S.PAREN_L,i,i+1);case 41:return It(t,S.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return It(t,S.SPREAD,i,i+3);break;case 58:return It(t,S.COLON,i,i+1);case 61:return It(t,S.EQUALS,i,i+1);case 64:return It(t,S.AT,i,i+1);case 91:return It(t,S.BRACKET_L,i,i+1);case 93:return It(t,S.BRACKET_R,i,i+1);case 123:return It(t,S.BRACE_L,i,i+1);case 124:return It(t,S.PIPE,i,i+1);case 125:return It(t,S.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?AT(t,i):UT(t,i)}if(Ur(o)||o===45)return WT(t,i,o);if(qf(o))return JT(t,i);throw Ct(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Hn(o)||Fo(n,i)?`Unexpected character: ${hn(t,i)}.`:`Invalid character: ${hn(t,i)}.`)}return It(t,S.EOF,r,r)}function XT(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(Hn(o))++i;else if(Fo(n,i))i+=2;else break}return It(t,S.COMMENT,e,i,n.slice(e+1,i))}function WT(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Ur(o))throw Ct(t.source,i,`Invalid number, unexpected digit after 0: ${hn(t,i)}.`)}else i=Ha(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Ha(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=Ha(t,i,o),o=r.charCodeAt(i)),o===46||qf(o))throw Ct(t.source,i,`Invalid number, expected digit but got: ${hn(t,i)}.`);return It(t,s?S.FLOAT:S.INT,e,i,r.slice(e,i))}function Ha(t,e,n){if(!Ur(n))throw Ct(t.source,e,`Invalid number, expected digit but got: ${hn(t,e)}.`);let r=t.source.body,i=e+1;for(;Ur(r.charCodeAt(i));)++i;return i}function UT(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),It(t,S.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?PT(t,i):MT(t,i):FT(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(Hn(a))++i;else if(Fo(n,i))i+=2;else throw Ct(t.source,i,`Invalid character within String: ${hn(t,i)}.`)}throw Ct(t.source,i,"Unterminated string.")}function PT(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!Hn(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|kr(o),r<0)break}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function MT(t,e){let n=t.source.body,r=pd(n,e+2);if(Hn(r))return{value:String.fromCodePoint(r),size:6};if(tm(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=pd(n,e+8);if(em(i))return{value:String.fromCodePoint(r,i),size:12}}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function pd(t,e){return kr(t.charCodeAt(e))<<12|kr(t.charCodeAt(e+1))<<8|kr(t.charCodeAt(e+2))<<4|kr(t.charCodeAt(e+3))}function kr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function FT(t,e){let n=t.source.body;switch(n.charCodeAt(e+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:`
357
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Ct(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function AT(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=It(t,S.BLOCK_STRING,e,o+3,VT(c).join(`
358
- `));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(Hn(l))++o;else if(Fo(n,o))o+=2;else throw Ct(t.source,o,`Invalid character within String: ${hn(t,o)}.`)}throw Ct(t.source,o,"Unterminated string.")}function JT(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(kT(o))++i;else break}return It(t,S.NAME,e,i,n.slice(e,i))}var DT=10,nm=2;function cc(t){return Ao(t,[])}function Ao(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return YT(t,e);default:return String(t)}}function YT(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(KT(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:Ao(r,n)}else if(Array.isArray(t))return HT(t,n);return _T(t,n)}function KT(t){return typeof t.toJSON=="function"}function _T(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>nm?"["+zT(t)+"]":"{ "+n.map(([r,i])=>r+": "+Ao(i,e)).join(", ")+" }"}function HT(t,e){if(t.length===0)return"[]";if(e.length>nm)return"[Array]";let n=Math.min(DT,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(Ao(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function zT(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}var BT=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=cc(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
356
+ `),'"""'+h+'"""'}var R;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(R||(R={}));var $E=class{constructor(t){let e=new Dm(R.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==R.EOF)do if(t.next)t=t.next;else{let e=tR(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===R.COMMENT);return t}};function qE(t){return t===R.BANG||t===R.DOLLAR||t===R.AMP||t===R.PAREN_L||t===R.PAREN_R||t===R.SPREAD||t===R.COLON||t===R.EQUALS||t===R.AT||t===R.BRACKET_L||t===R.BRACKET_R||t===R.BRACE_L||t===R.PIPE||t===R.BRACE_R}function mr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function us(t,e){return _m(t.charCodeAt(e))&&Hm(t.charCodeAt(e+1))}function _m(t){return t>=55296&&t<=56319}function Hm(t){return t>=56320&&t<=57343}function Vn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return R.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Rt(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new Dm(e,n,r,o,s,i)}function tR(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return eR(t,i);case 33:return Rt(t,R.BANG,i,i+1);case 36:return Rt(t,R.DOLLAR,i,i+1);case 38:return Rt(t,R.AMP,i,i+1);case 40:return Rt(t,R.PAREN_L,i,i+1);case 41:return Rt(t,R.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Rt(t,R.SPREAD,i,i+3);break;case 58:return Rt(t,R.COLON,i,i+1);case 61:return Rt(t,R.EQUALS,i,i+1);case 64:return Rt(t,R.AT,i,i+1);case 91:return Rt(t,R.BRACKET_L,i,i+1);case 93:return Rt(t,R.BRACKET_R,i,i+1);case 123:return Rt(t,R.BRACE_L,i,i+1);case 124:return Rt(t,R.PIPE,i,i+1);case 125:return Rt(t,R.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?aR(t,i):rR(t,i)}if(li(o)||o===45)return nR(t,i,o);if(Km(o))return lR(t,i);throw Ot(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:mr(o)||us(n,i)?`Unexpected character: ${Vn(t,i)}.`:`Invalid character: ${Vn(t,i)}.`)}return Rt(t,R.EOF,r,r)}function eR(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(mr(o))++i;else if(us(n,i))i+=2;else break}return Rt(t,R.COMMENT,e,i,n.slice(e+1,i))}function nR(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),li(o))throw Ot(t.source,i,`Invalid number, unexpected digit after 0: ${Vn(t,i)}.`)}else i=kl(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=kl(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=kl(t,i,o),o=r.charCodeAt(i)),o===46||Km(o))throw Ot(t.source,i,`Invalid number, expected digit but got: ${Vn(t,i)}.`);return Rt(t,s?R.FLOAT:R.INT,e,i,r.slice(e,i))}function kl(t,e,n){if(!li(n))throw Ot(t.source,e,`Invalid number, expected digit but got: ${Vn(t,e)}.`);let r=t.source.body,i=e+1;for(;li(r.charCodeAt(i));)++i;return i}function rR(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),Rt(t,R.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?iR(t,i):oR(t,i):sR(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(mr(a))++i;else if(us(n,i))i+=2;else throw Ot(t.source,i,`Invalid character within String: ${Vn(t,i)}.`)}throw Ot(t.source,i,"Unterminated string.")}function iR(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!mr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|qr(o),r<0)break}throw Ot(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function oR(t,e){let n=t.source.body,r=of(n,e+2);if(mr(r))return{value:String.fromCodePoint(r),size:6};if(_m(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=of(n,e+8);if(Hm(i))return{value:String.fromCodePoint(r,i),size:12}}throw Ot(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function of(t,e){return qr(t.charCodeAt(e))<<12|qr(t.charCodeAt(e+1))<<8|qr(t.charCodeAt(e+2))<<4|qr(t.charCodeAt(e+3))}function qr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function sR(t,e){let n=t.source.body;switch(n.charCodeAt(e+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:`
357
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Ot(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function aR(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=Rt(t,R.BLOCK_STRING,e,o+3,BE(c).join(`
358
+ `));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(mr(l))++o;else if(us(n,o))o+=2;else throw Ot(t.source,o,`Invalid character within String: ${Vn(t,o)}.`)}throw Ot(t.source,o,"Unterminated string.")}function lR(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(zE(o))++i;else break}return Rt(t,R.NAME,e,i,n.slice(e,i))}var cR=10,zm=2;function Jc(t){return hs(t,[])}function hs(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return uR(t,e);default:return String(t)}}function uR(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(hR(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:hs(r,n)}else if(Array.isArray(t))return dR(t,n);return pR(t,n)}function hR(t){return typeof t.toJSON=="function"}function pR(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>zm?"["+fR(t)+"]":"{ "+n.map(([r,i])=>r+": "+hs(i,e)).join(", ")+" }"}function dR(t,e){if(t.length===0)return"[]";if(e.length>zm)return"[Array]";let n=Math.min(cR,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(hs(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function fR(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}var mR=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=Jc(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
359
359
 
360
360
  Ensure that there is only one instance of "graphql" in the node_modules
361
361
  directory. If different versions of "graphql" are the dependencies of other
@@ -366,41 +366,41 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
366
366
  Duplicate "graphql" modules cannot be used at the same time since different
367
367
  versions may have different capabilities and behavior. The data from one
368
368
  version used in the function from another could produce confusing and
369
- spurious results.`)}}return!1},Io=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||co(!1,`Body must be a string. Received: ${cc(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||co(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||co(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function jT(t){return BT(t,Io)}function uc(t,e){return new QT(t,e).parseDocument()}var QT=class{constructor(t,e={}){let n=jT(t)?t:new Io(t);this.l=new OT(n),this.Sn=e,this.Qn=0}parseName(){let t=this.expectToken(S.NAME);return this.node(t,{kind:F.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:F.DOCUMENT,definitions:this.many(S.SOF,this.parseDefinition,S.EOF)})}parseDefinition(){if(this.peek(S.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===S.NAME){switch(e.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 Ct(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(S.BRACE_L))return this.node(t,{kind:F.OPERATION_DEFINITION,operation:Mn.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(S.NAME)&&(n=this.parseName()),this.node(t,{kind:F.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(S.NAME);switch(t.value){case"query":return Mn.QUERY;case"mutation":return Mn.MUTATION;case"subscription":return Mn.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(S.PAREN_L,this.parseVariableDefinition,S.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:F.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(S.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(S.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(S.DOLLAR),this.node(t,{kind:F.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:F.SELECTION_SET,selections:this.many(S.BRACE_L,this.parseSelection,S.BRACE_R)})}parseSelection(){return this.peek(S.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(S.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:F.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(S.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(S.PAREN_L,e,S.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(S.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(S.NAME)?this.node(t,{kind:F.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:F.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.Sn.allowLegacyFragmentVariables===!0?this.node(t,{kind:F.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:F.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case S.BRACKET_L:return this.parseList(t);case S.BRACE_L:return this.parseObject(t);case S.INT:return this.advanceLexer(),this.node(e,{kind:F.INT,value:e.value});case S.FLOAT:return this.advanceLexer(),this.node(e,{kind:F.FLOAT,value:e.value});case S.STRING:case S.BLOCK_STRING:return this.parseStringLiteral();case S.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:F.BOOLEAN,value:!0});case"false":return this.node(e,{kind:F.BOOLEAN,value:!1});case"null":return this.node(e,{kind:F.NULL});default:return this.node(e,{kind:F.ENUM,value:e.value})}case S.DOLLAR:if(t)if(this.expectToken(S.DOLLAR),this.l.token.kind===S.NAME){let n=this.l.token.value;throw Ct(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:F.STRING,value:t.value,block:t.kind===S.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:F.LIST,values:this.any(S.BRACKET_L,e,S.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:F.OBJECT,fields:this.any(S.BRACE_L,e,S.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(S.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(S.AT),this.node(e,{kind:F.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(S.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(S.BRACKET_R),e=this.node(t,{kind:F.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(S.BANG)?this.node(t,{kind:F.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:F.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(S.STRING)||this.peek(S.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);return this.node(t,{kind:F.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(S.COLON);let n=this.parseNamedType();return this.node(t,{kind:F.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:F.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(S.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseFieldDefinition,S.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(S.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:F.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(S.PAREN_L,this.parseInputValueDef,S.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(S.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(S.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:F.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:F.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(S.EQUALS)?this.delimitedMany(S.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:F.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(S.BRACE_L,this.parseEnumValueDefinition,S.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:F.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Ct(this.l.source,this.l.token.start,`${zi(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseInputValueDef,S.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===S.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(S.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:F.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(S.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(Nl,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Sn.noLocation!==!0&&(e.loc=new CT(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Ct(this.l.source,e.start,`Expected ${rm(t)}, found ${zi(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===S.NAME&&e.value===t)this.advanceLexer();else throw Ct(this.l.source,e.start,`Expected "${t}", found ${zi(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===S.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Ct(this.l.source,e.start,`Unexpected ${zi(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.Sn,e=this.l.advance();if(t!==void 0&&e.kind!==S.EOF&&(++this.Qn,this.Qn>t))throw Ct(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function zi(t){let e=t.value;return rm(t.kind)+(e!=null?` "${e}"`:"")}function rm(t){return GT(t)?`"${t}"`:t}function $T(t){return`"${t.replace(qT,tE)}"`}var qT=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function tE(t){return eE[t.charCodeAt(0)]}var eE=["\\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"],nE=Object.freeze({});function rE(t,e,n=Qf){let r=new Map;for(let g of Object.values(F))r.set(g,iE(e,g));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let g=a===s.length,w=g&&c.length!==0;if(g){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let E=0;for(let[T,V]of c){let O=T-E;V===null?(l.splice(O,1),E++):l[O]=V}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;hd(l)||co(!1,`Invalid AST Node: ${cc(l)}.`);let E=g?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===nE)break;if(R===!1){if(!g){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!g))if(hd(R))l=R;else{p.pop();continue}}if(R===void 0&&w&&c.push([u,l]),g)p.pop();else{var v;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(v=n[l.kind])!==null&&v!==void 0?v:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function iE(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function oE(t){return rE(t,aE)}var sE=80,aE={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>L(t.definitions,`
369
+ spurious results.`)}}return!1},_o=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||Lo(!1,`Body must be a string. Received: ${Jc(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Lo(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Lo(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function yR(t){return mR(t,_o)}function Yc(t,e){return new gR(t,e).parseDocument()}var gR=class{constructor(t,e={}){let n=yR(t)?t:new _o(t);this.l=new $E(n),this.lr=e,this.Pr=0}parseName(){let t=this.expectToken(R.NAME);return this.node(t,{kind:F.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:F.DOCUMENT,definitions:this.many(R.SOF,this.parseDefinition,R.EOF)})}parseDefinition(){if(this.peek(R.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===R.NAME){switch(e.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 Ot(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(R.BRACE_L))return this.node(t,{kind:F.OPERATION_DEFINITION,operation:ar.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(R.NAME)&&(n=this.parseName()),this.node(t,{kind:F.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(R.NAME);switch(t.value){case"query":return ar.QUERY;case"mutation":return ar.MUTATION;case"subscription":return ar.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(R.PAREN_L,this.parseVariableDefinition,R.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:F.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(R.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(R.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(R.DOLLAR),this.node(t,{kind:F.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:F.SELECTION_SET,selections:this.many(R.BRACE_L,this.parseSelection,R.BRACE_R)})}parseSelection(){return this.peek(R.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(R.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:F.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(R.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(R.PAREN_L,e,R.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(R.COLON),this.node(e,{kind:F.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(R.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(R.NAME)?this.node(t,{kind:F.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:F.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.lr.allowLegacyFragmentVariables===!0?this.node(t,{kind:F.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:F.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case R.BRACKET_L:return this.parseList(t);case R.BRACE_L:return this.parseObject(t);case R.INT:return this.advanceLexer(),this.node(e,{kind:F.INT,value:e.value});case R.FLOAT:return this.advanceLexer(),this.node(e,{kind:F.FLOAT,value:e.value});case R.STRING:case R.BLOCK_STRING:return this.parseStringLiteral();case R.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:F.BOOLEAN,value:!0});case"false":return this.node(e,{kind:F.BOOLEAN,value:!1});case"null":return this.node(e,{kind:F.NULL});default:return this.node(e,{kind:F.ENUM,value:e.value})}case R.DOLLAR:if(t)if(this.expectToken(R.DOLLAR),this.l.token.kind===R.NAME){let n=this.l.token.value;throw Ot(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:F.STRING,value:t.value,block:t.kind===R.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:F.LIST,values:this.any(R.BRACKET_L,e,R.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:F.OBJECT,fields:this.any(R.BRACE_L,e,R.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(R.COLON),this.node(e,{kind:F.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(R.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(R.AT),this.node(e,{kind:F.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(R.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(R.BRACKET_R),e=this.node(t,{kind:F.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(R.BANG)?this.node(t,{kind:F.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:F.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(R.STRING)||this.peek(R.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(R.BRACE_L,this.parseOperationTypeDefinition,R.BRACE_R);return this.node(t,{kind:F.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(R.COLON);let n=this.parseNamedType();return this.node(t,{kind:F.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:F.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(R.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(R.BRACE_L,this.parseFieldDefinition,R.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(R.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:F.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(R.PAREN_L,this.parseInputValueDef,R.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(R.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(R.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:F.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:F.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(R.EQUALS)?this.delimitedMany(R.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:F.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(R.BRACE_L,this.parseEnumValueDefinition,R.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:F.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Ot(this.l.source,this.l.token.start,`${vo(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(R.BRACE_L,this.parseInputValueDef,R.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===R.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(R.BRACE_L,this.parseOperationTypeDefinition,R.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(R.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:F.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(R.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(hc,e.value))return e;throw this.unexpected(t)}node(t,e){return this.lr.noLocation!==!0&&(e.loc=new _E(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Ot(this.l.source,e.start,`Expected ${Bm(t)}, found ${vo(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===R.NAME&&e.value===t)this.advanceLexer();else throw Ot(this.l.source,e.start,`Expected "${t}", found ${vo(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===R.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Ot(this.l.source,e.start,`Unexpected ${vo(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.lr,e=this.l.advance();if(t!==void 0&&e.kind!==R.EOF&&(++this.Pr,this.Pr>t))throw Ot(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function vo(t){let e=t.value;return Bm(t.kind)+(e!=null?` "${e}"`:"")}function Bm(t){return qE(t)?`"${t}"`:t}function bR(t){return`"${t.replace(vR,wR)}"`}var vR=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function wR(t){return SR[t.charCodeAt(0)]}var SR=["\\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"],IR=Object.freeze({});function TR(t,e,n=Jm){let r=new Map;for(let b of Object.values(F))r.set(b,ER(e,b));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let b=a===s.length,w=b&&c.length!==0;if(b){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let I=0;for(let[S,T]of c){let x=S-I;T===null?(l.splice(x,1),I++):l[x]=T}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[I,S]of c)l[I]=S}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let E;if(!Array.isArray(l)){var m,d;rf(l)||Lo(!1,`Invalid AST Node: ${Jc(l)}.`);let I=b?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(E=I==null?void 0:I.call(e,l,u,h,p,f),E===IR)break;if(E===!1){if(!b){p.pop();continue}}else if(E!==void 0&&(c.push([u,E]),!b))if(rf(E))l=E;else{p.pop();continue}}if(E===void 0&&w&&c.push([u,l]),b)p.pop();else{var g;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(g=n[l.kind])!==null&&g!==void 0?g:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function ER(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function RR(t){return TR(t,kR)}var CR=80,kR={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>W(t.definitions,`
370
370
 
371
- `)},OperationDefinition:{leave(t){let e=B("(",L(t.variableDefinitions,", "),")"),n=L([t.operation,L([t.name,e]),L(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+B(" = ",n)+B(" ",L(r," "))},SelectionSet:{leave:({selections:t})=>se(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=B("",t,": ")+e,s=o+B("(",L(n,", "),")");return s.length>sE&&(s=o+B(`(
372
- `,uo(L(n,`
371
+ `)},OperationDefinition:{leave(t){let e=et("(",W(t.variableDefinitions,", "),")"),n=W([t.operation,W([t.name,e]),W(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+et(" = ",n)+et(" ",W(r," "))},SelectionSet:{leave:({selections:t})=>we(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=et("",t,": ")+e,s=o+et("(",W(n,", "),")");return s.length>CR&&(s=o+et(`(
372
+ `,Xo(W(n,`
373
373
  `)),`
374
- )`)),L([s,L(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+B(" ",L(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>L(["...",B("on ",t),L(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${B("(",L(n,", "),")")} on ${e} ${B("",L(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?NT(t):$T(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+L(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+L(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+B("(",L(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>B("",t,`
375
- `)+L(["schema",L(e," "),se(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
376
- `)+L(["scalar",e,L(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>B("",t,`
377
- `)+L(["type",e,B("implements ",L(n," & ")),L(r," "),se(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>B("",t,`
378
- `)+e+(dd(n)?B(`(
379
- `,uo(L(n,`
374
+ )`)),W([s,W(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+et(" ",W(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>W(["...",et("on ",t),W(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${et("(",W(n,", "),")")} on ${e} ${et("",W(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?QE(t):bR(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+W(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+W(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+et("(",W(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>et("",t,`
375
+ `)+W(["schema",W(e," "),we(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>et("",t,`
376
+ `)+W(["scalar",e,W(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>et("",t,`
377
+ `)+W(["type",e,et("implements ",W(n," & ")),W(r," "),we(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>et("",t,`
378
+ `)+e+(sf(n)?et(`(
379
+ `,Xo(W(n,`
380
380
  `)),`
381
- )`):B("(",L(n,", "),")"))+": "+r+B(" ",L(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>B("",t,`
382
- `)+L([e+": "+n,B("= ",r),L(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>B("",t,`
383
- `)+L(["interface",e,B("implements ",L(n," & ")),L(r," "),se(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>B("",t,`
384
- `)+L(["union",e,L(n," "),B("= ",L(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>B("",t,`
385
- `)+L(["enum",e,L(n," "),se(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
386
- `)+L([e,L(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>B("",t,`
387
- `)+L(["input",e,L(n," "),se(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>B("",t,`
388
- `)+"directive @"+e+(dd(n)?B(`(
389
- `,uo(L(n,`
381
+ )`):et("(",W(n,", "),")"))+": "+r+et(" ",W(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>et("",t,`
382
+ `)+W([e+": "+n,et("= ",r),W(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>et("",t,`
383
+ `)+W(["interface",e,et("implements ",W(n," & ")),W(r," "),we(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>et("",t,`
384
+ `)+W(["union",e,W(n," "),et("= ",W(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>et("",t,`
385
+ `)+W(["enum",e,W(n," "),we(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>et("",t,`
386
+ `)+W([e,W(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>et("",t,`
387
+ `)+W(["input",e,W(n," "),we(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>et("",t,`
388
+ `)+"directive @"+e+(sf(n)?et(`(
389
+ `,Xo(W(n,`
390
390
  `)),`
391
- )`):B("(",L(n,", "),")"))+(r?" repeatable":"")+" on "+L(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>L(["extend schema",L(t," "),se(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>L(["extend scalar",t,L(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>L(["extend type",t,B("implements ",L(e," & ")),L(n," "),se(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>L(["extend interface",t,B("implements ",L(e," & ")),L(n," "),se(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>L(["extend union",t,L(e," "),B("= ",L(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>L(["extend enum",t,L(e," "),se(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>L(["extend input",t,L(e," "),se(n)]," ")}};function L(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function se(t){return B(`{
392
- `,uo(L(t,`
391
+ )`):et("(",W(n,", "),")"))+(r?" repeatable":"")+" on "+W(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>W(["extend schema",W(t," "),we(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>W(["extend scalar",t,W(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend type",t,et("implements ",W(e," & ")),W(n," "),we(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend interface",t,et("implements ",W(e," & ")),W(n," "),we(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>W(["extend union",t,W(e," "),et("= ",W(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>W(["extend enum",t,W(e," "),we(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>W(["extend input",t,W(e," "),we(n)]," ")}};function W(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function we(t){return et(`{
392
+ `,Xo(W(t,`
393
393
  `)),`
394
- }`)}function B(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function uo(t){return B(" ",t.replace(/\n/g,`
395
- `))}function dd(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
396
- `)))!==null&&e!==void 0?e:!1}var hc=JSON,lE=t=>t.toUpperCase(),cE=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},uE=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},hE=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},pE=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},fd=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},za=t=>{if(typeof t=="string"){let n;try{let r=uc(t);n=fd(r)}catch(r){}return{query:t,operationName:n}}let e=fd(t);return{query:oE(t),operationName:e}},im=class ho extends Error{constructor(e,n){let r=`${ho.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,ho.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ho)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},pc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gl={exports:{}};(function(t,e){var n=typeof self<"u"?self:pc,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var b={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(b[Symbol.iterator]=function(){return b}),b}function m(y){this.map={},y instanceof m?y.forEach(function(b,Z){this.append(Z,b)},this):Array.isArray(y)?y.forEach(function(b){this.append(b[0],b[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(b){this.append(b,y[b])},this)}m.prototype.append=function(y,b){y=h(y),b=p(b);var Z=this.map[y];this.map[y]=Z?Z+", "+b:b},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,b){this.map[h(y)]=p(b)},m.prototype.forEach=function(y,b){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(b,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(b,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(b){y.push(b)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(b,Z){y.push([Z,b])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function v(y){return new Promise(function(b,Z){y.onload=function(){b(y.result)},y.onerror=function(){Z(y.error)}})}function g(y){var b=new FileReader,Z=v(b);return b.readAsArrayBuffer(y),Z}function w(y){var b=new FileReader,Z=v(b);return b.readAsText(y),Z}function R(y){for(var b=new Uint8Array(y),Z=new Array(b.length),D=0;D<b.length;D++)Z[D]=String.fromCharCode(b[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var b=new Uint8Array(y.byteLength);return b.set(new Uint8Array(y)),b.buffer}function T(){return this.bodyUsed=!1,this.$n=function(y){this._t=y,y?typeof y=="string"?this.Ye=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.te=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.qn=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.Ye=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.D=E(y.buffer),this._t=new Blob([this.D])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.D=E(y):this.Ye=y=Object.prototype.toString.call(y):this.Ye="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.te&&this.te.type?this.headers.set("content-type",this.te.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.te)return Promise.resolve(this.te);if(this.D)return Promise.resolve(new Blob([this.D]));if(this.qn)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.Ye]))},this.arrayBuffer=function(){return this.D?d(this)||Promise.resolve(this.D):this.blob().then(g)}),this.text=function(){var y=d(this);if(y)return y;if(this.te)return w(this.te);if(this.D)return Promise.resolve(R(this.D));if(this.qn)throw new Error("could not read FormData body as text");return Promise.resolve(this.Ye)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var V=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(y){var b=y.toUpperCase();return V.indexOf(b)>-1?b:y}function U(y,b){b=b||{};var Z=b.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,b.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=b.credentials||this.credentials||"same-origin",(b.headers||!this.headers)&&(this.headers=new m(b.headers)),this.method=O(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.signal=b.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.$n(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var b=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),M=D.shift().replace(/\+/g," "),G=D.join("=").replace(/\+/g," ");b.append(decodeURIComponent(M),decodeURIComponent(G))}}),b}function N(y){var b=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var M=D.split(":"),G=M.shift().trim();if(G){var it=M.join(":").trim();b.append(G,it)}}),b}T.call(U.prototype);function P(y,b){b||(b={}),this.type="default",this.status=b.status===void 0?200:b.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new m(b.headers),this.url=b.url||"",this.$n(y)}T.call(P.prototype),P.prototype.clone=function(){return new P(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},P.error=function(){var y=new P(null,{status:0,statusText:""});return y.type="error",y};var st=[301,302,303,307,308];P.redirect=function(y,b){if(st.indexOf(b)===-1)throw new RangeError("Invalid status code");return new P(null,{status:b,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(b,Z){this.message=b,this.name=Z;var D=Error(b);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,b){return new Promise(function(Z,D){var M=new U(y,b);if(M.signal&&M.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var G=new XMLHttpRequest;function it(){G.abort()}G.onload=function(){var ct={status:G.status,statusText:G.statusText,headers:N(G.getAllResponseHeaders()||"")};ct.url="responseURL"in G?G.responseURL:ct.headers.get("X-Request-URL");var Ot="response"in G?G.response:G.responseText;Z(new P(Ot,ct))},G.onerror=function(){D(new TypeError("Network request failed"))},G.ontimeout=function(){D(new TypeError("Network request failed"))},G.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},G.open(M.method,M.url,!0),M.credentials==="include"?G.withCredentials=!0:M.credentials==="omit"&&(G.withCredentials=!1),"responseType"in G&&a.blob&&(G.responseType="blob"),M.headers.forEach(function(ct,Ot){G.setRequestHeader(Ot,ct)}),M.signal&&(M.signal.addEventListener("abort",it),G.onreadystatechange=function(){G.readyState===4&&M.signal.removeEventListener("abort",it)}),G.send(typeof M._t>"u"?null:M._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=P),s.Headers=m,s.Request=U,s.Response=P,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(Gl,Gl.exports);var To=Gl.exports,po=dc(To),dE=vT({__proto__:null,default:po},[To]),Xn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||dE&&To.Headers&&t instanceof To.Headers?e=cE(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},md=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),fE=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(md(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:md(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},mE=t=>e=>Dn(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=j({},e.headers),h="",p;t==="POST"?(p=gE(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=fE({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:hc});let f=j({method:t,headers:u,body:p},c),m=r,d=f;if(l){let v=yield Promise.resolve(l(An(j({},f),{url:r,operationName:s,variables:o}))),{url:g}=v,w=xr(v,["url"]);m=g,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),yE=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Dn(this,null,function*(){let[r,i,o]=n,s=hE(r,i,o),a=this.requestConfig,{headers:c,fetch:l=po,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=xr(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=za(s.query);return Ba({url:m,query:s.query,variables:s.variables,headers:j(j({},Xn(ja(c))),Xn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(v=>(p&&p(v),v)).catch(v=>{throw p&&p(v),v})})}request(t,...e){return Dn(this,null,function*(){let[n,r]=e,i=uE(t,n,r),o=this.requestConfig,{headers:s,fetch:a=po,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=xr(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=za(i.document);return Ba({url:p,query:f,variables:i.variables,headers:j(j({},Xn(ja(s))),Xn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=pE(t,e),i=this.requestConfig,{headers:o}=i,s=xr(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>za(l).query),c=r.documents.map(({variables:l})=>l);return Ba({url:this.url,query:a,variables:c,headers:j(j({},Xn(ja(o))),Xn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:po,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},Ba=t=>Dn(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=mE(lE((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield bE(c,(n=o.jsonSerializer)!=null?n:hc),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=xr(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return An(j({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new im(An(j({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),gE=(t,e,n,r)=>{let i=r!=null?r:hc;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},bE=(t,e)=>Dn(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),ja=t=>typeof t=="function"?t():t,Ll={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(Ll,Ll.exports);var vE=Ll.exports,rn=dc(vE),Eo=function(){return Eo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Eo.apply(this,arguments)},fo=new Map,Xl=new Map,om=!0,Ro=!1;function sm(t){return t.replace(/[\s,]+/g," ").trim()}function wE(t){return sm(t.source.body.substring(t.start,t.end))}function SE(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=wE(r.loc),s=Xl.get(i);s&&!s.has(o)?om&&console.warn("Warning: fragment with name "+i+` already exists.
394
+ }`)}function et(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function Xo(t){return et(" ",t.replace(/\n/g,`
395
+ `))}function sf(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
396
+ `)))!==null&&e!==void 0?e:!1}var Kc=JSON,ZR=t=>t.toUpperCase(),xR=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},VR=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},OR=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},NR=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},af=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},Zl=t=>{if(typeof t=="string"){let n;try{let r=Yc(t);n=af(r)}catch(r){}return{query:t,operationName:n}}let e=af(t);return{query:RR(t),operationName:e}},jm=class Wo extends Error{constructor(e,n){let r=`${Wo.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Wo.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Wo)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},_c=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dc={exports:{}};(function(t,e){var n=typeof self<"u"?self:_c,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var v={next:function(){var V=y.shift();return{done:V===void 0,value:V}}};return a.iterable&&(v[Symbol.iterator]=function(){return v}),v}function m(y){this.map={},y instanceof m?y.forEach(function(v,V){this.append(V,v)},this):Array.isArray(y)?y.forEach(function(v){this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}m.prototype.append=function(y,v){y=h(y),v=p(v);var V=this.map[y];this.map[y]=V?V+", "+v:v},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,v){this.map[h(y)]=p(v)},m.prototype.forEach=function(y,v){for(var V in this.map)this.map.hasOwnProperty(V)&&y.call(v,this.map[V],V,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(v,V){y.push(V)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(v,V){y.push([V,v])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function g(y){return new Promise(function(v,V){y.onload=function(){v(y.result)},y.onerror=function(){V(y.error)}})}function b(y){var v=new FileReader,V=g(v);return v.readAsArrayBuffer(y),V}function w(y){var v=new FileReader,V=g(v);return v.readAsText(y),V}function E(y){for(var v=new Uint8Array(y),V=new Array(v.length),D=0;D<v.length;D++)V[D]=String.fromCharCode(v[D]);return V.join("")}function I(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function S(){return this.bodyUsed=!1,this.Ur=function(y){this._t=y,y?typeof y=="string"?this.Ye=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.ne=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.Fr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.Ye=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.U=I(y.buffer),this._t=new Blob([this.U])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.U=I(y):this.Ye=y=Object.prototype.toString.call(y):this.Ye="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.ne&&this.ne.type?this.headers.set("content-type",this.ne.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.ne)return Promise.resolve(this.ne);if(this.U)return Promise.resolve(new Blob([this.U]));if(this.Fr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.Ye]))},this.arrayBuffer=function(){return this.U?d(this)||Promise.resolve(this.U):this.blob().then(b)}),this.text=function(){var y=d(this);if(y)return y;if(this.ne)return w(this.ne);if(this.U)return Promise.resolve(E(this.U));if(this.Fr)throw new Error("could not read FormData body as text");return Promise.resolve(this.Ye)},a.formData&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(y){var v=y.toUpperCase();return T.indexOf(v)>-1?v:y}function Z(y,v){v=v||{};var V=v.body;if(y instanceof Z){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,v.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!V&&y._t!=null&&(V=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new m(v.headers)),this.method=x(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");this.Ur(V)}Z.prototype.clone=function(){return new Z(this,{body:this._t})};function k(y){var v=new FormData;return y.trim().split("&").forEach(function(V){if(V){var D=V.split("="),U=D.shift().replace(/\+/g," "),L=D.join("=").replace(/\+/g," ");v.append(decodeURIComponent(U),decodeURIComponent(L))}}),v}function O(y){var v=new m,V=y.replace(/\r?\n[\t ]+/g," ");return V.split(/\r?\n/).forEach(function(D){var U=D.split(":"),L=U.shift().trim();if(L){var q=U.join(":").trim();v.append(L,q)}}),v}S.call(Z.prototype);function X(y,v){v||(v={}),this.type="default",this.status=v.status===void 0?200:v.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in v?v.statusText:"OK",this.headers=new m(v.headers),this.url=v.url||"",this.Ur(y)}S.call(X.prototype),X.prototype.clone=function(){return new X(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},X.error=function(){var y=new X(null,{status:0,statusText:""});return y.type="error",y};var _=[301,302,303,307,308];X.redirect=function(y,v){if(_.indexOf(v)===-1)throw new RangeError("Invalid status code");return new X(null,{status:v,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(v,V){this.message=v,this.name=V;var D=Error(v);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function tt(y,v){return new Promise(function(V,D){var U=new Z(y,v);if(U.signal&&U.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function q(){L.abort()}L.onload=function(){var lt={status:L.status,statusText:L.statusText,headers:O(L.getAllResponseHeaders()||"")};lt.url="responseURL"in L?L.responseURL:lt.headers.get("X-Request-URL");var Zt="response"in L?L.response:L.responseText;V(new X(Zt,lt))},L.onerror=function(){D(new TypeError("Network request failed"))},L.ontimeout=function(){D(new TypeError("Network request failed"))},L.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},L.open(U.method,U.url,!0),U.credentials==="include"?L.withCredentials=!0:U.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&a.blob&&(L.responseType="blob"),U.headers.forEach(function(lt,Zt){L.setRequestHeader(Zt,lt)}),U.signal&&(U.signal.addEventListener("abort",q),L.onreadystatechange=function(){L.readyState===4&&U.signal.removeEventListener("abort",q)}),L.send(typeof U._t>"u"?null:U._t)})}return tt.polyfill=!0,o.fetch||(o.fetch=tt,o.Headers=m,o.Request=Z,o.Response=X),s.Headers=m,s.Request=Z,s.Response=X,s.fetch=tt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(dc,dc.exports);var Ho=dc.exports,Mo=Hc(Ho),GR=UE({__proto__:null,default:Mo},[Ho]),rr=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||GR&&Ho.Headers&&t instanceof Ho.Headers?e=xR(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},lf=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),LR=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(lf(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:lf(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},XR=t=>e=>hr(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=nt({},e.headers),h="",p;t==="POST"?(p=MR(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=LR({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:Kc});let f=nt({method:t,headers:u,body:p},c),m=r,d=f;if(l){let g=yield Promise.resolve(l(cr(nt({},f),{url:r,operationName:s,variables:o}))),{url:b}=g,w=ei(g,["url"]);m=b,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),WR=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>hr(this,null,function*(){let[r,i,o]=n,s=OR(r,i,o),a=this.requestConfig,{headers:c,fetch:l=Mo,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=ei(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Zl(s.query);return xl({url:m,query:s.query,variables:s.variables,headers:nt(nt({},rr(Vl(c))),rr(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(g=>(p&&p(g),g)).catch(g=>{throw p&&p(g),g})})}request(t,...e){return hr(this,null,function*(){let[n,r]=e,i=VR(t,n,r),o=this.requestConfig,{headers:s,fetch:a=Mo,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=ei(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Zl(i.document);return xl({url:p,query:f,variables:i.variables,headers:nt(nt({},rr(Vl(s))),rr(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=NR(t,e),i=this.requestConfig,{headers:o}=i,s=ei(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Zl(l).query),c=r.documents.map(({variables:l})=>l);return xl({url:this.url,query:a,variables:c,headers:nt(nt({},rr(Vl(o))),rr(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:Mo,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},xl=t=>hr(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=XR(ZR((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield PR(c,(n=o.jsonSerializer)!=null?n:Kc),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=ei(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return cr(nt({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new jm(cr(nt({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),MR=(t,e,n,r)=>{let i=r!=null?r:Kc;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},PR=(t,e)=>hr(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),Vl=t=>typeof t=="function"?t():t,fc={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(fc,fc.exports);var UR=fc.exports,Tn=Hc(UR),zo=function(){return zo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zo.apply(this,arguments)},Po=new Map,mc=new Map,Qm=!0,Bo=!1;function $m(t){return t.replace(/[\s,]+/g," ").trim()}function FR(t){return $m(t.source.body.substring(t.start,t.end))}function AR(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=FR(r.loc),s=mc.get(i);s&&!s.has(o)?Qm&&console.warn("Warning: fragment with name "+i+` already exists.
397
397
  graphql-tag enforces all fragment names across your application to be unique; read more about
398
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Xl.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Eo(Eo({},t),{definitions:n})}function IE(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function TE(t){var e=sm(t);if(!fo.has(e)){var n=uc(t,{experimentalFragmentVariables:Ro,allowLegacyFragmentVariables:Ro});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");fo.set(e,IE(SE(n)))}return fo.get(e)}function Wt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),TE(r)}function EE(){fo.clear(),Xl.clear()}function RE(){om=!1}function CE(){Ro=!0}function ZE(){Ro=!1}var wr={gql:Wt,resetCaches:EE,disableFragmentWarnings:RE,enableExperimentalFragmentVariables:CE,disableExperimentalFragmentVariables:ZE};(function(t){t.gql=wr.gql,t.resetCaches=wr.resetCaches,t.disableFragmentWarnings=wr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=wr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=wr.disableExperimentalFragmentVariables})(Wt||(Wt={}));Wt.default=Wt;var am=Wt`
398
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||mc.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),zo(zo({},t),{definitions:n})}function DR(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function JR(t){var e=$m(t);if(!Po.has(e)){var n=Yc(t,{experimentalFragmentVariables:Bo,allowLegacyFragmentVariables:Bo});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Po.set(e,DR(AR(n)))}return Po.get(e)}function Jt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),JR(r)}function YR(){Po.clear(),mc.clear()}function KR(){Qm=!1}function _R(){Bo=!0}function HR(){Bo=!1}var Kr={gql:Jt,resetCaches:YR,disableFragmentWarnings:KR,enableExperimentalFragmentVariables:_R,disableExperimentalFragmentVariables:HR};(function(t){t.gql=Kr.gql,t.resetCaches=Kr.resetCaches,t.disableFragmentWarnings=Kr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Kr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Kr.disableExperimentalFragmentVariables})(Jt||(Jt={}));Jt.default=Jt;var qm=Jt`
399
399
  fragment MatchParts on MatchConfig {
400
400
  regexValue
401
401
  matchValue
402
402
  }
403
- `,kE=Wt`
403
+ `,zR=Jt`
404
404
  mutation PushPayload(
405
405
  $session_secure_id: String!
406
406
  $payload_id: ID!
@@ -426,7 +426,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
426
426
  highlight_logs: $highlight_logs
427
427
  )
428
428
  }
429
- `,VE=Wt`
429
+ `,BR=Jt`
430
430
  mutation PushPayloadCompressed(
431
431
  $session_secure_id: String!
432
432
  $payload_id: ID!
@@ -438,7 +438,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
438
438
  data: $data
439
439
  )
440
440
  }
441
- `,xE=Wt`
441
+ `,jR=Jt`
442
442
  mutation identifySession(
443
443
  $session_secure_id: String!
444
444
  $user_identifier: String!
@@ -450,7 +450,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
450
450
  user_object: $user_object
451
451
  )
452
452
  }
453
- `,NE=Wt`
453
+ `,QR=Jt`
454
454
  mutation addSessionProperties(
455
455
  $session_secure_id: String!
456
456
  $properties_object: Any
@@ -460,11 +460,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
460
460
  properties_object: $properties_object
461
461
  )
462
462
  }
463
- `,OE=Wt`
463
+ `,$R=Jt`
464
464
  mutation pushMetrics($metrics: [MetricInput]!) {
465
465
  pushMetrics(metrics: $metrics)
466
466
  }
467
- `,GE=Wt`
467
+ `,qR=Jt`
468
468
  mutation addSessionFeedback(
469
469
  $session_secure_id: String!
470
470
  $user_name: String
@@ -480,7 +480,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
480
480
  timestamp: $timestamp
481
481
  )
482
482
  }
483
- `,LE=Wt`
483
+ `,tC=Jt`
484
484
  mutation initializeSession(
485
485
  $session_secure_id: String!
486
486
  $organization_verbose_id: String!
@@ -565,12 +565,12 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
565
565
  }
566
566
  }
567
567
  }
568
- ${am}
569
- `,XE=Wt`
568
+ ${qm}
569
+ `,eC=Jt`
570
570
  query Ignore($id: ID!) {
571
571
  ignore(id: $id)
572
572
  }
573
- `,WE=Wt`
573
+ `,nC=Jt`
574
574
  query GetSamplingConfig($organization_verbose_id: String!) {
575
575
  sampling(organization_verbose_id: $organization_verbose_id) {
576
576
  spans {
@@ -619,8 +619,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
619
619
  }
620
620
  }
621
621
  }
622
- ${am}
623
- `,UE=(t,e,n,r)=>t();function PE(t,e=UE){return{PushPayload(n,r){return e(i=>t.request(kE,n,j(j({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(VE,n,j(j({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(xE,n,j(j({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(NE,n,j(j({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(OE,n,j(j({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(GE,n,j(j({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(LE,n,j(j({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(XE,n,j(j({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(WE,n,j(j({},r),i)),"GetSamplingConfig","query",n)}}}var tn=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(tn||{}),Bt=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Bt||{});function ME(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function FE(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let s=r.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&i.push(s)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function Wl(t){return Object.prototype.toString.call(t)==="[object Object]"}function lm(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(Wl(t[r])&&lm(t[r],e-1))return!0;return!1}function Ul(t,e){let n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);let r=[],i=[];return JSON.stringify(t,function(a,c){if(r.length>0){let l=r.indexOf(this);~l?r.splice(l+1):r.push(this),~l?i.splice(l,1/0,a):i.push(a),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return s(c);if(c instanceof Event){let l={};for(let u in c){let h=c[u];Array.isArray(h)?l[u]=FE(h.length?h[0]:null):l[u]=h}return l}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(a){return Wl(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(Wl(a)&&lm(a,n.depthOfLimit))}function s(a){let c=a.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}var cm=900*1e3;function Bi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var AE={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Pl(t,e){function n(i,o,s){if(typeof document<"u"){s=Bi({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Bi({},o,{expires:-1}))},withAttributes:function(i){return Pl(this.converter,Bi({},this.attributes,i))},withConverter:function(i){return Pl(Bi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Qa=Pl(AE,{path:"/"}),um="localStorage",Ml=!0,JE=class{constructor(){Wr(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},DE=class{getItem(t){var e;return(e=Qa.get(t))!=null?e:""}setItem(t,e){if(!Ml)return;let n=new Date;n.setTime(n.getTime()+cm),Qa.set(t,e,{expires:n})}removeItem(t){Ml&&Qa.remove(t)}},Jo=new JE,Co=new DE,fc=()=>{try{switch(um){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Jo}},YE=t=>{um=t},yd=t=>{Ml=t},hm=t=>{try{return fc().getItem(t)}catch(e){return Ve("storage","debug",`failed to get item ${t}; using global storage`,e),Jo.getItem(t)}},pm=(t,e)=>{Co.setItem(t,e);try{return fc().setItem(t,e)}catch(n){return Ve("storage","debug",`failed to set item ${t}; using global storage`,n),Jo.setItem(t,e)}},KE=t=>{Co.removeItem(t);try{return fc().removeItem(t)}catch(e){return Ve("storage","debug",`failed to remove item ${t}; using global storage`,e),Jo.removeItem(t)}},Yr=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(Yr||{}),Do=t=>`${Yr.SESSION_DATA}_${t}`,Fe=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:dm()},_E=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},dm=()=>{var t;return(t=hm(Yr.SESSION_ID))!=null?t:""},fm=t=>{pm(Yr.SESSION_ID,t)},HE=t=>{let e=Do(t);return JSON.parse(hm(e)||"{}")},zE=t=>{t||(t=dm());let e=HE(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<cm)return e;KE(Do(t))},mm=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;_E(e),pm(Do(e),JSON.stringify(t))},BE=function(){let t=Co.getItem(Yr.SESSION_ID);fm(t);let e=Do(t),n=Co.getItem(e);try{mm(JSON.parse(n))}catch(r){}},ym=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(ym||{}),mc=10,yc=1e3,gc=500,jE=[ym.BillingQuotaExceeded.toString()],QE=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>jE.includes(n.message)))===void 0},$E=()=>{let t=(e,n,r,i,o=0)=>Dn(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof im&&!QE(s))throw s;if(o<mc)return yield new Promise(a=>setTimeout(a,yc+gc*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},Lt="feature_flag",gm="launchdarkly",qE="evaluation",tR=`${Lt}.set.id`,eR=`${Lt}.key`,nR=`${Lt}.contextKeys`,rR=`${Lt}.context.id`,iR=`${Lt}.result.value`,oR=`${Lt}.provider.name`,gd={kind:`${Lt}.result.reason.kind`,errorKind:`${Lt}.result.reason.errorKind`,ruleIndex:`${Lt}.result.reason.ruleIndex`,ruleId:`${Lt}.result.reason.ruleId`,prerequisiteKey:`${Lt}.result.reason.prerequisiteKey`,inExperiment:`${Lt}.result.reason.inExperiment`,bigSegmentsStatus:`${Lt}.result.reason.bigSegmentsStatus`},sR=`${Lt}.result.variationIndex`,aR=`${gm}.application.id`,lR=`${gm}.application.version`,cR="$ld:telemetry:session:init",uR="$ld:telemetry:error",bd="$ld:telemetry:track",hR="$ld:telemetry:metric",bm="document_load",pR="result.status";function vm(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function wm(t){return t.kind==="multi"}function vd(t){return wm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${vm(t[e].key)}`).join(":"):t.key}function wd(t){return wm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:vm(t[e].key)})).reduce((e,n)=>j(j({},e),n),{}):t.key}var dR=class{constructor(t,e){Wr(this,"client"),Wr(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(cR,{sessionID:t})}recordGauge(t,e){var n;e.category!==Bt.WebVital&&e.name!==bm||e.name!=="Jank"&&this.client.track(`${hR}:${e.name.toLowerCase()}`,An(j({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>j(j({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(uR,An(j({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${bd}:${n}`:bd,An(j({},e),{sessionID:t}))}},fR=class extends wo{constructor(t,e){super(),Wr(this,"client"),this.client=new dR(t,e)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(e,n,r)=>(this.load(this.client),n)}]}init(t){return this.p("init",[t])}recordGauge(t,e){return this.p("recordGauge",[t,e])}identify(t,e,n={},r){return this.p("identify",[t,e,n,r])}error(t,e){return this.p("error",[t,e])}track(t,e){return this.p("track",[t,e])}};function mR(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}var yR=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},gR=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},bR=class{constructor(t){Wr(this,"sessionSecureID");try{t!=null&&t.storageMode&&YE(t==null?void 0:t.storageMode),yd(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?BE():yd(!1);let e=Fe(),n=zE(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=gR(),fm(this.sessionSecureID),mm({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){Ve("Error initializing @launchdarkly observability plugin","error",e)}}},Zo=class extends wo{recordGauge(e){return this.p("recordGauge",[e])}recordCount(e){return this.p("recordCount",[e])}recordIncr(e){return this.p("recordIncr",[e])}recordHistogram(e){return this.p("recordHistogram",[e])}recordUpDownCounter(e){return this.p("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.p("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.p("startManualSpan",[e,n,r,i])}register(e,n){return this.p("register",[e,n])}recordLog(e,n,r){return this.p("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.p("recordError",[e,n,r,i,o])}},ln;typeof globalThis<"u"?globalThis.LDObserve?ln=globalThis.LDObserve:(ln=new Zo,globalThis.LDObserve=ln):ln=new Zo;var vR=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return ln}},Symbol.toStringTag,{value:"Module"})),wR=Object.defineProperty,SR=Object.defineProperties,IR=Object.getOwnPropertyDescriptors,Sd=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,ER=Object.prototype.propertyIsEnumerable,Fl=(t,e,n)=>e in t?wR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mt=(t,e)=>{for(var n in e||(e={}))TR.call(e,n)&&Fl(t,n,e[n]);if(Sd)for(var n of Sd(e))ER.call(e,n)&&Fl(t,n,e[n]);return t},Jt=(t,e)=>SR(t,IR(e)),yt=(t,e,n)=>Fl(t,typeof e!="symbol"?e+"":e,n),Yo=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Sm={exports:{}},Id={exports:{}},Td;function RR(){return Td||(Td=1,(function(t,e){(function(n,r){t.exports=r()})(pc,function(){function n(d){return!isNaN(parseFloat(d))&&isFinite(d)}function r(d){return d.charAt(0).toUpperCase()+d.substring(1)}function i(d){return function(){return this[d]}}var o=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],c=["args"],l=["evalOrigin"],u=o.concat(s,a,c,l);function h(d){if(d)for(var v=0;v<u.length;v++)d[u[v]]!==void 0&&this["set"+r(u[v])](d[u[v]])}h.prototype={getArgs:function(){return this.args},setArgs:function(d){if(Object.prototype.toString.call(d)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=d},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(d){if(d instanceof h)this.evalOrigin=d;else if(d instanceof Object)this.evalOrigin=new h(d);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var d=this.getFileName()||"",v=this.getLineNumber()||"",g=this.getColumnNumber()||"",w=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+v+":"+g+")":"[eval]:"+v+":"+g:w?w+" ("+d+":"+v+":"+g+")":d+":"+v+":"+g}},h.fromString=function(d){var v=d.indexOf("("),g=d.lastIndexOf(")"),w=d.substring(0,v),R=d.substring(v+1,g).split(","),E=d.substring(g+1);if(E.indexOf("@")===0)var T=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(E,""),V=T[1],O=T[2],U=T[3];return new h({functionName:w,args:R||void 0,fileName:V,lineNumber:O||void 0,columnNumber:U||void 0})};for(var p=0;p<o.length;p++)h.prototype["get"+r(o[p])]=i(o[p]),h.prototype["set"+r(o[p])]=(function(d){return function(v){this[d]=!!v}})(o[p]);for(var f=0;f<s.length;f++)h.prototype["get"+r(s[f])]=i(s[f]),h.prototype["set"+r(s[f])]=(function(d){return function(v){if(!n(v))throw new TypeError(d+" must be a Number");this[d]=Number(v)}})(s[f]);for(var m=0;m<a.length;m++)h.prototype["get"+r(a[m])]=i(a[m]),h.prototype["set"+r(a[m])]=(function(d){return function(v){this[d]=String(v)}})(a[m]);return h})})(Id)),Id.exports}(function(t,e){(function(n,r){t.exports=r(RR())})(pc,function(n){var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(s){if(typeof s.stacktrace<"u"||typeof s["opera#sourceloc"]<"u")return this.parseOpera(s);if(s.stack&&s.stack.match(i))return this.parseV8OrIE(s);if(s.stack)return this.parseFFOrSafari(s);throw new Error("Cannot parse given Error object")},extractLocation:function(s){if(s.indexOf(":")===-1)return[s];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=a.exec(s.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(s){var a=s.stack.split(`
622
+ ${qm}
623
+ `,rC=(t,e,n,r)=>t();function iC(t,e=rC){return{PushPayload(n,r){return e(i=>t.request(zR,n,nt(nt({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(BR,n,nt(nt({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(jR,n,nt(nt({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(QR,n,nt(nt({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request($R,n,nt(nt({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(qR,n,nt(nt({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(tC,n,nt(nt({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(eC,n,nt(nt({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(nC,n,nt(nt({},r),i)),"GetSamplingConfig","query",n)}}}var wn=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(wn||{}),he=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(he||{});function oC(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function sC(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let s=r.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&i.push(s)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function yc(t){return Object.prototype.toString.call(t)==="[object Object]"}function ty(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(yc(t[r])&&ty(t[r],e-1))return!0;return!1}function gc(t,e){let n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);let r=[],i=[];return JSON.stringify(t,function(a,c){if(r.length>0){let l=r.indexOf(this);~l?r.splice(l+1):r.push(this),~l?i.splice(l,1/0,a):i.push(a),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return s(c);if(c instanceof Event){let l={};for(let u in c){let h=c[u];Array.isArray(h)?l[u]=sC(h.length?h[0]:null):l[u]=h}return l}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(a){return yc(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(yc(a)&&ty(a,n.depthOfLimit))}function s(a){let c=a.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}var ey=900*1e3;function wo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var aC={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function bc(t,e){function n(i,o,s){if(typeof document<"u"){s=wo({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",wo({},o,{expires:-1}))},withAttributes:function(i){return bc(this.converter,wo({},this.attributes,i))},withConverter:function(i){return bc(wo({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ol=bc(aC,{path:"/"}),ny="localStorage",vc=!0,lC=class{constructor(){ai(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},cC=class{getItem(t){var e;return(e=Ol.get(t))!=null?e:""}setItem(t,e){if(!vc)return;let n=new Date;n.setTime(n.getTime()+ey),Ol.set(t,e,{expires:n})}removeItem(t){vc&&Ol.remove(t)}},ps=new lC,jo=new cC,zc=()=>{try{switch(ny){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return ps}},uC=t=>{ny=t},cf=t=>{vc=t},ry=t=>{try{return zc().getItem(t)}catch(e){return Ke("storage","debug",`failed to get item ${t}; using global storage`,e),ps.getItem(t)}},iy=(t,e)=>{jo.setItem(t,e);try{return zc().setItem(t,e)}catch(n){return Ke("storage","debug",`failed to set item ${t}; using global storage`,n),ps.setItem(t,e)}},hC=t=>{jo.removeItem(t);try{return zc().removeItem(t)}catch(e){return Ke("storage","debug",`failed to remove item ${t}; using global storage`,e),ps.removeItem(t)}},mi=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(mi||{}),ds=t=>`${mi.SESSION_DATA}_${t}`,rn=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:oy()},pC=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},oy=()=>{var t;return(t=ry(mi.SESSION_ID))!=null?t:""},sy=t=>{iy(mi.SESSION_ID,t)},dC=t=>{let e=ds(t);return JSON.parse(ry(e)||"{}")},fC=t=>{t||(t=oy());let e=dC(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<ey)return e;hC(ds(t))},ay=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;pC(e),iy(ds(e),JSON.stringify(t))},mC=function(){let t=jo.getItem(mi.SESSION_ID);sy(t);let e=ds(t),n=jo.getItem(e);try{ay(JSON.parse(n))}catch(r){}},ly=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(ly||{}),Bc=10,jc=1e3,Qc=500,yC=[ly.BillingQuotaExceeded.toString()],gC=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>yC.includes(n.message)))===void 0},bC=()=>{let t=(e,n,r,i,o=0)=>hr(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof jm&&!gC(s))throw s;if(o<Bc)return yield new Promise(a=>setTimeout(a,jc+Qc*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},At="feature_flag",cy="launchdarkly",vC="evaluation",wC=`${At}.set.id`,SC=`${At}.key`,IC=`${At}.contextKeys`,TC=`${At}.context.id`,EC=`${At}.result.value`,RC=`${At}.provider.name`,uf={kind:`${At}.result.reason.kind`,errorKind:`${At}.result.reason.errorKind`,ruleIndex:`${At}.result.reason.ruleIndex`,ruleId:`${At}.result.reason.ruleId`,prerequisiteKey:`${At}.result.reason.prerequisiteKey`,inExperiment:`${At}.result.reason.inExperiment`,bigSegmentsStatus:`${At}.result.reason.bigSegmentsStatus`},CC=`${At}.result.variationIndex`,kC=`${cy}.application.id`,ZC=`${cy}.application.version`,xC="$ld:telemetry:session:init",VC="$ld:telemetry:error",hf="$ld:telemetry:track",OC="$ld:telemetry:metric",uy="document_load",NC="result.status";function hy(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function py(t){return t.kind==="multi"}function pf(t){return py(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${hy(t[e].key)}`).join(":"):t.key}function df(t){return py(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:hy(t[e].key)})).reduce((e,n)=>nt(nt({},e),n),{}):t.key}var GC=class{constructor(t,e){ai(this,"client"),ai(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(xC,{sessionID:t})}recordGauge(t,e){var n;e.category!==he.WebVital&&e.name!==uy||e.name!=="Jank"&&this.client.track(`${OC}:${e.name.toLowerCase()}`,cr(nt({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>nt(nt({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(VC,cr(nt({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${hf}:${n}`:hf,cr(nt({},e),{sessionID:t}))}},LC=class extends Yo{constructor(t,e){super(),ai(this,"client"),this.client=new GC(t,e)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(e,n,r)=>(this.load(this.client),n)}]}init(t){return this.p("init",[t])}recordGauge(t,e){return this.p("recordGauge",[t,e])}identify(t,e,n={},r){return this.p("identify",[t,e,n,r])}error(t,e){return this.p("error",[t,e])}track(t,e){return this.p("track",[t,e])}};function XC(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}var WC=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},MC=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},PC=class{constructor(t){ai(this,"sessionSecureID");try{t!=null&&t.storageMode&&uC(t==null?void 0:t.storageMode),cf(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?mC():cf(!1);let e=rn(),n=fC(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=MC(),sy(this.sessionSecureID),ay({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){Ke("Error initializing @launchdarkly observability plugin","error",e)}}},Qo=class extends Yo{recordGauge(e){return this.p("recordGauge",[e])}recordCount(e){return this.p("recordCount",[e])}recordIncr(e){return this.p("recordIncr",[e])}recordHistogram(e){return this.p("recordHistogram",[e])}recordUpDownCounter(e){return this.p("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.p("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.p("startManualSpan",[e,n,r,i])}register(e,n){return this.p("register",[e,n])}recordLog(e,n,r){return this.p("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.p("recordError",[e,n,r,i,o])}},kn;typeof globalThis<"u"?globalThis.LDObserve?kn=globalThis.LDObserve:(kn=new Qo,globalThis.LDObserve=kn):kn=new Qo;var UC=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return kn}},Symbol.toStringTag,{value:"Module"})),FC=Object.defineProperty,AC=Object.defineProperties,DC=Object.getOwnPropertyDescriptors,ff=Object.getOwnPropertySymbols,JC=Object.prototype.hasOwnProperty,YC=Object.prototype.propertyIsEnumerable,wc=(t,e,n)=>e in t?FC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bt=(t,e)=>{for(var n in e||(e={}))JC.call(e,n)&&wc(t,n,e[n]);if(ff)for(var n of ff(e))YC.call(e,n)&&wc(t,n,e[n]);return t},zt=(t,e)=>AC(t,DC(e)),St=(t,e,n)=>wc(t,typeof e!="symbol"?e+"":e,n),fs=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),dy={exports:{}},mf={exports:{}},yf;function KC(){return yf||(yf=1,(function(t,e){(function(n,r){t.exports=r()})(_c,function(){function n(d){return!isNaN(parseFloat(d))&&isFinite(d)}function r(d){return d.charAt(0).toUpperCase()+d.substring(1)}function i(d){return function(){return this[d]}}var o=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],c=["args"],l=["evalOrigin"],u=o.concat(s,a,c,l);function h(d){if(d)for(var g=0;g<u.length;g++)d[u[g]]!==void 0&&this["set"+r(u[g])](d[u[g]])}h.prototype={getArgs:function(){return this.args},setArgs:function(d){if(Object.prototype.toString.call(d)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=d},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(d){if(d instanceof h)this.evalOrigin=d;else if(d instanceof Object)this.evalOrigin=new h(d);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var d=this.getFileName()||"",g=this.getLineNumber()||"",b=this.getColumnNumber()||"",w=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+g+":"+b+")":"[eval]:"+g+":"+b:w?w+" ("+d+":"+g+":"+b+")":d+":"+g+":"+b}},h.fromString=function(d){var g=d.indexOf("("),b=d.lastIndexOf(")"),w=d.substring(0,g),E=d.substring(g+1,b).split(","),I=d.substring(b+1);if(I.indexOf("@")===0)var S=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(I,""),T=S[1],x=S[2],Z=S[3];return new h({functionName:w,args:E||void 0,fileName:T,lineNumber:x||void 0,columnNumber:Z||void 0})};for(var p=0;p<o.length;p++)h.prototype["get"+r(o[p])]=i(o[p]),h.prototype["set"+r(o[p])]=(function(d){return function(g){this[d]=!!g}})(o[p]);for(var f=0;f<s.length;f++)h.prototype["get"+r(s[f])]=i(s[f]),h.prototype["set"+r(s[f])]=(function(d){return function(g){if(!n(g))throw new TypeError(d+" must be a Number");this[d]=Number(g)}})(s[f]);for(var m=0;m<a.length;m++)h.prototype["get"+r(a[m])]=i(a[m]),h.prototype["set"+r(a[m])]=(function(d){return function(g){this[d]=String(g)}})(a[m]);return h})})(mf)),mf.exports}(function(t,e){(function(n,r){t.exports=r(KC())})(_c,function(n){var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(s){if(typeof s.stacktrace<"u"||typeof s["opera#sourceloc"]<"u")return this.parseOpera(s);if(s.stack&&s.stack.match(i))return this.parseV8OrIE(s);if(s.stack)return this.parseFFOrSafari(s);throw new Error("Cannot parse given Error object")},extractLocation:function(s){if(s.indexOf(":")===-1)return[s];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=a.exec(s.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(s){var a=s.stack.split(`
624
624
  `).filter(function(c){return!!c.match(i)},this);return a.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var l=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),u=l.match(/ (\((.+):(\d+):(\d+)\)$)/);l=u?l.replace(u[0],""):l;var h=l.split(/\s+/).slice(1),p=this.extractLocation(u?u[1]:h.pop()),f=h.join(" ")||void 0,m=["eval","<anonymous>"].indexOf(p[0])>-1?void 0:p[0];return new n({functionName:f,fileName:m,lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseFFOrSafari:function(s){var a=s.stack.split(`
625
625
  `).filter(function(c){return!c.match(o)},this);return a.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new n({functionName:c});var l=/((.*".+"[^@]*)?[^@]*)(?:@)/,u=c.match(l),h=u&&u[1]?u[1]:void 0,p=this.extractLocation(c.replace(l,""));return new n({functionName:h,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseOpera:function(s){return!s.stacktrace||s.message.indexOf(`
626
626
  `)>-1&&s.message.split(`
@@ -628,19 +628,19 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
628
628
  `).length?this.parseOpera9(s):s.stack?this.parseOpera11(s):this.parseOpera10(s)},parseOpera9:function(s){for(var a=/Line (\d+).*script (?:in )?(\S+)/i,c=s.message.split(`
629
629
  `),l=[],u=2,h=c.length;u<h;u+=2){var p=a.exec(c[u]);p&&l.push(new n({fileName:p[2],lineNumber:p[1],source:c[u]}))}return l},parseOpera10:function(s){for(var a=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=s.stacktrace.split(`
630
630
  `),l=[],u=0,h=c.length;u<h;u+=2){var p=a.exec(c[u]);p&&l.push(new n({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:c[u]}))}return l},parseOpera11:function(s){var a=s.stack.split(`
631
- `).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return a.map(function(c){var l=c.split("@"),u=this.extractLocation(l.pop()),h=l.shift()||"",p=h.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,f;h.match(/\(([^)]*)\)/)&&(f=h.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var m=f===void 0||f==="[arguments not available]"?void 0:f.split(",");return new n({functionName:p,args:m,fileName:u[0],lineNumber:u[1],columnNumber:u[2],source:c})},this)}}})})(Sm);var CR=Sm.exports,Ed=dc(CR);function Ko(t){try{return Ed.parse(t)}catch(e){try{return Ed.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function ZR(t,e){let n=e.logger,r;r=window[n];let i=[];if(e.level.includes("error")&&window){let s=a=>{let{message:c,error:l}=a,u=[];l&&(u=Ko(l));let h=[Ul(c,e.stringifyOptions)];t({type:"Error",trace:u,time:Date.now(),value:h})};window.addEventListener("error",s),i.push(()=>{window&&window.removeEventListener("error",s)})}for(let s of e.level)i.push(o(r,s));return()=>{i.forEach(s=>s())};function o(s,a){return s[a]?ME(s,a,c=>(...l)=>{c.apply(this,l);try{t(kR(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function kR(t,e,...n){let r=Ko(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Ul(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:Ul(n.filter(o=>typeof o=="object").reduce((o,s)=>mt(mt({},o),s),{}),e.stringifyOptions),time:Date.now()}}function $a(t,e,n,r){var i,o,s,a;let c=r!=null?r:e,l=Ko(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=xR(l);t({error:c,event:rn(e),type:"window.onerror",url:window.location.href,source:n!=null?n:"",lineNumber:(i=h[0])!=null&&i.lineNumber?(o=h[0])==null?void 0:o.lineNumber:0,columnNumber:(s=h[0])!=null&&s.columnNumber?(a=h[0])==null?void 0:a.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString(),payload:u?rn(u):void 0})}var VR=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};let n=window.onerror=(s,a,c,l,u)=>{$a(t,s,a,u)},r=window.onunhandledrejection=s=>{if(s.reason){let a=s.promise;a.getStack?$a(t,s.reason,s.type,a.getStack()):$a(t,s.reason,s.type)}},i=window.Promise,o=class extends i{constructor(s){super(s),yt(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){let s=typeof window.Zone>"u";return e&&s}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},xR=t=>{var e,n;if(t.length===0)return t;let r=t[0];return(e=r.fileName)!=null&&e.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?t.slice(1):t},Rd=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],Cd=["websocket error",'\\"ResizeObserver loop'],NR=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},cn="1.9.0",Zd=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function OR(t){var e=new Set([t]),n=new Set,r=t.match(Zd);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(a){return a===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(a){if(e.has(a))return!0;if(n.has(a))return!1;var c=a.match(Zd);if(!c)return o(a);var l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?o(a):i.major===0?i.minor===l.minor&&i.patch<=l.patch?s(a):o(a):i.minor<=l.minor?s(a):o(a)}}var GR=OR(cn),LR=cn.split(".")[0],Pr=Symbol.for("opentelemetry.js.api."+LR),Mr=NR;function Kr(t,e,n,r){var i;r===void 0&&(r=!1);var o=Mr[Pr]=(i=Mr[Pr])!==null&&i!==void 0?i:{version:cn};if(!r&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(s.stack||s.message),!1}if(o.version!==cn){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+cn);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+cn+"."),!0}function pn(t){var e,n,r=(e=Mr[Pr])===null||e===void 0?void 0:e.version;if(!(!r||!GR(r)))return(n=Mr[Pr])===null||n===void 0?void 0:n[t]}function _r(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+cn+".");var n=Mr[Pr];n&&delete n[t]}var XR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},WR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},UR=(function(){function t(e){this.tr=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("debug",this.tr,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("error",this.tr,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("info",this.tr,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("warn",this.tr,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("verbose",this.tr,e)},t})();function Sr(t,e,n){var r=pn("diag");if(r)return n.unshift(e),r[t].apply(r,WR([],XR(n),!1))}var wt;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(wt||(wt={}));function PR(t,e){t<wt.NONE?t=wt.NONE:t>wt.ALL&&(t=wt.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",wt.ERROR),warn:n("warn",wt.WARN),info:n("info",wt.INFO),debug:n("debug",wt.DEBUG),verbose:n("verbose",wt.VERBOSE)}}var MR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},FR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},AR="diag",we=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=pn("diag");if(a)return a[i].apply(a,FR([],MR(o),!1))}}var n=this,r=function(i,o){var s,a,c;if(o===void 0&&(o={logLevel:wt.INFO}),i===n){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=l.stack)!==null&&s!==void 0?s:l.message),!1}typeof o=="number"&&(o={logLevel:o});var u=pn("diag"),h=PR((a=o.logLevel)!==null&&a!==void 0?a:wt.INFO,i);if(u&&!o.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+p),h.warn("Current logger will overwrite one already registered from "+p)}return Kr("diag",h,n,!0)};n.setLogger=r,n.disable=function(){_r(AR,n)},n.createComponentLogger=function(i){return new UR(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this.U||(this.U=new t),this.U},t})(),JR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},DR=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},YR=(function(){function t(e){this.pn=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this.pn.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this.pn.entries()).map(function(e){var n=JR(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this.pn);return r.pn.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this.pn);return n.pn.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this.pn);try{for(var s=DR(r),a=s.next();!a.done;a=s.next()){var c=a.value;o.pn.delete(c)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t})(),KR=Symbol("BaggageEntryMetadata"),_R=we.instance();function HR(t){return t===void 0&&(t={}),new YR(new Map(Object.entries(t)))}function zR(t){return typeof t!="string"&&(_R.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:KR,toString:function(){return t}}}function bc(t){return Symbol.for(t)}var BR=(function(){function t(e){var n=this;n.Ge=e?new Map(e):new Map,n.getValue=function(r){return n.Ge.get(r)},n.setValue=function(r,i){var o=new t(n.Ge);return o.Ge.set(r,i),o},n.deleteValue=function(r){var i=new t(n.Ge);return i.Ge.delete(r),i}}return t})(),on=new BR,yn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),jR=(function(){function t(){}return t.prototype.createGauge=function(e,n){return oC},t.prototype.createHistogram=function(e,n){return sC},t.prototype.createCounter=function(e,n){return iC},t.prototype.createUpDownCounter=function(e,n){return aC},t.prototype.createObservableGauge=function(e,n){return cC},t.prototype.createObservableCounter=function(e,n){return lC},t.prototype.createObservableUpDownCounter=function(e,n){return uC},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),_o=(function(){function t(){}return t})(),QR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(_o),$R=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(_o),qR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(_o),tC=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(_o),vc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),eC=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(vc),nC=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(vc),rC=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(vc),Im=new jR,iC=new QR,oC=new qR,sC=new tC,aC=new $R,lC=new eC,cC=new nC,uC=new rC;function hC(){return Im}var De;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(De||(De={}));var pC={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},dC={set:function(t,e,n){t!=null&&(t[e]=n)}},fC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},mC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},yC=(function(){function t(){}return t.prototype.active=function(){return on},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,mC([r],fC(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),gC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},bC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},qa="context",vC=new yC,Ho=(function(){function t(){}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalContextManager=function(e){return Kr(qa,e,we.instance())},t.prototype.active=function(){return this.br().active()},t.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this.br()).with.apply(i,bC([e,n,r],gC(o),!1))},t.prototype.bind=function(e,n){return this.br().bind(e,n)},t.prototype.br=function(){return pn(qa)||vC},t.prototype.disable=function(){this.br().disable(),_r(qa,we.instance())},t})(),xe;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(xe||(xe={}));var Tm="0000000000000000",Em="00000000000000000000000000000000",Rm={traceId:Em,spanId:Tm,traceFlags:xe.NONE},Nr=(function(){function t(e){e===void 0&&(e=Rm),this.In=e}return t.prototype.spanContext=function(){return this.In},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t})(),wc=bc("OpenTelemetry Context Key SPAN");function Sc(t){return t.getValue(wc)||void 0}function wC(){return Sc(Ho.getInstance().active())}function Ic(t,e){return t.setValue(wc,e)}function SC(t){return t.deleteValue(wc)}function IC(t,e){return Ic(t,new Nr(e))}function Cm(t){var e;return(e=Sc(t))===null||e===void 0?void 0:e.spanContext()}var TC=/^([0-9a-f]{32})$/i,EC=/^[0-9a-f]{16}$/i;function Zm(t){return TC.test(t)&&t!==Em}function RC(t){return EC.test(t)&&t!==Tm}function zo(t){return Zm(t.traceId)&&RC(t.spanId)}function CC(t){return new Nr(t)}var tl=Ho.getInstance(),km=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=tl.active());var i=!!(n!=null&&n.root);if(i)return new Nr;var o=r&&Cm(r);return ZC(o)&&zo(o)?new Nr(o):new Nr},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:tl.active(),l=this.startSpan(e,o,c),u=Ic(c,l);return tl.with(u,a,void 0,l)}},t})();function ZC(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var kC=new km,VC=(function(){function t(e,n,r,i){this.Tn=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this.vo().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this.vo();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype.vo=function(){if(this.v)return this.v;var e=this.Tn.getDelegateTracer(this.name,this.version,this.options);return e?(this.v=e,this.v):kC},t})(),xC=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new km},t})(),NC=new xC,kd=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new VC(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.v)!==null&&e!==void 0?e:NC},t.prototype.setDelegate=function(e){this.v=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this.v)===null||i===void 0?void 0:i.getTracer(e,n,r)},t})(),ko;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ko||(ko={}));var Fr;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Fr||(Fr={}));var Vo;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Vo||(Vo={}));var tt=Ho.getInstance(),X=we.instance(),OC=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return Im},t})(),GC=new OC,el="metrics",LC=(function(){function t(){}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalMeterProvider=function(e){return Kr(el,e,we.instance())},t.prototype.getMeterProvider=function(){return pn(el)||GC},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){_r(el,we.instance())},t})(),Ze=LC.getInstance(),XC=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),Tc=bc("OpenTelemetry Baggage Key");function Vm(t){return t.getValue(Tc)||void 0}function WC(){return Vm(Ho.getInstance().active())}function UC(t,e){return t.setValue(Tc,e)}function PC(t){return t.deleteValue(Tc)}var nl="propagation",MC=new XC,FC=(function(){function t(){this.createBaggage=HR,this.getBaggage=Vm,this.getActiveBaggage=WC,this.setBaggage=UC,this.deleteBaggage=PC}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalPropagator=function(e){return Kr(nl,e,we.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=dC),this.Pr().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=pC),this.Pr().extract(e,n,r)},t.prototype.fields=function(){return this.Pr().fields()},t.prototype.disable=function(){_r(nl,we.instance())},t.prototype.Pr=function(){return pn(nl)||MC},t})(),jt=FC.getInstance(),rl="trace",AC=(function(){function t(){this.vr=new kd,this.wrapSpanContext=CC,this.isSpanContextValid=zo,this.deleteSpan=SC,this.getSpan=Sc,this.getActiveSpan=wC,this.getSpanContext=Cm,this.setSpan=Ic,this.setSpanContext=IC}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalTracerProvider=function(e){var n=Kr(rl,this.vr,we.instance());return n&&this.vr.setDelegate(e),n},t.prototype.getTracerProvider=function(){return pn(rl)||this.vr},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){_r(rl,we.instance()),this.vr=new kd},t})(),ut=AC.getInstance(),xm=bc("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Nm(t){return t.setValue(xm,!0)}function Ec(t){return t.getValue(xm)===!0}var JC="=",Al=";",Jl=",",il="baggage",DC=180,YC=4096,KC=8192,_C=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function HC(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Jl:"")+n;return r.length>KC?e:r},"")}function zC(t){return t.getAllEntries().map(function(e){var n=_C(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Al+i.metadata.toString()),o})}function BC(t){var e=t.split(Al);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(JC);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=zR(e.join(Al))),{key:i,value:o,metadata:s}}}}}var Om=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=jt.getBaggage(e);if(!(!i||Ec(e))){var o=zC(i).filter(function(a){return a.length<=YC}).slice(0,DC),s=HC(o);s.length>0&&r.set(n,il,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,il),o=Array.isArray(i)?i.join(Jl):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Jl);return a.forEach(function(c){var l=BC(c);if(l){var u={value:l.value};l.metadata&&(u.metadata=l.metadata),s[l.key]=u}}),Object.entries(s).length===0?e:jt.setBaggage(e,jt.createBaggage(s))},t.prototype.fields=function(){return[il]},t})(),Gm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},jC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function mo(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Gm(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=jC(o.value,2),a=s[0],c=s[1];if(!QC(a)){X.warn("Invalid attribute key: "+a);continue}if(!Lm(c)){X.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(c)?r[a]=c.slice():r[a]=c}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function QC(t){return typeof t=="string"&&t.length>0}function Lm(t){return t==null?!0:Array.isArray(t)?$C(t):Xm(t)}function $C(t){var e,n,r;try{for(var i=Gm(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(Xm(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function Xm(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function qC(){return function(t){X.error(tZ(t))}}function tZ(t){return typeof t=="string"?t:JSON.stringify(eZ(t))}function eZ(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var nZ=qC();function Ye(t){try{nZ(t)}catch(e){}}var ge;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ge||(ge={}));var rZ=",",iZ=["OTEL_SDK_DISABLED"];function oZ(t){return iZ.indexOf(t)>-1}var sZ=["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 aZ(t){return sZ.indexOf(t)>-1}var lZ=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function cZ(t){return lZ.indexOf(t)>-1}var yo=1/0,go=128,uZ=128,hZ=128,Wm={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:wt.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_ATTRIBUTE_COUNT_LIMIT:go,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:go,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:go,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:uZ,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:hZ,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ge.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 pZ(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function dZ(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function fZ(t,e,n,r){r===void 0&&(r=rZ);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var mZ={ALL:wt.ALL,VERBOSE:wt.VERBOSE,DEBUG:wt.DEBUG,INFO:wt.INFO,WARN:wt.WARN,ERROR:wt.ERROR,NONE:wt.NONE};function yZ(t,e,n){var r=n[t];if(typeof r=="string"){var i=mZ[r.toUpperCase()];i!=null&&(e[t]=i)}}function Um(t){var e={};for(var n in Wm){var r=n;switch(r){case"OTEL_LOG_LEVEL":yZ(r,e,t);break;default:if(oZ(r))pZ(r,e,t);else if(aZ(r))dZ(r,e,t);else if(cZ(r))fZ(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var Or=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Yn(){var t=Um(Or);return Object.assign({},Wm,t)}function gZ(){return Um(Or)}function Vd(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Rc(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=Vd(t.charCodeAt(r)),o=Vd(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var qt=performance,bZ="1.30.1",vZ="process.runtime.name",wZ="telemetry.sdk.name",SZ="telemetry.sdk.language",IZ="telemetry.sdk.version",TZ=vZ,EZ=wZ,RZ=SZ,CZ=IZ,ZZ="webjs",kZ=ZZ,Wn,ol=(Wn={},Wn[EZ]="opentelemetry",Wn[TZ]="browser",Wn[RZ]=kZ,Wn[CZ]=bZ,Wn),VZ=9,xZ=6,NZ=Math.pow(10,xZ),xo=Math.pow(10,VZ);function Qt(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*NZ);return[n,r]}function Cc(){var t=qt.timeOrigin;if(typeof t!="number"){var e=qt;t=e.timing&&e.timing.fetchStart}return t}function dn(t){var e=Qt(Cc()),n=Qt(typeof t=="number"?t:qt.now());return Pm(e,n)}function Gr(t){if(Zc(t))return t;if(typeof t=="number")return t<Cc()?dn(t):Qt(t);if(t instanceof Date)return Qt(t.getTime());throw TypeError("Invalid input type")}function OZ(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=xo),[n,r]}function ke(t){return t[0]*xo+t[1]}function ji(t){return t[0]*1e6+t[1]/1e3}function Zc(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function xd(t){return Zc(t)||typeof t=="number"||t instanceof Date}function Pm(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=xo&&(n[1]-=xo,n[0]+=1),n}var kt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(kt||(kt={}));var GZ=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mm=(function(){function t(e){e===void 0&&(e={});var n;this.Mr=(n=e.propagators)!==null&&n!==void 0?n:[],this.Cs=Array.from(new Set(this.Mr.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var s=GZ(this.Mr),a=s.next();!a.done;a=s.next()){var c=a.value;try{c.inject(e,n,r)}catch(l){X.warn("Failed to inject with "+c.constructor.name+". Err: "+l.message)}}}catch(l){i={error:l}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this.Mr.reduce(function(i,o){try{return o.extract(i,n,r)}catch(s){X.warn("Failed to extract with "+o.constructor.name+". Err: "+s.message)}return i},e)},t.prototype.fields=function(){return this.Cs.slice()},t})(),Dl="[_0-9a-z-*/]",LZ="[a-z]"+Dl+"{0,255}",XZ="[a-z0-9]"+Dl+"{0,240}@[a-z]"+Dl+"{0,13}",WZ=new RegExp("^(?:"+LZ+"|"+XZ+")$"),UZ=/^[ -~]{0,255}[!-~]$/,PZ=/,|=/;function MZ(t){return WZ.test(t)}function FZ(t){return UZ.test(t)&&!PZ.test(t)}var Nd=32,AZ=512,Od=",",Gd="=",JZ=(function(){function t(e){this.We=new Map,e&&this.Zs(e)}return t.prototype.set=function(e,n){var r=this.wo();return r.We.has(e)&&r.We.delete(e),r.We.set(e,n),r},t.prototype.unset=function(e){var n=this.wo();return n.We.delete(e),n},t.prototype.get=function(e){return this.We.get(e)},t.prototype.serialize=function(){var e=this;return this.ks().reduce(function(n,r){return n.push(r+Gd+e.get(r)),n},[]).join(Od)},t.prototype.Zs=function(e){e.length>AZ||(this.We=e.split(Od).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Gd);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);MZ(s)&&FZ(a)&&n.set(s,a)}return n},new Map),this.We.size>Nd&&(this.We=new Map(Array.from(this.We.entries()).reverse().slice(0,Nd))))},t.prototype.ks=function(){return Array.from(this.We.keys()).reverse()},t.prototype.wo=function(){var e=new t;return e.We=new Map(this.We),e},t})(),bo="traceparent",sl="tracestate",DZ="00",YZ="(?!ff)[\\da-f]{2}",KZ="(?![0]{32})[\\da-f]{32}",_Z="(?![0]{16})[\\da-f]{16}",HZ="[\\da-f]{2}",zZ=new RegExp("^\\s?("+YZ+")-("+KZ+")-("+_Z+")-("+HZ+")(-.*)?\\s?$");function BZ(t){var e=zZ.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Fm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=ut.getSpanContext(e);if(!(!i||Ec(e)||!zo(i))){var o=DZ+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||xe.NONE).toString(16);r.set(n,bo,o),i.traceState&&r.set(n,sl,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,bo);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=BZ(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,sl);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new JZ(typeof c=="string"?c:void 0)}return ut.setSpanContext(e,s)},t.prototype.fields=function(){return[bo,sl]},t})(),jZ="[object Object]",QZ="[object Null]",$Z="[object Undefined]",qZ=Function.prototype,Am=qZ.toString,tk=Am.call(Object),ek=nk(Object.getPrototypeOf,Object),Jm=Object.prototype,Dm=Jm.hasOwnProperty,sn=Symbol?Symbol.toStringTag:void 0,Ym=Jm.toString;function nk(t,e){return function(n){return t(e(n))}}function Ld(t){if(!rk(t)||ik(t)!==jZ)return!1;var e=ek(t);if(e===null)return!0;var n=Dm.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Am.call(n)===tk}function rk(t){return t!=null&&typeof t=="object"}function ik(t){return t==null?t===void 0?$Z:QZ:sn&&sn in Object(t)?ok(t):sk(t)}function ok(t){var e=Dm.call(t,sn),n=t[sn],r=!1;try{t[sn]=void 0,r=!0}catch(o){}var i=Ym.call(t);return r&&(e?t[sn]=n:delete t[sn]),i}function sk(t){return Ym.call(t)}var ak=20;function Km(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=_m(n,t.shift(),0,r);return n}function al(t){return No(t)?t.slice():t}function _m(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>ak)){if(n++,vo(t)||vo(e)||Hm(e))i=al(e);else if(No(t)){if(i=t.slice(),No(e))for(var o=0,s=e.length;o<s;o++)i.push(al(e[o]));else if(Ir(e))for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o];i[c]=al(e[c])}}else if(Ir(t))if(Ir(e)){if(!lk(t,e))return e;i=Object.assign({},t);for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o],l=e[c];if(vo(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(Xd(t,c,r)||Xd(e,c,r))delete i[c];else{if(Ir(u)&&Ir(h)){var p=r.get(u)||[],f=r.get(h)||[];p.push({obj:t,key:c}),f.push({obj:e,key:c}),r.set(u,p),r.set(h,f)}i[c]=_m(i[c],l,n,r)}}}}else i=e;return i}}function Xd(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.key===e&&s.obj===t)return!0}return!1}function No(t){return Array.isArray(t)}function Hm(t){return typeof t=="function"}function Ir(t){return!vo(t)&&!No(t)&&!Hm(t)&&typeof t=="object"}function vo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function lk(t,e){return!(!Ld(t)||!Ld(e))}var ck=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function zm(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Bm(t,e){var n,r;if(!e)return!1;try{for(var i=ck(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(zm(t,s))return!0}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var uk=(function(){function t(){var e=this;this.Vs=new Promise(function(n,r){e.Fr=n,e.xs=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this.Vs},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this.Fr(e)},t.prototype.reject=function(e){this.xs(e)},t})(),hk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},pk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dk=(function(){function t(e,n){this.Ns=e,this.Os=n,this.Ar=!1,this.er=new uk}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this.Ar},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this.er.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this.Ar){this.Ar=!0;try{Promise.resolve((e=this.Ns).call.apply(e,pk([this.Os],hk(r),!1))).then(function(o){return n.er.resolve(o)},function(o){return n.er.reject(o)})}catch(o){this.er.reject(o)}}return this.er.promise},t})();function fk(t,e){return new Promise(function(n){tt.with(Nm(tt.active()),function(){t.export(e,function(r){n(r)})})})}var mk={Gs:fk},jm=(function(){function t(){}return t.prototype.emit=function(e){},t})(),yk=new jm,gk=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new jm},t})(),Qm=new gk,bk=(function(){function t(e,n,r,i){this.Tn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.nr().emit(e)},t.prototype.nr=function(){if(this.v)return this.v;var e=this.Tn.getDelegateLogger(this.name,this.version,this.options);return e?(this.v=e,this.v):yk},t})(),Wd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new bk(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.v)!==null&&e!==void 0?e:Qm},t.prototype.setDelegate=function(e){this.v=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.v)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),vk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Qi=Symbol.for("io.opentelemetry.js.api.logs"),Tr=vk;function wk(t,e,n){return function(r){return r===t?e:n}}var Ud=1,Sk=(function(){function t(){this.Ke=new Wd}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalLoggerProvider=function(e){return Tr[Qi]?this.getLoggerProvider():(Tr[Qi]=wk(Ud,e,Qm),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tr[Qi])===null||e===void 0?void 0:e.call(Tr,Ud))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Tr[Qi],this.Ke=new Wd},t})(),$m=Sk.getInstance();function Ik(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var s=t[i];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function Tk(t){t.forEach(function(e){return e.disable()})}function Ek(t){var e,n,r=t.tracerProvider||ut.getTracerProvider(),i=t.meterProvider||Ze.getMeterProvider(),o=t.loggerProvider||$m.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return Ik(s,r,i,o),function(){Tk(s)}}function Yl(t){return typeof t=="function"}var Xt=console.error.bind(console);function Er(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Hr(t){t&&t.logger&&(Yl(t.logger)?Xt=t.logger:Xt("new logger isn't a function, not replacing"))}function qm(t,e,n){if(!t||!t[e]){Xt("no original function "+e+" to wrap");return}if(!n){Xt("no wrapper function"),Xt(new Error().stack);return}if(!Yl(t[e])||!Yl(n)){Xt("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Er(i,"__original",r),Er(i,"__unwrap",function(){t[e]===i&&Er(t,e,r)}),Er(i,"__wrapped",!0),Er(t,e,i),i}function Rk(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Xt("must provide one or more modules to patch"),Xt(new Error().stack);return}if(!(e&&Array.isArray(e))){Xt("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){qm(r,i,n)})})}function ty(t,e){if(!t||!t[e]){Xt("no function to unwrap."),Xt(new Error().stack);return}if(!t[e].__unwrap)Xt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function Ck(t,e){if(t)Array.isArray(t)||(t=[t]);else{Xt("must provide one or more modules to patch"),Xt(new Error().stack);return}if(!(e&&Array.isArray(e))){Xt("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){ty(n,r)})})}Hr.wrap=qm;Hr.massWrap=Rk;Hr.unwrap=ty;Hr.massUnwrap=Ck;var $t=Hr,Kl=function(){return Kl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Kl.apply(this,arguments)},Zk=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.ee=$t.wrap,this.F=$t.unwrap,this.So=$t.massWrap,this.Io=$t.massUnwrap,this.setConfig(r),this.T=X.createComponentLogger({namespace:e}),this.dn=ut.getTracer(e,n),this.fn=Ze.getMeter(e,n),this.mn=$m.getLogger(e,n),this.yn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.fn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.fn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.yn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.mn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.mn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.yn=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=Kl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.dn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.dn},enumerable:!1,configurable:!0}),t.prototype.To=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.T.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),kk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ey=(function(t){kk(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(Zk);function Pd(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Gt(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Vk="exception.type",xk="exception.message",Nk="exception.stacktrace",ll=Vk,cl=xk,Ok=Nk,Gk="exception",_l=function(){return _l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_l.apply(this,arguments)},Lk=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Md=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Xk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Wk=(function(){function t(e,n,r,i,o,s,a,c,l,u){a===void 0&&(a=[]),this.attributes={},this.links=[],this.events=[],this.Eo=0,this.Nn=0,this.Ls=0,this.status={code:Vo.UNSET},this.endTime=[0,0],this.rr=!1,this.wr=[-1,-1],this.name=r,this.In=i,this.parentSpanId=s,this.kind=o,this.links=a;var h=Date.now();this.Ro=qt.now(),this.Xs=h-(this.Ro+Cc()),this.Ws=c!=null,this.startTime=this.Jr(c!=null?c:h),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this.On=e.getSpanLimits(),this.Us=this.On.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this.Co=e.getActiveSpanProcessor(),this.Co.onStart(this,n)}return t.prototype.spanContext=function(){return this.In},t.prototype.setAttribute=function(e,n){return n==null||this.ir()?this:e.length===0?(X.warn("Invalid attribute key: "+e),this):Lm(n)?Object.keys(this.attributes).length>=this.On.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.Eo++,this):(this.attributes[e]=this.Ps(n),this):(X.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=Lk(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Md(o.value,2),a=s[0],c=s[1];this.setAttribute(a,c)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,r){if(this.ir())return this;if(this.On.eventCountLimit===0)return X.warn("No events allowed."),this.Nn++,this;this.events.length>=this.On.eventCountLimit&&(this.Nn===0&&X.debug("Dropping extra events."),this.events.shift(),this.Nn++),xd(n)&&(xd(r)||(r=n),n=void 0);var i=mo(n);return this.events.push({name:e,attributes:i,time:this.Jr(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,Xk([],Md(e),!1)),this},t.prototype.setStatus=function(e){return this.ir()?this:(this.status=_l({},e),this.status.message!=null&&typeof e.message!="string"&&(X.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this.ir()?this:(this.name=e,this)},t.prototype.end=function(e){if(this.ir()){X.error(this.name+" "+this.In.traceId+"-"+this.In.spanId+" - You can only call end() on a span once.");return}this.rr=!0,this.endTime=this.Jr(e),this.wr=OZ(this.startTime,this.endTime),this.wr[0]<0&&(X.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this.wr=[0,0]),this.Nn>0&&X.warn("Dropped "+this.Nn+" events because eventCountLimit reached"),this.Co.onEnd(this)},t.prototype.Jr=function(e){if(typeof e=="number"&&e<=qt.now())return dn(e+this.Xs);if(typeof e=="number")return Qt(e);if(e instanceof Date)return Qt(e.getTime());if(Zc(e))return e;if(this.Ws)return Qt(Date.now());var n=qt.now()-this.Ro;return Pm(this.startTime,Qt(n))},t.prototype.isRecording=function(){return this.rr===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[cl]=e:e&&(e.code?r[ll]=e.code.toString():e.name&&(r[ll]=e.name),e.message&&(r[cl]=e.message),e.stack&&(r[Ok]=e.stack)),r[ll]||r[cl]?this.addEvent(Gk,r,n):X.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this.wr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this.rr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.Eo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this.Nn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this.Ls},enumerable:!1,configurable:!0}),t.prototype.ir=function(){return this.rr&&X.warn("Can not execute the operation on ended Span {traceId: "+this.In.traceId+", spanId: "+this.In.spanId+"}"),this.rr},t.prototype.Zo=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype.Ps=function(e){var n=this,r=this.Us;return r<=0?(X.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this.Zo(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n.Zo(i,r):i}):e},t})(),Kn;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Kn||(Kn={}));var Oo=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kn.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})(),Jn=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kn.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})(),ul=(function(){function t(e){var n,r,i,o;this.tn=e.root,this.tn||(Ye(new Error("ParentBasedSampler must have a root sampler configured")),this.tn=new Jn),this.ko=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Jn,this.Vo=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Oo,this.xo=(i=e.localParentSampled)!==null&&i!==void 0?i:new Jn,this.No=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new Oo}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=ut.getSpanContext(e);return!a||!zo(a)?this.tn.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&xe.SAMPLED?this.ko.shouldSample(e,n,r,i,o,s):this.Vo.shouldSample(e,n,r,i,o,s):a.traceFlags&xe.SAMPLED?this.xo.shouldSample(e,n,r,i,o,s):this.No.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this.tn.toString()+", remoteParentSampled="+this.ko.toString()+", remoteParentNotSampled="+this.Vo.toString()+", localParentSampled="+this.xo.toString()+", localParentNotSampled="+this.No.toString()+"}"},t})(),Fd=(function(){function t(e){e===void 0&&(e=0),this.Dr=e,this.Dr=this.Ms(e),this.Fs=Math.floor(this.Dr*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Zm(n)&&this.As(n)<this.Fs?Kn.RECORD_AND_SAMPLED:Kn.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this.Dr+"}"},t.prototype.Ms=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype.As=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t})(),Uk=ge.AlwaysOn,Un=1;function ny(){var t=Yn();return{sampler:ry(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function ry(t){switch(t===void 0&&(t=Yn()),t.OTEL_TRACES_SAMPLER){case ge.AlwaysOn:return new Jn;case ge.AlwaysOff:return new Oo;case ge.ParentBasedAlwaysOn:return new ul({root:new Jn});case ge.ParentBasedAlwaysOff:return new ul({root:new Oo});case ge.TraceIdRatio:return new Fd(Ad(t));case ge.ParentBasedTraceIdRatio:return new ul({root:new Fd(Ad(t))});default:return X.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Uk+'".'),new Jn}}function Ad(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return X.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Un+"."),Un;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Un+"."),Un):e<0||e>1?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Un+"."),Un):e}function Pk(t){var e={sampler:ry()},n=ny(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function Mk(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=gZ();return f.attributeCountLimit=(s=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:go,f.attributeValueLengthLimit=(p=(h=(u=(c=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&c!==void 0?c:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:yo,Object.assign({},t,{spanLimits:f})}var Fk=(function(){function t(e,n){this.Gn=e,this.Sr=!1,this.en=[],this.or=0;var r=Yn();this.Ln=typeof(n==null?void 0:n.maxExportBatchSize)=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this.Yr=typeof(n==null?void 0:n.maxQueueSize)=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this.Js=typeof(n==null?void 0:n.scheduledDelayMillis)=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this.Ds=typeof(n==null?void 0:n.exportTimeoutMillis)=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this.Ir=new dk(this._e,this),this.Ln>this.Yr&&(X.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.Ln=this.Yr)}return t.prototype.forceFlush=function(){return this.Ir.isCalled?this.Ir.promise:this.Oo()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this.Ir.isCalled||e.spanContext().traceFlags&xe.SAMPLED&&this.Ys(e)},t.prototype.shutdown=function(){return this.Ir.call()},t.prototype._e=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e.Oo()}).then(function(){return e.Gn.shutdown()})},t.prototype.Ys=function(e){if(this.en.length>=this.Yr){this.or===0&&X.debug("maxQueueSize reached, dropping spans"),this.or++;return}this.or>0&&(X.warn("Dropped "+this.or+" spans because maxQueueSize reached"),this.or=0),this.en.push(e),this.Go()},t.prototype.Oo=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e.en.length/e.Ln),s=0,a=o;s<a;s++)i.push(e.Lo());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype.Lo=function(){var e=this;return this.Xo(),this.en.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e.Ds);tt.with(Nm(tt.active()),function(){var o;e.en.length<=e.Ln?(o=e.en,e.en=[]):o=e.en.splice(0,e.Ln);for(var s=function(){return e.Gn.export(o,function(h){var p;clearTimeout(i),h.code===kt.SUCCESS?n():r((p=h.error)!==null&&p!==void 0?p:new Error("BatchSpanProcessor: span export failed"))})},a=null,c=0,l=o.length;c<l;c++){var u=o[c];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(a!=null||(a=[]),a.push(u.resource.waitForAsyncAttributes()))}a===null?s():Promise.all(a).then(s,function(h){Ye(h),r(h)})})})},t.prototype.Go=function(){var e=this;if(!this.Sr){var n=function(){e.Sr=!0,e.Lo().finally(function(){e.Sr=!1,e.en.length>0&&(e.Xo(),e.Go())}).catch(function(r){e.Sr=!1,Ye(r)})};if(this.en.length>=this.Ln)return n();this.Tr===void 0&&(this.Tr=setTimeout(function(){return n()},this.Js))}},t.prototype.Xo=function(){this.Tr!==void 0&&(clearTimeout(this.Tr),this.Tr=void 0)},t})(),Ak=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),iy=(function(t){Ak(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.onInit(r),i}return e.prototype.onInit=function(n){var r=this;(n==null?void 0:n.disableAutoFlushOnDocumentHide)!==!0&&typeof document<"u"&&(this.Kr=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){Ye(i)})},this._r=function(){r.forceFlush().catch(function(i){Ye(i)})},document.addEventListener("visibilitychange",this.Kr),document.addEventListener("pagehide",this._r))},e.prototype.onShutdown=function(){typeof document<"u"&&(this.Kr&&document.removeEventListener("visibilitychange",this.Kr),this._r&&document.removeEventListener("pagehide",this._r))},e})(Fk),Jk=8,Dk=16,Yk=(function(){function t(){this.generateTraceId=Jd(Dk),this.generateSpanId=Jd(Jk)}return t})(),$i=Array(32);function Jd(t){return function(){for(var e=0;e<t*2;e++)$i[e]=Math.floor(Math.random()*16)+48,$i[e]>=58&&($i[e]+=39);return String.fromCharCode.apply(null,$i.slice(0,t*2))}}var Kk=(function(){function t(e,n,r){this.Ks=r;var i=Pk(n);this._s=i.sampler,this.Hs=i.generalLimits,this.On=i.spanLimits,this.Wo=n.idGenerator||new Yk,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,s;n===void 0&&(n={}),r===void 0&&(r=tt.active()),n.root&&(r=ut.deleteSpan(r));var a=ut.getSpan(r);if(Ec(r)){X.debug("Instrumentation suppressed, returning Noop Span");var c=ut.wrapSpanContext(Rm);return c}var l=a==null?void 0:a.spanContext(),u=this.Wo.generateSpanId(),h,p,f;!l||!ut.isSpanContextValid(l)?h=this.Wo.generateTraceId():(h=l.traceId,p=l.traceState,f=l.spanId);var m=(i=n.kind)!==null&&i!==void 0?i:Fr.INTERNAL,d=((o=n.links)!==null&&o!==void 0?o:[]).map(function(V){return{context:V.context,attributes:mo(V.attributes)}}),v=mo(n.attributes),g=this._s.shouldSample(r,h,e,m,v,d);p=(s=g.traceState)!==null&&s!==void 0?s:p;var w=g.decision===ko.RECORD_AND_SAMPLED?xe.SAMPLED:xe.NONE,R={traceId:h,spanId:u,traceFlags:w,traceState:p};if(g.decision===ko.NOT_RECORD){X.debug("Recording is off, propagating context in a non-recording span");var c=ut.wrapSpanContext(R);return c}var E=mo(Object.assign(v,g.attributes)),T=new Wk(this,r,e,R,m,f,d,n.startTime,void 0,E);return T},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:tt.active(),l=this.startSpan(e,o,c),u=ut.setSpan(c,l);return tt.with(u,a,void 0,l)}},t.prototype.getGeneralLimits=function(){return this.Hs},t.prototype.getSpanLimits=function(){return this.On},t.prototype.getActiveSpanProcessor=function(){return this.Ks.getActiveSpanProcessor()},t})(),_k="service.name",Hk="telemetry.sdk.name",zk="telemetry.sdk.language",Bk="telemetry.sdk.version",jk=_k,Dd=Hk,Yd=zk,Kd=Bk;function Qk(){return"unknown_service"}var Ae=function(){return Ae=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ae.apply(this,arguments)},$k=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},qk=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},t1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ar=(function(){function t(e,n){var r=this,i;this.Er=e,this.asyncAttributesPending=n!=null,this.Rr=(i=this.Er)!==null&&i!==void 0?i:{},this.sr=n==null?void 0:n.then(function(o){return r.Er=Object.assign({},r.Er,o),r.asyncAttributesPending=!1,o},function(o){return X.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[jk]=Qk(),e[Yd]=ol[Yd],e[Dd]=ol[Dd],e[Kd]=ol[Kd],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&X.error("Accessing resource attributes before async attributes settled"),(e=this.Er)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return $k(this,void 0,void 0,function(){return qk(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this.sr]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=Ae(Ae({},this.Rr),(r=e.Rr)!==null&&r!==void 0?r:e.attributes);if(!this.sr&&!e.sr)return new t(i);var o=Promise.all([this.sr,e.sr]).then(function(s){var a,c=t1(s,2),l=c[0],u=c[1];return Ae(Ae(Ae(Ae({},n.Rr),l),(a=e.Rr)!==null&&a!==void 0?a:e.attributes),u)});return new t(i,o)},t.EMPTY=new t({}),t})(),qi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_d=(function(){function t(e){this.Cr=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=qi(this.Cr),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.forceFlush())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a){Promise.all(r).then(function(){a()}).catch(function(c){Ye(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=qi(this.Cr),s=o.next();!s.done;s=o.next()){var a=s.value;a.onStart(e,n)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=qi(this.Cr),o=i.next();!o.done;o=i.next()){var s=o.value;s.onEnd(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=qi(this.Cr),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.shutdown())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a,c){Promise.all(r).then(function(){a()},c)})},t})(),e1=(function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t})(),n1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},r1=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},an;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(an||(an={}));var i1=(function(){function t(e){e===void 0&&(e={});var n,r;this.Xn=[],this.Hr=new Map;var i=Km({},ny(),Mk(e));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Ar.empty(),i.mergeResourceWithDefaults&&(this.resource=Ar.default().merge(this.resource)),this.ie=Object.assign({},i,{resource:this.resource}),!((r=e.spanProcessors)===null||r===void 0)&&r.length)this.Xn=r1([],n1(e.spanProcessors),!1),this.activeSpanProcessor=new _d(this.Xn);else{var o=this.zs();if(o!==void 0){var s=new iy(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new e1}}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+((r==null?void 0:r.schemaUrl)||"");return this.Hr.has(i)||this.Hr.set(i,new Kk({name:e,version:n,schemaUrl:r==null?void 0:r.schemaUrl},this.ie,this)),this.Hr.get(i)},t.prototype.addSpanProcessor=function(e){this.Xn.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return X.error("Error while trying to shutdown current span processor",n)}),this.Xn.push(e),this.activeSpanProcessor=new _d(this.Xn)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),ut.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this.Bs()),e.contextManager&&tt.setGlobalContextManager(e.contextManager),e.propagator&&jt.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this.ie.forceFlushTimeoutMillis,n=this.Xn.map(function(r){return new Promise(function(i){var o,s=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=an.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==an.timeout&&(o=an.resolved,i(o))}).catch(function(a){clearTimeout(s),o=an.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==an.resolved});s.length>0?i(s):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype.js=function(e){var n;return(n=this.constructor.Qs.get(e))===null||n===void 0?void 0:n()},t.prototype.$s=function(e){var n;return(n=this.constructor.qs.get(e))===null||n===void 0?void 0:n()},t.prototype.Bs=function(){var e=this,n=Array.from(new Set(Yn().OTEL_PROPAGATORS)),r=n.map(function(o){var s=e.js(o);return s||X.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),s}),i=r.reduce(function(o,s){return s&&o.push(s),o},[]);if(i.length!==0)return n.length===1?i[0]:new Mm({propagators:i})},t.prototype.zs=function(){var e=Yn().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this.$s(e);return n||X.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t.Qs=new Map([["tracecontext",function(){return new Fm}],["baggage",function(){return new Om}]]),t.qs=new Map,t})(),o1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},s1=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},oy=(function(){function t(){this.zr=!1,this.Ge=on}return t.prototype.ta=function(e,n){e===void 0&&(e=on);var r=this,i=function(){for(var o=this,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return r.with(e,function(){return n.apply(o,s)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},t.prototype.active=function(){return this.Ge},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this.ta(e,n):n},t.prototype.disable=function(){return this.Ge=on,this.zr=!1,this},t.prototype.enable=function(){return this.zr?this:(this.zr=!0,this.Ge=on,this)},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=this.Ge;this.Ge=e||on;try{return n.call.apply(n,s1([r],o1(i),!1))}finally{this.Ge=s}},t})(),a1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),l1=(function(t){a1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return e.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new oy),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e})(i1),J;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(J||(J={}));var c1="http.response_content_length",u1="http.response_content_length_uncompressed",h1=c1,p1=u1,hl;function d1(){return hl||(hl=document.createElement("a")),hl}function Ke(t,e){return e in t}function Rt(t,e,n,r){var i=void 0,o=void 0;Ke(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(Ke(n,s)&&typeof n[s]=="number"&&(o=n[s]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function _n(t,e,n){n===void 0&&(n=!1),n||(Rt(t,J.FETCH_START,e),Rt(t,J.DOMAIN_LOOKUP_START,e),Rt(t,J.DOMAIN_LOOKUP_END,e),Rt(t,J.CONNECT_START,e),Ke(e,"name")&&e.name.startsWith("https:")&&Rt(t,J.SECURE_CONNECTION_START,e),Rt(t,J.CONNECT_END,e),Rt(t,J.REQUEST_START,e),Rt(t,J.RESPONSE_START,e),Rt(t,J.RESPONSE_END,e));var r=e[J.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(h1,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(p1,i)}function f1(t){return t.slice().sort(function(e,n){var r=e[J.FETCH_START],i=n[J.FETCH_START];return r>i?1:r<i?-1:0})}function sy(){return typeof location<"u"?location.origin:void 0}function ay(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=Ce(t);t=s.toString();var a=y1(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=f1(a);if(s.origin!==sy()&&c.length>1){var l=c[0],u=m1(c,l[J.RESPONSE_END],n),h=l[J.RESPONSE_END],p=u[J.FETCH_START];return p<h&&(u=l,l=void 0),{corsPreFlightRequest:l,mainRequest:u}}else return{mainRequest:a[0]}}function m1(t,e,n){for(var r=ke(n),i=ke(Gr(e)),o=t[1],s,a=t.length,c=1;c<a;c++){var l=t[c],u=ke(Gr(l[J.FETCH_START])),h=ke(Gr(l[J.RESPONSE_END])),p=r-h;u>=i&&(!s||p<s)&&(s=p,o=l)}return o}function y1(t,e,n,r,i,o){var s=ke(e),a=ke(n),c=r.filter(function(l){var u=ke(Gr(l[J.FETCH_START])),h=ke(Gr(l[J.RESPONSE_END]));return l.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&l.name===t&&u>=s&&h<=a});return c.length>0&&(c=c.filter(function(l){return!i.has(l)})),c}function Ce(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=d1();return e.href=t,e}function ly(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=b1(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=ly(t.parentNode,!1)),r+=n,r}function g1(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return e.indexOf(r.nodeType)>=0&&i===t.localName}),n.length>=1?n.indexOf(t)+1:0}function b1(t,e){var n=t.nodeType,r=g1(t),i="";if(n===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function cy(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=Ce(t);return r.origin===sy()?!0:n.some(function(i){return zm(t,i)})}var Lr;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Lr||(Lr={}));var v1="0.44.0",w1="@opentelemetry/instrumentation-document-load",S1="http.url",I1="http.user_agent",pl=S1,T1=I1,E1="deployment.environment",R1=E1,C1="service.name",Z1="telemetry.sdk.name",k1="telemetry.sdk.version",V1="url.full",x1="url.path",N1="url.query",Go;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Go||(Go={}));var O1=function(){var t,e,n={},r=(e=(t=qt).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(r){var i=Object.values(J);i.forEach(function(a){if(Ke(r,a)){var c=r[a];typeof c=="number"&&(n[a]=c)}})}else{var o=qt,s=o.timing;if(s){var i=Object.values(J);i.forEach(function(c){if(Ke(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},Hd={"first-paint":Go.FIRST_PAINT,"first-contentful-paint":Go.FIRST_CONTENTFUL_PAINT},G1=function(t){var e,n,r=(n=(e=qt).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,s=i.startTime;Ke(Hd,o)&&t.addEvent(Hd[o],s)})},L1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),X1=(function(t){L1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,w1,v1,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype.Wn=function(){var n=this;window.setTimeout(function(){n.ea()})},e.prototype.na=function(n){var r=this,i,o,s=(o=(i=qt).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");s&&s.forEach(function(a){r.ra(a,n)})},e.prototype.ea=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(s){return s.getAttribute("name")===bo}),i=O1(),o=r&&r.content||"";tt.with(jt.extract(on,{traceparent:o}),function(){var s,a=n.Br(Lr.DOCUMENT_LOAD,J.FETCH_START,i);a&&(tt.with(ut.setSpan(tt.active(),a),function(){var c=n.Br(Lr.DOCUMENT_FETCH,J.FETCH_START,i);c&&(c.setAttribute(pl,location.href),tt.with(ut.setSpan(tt.active(),c),function(){var l;n.getConfig().ignoreNetworkEvents||_n(c,i),n.Uo(c,(l=n.getConfig().applyCustomAttributesOnSpan)===null||l===void 0?void 0:l.documentFetch),n.En(c,J.RESPONSE_END,i)}))}),a.setAttribute(pl,location.href),a.setAttribute(T1,navigator.userAgent),n.na(a),n.getConfig().ignoreNetworkEvents||(Rt(a,J.FETCH_START,i),Rt(a,J.UNLOAD_EVENT_START,i),Rt(a,J.UNLOAD_EVENT_END,i),Rt(a,J.DOM_INTERACTIVE,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_START,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_END,i),Rt(a,J.DOM_COMPLETE,i),Rt(a,J.LOAD_EVENT_START,i),Rt(a,J.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||G1(a),n.Uo(a,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentLoad),n.En(a,J.LOAD_EVENT_END,i))})},e.prototype.En=function(n,r,i){n&&(Ke(i,r)?n.end(i[r]):n.end())},e.prototype.ra=function(n,r){var i,o=this.Br(Lr.RESOURCE_FETCH,J.FETCH_START,n,r);o&&(o.setAttribute(pl,n.name),this.getConfig().ignoreNetworkEvents||_n(o,n),this.ia(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this.En(o,J.RESPONSE_END,n))},e.prototype.Br=function(n,r,i,o){if(Ke(i,r)&&typeof i[r]=="number"){var s=this.tracer.startSpan(n,{startTime:i[r]},o?ut.setSpan(tt.active(),o):void 0);return s}},e.prototype.oa=function(){window.document.readyState==="complete"?this.Wn():(this.Wn=this.Wn.bind(this),window.addEventListener("load",this.Wn))},e.prototype.Uo=function(n,r){var i=this;r&&Pd(function(){return r(n)},function(o){o&&i.T.error("addCustomAttributesOnSpan",o)})},e.prototype.ia=function(n,r,i){var o=this;i&&Pd(function(){return i(n,r)},function(s){s&&o.T.error("addCustomAttributesOnResourceSpan",s)})},e.prototype.enable=function(){window.removeEventListener("load",this.Wn),this.oa()},e.prototype.disable=function(){window.removeEventListener("load",this.Wn)},e})(ey),uy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),W1=new uy,U1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new uy},t})(),hy=new U1,P1=(function(){function t(e,n,r,i){this.Tn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.nr().emit(e)},t.prototype.nr=function(){if(this.v)return this.v;var e=this.Tn.getDelegateLogger(this.name,this.version,this.options);return e?(this.v=e,this.v):W1},t})(),zd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new P1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.v)!==null&&e!==void 0?e:hy},t.prototype.setDelegate=function(e){this.v=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.v)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),M1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},to=Symbol.for("io.opentelemetry.js.api.logs"),Rr=M1;function F1(t,e,n){return function(r){return r===t?e:n}}var Bd=1,A1=(function(){function t(){this.Ke=new zd}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalLoggerProvider=function(e){return Rr[to]?this.getLoggerProvider():(Rr[to]=F1(Bd,e,hy),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Rr[to])===null||e===void 0?void 0:e.call(Rr,Bd))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Rr[to],this.Ke=new zd},t})(),J1=A1.getInstance(),Hl=function(){return Hl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Hl.apply(this,arguments)},D1=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.ee=$t.wrap,this.F=$t.unwrap,this.So=$t.massWrap,this.Io=$t.massUnwrap,this.setConfig(r),this.T=X.createComponentLogger({namespace:e}),this.dn=ut.getTracer(e,n),this.fn=Ze.getMeter(e,n),this.mn=J1.getLogger(e,n),this.yn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.fn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.fn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.yn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.mn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.mn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.yn=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=Hl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.dn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.dn},enumerable:!1,configurable:!0}),t.prototype.To=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.T.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),Y1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),K1=(function(t){Y1(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(D1);function _1(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function H1(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Lo;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Lo||(Lo={}));var z1="http.method",B1="http.url",j1="http.host",Q1="http.scheme",$1="http.status_code",q1="http.user_agent",tV="http.request_content_length_uncompressed",eV=z1,nV=B1,rV=j1,iV=Q1,oV=$1,sV=q1,aV=tV,lV=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},cV=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},uV=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},hV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},py=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function pV(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var n=t[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=dV(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(fV(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return zl(a)}):Promise.resolve()}}function dV(t){if(!t.pipeThrough)return py.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,s){return lV(this,void 0,void 0,function(){var a;return cV(this,function(c){switch(c.label){case 0:return[4,o];case 1:return a=c.sent(),e+=a.byteLength,s.enqueue(o),[2]}})})},flush:function(){n(e)}});return{body:t.pipeThrough(i),length:r}}function fV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return yV(t);if(t instanceof URLSearchParams)return zl(t.toString());if(typeof t=="string")return zl(t);py.warn("unknown body type")}var mV=new TextEncoder;function zl(t){return mV.encode(t).byteLength}function yV(t){var e,n,r=0;try{for(var i=uV(t.entries()),o=i.next();!o.done;o=i.next()){var s=hV(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var jd="0.57.1",gV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),bV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},vV=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dl,wV=300,Qd=typeof process=="object"&&((dl=process.release)===null||dl===void 0?void 0:dl.name)==="node",SV=(function(t){gV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",jd,n)||this;return r.component="fetch",r.version=jd,r.moduleName=r.component,r.sn=new WeakSet,r.gn=0,r}return e.prototype.init=function(){},e.prototype.jr=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]},ut.setSpan(tt.active(),n));_n(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[J.RESPONSE_END])},e.prototype.Qr=function(n,r){var i=Ce(r.url);n.setAttribute(oV,r.status),r.statusText!=null&&n.setAttribute(Lo.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(rV,i.host),n.setAttribute(iV,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(sV,navigator.userAgent)},e.prototype.$r=function(n,r){if(!cy(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};jt.inject(tt.active(),i),Object.keys(i).length>0&&this.T.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)jt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Headers)jt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Map)jt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else{var i={};jt.inject(tt.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype.qr=function(){this.gn===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this.sn=new WeakSet)},e.prototype.Un=function(n,r){var i;if(r===void 0&&(r={}),Bm(n,this.getConfig().ignoreUrls)){this.T.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),s="HTTP "+o;return this.tracer.startSpan(s,{kind:Fr.CLIENT,attributes:(i={},i[Lo.COMPONENT]=this.moduleName,i[eV]=o,i[nV]=n,i)})},e.prototype.Zi=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var s=ay(r.spanUrl,r.startTime,i,o,this.sn,"fetch");if(s.mainRequest){var a=s.mainRequest;this.ar(a);var c=s.corsPreFlightRequest;c&&(this.jr(n,c),this.ar(c)),_n(n,a,this.getConfig().ignoreNetworkEvents)}},e.prototype.ar=function(n){this.sn.add(n)},e.prototype.En=function(n,r,i){var o=this,s=Qt(Date.now()),a=dn();this.Qr(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o.Zi(n,r,a),o.gn--,o.qr(),n.end(s)},wV)},e.prototype.sa=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=this,c=Ce(o[0]instanceof Request?o[0].url:String(o[0])).href,l=o[0]instanceof Request?o[0]:o[1]||{},u=i.Un(c,l);if(!u)return r.apply(this,o);var h=i.aa(c);i.getConfig().measureRequestSize&&pV.apply(void 0,vV([],bV(o),!1)).then(function(v){v&&u.setAttribute(aV,v)}).catch(function(v){i.T.warn("getFetchBodyLength",v)});function p(v,g){i.Po(v,l,g),i.En(v,h,{status:g.status||0,statusText:g.message,url:c})}function f(v,g){i.Po(v,l,g),g.status>=200&&g.status<400?i.En(v,h,g):i.En(v,h,{status:g.status,statusText:g.statusText,url:c})}function m(v,g,w){try{var R=w.clone(),E=w.clone(),T=R.body;if(T){var V=T.getReader(),O=function(){V.read().then(function(U){var C=U.done;C?f(v,E):O()},function(U){p(v,U)})};O()}else f(v,w)}finally{g(w)}}function d(v,g,w){try{p(v,w)}finally{g(w)}}return new Promise(function(v,g){return tt.with(ut.setSpan(tt.active(),u),function(){return i.$r(l,c),i.gn++,r.apply(a,l instanceof Request?[l]:[c,l]).then(m.bind(a,u,v),d.bind(a,u,g))})})}}},e.prototype.Po=function(n,r,i){var o=this,s=this.getConfig().applyCustomAttributesOnSpan;s&&_1(function(){return s(n,r,i)},function(a){a&&o.T.error("applyCustomAttributesOnSpan",a)})},e.prototype.aa=function(n){var r=dn(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(s){var a=s.getEntries();a.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},e.prototype.enable=function(){if(Qd){this.T.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}H1(fetch)&&(this.F(Or,"fetch"),this.T.debug("removing previous patch for constructor")),this.ee(Or,"fetch",this.sa())},e.prototype.disable=function(){Qd||(this.F(Or,"fetch"),this.sn=new WeakSet)},e})(K1),dy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),IV=new dy,TV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new dy},t})(),fy=new TV,EV=(function(){function t(e,n,r,i){this.Tn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.nr().emit(e)},t.prototype.nr=function(){if(this.v)return this.v;var e=this.Tn.getDelegateLogger(this.name,this.version,this.options);return e?(this.v=e,this.v):IV},t})(),$d=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new EV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.v)!==null&&e!==void 0?e:fy},t.prototype.setDelegate=function(e){this.v=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.v)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),RV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},eo=Symbol.for("io.opentelemetry.js.api.logs"),Cr=RV;function CV(t,e,n){return function(r){return r===t?e:n}}var qd=1,ZV=(function(){function t(){this.Ke=new $d}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalLoggerProvider=function(e){return Cr[eo]?this.getLoggerProvider():(Cr[eo]=CV(qd,e,fy),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Cr[eo])===null||e===void 0?void 0:e.call(Cr,qd))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Cr[eo],this.Ke=new $d},t})(),kV=ZV.getInstance(),Bl=function(){return Bl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Bl.apply(this,arguments)},VV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.ee=$t.wrap,this.F=$t.unwrap,this.So=$t.massWrap,this.Io=$t.massUnwrap,this.setConfig(r),this.T=X.createComponentLogger({namespace:e}),this.dn=ut.getTracer(e,n),this.fn=Ze.getMeter(e,n),this.mn=kV.getLogger(e,n),this.yn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.fn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.fn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.yn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.mn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.mn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.yn=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=Bl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.dn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.dn},enumerable:!1,configurable:!0}),t.prototype.To=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.T.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),xV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),NV=(function(t){xV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(VV);function OV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function tf(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var GV="http.method",LV="http.url",XV="http.host",WV="http.scheme",UV="http.status_code",PV="http.user_agent",MV="http.request_content_length_uncompressed",FV=GV,AV=LV,JV=XV,DV=WV,YV=UV,KV=PV,_V=MV,Re;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(Re||(Re={}));var HV=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},BV=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function jV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return $V(t);if(t instanceof URLSearchParams)return ef(t.toString());if(typeof t=="string")return ef(t);BV.warn("unknown body type")}var QV=new TextEncoder;function ef(t){return QV.encode(t).byteLength}function $V(t){var e,n,r=0;try{for(var i=HV(t.entries()),o=i.next();!o.done;o=i.next()){var s=zV(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var nf="0.57.1",jl;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(jl||(jl={}));var qV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),tx=300,ex=(function(t){qV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",nf,n)||this;return r.component="xml-http-request",r.version=nf,r.moduleName=r.component,r.gn=0,r.nn=new WeakMap,r.sn=new WeakSet,r}return e.prototype.init=function(){},e.prototype.$r=function(n,r){var i=Ce(r).href;if(!cy(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};jt.inject(tt.active(),o),Object.keys(o).length>0&&this.T.debug("headers inject skipped due to CORS policy");return}var s={};jt.inject(tt.active(),s),Object.keys(s).forEach(function(a){n.setRequestHeader(a,String(s[a]))})},e.prototype.jr=function(n,r){var i=this;tt.with(ut.setSpan(tt.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]});_n(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[J.RESPONSE_END])})},e.prototype.Qr=function(n,r,i){if(typeof i=="string"){var o=Ce(i);r.status!==void 0&&n.setAttribute(YV,r.status),r.statusText!==void 0&&n.setAttribute(jl.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(JV,o.host),n.setAttribute(DV,o.protocol.replace(":","")),n.setAttribute(KV,navigator.userAgent)}},e.prototype.la=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&OV(function(){return o(n,r)},function(s){s&&i.T.error("applyCustomAttributesOnSpan",s)})},e.prototype.ca=function(n,r){var i=this.nn.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var s=o.getEntries(),a=Ce(r);s.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===a.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype.qr=function(){this.gn===0&&this.getConfig().clearTimingResources&&(qt.clearResourceTimings(),this.nn=new WeakMap,this.sn=new WeakSet)},e.prototype.Zi=function(n,r,i,o,s){if(!(!i||!o||!s||!n.createdResources)){var a=n.createdResources.entries;(!a||!a.length)&&(a=qt.getEntriesByType("resource"));var c=ay(Ce(i).href,o,s,a,this.sn);if(c.mainRequest){var l=c.mainRequest;this.ar(l);var u=c.corsPreFlightRequest;u&&(this.jr(r,u),this.ar(u)),_n(r,l,this.getConfig().ignoreNetworkEvents)}}},e.prototype.ua=function(n){var r=this.nn.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this.nn.delete(n)}},e.prototype.Un=function(n,r,i){var o;if(Bm(r,this.getConfig().ignoreUrls)){this.T.debug("ignoring span as url matches ignored url");return}var s=i.toUpperCase(),a=this.tracer.startSpan(s,{kind:Fr.CLIENT,attributes:(o={},o[FV]=i,o[AV]=Ce(r).toString(),o)});return a.addEvent(Re.METHOD_OPEN),this.ua(n),this.nn.set(n,{span:a,spanUrl:r}),a},e.prototype.ar=function(n){this.sn.add(n)},e.prototype.ha=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=o[0],c=o[1];return i.Un(this,c,a),r.apply(this,o)}}},e.prototype.pa=function(){var n=this;function r(u,h,p,f){var m=h.callbackToRemoveEvents;typeof m=="function"&&m();var d=h.span,v=h.spanUrl,g=h.sendStartTime;d&&(n.Zi(h,d,v,g,p),d.addEvent(u,f),n.Qr(d,h,v),d.end(f),n.gn--),n.qr()}function i(u,h){var p=n.nn.get(h);if(p){p.status=h.status,p.statusText=h.statusText,n.nn.delete(h),p.span&&n.la(p.span,h);var f=dn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},tx)}}function o(){i(Re.EVENT_ERROR,this)}function s(){i(Re.EVENT_ABORT,this)}function a(){i(Re.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Re.EVENT_LOAD,this):i(Re.EVENT_ERROR,this)}function l(u){u.removeEventListener("abort",s),u.removeEventListener("error",o),u.removeEventListener("load",c),u.removeEventListener("timeout",a);var h=n.nn.get(u);h&&(h.callbackToRemoveEvents=void 0)}return function(u){return function(){for(var h=this,p=[],f=0;f<arguments.length;f++)p[f]=arguments[f];var m=n.nn.get(this);if(!m)return u.apply(this,p);var d=m.span,v=m.spanUrl;if(d&&v){if(n.getConfig().measureRequestSize&&p!=null&&p[0]){var g=p[0],w=jV(g);w!==void 0&&d.setAttribute(_V,w)}tt.with(ut.setSpan(tt.active(),d),function(){n.gn++,m.sendStartTime=dn(),d.addEvent(Re.METHOD_SEND),h.addEventListener("abort",s),h.addEventListener("error",o),h.addEventListener("load",c),h.addEventListener("timeout",a),m.callbackToRemoveEvents=function(){l(h),m.createdResources&&m.createdResources.observer.disconnect()},n.$r(h,v),n.ca(h,v)})}return u.apply(this,p)}}},e.prototype.enable=function(){this.T.debug("applying patch to",this.moduleName,this.version),tf(XMLHttpRequest.prototype.open)&&(this.F(XMLHttpRequest.prototype,"open"),this.T.debug("removing previous patch from method open")),tf(XMLHttpRequest.prototype.send)&&(this.F(XMLHttpRequest.prototype,"send"),this.T.debug("removing previous patch from method send")),this.ee(XMLHttpRequest.prototype,"open",this.ha()),this.ee(XMLHttpRequest.prototype,"send",this.pa())},e.prototype.disable=function(){this.T.debug("removing patch from",this.moduleName,this.version),this.F(XMLHttpRequest.prototype,"open"),this.F(XMLHttpRequest.prototype,"send"),this.gn=0,this.nn=new WeakMap,this.sn=new WeakSet},e})(NV),nx=(t,e,n)=>{var r,i;let o=mt({},e);return n?((r=Object.keys(o))==null||r.forEach(s=>{[...n].includes(s==null?void 0:s.toLowerCase())||(o[s]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(s=>{[...rx,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},rx=["authorization","cookie","proxy-authorization","token"],ix=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],ox=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),sx=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function ax(t){return!!(t.includes("/sdk/evalx")&&t.match(ox)||t.includes("/eval/")&&t.match(sx))}var lx=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),cx=t=>ax(t),ux=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),hx=(t,e,n)=>!ux(t,e)&&!cx(t)&&!lx(t),px=(t,e,n)=>{var r;if(n.some(s=>t.toLowerCase().includes(s)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(r=window==null?void 0:window.location)!=null&&r.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(s=>{t.match(s)&&(o=!0)}),o},rf=64*1024,dx={"application/json":64*1024*1024,"text/plain":64*1024*1024},my=(t,e,n,r)=>{var i,o,s;let a=rf;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch(l){}a=(s=dx[c])!=null?s:rf}if(t){if(e)try{let c=JSON.parse(t);Array.isArray(c)?c.forEach(l=>{Object.keys(l).forEach(u=>{e.includes(u.toLocaleLowerCase())&&(l[u]="[REDACTED]")})}):Object.keys(c).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}if(n)try{let c=JSON.parse(t);Object.keys(c).forEach(l=>{n.includes(l.toLocaleLowerCase())||(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}}try{t=t.slice(0,a)}catch(c){}return t},fx=(t,e,n)=>Yo(void 0,null,function*(){let r;try{let i=t.clone().body;if(i){let o=i.getReader(),s=new TextDecoder,a,c="";for(;!(a=yield o.read()).done;){let l=a.value;c+=s.decode(l)}r=c,r=my(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),yy=(function(){function t(e){this.v=e}return t.prototype.export=function(e,n){this.v.export(e,n)},t.prototype.forceFlush=function(){return this.v.forceFlush()},t.prototype.shutdown=function(){return this.v.shutdown()},t})(),mx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),of=(function(t){mx(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return e})(Error);function yx(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function gx(t){if(t!=null)return function(){return t}}function bx(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:yx((i=(r=t.timeoutMillis)!==null&&r!==void 0?r:e.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(s=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&s!==void 0?s:n.concurrencyLimit,compression:(c=(a=t.compression)!==null&&a!==void 0?a:e.compression)!==null&&c!==void 0?c:n.compression}}function vx(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var wx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Sx=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ix=(function(){function t(e){this.lr=[],this.da=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.lr.push(e);var r=function(){var i=n.lr.indexOf(e);n.lr.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this.lr.length>=this.da},t.prototype.awaitAll=function(){return wx(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.lr)];case 1:return e.sent(),[2]}})})},t})();function Tx(t){return new Ix(t.concurrencyLimit)}function Ex(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function Rx(){return{handleResponse:function(t){t==null||!Ex(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||X.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var Cx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Zx=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},kx=(function(){function t(e,n,r,i,o){this.Pn=e,this.Mo=n,this.fa=r,this.Gi=i,this.ma=o,this.Xi=X.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this.Xi.debug("items to be sent",e),this.Gi.hasReachedLimit()){n({code:kt.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this.Mo.serializeRequest(e);if(i==null){n({code:kt.FAILED,error:new Error("Nothing to send")});return}this.Gi.pushPromise(this.Pn.send(i,this.ma).then(function(o){if(o.status==="success"){if(o.data!=null)try{r.fa.handleResponse(r.Mo.deserializeResponse(o.data))}catch(s){r.Xi.warn("Export succeeded but could not deserialize response - is the response specification compliant?",s,o.data)}n({code:kt.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:kt.FAILED,error:o.error});return}else o.status==="retryable"?n({code:kt.FAILED,error:new of("Export failed with retryable status")}):n({code:kt.FAILED,error:new of("Export failed with unknown error")})},function(o){return n({code:kt.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this.Gi.awaitAll()},t.prototype.shutdown=function(){return Cx(this,void 0,void 0,function(){return Zx(this,function(e){switch(e.label){case 0:return this.Xi.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this.Pn.shutdown(),[2]}})})},t})();function Vx(t,e){return new kx(t.transport,t.serializer,Rx(),t.promiseHandler,e.timeout)}function gy(t,e,n){return Vx({transport:n,serializer:e,promiseHandler:Tx(t)},{timeout:t.timeoutMillis})}function by(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function xx(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function vy(t){var e=by(t);return xx(e)}function Nx(t){var e=by(t);return e.toString()}var Ox=typeof BigInt<"u"?Nx:ke;function sf(t){return t}function wy(t){if(t!==void 0)return Rc(t)}var Gx={encodeHrTime:vy,encodeSpanContext:Rc,encodeOptionalSpanContext:wy};function Sy(t){var e,n;if(t===void 0)return Gx;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?vy:Ox,encodeSpanContext:i?sf:Rc,encodeOptionalSpanContext:i?sf:wy}}var Lx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function Iy(t){return{attributes:gn(t.attributes),droppedAttributesCount:0}}function Ty(t){return{name:t.name,version:t.version}}function gn(t){return Object.keys(t).map(function(e){return Ey(e,t[e])})}function Ey(t,e){return{key:t,value:Ry(e)}}function Ry(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Ry)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=Lx(n,2),i=r[0],o=r[1];return Ey(i,o)})}}:{}}var ae;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(ae||(ae={}));var ve;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(ve||(ve={}));var Xx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),af=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},lf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Wx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ux=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Px=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Mx(t){return t!=null}function Cy(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function Fx(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var Zy=(function(t){Xx(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e})(Error);function Jr(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new Zy("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Ax(t){return af(this,void 0,void 0,function(){var e=this;return lf(this,function(n){return[2,Promise.all(t.map(function(r){return af(e,void 0,void 0,function(){var i,o;return lf(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,r];case 1:return i=s.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=s.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function Jx(t){return t.status==="rejected"}function cf(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,Ux([],Wx(e(r)),!1))}),n}function Dx(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=Px(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!e.has(s))return!1}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Yx(t,e){for(var n=0,r=t.length-1,i=t.length;r>=n;){var o=n+Math.trunc((r-n)/2);t[o]<e?n=o+1:(i=o,r=o-1)}return i}function Kx(t,e){return t.toLowerCase()===e.toLowerCase()}var fn;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(fn||(fn={}));var _x=(function(){function t(){this.kind=fn.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,n){},t.prototype.diff=function(e,n){},t.prototype.toMetricData=function(e,n,r,i){},t})(),K;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(K||(K={}));function Pe(t,e,n){var r,i,o,s;return jx(t)||X.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(r=n==null?void 0:n.description)!==null&&r!==void 0?r:"",unit:(i=n==null?void 0:n.unit)!==null&&i!==void 0?i:"",valueType:(o=n==null?void 0:n.valueType)!==null&&o!==void 0?o:De.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function Hx(t,e){var n,r;return{name:(n=t.name)!==null&&n!==void 0?n:e.name,description:(r=t.description)!==null&&r!==void 0?r:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function zx(t,e){return Kx(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Bx=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function jx(t){return t.match(Bx)!=null}var Qx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function $x(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var fl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=$x(n)),this.startTime=e,this.cr=n,this.wt=r,this.ne=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this.ne.count+=1,this.ne.sum+=e,this.wt&&(this.ne.min=Math.min(e,this.ne.min),this.ne.max=Math.max(e,this.ne.max),this.ne.hasMinMax=!0);var n=Yx(this.cr,e);this.ne.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ne},t})(),ky=(function(){function t(e,n){this.cr=e,this.wt=n,this.kind=fn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new fl(e,this.cr,this.wt)},t.prototype.merge=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=o[c]+s[c];var l=1/0,u=-1/0;return this.wt&&(r.hasMinMax&&i.hasMinMax?(l=Math.min(r.min,i.min),u=Math.max(r.max,i.max)):r.hasMinMax?(l=r.min,u=r.max):i.hasMinMax&&(l=i.min,u=i.max)),new fl(e.startTime,r.buckets.boundaries,this.wt,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this.wt&&(r.hasMinMax||i.hasMinMax),min:l,max:u})},t.prototype.diff=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=s[c]-o[c];return new fl(n.startTime,r.buckets.boundaries,this.wt,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:ve.HISTOGRAM,dataPoints:r.map(function(o){var s=Qx(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,buckets:l.buckets,count:l.count}}})}},t})(),ml=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},yl=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},uf=(function(){function t(e,n,r,i){e===void 0&&(e=new qx),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.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}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(n,r){return e.at(r)})},t.prototype.at=function(e){var n=this.indexBase-this.indexStart;return e<n&&(e+=this.backing.length),e-=n,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,n){this.backing.increment(e,n)},t.prototype.decrementBucket=function(e,n){this.backing.decrement(e,n)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this.Fo()},t.prototype.downscale=function(e){this.Fo();for(var n=1+this.indexEnd-this.indexStart,r=1<<e,i=0,o=0,s=this.indexStart;s<=this.indexEnd;){var a=s%r;a<0&&(a+=r);for(var c=a;c<r&&i<n;c++)this.ya(o,i),i++,s++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype.Fo=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype.ya=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t})(),qx=(function(){function t(e){e===void 0&&(e=[0]),this.vt=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.vt.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this.vt[e]},t.prototype.growTo=function(e,n,r){var i=new Array(e).fill(0);i.splice.apply(i,yl([r,this.vt.length-n],ml(this.vt.slice(n)),!1)),i.splice.apply(i,yl([0,n],ml(this.vt.slice(0,n)),!1)),this.vt=i},t.prototype.reverse=function(e,n){for(var r=Math.floor((e+n)/2)-e,i=0;i<r;i++){var o=this.vt[e+i];this.vt[e+i]=this.vt[n-i-1],this.vt[n-i-1]=o}},t.prototype.emptyBucket=function(e){var n=this.vt[e];return this.vt[e]=0,n},t.prototype.increment=function(e,n){this.vt[e]+=n},t.prototype.decrement=function(e,n){this.vt[e]>=n?this.vt[e]-=n:this.vt[e]=0},t.prototype.clone=function(){return new t(yl([],ml(this.vt),!1))},t})(),tN=52,eN=2146435072,nN=1048575,Vy=1023,xy=-1022,Ny=Vy,Ql=Math.pow(2,-1022);function Oy(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&eN)>>20;return r-Vy}function Gy(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&nN)*Math.pow(2,32);return i+r}function $l(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function rN(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var iN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Dr=(function(t){iN(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),oN=(function(){function t(e){this.Rn=-e}return t.prototype.mapToIndex=function(e){if(e<Ql)return this.ur();var n=Oy(e),r=this.ga(Gy(e)-1,tN);return n+r>>this.Rn},t.prototype.lowerBoundary=function(e){var n=this.ur();if(e<n)throw new Dr("underflow: "+e+" is < minimum lower boundary: "+n);var r=this.Zr();if(e>r)throw new Dr("overflow: "+e+" is > maximum lower boundary: "+r);return $l(1,e<<this.Rn)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Rn===0?0:-this.Rn},enumerable:!1,configurable:!0}),t.prototype.ur=function(){var e=xy>>this.Rn;return this.Rn<2&&e--,e},t.prototype.Zr=function(){return Ny>>this.Rn},t.prototype.ga=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),sN=(function(){function t(e){this.Mn=e,this.Wi=$l(Math.LOG2E,e),this.ba=$l(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Ql)return this.ur()-1;if(Gy(e)===0){var n=Oy(e);return(n<<this.Mn)-1}var r=Math.floor(Math.log(e)*this.Wi),i=this.Zr();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this.Zr();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this.Mn))/this.Wi);throw new Dr("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this.ur();if(e<=r){if(e===r)return Ql;if(e===r-1)return Math.exp((e+(1<<this.Mn))/this.Wi)/2;throw new Dr("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this.ba)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Mn},enumerable:!1,configurable:!0}),t.prototype.ur=function(){return xy<<this.Mn},t.prototype.Zr=function(){return(Ny+1<<this.Mn)-1},t})(),hf=-10,pf=20,aN=Array.from({length:31},function(t,e){return e>10?new sN(e-10):new oN(e-10)});function df(t){if(t>pf||t<hf)throw new Dr("expected scale >= "+hf+" && <= "+pf+", got: "+t);return aN[t+10]}var lN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},no=(function(){function t(e,n){this.low=e,this.high=n}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t})(),cN=20,uN=160,gl=2,hN=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=uN),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),s===void 0&&(s=0),a===void 0&&(a=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),l===void 0&&(l=new uf),u===void 0&&(u=new uf),h===void 0&&(h=df(cN)),this.startTime=e,this.Ze=n,this.wt=r,this.hr=i,this.Cn=o,this.Fn=s,this.Zn=a,this.kn=c,this.Ji=l,this.Yi=u,this.An=h,this.Ze<gl&&(X.warn("Exponential Histogram Max Size set to "+this.Ze+", changing to the minimum size of: "+gl),this.Ze=gl)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return{hasMinMax:this.wt,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(t.prototype,"sum",{get:function(){return this.hr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.Zn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.kn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.Cn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this.Fn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.Cn===this.Fn?0:this.An.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this.Ji},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this.Yi},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,n){if(!Number.isNaN(e)){if(e>this.kn&&(this.kn=e),e<this.Zn&&(this.Zn=e),this.Cn+=n,e===0){this.Fn+=n;return}this.hr+=e*n,e>0?this.Ao(this.Ji,e,n):this.Ao(this.Yi,-e,n)}},t.prototype.merge=function(e){this.Cn===0?(this.Zn=e.min,this.kn=e.max):e.count!==0&&(e.min<this.min&&(this.Zn=e.min),e.max>this.max&&(this.kn=e.max)),this.startTime=e.startTime,this.hr+=e.sum,this.Cn+=e.count,this.Fn+=e.zeroCount;var n=this.Jo(e);this.Ki(this.scale-n),this.Do(this.positive,e,e.positive,n),this.Do(this.negative,e,e.negative,n)},t.prototype.diff=function(e){this.Zn=1/0,this.kn=-1/0,this.hr-=e.sum,this.Cn-=e.count,this.Fn-=e.zeroCount;var n=this.Jo(e);this.Ki(this.scale-n),this.Yo(this.positive,e,e.positive,n),this.Yo(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this.Ze,this.wt,this.hr,this.Cn,this.Fn,this.Zn,this.kn,this.positive.clone(),this.negative.clone(),this.An)},t.prototype.Ao=function(e,n,r){var i=this.An.mapToIndex(n),o=!1,s=0,a=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this.Ze?(o=!0,a=i,s=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this.Ze&&(o=!0,a=e.indexStart,s=i),o){var c=this._i(s,a);this.Ki(c),i=this.An.mapToIndex(n)}this.Ko(e,i,r)},t.prototype.Ko=function(e,n,r){if(r!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=n),n<e.indexStart){var i=e.indexEnd-n;i>=e.backing.length&&this._o(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this._o(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype._o=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,s=rN(n);s>this.Ze&&(s=this.Ze);var a=s-i;e.backing.growTo(s,o,a)},t.prototype._i=function(e,n){for(var r=0;e-n>=this.Ze;)e>>=1,n>>=1,r++;return r},t.prototype.Ki=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var n=this.An.scale-e;this.Ji.downscale(e),this.Yi.downscale(e),this.An=df(n)}},t.prototype.Jo=function(e){var n=Math.min(this.scale,e.scale),r=no.combine(this.kr(this.positive,this.scale,n),this.kr(e.positive,e.scale,n)),i=no.combine(this.kr(this.negative,this.scale,n),this.kr(e.negative,e.scale,n));return Math.min(n-this._i(r.high,r.low),n-this._i(i.high,i.low))},t.prototype.kr=function(e,n,r){if(e.length===0)return new no(0,-1);var i=n-r;return new no(e.indexStart>>i,e.indexEnd>>i)},t.prototype.Do=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++)this.Ko(e,o+a>>s,r.at(a))},t.prototype.Yo=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++){var c=o+a>>s,l=c-e.indexBase;l<0&&(l+=e.backing.length),e.decrementBucket(l,r.at(a))}e.trim()},t})(),pN=(function(){function t(e,n){this.Ze=e,this.wt=n,this.kind=fn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new hN(e,this.Ze,this.wt)},t.prototype.merge=function(e,n){var r=n.clone();return r.merge(e),r},t.prototype.diff=function(e,n){var r=n.clone();return r.diff(e),r},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:ve.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var s=lN(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,positive:{offset:l.positive.offset,bucketCounts:l.positive.bucketCounts},negative:{offset:l.negative.offset,bucketCounts:l.negative.bucketCounts},count:l.count,scale:l.scale,zeroCount:l.zeroCount}}})}},t})(),dN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},bl=(function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this.ne=n,this.sampleTime=r}return t.prototype.record=function(e){this.ne=e,this.sampleTime=Qt(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ne},t})(),fN=(function(){function t(){this.kind=fn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new bl(e)},t.prototype.merge=function(e,n){var r=ji(n.sampleTime)>=ji(e.sampleTime)?n:e;return new bl(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=ji(n.sampleTime)>=ji(e.sampleTime)?n:e;return new bl(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:ve.GAUGE,dataPoints:r.map(function(o){var s=dN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),mN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Zr=(function(){function t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this.ne=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this.ne+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ne},t})(),ff=(function(){function t(e){this.monotonic=e,this.kind=fn.SUM}return t.prototype.createAccumulation=function(e){return new Zr(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new Zr(n.startTime,this.monotonic,i,n.reset):new Zr(e.startTime,this.monotonic,r+i)},t.prototype.diff=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new Zr(n.startTime,this.monotonic,i,!0):new Zr(n.startTime,this.monotonic,i-r)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:ve.SUM,dataPoints:r.map(function(o){var s=mN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),bn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Ne=(function(){function t(){}return t.Drop=function(){return Ly},t.Sum=function(){return Xy},t.LastValue=function(){return Wy},t.Histogram=function(){return Uy},t.ExponentialHistogram=function(){return TN},t.Default=function(){return EN},t})(),yN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new _x,e})(Ne),gN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new ff(!0),e.NON_MONOTONIC_INSTANCE=new ff(!1),e})(Ne),bN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new fN,e})(Ne),vN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new ky([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(Ne),wN=(function(t){bn(e,t);function e(n,r){r===void 0&&(r=!0);var i=t.call(this)||this;if(i.wt=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(a,c){return a-c});var o=n.lastIndexOf(-1/0),s=n.indexOf(1/0);return s===-1&&(s=void 0),i.cr=n.slice(o+1,s),i}return e.prototype.createAggregator=function(n){return new ky(this.cr,this.wt)},e})(Ne),SN=(function(t){bn(e,t);function e(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=t.call(this)||this;return i.Ze=n,i.wt=r,i}return e.prototype.createAggregator=function(n){return new pN(this.Ze,this.wt)},e})(Ne),IN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.Fr=function(n){switch(n.type){case K.COUNTER:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return Xy;case K.GAUGE:case K.OBSERVABLE_GAUGE:return Wy;case K.HISTOGRAM:return n.advice.explicitBucketBoundaries?new wN(n.advice.explicitBucketBoundaries):Uy}return X.warn("Unable to recognize instrument type: "+n.type),Ly},e.prototype.createAggregator=function(n){return this.Fr(n).createAggregator(n)},e})(Ne),Ly=new yN,Xy=new gN,Wy=new bN,Uy=new vN,TN=new SN,EN=new IN,RN=function(t){return Ne.Default()},CN=function(t){return ae.CUMULATIVE},vl=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},wl=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},mf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ZN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},kN=(function(){function t(e){var n,r,i;this._e=!1,this.Hi=(n=e==null?void 0:e.aggregationSelector)!==null&&n!==void 0?n:RN,this.zi=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:CN,this.va=(i=e==null?void 0:e.metricProducers)!==null&&i!==void 0?i:[],this.Ho=e==null?void 0:e.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this.Bi)throw new Error("MetricReader can not be bound to a MeterProvider again.");this.Bi=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this.Hi(e)},t.prototype.selectAggregationTemporality=function(e){return this.zi(e)},t.prototype.selectCardinalityLimit=function(e){return this.Ho?this.Ho(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return vl(this,void 0,void 0,function(){var n,r,i,o,s,a;return wl(this,function(c){switch(c.label){case 0:if(this.Bi===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._e)throw new Error("MetricReader is shutdown");return[4,Promise.all(ZN([this.Bi.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],mf(this.va.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=mf.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(cf(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(cf(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return vl(this,void 0,void 0,function(){return wl(this,function(n){switch(n.label){case 0:return this._e?(X.error("Cannot call shutdown twice."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Jr(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._e=!0,[2]}})})},t.prototype.forceFlush=function(e){return vl(this,void 0,void 0,function(){return wl(this,function(n){switch(n.label){case 0:return this._e?(X.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Jr(this.onForceFlush(),e.timeoutMillis)];case 3:return n.sent(),[2]}})})},t})(),VN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ro=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},io=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},xN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},NN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ON=(function(t){VN(e,t);function e(n){var r,i,o,s,a=t.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a.wa=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,a.Qi=(s=n.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,a.Gn=n.exporter,a}return e.prototype.zo=function(){return ro(this,void 0,void 0,function(){var n;return io(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Jr(this.Sa(),this.Qi)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof Zy?(X.error("Export took longer than %s milliseconds and timed out.",this.Qi),[2]):(Ye(n),[3,3]);case 3:return[2]}})})},e.prototype.Sa=function(){var n,r;return ro(this,void 0,void 0,function(){var i,o,s,a,c,l;return io(this,function(u){switch(u.label){case 0:return[4,this.collect({timeoutMillis:this.Qi})];case 1:if(i=u.sent(),o=i.resourceMetrics,s=i.errors,s.length>0&&(l=X).error.apply(l,NN(["PeriodicExportingMetricReader: metrics collection errors"],xN(s),!1)),!o.resource.asyncAttributesPending)return[3,5];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return u.sent(),[3,5];case 4:return a=u.sent(),X.debug("Error while resolving async portion of resource: ",a),Ye(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,mk.Gs(this.Gn,o)];case 6:if(c=u.sent(),c.code!==kt.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this.Bo=setInterval(function(){n.zo()},this.wa)},e.prototype.onForceFlush=function(){return ro(this,void 0,void 0,function(){return io(this,function(n){switch(n.label){case 0:return[4,this.zo()];case 1:return n.sent(),[4,this.Gn.forceFlush()];case 2:return n.sent(),[2]}})})},e.prototype.onShutdown=function(){return ro(this,void 0,void 0,function(){return io(this,function(n){switch(n.label){case 0:return this.Bo&&clearInterval(this.Bo),[4,this.onForceFlush()];case 1:return n.sent(),[4,this.Gn.shutdown()];case 2:return n.sent(),[2]}})})},e})(kN),GN=(function(){function t(){this.jo=[]}return t.prototype.addView=function(e){this.jo.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this.jo.filter(function(o){return r.Ia(o.instrumentSelector,e)&&r.Ta(o.meterSelector,n)});return i},t.prototype.Ia=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype.Ta=function(e,n){return e.getNameFilter().match(n.name)&&(n.version===void 0||e.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||e.getSchemaUrlFilter().match(n.schemaUrl))},t})(),vn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Bo=(function(){function t(e,n){this.Ea=e,this.qe=n}return t.prototype.Vr=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=tt.active()),typeof e!="number"){X.warn("non-number value provided to metric "+this.qe.name+": "+e);return}this.qe.valueType===De.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.qe.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Ea.record(e,n,r,Qt(Date.now()))},t})(),LN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this.Vr(n,r,i)},e})(Bo),XN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){if(n<0){X.warn("negative value provided to counter "+this.qe.name+": "+n);return}this.Vr(n,r,i)},e})(Bo),WN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this.Vr(n,r,i)},e})(Bo),UN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){if(n<0){X.warn("negative value provided to histogram "+this.qe.name+": "+n);return}this.Vr(n,r,i)},e})(Bo),jo=(function(){function t(e,n,r){this.Qo=r,this.qe=e,this.$o=n}return t.prototype.addCallback=function(e){this.Qo.addCallback(e,this)},t.prototype.removeCallback=function(e){this.Qo.removeCallback(e,this)},t})(),PN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo),MN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo),FN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo);function ql(t){return t instanceof jo}var AN=(function(){function t(e){this.Je=e}return t.prototype.createGauge=function(e,n){var r=Pe(e,K.GAUGE,n),i=this.Je.registerMetricStorage(r);return new WN(i,r)},t.prototype.createHistogram=function(e,n){var r=Pe(e,K.HISTOGRAM,n),i=this.Je.registerMetricStorage(r);return new UN(i,r)},t.prototype.createCounter=function(e,n){var r=Pe(e,K.COUNTER,n),i=this.Je.registerMetricStorage(r);return new XN(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Pe(e,K.UP_DOWN_COUNTER,n),i=this.Je.registerMetricStorage(r);return new LN(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Pe(e,K.OBSERVABLE_GAUGE,n),i=this.Je.registerAsyncMetricStorage(r);return new MN(r,i,this.Je.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=Pe(e,K.OBSERVABLE_COUNTER,n),i=this.Je.registerAsyncMetricStorage(r);return new PN(r,i,this.Je.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=Pe(e,K.OBSERVABLE_UP_DOWN_COUNTER,n),i=this.Je.registerAsyncMetricStorage(r);return new FN(r,i,this.Je.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,n){this.Je.observableRegistry.addBatchCallback(e,n)},t.prototype.removeBatchObservableCallback=function(e,n){this.Je.observableRegistry.removeBatchCallback(e,n)},t})(),Py=(function(){function t(e){this.an=e}return t.prototype.getInstrumentDescriptor=function(){return this.an},t.prototype.updateDescription=function(e){this.an=Pe(this.an.name,this.an.type,{description:e,valueType:this.an.valueType,unit:this.an.unit,advice:this.an.advice})},t})(),JN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),yf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},DN=(function(){function t(e){this.xr=e,this.bn=new Map,this.Jn=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this.xr(e)),this.bn.get(n)},t.prototype.getOrDefault=function(e,n){var r=this.xr(e);if(this.bn.has(r))return this.bn.get(r);var i=n();return this.Jn.has(r)||this.Jn.set(r,e),this.bn.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this.xr(e)),this.Jn.has(r)||this.Jn.set(r,e),this.bn.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this.xr(e)),this.bn.has(n)},t.prototype.keys=function(){var e,n;return yf(this,function(r){switch(r.label){case 0:e=this.Jn.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,n;return yf(this,function(r){switch(r.label){case 0:e=this.bn.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this.Jn.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this.bn.size},enumerable:!1,configurable:!0}),t})(),un=(function(t){JN(e,t);function e(){return t.call(this,Cy)||this}return e})(DN),YN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},My=(function(){function t(e,n){this.rn=e,this.ln=new un,this.Dn=new un,this.qi={"otel.metric.overflow":!0},this.qo=(n!=null?n:2e3)-1,this.Ra=Cy(this.qi)}return t.prototype.record=function(e,n,r,i){var o=this,s=this.ln.get(n);if(!s){if(this.ln.size>=this.qo){var a=this.ln.getOrDefault(this.qi,function(){return o.rn.createAccumulation(i)});a==null||a.record(e);return}s=this.rn.createAccumulation(i),this.ln.set(n,s)}s==null||s.record(e)},t.prototype.batchCumulate=function(e,n){var r=this;Array.from(e.entries()).forEach(function(i){var o=YN(i,3),s=o[0],a=o[1],c=o[2],l=r.rn.createAccumulation(n);l==null||l.record(a);var u=l;if(r.Dn.has(s,c)){var h=r.Dn.get(s,c);u=r.rn.diff(h,l)}else if(r.Dn.size>=r.qo&&(s=r.qi,c=r.Ra,r.Dn.has(s,c))){var h=r.Dn.get(s,c);u=r.rn.diff(h,l)}if(r.ln.has(s,c)){var p=r.ln.get(s,c);u=r.rn.merge(p,u)}r.Dn.set(s,l,c),r.ln.set(s,u,c)})},t.prototype.collect=function(){var e=this.ln;return this.ln=new un,e},t})(),Sl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Fy=(function(){function t(e,n){var r=this;this.rn=e,this.Yn=new Map,this.eo=new Map,n.forEach(function(i){r.Yn.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this.Ca(r);var o=this.Za(e),s=o,a;if(this.eo.has(e)){var c=this.eo.get(e),l=c.collectionTime;a=c.aggregationTemporality,a===ae.CUMULATIVE?s=t.merge(c.accumulations,o,this.rn):s=t.calibrateStartTime(c.accumulations,o,l)}else a=e.selectAggregationTemporality(n.type);this.eo.set(e,{accumulations:s,collectionTime:i,aggregationTemporality:a});var u=KN(s);if(u.length!==0)return this.rn.toMetricData(n,a,u,i)},t.prototype.Ca=function(e){var n,r,i=this.Yn.keys();try{for(var o=Sl(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.Yn.get(a);c===void 0&&(c=[],this.Yn.set(a,c)),c.push(e)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.Za=function(e){var n,r,i=new un,o=this.Yn.get(e);if(this.Yn.set(e,[]),o===void 0)return i;try{for(var s=Sl(o),a=s.next();!a.done;a=s.next()){var c=a.value;i=t.merge(i,c,this.rn)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},t.merge=function(e,n,r){for(var i=e,o=n.entries(),s=o.next();s.done!==!0;){var a=gf(s.value,3),c=a[0],l=a[1],u=a[2];if(e.has(c,u)){var h=e.get(c,u),p=r.merge(h,l);i.set(c,p,u)}else i.set(c,l,u);s=o.next()}return i},t.calibrateStartTime=function(e,n,r){var i,o;try{for(var s=Sl(e.keys()),a=s.next();!a.done;a=s.next()){var c=gf(a.value,2),l=c[0],u=c[1],h=n.get(l,u);h==null||h.setStartTime(r)}}catch(p){i={error:p}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},t})();function KN(t){return Array.from(t.entries())}var _N=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),HN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},zN=(function(t){_N(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.no=i,a.ro=s,a.pr=new My(r,a.ro),a.io=new Fy(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new un;Array.from(n.entries()).forEach(function(s){var a=HN(s,2),c=a[0],l=a[1];o.set(i.no.process(c),l)}),this.pr.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this.pr.collect();return this.io.buildMetrics(n,this.an,i,r)},e})(Py);function bf(t,e){var n="";return t.unit!==e.unit&&(n+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
631
+ `).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return a.map(function(c){var l=c.split("@"),u=this.extractLocation(l.pop()),h=l.shift()||"",p=h.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,f;h.match(/\(([^)]*)\)/)&&(f=h.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var m=f===void 0||f==="[arguments not available]"?void 0:f.split(",");return new n({functionName:p,args:m,fileName:u[0],lineNumber:u[1],columnNumber:u[2],source:c})},this)}}})})(dy);var _C=dy.exports,gf=Hc(_C);function ms(t){try{return gf.parse(t)}catch(e){try{return gf.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function HC(t,e){let n=e.logger,r;r=window[n];let i=[];if(e.level.includes("error")&&window){let s=a=>{let{message:c,error:l}=a,u=[];l&&(u=ms(l));let h=[gc(c,e.stringifyOptions)];t({type:"Error",trace:u,time:Date.now(),value:h})};window.addEventListener("error",s),i.push(()=>{window&&window.removeEventListener("error",s)})}for(let s of e.level)i.push(o(r,s));return()=>{i.forEach(s=>s())};function o(s,a){return s[a]?oC(s,a,c=>(...l)=>{c.apply(this,l);try{t(zC(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function zC(t,e,...n){let r=ms(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?gc(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:gc(n.filter(o=>typeof o=="object").reduce((o,s)=>bt(bt({},o),s),{}),e.stringifyOptions),time:Date.now()}}function Nl(t,e,n,r){var i,o,s,a;let c=r!=null?r:e,l=ms(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=jC(l);t({error:c,event:Tn(e),type:"window.onerror",url:window.location.href,source:n!=null?n:"",lineNumber:(i=h[0])!=null&&i.lineNumber?(o=h[0])==null?void 0:o.lineNumber:0,columnNumber:(s=h[0])!=null&&s.columnNumber?(a=h[0])==null?void 0:a.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString(),payload:u?Tn(u):void 0})}var BC=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};let n=window.onerror=(s,a,c,l,u)=>{Nl(t,s,a,u)},r=window.onunhandledrejection=s=>{if(s.reason){let a=s.promise;a.getStack?Nl(t,s.reason,s.type,a.getStack()):Nl(t,s.reason,s.type)}},i=window.Promise,o=class extends i{constructor(s){super(s),St(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){let s=typeof window.Zone>"u";return e&&s}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},jC=t=>{var e,n;if(t.length===0)return t;let r=t[0];return(e=r.fileName)!=null&&e.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?t.slice(1):t},bf=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],vf=["websocket error",'\\"ResizeObserver loop'],QC=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Zn="1.9.0",wf=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function $C(t){var e=new Set([t]),n=new Set,r=t.match(wf);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(a){return a===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(a){if(e.has(a))return!0;if(n.has(a))return!1;var c=a.match(wf);if(!c)return o(a);var l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?o(a):i.major===0?i.minor===l.minor&&i.patch<=l.patch?s(a):o(a):i.minor<=l.minor?s(a):o(a)}}var qC=$C(Zn),tk=Zn.split(".")[0],ci=Symbol.for("opentelemetry.js.api."+tk),ui=QC;function yi(t,e,n,r){var i;r===void 0&&(r=!1);var o=ui[ci]=(i=ui[ci])!==null&&i!==void 0?i:{version:Zn};if(!r&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(s.stack||s.message),!1}if(o.version!==Zn){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+Zn);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+Zn+"."),!0}function On(t){var e,n,r=(e=ui[ci])===null||e===void 0?void 0:e.version;if(!(!r||!qC(r)))return(n=ui[ci])===null||n===void 0?void 0:n[t]}function gi(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+Zn+".");var n=ui[ci];n&&delete n[t]}var ek=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},nk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rk=(function(){function t(e){this.Ar=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("debug",this.Ar,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("error",this.Ar,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("info",this.Ar,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("warn",this.Ar,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("verbose",this.Ar,e)},t})();function _r(t,e,n){var r=On("diag");if(r)return n.unshift(e),r[t].apply(r,nk([],ek(n),!1))}var Tt;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(Tt||(Tt={}));function ik(t,e){t<Tt.NONE?t=Tt.NONE:t>Tt.ALL&&(t=Tt.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",Tt.ERROR),warn:n("warn",Tt.WARN),info:n("info",Tt.INFO),debug:n("debug",Tt.DEBUG),verbose:n("verbose",Tt.VERBOSE)}}var ok=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},sk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ak="diag",Xe=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=On("diag");if(a)return a[i].apply(a,sk([],ok(o),!1))}}var n=this,r=function(i,o){var s,a,c;if(o===void 0&&(o={logLevel:Tt.INFO}),i===n){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=l.stack)!==null&&s!==void 0?s:l.message),!1}typeof o=="number"&&(o={logLevel:o});var u=On("diag"),h=ik((a=o.logLevel)!==null&&a!==void 0?a:Tt.INFO,i);if(u&&!o.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+p),h.warn("Current logger will overwrite one already registered from "+p)}return yi("diag",h,n,!0)};n.setLogger=r,n.disable=function(){gi(ak,n)},n.createComponentLogger=function(i){return new rk(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this.N||(this.N=new t),this.N},t})(),lk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ck=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uk=(function(){function t(e){this.qn=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this.qn.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this.qn.entries()).map(function(e){var n=lk(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this.qn);return r.qn.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this.qn);return n.qn.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this.qn);try{for(var s=ck(r),a=s.next();!a.done;a=s.next()){var c=a.value;o.qn.delete(c)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t})(),hk=Symbol("BaggageEntryMetadata"),pk=Xe.instance();function dk(t){return t===void 0&&(t={}),new uk(new Map(Object.entries(t)))}function fk(t){return typeof t!="string"&&(pk.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:hk,toString:function(){return t}}}function $c(t){return Symbol.for(t)}var mk=(function(){function t(e){var n=this;n.Xe=e?new Map(e):new Map,n.getValue=function(r){return n.Xe.get(r)},n.setValue=function(r,i){var o=new t(n.Xe);return o.Xe.set(r,i),o},n.deleteValue=function(r){var i=new t(n.Xe);return i.Xe.delete(r),i}}return t})(),En=new mk,Xn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),yk=(function(){function t(){}return t.prototype.createGauge=function(e,n){return Rk},t.prototype.createHistogram=function(e,n){return Ck},t.prototype.createCounter=function(e,n){return Ek},t.prototype.createUpDownCounter=function(e,n){return kk},t.prototype.createObservableGauge=function(e,n){return xk},t.prototype.createObservableCounter=function(e,n){return Zk},t.prototype.createObservableUpDownCounter=function(e,n){return Vk},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),ys=(function(){function t(){}return t})(),gk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(ys),bk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(ys),vk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(ys),wk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(ys),qc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),Sk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(qc),Ik=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(qc),Tk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(qc),fy=new yk,Ek=new gk,Rk=new vk,Ck=new wk,kk=new bk,Zk=new Sk,xk=new Ik,Vk=new Tk;function Ok(){return fy}var an;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(an||(an={}));var Nk={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},Gk={set:function(t,e,n){t!=null&&(t[e]=n)}},Lk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Xk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Wk=(function(){function t(){}return t.prototype.active=function(){return En},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,Xk([r],Lk(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),Mk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Pk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Gl="context",Uk=new Wk,gs=(function(){function t(){}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalContextManager=function(e){return yi(Gl,e,Xe.instance())},t.prototype.active=function(){return this.oi().active()},t.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this.oi()).with.apply(i,Pk([e,n,r],Mk(o),!1))},t.prototype.bind=function(e,n){return this.oi().bind(e,n)},t.prototype.oi=function(){return On(Gl)||Uk},t.prototype.disable=function(){this.oi().disable(),gi(Gl,Xe.instance())},t})(),_e;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(_e||(_e={}));var my="0000000000000000",yy="00000000000000000000000000000000",gy={traceId:yy,spanId:my,traceFlags:_e.NONE},ni=(function(){function t(e){e===void 0&&(e=gy),this.cr=e}return t.prototype.spanContext=function(){return this.cr},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t})(),tu=$c("OpenTelemetry Context Key SPAN");function eu(t){return t.getValue(tu)||void 0}function Fk(){return eu(gs.getInstance().active())}function nu(t,e){return t.setValue(tu,e)}function Ak(t){return t.deleteValue(tu)}function Dk(t,e){return nu(t,new ni(e))}function by(t){var e;return(e=eu(t))===null||e===void 0?void 0:e.spanContext()}var Jk=/^([0-9a-f]{32})$/i,Yk=/^[0-9a-f]{16}$/i;function vy(t){return Jk.test(t)&&t!==yy}function Kk(t){return Yk.test(t)&&t!==my}function bs(t){return vy(t.traceId)&&Kk(t.spanId)}function _k(t){return new ni(t)}var Ll=gs.getInstance(),wy=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=Ll.active());var i=!!(n!=null&&n.root);if(i)return new ni;var o=r&&by(r);return Hk(o)&&bs(o)?new ni(o):new ni},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:Ll.active(),l=this.startSpan(e,o,c),u=nu(c,l);return Ll.with(u,a,void 0,l)}},t})();function Hk(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var zk=new wy,Bk=(function(){function t(e,n,r,i){this.ur=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this.vo().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this.vo();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype.vo=function(){if(this.b)return this.b;var e=this.ur.getDelegateTracer(this.name,this.version,this.options);return e?(this.b=e,this.b):zk},t})(),jk=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new wy},t})(),Qk=new jk,Sf=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new Bk(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:Qk},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getTracer(e,n,r)},t})(),$o;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})($o||($o={}));var hi;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(hi||(hi={}));var qo;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(qo||(qo={}));var st=gs.getInstance(),M=Xe.instance(),$k=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return fy},t})(),qk=new $k,Xl="metrics",tZ=(function(){function t(){}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalMeterProvider=function(e){return yi(Xl,e,Xe.instance())},t.prototype.getMeterProvider=function(){return On(Xl)||qk},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){gi(Xl,Xe.instance())},t})(),Je=tZ.getInstance(),eZ=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),ru=$c("OpenTelemetry Baggage Key");function Sy(t){return t.getValue(ru)||void 0}function nZ(){return Sy(gs.getInstance().active())}function rZ(t,e){return t.setValue(ru,e)}function iZ(t){return t.deleteValue(ru)}var Wl="propagation",oZ=new eZ,sZ=(function(){function t(){this.createBaggage=dk,this.getBaggage=Sy,this.getActiveBaggage=nZ,this.setBaggage=rZ,this.deleteBaggage=iZ}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalPropagator=function(e){return yi(Wl,e,Xe.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=Gk),this.Ri().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=Nk),this.Ri().extract(e,n,r)},t.prototype.fields=function(){return this.Ri().fields()},t.prototype.disable=function(){gi(Wl,Xe.instance())},t.prototype.Ri=function(){return On(Wl)||oZ},t})(),pe=sZ.getInstance(),Ml="trace",aZ=(function(){function t(){this.si=new Sf,this.wrapSpanContext=_k,this.isSpanContextValid=bs,this.deleteSpan=Ak,this.getSpan=eu,this.getActiveSpan=Fk,this.getSpanContext=by,this.setSpan=nu,this.setSpanContext=Dk}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalTracerProvider=function(e){var n=yi(Ml,this.si,Xe.instance());return n&&this.si.setDelegate(e),n},t.prototype.getTracerProvider=function(){return On(Ml)||this.si},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){gi(Ml,Xe.instance()),this.si=new Sf},t})(),pt=aZ.getInstance(),Iy=$c("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ty(t){return t.setValue(Iy,!0)}function iu(t){return t.getValue(Iy)===!0}var lZ="=",Sc=";",Ic=",",Pl="baggage",cZ=180,uZ=4096,hZ=8192,pZ=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function dZ(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Ic:"")+n;return r.length>hZ?e:r},"")}function fZ(t){return t.getAllEntries().map(function(e){var n=pZ(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Sc+i.metadata.toString()),o})}function mZ(t){var e=t.split(Sc);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(lZ);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=fk(e.join(Sc))),{key:i,value:o,metadata:s}}}}}var Ey=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=pe.getBaggage(e);if(!(!i||iu(e))){var o=fZ(i).filter(function(a){return a.length<=uZ}).slice(0,cZ),s=dZ(o);s.length>0&&r.set(n,Pl,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,Pl),o=Array.isArray(i)?i.join(Ic):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Ic);return a.forEach(function(c){var l=mZ(c);if(l){var u={value:l.value};l.metadata&&(u.metadata=l.metadata),s[l.key]=u}}),Object.entries(s).length===0?e:pe.setBaggage(e,pe.createBaggage(s))},t.prototype.fields=function(){return[Pl]},t})(),Ry=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yZ=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function Uo(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Ry(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=yZ(o.value,2),a=s[0],c=s[1];if(!gZ(a)){M.warn("Invalid attribute key: "+a);continue}if(!Cy(c)){M.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(c)?r[a]=c.slice():r[a]=c}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function gZ(t){return typeof t=="string"&&t.length>0}function Cy(t){return t==null?!0:Array.isArray(t)?bZ(t):ky(t)}function bZ(t){var e,n,r;try{for(var i=Ry(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(ky(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function ky(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function vZ(){return function(t){M.error(wZ(t))}}function wZ(t){return typeof t=="string"?t:JSON.stringify(SZ(t))}function SZ(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var IZ=vZ();function ln(t){try{IZ(t)}catch(e){}}var Ne;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Ne||(Ne={}));var TZ=",",EZ=["OTEL_SDK_DISABLED"];function RZ(t){return EZ.indexOf(t)>-1}var CZ=["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 kZ(t){return CZ.indexOf(t)>-1}var ZZ=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function xZ(t){return ZZ.indexOf(t)>-1}var Fo=1/0,Ao=128,VZ=128,OZ=128,Zy={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:Tt.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Fo,OTEL_ATTRIBUTE_COUNT_LIMIT:Ao,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Fo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Ao,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Fo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Ao,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:VZ,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:OZ,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Ne.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 NZ(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function GZ(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function LZ(t,e,n,r){r===void 0&&(r=TZ);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var XZ={ALL:Tt.ALL,VERBOSE:Tt.VERBOSE,DEBUG:Tt.DEBUG,INFO:Tt.INFO,WARN:Tt.WARN,ERROR:Tt.ERROR,NONE:Tt.NONE};function WZ(t,e,n){var r=n[t];if(typeof r=="string"){var i=XZ[r.toUpperCase()];i!=null&&(e[t]=i)}}function xy(t){var e={};for(var n in Zy){var r=n;switch(r){case"OTEL_LOG_LEVEL":WZ(r,e,t);break;default:if(RZ(r))NZ(r,e,t);else if(kZ(r))GZ(r,e,t);else if(xZ(r))LZ(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var ri=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function pr(){var t=xy(ri);return Object.assign({},Zy,t)}function MZ(){return xy(ri)}function If(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function ou(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=If(t.charCodeAt(r)),o=If(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var me=performance,PZ="1.30.1",UZ="process.runtime.name",FZ="telemetry.sdk.name",AZ="telemetry.sdk.language",DZ="telemetry.sdk.version",JZ=UZ,YZ=FZ,KZ=AZ,_Z=DZ,HZ="webjs",zZ=HZ,ir,Ul=(ir={},ir[YZ]="opentelemetry",ir[JZ]="browser",ir[KZ]=zZ,ir[_Z]=PZ,ir),BZ=9,jZ=6,QZ=Math.pow(10,jZ),ts=Math.pow(10,BZ);function de(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*QZ);return[n,r]}function su(){var t=me.timeOrigin;if(typeof t!="number"){var e=me;t=e.timing&&e.timing.fetchStart}return t}function Nn(t){var e=de(su()),n=de(typeof t=="number"?t:me.now());return Vy(e,n)}function ii(t){if(au(t))return t;if(typeof t=="number")return t<su()?Nn(t):de(t);if(t instanceof Date)return de(t.getTime());throw TypeError("Invalid input type")}function $Z(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=ts),[n,r]}function Ye(t){return t[0]*ts+t[1]}function So(t){return t[0]*1e6+t[1]/1e3}function au(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Tf(t){return au(t)||typeof t=="number"||t instanceof Date}function Vy(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=ts&&(n[1]-=ts,n[0]+=1),n}var Gt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Gt||(Gt={}));var qZ=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Oy=(function(){function t(e){e===void 0&&(e={});var n;this.Ci=(n=e.propagators)!==null&&n!==void 0?n:[],this.ks=Array.from(new Set(this.Ci.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var s=qZ(this.Ci),a=s.next();!a.done;a=s.next()){var c=a.value;try{c.inject(e,n,r)}catch(l){M.warn("Failed to inject with "+c.constructor.name+". Err: "+l.message)}}}catch(l){i={error:l}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this.Ci.reduce(function(i,o){try{return o.extract(i,n,r)}catch(s){M.warn("Failed to extract with "+o.constructor.name+". Err: "+s.message)}return i},e)},t.prototype.fields=function(){return this.ks.slice()},t})(),Tc="[_0-9a-z-*/]",t1="[a-z]"+Tc+"{0,255}",e1="[a-z0-9]"+Tc+"{0,240}@[a-z]"+Tc+"{0,13}",n1=new RegExp("^(?:"+t1+"|"+e1+")$"),r1=/^[ -~]{0,255}[!-~]$/,i1=/,|=/;function o1(t){return n1.test(t)}function s1(t){return r1.test(t)&&!i1.test(t)}var Ef=32,a1=512,Rf=",",Cf="=",l1=(function(){function t(e){this.We=new Map,e&&this.Zs(e)}return t.prototype.set=function(e,n){var r=this.wo();return r.We.has(e)&&r.We.delete(e),r.We.set(e,n),r},t.prototype.unset=function(e){var n=this.wo();return n.We.delete(e),n},t.prototype.get=function(e){return this.We.get(e)},t.prototype.serialize=function(){var e=this;return this.xs().reduce(function(n,r){return n.push(r+Cf+e.get(r)),n},[]).join(Rf)},t.prototype.Zs=function(e){e.length>a1||(this.We=e.split(Rf).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Cf);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);o1(s)&&s1(a)&&n.set(s,a)}return n},new Map),this.We.size>Ef&&(this.We=new Map(Array.from(this.We.entries()).reverse().slice(0,Ef))))},t.prototype.xs=function(){return Array.from(this.We.keys()).reverse()},t.prototype.wo=function(){var e=new t;return e.We=new Map(this.We),e},t})(),Do="traceparent",Fl="tracestate",c1="00",u1="(?!ff)[\\da-f]{2}",h1="(?![0]{32})[\\da-f]{32}",p1="(?![0]{16})[\\da-f]{16}",d1="[\\da-f]{2}",f1=new RegExp("^\\s?("+u1+")-("+h1+")-("+p1+")-("+d1+")(-.*)?\\s?$");function m1(t){var e=f1.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Ny=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=pt.getSpanContext(e);if(!(!i||iu(e)||!bs(i))){var o=c1+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||_e.NONE).toString(16);r.set(n,Do,o),i.traceState&&r.set(n,Fl,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,Do);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=m1(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,Fl);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new l1(typeof c=="string"?c:void 0)}return pt.setSpanContext(e,s)},t.prototype.fields=function(){return[Do,Fl]},t})(),y1="[object Object]",g1="[object Null]",b1="[object Undefined]",v1=Function.prototype,Gy=v1.toString,w1=Gy.call(Object),S1=I1(Object.getPrototypeOf,Object),Ly=Object.prototype,Xy=Ly.hasOwnProperty,Rn=Symbol?Symbol.toStringTag:void 0,Wy=Ly.toString;function I1(t,e){return function(n){return t(e(n))}}function kf(t){if(!T1(t)||E1(t)!==y1)return!1;var e=S1(t);if(e===null)return!0;var n=Xy.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Gy.call(n)===w1}function T1(t){return t!=null&&typeof t=="object"}function E1(t){return t==null?t===void 0?b1:g1:Rn&&Rn in Object(t)?R1(t):C1(t)}function R1(t){var e=Xy.call(t,Rn),n=t[Rn],r=!1;try{t[Rn]=void 0,r=!0}catch(o){}var i=Wy.call(t);return r&&(e?t[Rn]=n:delete t[Rn]),i}function C1(t){return Wy.call(t)}var k1=20;function My(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Py(n,t.shift(),0,r);return n}function Al(t){return es(t)?t.slice():t}function Py(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>k1)){if(n++,Jo(t)||Jo(e)||Uy(e))i=Al(e);else if(es(t)){if(i=t.slice(),es(e))for(var o=0,s=e.length;o<s;o++)i.push(Al(e[o]));else if(Hr(e))for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o];i[c]=Al(e[c])}}else if(Hr(t))if(Hr(e)){if(!Z1(t,e))return e;i=Object.assign({},t);for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o],l=e[c];if(Jo(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(Zf(t,c,r)||Zf(e,c,r))delete i[c];else{if(Hr(u)&&Hr(h)){var p=r.get(u)||[],f=r.get(h)||[];p.push({obj:t,key:c}),f.push({obj:e,key:c}),r.set(u,p),r.set(h,f)}i[c]=Py(i[c],l,n,r)}}}}else i=e;return i}}function Zf(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.key===e&&s.obj===t)return!0}return!1}function es(t){return Array.isArray(t)}function Uy(t){return typeof t=="function"}function Hr(t){return!Jo(t)&&!es(t)&&!Uy(t)&&typeof t=="object"}function Jo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Z1(t,e){return!(!kf(t)||!kf(e))}var x1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Fy(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Ay(t,e){var n,r;if(!e)return!1;try{for(var i=x1(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(Fy(t,s))return!0}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var V1=(function(){function t(){var e=this;this.Vs=new Promise(function(n,r){e.ki=n,e.Os=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this.Vs},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this.ki(e)},t.prototype.reject=function(e){this.Os(e)},t})(),O1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},N1=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},G1=(function(){function t(e,n){this.Ns=e,this.Gs=n,this.Zi=!1,this.Dr=new V1}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this.Zi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this.Dr.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this.Zi){this.Zi=!0;try{Promise.resolve((e=this.Ns).call.apply(e,N1([this.Gs],O1(r),!1))).then(function(o){return n.Dr.resolve(o)},function(o){return n.Dr.reject(o)})}catch(o){this.Dr.reject(o)}}return this.Dr.promise},t})();function L1(t,e){return new Promise(function(n){st.with(Ty(st.active()),function(){t.export(e,function(r){n(r)})})})}var X1={Ls:L1},Dy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),W1=new Dy,M1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Dy},t})(),Jy=new M1,P1=(function(){function t(e,n,r,i){this.ur=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.Jr().emit(e)},t.prototype.Jr=function(){if(this.b)return this.b;var e=this.ur.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):W1},t})(),xf=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new P1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:Jy},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),U1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Io=Symbol.for("io.opentelemetry.js.api.logs"),zr=U1;function F1(t,e,n){return function(r){return r===t?e:n}}var Vf=1,A1=(function(){function t(){this.Ke=new xf}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalLoggerProvider=function(e){return zr[Io]?this.getLoggerProvider():(zr[Io]=F1(Vf,e,Jy),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=zr[Io])===null||e===void 0?void 0:e.call(zr,Vf))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete zr[Io],this.Ke=new xf},t})(),Yy=A1.getInstance();function D1(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var s=t[i];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function J1(t){t.forEach(function(e){return e.disable()})}function Y1(t){var e,n,r=t.tracerProvider||pt.getTracerProvider(),i=t.meterProvider||Je.getMeterProvider(),o=t.loggerProvider||Yy.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return D1(s,r,i,o),function(){J1(s)}}function Ec(t){return typeof t=="function"}var Dt=console.error.bind(console);function Br(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function bi(t){t&&t.logger&&(Ec(t.logger)?Dt=t.logger:Dt("new logger isn't a function, not replacing"))}function Ky(t,e,n){if(!t||!t[e]){Dt("no original function "+e+" to wrap");return}if(!n){Dt("no wrapper function"),Dt(new Error().stack);return}if(!Ec(t[e])||!Ec(n)){Dt("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Br(i,"__original",r),Br(i,"__unwrap",function(){t[e]===i&&Br(t,e,r)}),Br(i,"__wrapped",!0),Br(t,e,i),i}function K1(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Dt("must provide one or more modules to patch"),Dt(new Error().stack);return}if(!(e&&Array.isArray(e))){Dt("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){Ky(r,i,n)})})}function _y(t,e){if(!t||!t[e]){Dt("no function to unwrap."),Dt(new Error().stack);return}if(!t[e].__unwrap)Dt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function _1(t,e){if(t)Array.isArray(t)||(t=[t]);else{Dt("must provide one or more modules to patch"),Dt(new Error().stack);return}if(!(e&&Array.isArray(e))){Dt("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){_y(n,r)})})}bi.wrap=Ky;bi.massWrap=K1;bi.unwrap=_y;bi.massUnwrap=_1;var fe=bi,Rc=function(){return Rc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Rc.apply(this,arguments)},H1=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.se={},this.re=fe.wrap,this.L=fe.unwrap,this.So=fe.massWrap,this.Io=fe.massUnwrap,this.setConfig(r),this.w=M.createComponentLogger({namespace:e}),this.tr=pt.getTracer(e,n),this.er=Je.getMeter(e,n),this.nr=Yy.getLogger(e,n),this.rr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.er=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.rr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.nr},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.nr=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.rr=function(){},t.prototype.getConfig=function(){return this.se},t.prototype.setConfig=function(e){this.se=Rc({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.tr=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.To=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.w.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),z1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Hy=(function(t){z1(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.se.enabled&&o.enable(),o}return e})(H1);function Of(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Ft(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var B1="exception.type",j1="exception.message",Q1="exception.stacktrace",Dl=B1,Jl=j1,$1=Q1,q1="exception",Cc=function(){return Cc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Cc.apply(this,arguments)},tx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ex=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},nx=(function(){function t(e,n,r,i,o,s,a,c,l,u){a===void 0&&(a=[]),this.attributes={},this.links=[],this.events=[],this.Eo=0,this.br=0,this.Xs=0,this.status={code:qo.UNSET},this.endTime=[0,0],this.Yr=!1,this.ai=[-1,-1],this.name=r,this.cr=i,this.parentSpanId=s,this.kind=o,this.links=a;var h=Date.now();this.Ro=me.now(),this.Ws=h-(this.Ro+su()),this.Ms=c!=null,this.startTime=this.xi(c!=null?c:h),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this.vr=e.getSpanLimits(),this.Ps=this.vr.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this.Co=e.getActiveSpanProcessor(),this.Co.onStart(this,n)}return t.prototype.spanContext=function(){return this.cr},t.prototype.setAttribute=function(e,n){return n==null||this.Kr()?this:e.length===0?(M.warn("Invalid attribute key: "+e),this):Cy(n)?Object.keys(this.attributes).length>=this.vr.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.Eo++,this):(this.attributes[e]=this.Us(n),this):(M.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=tx(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Nf(o.value,2),a=s[0],c=s[1];this.setAttribute(a,c)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,r){if(this.Kr())return this;if(this.vr.eventCountLimit===0)return M.warn("No events allowed."),this.br++,this;this.events.length>=this.vr.eventCountLimit&&(this.br===0&&M.debug("Dropping extra events."),this.events.shift(),this.br++),Tf(n)&&(Tf(r)||(r=n),n=void 0);var i=Uo(n);return this.events.push({name:e,attributes:i,time:this.xi(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,ex([],Nf(e),!1)),this},t.prototype.setStatus=function(e){return this.Kr()?this:(this.status=Cc({},e),this.status.message!=null&&typeof e.message!="string"&&(M.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this.Kr()?this:(this.name=e,this)},t.prototype.end=function(e){if(this.Kr()){M.error(this.name+" "+this.cr.traceId+"-"+this.cr.spanId+" - You can only call end() on a span once.");return}this.Yr=!0,this.endTime=this.xi(e),this.ai=$Z(this.startTime,this.endTime),this.ai[0]<0&&(M.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this.ai=[0,0]),this.br>0&&M.warn("Dropped "+this.br+" events because eventCountLimit reached"),this.Co.onEnd(this)},t.prototype.xi=function(e){if(typeof e=="number"&&e<=me.now())return Nn(e+this.Ws);if(typeof e=="number")return de(e);if(e instanceof Date)return de(e.getTime());if(au(e))return e;if(this.Ms)return de(Date.now());var n=me.now()-this.Ro;return Vy(this.startTime,de(n))},t.prototype.isRecording=function(){return this.Yr===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[Jl]=e:e&&(e.code?r[Dl]=e.code.toString():e.name&&(r[Dl]=e.name),e.message&&(r[Jl]=e.message),e.stack&&(r[$1]=e.stack)),r[Dl]||r[Jl]?this.addEvent(q1,r,n):M.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this.ai},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this.Yr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.Eo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this.br},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this.Xs},enumerable:!1,configurable:!0}),t.prototype.Kr=function(){return this.Yr&&M.warn("Can not execute the operation on ended Span {traceId: "+this.cr.traceId+", spanId: "+this.cr.spanId+"}"),this.Yr},t.prototype.ko=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype.Us=function(e){var n=this,r=this.Ps;return r<=0?(M.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this.ko(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n.ko(i,r):i}):e},t})(),dr;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(dr||(dr={}));var ns=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dr.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})(),ur=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dr.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})(),Yl=(function(){function t(e){var n,r,i,o;this.Zn=e.root,this.Zn||(ln(new Error("ParentBasedSampler must have a root sampler configured")),this.Zn=new ur),this.Zo=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new ur,this.xo=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new ns,this.Vo=(i=e.localParentSampled)!==null&&i!==void 0?i:new ur,this.Oo=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new ns}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=pt.getSpanContext(e);return!a||!bs(a)?this.Zn.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&_e.SAMPLED?this.Zo.shouldSample(e,n,r,i,o,s):this.xo.shouldSample(e,n,r,i,o,s):a.traceFlags&_e.SAMPLED?this.Vo.shouldSample(e,n,r,i,o,s):this.Oo.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this.Zn.toString()+", remoteParentSampled="+this.Zo.toString()+", remoteParentNotSampled="+this.xo.toString()+", localParentSampled="+this.Vo.toString()+", localParentNotSampled="+this.Oo.toString()+"}"},t})(),Gf=(function(){function t(e){e===void 0&&(e=0),this.Vi=e,this.Vi=this.Fs(e),this.As=Math.floor(this.Vi*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:vy(n)&&this.Ds(n)<this.As?dr.RECORD_AND_SAMPLED:dr.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this.Vi+"}"},t.prototype.Fs=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype.Ds=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t})(),rx=Ne.AlwaysOn,or=1;function zy(){var t=pr();return{sampler:By(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function By(t){switch(t===void 0&&(t=pr()),t.OTEL_TRACES_SAMPLER){case Ne.AlwaysOn:return new ur;case Ne.AlwaysOff:return new ns;case Ne.ParentBasedAlwaysOn:return new Yl({root:new ur});case Ne.ParentBasedAlwaysOff:return new Yl({root:new ns});case Ne.TraceIdRatio:return new Gf(Lf(t));case Ne.ParentBasedTraceIdRatio:return new Yl({root:new Gf(Lf(t))});default:return M.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+rx+'".'),new ur}}function Lf(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return M.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+or+"."),or;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(M.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+or+"."),or):e<0||e>1?(M.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+or+"."),or):e}function ix(t){var e={sampler:By()},n=zy(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function ox(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=MZ();return f.attributeCountLimit=(s=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:Ao,f.attributeValueLengthLimit=(p=(h=(u=(c=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&c!==void 0?c:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:Fo,Object.assign({},t,{spanLimits:f})}var sx=(function(){function t(e,n){this.wr=e,this.li=!1,this.Gn=[],this._r=0;var r=pr();this.Sr=typeof(n==null?void 0:n.maxExportBatchSize)=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this.Oi=typeof(n==null?void 0:n.maxQueueSize)=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this.Js=typeof(n==null?void 0:n.scheduledDelayMillis)=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this.Ys=typeof(n==null?void 0:n.exportTimeoutMillis)=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this.ci=new G1(this._e,this),this.Sr>this.Oi&&(M.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.Sr=this.Oi)}return t.prototype.forceFlush=function(){return this.ci.isCalled?this.ci.promise:this.No()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this.ci.isCalled||e.spanContext().traceFlags&_e.SAMPLED&&this.Ks(e)},t.prototype.shutdown=function(){return this.ci.call()},t.prototype._e=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e.No()}).then(function(){return e.wr.shutdown()})},t.prototype.Ks=function(e){if(this.Gn.length>=this.Oi){this._r===0&&M.debug("maxQueueSize reached, dropping spans"),this._r++;return}this._r>0&&(M.warn("Dropped "+this._r+" spans because maxQueueSize reached"),this._r=0),this.Gn.push(e),this.Go()},t.prototype.No=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e.Gn.length/e.Sr),s=0,a=o;s<a;s++)i.push(e.Lo());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype.Lo=function(){var e=this;return this.Xo(),this.Gn.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e.Ys);st.with(Ty(st.active()),function(){var o;e.Gn.length<=e.Sr?(o=e.Gn,e.Gn=[]):o=e.Gn.splice(0,e.Sr);for(var s=function(){return e.wr.export(o,function(h){var p;clearTimeout(i),h.code===Gt.SUCCESS?n():r((p=h.error)!==null&&p!==void 0?p:new Error("BatchSpanProcessor: span export failed"))})},a=null,c=0,l=o.length;c<l;c++){var u=o[c];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(a!=null||(a=[]),a.push(u.resource.waitForAsyncAttributes()))}a===null?s():Promise.all(a).then(s,function(h){ln(h),r(h)})})})},t.prototype.Go=function(){var e=this;if(!this.li){var n=function(){e.li=!0,e.Lo().finally(function(){e.li=!1,e.Gn.length>0&&(e.Xo(),e.Go())}).catch(function(r){e.li=!1,ln(r)})};if(this.Gn.length>=this.Sr)return n();this.ui===void 0&&(this.ui=setTimeout(function(){return n()},this.Js))}},t.prototype.Xo=function(){this.ui!==void 0&&(clearTimeout(this.ui),this.ui=void 0)},t})(),ax=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),jy=(function(t){ax(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.onInit(r),i}return e.prototype.onInit=function(n){var r=this;(n==null?void 0:n.disableAutoFlushOnDocumentHide)!==!0&&typeof document<"u"&&(this.Ni=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){ln(i)})},this.Gi=function(){r.forceFlush().catch(function(i){ln(i)})},document.addEventListener("visibilitychange",this.Ni),document.addEventListener("pagehide",this.Gi))},e.prototype.onShutdown=function(){typeof document<"u"&&(this.Ni&&document.removeEventListener("visibilitychange",this.Ni),this.Gi&&document.removeEventListener("pagehide",this.Gi))},e})(sx),lx=8,cx=16,ux=(function(){function t(){this.generateTraceId=Xf(cx),this.generateSpanId=Xf(lx)}return t})(),To=Array(32);function Xf(t){return function(){for(var e=0;e<t*2;e++)To[e]=Math.floor(Math.random()*16)+48,To[e]>=58&&(To[e]+=39);return String.fromCharCode.apply(null,To.slice(0,t*2))}}var hx=(function(){function t(e,n,r){this._s=r;var i=ix(n);this.Hs=i.sampler,this.zs=i.generalLimits,this.vr=i.spanLimits,this.Wo=n.idGenerator||new ux,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,s;n===void 0&&(n={}),r===void 0&&(r=st.active()),n.root&&(r=pt.deleteSpan(r));var a=pt.getSpan(r);if(iu(r)){M.debug("Instrumentation suppressed, returning Noop Span");var c=pt.wrapSpanContext(gy);return c}var l=a==null?void 0:a.spanContext(),u=this.Wo.generateSpanId(),h,p,f;!l||!pt.isSpanContextValid(l)?h=this.Wo.generateTraceId():(h=l.traceId,p=l.traceState,f=l.spanId);var m=(i=n.kind)!==null&&i!==void 0?i:hi.INTERNAL,d=((o=n.links)!==null&&o!==void 0?o:[]).map(function(T){return{context:T.context,attributes:Uo(T.attributes)}}),g=Uo(n.attributes),b=this.Hs.shouldSample(r,h,e,m,g,d);p=(s=b.traceState)!==null&&s!==void 0?s:p;var w=b.decision===$o.RECORD_AND_SAMPLED?_e.SAMPLED:_e.NONE,E={traceId:h,spanId:u,traceFlags:w,traceState:p};if(b.decision===$o.NOT_RECORD){M.debug("Recording is off, propagating context in a non-recording span");var c=pt.wrapSpanContext(E);return c}var I=Uo(Object.assign(g,b.attributes)),S=new nx(this,r,e,E,m,f,d,n.startTime,void 0,I);return S},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:st.active(),l=this.startSpan(e,o,c),u=pt.setSpan(c,l);return st.with(u,a,void 0,l)}},t.prototype.getGeneralLimits=function(){return this.zs},t.prototype.getSpanLimits=function(){return this.vr},t.prototype.getActiveSpanProcessor=function(){return this._s.getActiveSpanProcessor()},t})(),px="service.name",dx="telemetry.sdk.name",fx="telemetry.sdk.language",mx="telemetry.sdk.version",yx=px,Wf=dx,Mf=fx,Pf=mx;function gx(){return"unknown_service"}var on=function(){return on=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},on.apply(this,arguments)},bx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},vx=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},wx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},pi=(function(){function t(e,n){var r=this,i;this.hi=e,this.asyncAttributesPending=n!=null,this.pi=(i=this.hi)!==null&&i!==void 0?i:{},this.Hr=n==null?void 0:n.then(function(o){return r.hi=Object.assign({},r.hi,o),r.asyncAttributesPending=!1,o},function(o){return M.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[yx]=gx(),e[Mf]=Ul[Mf],e[Wf]=Ul[Wf],e[Pf]=Ul[Pf],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&M.error("Accessing resource attributes before async attributes settled"),(e=this.hi)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return bx(this,void 0,void 0,function(){return vx(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this.Hr]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=on(on({},this.pi),(r=e.pi)!==null&&r!==void 0?r:e.attributes);if(!this.Hr&&!e.Hr)return new t(i);var o=Promise.all([this.Hr,e.Hr]).then(function(s){var a,c=wx(s,2),l=c[0],u=c[1];return on(on(on(on({},n.pi),l),(a=e.pi)!==null&&a!==void 0?a:e.attributes),u)});return new t(i,o)},t.EMPTY=new t({}),t})(),Eo=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uf=(function(){function t(e){this.di=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=Eo(this.di),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.forceFlush())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a){Promise.all(r).then(function(){a()}).catch(function(c){ln(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=Eo(this.di),s=o.next();!s.done;s=o.next()){var a=s.value;a.onStart(e,n)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=Eo(this.di),o=i.next();!o.done;o=i.next()){var s=o.value;s.onEnd(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=Eo(this.di),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.shutdown())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a,c){Promise.all(r).then(function(){a()},c)})},t})(),Sx=(function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t})(),Ix=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Tx=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Cn;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Cn||(Cn={}));var Ex=(function(){function t(e){e===void 0&&(e={});var n,r;this.Ir=[],this.Li=new Map;var i=My({},zy(),ox(e));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:pi.empty(),i.mergeResourceWithDefaults&&(this.resource=pi.default().merge(this.resource)),this.se=Object.assign({},i,{resource:this.resource}),!((r=e.spanProcessors)===null||r===void 0)&&r.length)this.Ir=Tx([],Ix(e.spanProcessors),!1),this.activeSpanProcessor=new Uf(this.Ir);else{var o=this.Bs();if(o!==void 0){var s=new jy(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new Sx}}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+((r==null?void 0:r.schemaUrl)||"");return this.Li.has(i)||this.Li.set(i,new hx({name:e,version:n,schemaUrl:r==null?void 0:r.schemaUrl},this.se,this)),this.Li.get(i)},t.prototype.addSpanProcessor=function(e){this.Ir.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return M.error("Error while trying to shutdown current span processor",n)}),this.Ir.push(e),this.activeSpanProcessor=new Uf(this.Ir)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),pt.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this.js()),e.contextManager&&st.setGlobalContextManager(e.contextManager),e.propagator&&pe.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this.se.forceFlushTimeoutMillis,n=this.Ir.map(function(r){return new Promise(function(i){var o,s=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=Cn.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==Cn.timeout&&(o=Cn.resolved,i(o))}).catch(function(a){clearTimeout(s),o=Cn.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==Cn.resolved});s.length>0?i(s):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype.Qs=function(e){var n;return(n=this.constructor.$s.get(e))===null||n===void 0?void 0:n()},t.prototype.qs=function(e){var n;return(n=this.constructor.ta.get(e))===null||n===void 0?void 0:n()},t.prototype.js=function(){var e=this,n=Array.from(new Set(pr().OTEL_PROPAGATORS)),r=n.map(function(o){var s=e.Qs(o);return s||M.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),s}),i=r.reduce(function(o,s){return s&&o.push(s),o},[]);if(i.length!==0)return n.length===1?i[0]:new Oy({propagators:i})},t.prototype.Bs=function(){var e=pr().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this.qs(e);return n||M.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t.$s=new Map([["tracecontext",function(){return new Ny}],["baggage",function(){return new Ey}]]),t.ta=new Map,t})(),Rx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Cx=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Qy=(function(){function t(){this.Xi=!1,this.Xe=En}return t.prototype.ea=function(e,n){e===void 0&&(e=En);var r=this,i=function(){for(var o=this,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return r.with(e,function(){return n.apply(o,s)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},t.prototype.active=function(){return this.Xe},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this.ea(e,n):n},t.prototype.disable=function(){return this.Xe=En,this.Xi=!1,this},t.prototype.enable=function(){return this.Xi?this:(this.Xi=!0,this.Xe=En,this)},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=this.Xe;this.Xe=e||En;try{return n.call.apply(n,Cx([r],Rx(i),!1))}finally{this.Xe=s}},t})(),kx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Zx=(function(t){kx(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return e.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new Qy),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e})(Ex),J;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(J||(J={}));var xx="http.response_content_length",Vx="http.response_content_length_uncompressed",Ox=xx,Nx=Vx,Kl;function Gx(){return Kl||(Kl=document.createElement("a")),Kl}function cn(t,e){return e in t}function Vt(t,e,n,r){var i=void 0,o=void 0;cn(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(cn(n,s)&&typeof n[s]=="number"&&(o=n[s]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function fr(t,e,n){n===void 0&&(n=!1),n||(Vt(t,J.FETCH_START,e),Vt(t,J.DOMAIN_LOOKUP_START,e),Vt(t,J.DOMAIN_LOOKUP_END,e),Vt(t,J.CONNECT_START,e),cn(e,"name")&&e.name.startsWith("https:")&&Vt(t,J.SECURE_CONNECTION_START,e),Vt(t,J.CONNECT_END,e),Vt(t,J.REQUEST_START,e),Vt(t,J.RESPONSE_START,e),Vt(t,J.RESPONSE_END,e));var r=e[J.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(Ox,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(Nx,i)}function Lx(t){return t.slice().sort(function(e,n){var r=e[J.FETCH_START],i=n[J.FETCH_START];return r>i?1:r<i?-1:0})}function $y(){return typeof location<"u"?location.origin:void 0}function qy(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=De(t);t=s.toString();var a=Wx(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=Lx(a);if(s.origin!==$y()&&c.length>1){var l=c[0],u=Xx(c,l[J.RESPONSE_END],n),h=l[J.RESPONSE_END],p=u[J.FETCH_START];return p<h&&(u=l,l=void 0),{corsPreFlightRequest:l,mainRequest:u}}else return{mainRequest:a[0]}}function Xx(t,e,n){for(var r=Ye(n),i=Ye(ii(e)),o=t[1],s,a=t.length,c=1;c<a;c++){var l=t[c],u=Ye(ii(l[J.FETCH_START])),h=Ye(ii(l[J.RESPONSE_END])),p=r-h;u>=i&&(!s||p<s)&&(s=p,o=l)}return o}function Wx(t,e,n,r,i,o){var s=Ye(e),a=Ye(n),c=r.filter(function(l){var u=Ye(ii(l[J.FETCH_START])),h=Ye(ii(l[J.RESPONSE_END]));return l.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&l.name===t&&u>=s&&h<=a});return c.length>0&&(c=c.filter(function(l){return!i.has(l)})),c}function De(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=Gx();return e.href=t,e}function tg(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=Px(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=tg(t.parentNode,!1)),r+=n,r}function Mx(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return e.indexOf(r.nodeType)>=0&&i===t.localName}),n.length>=1?n.indexOf(t)+1:0}function Px(t,e){var n=t.nodeType,r=Mx(t),i="";if(n===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function eg(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=De(t);return r.origin===$y()?!0:n.some(function(i){return Fy(t,i)})}var oi;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(oi||(oi={}));var Ux="0.44.0",Fx="@opentelemetry/instrumentation-document-load",Ax="http.url",Dx="http.user_agent",_l=Ax,Jx=Dx,Yx="deployment.environment",Kx=Yx,_x="service.name",Hx="telemetry.sdk.name",zx="telemetry.sdk.version",Bx="url.full",jx="url.path",Qx="url.query",rs;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(rs||(rs={}));var $x=function(){var t,e,n={},r=(e=(t=me).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(r){var i=Object.values(J);i.forEach(function(a){if(cn(r,a)){var c=r[a];typeof c=="number"&&(n[a]=c)}})}else{var o=me,s=o.timing;if(s){var i=Object.values(J);i.forEach(function(c){if(cn(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},Ff={"first-paint":rs.FIRST_PAINT,"first-contentful-paint":rs.FIRST_CONTENTFUL_PAINT},qx=function(t){var e,n,r=(n=(e=me).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,s=i.startTime;cn(Ff,o)&&t.addEvent(Ff[o],s)})},tV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),eV=(function(t){tV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,Fx,Ux,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype.Tr=function(){var n=this;window.setTimeout(function(){n.na()})},e.prototype.ra=function(n){var r=this,i,o,s=(o=(i=me).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");s&&s.forEach(function(a){r.ia(a,n)})},e.prototype.na=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(s){return s.getAttribute("name")===Do}),i=$x(),o=r&&r.content||"";st.with(pe.extract(En,{traceparent:o}),function(){var s,a=n.Wi(oi.DOCUMENT_LOAD,J.FETCH_START,i);a&&(st.with(pt.setSpan(st.active(),a),function(){var c=n.Wi(oi.DOCUMENT_FETCH,J.FETCH_START,i);c&&(c.setAttribute(_l,location.href),st.with(pt.setSpan(st.active(),c),function(){var l;n.getConfig().ignoreNetworkEvents||fr(c,i),n.Mo(c,(l=n.getConfig().applyCustomAttributesOnSpan)===null||l===void 0?void 0:l.documentFetch),n.hr(c,J.RESPONSE_END,i)}))}),a.setAttribute(_l,location.href),a.setAttribute(Jx,navigator.userAgent),n.ra(a),n.getConfig().ignoreNetworkEvents||(Vt(a,J.FETCH_START,i),Vt(a,J.UNLOAD_EVENT_START,i),Vt(a,J.UNLOAD_EVENT_END,i),Vt(a,J.DOM_INTERACTIVE,i),Vt(a,J.DOM_CONTENT_LOADED_EVENT_START,i),Vt(a,J.DOM_CONTENT_LOADED_EVENT_END,i),Vt(a,J.DOM_COMPLETE,i),Vt(a,J.LOAD_EVENT_START,i),Vt(a,J.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||qx(a),n.Mo(a,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentLoad),n.hr(a,J.LOAD_EVENT_END,i))})},e.prototype.hr=function(n,r,i){n&&(cn(i,r)?n.end(i[r]):n.end())},e.prototype.ia=function(n,r){var i,o=this.Wi(oi.RESOURCE_FETCH,J.FETCH_START,n,r);o&&(o.setAttribute(_l,n.name),this.getConfig().ignoreNetworkEvents||fr(o,n),this.oa(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this.hr(o,J.RESPONSE_END,n))},e.prototype.Wi=function(n,r,i,o){if(cn(i,r)&&typeof i[r]=="number"){var s=this.tracer.startSpan(n,{startTime:i[r]},o?pt.setSpan(st.active(),o):void 0);return s}},e.prototype.sa=function(){window.document.readyState==="complete"?this.Tr():(this.Tr=this.Tr.bind(this),window.addEventListener("load",this.Tr))},e.prototype.Mo=function(n,r){var i=this;r&&Of(function(){return r(n)},function(o){o&&i.w.error("addCustomAttributesOnSpan",o)})},e.prototype.oa=function(n,r,i){var o=this;i&&Of(function(){return i(n,r)},function(s){s&&o.w.error("addCustomAttributesOnResourceSpan",s)})},e.prototype.enable=function(){window.removeEventListener("load",this.Tr),this.sa()},e.prototype.disable=function(){window.removeEventListener("load",this.Tr)},e})(Hy),ng=(function(){function t(){}return t.prototype.emit=function(e){},t})(),nV=new ng,rV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new ng},t})(),rg=new rV,iV=(function(){function t(e,n,r,i){this.ur=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.Jr().emit(e)},t.prototype.Jr=function(){if(this.b)return this.b;var e=this.ur.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):nV},t})(),Af=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new iV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:rg},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),oV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ro=Symbol.for("io.opentelemetry.js.api.logs"),jr=oV;function sV(t,e,n){return function(r){return r===t?e:n}}var Df=1,aV=(function(){function t(){this.Ke=new Af}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalLoggerProvider=function(e){return jr[Ro]?this.getLoggerProvider():(jr[Ro]=sV(Df,e,rg),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=jr[Ro])===null||e===void 0?void 0:e.call(jr,Df))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete jr[Ro],this.Ke=new Af},t})(),lV=aV.getInstance(),kc=function(){return kc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},kc.apply(this,arguments)},cV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.se={},this.re=fe.wrap,this.L=fe.unwrap,this.So=fe.massWrap,this.Io=fe.massUnwrap,this.setConfig(r),this.w=M.createComponentLogger({namespace:e}),this.tr=pt.getTracer(e,n),this.er=Je.getMeter(e,n),this.nr=lV.getLogger(e,n),this.rr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.er=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.rr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.nr},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.nr=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.rr=function(){},t.prototype.getConfig=function(){return this.se},t.prototype.setConfig=function(e){this.se=kc({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.tr=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.To=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.w.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),uV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),hV=(function(t){uV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.se.enabled&&o.enable(),o}return e})(cV);function pV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function dV(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var is;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(is||(is={}));var fV="http.method",mV="http.url",yV="http.host",gV="http.scheme",bV="http.status_code",vV="http.user_agent",wV="http.request_content_length_uncompressed",SV=fV,IV=mV,TV=yV,EV=gV,RV=bV,CV=vV,kV=wV,ZV=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},xV=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},VV=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},OV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ig=M.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function NV(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var n=t[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=GV(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(LV(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return Zc(a)}):Promise.resolve()}}function GV(t){if(!t.pipeThrough)return ig.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,s){return ZV(this,void 0,void 0,function(){var a;return xV(this,function(c){switch(c.label){case 0:return[4,o];case 1:return a=c.sent(),e+=a.byteLength,s.enqueue(o),[2]}})})},flush:function(){n(e)}});return{body:t.pipeThrough(i),length:r}}function LV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return WV(t);if(t instanceof URLSearchParams)return Zc(t.toString());if(typeof t=="string")return Zc(t);ig.warn("unknown body type")}var XV=new TextEncoder;function Zc(t){return XV.encode(t).byteLength}function WV(t){var e,n,r=0;try{for(var i=VV(t.entries()),o=i.next();!o.done;o=i.next()){var s=OV(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Jf="0.57.1",MV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),PV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},UV=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Hl,FV=300,Yf=typeof process=="object"&&((Hl=process.release)===null||Hl===void 0?void 0:Hl.name)==="node",AV=(function(t){MV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Jf,n)||this;return r.component="fetch",r.version=Jf,r.moduleName=r.component,r.Jn=new WeakSet,r.ir=0,r}return e.prototype.init=function(){},e.prototype.Mi=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]},pt.setSpan(st.active(),n));fr(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[J.RESPONSE_END])},e.prototype.Pi=function(n,r){var i=De(r.url);n.setAttribute(RV,r.status),r.statusText!=null&&n.setAttribute(is.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(TV,i.host),n.setAttribute(EV,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(CV,navigator.userAgent)},e.prototype.Ui=function(n,r){if(!eg(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};pe.inject(st.active(),i),Object.keys(i).length>0&&this.w.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)pe.inject(st.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Headers)pe.inject(st.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Map)pe.inject(st.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else{var i={};pe.inject(st.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype.Fi=function(){this.ir===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this.Jn=new WeakSet)},e.prototype.Er=function(n,r){var i;if(r===void 0&&(r={}),Ay(n,this.getConfig().ignoreUrls)){this.w.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),s="HTTP "+o;return this.tracer.startSpan(s,{kind:hi.CLIENT,attributes:(i={},i[is.COMPONENT]=this.moduleName,i[SV]=o,i[IV]=n,i)})},e.prototype.Ai=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var s=qy(r.spanUrl,r.startTime,i,o,this.Jn,"fetch");if(s.mainRequest){var a=s.mainRequest;this.zr(a);var c=s.corsPreFlightRequest;c&&(this.Mi(n,c),this.zr(c)),fr(n,a,this.getConfig().ignoreNetworkEvents)}},e.prototype.zr=function(n){this.Jn.add(n)},e.prototype.hr=function(n,r,i){var o=this,s=de(Date.now()),a=Nn();this.Pi(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o.Ai(n,r,a),o.ir--,o.Fi(),n.end(s)},FV)},e.prototype.aa=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=this,c=De(o[0]instanceof Request?o[0].url:String(o[0])).href,l=o[0]instanceof Request?o[0]:o[1]||{},u=i.Er(c,l);if(!u)return r.apply(this,o);var h=i.la(c);i.getConfig().measureRequestSize&&NV.apply(void 0,UV([],PV(o),!1)).then(function(g){g&&u.setAttribute(kV,g)}).catch(function(g){i.w.warn("getFetchBodyLength",g)});function p(g,b){i.Po(g,l,b),i.hr(g,h,{status:b.status||0,statusText:b.message,url:c})}function f(g,b){i.Po(g,l,b),b.status>=200&&b.status<400?i.hr(g,h,b):i.hr(g,h,{status:b.status,statusText:b.statusText,url:c})}function m(g,b,w){try{var E=w.clone(),I=w.clone(),S=E.body;if(S){var T=S.getReader(),x=function(){T.read().then(function(Z){var k=Z.done;k?f(g,I):x()},function(Z){p(g,Z)})};x()}else f(g,w)}finally{b(w)}}function d(g,b,w){try{p(g,w)}finally{b(w)}}return new Promise(function(g,b){return st.with(pt.setSpan(st.active(),u),function(){return i.Ui(l,c),i.ir++,r.apply(a,l instanceof Request?[l]:[c,l]).then(m.bind(a,u,g),d.bind(a,u,b))})})}}},e.prototype.Po=function(n,r,i){var o=this,s=this.getConfig().applyCustomAttributesOnSpan;s&&pV(function(){return s(n,r,i)},function(a){a&&o.w.error("applyCustomAttributesOnSpan",a)})},e.prototype.la=function(n){var r=Nn(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(s){var a=s.getEntries();a.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},e.prototype.enable=function(){if(Yf){this.w.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}dV(fetch)&&(this.L(ri,"fetch"),this.w.debug("removing previous patch for constructor")),this.re(ri,"fetch",this.aa())},e.prototype.disable=function(){Yf||(this.L(ri,"fetch"),this.Jn=new WeakSet)},e})(hV),og=(function(){function t(){}return t.prototype.emit=function(e){},t})(),DV=new og,JV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new og},t})(),sg=new JV,YV=(function(){function t(e,n,r,i){this.ur=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.Jr().emit(e)},t.prototype.Jr=function(){if(this.b)return this.b;var e=this.ur.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):DV},t})(),Kf=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new YV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:sg},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),KV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Co=Symbol.for("io.opentelemetry.js.api.logs"),Qr=KV;function _V(t,e,n){return function(r){return r===t?e:n}}var _f=1,HV=(function(){function t(){this.Ke=new Kf}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalLoggerProvider=function(e){return Qr[Co]?this.getLoggerProvider():(Qr[Co]=_V(_f,e,sg),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Qr[Co])===null||e===void 0?void 0:e.call(Qr,_f))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Qr[Co],this.Ke=new Kf},t})(),zV=HV.getInstance(),xc=function(){return xc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xc.apply(this,arguments)},BV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.se={},this.re=fe.wrap,this.L=fe.unwrap,this.So=fe.massWrap,this.Io=fe.massUnwrap,this.setConfig(r),this.w=M.createComponentLogger({namespace:e}),this.tr=pt.getTracer(e,n),this.er=Je.getMeter(e,n),this.nr=zV.getLogger(e,n),this.rr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.er=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.rr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.nr},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.nr=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.rr=function(){},t.prototype.getConfig=function(){return this.se},t.prototype.setConfig=function(e){this.se=xc({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.tr=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.To=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.w.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),jV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),QV=(function(t){jV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.se.enabled&&o.enable(),o}return e})(BV);function $V(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Hf(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var qV="http.method",tO="http.url",eO="http.host",nO="http.scheme",rO="http.status_code",iO="http.user_agent",oO="http.request_content_length_uncompressed",sO=qV,aO=tO,lO=eO,cO=nO,uO=rO,hO=iO,pO=oO,Ae;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(Ae||(Ae={}));var dO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},fO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},mO=M.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function yO(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return bO(t);if(t instanceof URLSearchParams)return zf(t.toString());if(typeof t=="string")return zf(t);mO.warn("unknown body type")}var gO=new TextEncoder;function zf(t){return gO.encode(t).byteLength}function bO(t){var e,n,r=0;try{for(var i=dO(t.entries()),o=i.next();!o.done;o=i.next()){var s=fO(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Bf="0.57.1",Vc;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Vc||(Vc={}));var vO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),wO=300,SO=(function(t){vO(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Bf,n)||this;return r.component="xml-http-request",r.version=Bf,r.moduleName=r.component,r.ir=0,r.Xn=new WeakMap,r.Jn=new WeakSet,r}return e.prototype.init=function(){},e.prototype.Ui=function(n,r){var i=De(r).href;if(!eg(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};pe.inject(st.active(),o),Object.keys(o).length>0&&this.w.debug("headers inject skipped due to CORS policy");return}var s={};pe.inject(st.active(),s),Object.keys(s).forEach(function(a){n.setRequestHeader(a,String(s[a]))})},e.prototype.Mi=function(n,r){var i=this;st.with(pt.setSpan(st.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]});fr(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[J.RESPONSE_END])})},e.prototype.Pi=function(n,r,i){if(typeof i=="string"){var o=De(i);r.status!==void 0&&n.setAttribute(uO,r.status),r.statusText!==void 0&&n.setAttribute(Vc.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(lO,o.host),n.setAttribute(cO,o.protocol.replace(":","")),n.setAttribute(hO,navigator.userAgent)}},e.prototype.ca=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&$V(function(){return o(n,r)},function(s){s&&i.w.error("applyCustomAttributesOnSpan",s)})},e.prototype.ua=function(n,r){var i=this.Xn.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var s=o.getEntries(),a=De(r);s.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===a.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype.Fi=function(){this.ir===0&&this.getConfig().clearTimingResources&&(me.clearResourceTimings(),this.Xn=new WeakMap,this.Jn=new WeakSet)},e.prototype.Ai=function(n,r,i,o,s){if(!(!i||!o||!s||!n.createdResources)){var a=n.createdResources.entries;(!a||!a.length)&&(a=me.getEntriesByType("resource"));var c=qy(De(i).href,o,s,a,this.Jn);if(c.mainRequest){var l=c.mainRequest;this.zr(l);var u=c.corsPreFlightRequest;u&&(this.Mi(r,u),this.zr(u)),fr(r,l,this.getConfig().ignoreNetworkEvents)}}},e.prototype.ha=function(n){var r=this.Xn.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this.Xn.delete(n)}},e.prototype.Er=function(n,r,i){var o;if(Ay(r,this.getConfig().ignoreUrls)){this.w.debug("ignoring span as url matches ignored url");return}var s=i.toUpperCase(),a=this.tracer.startSpan(s,{kind:hi.CLIENT,attributes:(o={},o[sO]=i,o[aO]=De(r).toString(),o)});return a.addEvent(Ae.METHOD_OPEN),this.ha(n),this.Xn.set(n,{span:a,spanUrl:r}),a},e.prototype.zr=function(n){this.Jn.add(n)},e.prototype.pa=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=o[0],c=o[1];return i.Er(this,c,a),r.apply(this,o)}}},e.prototype.da=function(){var n=this;function r(u,h,p,f){var m=h.callbackToRemoveEvents;typeof m=="function"&&m();var d=h.span,g=h.spanUrl,b=h.sendStartTime;d&&(n.Ai(h,d,g,b,p),d.addEvent(u,f),n.Pi(d,h,g),d.end(f),n.ir--),n.Fi()}function i(u,h){var p=n.Xn.get(h);if(p){p.status=h.status,p.statusText=h.statusText,n.Xn.delete(h),p.span&&n.ca(p.span,h);var f=Nn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},wO)}}function o(){i(Ae.EVENT_ERROR,this)}function s(){i(Ae.EVENT_ABORT,this)}function a(){i(Ae.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Ae.EVENT_LOAD,this):i(Ae.EVENT_ERROR,this)}function l(u){u.removeEventListener("abort",s),u.removeEventListener("error",o),u.removeEventListener("load",c),u.removeEventListener("timeout",a);var h=n.Xn.get(u);h&&(h.callbackToRemoveEvents=void 0)}return function(u){return function(){for(var h=this,p=[],f=0;f<arguments.length;f++)p[f]=arguments[f];var m=n.Xn.get(this);if(!m)return u.apply(this,p);var d=m.span,g=m.spanUrl;if(d&&g){if(n.getConfig().measureRequestSize&&p!=null&&p[0]){var b=p[0],w=yO(b);w!==void 0&&d.setAttribute(pO,w)}st.with(pt.setSpan(st.active(),d),function(){n.ir++,m.sendStartTime=Nn(),d.addEvent(Ae.METHOD_SEND),h.addEventListener("abort",s),h.addEventListener("error",o),h.addEventListener("load",c),h.addEventListener("timeout",a),m.callbackToRemoveEvents=function(){l(h),m.createdResources&&m.createdResources.observer.disconnect()},n.Ui(h,g),n.ua(h,g)})}return u.apply(this,p)}}},e.prototype.enable=function(){this.w.debug("applying patch to",this.moduleName,this.version),Hf(XMLHttpRequest.prototype.open)&&(this.L(XMLHttpRequest.prototype,"open"),this.w.debug("removing previous patch from method open")),Hf(XMLHttpRequest.prototype.send)&&(this.L(XMLHttpRequest.prototype,"send"),this.w.debug("removing previous patch from method send")),this.re(XMLHttpRequest.prototype,"open",this.pa()),this.re(XMLHttpRequest.prototype,"send",this.da())},e.prototype.disable=function(){this.w.debug("removing patch from",this.moduleName,this.version),this.L(XMLHttpRequest.prototype,"open"),this.L(XMLHttpRequest.prototype,"send"),this.ir=0,this.Xn=new WeakMap,this.Jn=new WeakSet},e})(QV),IO=(t,e,n)=>{var r,i;let o=bt({},e);return n?((r=Object.keys(o))==null||r.forEach(s=>{[...n].includes(s==null?void 0:s.toLowerCase())||(o[s]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(s=>{[...TO,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},TO=["authorization","cookie","proxy-authorization","token"],EO=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],RO=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),CO=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function kO(t){return!!(t.includes("/sdk/evalx")&&t.match(RO)||t.includes("/eval/")&&t.match(CO))}var ZO=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),xO=t=>kO(t),VO=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),OO=(t,e,n)=>!VO(t,e)&&!xO(t)&&!ZO(t),NO=(t,e,n)=>{var r;if(n.some(s=>t.toLowerCase().includes(s)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(r=window==null?void 0:window.location)!=null&&r.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(s=>{t.match(s)&&(o=!0)}),o},jf=64*1024,GO={"application/json":64*1024*1024,"text/plain":64*1024*1024},ag=(t,e,n,r)=>{var i,o,s;let a=jf;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch(l){}a=(s=GO[c])!=null?s:jf}if(t){if(e)try{let c=JSON.parse(t);Array.isArray(c)?c.forEach(l=>{Object.keys(l).forEach(u=>{e.includes(u.toLocaleLowerCase())&&(l[u]="[REDACTED]")})}):Object.keys(c).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}if(n)try{let c=JSON.parse(t);Object.keys(c).forEach(l=>{n.includes(l.toLocaleLowerCase())||(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}}try{t=t.slice(0,a)}catch(c){}return t},LO=(t,e,n)=>fs(void 0,null,function*(){let r;try{let i=t.clone().body;if(i){let o=i.getReader(),s=new TextDecoder,a,c="";for(;!(a=yield o.read()).done;){let l=a.value;c+=s.decode(l)}r=c,r=ag(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),lg=(function(){function t(e){this.b=e}return t.prototype.export=function(e,n){this.b.export(e,n)},t.prototype.forceFlush=function(){return this.b.forceFlush()},t.prototype.shutdown=function(){return this.b.shutdown()},t})(),XO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Qf=(function(t){XO(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return e})(Error);function WO(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function MO(t){if(t!=null)return function(){return t}}function PO(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:WO((i=(r=t.timeoutMillis)!==null&&r!==void 0?r:e.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(s=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&s!==void 0?s:n.concurrencyLimit,compression:(c=(a=t.compression)!==null&&a!==void 0?a:e.compression)!==null&&c!==void 0?c:n.compression}}function UO(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var FO=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},AO=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},DO=(function(){function t(e){this.Br=[],this.fa=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.Br.push(e);var r=function(){var i=n.Br.indexOf(e);n.Br.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this.Br.length>=this.fa},t.prototype.awaitAll=function(){return FO(this,void 0,void 0,function(){return AO(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.Br)];case 1:return e.sent(),[2]}})})},t})();function JO(t){return new DO(t.concurrencyLimit)}function YO(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function KO(){return{handleResponse:function(t){t==null||!YO(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||M.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var _O=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},HO=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},zO=(function(){function t(e,n,r,i,o){this.Rr=e,this.Uo=n,this.ma=r,this.Di=i,this.ya=o,this.Ji=M.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this.Ji.debug("items to be sent",e),this.Di.hasReachedLimit()){n({code:Gt.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this.Uo.serializeRequest(e);if(i==null){n({code:Gt.FAILED,error:new Error("Nothing to send")});return}this.Di.pushPromise(this.Rr.send(i,this.ya).then(function(o){if(o.status==="success"){if(o.data!=null)try{r.ma.handleResponse(r.Uo.deserializeResponse(o.data))}catch(s){r.Ji.warn("Export succeeded but could not deserialize response - is the response specification compliant?",s,o.data)}n({code:Gt.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:Gt.FAILED,error:o.error});return}else o.status==="retryable"?n({code:Gt.FAILED,error:new Qf("Export failed with retryable status")}):n({code:Gt.FAILED,error:new Qf("Export failed with unknown error")})},function(o){return n({code:Gt.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this.Di.awaitAll()},t.prototype.shutdown=function(){return _O(this,void 0,void 0,function(){return HO(this,function(e){switch(e.label){case 0:return this.Ji.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this.Rr.shutdown(),[2]}})})},t})();function BO(t,e){return new zO(t.transport,t.serializer,KO(),t.promiseHandler,e.timeout)}function cg(t,e,n){return BO({transport:n,serializer:e,promiseHandler:JO(t)},{timeout:t.timeoutMillis})}function ug(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function jO(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function hg(t){var e=ug(t);return jO(e)}function QO(t){var e=ug(t);return e.toString()}var $O=typeof BigInt<"u"?QO:Ye;function $f(t){return t}function pg(t){if(t!==void 0)return ou(t)}var qO={encodeHrTime:hg,encodeSpanContext:ou,encodeOptionalSpanContext:pg};function dg(t){var e,n;if(t===void 0)return qO;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?hg:$O,encodeSpanContext:i?$f:ou,encodeOptionalSpanContext:i?$f:pg}}var tN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function fg(t){return{attributes:Wn(t.attributes),droppedAttributesCount:0}}function mg(t){return{name:t.name,version:t.version}}function Wn(t){return Object.keys(t).map(function(e){return yg(e,t[e])})}function yg(t,e){return{key:t,value:gg(e)}}function gg(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(gg)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=tN(n,2),i=r[0],o=r[1];return yg(i,o)})}}:{}}var Se;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(Se||(Se={}));var Le;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(Le||(Le={}));var eN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),qf=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},tm=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},nN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},rN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},iN=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function oN(t){return t!=null}function bg(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function sN(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var vg=(function(t){eN(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e})(Error);function di(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new vg("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function aN(t){return qf(this,void 0,void 0,function(){var e=this;return tm(this,function(n){return[2,Promise.all(t.map(function(r){return qf(e,void 0,void 0,function(){var i,o;return tm(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,r];case 1:return i=s.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=s.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function lN(t){return t.status==="rejected"}function em(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,rN([],nN(e(r)),!1))}),n}function cN(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=iN(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!e.has(s))return!1}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function uN(t,e){for(var n=0,r=t.length-1,i=t.length;r>=n;){var o=n+Math.trunc((r-n)/2);t[o]<e?n=o+1:(i=o,r=o-1)}return i}function hN(t,e){return t.toLowerCase()===e.toLowerCase()}var Gn;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Gn||(Gn={}));var pN=(function(){function t(){this.kind=Gn.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,n){},t.prototype.diff=function(e,n){},t.prototype.toMetricData=function(e,n,r,i){},t})(),H;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(H||(H={}));function en(t,e,n){var r,i,o,s;return yN(t)||M.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(r=n==null?void 0:n.description)!==null&&r!==void 0?r:"",unit:(i=n==null?void 0:n.unit)!==null&&i!==void 0?i:"",valueType:(o=n==null?void 0:n.valueType)!==null&&o!==void 0?o:an.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function dN(t,e){var n,r;return{name:(n=t.name)!==null&&n!==void 0?n:e.name,description:(r=t.description)!==null&&r!==void 0?r:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function fN(t,e){return hN(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var mN=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function yN(t){return t.match(mN)!=null}var gN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function bN(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var zl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=bN(n)),this.startTime=e,this.jr=n,this.Et=r,this.ie=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this.ie.count+=1,this.ie.sum+=e,this.Et&&(this.ie.min=Math.min(e,this.ie.min),this.ie.max=Math.max(e,this.ie.max),this.ie.hasMinMax=!0);var n=uN(this.jr,e);this.ie.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ie},t})(),wg=(function(){function t(e,n){this.jr=e,this.Et=n,this.kind=Gn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new zl(e,this.jr,this.Et)},t.prototype.merge=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=o[c]+s[c];var l=1/0,u=-1/0;return this.Et&&(r.hasMinMax&&i.hasMinMax?(l=Math.min(r.min,i.min),u=Math.max(r.max,i.max)):r.hasMinMax?(l=r.min,u=r.max):i.hasMinMax&&(l=i.min,u=i.max)),new zl(e.startTime,r.buckets.boundaries,this.Et,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this.Et&&(r.hasMinMax||i.hasMinMax),min:l,max:u})},t.prototype.diff=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=s[c]-o[c];return new zl(n.startTime,r.buckets.boundaries,this.Et,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:Le.HISTOGRAM,dataPoints:r.map(function(o){var s=gN(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===H.GAUGE||e.type===H.UP_DOWN_COUNTER||e.type===H.OBSERVABLE_GAUGE||e.type===H.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,buckets:l.buckets,count:l.count}}})}},t})(),Bl=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},jl=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},nm=(function(){function t(e,n,r,i){e===void 0&&(e=new vN),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.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}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(n,r){return e.at(r)})},t.prototype.at=function(e){var n=this.indexBase-this.indexStart;return e<n&&(e+=this.backing.length),e-=n,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,n){this.backing.increment(e,n)},t.prototype.decrementBucket=function(e,n){this.backing.decrement(e,n)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this.Fo()},t.prototype.downscale=function(e){this.Fo();for(var n=1+this.indexEnd-this.indexStart,r=1<<e,i=0,o=0,s=this.indexStart;s<=this.indexEnd;){var a=s%r;a<0&&(a+=r);for(var c=a;c<r&&i<n;c++)this.ga(o,i),i++,s++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype.Fo=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype.ga=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t})(),vN=(function(){function t(e){e===void 0&&(e=[0]),this.wt=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.wt.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this.wt[e]},t.prototype.growTo=function(e,n,r){var i=new Array(e).fill(0);i.splice.apply(i,jl([r,this.wt.length-n],Bl(this.wt.slice(n)),!1)),i.splice.apply(i,jl([0,n],Bl(this.wt.slice(0,n)),!1)),this.wt=i},t.prototype.reverse=function(e,n){for(var r=Math.floor((e+n)/2)-e,i=0;i<r;i++){var o=this.wt[e+i];this.wt[e+i]=this.wt[n-i-1],this.wt[n-i-1]=o}},t.prototype.emptyBucket=function(e){var n=this.wt[e];return this.wt[e]=0,n},t.prototype.increment=function(e,n){this.wt[e]+=n},t.prototype.decrement=function(e,n){this.wt[e]>=n?this.wt[e]-=n:this.wt[e]=0},t.prototype.clone=function(){return new t(jl([],Bl(this.wt),!1))},t})(),wN=52,SN=2146435072,IN=1048575,Sg=1023,Ig=-1022,Tg=Sg,Oc=Math.pow(2,-1022);function Eg(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&SN)>>20;return r-Sg}function Rg(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&IN)*Math.pow(2,32);return i+r}function Nc(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function TN(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var EN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),fi=(function(t){EN(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),RN=(function(){function t(e){this.pr=-e}return t.prototype.mapToIndex=function(e){if(e<Oc)return this.Qr();var n=Eg(e),r=this.ba(Rg(e)-1,wN);return n+r>>this.pr},t.prototype.lowerBoundary=function(e){var n=this.Qr();if(e<n)throw new fi("underflow: "+e+" is < minimum lower boundary: "+n);var r=this.fi();if(e>r)throw new fi("overflow: "+e+" is > maximum lower boundary: "+r);return Nc(1,e<<this.pr)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.pr===0?0:-this.pr},enumerable:!1,configurable:!0}),t.prototype.Qr=function(){var e=Ig>>this.pr;return this.pr<2&&e--,e},t.prototype.fi=function(){return Tg>>this.pr},t.prototype.ba=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),CN=(function(){function t(e){this.Cr=e,this.Yi=Nc(Math.LOG2E,e),this.va=Nc(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Oc)return this.Qr()-1;if(Rg(e)===0){var n=Eg(e);return(n<<this.Cr)-1}var r=Math.floor(Math.log(e)*this.Yi),i=this.fi();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this.fi();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this.Cr))/this.Yi);throw new fi("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this.Qr();if(e<=r){if(e===r)return Oc;if(e===r-1)return Math.exp((e+(1<<this.Cr))/this.Yi)/2;throw new fi("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this.va)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Cr},enumerable:!1,configurable:!0}),t.prototype.Qr=function(){return Ig<<this.Cr},t.prototype.fi=function(){return(Tg+1<<this.Cr)-1},t})(),rm=-10,im=20,kN=Array.from({length:31},function(t,e){return e>10?new CN(e-10):new RN(e-10)});function om(t){if(t>im||t<rm)throw new fi("expected scale >= "+rm+" && <= "+im+", got: "+t);return kN[t+10]}var ZN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ko=(function(){function t(e,n){this.low=e,this.high=n}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t})(),xN=20,VN=160,Ql=2,ON=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=VN),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),s===void 0&&(s=0),a===void 0&&(a=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),l===void 0&&(l=new nm),u===void 0&&(u=new nm),h===void 0&&(h=om(xN)),this.startTime=e,this.Ze=n,this.Et=r,this.$r=i,this.dr=o,this.kr=s,this.fr=a,this.mr=c,this.Ki=l,this._i=u,this.Zr=h,this.Ze<Ql&&(M.warn("Exponential Histogram Max Size set to "+this.Ze+", changing to the minimum size of: "+Ql),this.Ze=Ql)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return{hasMinMax:this.Et,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(t.prototype,"sum",{get:function(){return this.$r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.fr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.mr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.dr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this.kr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.dr===this.kr?0:this.Zr.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this.Ki},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this._i},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,n){if(!Number.isNaN(e)){if(e>this.mr&&(this.mr=e),e<this.fr&&(this.fr=e),this.dr+=n,e===0){this.kr+=n;return}this.$r+=e*n,e>0?this.Ao(this.Ki,e,n):this.Ao(this._i,-e,n)}},t.prototype.merge=function(e){this.dr===0?(this.fr=e.min,this.mr=e.max):e.count!==0&&(e.min<this.min&&(this.fr=e.min),e.max>this.max&&(this.mr=e.max)),this.startTime=e.startTime,this.$r+=e.sum,this.dr+=e.count,this.kr+=e.zeroCount;var n=this.Do(e);this.Hi(this.scale-n),this.Jo(this.positive,e,e.positive,n),this.Jo(this.negative,e,e.negative,n)},t.prototype.diff=function(e){this.fr=1/0,this.mr=-1/0,this.$r-=e.sum,this.dr-=e.count,this.kr-=e.zeroCount;var n=this.Do(e);this.Hi(this.scale-n),this.Yo(this.positive,e,e.positive,n),this.Yo(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this.Ze,this.Et,this.$r,this.dr,this.kr,this.fr,this.mr,this.positive.clone(),this.negative.clone(),this.Zr)},t.prototype.Ao=function(e,n,r){var i=this.Zr.mapToIndex(n),o=!1,s=0,a=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this.Ze?(o=!0,a=i,s=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this.Ze&&(o=!0,a=e.indexStart,s=i),o){var c=this.zi(s,a);this.Hi(c),i=this.Zr.mapToIndex(n)}this.Ko(e,i,r)},t.prototype.Ko=function(e,n,r){if(r!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=n),n<e.indexStart){var i=e.indexEnd-n;i>=e.backing.length&&this._o(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this._o(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype._o=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,s=TN(n);s>this.Ze&&(s=this.Ze);var a=s-i;e.backing.growTo(s,o,a)},t.prototype.zi=function(e,n){for(var r=0;e-n>=this.Ze;)e>>=1,n>>=1,r++;return r},t.prototype.Hi=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var n=this.Zr.scale-e;this.Ki.downscale(e),this._i.downscale(e),this.Zr=om(n)}},t.prototype.Do=function(e){var n=Math.min(this.scale,e.scale),r=ko.combine(this.mi(this.positive,this.scale,n),this.mi(e.positive,e.scale,n)),i=ko.combine(this.mi(this.negative,this.scale,n),this.mi(e.negative,e.scale,n));return Math.min(n-this.zi(r.high,r.low),n-this.zi(i.high,i.low))},t.prototype.mi=function(e,n,r){if(e.length===0)return new ko(0,-1);var i=n-r;return new ko(e.indexStart>>i,e.indexEnd>>i)},t.prototype.Jo=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++)this.Ko(e,o+a>>s,r.at(a))},t.prototype.Yo=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++){var c=o+a>>s,l=c-e.indexBase;l<0&&(l+=e.backing.length),e.decrementBucket(l,r.at(a))}e.trim()},t})(),NN=(function(){function t(e,n){this.Ze=e,this.Et=n,this.kind=Gn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new ON(e,this.Ze,this.Et)},t.prototype.merge=function(e,n){var r=n.clone();return r.merge(e),r},t.prototype.diff=function(e,n){var r=n.clone();return r.diff(e),r},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:Le.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var s=ZN(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===H.GAUGE||e.type===H.UP_DOWN_COUNTER||e.type===H.OBSERVABLE_GAUGE||e.type===H.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,positive:{offset:l.positive.offset,bucketCounts:l.positive.bucketCounts},negative:{offset:l.negative.offset,bucketCounts:l.negative.bucketCounts},count:l.count,scale:l.scale,zeroCount:l.zeroCount}}})}},t})(),GN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},$l=(function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this.ie=n,this.sampleTime=r}return t.prototype.record=function(e){this.ie=e,this.sampleTime=de(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ie},t})(),LN=(function(){function t(){this.kind=Gn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new $l(e)},t.prototype.merge=function(e,n){var r=So(n.sampleTime)>=So(e.sampleTime)?n:e;return new $l(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=So(n.sampleTime)>=So(e.sampleTime)?n:e;return new $l(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:Le.GAUGE,dataPoints:r.map(function(o){var s=GN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),XN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},$r=(function(){function t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this.ie=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this.ie+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ie},t})(),sm=(function(){function t(e){this.monotonic=e,this.kind=Gn.SUM}return t.prototype.createAccumulation=function(e){return new $r(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new $r(n.startTime,this.monotonic,i,n.reset):new $r(e.startTime,this.monotonic,r+i)},t.prototype.diff=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new $r(n.startTime,this.monotonic,i,!0):new $r(n.startTime,this.monotonic,i-r)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:Le.SUM,dataPoints:r.map(function(o){var s=XN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),Mn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),He=(function(){function t(){}return t.Drop=function(){return Cg},t.Sum=function(){return kg},t.LastValue=function(){return Zg},t.Histogram=function(){return xg},t.ExponentialHistogram=function(){return JN},t.Default=function(){return YN},t})(),WN=(function(t){Mn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new pN,e})(He),MN=(function(t){Mn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case H.COUNTER:case H.OBSERVABLE_COUNTER:case H.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new sm(!0),e.NON_MONOTONIC_INSTANCE=new sm(!1),e})(He),PN=(function(t){Mn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new LN,e})(He),UN=(function(t){Mn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new wg([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(He),FN=(function(t){Mn(e,t);function e(n,r){r===void 0&&(r=!0);var i=t.call(this)||this;if(i.Et=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(a,c){return a-c});var o=n.lastIndexOf(-1/0),s=n.indexOf(1/0);return s===-1&&(s=void 0),i.jr=n.slice(o+1,s),i}return e.prototype.createAggregator=function(n){return new wg(this.jr,this.Et)},e})(He),AN=(function(t){Mn(e,t);function e(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=t.call(this)||this;return i.Ze=n,i.Et=r,i}return e.prototype.createAggregator=function(n){return new NN(this.Ze,this.Et)},e})(He),DN=(function(t){Mn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.ki=function(n){switch(n.type){case H.COUNTER:case H.UP_DOWN_COUNTER:case H.OBSERVABLE_COUNTER:case H.OBSERVABLE_UP_DOWN_COUNTER:return kg;case H.GAUGE:case H.OBSERVABLE_GAUGE:return Zg;case H.HISTOGRAM:return n.advice.explicitBucketBoundaries?new FN(n.advice.explicitBucketBoundaries):xg}return M.warn("Unable to recognize instrument type: "+n.type),Cg},e.prototype.createAggregator=function(n){return this.ki(n).createAggregator(n)},e})(He),Cg=new WN,kg=new MN,Zg=new PN,xg=new UN,JN=new AN,YN=new DN,KN=function(t){return He.Default()},_N=function(t){return Se.CUMULATIVE},ql=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},tc=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},am=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},HN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},zN=(function(){function t(e){var n,r,i;this._e=!1,this.Bi=(n=e==null?void 0:e.aggregationSelector)!==null&&n!==void 0?n:KN,this.ji=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:_N,this.wa=(i=e==null?void 0:e.metricProducers)!==null&&i!==void 0?i:[],this.Ho=e==null?void 0:e.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this.Qi)throw new Error("MetricReader can not be bound to a MeterProvider again.");this.Qi=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this.Bi(e)},t.prototype.selectAggregationTemporality=function(e){return this.ji(e)},t.prototype.selectCardinalityLimit=function(e){return this.Ho?this.Ho(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return ql(this,void 0,void 0,function(){var n,r,i,o,s,a;return tc(this,function(c){switch(c.label){case 0:if(this.Qi===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._e)throw new Error("MetricReader is shutdown");return[4,Promise.all(HN([this.Qi.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],am(this.wa.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=am.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(em(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(em(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return ql(this,void 0,void 0,function(){return tc(this,function(n){switch(n.label){case 0:return this._e?(M.error("Cannot call shutdown twice."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,di(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._e=!0,[2]}})})},t.prototype.forceFlush=function(e){return ql(this,void 0,void 0,function(){return tc(this,function(n){switch(n.label){case 0:return this._e?(M.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,di(this.onForceFlush(),e.timeoutMillis)];case 3:return n.sent(),[2]}})})},t})(),BN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Zo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},xo=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},jN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},QN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},$N=(function(t){BN(e,t);function e(n){var r,i,o,s,a=t.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a.Sa=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,a.$i=(s=n.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,a.wr=n.exporter,a}return e.prototype.zo=function(){return Zo(this,void 0,void 0,function(){var n;return xo(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,di(this.Ia(),this.$i)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof vg?(M.error("Export took longer than %s milliseconds and timed out.",this.$i),[2]):(ln(n),[3,3]);case 3:return[2]}})})},e.prototype.Ia=function(){var n,r;return Zo(this,void 0,void 0,function(){var i,o,s,a,c,l;return xo(this,function(u){switch(u.label){case 0:return[4,this.collect({timeoutMillis:this.$i})];case 1:if(i=u.sent(),o=i.resourceMetrics,s=i.errors,s.length>0&&(l=M).error.apply(l,QN(["PeriodicExportingMetricReader: metrics collection errors"],jN(s),!1)),!o.resource.asyncAttributesPending)return[3,5];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return u.sent(),[3,5];case 4:return a=u.sent(),M.debug("Error while resolving async portion of resource: ",a),ln(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,X1.Ls(this.wr,o)];case 6:if(c=u.sent(),c.code!==Gt.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this.Bo=setInterval(function(){n.zo()},this.Sa)},e.prototype.onForceFlush=function(){return Zo(this,void 0,void 0,function(){return xo(this,function(n){switch(n.label){case 0:return[4,this.zo()];case 1:return n.sent(),[4,this.wr.forceFlush()];case 2:return n.sent(),[2]}})})},e.prototype.onShutdown=function(){return Zo(this,void 0,void 0,function(){return xo(this,function(n){switch(n.label){case 0:return this.Bo&&clearInterval(this.Bo),[4,this.onForceFlush()];case 1:return n.sent(),[4,this.wr.shutdown()];case 2:return n.sent(),[2]}})})},e})(zN),qN=(function(){function t(){this.jo=[]}return t.prototype.addView=function(e){this.jo.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this.jo.filter(function(o){return r.Ta(o.instrumentSelector,e)&&r.Ea(o.meterSelector,n)});return i},t.prototype.Ta=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype.Ea=function(e,n){return e.getNameFilter().match(n.name)&&(n.version===void 0||e.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||e.getSchemaUrlFilter().match(n.schemaUrl))},t})(),Pn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),vs=(function(){function t(e,n){this.Ra=e,this.qe=n}return t.prototype.yi=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=st.active()),typeof e!="number"){M.warn("non-number value provided to metric "+this.qe.name+": "+e);return}this.qe.valueType===an.INT&&!Number.isInteger(e)&&(M.warn("INT value type cannot accept a floating-point value for "+this.qe.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Ra.record(e,n,r,de(Date.now()))},t})(),tG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this.yi(n,r,i)},e})(vs),eG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){if(n<0){M.warn("negative value provided to counter "+this.qe.name+": "+n);return}this.yi(n,r,i)},e})(vs),nG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this.yi(n,r,i)},e})(vs),rG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){if(n<0){M.warn("negative value provided to histogram "+this.qe.name+": "+n);return}this.yi(n,r,i)},e})(vs),ws=(function(){function t(e,n,r){this.Qo=r,this.qe=e,this.$o=n}return t.prototype.addCallback=function(e){this.Qo.addCallback(e,this)},t.prototype.removeCallback=function(e){this.Qo.removeCallback(e,this)},t})(),iG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(ws),oG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(ws),sG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(ws);function Gc(t){return t instanceof ws}var aG=(function(){function t(e){this.Je=e}return t.prototype.createGauge=function(e,n){var r=en(e,H.GAUGE,n),i=this.Je.registerMetricStorage(r);return new nG(i,r)},t.prototype.createHistogram=function(e,n){var r=en(e,H.HISTOGRAM,n),i=this.Je.registerMetricStorage(r);return new rG(i,r)},t.prototype.createCounter=function(e,n){var r=en(e,H.COUNTER,n),i=this.Je.registerMetricStorage(r);return new eG(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=en(e,H.UP_DOWN_COUNTER,n),i=this.Je.registerMetricStorage(r);return new tG(i,r)},t.prototype.createObservableGauge=function(e,n){var r=en(e,H.OBSERVABLE_GAUGE,n),i=this.Je.registerAsyncMetricStorage(r);return new oG(r,i,this.Je.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=en(e,H.OBSERVABLE_COUNTER,n),i=this.Je.registerAsyncMetricStorage(r);return new iG(r,i,this.Je.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=en(e,H.OBSERVABLE_UP_DOWN_COUNTER,n),i=this.Je.registerAsyncMetricStorage(r);return new sG(r,i,this.Je.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,n){this.Je.observableRegistry.addBatchCallback(e,n)},t.prototype.removeBatchObservableCallback=function(e,n){this.Je.observableRegistry.removeBatchCallback(e,n)},t})(),Vg=(function(){function t(e){this.Yn=e}return t.prototype.getInstrumentDescriptor=function(){return this.Yn},t.prototype.updateDescription=function(e){this.Yn=en(this.Yn.name,this.Yn.type,{description:e,valueType:this.Yn.valueType,unit:this.Yn.unit,advice:this.Yn.advice})},t})(),lG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),lm=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},cG=(function(){function t(e){this.gi=e,this.or=new Map,this.xr=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this.gi(e)),this.or.get(n)},t.prototype.getOrDefault=function(e,n){var r=this.gi(e);if(this.or.has(r))return this.or.get(r);var i=n();return this.xr.has(r)||this.xr.set(r,e),this.or.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this.gi(e)),this.xr.has(r)||this.xr.set(r,e),this.or.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this.gi(e)),this.or.has(n)},t.prototype.keys=function(){var e,n;return lm(this,function(r){switch(r.label){case 0:e=this.xr.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,n;return lm(this,function(r){switch(r.label){case 0:e=this.or.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this.xr.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this.or.size},enumerable:!1,configurable:!0}),t})(),xn=(function(t){lG(e,t);function e(){return t.call(this,bg)||this}return e})(cG),uG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Og=(function(){function t(e,n){this.Wn=e,this.Kn=new xn,this.Vr=new xn,this.qi={"otel.metric.overflow":!0},this.qo=(n!=null?n:2e3)-1,this.Ca=bg(this.qi)}return t.prototype.record=function(e,n,r,i){var o=this,s=this.Kn.get(n);if(!s){if(this.Kn.size>=this.qo){var a=this.Kn.getOrDefault(this.qi,function(){return o.Wn.createAccumulation(i)});a==null||a.record(e);return}s=this.Wn.createAccumulation(i),this.Kn.set(n,s)}s==null||s.record(e)},t.prototype.batchCumulate=function(e,n){var r=this;Array.from(e.entries()).forEach(function(i){var o=uG(i,3),s=o[0],a=o[1],c=o[2],l=r.Wn.createAccumulation(n);l==null||l.record(a);var u=l;if(r.Vr.has(s,c)){var h=r.Vr.get(s,c);u=r.Wn.diff(h,l)}else if(r.Vr.size>=r.qo&&(s=r.qi,c=r.Ca,r.Vr.has(s,c))){var h=r.Vr.get(s,c);u=r.Wn.diff(h,l)}if(r.Kn.has(s,c)){var p=r.Kn.get(s,c);u=r.Wn.merge(p,u)}r.Vr.set(s,l,c),r.Kn.set(s,u,c)})},t.prototype.collect=function(){var e=this.Kn;return this.Kn=new xn,e},t})(),ec=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cm=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ng=(function(){function t(e,n){var r=this;this.Wn=e,this.Or=new Map,this.eo=new Map,n.forEach(function(i){r.Or.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this.ka(r);var o=this.Za(e),s=o,a;if(this.eo.has(e)){var c=this.eo.get(e),l=c.collectionTime;a=c.aggregationTemporality,a===Se.CUMULATIVE?s=t.merge(c.accumulations,o,this.Wn):s=t.calibrateStartTime(c.accumulations,o,l)}else a=e.selectAggregationTemporality(n.type);this.eo.set(e,{accumulations:s,collectionTime:i,aggregationTemporality:a});var u=hG(s);if(u.length!==0)return this.Wn.toMetricData(n,a,u,i)},t.prototype.ka=function(e){var n,r,i=this.Or.keys();try{for(var o=ec(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.Or.get(a);c===void 0&&(c=[],this.Or.set(a,c)),c.push(e)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.Za=function(e){var n,r,i=new xn,o=this.Or.get(e);if(this.Or.set(e,[]),o===void 0)return i;try{for(var s=ec(o),a=s.next();!a.done;a=s.next()){var c=a.value;i=t.merge(i,c,this.Wn)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},t.merge=function(e,n,r){for(var i=e,o=n.entries(),s=o.next();s.done!==!0;){var a=cm(s.value,3),c=a[0],l=a[1],u=a[2];if(e.has(c,u)){var h=e.get(c,u),p=r.merge(h,l);i.set(c,p,u)}else i.set(c,l,u);s=o.next()}return i},t.calibrateStartTime=function(e,n,r){var i,o;try{for(var s=ec(e.keys()),a=s.next();!a.done;a=s.next()){var c=cm(a.value,2),l=c[0],u=c[1],h=n.get(l,u);h==null||h.setStartTime(r)}}catch(p){i={error:p}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},t})();function hG(t){return Array.from(t.entries())}var pG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),dG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},fG=(function(t){pG(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.no=i,a.ro=s,a.qr=new Og(r,a.ro),a.io=new Ng(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new xn;Array.from(n.entries()).forEach(function(s){var a=dG(s,2),c=a[0],l=a[1];o.set(i.no.process(c),l)}),this.qr.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this.qr.collect();return this.io.buildMetrics(n,this.Yn,i,r)},e})(Vg);function um(t,e){var n="";return t.unit!==e.unit&&(n+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
632
632
  `),t.type!==e.type&&(n+=" - Type '"+t.type+"' does not match '"+e.type+`'
633
633
  `),t.valueType!==e.valueType&&(n+=" - Value Type '"+t.valueType+"' does not match '"+e.valueType+`'
634
634
  `),t.description!==e.description&&(n+=" - Description '"+t.description+"' does not match '"+e.description+`'
635
- `),n}function BN(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function jN(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function QN(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"}function $N(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+`'
635
+ `),n}function mG(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function yG(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function gG(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"}function bG(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+`'
636
636
  - OR - create a new view with the name `+t.name+" and description '"+t.description+"' and InstrumentSelector "+r+`
637
- - OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function vf(t,e){return t.valueType!==e.valueType?BN(t,e):t.unit!==e.unit?jN(t,e):t.type!==e.type?QN(t,e):t.description!==e.description?$N(t,e):""}var Il=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qN=(function(){function t(){this.oo=new Map,this.Nr=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var n,r,i,o,s=[];try{for(var a=Il(this.oo.values()),c=a.next();!c.done;c=a.next()){var l=c.value;s=s.concat(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var u=this.Nr.get(e);if(u!=null)try{for(var h=Il(u.values()),p=h.next();!p.done;p=h.next()){var l=p.value;s=s.concat(l)}}catch(f){i={error:f}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}return s},t.prototype.register=function(e){this.ts(e,this.oo)},t.prototype.registerForCollector=function(e,n){var r=this.Nr.get(e);r==null&&(r=new Map,this.Nr.set(e,r)),this.ts(n,r)},t.prototype.findOrUpdateCompatibleStorage=function(e){var n=this.oo.get(e.name);return n===void 0?null:this.es(e,n)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,n){var r=this.Nr.get(e);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this.es(n,i)},t.prototype.ts=function(e,n){var r=e.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[e]);return}i.push(e)},t.prototype.es=function(e,n){var r,i,o=null;try{for(var s=Il(n),a=s.next();!a.done;a=s.next()){var c=a.value,l=c.getInstrumentDescriptor();zx(l,e)?(l.description!==e.description&&(e.description.length>l.description.length&&c.updateDescription(e.description),X.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
637
+ - OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function hm(t,e){return t.valueType!==e.valueType?mG(t,e):t.unit!==e.unit?yG(t,e):t.type!==e.type?gG(t,e):t.description!==e.description?bG(t,e):""}var nc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vG=(function(){function t(){this.oo=new Map,this.bi=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var n,r,i,o,s=[];try{for(var a=nc(this.oo.values()),c=a.next();!c.done;c=a.next()){var l=c.value;s=s.concat(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var u=this.bi.get(e);if(u!=null)try{for(var h=nc(u.values()),p=h.next();!p.done;p=h.next()){var l=p.value;s=s.concat(l)}}catch(f){i={error:f}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}return s},t.prototype.register=function(e){this.ts(e,this.oo)},t.prototype.registerForCollector=function(e,n){var r=this.bi.get(e);r==null&&(r=new Map,this.bi.set(e,r)),this.ts(n,r)},t.prototype.findOrUpdateCompatibleStorage=function(e){var n=this.oo.get(e.name);return n===void 0?null:this.es(e,n)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,n){var r=this.bi.get(e);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this.es(n,i)},t.prototype.ts=function(e,n){var r=e.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[e]);return}i.push(e)},t.prototype.es=function(e,n){var r,i,o=null;try{for(var s=nc(n),a=s.next();!a.done;a=s.next()){var c=a.value,l=c.getInstrumentDescriptor();fN(l,e)?(l.description!==e.description&&(e.description.length>l.description.length&&c.updateDescription(e.description),M.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
638
638
  `,`Details:
639
- `,bf(l,e),`The longer description will be used.
640
- To resolve the conflict:`,vf(l,e))),o=c):X.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
639
+ `,um(l,e),`The longer description will be used.
640
+ To resolve the conflict:`,hm(l,e))),o=c):M.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
641
641
  `,`Details:
642
- `,bf(l,e),`To resolve the conflict:
643
- `,vf(l,e))}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t})(),tO=(function(){function t(e){this.ka=e}return t.prototype.record=function(e,n,r,i){this.ka.forEach(function(o){o.record(e,n,r,i)})},t})(),eO=(function(){function t(e,n){this.ns=e,this.Va=n,this.Kn=new un}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){X.warn("non-number value provided to metric "+this.ns+": "+e);return}this.Va===De.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.ns+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Kn.set(n,e)},t})(),nO=(function(){function t(){this.Kn=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!ql(e)){var i=this.Kn.get(e);if(i==null&&(i=new un,this.Kn.set(e,i)),typeof n!="number"){X.warn("non-number value provided to metric "+e.qe.name+": "+n);return}e.qe.valueType===De.INT&&!Number.isInteger(n)&&(X.warn("INT value type cannot accept a floating-point value for "+e.qe.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},t})(),Tl=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},El=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},wf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Sf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rO=(function(){function t(){this.Or=[],this.Gr=[]}return t.prototype.addCallback=function(e,n){var r=this.rs(e,n);r>=0||this.Or.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this.rs(e,n);r<0||this.Or.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter(ql));if(r.size===0){X.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this.ss(e,r);i>=0||this.Gr.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter(ql)),i=this.ss(e,r);i<0||this.Gr.splice(i,1)},t.prototype.observe=function(e,n){return Tl(this,void 0,void 0,function(){var r,i,o,s;return El(this,function(a){switch(a.label){case 0:return r=this.xa(e,n),i=this.Na(e,n),[4,Ax(Sf(Sf([],wf(r),!1),wf(i),!1))];case 1:return o=a.sent(),s=o.filter(Jx).map(function(c){return c.reason}),[2,s]}})})},t.prototype.xa=function(e,n){var r=this;return this.Or.map(function(i){var o=i.callback,s=i.instrument;return Tl(r,void 0,void 0,function(){var a,c;return El(this,function(l){switch(l.label){case 0:return a=new eO(s.qe.name,s.qe.valueType),c=Promise.resolve(o(a)),n!=null&&(c=Jr(c,n)),[4,c];case 1:return l.sent(),s.$o.forEach(function(u){u.record(a.Kn,e)}),[2]}})})})},t.prototype.Na=function(e,n){var r=this;return this.Gr.map(function(i){var o=i.callback,s=i.instruments;return Tl(r,void 0,void 0,function(){var a,c;return El(this,function(l){switch(l.label){case 0:return a=new nO,c=Promise.resolve(o(a)),n!=null&&(c=Jr(c,n)),[4,c];case 1:return l.sent(),s.forEach(function(u){var h=a.Kn.get(u);h!=null&&u.$o.forEach(function(p){p.record(h,e)})}),[2]}})})})},t.prototype.rs=function(e,n){return this.Or.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype.ss=function(e,n){return this.Gr.findIndex(function(r){return r.callback===e&&Dx(r.instruments,n)})},t})(),iO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),oO=(function(t){iO(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.no=i,a.ro=s,a.pr=new My(r,a.ro),a.io=new Fy(r,o),a}return e.prototype.record=function(n,r,i,o){r=this.no.process(r,i),this.pr.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this.pr.collect();return this.io.buildMetrics(n,this.an,i,r)},e})(Py),Ay=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),kc=(function(){function t(){}return t.Noop=function(){return aO},t})(),sO=(function(t){Ay(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(kc);(function(t){Ay(e,t);function e(n){var r=t.call(this)||this;return r.Oa=n,r}return e.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(s){return i.Oa.includes(s)}).forEach(function(s){return o[s]=n[s]}),o},e})(kc);var aO=new sO,lO=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},cO=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},uO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},hO=(function(){function t(e,n){this.so=e,this.ls=n,this.metricStorageRegistry=new qN,this.observableRegistry=new rO,this.meter=new AN(this)}return t.prototype.registerMetricStorage=function(e){var n=this.cs(e,oO);return n.length===1?n[0]:new tO(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.cs(e,zN);return n},t.prototype.collect=function(e,n,r){return lO(this,void 0,void 0,function(){var i,o,s;return cO(this,function(a){switch(a.label){case 0:return[4,this.observableRegistry.observe(n,r==null?void 0:r.timeoutMillis)];case 1:return i=a.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(s=o.map(function(c){return c.collect(e,n)}).filter(Mx),s.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this.ls,metrics:s},errors:i}])}})})},t.prototype.cs=function(e,n){var r=this,i=this.so.viewRegistry.findViews(e,this.ls),o=i.map(function(c){var l=Hx(c,e),u=r.metricStorageRegistry.findOrUpdateCompatibleStorage(l);if(u!=null)return u;var h=c.aggregation.createAggregator(l),p=new n(l,h,c.attributesProcessor,r.so.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(p),p});if(o.length===0){var s=this.so.selectAggregations(e.type),a=s.map(function(c){var l=uO(c,2),u=l[0],h=l[1],p=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(u,e);if(p!=null)return p;var f=h.createAggregator(e),m=u.selectCardinalityLimit(e.type),d=new n(e,f,kc.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),pO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dO=(function(){function t(e){this.resource=e,this.viewRegistry=new GN,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=Fx(e),r=this.meterSharedStates.get(n);return r==null&&(r=new hO(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=pO(this.metricCollectors),s=o.next();!s.done;s=o.next()){var a=s.value;i.push([a,a.selectAggregation(e)])}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t})(),oo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},so=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},fO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},mO=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},yO=(function(){function t(e,n){this.cn=e,this.dr=n}return t.prototype.collect=function(e){return oo(this,void 0,void 0,function(){var n,r,i,o,s=this;return so(this,function(a){switch(a.label){case 0:return n=Qt(Date.now()),r=[],i=[],o=Array.from(this.cn.meterSharedStates.values()).map(function(c){return oo(s,void 0,void 0,function(){var l;return so(this,function(u){switch(u.label){case 0:return[4,c.collect(this,n,e)];case 1:return l=u.sent(),(l==null?void 0:l.scopeMetrics)!=null&&r.push(l.scopeMetrics),(l==null?void 0:l.errors)!=null&&i.push.apply(i,mO([],fO(l.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return a.sent(),[2,{resourceMetrics:{resource:this.cn.resource,scopeMetrics:r},errors:i}]}})})},t.prototype.forceFlush=function(e){return oo(this,void 0,void 0,function(){return so(this,function(n){switch(n.label){case 0:return[4,this.dr.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return oo(this,void 0,void 0,function(){return so(this,function(n){switch(n.label){case 0:return[4,this.dr.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this.dr.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this.dr.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this.dr).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t})(),If=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Tf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ef=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function gO(t,e){var n=e!=null?e:Ar.empty();return t?Ar.default().merge(n):n}var bO=(function(){function t(e){var n,r,i,o,s;if(this._e=!1,this.cn=new dO(gO((s=e==null?void 0:e.mergeResourceWithDefaults)!==null&&s!==void 0?s:!0,e==null?void 0:e.resource)),(e==null?void 0:e.views)!=null&&e.views.length>0)try{for(var a=Ef(e.views),c=a.next();!c.done;c=a.next()){var l=c.value;this.cn.viewRegistry.addView(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if((e==null?void 0:e.readers)!=null&&e.readers.length>0)try{for(var u=Ef(e.readers),h=u.next();!h.done;h=u.next()){var p=h.value;this.addMetricReader(p)}}catch(f){i={error:f}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._e?(X.warn("A shutdown MeterProvider cannot provide a Meter"),hC()):this.cn.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new yO(this.cn,e);e.setMetricProducer(n),this.cn.metricCollectors.push(n)},t.prototype.shutdown=function(e){return If(this,void 0,void 0,function(){return Tf(this,function(n){switch(n.label){case 0:return this._e?(X.warn("shutdown may only be called once per MeterProvider"),[2]):(this._e=!0,[4,Promise.all(this.cn.metricCollectors.map(function(r){return r.shutdown(e)}))]);case 1:return n.sent(),[2]}})})},t.prototype.forceFlush=function(e){return If(this,void 0,void 0,function(){return Tf(this,function(n){switch(n.label){case 0:return this._e?(X.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this.cn.metricCollectors.map(function(r){return r.forceFlush(e)}))];case 1:return n.sent(),[2]}})})},t})();function vO(t,e){var n=Sy(e);return{resource:Iy(t.resource),schemaUrl:void 0,scopeMetrics:wO(t.scopeMetrics,n)}}function wO(t,e){return Array.from(t.map(function(n){return{scope:Ty(n.scope),metrics:n.metrics.map(function(r){return SO(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function SO(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=RO(t.aggregationTemporality);switch(t.dataPointType){case ve.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:Rf(t,e)};break;case ve.GAUGE:n.gauge={dataPoints:Rf(t,e)};break;case ve.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:TO(t,e)};break;case ve.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:EO(t,e)};break}return n}function IO(t,e,n){var r={attributes:gn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case De.INT:r.asInt=t.value;break;case De.DOUBLE:r.asDouble=t.value;break}return r}function Rf(t,e){return t.dataPoints.map(function(n){return IO(n,t.descriptor.valueType,e)})}function TO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:gn(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function EO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:gn(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function RO(t){switch(t){case ae.DELTA:return 1;case ae.CUMULATIVE:return 2}}function CO(t,e){return{resourceMetrics:t.map(function(n){return vO(n,e)})}}var ZO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function VO(t,e){var n,r=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:gn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return NO(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return xO(o,e)}),droppedLinksCount:t.droppedLinksCount}}function xO(t,e){var n;return{attributes:t.attributes?gn(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(n=t.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function NO(t,e){return{attributes:t.attributes?gn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function OO(t,e){var n=Sy(e);return{resourceSpans:LO(t,n)}}function GO(t){var e,n,r=new Map;try{for(var i=ZO(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=r.get(s.resource);a||(a=new Map,r.set(s.resource,a));var c=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),l=a.get(c);l||(l=[],a.set(c,l)),l.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function LO(t,e){for(var n=GO(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=kO(o.value,2),a=s[0],c=s[1],l=[],u=c.values(),h=u.next();!h.done;){var p=h.value;if(p.length>0){var f=p.map(function(d){return VO(d,e)});l.push({scope:Ty(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:Iy(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var XO={serializeRequest:function(t){var e=CO([t],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},WO={serializeRequest:function(t){var e=OO(t,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},UO=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},PO=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},MO=5,FO=1e3,AO=5e3,JO=1.5,Cf=.2;function DO(){return Math.random()*(2*Cf)-Cf}var YO=(function(){function t(e){this.Pn=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,s){setTimeout(function(){i.Pn.send(e,n).then(o,s)},r)})},t.prototype.send=function(e,n){var r;return UO(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return PO(this,function(h){switch(h.label){case 0:return i=Date.now()+n,[4,this.Pn.send(e,n)];case 1:o=h.sent(),s=MO,a=FO,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,AO)+DO(),0),a=a*JO,l=(r=o.retryInMillis)!==null&&r!==void 0?r:c,u=i-Date.now(),l>u?[2,o]:[4,this.retry(e,u,l)]):[3,4];case 3:return o=h.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this.Pn.shutdown()},t})();function Jy(t){return new YO(t.transport)}function KO(t){var e=[429,502,503,504];return e.includes(t)}function _O(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}}var HO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},zO=(function(){function t(e){this.us=e}return t.prototype.send=function(e,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r.us.url);var s=r.us.headers();Object.entries(s).forEach(function(a){var c=HO(a,2),l=c[0],u=c[1];o.setRequestHeader(l,u)}),o.ontimeout=function(a){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(X.debug("XHR success"),i({status:"success"})):o.status&&KO(o.status)?i({status:"retryable",retryInMillis:_O(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t})();function BO(t){return new zO(t)}var jO=(function(){function t(e){this.hs=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n.hs.url,new Blob([e],{type:n.hs.blobType}))?(X.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t})();function QO(t){return new jO(t)}function $O(t,e){return gy(t,e,Jy({transport:BO(t)}))}function qO(t,e){return gy(t,e,Jy({transport:QO({url:t.url,blobType:t.headers()["Content-Type"]})}))}var tG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function eG(t){return function(){var e,n={};return Object.entries((e=t==null?void 0:t())!==null&&e!==void 0?e:{}).forEach(function(r){var i=tG(r,2),o=i[0],s=i[1];typeof s<"u"?n[o]=String(s):X.warn('Header "'+o+'" has invalid value ('+s+") and will be ignored")}),n}}var mn=function(){return mn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},mn.apply(this,arguments)};function nG(t,e,n){var r=mn({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function rG(t){if(t!=null)try{return new URL(t),t}catch(e){throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function iG(t,e,n){var r,i,o,s;return mn(mn({},bx(t,e,n)),{headers:nG(eG(t.headers),e.headers,n.headers),url:(i=(r=rG(t.url))!==null&&r!==void 0?r:e.url)!==null&&i!==void 0?i:n.url,agentOptions:(s=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&s!==void 0?s:n.agentOptions})}function oG(t,e){return mn(mn({},vx()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function sG(t,e,n){return iG({url:t.url,timeoutMillis:t.timeoutMillis,headers:gx(t.headers),concurrencyLimit:t.concurrencyLimit},{},oG(n,e))}function Dy(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=sG(t,n,r);return i?$O(o,e):qO(o,e)}var aG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),lG=(function(t){aG(e,t);function e(n){return n===void 0&&(n={}),t.call(this,Dy(n,WO,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(yy),Xo;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Xo||(Xo={}));var cG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),tc=function(){return ae.CUMULATIVE},Yy=function(t){switch(t){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.GAUGE:case K.HISTOGRAM:case K.OBSERVABLE_GAUGE:return ae.DELTA;case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return ae.CUMULATIVE}},Ky=function(t){switch(t){case K.COUNTER:case K.HISTOGRAM:return ae.DELTA;case K.GAUGE:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_GAUGE:return ae.CUMULATIVE}};function uG(){var t=Yn(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?tc:e==="delta"?Yy:e==="lowmemory"?Ky:(X.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),tc)}function hG(t){return t!=null?t===Xo.DELTA?Yy:t===Xo.LOWMEMORY?Ky:tc:uG()}function pG(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return Ne.Default()}}var dG=(function(t){cG(e,t);function e(n,r){var i=t.call(this,n)||this;return i.Hi=pG(r),i.zi=hG(r==null?void 0:r.temporalityPreference),i}return e.prototype.selectAggregation=function(n){return this.Hi(n)},e.prototype.selectAggregationTemporality=function(n){return this.zi(n)},e})(yy),fG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),mG=(function(t){fG(e,t);function e(n){return t.call(this,Dy(n!=null?n:{},XO,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(dG);function yG(t,e){let n=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>n,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:Km(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function gG(t,e){if(!e.isSamplingEnabled())return t;let n=[],r={},i={};for(let o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));let s=e.shouldSample(o);s.sample?s.attributes?r[o.spanContext().spanId]=yG(o,s.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){let o=n.shift(),s=i[o];if(s)for(let a of s)delete r[a],n.push(a)}return Object.values(r)}var ec=class extends lG{constructor(e,n){super(Jt(mt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=gG(e,this.sampler);if(r.length===0)return;let i=0,o=s=>{var a;if(s.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(i++,i>mc)return console.error(`[@launchdarkly/observability] failed to export OTeL traces: ${(a=s.error)==null?void 0:a.message}`,s.error),n({code:kt.FAILED,error:s.error});new Promise(c=>setTimeout(c,yc+gc*Math.pow(2,i))).then(()=>{var c;console.warn(`[@launchdarkly/observability] retry ${i}, failed to export OTeL traces: ${(c=s.error)==null?void 0:c.message}`,s.error),super.export(r,o)})};super.export(r,o)}},nc=class extends mG{constructor(e){super(Jt(mt({},e),{headers:{}}))}export(e,n){let r=0,i=o=>{var s;if(o.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(r++,r>mc)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(s=o.error)==null?void 0:s.message}`,o.error),n({code:kt.FAILED,error:o.error});new Promise(a=>setTimeout(a,yc+gc*Math.pow(2,r))).then(()=>{var a;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),super.export(e,i)})};super.export(e,i)}},bG="OT_ZONE_CONTEXT",vG="Navigation:",wG=["click","input","submit"];function SG(){return!1}var rc=class en extends ey{constructor(e={}){var n;super(en.moduleName,en.version,e),yt(this,"_spansData",new WeakMap),yt(this,"_zonePatched"),yt(this,"_wrappedListeners",new WeakMap),yt(this,"_eventsSpanMap",new WeakMap),yt(this,"_eventNames"),yt(this,"_shouldPreventSpanCreation"),this.Ga=new Set((n=e==null?void 0:e.eventNames)!=null?n:wG),this.La=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:SG}init(){}Xa(e,n){let r=this._n.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=dn():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}Wa(e){return this.Ga.has(e)}Un(e,n){var r;let i=e==null?void 0:e.target,o=e==null?void 0:e.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this.Wa(o))return;let s=ly(i,!0);try{let a=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":s,"event.id":i.id,"event.text":(r=i.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?ut.setSpan(tt.active(),n):void 0);return e instanceof MouseEvent&&(a.setAttribute("event.x",e.clientX),a.setAttribute("event.y",e.clientY),a.setAttribute("event.relativeX",e.clientX/window.innerWidth),a.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY))),this.La(o,i,a)===!0?void 0:(this._n.set(a,{taskCount:0}),a)}catch(a){this.T.error("failed to start create new user interaction span",a)}}ao(e){let n=this._n.get(e);n&&(n.taskCount--,n.taskCount===0&&this.Ua(e,n.hrTimeLastTimeout))}Lr(e){let n=e.get(bG);return n&&ut.getSpan(n)}ps(e){let n=this._n.get(e);n&&n.taskCount++}addPatchedListener(e,n,r,i){let o=this.lo.get(r);o||(o=new Map,this.lo.set(r,o));let s=o.get(n);return s||(s=new Map,o.set(n,s)),s.has(e)?!1:(s.set(e,i),!0)}removePatchedListener(e,n,r){let i=this.lo.get(r);if(!i)return;let o=i.get(n);if(!o)return;let s=o.get(e);return s&&(o.delete(e),o.size===0&&(i.delete(n),i.size===0&&this.lo.delete(r))),s}Xr(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}Pa(){let e=this,n=new Map;return r=>function(i,o,s){if(!o)return r.call(this,i,o,s);let a=s&&typeof s=="object"&&s.once,c=function(...l){var u;let h,p=l[0];if(!(p!=null&&p.type))return e.Xr(o,this,l);if(Date.now()-((u=n.get(p.type))!=null?u:0)<1e3/60)return e.Xr(o,this,l);n.set(p.type,Date.now()),p&&(h=e.Ma.get(p)),a&&e.removePatchedListener(this,i,o);let f=e.Un(p,h);return f?(p&&e.Ma.set(p,f),tt.with(ut.setSpan(tt.active(),f),()=>{let m=e.Xr(o,this,l);return f.end(),m})):e.Xr(o,this,l)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,s)}}Fa(){let e=this;return n=>function(r,i,o){let s=e.removePatchedListener(this,r,i);return s?n.call(this,r,s,o):n.call(this,r,i,o)}}ds(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}Aa(){this.fs(),this.ee(history,"replaceState",this.fr()),this.ee(history,"pushState",this.fr()),this.ee(history,"back",this.fr()),this.ee(history,"forward",this.fr()),this.ee(history,"go",this.fr())}fr(){let e=this;return n=>function(...r){let i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),s=`${location.pathname}${location.hash}${location.search}`;return i!==s&&e.Ja(s),o}}fs(){Gt(history.replaceState)&&this.F(history,"replaceState"),Gt(history.pushState)&&this.F(history,"pushState"),Gt(history.back)&&this.F(history,"back"),Gt(history.forward)&&this.F(history,"forward"),Gt(history.go)&&this.F(history,"go")}Ja(e){let n=ut.getSpan(tt.active());n&&typeof n.updateName=="function"&&n.updateName(`${vG} ${e}`)}Da(){let e=this;return n=>function(r){let i=Zone.current,o=e.Lr(i);return o&&e.co(r,i)&&e.ao(o),n.call(this,r)}}Ya(){let e=this;return n=>function(r){let i=Zone.current,o=e.Lr(i);return o&&e.co(r,i)&&(e.ps(o),e.Xa(r,o)),n.call(this,r)}}Ka(){let e=this;return n=>function(r,i,o){let s=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,a=s==null?void 0:s.target,c,l=this;if(a){if(c=e.Un(s),c)return e.ps(c),l.run(()=>{try{return tt.with(ut.setSpan(tt.active(),c),()=>{let u=Zone.current;return r.ms=u,n.call(u,r,i,o)})}finally{e.ao(c)}})}else c=e.Lr(l);try{return n.call(l,r,i,o)}finally{c&&e.co(r,l)&&e.ao(c)}}}co(e,n){if(e.ms&&(n=e.ms),!n||!e.data||e.data.isPeriodic)return!1;let r=this.Lr(n);return!r||!this._n.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}Ua(e,n){e&&this._n.get(e)&&(e.end(n),this._n.delete(e))}enable(){let e=this.ys();this.T.debug("applying patch to",en.moduleName,en.version,"zone:",!!e),e?(Gt(e.prototype.runTask)&&(this.F(e.prototype,"runTask"),this.T.debug("removing previous patch from method runTask")),Gt(e.prototype.scheduleTask)&&(this.F(e.prototype,"scheduleTask"),this.T.debug("removing previous patch from method scheduleTask")),Gt(e.prototype.cancelTask)&&(this.F(e.prototype,"cancelTask"),this.T.debug("removing previous patch from method cancelTask")),this.gs=!0,this.ee(e.prototype,"runTask",this.Ka()),this.ee(e.prototype,"scheduleTask",this.Ya()),this.ee(e.prototype,"cancelTask",this.Da())):(this.gs=!1,this.ds().forEach(n=>{Gt(n.addEventListener)&&(this.F(n,"addEventListener"),this.T.debug("removing previous patch from method addEventListener")),Gt(n.removeEventListener)&&(this.F(n,"removeEventListener"),this.T.debug("removing previous patch from method removeEventListener")),this.ee(n,"addEventListener",this.Pa()),this.ee(n,"removeEventListener",this.Fa())})),this.Aa()}disable(){let e=this.ys();this.T.debug("removing patch from",en.moduleName,en.version,"zone:",!!e),e&&this.gs?(Gt(e.prototype.runTask)&&this.F(e.prototype,"runTask"),Gt(e.prototype.scheduleTask)&&this.F(e.prototype,"scheduleTask"),Gt(e.prototype.cancelTask)&&this.F(e.prototype,"cancelTask")):this.ds().forEach(n=>{Gt(n.addEventListener)&&this.F(n,"addEventListener"),Gt(n.removeEventListener)&&this.F(n,"removeEventListener")}),this.fs()}ys(){return window.Zone}};yt(rc,"version","0.1.0"),yt(rc,"moduleName","user-interaction");var IG=rc,nn={},Me,Wo="highlight.record",TG="highlight.session_id",EG="launchdarkly.js.log",RG=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(nn.tracerProvider!==void 0){console.warn("OTEL already initialized. Skipping...");return}Me=t;let h=t.backendUrl||void 0||"https://pub.highlight.io",p=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...ix],f=(i=t.environment)!=null?i:"production",m={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:100,timeoutMillis:5e3,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:5e3,keepAlive:!0}},d=new ec(m,e),v=new ic(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),g=new Ar({[C1]:(o=t.serviceName)!=null?o:"highlight-browser",[R1]:f,"highlight.project_id":t.projectId});nn.tracerProvider=new l1({resource:g,spanProcessors:[v]}),ut.setGlobalTracerProvider(nn.tracerProvider);let w=new nc(Jt(mt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),R=new ON({exporter:w,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});nn.meterProvider=new bO({resource:g,readers:[R]}),Ze.setGlobalMeterProvider(nn.meterProvider);let E=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&E.push(new X1({applyCustomAttributesOnSpan:{documentLoad:xf,documentFetch:xf,resourceFetch:ZG}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&E.push(new IG({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&E.push(new SV({propagateTraceHeaderCorsUrls:Nf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,O,U)=>Yo(void 0,null,function*(){var C,N,P;if(!V.attributes)return;let st=V;if(st.attributes[Wo]===!1)return;let lt=st.attributes["http.url"],y=(C=O.method)!=null?C:"GET";if(V.updateName(kf(lt,y,O.body)),!(U instanceof Response)){V.setAttributes({"http.response.error":U.message,"http.response.status":U.status});return}Vf(V,O.body,O.headers,t.networkRecordingOptions);let b=yield fx(U,(N=t.networkRecordingOptions)==null?void 0:N.bodyKeysToRecord,(P=t.networkRecordingOptions)==null?void 0:P.networkBodyKeysToRedact);V.setAttribute("http.response.body",b)})})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&E.push(new ex({propagateTraceHeaderCorsUrls:Nf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,O)=>{var U,C;let N=O;if(!V.attributes||V.attributes[Wo]===!1)return;let P=kf(N.al,N.ll,O.responseText);V.updateName(P),Vf(V,N._a,N.Ha,t.networkRecordingOptions);let st=my(N._a,(U=t.networkRecordingOptions)==null?void 0:U.networkBodyKeysToRedact,(C=t.networkRecordingOptions)==null?void 0:C.bodyKeysToRecord,N.Ha);V.setAttribute("http.request.body",st)}}))),Ek({instrumentations:E});let T=new oy;T.enable(),nn.tracerProvider.register({contextManager:T,propagator:new Mm({propagators:[new Om,new oc({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},ic=class extends iy{onStart(e,n){e.setAttribute(TG,Fe()),super.onStart(e,n)}onEnd(e){e.attributes[Wo]!==!1&&super.onEnd(e)}},oc=class extends Fm{constructor(e){super(),yt(this,"highlightEndpoints"),yt(this,"tracingOrigins"),yt(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,n,r){var i;let o=ut.getSpan(e);if(!o||!o.attributes)return;let s=o.attributes["http.url"];typeof s=="string"&&(CG(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Wo,!1),!px(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},_y="highlight-browser",ao=_y,Zf=()=>{var t;return(t=nn.tracerProvider)==null?void 0:t.getTracer(_y)},kf=(t,e,n)=>{var r,i,o;let s,a=new URL(t),c=a.pathname,l=`${e.toUpperCase()} - ${c}`;try{if(s=typeof n=="string"?JSON.parse(n):n,s&&s.query){let u=uc(s.query),h=((r=u.definitions[0])==null?void 0:r.kind)==="OperationDefinition"?(o=(i=u.definitions[0])==null?void 0:i.name)==null?void 0:o.value:void 0;h&&(l=`${h} (GraphQL: ${a.host+a.pathname})`)}}catch(u){}return l},Vf=(t,e,n,r)=>{var i;let o=typeof e=="string"?e:String(e);if(!t.attributes)return;let s=t.attributes["http.url"],a=new URL(s),c;try{c=e?JSON.parse(o):void 0,c.operationName&&t.setAttribute("graphql.operation.name",c.operationName)}catch(u){}let l=nx((i=r==null?void 0:r.networkHeadersToRedact)!=null?i:[],n,r==null?void 0:r.headerKeysToRecord);t.setAttributes({"highlight.type":"http.request","http.request.headers":JSON.stringify(l),"http.request.body":o,[V1]:s,[x1]:a.pathname,[N1]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},CG=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:hx(t,e),xf=t=>{var e,n,r;if(!t.events)return;let i=t.events,o={unload:zt("unloadEventStart","unloadEventEnd",i),dom_interactive:zt("fetchStart","domInteractive",i),dom_content_loaded:zt("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:zt("fetchStart","domComplete",i),load_event:zt("loadEventStart","loadEventEnd",i),document_load:zt("fetchStart","loadEventEnd",i),first_paint:zt("fetchStart","firstPaint",i),first_contentful_paint:zt("fetchStart","firstContentfulPaint",i),domain_lookup:zt("domainLookupStart","domainLookupEnd",i),connect:zt("connectStart","connectEnd",i),request:zt("requestStart","requestEnd",i),response:zt("responseStart","responseEnd",i)},s=(n=(e=Me==null?void 0:Me.getIntegrations)==null?void 0:e.call(Me))!=null?n:[];if(o.document_load!==void 0)for(let a of s)a.recordGauge((r=Me==null?void 0:Me.sessionSecureId)!=null?r:"",{name:bm,value:o.document_load/1e6});Object.entries(o).forEach(([a,c])=>{c!==void 0&&(t.setAttribute(`timings.${a}.ns`,c),t.setAttribute(`timings.${a}.readable`,Hy(c)))})};function zt(t,e,n){let r=n.find(s=>s.name===t),i=n.find(s=>s.name===e);if(!r||!i)return;let o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}var ZG=(t,e)=>{let n={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{t.setAttribute(`timings.${r}.ns`,i),t.setAttribute(`timings.${r}.readable`,Hy(i))})},Hy=t=>{if(t>=36e11){let e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){let e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){let e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){let e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){let e=t/1e3;return`${Number(e.toFixed(1))}\xB5s`}else return`${Number(t.toFixed(1))}ns`},Nf=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,kG=30,VG=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),xG=()=>Yo(void 0,null,function*(){let t=[];for(let e=0;e<kG;e++)t.push(yield VG());return t.reduce((e,n)=>e+n,0)/t.length}),NG=(t,e)=>{let n={},r=16.666666666666668;xG().then(c=>r=c);let i=c=>{var l;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(l=window.performance)==null?void 0:l.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;let c=window.performance.now()-n.timerStart-r;s(c),n={}},s=c=>{let l=(new Date().getTime()-e)/1e3;t({relativeTimestamp:l,jankAmount:c,querySelector:a(),newLocation:window.location.href!=n.location?window.location.href:void 0})},a=()=>{var c;return(c=n==null?void 0:n.event)!=null&&c.target?mR(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},OG=typeof window<"u",Of=OG&&"performance"in window&&"memory"in performance?performance:{memory:{}},GG=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Of.memory.jsHeapSizeLimit||0,h=Of.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:u,usedJSHeapSize:h,relativeTimestamp:l,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let s=0,a=Date.now(),c=function(){var l=Date.now();s++,l>1e3+a&&(n=Math.round(s*1e3/(l-a)),s=0,a=l),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}},Je,Xr,zy,Uo,sc,By=-1,wn=function(t){addEventListener("pageshow",function(e){e.persisted&&(By=e.timeStamp,t(e))},!0)},Vc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Qo=function(){var t=Vc();return t&&t.activationStart||0},te=function(t,e){var n=Vc(),r="navigate";return By>=0?r="back-forward-cache":n&&(document.prerendering||Qo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zn=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(i){}},ee=function(t,e,n,r){var i,o;return function(s){e.value>=0&&(s||r)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=(function(a,c){return a>c[1]?"poor":a>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},xc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},$o=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},Nc=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},Fn=-1,Gf=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Po=function(t){document.visibilityState==="hidden"&&Fn>-1&&(Fn=t.type==="visibilitychange"?t.timeStamp:0,LG())},Lf=function(){addEventListener("visibilitychange",Po,!0),addEventListener("prerenderingchange",Po,!0)},LG=function(){removeEventListener("visibilitychange",Po,!0),removeEventListener("prerenderingchange",Po,!0)},Oc=function(){return Fn<0&&(Fn=Gf(),Lf(),wn(function(){setTimeout(function(){Fn=Gf(),Lf()},0)})),{get firstHiddenTime(){return Fn}}},zr=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},Xf=[1800,3e3],jy=function(t,e){e=e||{},zr(function(){var n,r=Oc(),i=te("FCP"),o=zn("paint",function(s){s.forEach(function(a){a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-Qo(),0),i.entries.push(a),n(!0)))})});o&&(n=ee(t,i,Xf,e.reportAllChanges),wn(function(s){i=te("FCP"),n=ee(t,i,Xf,e.reportAllChanges),xc(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},Wf=[.1,.25],XG=function(t,e){e=e||{},jy(Nc(function(){var n,r=te("CLS",0),i=0,o=[],s=function(c){c.forEach(function(l){if(!l.hadRecentInput){var u=o[0],h=o[o.length-1];i&&l.startTime-h.startTime<1e3&&l.startTime-u.startTime<5e3?(i+=l.value,o.push(l)):(i=l.value,o=[l])}}),i>r.value&&(r.value=i,r.entries=o,n())},a=zn("layout-shift",s);a&&(n=ee(t,r,Wf,e.reportAllChanges),$o(function(){s(a.takeRecords()),n(!0)}),wn(function(){i=0,r=te("CLS",0),n=ee(t,r,Wf,e.reportAllChanges),xc(function(){return n()})}),setTimeout(n,0))}))},Vr={passive:!0,capture:!0},WG=new Date,Uf=function(t,e){Je||(Je=e,Xr=t,zy=new Date,$y(removeEventListener),Qy())},Qy=function(){if(Xr>=0&&Xr<zy-WG){var t={entryType:"first-input",name:Je.type,target:Je.target,cancelable:Je.cancelable,startTime:Je.timeStamp,processingStart:Je.timeStamp+Xr};Uo.forEach(function(e){e(t)}),Uo=[]}},UG=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var i=function(){Uf(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Vr),removeEventListener("pointercancel",o,Vr)};addEventListener("pointerup",i,Vr),addEventListener("pointercancel",o,Vr)})(e,t):Uf(e,t)}},$y=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,UG,Vr)})},Pf=[100,300],PG=function(t,e){e=e||{},zr(function(){var n,r=Oc(),i=te("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},s=function(c){c.forEach(o)},a=zn("first-input",s);n=ee(t,i,Pf,e.reportAllChanges),a&&$o(Nc(function(){s(a.takeRecords()),a.disconnect()})),a&&wn(function(){var c;i=te("FID"),n=ee(t,i,Pf,e.reportAllChanges),Uo=[],Xr=-1,Je=null,$y(addEventListener),c=o,Uo.push(c),Qy()})})},qy=0,Rl=1/0,lo=0,MG=function(t){t.forEach(function(e){e.interactionId&&(Rl=Math.min(Rl,e.interactionId),lo=Math.max(lo,e.interactionId),qy=lo?(lo-Rl)/7+1:0)})},tg=function(){return sc?qy:performance.interactionCount||0},FG=function(){"interactionCount"in performance||sc||(sc=zn("event",MG,{type:"event",buffered:!0,durationThreshold:0}))},Mf=[200,500],eg=0,Ff=function(){return tg()-eg},be=[],Cl={},Af=function(t){var e=be[be.length-1],n=Cl[t.interactionId];if(n||be.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};Cl[r.id]=r,be.push(r)}be.sort(function(i,o){return o.latency-i.latency}),be.splice(10).forEach(function(i){delete Cl[i.id]})}},AG=function(t,e){e=e||{},zr(function(){var n;FG();var r,i=te("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Af(u),u.entryType==="first-input"&&!be.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Af(u)});var c,l=(c=Math.min(be.length-1,Math.floor(Ff()/50)),be[c]);l&&l.latency!==i.value&&(i.value=l.latency,i.entries=l.entries,r())},s=zn("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=ee(t,i,Mf,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),$o(function(){o(s.takeRecords()),i.value<0&&Ff()>0&&(i.value=0,i.entries=[]),r(!0)}),wn(function(){be=[],eg=tg(),i=te("INP"),r=ee(t,i,Mf,e.reportAllChanges)}))})},Jf=[2500,4e3],Zl={},JG=function(t,e){e=e||{},zr(function(){var n,r=Oc(),i=te("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-Qo(),0),i.entries=[l],n())},s=zn("largest-contentful-paint",o);if(s){n=ee(t,i,Jf,e.reportAllChanges);var a=Nc(function(){Zl[i.id]||(o(s.takeRecords()),s.disconnect(),Zl[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),$o(a),wn(function(c){i=te("LCP"),n=ee(t,i,Jf,e.reportAllChanges),xc(function(){i.value=performance.now()-c.timeStamp,Zl[i.id]=!0,n(!0)})})}})},Df=[800,1800],DG=function t(e){document.prerendering?zr(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},YG=function(t,e){e=e||{};var n=te("TTFB"),r=ee(t,n,Df,e.reportAllChanges);DG(function(){var i=Vc();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Qo(),0),n.entries=[i],r(!0),wn(function(){n=te("TTFB",0),(r=ee(t,n,Df,e.reportAllChanges))(!0)})}})},KG=t=>(XG(t),jy(t),PG(t),JG(t),YG(t),AG(t),()=>{}),Pn=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},_G=(t,e)=>{let n=()=>{let i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:Pn.downlink,downlinkMax:Pn.downlinkMax,effectiveType:Pn.effectiveType,rtt:Pn.rtt,saveData:Pn.saveData,type:Pn.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},HG=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let t=window.performance;return{getDeviceDetails:()=>({deviceMemory:zG(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{let e=kl(t.memory.jsHeapSizeLimit),n=kl(t.memory.totalJSHeapSize),r=kl(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},kl=t=>t/Math.pow(1e3,2),zG=t=>1024*t,BG="launchdarkly.js.log",jG="log.severity",QG="log.message",Yf="launchdarkly.sampling.ratio";function $G(t){return"regexValue"in t}function qG(t){return"matchValue"in t}function tL(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var ac=class{constructor(e=tL){yt(this,"regexCache",new Map),yt(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,n,r,i;return!!((n=(e=this.config)==null?void 0:e.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(e){var n,r;return e.name===BG?this.sampleLog((n=this.config)==null?void 0:n.logs,e):this.sampleSpan((r=this.config)==null?void 0:r.spans,e)}matchesValue(e,n){if(!e)return!1;if(qG(e))return e.matchValue===n;if($G(e)){let r=e.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(e,n){if(e)for(let r of e){let i=!1;for(let o of Object.keys(n))if(this.matchesValue(r.key,o)){let s=n[o];if(this.matchesValue(r.attribute,s)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||e.attributes&&(!n.attributes||!this.matchesAttributes(e.attributes,n.attributes)))}matchesEvents(e,n){if(e)for(let r of e){let i=!1;for(let o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||!this.matchesAttributes(e.attributes,n.attributes)||!this.matchesEvents(e.events,n.events))}matchesLogConfig(e,n){if(e.severityText){let r=n[jG];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[QG];if(typeof r=="string"&&!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,n)}sampleSpan(e,n){if(e){for(let r of e)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[Yf]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,n){if(e){for(let r of e)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[Yf]:r.samplingRatio}}}return{sample:!0}}},Kf=()=>{let t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,n)=>t,setAttributes:e=>t,addEvent:(e,n,r)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},lc=class{constructor(e){yt(this,"organizationID"),yt(this,"_integrations",[]),yt(this,"_gauges",new Map),yt(this,"_counters",new Map),yt(this,"_histograms",new Map),yt(this,"_up_down_counters",new Map),yt(this,"sampler",new ac),yt(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),RG(Jt(mt({},e),{getIntegrations:()=>this.Vn}),this.sampler);let n=new yE(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=PE(n,$E()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return Yo(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){Ve("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}recordLog(e,n,r){this.startSpan(EG,i=>{let o=typeof e=="string"?e:rn(e);i==null||i.addEvent("log",mt({"log.severity":n,"log.message":o},r)),n==="error"&&(i==null||i.recordException(new Error(o)),i==null||i.setStatus({code:Vo.ERROR,message:o}))})}recordError(e,n,r,i,o){var s,a,c,l;e.cause&&(r=Jt(mt({},r),{"exception.cause":JSON.stringify(e.cause)}));let u=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(u="ErrorBoundary: "+u);let h=Ko(e),p={error:e,event:u,type:o!=null?o:"custom",url:window.location.href,source:i!=null?i:"",lineNumber:(s=h[0])!=null&&s.lineNumber?(a=h[0])==null?void 0:a.lineNumber:0,columnNumber:(c=h[0])!=null&&c.columnNumber?(l=h[0])==null?void 0:l.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString()};this.startSpan("highlight.exception",f=>{f==null||f.recordException(e),f==null||f.setAttributes(mt({event:p.event,type:p.type,url:p.url,source:p.source,lineNumber:p.lineNumber,columnNumber:p.columnNumber},r))});for(let f of this.Vn)f.error(Fe(),p)}recordCount(e){let n=Ze.getMeter(ao),r=this.za.get(e.name);r||(r=n.createCounter(e.name),this.za.set(e.name,r)),r.add(e.value,Jt(mt({},e.attributes),{"highlight.session_id":Fe()}))}recordGauge(e){var n,r,i;let o=Ze.getMeter(ao),s=this.Ba.get(e.name);s||(s=o.createGauge(e.name),this.Ba.set(e.name,s)),s.record(e.value,Jt(mt({},e.attributes),{"highlight.session_id":Fe()}));let a={name:e.name,value:e.value,category:(n=e.attributes)==null?void 0:n.category,group:(i=(r=e.attributes)==null?void 0:r.group)==null?void 0:i.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,l])=>{var u;return{name:c!=null?c:"",value:(u=l==null?void 0:l.toString())!=null?u:""}}):[]};for(let c of this.Vn)c.recordGauge(Fe(),a)}recordIncr(e){this.recordCount(Jt(mt({},e),{value:1}))}recordHistogram(e){let n=Ze.getMeter(ao),r=this.ja.get(e.name);r||(r=n.createHistogram(e.name),this.ja.set(e.name,r)),r.record(e.value,Jt(mt({},e.attributes),{"highlight.session_id":Fe()}))}recordUpDownCounter(e){let n=Ze.getMeter(ao),r=this.Qa.get(e.name);r||(r=n.createUpDownCounter(e.name),this.Qa.set(e.name,r)),r.add(e.value,Jt(mt({},e.attributes),{"highlight.session_id":Fe()}))}startSpan(e,n,r,i){let o=Zf();if(!o){let a=Kf();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}let s=(a,c)=>{let l=c(a);return l instanceof Promise?l.finally(()=>a.end()):(a.end(),l)};return i===void 0&&r===void 0?o.startActiveSpan(e,a=>s(a,n)):i===void 0?o.startActiveSpan(e,n,a=>s(a,r)):o.startActiveSpan(e,n,r,a=>s(a,i))}startManualSpan(e,n,r,i){let o=Zf();if(!o){let s=Kf();return i===void 0&&r===void 0?n(s):i===void 0?r(s):i(s)}return i===void 0&&r===void 0?o.startActiveSpan(e,n):i===void 0?o.startActiveSpan(e,n,r):o.startActiveSpan(e,n,r,i)}register(e,n){this.Vn.push(new fR(e,n))}getHooks(e){return this.Vn.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}submitViewportMetrics({height:e,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:tn.ViewportHeight,value:e,attributes:{category:Bt.Device,group:window.location.href}}),this.recordGauge({name:tn.ViewportWidth,value:n,attributes:{category:Bt.Device,group:window.location.href}}),this.recordGauge({name:tn.ScreenHeight,value:r,attributes:{category:Bt.Device,group:window.location.href}}),this.recordGauge({name:tn.ScreenWidth,value:i,attributes:{category:Bt.Device,group:window.location.href}}),this.recordGauge({name:tn.ViewportArea,value:e*n,attributes:{category:Bt.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||ZR(i=>{var o,s,a,c,l;let u=Jt(mt({},i.attributes?{attributes:i.attributes}:{}),{type:i.type});if(e.reportConsoleErrors&&(i.type==="Error"||i.type==="error")&&i.value&&i.trace){let h=rn(i.value);if(Rd.includes(h)||Cd.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=rn(i.trace.map(f=>f.toString())),u.url=window.location.href,u.source=(o=i.trace[0])==null?void 0:o.fileName,u.lineNumber=(a=(s=i.trace[0])==null?void 0:s.lineNumber)==null?void 0:a.toString(),u.columnNumber=(l=(c=i.trace[0])==null?void 0:c.columnNumber)==null?void 0:l.toString(),this.recordError(p,void 0,u,u.source,"console.error")}this.recordLog(rn(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(GG(i=>{Object.entries(i).filter(([o])=>o!=="relativeTimestamp").forEach(([o,s])=>s&&this.recordGauge({name:o,value:s,attributes:{category:Bt.Performance,group:window.location.href}}))},0),NG(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:Bt.WebVital,group:i.querySelector}})},0)),VR(i=>{var o;if(Rd.includes(i.event)||Cd.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=rn(i.stackTrace.map(c=>c.toString()));let a={};try{i.payload&&(a=JSON.parse(i.payload))}catch(c){}this.recordError((o=i.error)!=null?o:s,i.event,Jt(mt({},a),{lineNumber:i.lineNumber.toString(),columnNumber:i.columnNumber.toString(),source:i.source,url:i.url}),i.source,i.type)},{enablePromisePatch:!!e.enablePromisePatch}),KG(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:Bt.WebVital}})}),yR(i=>{this.submitViewportMetrics(i)}),_G(i=>{let o={category:Bt.Performance,group:window.location.href};i.saveData!==void 0&&(o.saveData=i.saveData.toString()),i.effectiveType!==void 0&&(o.effectiveType=i.effectiveType.toString()),i.type!==void 0&&(o.type=i.type.toString()),Object.entries(i).filter(([s])=>s!=="relativeTimestamp").forEach(([s,a])=>a&&typeof a=="number"&&this.recordGauge({name:s,value:a,attributes:o}))},new Date().getTime());let{getDeviceDetails:r}=HG();r&&this.recordGauge({name:tn.DeviceMemory,value:r().deviceMemory,attributes:{category:Bt.Device,group:window.location.href}})}},Mo=class extends bR{constructor(e,n){var r=(...h)=>(super(...h),yt(this,"observe"),this),i,o,s,a,c,l,u;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because projectID was passed undefined.");return}let h={backendUrl:(i=n==null?void 0:n.backendUrl)!=null?i:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(s=(o=n==null?void 0:n.otel)==null?void 0:o.otlpEndpoint)!=null?s:"https://otel.observability.app.launchdarkly.com",projectId:e,sessionSecureId:this.sessionSecureID,environment:(a=n==null?void 0:n.environment)!=null?a:"production",networkRecordingOptions:typeof(n==null?void 0:n.networkRecording)=="object"?n.networkRecording:void 0,tracingOrigins:n==null?void 0:n.tracingOrigins,serviceName:(c=n==null?void 0:n.serviceName)!=null?c:"browser",instrumentations:(l=n==null?void 0:n.otel)==null?void 0:l.instrumentations,eventNames:(u=n==null?void 0:n.otel)==null?void 0:u.eventNames};this.observe=new lc(h),ln.load(this.observe)}catch(h){Ve("Error initializing @launchdarkly/observability SDK","error",h)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,n){var r;(r=this.observe)==null||r.register(e,n)}getHooks(e){var n,r;let i=mt(mt({[Z1]:e.sdk.name,[k1]:e.sdk.version,[tR]:e.clientSideId,[oR]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[aR]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[lR]:e.application.version}:{});return[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(o,s,a)=>{var c,l,u,h,p;for(let f of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=f.afterIdentify)==null||h.call(f,o,s,a);return(p=this.observe)==null||p.recordLog("LD.identify","info",Jt(mt({},i),{key:vd(o.context),context:JSON.stringify(wd(o.context)),timeout:o.timeout,[pR]:a.status})),s},afterEvaluation:(o,s,a)=>{var c,l,u,h,p;for(let d of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=d.afterEvaluation)==null||h.call(d,o,s,a);let f=mt({[eR]:o.flagKey,[iR]:JSON.stringify(a.value)},a.variationIndex?{[sR]:a.variationIndex}:{});if(a.reason)for(let d in gd){let v=d,g=a.reason[v];g&&(f[gd[v]]=g)}o.context&&(f[nR]=JSON.stringify(wd(o.context)),f[rR]=vd(o.context));let m=mt(mt({},i),f);return(p=this.observe)==null||p.startSpan(qE,d=>{d&&d.addEvent(Lt,m)}),s},afterTrack:o=>{var s,a,c,l,u;for(let h of(c=(a=(s=this.observe)==null?void 0:s.getHooks)==null?void 0:a.call(s,e))!=null?c:[])(l=h.afterTrack)==null||l.call(h,o);(u=this.observe)==null||u.recordLog("LD.track","info",mt(Jt(mt({},i),{key:o.key,value:o.metricValue}),typeof o.data=="object"?o.data:{}))}}]}};Gc();function GJ(t,e,n){var i,o;let r=Dh(Jh({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new Mo((i=n==null?void 0:n.tmpProjectId)!=null?i:"1",n==null?void 0:n.observability),new Ci((o=n==null?void 0:n.tmpProjectId)!=null?o:"1",n==null?void 0:n.sessionReplay)]});return ld(t,e,r)}export{ln as LDObserve,In as LDRecord,c9 as basicLogger,GJ as createClient};
642
+ `,um(l,e),`To resolve the conflict:
643
+ `,hm(l,e))}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t})(),wG=(function(){function t(e){this.xa=e}return t.prototype.record=function(e,n,r,i){this.xa.forEach(function(o){o.record(e,n,r,i)})},t})(),SG=(function(){function t(e,n){this.ns=e,this.Va=n,this.Nr=new xn}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){M.warn("non-number value provided to metric "+this.ns+": "+e);return}this.Va===an.INT&&!Number.isInteger(e)&&(M.warn("INT value type cannot accept a floating-point value for "+this.ns+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Nr.set(n,e)},t})(),IG=(function(){function t(){this.Nr=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!Gc(e)){var i=this.Nr.get(e);if(i==null&&(i=new xn,this.Nr.set(e,i)),typeof n!="number"){M.warn("non-number value provided to metric "+e.qe.name+": "+n);return}e.qe.valueType===an.INT&&!Number.isInteger(n)&&(M.warn("INT value type cannot accept a floating-point value for "+e.qe.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},t})(),rc=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},ic=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},pm=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},dm=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},TG=(function(){function t(){this.vi=[],this.wi=[]}return t.prototype.addCallback=function(e,n){var r=this.rs(e,n);r>=0||this.vi.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this.rs(e,n);r<0||this.vi.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter(Gc));if(r.size===0){M.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this.ss(e,r);i>=0||this.wi.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter(Gc)),i=this.ss(e,r);i<0||this.wi.splice(i,1)},t.prototype.observe=function(e,n){return rc(this,void 0,void 0,function(){var r,i,o,s;return ic(this,function(a){switch(a.label){case 0:return r=this.Oa(e,n),i=this.Na(e,n),[4,aN(dm(dm([],pm(r),!1),pm(i),!1))];case 1:return o=a.sent(),s=o.filter(lN).map(function(c){return c.reason}),[2,s]}})})},t.prototype.Oa=function(e,n){var r=this;return this.vi.map(function(i){var o=i.callback,s=i.instrument;return rc(r,void 0,void 0,function(){var a,c;return ic(this,function(l){switch(l.label){case 0:return a=new SG(s.qe.name,s.qe.valueType),c=Promise.resolve(o(a)),n!=null&&(c=di(c,n)),[4,c];case 1:return l.sent(),s.$o.forEach(function(u){u.record(a.Nr,e)}),[2]}})})})},t.prototype.Na=function(e,n){var r=this;return this.wi.map(function(i){var o=i.callback,s=i.instruments;return rc(r,void 0,void 0,function(){var a,c;return ic(this,function(l){switch(l.label){case 0:return a=new IG,c=Promise.resolve(o(a)),n!=null&&(c=di(c,n)),[4,c];case 1:return l.sent(),s.forEach(function(u){var h=a.Nr.get(u);h!=null&&u.$o.forEach(function(p){p.record(h,e)})}),[2]}})})})},t.prototype.rs=function(e,n){return this.vi.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype.ss=function(e,n){return this.wi.findIndex(function(r){return r.callback===e&&cN(r.instruments,n)})},t})(),EG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),RG=(function(t){EG(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.no=i,a.ro=s,a.qr=new Og(r,a.ro),a.io=new Ng(r,o),a}return e.prototype.record=function(n,r,i,o){r=this.no.process(r,i),this.qr.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this.qr.collect();return this.io.buildMetrics(n,this.Yn,i,r)},e})(Vg),Gg=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),lu=(function(){function t(){}return t.Noop=function(){return kG},t})(),CG=(function(t){Gg(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(lu);(function(t){Gg(e,t);function e(n){var r=t.call(this)||this;return r.Ga=n,r}return e.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(s){return i.Ga.includes(s)}).forEach(function(s){return o[s]=n[s]}),o},e})(lu);var kG=new CG,ZG=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},xG=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},VG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},OG=(function(){function t(e,n){this.so=e,this.ls=n,this.metricStorageRegistry=new vG,this.observableRegistry=new TG,this.meter=new aG(this)}return t.prototype.registerMetricStorage=function(e){var n=this.cs(e,RG);return n.length===1?n[0]:new wG(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.cs(e,fG);return n},t.prototype.collect=function(e,n,r){return ZG(this,void 0,void 0,function(){var i,o,s;return xG(this,function(a){switch(a.label){case 0:return[4,this.observableRegistry.observe(n,r==null?void 0:r.timeoutMillis)];case 1:return i=a.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(s=o.map(function(c){return c.collect(e,n)}).filter(oN),s.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this.ls,metrics:s},errors:i}])}})})},t.prototype.cs=function(e,n){var r=this,i=this.so.viewRegistry.findViews(e,this.ls),o=i.map(function(c){var l=dN(c,e),u=r.metricStorageRegistry.findOrUpdateCompatibleStorage(l);if(u!=null)return u;var h=c.aggregation.createAggregator(l),p=new n(l,h,c.attributesProcessor,r.so.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(p),p});if(o.length===0){var s=this.so.selectAggregations(e.type),a=s.map(function(c){var l=VG(c,2),u=l[0],h=l[1],p=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(u,e);if(p!=null)return p;var f=h.createAggregator(e),m=u.selectCardinalityLimit(e.type),d=new n(e,f,lu.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),NG=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},GG=(function(){function t(e){this.resource=e,this.viewRegistry=new qN,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=sN(e),r=this.meterSharedStates.get(n);return r==null&&(r=new OG(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=NG(this.metricCollectors),s=o.next();!s.done;s=o.next()){var a=s.value;i.push([a,a.selectAggregation(e)])}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t})(),Vo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Oo=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},LG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},XG=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},WG=(function(){function t(e,n){this._n=e,this.ti=n}return t.prototype.collect=function(e){return Vo(this,void 0,void 0,function(){var n,r,i,o,s=this;return Oo(this,function(a){switch(a.label){case 0:return n=de(Date.now()),r=[],i=[],o=Array.from(this._n.meterSharedStates.values()).map(function(c){return Vo(s,void 0,void 0,function(){var l;return Oo(this,function(u){switch(u.label){case 0:return[4,c.collect(this,n,e)];case 1:return l=u.sent(),(l==null?void 0:l.scopeMetrics)!=null&&r.push(l.scopeMetrics),(l==null?void 0:l.errors)!=null&&i.push.apply(i,XG([],LG(l.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return a.sent(),[2,{resourceMetrics:{resource:this._n.resource,scopeMetrics:r},errors:i}]}})})},t.prototype.forceFlush=function(e){return Vo(this,void 0,void 0,function(){return Oo(this,function(n){switch(n.label){case 0:return[4,this.ti.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return Vo(this,void 0,void 0,function(){return Oo(this,function(n){switch(n.label){case 0:return[4,this.ti.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this.ti.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this.ti.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this.ti).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t})(),fm=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},mm=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ym=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function MG(t,e){var n=e!=null?e:pi.empty();return t?pi.default().merge(n):n}var PG=(function(){function t(e){var n,r,i,o,s;if(this._e=!1,this._n=new GG(MG((s=e==null?void 0:e.mergeResourceWithDefaults)!==null&&s!==void 0?s:!0,e==null?void 0:e.resource)),(e==null?void 0:e.views)!=null&&e.views.length>0)try{for(var a=ym(e.views),c=a.next();!c.done;c=a.next()){var l=c.value;this._n.viewRegistry.addView(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if((e==null?void 0:e.readers)!=null&&e.readers.length>0)try{for(var u=ym(e.readers),h=u.next();!h.done;h=u.next()){var p=h.value;this.addMetricReader(p)}}catch(f){i={error:f}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._e?(M.warn("A shutdown MeterProvider cannot provide a Meter"),Ok()):this._n.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new WG(this._n,e);e.setMetricProducer(n),this._n.metricCollectors.push(n)},t.prototype.shutdown=function(e){return fm(this,void 0,void 0,function(){return mm(this,function(n){switch(n.label){case 0:return this._e?(M.warn("shutdown may only be called once per MeterProvider"),[2]):(this._e=!0,[4,Promise.all(this._n.metricCollectors.map(function(r){return r.shutdown(e)}))]);case 1:return n.sent(),[2]}})})},t.prototype.forceFlush=function(e){return fm(this,void 0,void 0,function(){return mm(this,function(n){switch(n.label){case 0:return this._e?(M.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._n.metricCollectors.map(function(r){return r.forceFlush(e)}))];case 1:return n.sent(),[2]}})})},t})();function UG(t,e){var n=dg(e);return{resource:fg(t.resource),schemaUrl:void 0,scopeMetrics:FG(t.scopeMetrics,n)}}function FG(t,e){return Array.from(t.map(function(n){return{scope:mg(n.scope),metrics:n.metrics.map(function(r){return AG(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function AG(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=KG(t.aggregationTemporality);switch(t.dataPointType){case Le.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:gm(t,e)};break;case Le.GAUGE:n.gauge={dataPoints:gm(t,e)};break;case Le.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:JG(t,e)};break;case Le.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:YG(t,e)};break}return n}function DG(t,e,n){var r={attributes:Wn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case an.INT:r.asInt=t.value;break;case an.DOUBLE:r.asDouble=t.value;break}return r}function gm(t,e){return t.dataPoints.map(function(n){return DG(n,t.descriptor.valueType,e)})}function JG(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:Wn(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function YG(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:Wn(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function KG(t){switch(t){case Se.DELTA:return 1;case Se.CUMULATIVE:return 2}}function _G(t,e){return{resourceMetrics:t.map(function(n){return UG(n,e)})}}var HG=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function BG(t,e){var n,r=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:Wn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return QG(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return jG(o,e)}),droppedLinksCount:t.droppedLinksCount}}function jG(t,e){var n;return{attributes:t.attributes?Wn(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(n=t.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function QG(t,e){return{attributes:t.attributes?Wn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function $G(t,e){var n=dg(e);return{resourceSpans:tL(t,n)}}function qG(t){var e,n,r=new Map;try{for(var i=HG(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=r.get(s.resource);a||(a=new Map,r.set(s.resource,a));var c=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),l=a.get(c);l||(l=[],a.set(c,l)),l.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function tL(t,e){for(var n=qG(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=zG(o.value,2),a=s[0],c=s[1],l=[],u=c.values(),h=u.next();!h.done;){var p=h.value;if(p.length>0){var f=p.map(function(d){return BG(d,e)});l.push({scope:mg(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:fg(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var eL={serializeRequest:function(t){var e=_G([t],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},nL={serializeRequest:function(t){var e=$G(t,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},rL=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},iL=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},oL=5,sL=1e3,aL=5e3,lL=1.5,bm=.2;function cL(){return Math.random()*(2*bm)-bm}var uL=(function(){function t(e){this.Rr=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,s){setTimeout(function(){i.Rr.send(e,n).then(o,s)},r)})},t.prototype.send=function(e,n){var r;return rL(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return iL(this,function(h){switch(h.label){case 0:return i=Date.now()+n,[4,this.Rr.send(e,n)];case 1:o=h.sent(),s=oL,a=sL,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,aL)+cL(),0),a=a*lL,l=(r=o.retryInMillis)!==null&&r!==void 0?r:c,u=i-Date.now(),l>u?[2,o]:[4,this.retry(e,u,l)]):[3,4];case 3:return o=h.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this.Rr.shutdown()},t})();function Lg(t){return new uL(t.transport)}function hL(t){var e=[429,502,503,504];return e.includes(t)}function pL(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}}var dL=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},fL=(function(){function t(e){this.us=e}return t.prototype.send=function(e,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r.us.url);var s=r.us.headers();Object.entries(s).forEach(function(a){var c=dL(a,2),l=c[0],u=c[1];o.setRequestHeader(l,u)}),o.ontimeout=function(a){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(M.debug("XHR success"),i({status:"success"})):o.status&&hL(o.status)?i({status:"retryable",retryInMillis:pL(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t})();function mL(t){return new fL(t)}var yL=(function(){function t(e){this.hs=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n.hs.url,new Blob([e],{type:n.hs.blobType}))?(M.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t})();function gL(t){return new yL(t)}function bL(t,e){return cg(t,e,Lg({transport:mL(t)}))}function vL(t,e){return cg(t,e,Lg({transport:gL({url:t.url,blobType:t.headers()["Content-Type"]})}))}var wL=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function SL(t){return function(){var e,n={};return Object.entries((e=t==null?void 0:t())!==null&&e!==void 0?e:{}).forEach(function(r){var i=wL(r,2),o=i[0],s=i[1];typeof s<"u"?n[o]=String(s):M.warn('Header "'+o+'" has invalid value ('+s+") and will be ignored")}),n}}var Ln=function(){return Ln=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ln.apply(this,arguments)};function IL(t,e,n){var r=Ln({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function TL(t){if(t!=null)try{return new URL(t),t}catch(e){throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function EL(t,e,n){var r,i,o,s;return Ln(Ln({},PO(t,e,n)),{headers:IL(SL(t.headers),e.headers,n.headers),url:(i=(r=TL(t.url))!==null&&r!==void 0?r:e.url)!==null&&i!==void 0?i:n.url,agentOptions:(s=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&s!==void 0?s:n.agentOptions})}function RL(t,e){return Ln(Ln({},UO()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function CL(t,e,n){return EL({url:t.url,timeoutMillis:t.timeoutMillis,headers:MO(t.headers),concurrencyLimit:t.concurrencyLimit},{},RL(n,e))}function Xg(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=CL(t,n,r);return i?bL(o,e):vL(o,e)}var kL=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ZL=(function(t){kL(e,t);function e(n){return n===void 0&&(n={}),t.call(this,Xg(n,nL,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(lg),os;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(os||(os={}));var xL=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Lc=function(){return Se.CUMULATIVE},Wg=function(t){switch(t){case H.COUNTER:case H.OBSERVABLE_COUNTER:case H.GAUGE:case H.HISTOGRAM:case H.OBSERVABLE_GAUGE:return Se.DELTA;case H.UP_DOWN_COUNTER:case H.OBSERVABLE_UP_DOWN_COUNTER:return Se.CUMULATIVE}},Mg=function(t){switch(t){case H.COUNTER:case H.HISTOGRAM:return Se.DELTA;case H.GAUGE:case H.UP_DOWN_COUNTER:case H.OBSERVABLE_UP_DOWN_COUNTER:case H.OBSERVABLE_COUNTER:case H.OBSERVABLE_GAUGE:return Se.CUMULATIVE}};function VL(){var t=pr(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?Lc:e==="delta"?Wg:e==="lowmemory"?Mg:(M.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Lc)}function OL(t){return t!=null?t===os.DELTA?Wg:t===os.LOWMEMORY?Mg:Lc:VL()}function NL(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return He.Default()}}var GL=(function(t){xL(e,t);function e(n,r){var i=t.call(this,n)||this;return i.Bi=NL(r),i.ji=OL(r==null?void 0:r.temporalityPreference),i}return e.prototype.selectAggregation=function(n){return this.Bi(n)},e.prototype.selectAggregationTemporality=function(n){return this.ji(n)},e})(lg),LL=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),XL=(function(t){LL(e,t);function e(n){return t.call(this,Xg(n!=null?n:{},eL,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(GL);function WL(t,e){let n=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>n,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:My(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function ML(t,e){if(!e.isSamplingEnabled())return t;let n=[],r={},i={};for(let o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));let s=e.shouldSample(o);s.sample?s.attributes?r[o.spanContext().spanId]=WL(o,s.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){let o=n.shift(),s=i[o];if(s)for(let a of s)delete r[a],n.push(a)}return Object.values(r)}var Xc=class extends ZL{constructor(e,n){super(zt(bt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=ML(e,this.sampler);if(r.length===0)return;let i=0,o=s=>{var a;if(s.code===Gt.SUCCESS)return n({code:Gt.SUCCESS});if(i++,i>Bc)return console.error(`[@launchdarkly/observability] failed to export OTeL traces: ${(a=s.error)==null?void 0:a.message}`,s.error),n({code:Gt.FAILED,error:s.error});new Promise(c=>setTimeout(c,jc+Qc*Math.pow(2,i))).then(()=>{var c;console.warn(`[@launchdarkly/observability] retry ${i}, failed to export OTeL traces: ${(c=s.error)==null?void 0:c.message}`,s.error),super.export(r,o)})};super.export(r,o)}},Wc=class extends XL{constructor(e){super(zt(bt({},e),{headers:{}}))}export(e,n){let r=0,i=o=>{var s;if(o.code===Gt.SUCCESS)return n({code:Gt.SUCCESS});if(r++,r>Bc)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(s=o.error)==null?void 0:s.message}`,o.error),n({code:Gt.FAILED,error:o.error});new Promise(a=>setTimeout(a,jc+Qc*Math.pow(2,r))).then(()=>{var a;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),super.export(e,i)})};super.export(e,i)}},PL="OT_ZONE_CONTEXT",UL="Navigation:",FL=["click","input","submit"];function AL(){return!1}var Mc=class Sn extends Hy{constructor(e={}){var n;super(Sn.moduleName,Sn.version,e),St(this,"_spansData",new WeakMap),St(this,"_zonePatched"),St(this,"_wrappedListeners",new WeakMap),St(this,"_eventsSpanMap",new WeakMap),St(this,"_eventNames"),St(this,"_shouldPreventSpanCreation"),this.La=new Set((n=e==null?void 0:e.eventNames)!=null?n:FL),this.Xa=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:AL}init(){}Wa(e,n){let r=this.Gr.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=Nn():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}Ma(e){return this.La.has(e)}Er(e,n){var r;let i=e==null?void 0:e.target,o=e==null?void 0:e.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this.Ma(o))return;let s=tg(i,!0);try{let a=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":s,"event.id":i.id,"event.text":(r=i.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?pt.setSpan(st.active(),n):void 0);return e instanceof MouseEvent&&(a.setAttribute("event.x",e.clientX),a.setAttribute("event.y",e.clientY),a.setAttribute("event.relativeX",e.clientX/window.innerWidth),a.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY))),this.Xa(o,i,a)===!0?void 0:(this.Gr.set(a,{taskCount:0}),a)}catch(a){this.w.error("failed to start create new user interaction span",a)}}ao(e){let n=this.Gr.get(e);n&&(n.taskCount--,n.taskCount===0&&this.Pa(e,n.hrTimeLastTimeout))}Si(e){let n=e.get(PL);return n&&pt.getSpan(n)}ps(e){let n=this.Gr.get(e);n&&n.taskCount++}addPatchedListener(e,n,r,i){let o=this.lo.get(r);o||(o=new Map,this.lo.set(r,o));let s=o.get(n);return s||(s=new Map,o.set(n,s)),s.has(e)?!1:(s.set(e,i),!0)}removePatchedListener(e,n,r){let i=this.lo.get(r);if(!i)return;let o=i.get(n);if(!o)return;let s=o.get(e);return s&&(o.delete(e),o.size===0&&(i.delete(n),i.size===0&&this.lo.delete(r))),s}Ii(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}Ua(){let e=this,n=new Map;return r=>function(i,o,s){if(!o)return r.call(this,i,o,s);let a=s&&typeof s=="object"&&s.once,c=function(...l){var u;let h,p=l[0];if(!(p!=null&&p.type))return e.Ii(o,this,l);if(Date.now()-((u=n.get(p.type))!=null?u:0)<1e3/60)return e.Ii(o,this,l);n.set(p.type,Date.now()),p&&(h=e.Fa.get(p)),a&&e.removePatchedListener(this,i,o);let f=e.Er(p,h);return f?(p&&e.Fa.set(p,f),st.with(pt.setSpan(st.active(),f),()=>{let m=e.Ii(o,this,l);return f.end(),m})):e.Ii(o,this,l)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,s)}}Aa(){let e=this;return n=>function(r,i,o){let s=e.removePatchedListener(this,r,i);return s?n.call(this,r,s,o):n.call(this,r,i,o)}}ds(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}Da(){this.fs(),this.re(history,"replaceState",this.ei()),this.re(history,"pushState",this.ei()),this.re(history,"back",this.ei()),this.re(history,"forward",this.ei()),this.re(history,"go",this.ei())}ei(){let e=this;return n=>function(...r){let i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),s=`${location.pathname}${location.hash}${location.search}`;return i!==s&&e.Ja(s),o}}fs(){Ft(history.replaceState)&&this.L(history,"replaceState"),Ft(history.pushState)&&this.L(history,"pushState"),Ft(history.back)&&this.L(history,"back"),Ft(history.forward)&&this.L(history,"forward"),Ft(history.go)&&this.L(history,"go")}Ja(e){let n=pt.getSpan(st.active());n&&typeof n.updateName=="function"&&n.updateName(`${UL} ${e}`)}Ya(){let e=this;return n=>function(r){let i=Zone.current,o=e.Si(i);return o&&e.co(r,i)&&e.ao(o),n.call(this,r)}}Ka(){let e=this;return n=>function(r){let i=Zone.current,o=e.Si(i);return o&&e.co(r,i)&&(e.ps(o),e.Wa(r,o)),n.call(this,r)}}_a(){let e=this;return n=>function(r,i,o){let s=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,a=s==null?void 0:s.target,c,l=this;if(a){if(c=e.Er(s),c)return e.ps(c),l.run(()=>{try{return st.with(pt.setSpan(st.active(),c),()=>{let u=Zone.current;return r.ms=u,n.call(u,r,i,o)})}finally{e.ao(c)}})}else c=e.Si(l);try{return n.call(l,r,i,o)}finally{c&&e.co(r,l)&&e.ao(c)}}}co(e,n){if(e.ms&&(n=e.ms),!n||!e.data||e.data.isPeriodic)return!1;let r=this.Si(n);return!r||!this.Gr.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}Pa(e,n){e&&this.Gr.get(e)&&(e.end(n),this.Gr.delete(e))}enable(){let e=this.ys();this.w.debug("applying patch to",Sn.moduleName,Sn.version,"zone:",!!e),e?(Ft(e.prototype.runTask)&&(this.L(e.prototype,"runTask"),this.w.debug("removing previous patch from method runTask")),Ft(e.prototype.scheduleTask)&&(this.L(e.prototype,"scheduleTask"),this.w.debug("removing previous patch from method scheduleTask")),Ft(e.prototype.cancelTask)&&(this.L(e.prototype,"cancelTask"),this.w.debug("removing previous patch from method cancelTask")),this.gs=!0,this.re(e.prototype,"runTask",this._a()),this.re(e.prototype,"scheduleTask",this.Ka()),this.re(e.prototype,"cancelTask",this.Ya())):(this.gs=!1,this.ds().forEach(n=>{Ft(n.addEventListener)&&(this.L(n,"addEventListener"),this.w.debug("removing previous patch from method addEventListener")),Ft(n.removeEventListener)&&(this.L(n,"removeEventListener"),this.w.debug("removing previous patch from method removeEventListener")),this.re(n,"addEventListener",this.Ua()),this.re(n,"removeEventListener",this.Aa())})),this.Da()}disable(){let e=this.ys();this.w.debug("removing patch from",Sn.moduleName,Sn.version,"zone:",!!e),e&&this.gs?(Ft(e.prototype.runTask)&&this.L(e.prototype,"runTask"),Ft(e.prototype.scheduleTask)&&this.L(e.prototype,"scheduleTask"),Ft(e.prototype.cancelTask)&&this.L(e.prototype,"cancelTask")):this.ds().forEach(n=>{Ft(n.addEventListener)&&this.L(n,"addEventListener"),Ft(n.removeEventListener)&&this.L(n,"removeEventListener")}),this.fs()}ys(){return window.Zone}};St(Mc,"version","0.1.0"),St(Mc,"moduleName","user-interaction");var DL=Mc,In={},nn,ss="highlight.record",JL="highlight.session_id",YL="launchdarkly.js.log",KL=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(In.tracerProvider!==void 0){console.warn("OTEL already initialized. Skipping...");return}nn=t;let h=t.backendUrl||void 0||"https://pub.highlight.io",p=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...EO],f=(i=t.environment)!=null?i:"production",m={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:100,timeoutMillis:5e3,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:5e3,keepAlive:!0}},d=new Xc(m,e),g=new Pc(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),b=new pi({[_x]:(o=t.serviceName)!=null?o:"highlight-browser",[Kx]:f,"highlight.project_id":t.projectId});In.tracerProvider=new Zx({resource:b,spanProcessors:[g]}),pt.setGlobalTracerProvider(In.tracerProvider);let w=new Wc(zt(bt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),E=new $N({exporter:w,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});In.meterProvider=new PG({resource:b,readers:[E]}),Je.setGlobalMeterProvider(In.meterProvider);let I=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&I.push(new eV({applyCustomAttributesOnSpan:{documentLoad:Im,documentFetch:Im,resourceFetch:HL}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&I.push(new DL({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&I.push(new AV({propagateTraceHeaderCorsUrls:Tm(t.tracingOrigins),applyCustomAttributesOnSpan:(T,x,Z)=>fs(void 0,null,function*(){var k,O,X;if(!T.attributes)return;let _=T;if(_.attributes[ss]===!1)return;let tt=_.attributes["http.url"],y=(k=x.method)!=null?k:"GET";if(T.updateName(wm(tt,y,x.body)),!(Z instanceof Response)){T.setAttributes({"http.response.error":Z.message,"http.response.status":Z.status});return}Sm(T,x.body,x.headers,t.networkRecordingOptions);let v=yield LO(Z,(O=t.networkRecordingOptions)==null?void 0:O.bodyKeysToRecord,(X=t.networkRecordingOptions)==null?void 0:X.networkBodyKeysToRedact);T.setAttribute("http.response.body",v)})})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&I.push(new SO({propagateTraceHeaderCorsUrls:Tm(t.tracingOrigins),applyCustomAttributesOnSpan:(T,x)=>{var Z,k;let O=x;if(!T.attributes||T.attributes[ss]===!1)return;let X=wm(O.ll,O.cl,x.responseText);T.updateName(X),Sm(T,O.Ha,O.za,t.networkRecordingOptions);let _=ag(O.Ha,(Z=t.networkRecordingOptions)==null?void 0:Z.networkBodyKeysToRedact,(k=t.networkRecordingOptions)==null?void 0:k.bodyKeysToRecord,O.za);T.setAttribute("http.request.body",_)}}))),Y1({instrumentations:I});let S=new Qy;S.enable(),In.tracerProvider.register({contextManager:S,propagator:new Oy({propagators:[new Ey,new Uc({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},Pc=class extends jy{onStart(e,n){e.setAttribute(JL,rn()),super.onStart(e,n)}onEnd(e){e.attributes[ss]!==!1&&super.onEnd(e)}},Uc=class extends Ny{constructor(e){super(),St(this,"highlightEndpoints"),St(this,"tracingOrigins"),St(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,n,r){var i;let o=pt.getSpan(e);if(!o||!o.attributes)return;let s=o.attributes["http.url"];typeof s=="string"&&(_L(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(ss,!1),!NO(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},Pg="highlight-browser",No=Pg,vm=()=>{var t;return(t=In.tracerProvider)==null?void 0:t.getTracer(Pg)},wm=(t,e,n)=>{var r,i,o;let s,a=new URL(t),c=a.pathname,l=`${e.toUpperCase()} - ${c}`;try{if(s=typeof n=="string"?JSON.parse(n):n,s&&s.query){let u=Yc(s.query),h=((r=u.definitions[0])==null?void 0:r.kind)==="OperationDefinition"?(o=(i=u.definitions[0])==null?void 0:i.name)==null?void 0:o.value:void 0;h&&(l=`${h} (GraphQL: ${a.host+a.pathname})`)}}catch(u){}return l},Sm=(t,e,n,r)=>{var i;let o=typeof e=="string"?e:String(e);if(!t.attributes)return;let s=t.attributes["http.url"],a=new URL(s),c;try{c=e?JSON.parse(o):void 0,c.operationName&&t.setAttribute("graphql.operation.name",c.operationName)}catch(u){}let l=IO((i=r==null?void 0:r.networkHeadersToRedact)!=null?i:[],n,r==null?void 0:r.headerKeysToRecord);t.setAttributes({"highlight.type":"http.request","http.request.headers":JSON.stringify(l),"http.request.body":o,[Bx]:s,[jx]:a.pathname,[Qx]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},_L=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:OO(t,e),Im=t=>{var e,n,r;if(!t.events)return;let i=t.events,o={unload:ue("unloadEventStart","unloadEventEnd",i),dom_interactive:ue("fetchStart","domInteractive",i),dom_content_loaded:ue("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:ue("fetchStart","domComplete",i),load_event:ue("loadEventStart","loadEventEnd",i),document_load:ue("fetchStart","loadEventEnd",i),first_paint:ue("fetchStart","firstPaint",i),first_contentful_paint:ue("fetchStart","firstContentfulPaint",i),domain_lookup:ue("domainLookupStart","domainLookupEnd",i),connect:ue("connectStart","connectEnd",i),request:ue("requestStart","requestEnd",i),response:ue("responseStart","responseEnd",i)},s=(n=(e=nn==null?void 0:nn.getIntegrations)==null?void 0:e.call(nn))!=null?n:[];if(o.document_load!==void 0)for(let a of s)a.recordGauge((r=nn==null?void 0:nn.sessionSecureId)!=null?r:"",{name:uy,value:o.document_load/1e6});Object.entries(o).forEach(([a,c])=>{c!==void 0&&(t.setAttribute(`timings.${a}.ns`,c),t.setAttribute(`timings.${a}.readable`,Ug(c)))})};function ue(t,e,n){let r=n.find(s=>s.name===t),i=n.find(s=>s.name===e);if(!r||!i)return;let o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}var HL=(t,e)=>{let n={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{t.setAttribute(`timings.${r}.ns`,i),t.setAttribute(`timings.${r}.readable`,Ug(i))})},Ug=t=>{if(t>=36e11){let e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){let e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){let e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){let e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){let e=t/1e3;return`${Number(e.toFixed(1))}\xB5s`}else return`${Number(t.toFixed(1))}ns`},Tm=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,zL=30,BL=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),jL=()=>fs(void 0,null,function*(){let t=[];for(let e=0;e<zL;e++)t.push(yield BL());return t.reduce((e,n)=>e+n,0)/t.length}),QL=(t,e)=>{let n={},r=16.666666666666668;jL().then(c=>r=c);let i=c=>{var l;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(l=window.performance)==null?void 0:l.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;let c=window.performance.now()-n.timerStart-r;s(c),n={}},s=c=>{let l=(new Date().getTime()-e)/1e3;t({relativeTimestamp:l,jankAmount:c,querySelector:a(),newLocation:window.location.href!=n.location?window.location.href:void 0})},a=()=>{var c;return(c=n==null?void 0:n.event)!=null&&c.target?XC(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},$L=typeof window<"u",Em=$L&&"performance"in window&&"memory"in performance?performance:{memory:{}},qL=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Em.memory.jsHeapSizeLimit||0,h=Em.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:u,usedJSHeapSize:h,relativeTimestamp:l,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let s=0,a=Date.now(),c=function(){var l=Date.now();s++,l>1e3+a&&(n=Math.round(s*1e3/(l-a)),s=0,a=l),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}},sn,si,Fg,as,Fc,Ag=-1,Un=function(t){addEventListener("pageshow",function(e){e.persisted&&(Ag=e.timeStamp,t(e))},!0)},cu=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Ss=function(){var t=cu();return t&&t.activationStart||0},ye=function(t,e){var n=cu(),r="navigate";return Ag>=0?r="back-forward-cache":n&&(document.prerendering||Ss()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},yr=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(i){}},ge=function(t,e,n,r){var i,o;return function(s){e.value>=0&&(s||r)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=(function(a,c){return a>c[1]?"poor":a>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},uu=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Is=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},hu=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},lr=-1,Rm=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},ls=function(t){document.visibilityState==="hidden"&&lr>-1&&(lr=t.type==="visibilitychange"?t.timeStamp:0,tX())},Cm=function(){addEventListener("visibilitychange",ls,!0),addEventListener("prerenderingchange",ls,!0)},tX=function(){removeEventListener("visibilitychange",ls,!0),removeEventListener("prerenderingchange",ls,!0)},pu=function(){return lr<0&&(lr=Rm(),Cm(),Un(function(){setTimeout(function(){lr=Rm(),Cm()},0)})),{get firstHiddenTime(){return lr}}},vi=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},km=[1800,3e3],Dg=function(t,e){e=e||{},vi(function(){var n,r=pu(),i=ye("FCP"),o=yr("paint",function(s){s.forEach(function(a){a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-Ss(),0),i.entries.push(a),n(!0)))})});o&&(n=ge(t,i,km,e.reportAllChanges),Un(function(s){i=ye("FCP"),n=ge(t,i,km,e.reportAllChanges),uu(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},Zm=[.1,.25],eX=function(t,e){e=e||{},Dg(hu(function(){var n,r=ye("CLS",0),i=0,o=[],s=function(c){c.forEach(function(l){if(!l.hadRecentInput){var u=o[0],h=o[o.length-1];i&&l.startTime-h.startTime<1e3&&l.startTime-u.startTime<5e3?(i+=l.value,o.push(l)):(i=l.value,o=[l])}}),i>r.value&&(r.value=i,r.entries=o,n())},a=yr("layout-shift",s);a&&(n=ge(t,r,Zm,e.reportAllChanges),Is(function(){s(a.takeRecords()),n(!0)}),Un(function(){i=0,r=ye("CLS",0),n=ge(t,r,Zm,e.reportAllChanges),uu(function(){return n()})}),setTimeout(n,0))}))},ti={passive:!0,capture:!0},nX=new Date,xm=function(t,e){sn||(sn=e,si=t,Fg=new Date,Yg(removeEventListener),Jg())},Jg=function(){if(si>=0&&si<Fg-nX){var t={entryType:"first-input",name:sn.type,target:sn.target,cancelable:sn.cancelable,startTime:sn.timeStamp,processingStart:sn.timeStamp+si};as.forEach(function(e){e(t)}),as=[]}},rX=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var i=function(){xm(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,ti),removeEventListener("pointercancel",o,ti)};addEventListener("pointerup",i,ti),addEventListener("pointercancel",o,ti)})(e,t):xm(e,t)}},Yg=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,rX,ti)})},Vm=[100,300],iX=function(t,e){e=e||{},vi(function(){var n,r=pu(),i=ye("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},s=function(c){c.forEach(o)},a=yr("first-input",s);n=ge(t,i,Vm,e.reportAllChanges),a&&Is(hu(function(){s(a.takeRecords()),a.disconnect()})),a&&Un(function(){var c;i=ye("FID"),n=ge(t,i,Vm,e.reportAllChanges),as=[],si=-1,sn=null,Yg(addEventListener),c=o,as.push(c),Jg()})})},Kg=0,oc=1/0,Go=0,oX=function(t){t.forEach(function(e){e.interactionId&&(oc=Math.min(oc,e.interactionId),Go=Math.max(Go,e.interactionId),Kg=Go?(Go-oc)/7+1:0)})},_g=function(){return Fc?Kg:performance.interactionCount||0},sX=function(){"interactionCount"in performance||Fc||(Fc=yr("event",oX,{type:"event",buffered:!0,durationThreshold:0}))},Om=[200,500],Hg=0,Nm=function(){return _g()-Hg},Ge=[],sc={},Gm=function(t){var e=Ge[Ge.length-1],n=sc[t.interactionId];if(n||Ge.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};sc[r.id]=r,Ge.push(r)}Ge.sort(function(i,o){return o.latency-i.latency}),Ge.splice(10).forEach(function(i){delete sc[i.id]})}},aX=function(t,e){e=e||{},vi(function(){var n;sX();var r,i=ye("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Gm(u),u.entryType==="first-input"&&!Ge.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Gm(u)});var c,l=(c=Math.min(Ge.length-1,Math.floor(Nm()/50)),Ge[c]);l&&l.latency!==i.value&&(i.value=l.latency,i.entries=l.entries,r())},s=yr("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=ge(t,i,Om,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),Is(function(){o(s.takeRecords()),i.value<0&&Nm()>0&&(i.value=0,i.entries=[]),r(!0)}),Un(function(){Ge=[],Hg=_g(),i=ye("INP"),r=ge(t,i,Om,e.reportAllChanges)}))})},Lm=[2500,4e3],ac={},lX=function(t,e){e=e||{},vi(function(){var n,r=pu(),i=ye("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-Ss(),0),i.entries=[l],n())},s=yr("largest-contentful-paint",o);if(s){n=ge(t,i,Lm,e.reportAllChanges);var a=hu(function(){ac[i.id]||(o(s.takeRecords()),s.disconnect(),ac[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),Is(a),Un(function(c){i=ye("LCP"),n=ge(t,i,Lm,e.reportAllChanges),uu(function(){i.value=performance.now()-c.timeStamp,ac[i.id]=!0,n(!0)})})}})},Xm=[800,1800],cX=function t(e){document.prerendering?vi(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},uX=function(t,e){e=e||{};var n=ye("TTFB"),r=ge(t,n,Xm,e.reportAllChanges);cX(function(){var i=cu();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Ss(),0),n.entries=[i],r(!0),Un(function(){n=ye("TTFB",0),(r=ge(t,n,Xm,e.reportAllChanges))(!0)})}})},hX=t=>(eX(t),Dg(t),iX(t),lX(t),uX(t),aX(t),()=>{}),sr=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},pX=(t,e)=>{let n=()=>{let i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:sr.downlink,downlinkMax:sr.downlinkMax,effectiveType:sr.effectiveType,rtt:sr.rtt,saveData:sr.saveData,type:sr.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},dX=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let t=window.performance;return{getDeviceDetails:()=>({deviceMemory:fX(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{let e=lc(t.memory.jsHeapSizeLimit),n=lc(t.memory.totalJSHeapSize),r=lc(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},lc=t=>t/Math.pow(1e3,2),fX=t=>1024*t,mX="launchdarkly.js.log",yX="log.severity",gX="log.message",Wm="launchdarkly.sampling.ratio";function bX(t){return"regexValue"in t}function vX(t){return"matchValue"in t}function wX(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var Ac=class{constructor(e=wX){St(this,"regexCache",new Map),St(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,n,r,i;return!!((n=(e=this.config)==null?void 0:e.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(e){var n,r;return e.name===mX?this.sampleLog((n=this.config)==null?void 0:n.logs,e):this.sampleSpan((r=this.config)==null?void 0:r.spans,e)}matchesValue(e,n){if(!e)return!1;if(vX(e))return e.matchValue===n;if(bX(e)){let r=e.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(e,n){if(e)for(let r of e){let i=!1;for(let o of Object.keys(n))if(this.matchesValue(r.key,o)){let s=n[o];if(this.matchesValue(r.attribute,s)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||e.attributes&&(!n.attributes||!this.matchesAttributes(e.attributes,n.attributes)))}matchesEvents(e,n){if(e)for(let r of e){let i=!1;for(let o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||!this.matchesAttributes(e.attributes,n.attributes)||!this.matchesEvents(e.events,n.events))}matchesLogConfig(e,n){if(e.severityText){let r=n[yX];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[gX];if(typeof r=="string"&&!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,n)}sampleSpan(e,n){if(e){for(let r of e)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[Wm]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,n){if(e){for(let r of e)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[Wm]:r.samplingRatio}}}return{sample:!0}}},Mm=()=>{let t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,n)=>t,setAttributes:e=>t,addEvent:(e,n,r)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},Dc=class{constructor(e){St(this,"organizationID"),St(this,"_integrations",[]),St(this,"_gauges",new Map),St(this,"_counters",new Map),St(this,"_histograms",new Map),St(this,"_up_down_counters",new Map),St(this,"sampler",new Ac),St(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),KL(zt(bt({},e),{getIntegrations:()=>this.yr}),this.sampler);let n=new WR(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=iC(n,bC()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return fs(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){Ke("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}recordLog(e,n,r){this.startSpan(YL,i=>{let o=typeof e=="string"?e:Tn(e);i==null||i.addEvent("log",bt({"log.severity":n,"log.message":o},r)),n==="error"&&(i==null||i.recordException(new Error(o)),i==null||i.setStatus({code:qo.ERROR,message:o}))})}recordError(e,n,r,i,o){var s,a,c,l;e.cause&&(r=zt(bt({},r),{"exception.cause":JSON.stringify(e.cause)}));let u=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(u="ErrorBoundary: "+u);let h=ms(e),p={error:e,event:u,type:o!=null?o:"custom",url:window.location.href,source:i!=null?i:"",lineNumber:(s=h[0])!=null&&s.lineNumber?(a=h[0])==null?void 0:a.lineNumber:0,columnNumber:(c=h[0])!=null&&c.columnNumber?(l=h[0])==null?void 0:l.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString()};this.startSpan("highlight.exception",f=>{f==null||f.recordException(e),f==null||f.setAttributes(bt({event:p.event,type:p.type,url:p.url,source:p.source,lineNumber:p.lineNumber,columnNumber:p.columnNumber},r))});for(let f of this.yr)f.error(rn(),p)}recordCount(e){let n=Je.getMeter(No),r=this.Ba.get(e.name);r||(r=n.createCounter(e.name),this.Ba.set(e.name,r)),r.add(e.value,zt(bt({},e.attributes),{"highlight.session_id":rn()}))}recordGauge(e){var n,r,i;let o=Je.getMeter(No),s=this.ja.get(e.name);s||(s=o.createGauge(e.name),this.ja.set(e.name,s)),s.record(e.value,zt(bt({},e.attributes),{"highlight.session_id":rn()}));let a={name:e.name,value:e.value,category:(n=e.attributes)==null?void 0:n.category,group:(i=(r=e.attributes)==null?void 0:r.group)==null?void 0:i.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,l])=>{var u;return{name:c!=null?c:"",value:(u=l==null?void 0:l.toString())!=null?u:""}}):[]};for(let c of this.yr)c.recordGauge(rn(),a)}recordIncr(e){this.recordCount(zt(bt({},e),{value:1}))}recordHistogram(e){let n=Je.getMeter(No),r=this.Qa.get(e.name);r||(r=n.createHistogram(e.name),this.Qa.set(e.name,r)),r.record(e.value,zt(bt({},e.attributes),{"highlight.session_id":rn()}))}recordUpDownCounter(e){let n=Je.getMeter(No),r=this.$a.get(e.name);r||(r=n.createUpDownCounter(e.name),this.$a.set(e.name,r)),r.add(e.value,zt(bt({},e.attributes),{"highlight.session_id":rn()}))}startSpan(e,n,r,i){let o=vm();if(!o){let a=Mm();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}let s=(a,c)=>{let l=c(a);return l instanceof Promise?l.finally(()=>a.end()):(a.end(),l)};return i===void 0&&r===void 0?o.startActiveSpan(e,a=>s(a,n)):i===void 0?o.startActiveSpan(e,n,a=>s(a,r)):o.startActiveSpan(e,n,r,a=>s(a,i))}startManualSpan(e,n,r,i){let o=vm();if(!o){let s=Mm();return i===void 0&&r===void 0?n(s):i===void 0?r(s):i(s)}return i===void 0&&r===void 0?o.startActiveSpan(e,n):i===void 0?o.startActiveSpan(e,n,r):o.startActiveSpan(e,n,r,i)}register(e,n){this.yr.push(new LC(e,n))}getHooks(e){return this.yr.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}submitViewportMetrics({height:e,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:wn.ViewportHeight,value:e,attributes:{category:he.Device,group:window.location.href}}),this.recordGauge({name:wn.ViewportWidth,value:n,attributes:{category:he.Device,group:window.location.href}}),this.recordGauge({name:wn.ScreenHeight,value:r,attributes:{category:he.Device,group:window.location.href}}),this.recordGauge({name:wn.ScreenWidth,value:i,attributes:{category:he.Device,group:window.location.href}}),this.recordGauge({name:wn.ViewportArea,value:e*n,attributes:{category:he.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||HC(i=>{var o,s,a,c,l;let u=zt(bt({},i.attributes?{attributes:i.attributes}:{}),{type:i.type});if(e.reportConsoleErrors&&(i.type==="Error"||i.type==="error")&&i.value&&i.trace){let h=Tn(i.value);if(bf.includes(h)||vf.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=Tn(i.trace.map(f=>f.toString())),u.url=window.location.href,u.source=(o=i.trace[0])==null?void 0:o.fileName,u.lineNumber=(a=(s=i.trace[0])==null?void 0:s.lineNumber)==null?void 0:a.toString(),u.columnNumber=(l=(c=i.trace[0])==null?void 0:c.columnNumber)==null?void 0:l.toString(),this.recordError(p,void 0,u,u.source,"console.error")}this.recordLog(Tn(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(qL(i=>{Object.entries(i).filter(([o])=>o!=="relativeTimestamp").forEach(([o,s])=>s&&this.recordGauge({name:o,value:s,attributes:{category:he.Performance,group:window.location.href}}))},0),QL(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:he.WebVital,group:i.querySelector}})},0)),BC(i=>{var o;if(bf.includes(i.event)||vf.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=Tn(i.stackTrace.map(c=>c.toString()));let a={};try{i.payload&&(a=JSON.parse(i.payload))}catch(c){}this.recordError((o=i.error)!=null?o:s,i.event,zt(bt({},a),{lineNumber:i.lineNumber.toString(),columnNumber:i.columnNumber.toString(),source:i.source,url:i.url}),i.source,i.type)},{enablePromisePatch:!!e.enablePromisePatch}),hX(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:he.WebVital}})}),WC(i=>{this.submitViewportMetrics(i)}),pX(i=>{let o={category:he.Performance,group:window.location.href};i.saveData!==void 0&&(o.saveData=i.saveData.toString()),i.effectiveType!==void 0&&(o.effectiveType=i.effectiveType.toString()),i.type!==void 0&&(o.type=i.type.toString()),Object.entries(i).filter(([s])=>s!=="relativeTimestamp").forEach(([s,a])=>a&&typeof a=="number"&&this.recordGauge({name:s,value:a,attributes:o}))},new Date().getTime());let{getDeviceDetails:r}=dX();r&&this.recordGauge({name:wn.DeviceMemory,value:r().deviceMemory,attributes:{category:he.Device,group:window.location.href}})}},cs=class extends PC{constructor(e,n){var r=(...h)=>(super(...h),St(this,"observe"),this),i,o,s,a,c,l,u;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because projectID was passed undefined.");return}let h={backendUrl:(i=n==null?void 0:n.backendUrl)!=null?i:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(s=(o=n==null?void 0:n.otel)==null?void 0:o.otlpEndpoint)!=null?s:"https://otel.observability.app.launchdarkly.com",projectId:e,sessionSecureId:this.sessionSecureID,environment:(a=n==null?void 0:n.environment)!=null?a:"production",networkRecordingOptions:typeof(n==null?void 0:n.networkRecording)=="object"?n.networkRecording:void 0,tracingOrigins:n==null?void 0:n.tracingOrigins,serviceName:(c=n==null?void 0:n.serviceName)!=null?c:"browser",instrumentations:(l=n==null?void 0:n.otel)==null?void 0:l.instrumentations,eventNames:(u=n==null?void 0:n.otel)==null?void 0:u.eventNames};this.observe=new Dc(h),kn.load(this.observe)}catch(h){Ke("Error initializing @launchdarkly/observability SDK","error",h)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,n){var r;(r=this.observe)==null||r.register(e,n)}getHooks(e){var n,r;let i=bt(bt({[Hx]:e.sdk.name,[zx]:e.sdk.version,[wC]:e.clientSideId,[RC]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[kC]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[ZC]:e.application.version}:{});return[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(o,s,a)=>{var c,l,u,h,p;for(let f of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=f.afterIdentify)==null||h.call(f,o,s,a);return(p=this.observe)==null||p.recordLog("LD.identify","info",zt(bt({},i),{key:pf(o.context),context:JSON.stringify(df(o.context)),timeout:o.timeout,[NC]:a.status})),s},afterEvaluation:(o,s,a)=>{var c,l,u,h,p;for(let d of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=d.afterEvaluation)==null||h.call(d,o,s,a);let f=bt({[SC]:o.flagKey,[EC]:JSON.stringify(a.value)},a.variationIndex?{[CC]:a.variationIndex}:{});if(a.reason)for(let d in uf){let g=d,b=a.reason[g];b&&(f[uf[g]]=b)}o.context&&(f[IC]=JSON.stringify(df(o.context)),f[TC]=pf(o.context));let m=bt(bt({},i),f);return(p=this.observe)==null||p.startSpan(vC,d=>{d&&d.addEvent(At,m)}),s},afterTrack:o=>{var s,a,c,l,u;for(let h of(c=(a=(s=this.observe)==null?void 0:s.getHooks)==null?void 0:a.call(s,e))!=null?c:[])(l=h.afterTrack)==null||l.call(h,o);(u=this.observe)==null||u.recordLog("LD.track","info",bt(zt(bt({},i),{key:o.key,value:o.metricValue}),typeof o.data=="object"?o.data:{}))}}]}};du();function $J(t,e,n){var i,o;let r=vp(bp({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new cs((i=n==null?void 0:n.tmpProjectId)!=null?i:"1",n==null?void 0:n.observability),new Qi((o=n==null?void 0:n.tmpProjectId)!=null?o:"1",n==null?void 0:n.sessionReplay)]});return tf(t,e,r)}export{kn as LDObserve,An as LDRecord,Z9 as basicLogger,$J as createClient};
644
644
  /*! Bundled license information:
645
645
 
646
646
  @launchdarkly/session-replay/dist/index-B27CYB0H.js: